From f9e589e1cd590bb40fe765f6eb7420b4f2e5a5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAPTOP-D7TKRI82=5C=E9=82=93?= <52643018@qq.com> Date: Thu, 24 Jun 2021 11:22:26 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8E=A5=E6=8E=A5=E5=8F=A3]=20=E6=88=91?= =?UTF-8?q?=E7=9A=84=E6=94=B6=E8=97=8F=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20[=E5=AE=8C=E5=96=84]=20=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=20[=E6=96=B0=E5=A2=9E]=20=E8=B7=AF=E7=94=B1=E5=88=86?= =?UTF-8?q?=E5=8F=91=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- common/api.js | 3 ++ pages.json | 9 ++++- pages/center/index.vue | 4 +- pages/collect/index.vue | 74 ++++++++++++++++++++++++++++++------- pages/goodsDetail/index.vue | 40 +++++++++++++++++--- pages/route/index.vue | 8 ++++ 7 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 pages/route/index.vue diff --git a/App.vue b/App.vue index 2f48e54..a2c37ea 100644 --- a/App.vue +++ b/App.vue @@ -44,7 +44,7 @@ uni.checkSession({ complete: result => { if(result.errMsg == 'checkSession:ok'){ // 处于登录状态 session未过期 - let login_token = uni.getStorageSync(); + let login_token = uni.getStorageSync('login_token'); if(login_token){ resolve(login_token); }else{ diff --git a/common/api.js b/common/api.js index 2d27944..9e1a03e 100644 --- a/common/api.js +++ b/common/api.js @@ -21,4 +21,7 @@ export const API_COFIRMORDER_DETAILS = '/api/order/confirm'; export const API_GOODS_DETAIL = '/api/goods/detail'; // 商品详情 export const API_COLLECT_DEAL = '/api/collect/deal'; // 商品收藏 +/* 个人中心相关 */ +export const API_COLLECT_LIST = '/api/collect/list'; // 我的收藏列表 + export const TEST = '/api/order/deal'; \ No newline at end of file diff --git a/pages.json b/pages.json index ebcdee7..8d2f894 100644 --- a/pages.json +++ b/pages.json @@ -62,7 +62,8 @@ { "path": "pages/collect/index", "style": { - "navigationBarTitleText": "我的收藏" + "navigationBarTitleText": "我的收藏", + "enablePullDownRefresh": true } }, { @@ -82,6 +83,12 @@ "style": { "navigationBarTitleText": "绑定" } + }, + { + "path": "pages/route/index", + "style": { + "navigationBarTitleText": "时空网" + } } ], "globalStyle": { diff --git a/pages/center/index.vue b/pages/center/index.vue index 46b25ad..7620c0b 100644 --- a/pages/center/index.vue +++ b/pages/center/index.vue @@ -15,7 +15,7 @@ - + 我的收藏 @@ -24,7 +24,7 @@ - + 联系客服 diff --git a/pages/collect/index.vue b/pages/collect/index.vue index 46018d0..036b647 100644 --- a/pages/collect/index.vue +++ b/pages/collect/index.vue @@ -1,20 +1,21 @@ @@ -101,11 +103,39 @@ console.log("res", res); this.is_collect = Boolean(res.data.user.is_collect); }) + }, + // 拨打电话 + makePhoneCall(phoneStr){ + uni.makePhoneCall({ + phoneNumber: String(phoneStr) + }) + }, + // 打开地图 + openMap(){ + return; + uni.openLocation({ + longitude: 108.36637, + latitude: 22.817746, + scale: 18 + }) + }, + // 立即抢购加入购物车 + addCart(){ + // this.$http(this.API.).then(res => { + + // }) } }, onShareAppMessage(){ + let goods = this.goods_detail; + let title = goods.name; + let imageUrl = goods.cover; + let path = '/pages/route/index'; + return { - title: '测试' + title, + path, + imageUrl } } } diff --git a/pages/route/index.vue b/pages/route/index.vue new file mode 100644 index 0000000..8e80ab3 --- /dev/null +++ b/pages/route/index.vue @@ -0,0 +1,8 @@ +