From 2faa6546a9f9ddb29f81cbc9770fc25b95703695 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 26 七月 2024 17:02:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
wechat_jiaxuan/pages/store/info.js | 51 +++++++++++++++++++++++++++++++--------------------
1 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/wechat_jiaxuan/pages/store/info.js b/wechat_jiaxuan/pages/store/info.js
index 2b43e1a..a141f2f 100644
--- a/wechat_jiaxuan/pages/store/info.js
+++ b/wechat_jiaxuan/pages/store/info.js
@@ -22,20 +22,30 @@
bottomLift: app.bottomLift
})
const res = wx.getMenuButtonBoundingClientRect()
- this.setData({clientHeight: res.height})
- this.setData({clientTop: res.top})
-
+ this.setData({
+ clientHeight: res.height
+ })
+ this.setData({
+ clientTop: res.top
+ })
+
},
navback() {
wx.navigateBack()
},
makePhone(e) {
- const { linkPhone } = this.data.info
- wx.makePhoneCall({ phoneNumber: linkPhone })
+ const {
+ linkPhone
+ } = this.data.info
+ wx.makePhoneCall({
+ phoneNumber: linkPhone
+ })
},
callPhone(e) {
const phone = e.currentTarget.dataset.phone
- wx.makePhoneCall({ phoneNumber: phone })
+ wx.makePhoneCall({
+ phoneNumber: phone
+ })
},
handleDetail(e) {
const id = e.currentTarget.dataset.id
@@ -44,22 +54,23 @@
})
},
handleNavigation() {
- wx.getLocation({
- type: 'gcj02', //杩斿洖鍙互鐢ㄤ簬wx.openLocation鐨勭粡绾害
- success (res) {
- const latitude = res.latitude
- const longitude = res.longitude
- wx.openLocation({
- latitude,
- longitude,
- scale: 18
- })
- }
- })
+ const info = this.data.info
+ const latitude = info.latitude
+ const longitude = info.longitude
+ wx.openLocation({
+ latitude,
+ longitude,
+ name: info.name,
+ scale: 18
+ })
},
getDetail(id) {
- getShopDetail({shopId: id}).then(res => {
- this.setData({ info: res.data })
+ getShopDetail({
+ shopId: id
+ }).then(res => {
+ this.setData({
+ info: res.data
+ })
})
},
onReady() {
--
Gitblit v1.9.3