From 4d2dd3ee4fce9217854e1a4120989365e148b124 Mon Sep 17 00:00:00 2001
From: lanzhihui <503792708@qq.com>
Date: Wed, 9 Oct 2024 17:34:28 +0800
Subject: [PATCH] update
---
src/components/residenceDialog.wpy | 86 +++++++++++++++++++++---------
src/pages/tabBar/user.wpy | 6 +--
src/pages/users/orderDetails.wpy | 2 +-
src/pages/users/unmarriV2.wpy | 5 +-
4 files changed, 67 insertions(+), 32 deletions(-)
diff --git a/src/components/residenceDialog.wpy b/src/components/residenceDialog.wpy
index e6ab445..024dc67 100644
--- a/src/components/residenceDialog.wpy
+++ b/src/components/residenceDialog.wpy
@@ -108,9 +108,10 @@
local_longitude: lng
}
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) {
- 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.multiCity()
vm.$emit('residenceCity', vm.address)
@@ -160,33 +161,66 @@
wx.getSetting({
success: (res) => {
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']) {
- wx.showModal({
- title: '是否授权当前位置',
- content: '需要获取您的地理位置,请确认授权',
- confirmColor: '#f16765',
- success: res => {
- if (res.confirm) {
- 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
- }
- })
- }
- }
- })
- }
+ wx.authorize({
+ scope: 'scope.userFuzzyLocation',
+ success () {
+ // 用户已经同意小程序使用地址功能,后续调用 接口不会弹窗询问
+ console.log('222')
+ // wx.openSetting({
+ // success: data => {
+ // console.log(data, '333--')
+ // 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
+ }
+ })
+ // }
+ // }
+ // })
}
})
+ // wx.showModal({
+ // title: '是否授权当前位置',
+ // content: '需要获取您的地理位置,请确认授权',
+ // confirmColor: '#f16765',
+ // success: res => {
+ // if (res.confirm) {
+ //
+ // }
+ // }
+ // })
} else {
wx.getFuzzyLocation({
type: 'gcj02',
diff --git a/src/pages/tabBar/user.wpy b/src/pages/tabBar/user.wpy
index d3031e8..e250520 100644
--- a/src/pages/tabBar/user.wpy
+++ b/src/pages/tabBar/user.wpy
@@ -11,11 +11,11 @@
{{ listCount.follow_count || '0' }}
关注
-
+
{{ listCount.fans_count || '0' }}
粉丝
-
+
{{ listCount.preview_count || '0' }}
访客
@@ -133,7 +133,7 @@
-
+
diff --git a/src/pages/users/orderDetails.wpy b/src/pages/users/orderDetails.wpy
index 69651c0..58e3959 100644
--- a/src/pages/users/orderDetails.wpy
+++ b/src/pages/users/orderDetails.wpy
@@ -29,7 +29,7 @@
订单时间
- {{orderData.updated_at}}
+ {{orderData.created_at}}
订单编号
diff --git a/src/pages/users/unmarriV2.wpy b/src/pages/users/unmarriV2.wpy
index 257315d..a8fd986 100644
--- a/src/pages/users/unmarriV2.wpy
+++ b/src/pages/users/unmarriV2.wpy
@@ -1277,8 +1277,9 @@
let dataV = data.map(item => {
return { photo: item }
})
- vm.photos = [...vm.photos, ...dataV]
- vm.lipImgs.push(data)
+ // vm.photos = [...vm.photos, ...dataV]
+ // vm.lipImgs.push(data)
+ vm.getuser()
vm.choosePicsShow = false
clearTimeout(vm.nextTimer)
})