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 @@ +