This commit is contained in:
lanzhihui 2024-10-09 17:34:28 +08:00
parent 391558c1e3
commit 4d2dd3ee4f
4 changed files with 67 additions and 32 deletions

View File

@ -108,9 +108,10 @@
local_longitude: lng local_longitude: lng
} }
vm.$showLoading('定位中...') vm.$showLoading('定位中...')
vm.$get({url: `${service.host}/location/to/address`, data}).then(({code, data}) => { vm.$get({url: `${service.host}/address/location/to/address`, data}).then(({code, data}) => {
console.log(code, data, '===')
if (code === 0) { if (code === 0) {
vm.address = {country: data.nation, province: data.province, city: data.city} vm.address = {country: data.address_component.nation, province: data.address_component.province, city: data.address_component.city}
vm.selectType = 'automatic' vm.selectType = 'automatic'
vm.multiCity() vm.multiCity()
vm.$emit('residenceCity', vm.address) vm.$emit('residenceCity', vm.address)
@ -160,16 +161,40 @@
wx.getSetting({ wx.getSetting({
success: (res) => { success: (res) => {
var statu = res.authSetting var statu = res.authSetting
console.log(statu, '==')
// wx.authorize({
// scope: 'scope.userFuzzyLocation',
// success () {
// // 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
// wx.openSetting({
// success: data => {
// if (data.authSetting['scope.userFuzzyLocation'] || data.authSetting['scope.userLocation']) {
// wx.getFuzzyLocation({
// type: 'gcj02',
// success: function (res) {
// console.log(res)
// vm.getAddress(res.latitude, res.longitude)
// wx.setStorageSync('myLong', res.longitude)
// },
// fail: function () {
// vm.hide = false
// }
// })
// }
// }
// })
// }
// })
if (!statu['scope.userFuzzyLocation'] && !statu['scope.userLocation']) { if (!statu['scope.userFuzzyLocation'] && !statu['scope.userLocation']) {
wx.showModal({ wx.authorize({
title: '是否授权当前位置', scope: 'scope.userFuzzyLocation',
content: '需要获取您的地理位置,请确认授权', success () {
confirmColor: '#f16765', // 用户已经同意小程序使用地址功能,后续调用 接口不会弹窗询问
success: res => { console.log('222')
if (res.confirm) { // wx.openSetting({
wx.openSetting({ // success: data => {
success: data => { // console.log(data, '333--')
if (data.authSetting['scope.userFuzzyLocation'] || data.authSetting['scope.userLocation']) { // if (data.authSetting['scope.userFuzzyLocation'] || data.authSetting['scope.userLocation']) {
wx.getFuzzyLocation({ wx.getFuzzyLocation({
type: 'gcj02', type: 'gcj02',
success: function (res) { success: function (res) {
@ -181,12 +206,21 @@
vm.hide = false vm.hide = false
} }
}) })
} // }
} // }
}) // })
}
} }
}) })
// wx.showModal({
// title: '是否授权当前位置',
// content: '需要获取您的地理位置,请确认授权',
// confirmColor: '#f16765',
// success: res => {
// if (res.confirm) {
//
// }
// }
// })
} else { } else {
wx.getFuzzyLocation({ wx.getFuzzyLocation({
type: 'gcj02', type: 'gcj02',

View File

@ -11,11 +11,11 @@
<view class="bold font_32 text-black">{{ listCount.follow_count || '0' }}</view> <view class="bold font_32 text-black">{{ listCount.follow_count || '0' }}</view>
<view class="font_24">关注</view> <view class="font_24">关注</view>
</view> </view>
<view class="text-center flo_l mainFA" @tap="goto('/pages/news/visitor?type=fans&title=关注我的','粉丝')"> <view class="text-center flo_l mainFA" @tap="goto('/pages/news/visitor?index=1','粉丝')">
<view class="bold font_32 text-black">{{ listCount.fans_count || '0' }}</view> <view class="bold font_32 text-black">{{ listCount.fans_count || '0' }}</view>
<view class="font_24">粉丝</view> <view class="font_24">粉丝</view>
</view> </view>
<view class="text-center flo_l mainFA" @tap="goto('/pages/news/visitor?type=visitor&title=访客','访客')"> <view class="text-center flo_l mainFA" @tap="goto('/pages/news/visitor?index=0','访客')">
<view class="bold font_32 text-black">{{ listCount.preview_count || '0' }}</view> <view class="bold font_32 text-black">{{ listCount.preview_count || '0' }}</view>
<view class="font_24">访客</view> <view class="font_24">访客</view>
</view> </view>
@ -133,7 +133,7 @@
</view> </view>
</view> </view>
<view :class="{'show':modalName=='is_photo_audited'}" class="cu-modal"> <view :class="{'show':modalName=='is_photo_audited'}" class="cu-modal">
<view class="audit_photo_box ff" style="border-radius: 32rpx;padding: 22rpx;"> <view class="audit_photo_box bg_f" style="border-radius: 32rpx;padding: 22rpx;">
<image style="width: 380rpx;height: auto;margin: 22rpx;" <image style="width: 380rpx;height: auto;margin: 22rpx;"
src="https://image.fulllinkai.com/202204/14/2c8b0665f901bd2e3b1b7afafd0629c3.png" src="https://image.fulllinkai.com/202204/14/2c8b0665f901bd2e3b1b7afafd0629c3.png"
mode="widthFix"></image> mode="widthFix"></image>

View File

@ -29,7 +29,7 @@
</view> </view>
<view class="f-fc"> <view class="f-fc">
<view class="u_ordCt_tt font_32 color-999">订单时间</view> <view class="u_ordCt_tt font_32 color-999">订单时间</view>
<view class="font_32 color-333">{{orderData.updated_at}}</view> <view class="font_32 color-333">{{orderData.created_at}}</view>
</view> </view>
<view class="f-fc"> <view class="f-fc">
<view class="u_ordCt_tt font_32 color-999">订单编号</view> <view class="u_ordCt_tt font_32 color-999">订单编号</view>

View File

@ -1277,8 +1277,9 @@
let dataV = data.map(item => { let dataV = data.map(item => {
return { photo: item } return { photo: item }
}) })
vm.photos = [...vm.photos, ...dataV] // vm.photos = [...vm.photos, ...dataV]
vm.lipImgs.push(data) // vm.lipImgs.push(data)
vm.getuser()
vm.choosePicsShow = false vm.choosePicsShow = false
clearTimeout(vm.nextTimer) clearTimeout(vm.nextTimer)
}) })