From 816d84a76c1a2f16f88dba70664397961f55caa1 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 26 七月 2024 10:07:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
wechat_jiaxuan/pages/store/info.js | 53 +++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 47 insertions(+), 6 deletions(-)
diff --git a/wechat_jiaxuan/pages/store/info.js b/wechat_jiaxuan/pages/store/info.js
index f999bbb..2b43e1a 100644
--- a/wechat_jiaxuan/pages/store/info.js
+++ b/wechat_jiaxuan/pages/store/info.js
@@ -1,26 +1,67 @@
-// pages/store/info.js
+import {
+ getShopDetail
+} from '../../api/index'
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- bottomLift: 0
+ bottomLift: 0,
+ clientHeight: 0,
+ clientTop: 0,
},
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad(options) {
+ this.getDetail(options.id)
var app = getApp().globalData
this.setData({
bottomLift: app.bottomLift
})
+ const res = wx.getMenuButtonBoundingClientRect()
+ this.setData({clientHeight: res.height})
+ this.setData({clientTop: res.top})
+
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
+ navback() {
+ wx.navigateBack()
+ },
+ makePhone(e) {
+ const { linkPhone } = this.data.info
+ wx.makePhoneCall({ phoneNumber: linkPhone })
+ },
+ callPhone(e) {
+ const phone = e.currentTarget.dataset.phone
+ wx.makePhoneCall({ phoneNumber: phone })
+ },
+ handleDetail(e) {
+ const id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/store/staff?id=' + id,
+ })
+ },
+ handleNavigation() {
+ wx.getLocation({
+ type: 'gcj02', //杩斿洖鍙互鐢ㄤ簬wx.openLocation鐨勭粡绾害
+ success (res) {
+ const latitude = res.latitude
+ const longitude = res.longitude
+ wx.openLocation({
+ latitude,
+ longitude,
+ scale: 18
+ })
+ }
+ })
+ },
+ getDetail(id) {
+ getShopDetail({shopId: id}).then(res => {
+ this.setData({ info: res.data })
+ })
+ },
onReady() {
},
--
Gitblit v1.9.3