From cdc1df9431703db39cf23eb13092d94de6dfb9ab Mon Sep 17 00:00:00 2001
From: Enzo <1284707383@qq.com>
Date: Wed, 29 Sep 2021 16:40:23 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8D=95=E9=A1=B5=E9=9D=A2=E5=9C=B0?=
=?UTF-8?q?=E5=9D=80=E9=80=89=E6=8B=A9=E4=BC=98=E5=8C=96=20=E9=A6=96?=
=?UTF-8?q?=E9=A1=B5=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=95=B0=E9=87=8F=E5=8A=A8?=
=?UTF-8?q?=E6=80=81=E6=98=BE=E7=A4=BA=20=E5=8F=91=E7=8E=B0=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E5=92=8C=E5=8F=91=E7=8E=B0=E5=88=97=E8=A1=A8=E6=97=A0?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=97=B6=E7=9A=84=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/js/config.js | 2 +-
pages/discover/discover.vue | 4 +++-
pages/discover/discoverdetails.vue | 18 ++++++++++-----
pages/index/index/index.vue | 36 ++++++++++++++++++++++++++----
pages/order/confirm/confirm.vue | 20 ++++++++++++-----
5 files changed, 63 insertions(+), 17 deletions(-)
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: {