From 1b897c74e44d185669d87abd4c3a29c90d6fe225 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 19 七月 2024 20:10:27 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
wechat_staff/pages/store/index.js | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/wechat_staff/pages/store/index.js b/wechat_staff/pages/store/index.js
index 18133d5..28f0871 100644
--- a/wechat_staff/pages/store/index.js
+++ b/wechat_staff/pages/store/index.js
@@ -1,3 +1,4 @@
+import { getShopDetail } from '../../api/index'
// pages/store/index.js
Page({
@@ -5,18 +6,43 @@
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
-
+ shopId: null,
+ shopInfo:{}
},
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
- onLoad(options) {
-
+ onLoad(options) {
+ console.log(options.shopId)
+ this.setData({shopId:options.shopId})
+ },
+ getShopInfo(id){
+
+ getShopDetail(id).then(res => {
+ if(res.data && res.data.seqNameList){
+ const t = '';
+ const tindex =0;
+ res.data.seqNameList.array.forEach(element => {
+ if(tindex>0){
+ t =t+"銆�"
+ }
+ t = t+ element;
+ tindex++;
+ });
+ res.data.seqNameInfo = t;
+ }
+ this.setData({
+ shopInfo: res.data
+ })
+ })
},
handleEdit(e) {
+ const {shopInfo} = this.data
+ const objString = JSON.stringify(shopInfo);
+ console.log(objString)
wx.navigateTo({
- url: '/pages/store/info',
+ url: '/pages/store/info?data='+objString ,
})
},
/**
@@ -29,8 +55,8 @@
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
*/
- onShow() {
-
+ onShow() {
+ this.getShopInfo(this.data.shopId)
},
/**
--
Gitblit v1.9.3