diff --git a/common/js/config.js b/common/js/config.js index 0d601a8..29d8be9 100644 --- a/common/js/config.js +++ b/common/js/config.js @@ -16,7 +16,7 @@ export default { //https://demo-guojiang-ec-api.guojiang.club/ baseUrl: process.env.NODE_ENV === 'development' ? - 'http://192.168.3.165/' : 'https://v3-ec-admin-dev.guojiang.club/', // 运行时自动替换变量 + 'https://jincheng.lubanhudong.com/' : 'https://v3-ec-admin-dev.guojiang.club/', // 运行时自动替换变量 }, PACKAGES: { activity: false, diff --git a/pages/discover/discover.vue b/pages/discover/discover.vue index 535ccb9..787955b 100644 --- a/pages/discover/discover.vue +++ b/pages/discover/discover.vue @@ -12,11 +12,13 @@ - + + V {{item.user.nick_name}} + {{item.user.mobile_replace}} {{item.created_at}} diff --git a/pages/discover/discoverdetails.vue b/pages/discover/discoverdetails.vue index e2111ea..c6db11b 100644 --- a/pages/discover/discoverdetails.vue +++ b/pages/discover/discoverdetails.vue @@ -9,7 +9,8 @@ - {{discover_details.user.nick_name}} + {{discover_details.user.nick_name}} + {{discover_details.user.mobile_replace}} {{discover_details.updated_at}} @@ -46,10 +47,12 @@ - + + - {{commentitem.user.nick_name}} + {{commentitem.user.nick_name}} + {{commentitem.user.mobile_replace}} {{commentitem.content}}{{commentitem.created_at}} @@ -67,14 +70,17 @@ - + + - {{subitem.user.nick_name}} + {{subitem.user.nick_name}} + {{subitem.user.mobile_replace}} 回复 - {{subitem.to_user.nick_name}}: + {{subitem.to_user.nick_name}}: + {{subitem.to_user.mobile_replace}}: diff --git a/pages/index/index/index.vue b/pages/index/index/index.vue index 74ce519..5e56fe4 100644 --- a/pages/index/index/index.vue +++ b/pages/index/index/index.vue @@ -26,7 +26,7 @@ - + 今日头条 {{ item.title }} @@ -63,7 +63,7 @@ {{ item.title }} - + @@ -316,7 +316,7 @@ 购物车 - 99+ + {{car_num}} @@ -384,6 +384,7 @@ show_ad: false, // 是否显示ad广告 ad_modal_list: [], // ad广告列表 nav_bg_color: 'rgba(255,255,255,0)' ,// 导航背景颜色 + car_num: 0 }; }, // 注册组件 @@ -421,7 +422,6 @@ } }, onShow(e) { - this.isLogin=!!this.$cookieStorage.get('user_token') @@ -429,6 +429,7 @@ if (toekn) { this.getUserInfo(); + this.getcarNum() } @@ -544,6 +545,33 @@ changeAbout() { this.is_show_about = false; }, + getcarNum() { + this.$http + .get({ + api: 'api/shopping/cart/count', + header: { + Authorization: this.$cookieStorage.get('user_token') + }, + }) + .then(res => { + if (res.data.code == 200) { + this.car_num = res.data.data; + } else { + wx.showModal({ + content: '请下拉页面刷新重试', + showCancel: false + }); + } + }) + .catch(() => { + wx.stopPullDownRefresh(); + wx.hideLoading(); + wx.showModal({ + content: '请求失败', + showCancel: false + }); + }); + }, // 请求数据 queryMicroData() { this.$http diff --git a/pages/order/confirm/confirm.vue b/pages/order/confirm/confirm.vue index 8e91210..e721108 100644 --- a/pages/order/confirm/confirm.vue +++ b/pages/order/confirm/confirm.vue @@ -14,12 +14,17 @@ 更换收获地址 - - {{ address.accept_name }} - {{ address.mobile }} + + + {{ address.accept_name }} + {{ address.mobile }} + + + {{ address.address_name }}{{ address.address }} + - - {{ address.address_name }}{{ address.address }} + + 暂无收货地址,请前往添加 @@ -223,6 +228,11 @@ }, // 提交订单 confirm(){ + console.log(this.address) + if(this.address == null) { + this.$msg('请先添加收货地址!'); + return + } this.$http.post({ api: 'api/shopping/order/confirm', data: {