From 1cb989daf1ec840866cce9c288f18167de2fe7b4 Mon Sep 17 00:00:00 2001
From: shuxiaoquan <853623962@qq.com>
Date: Tue, 26 Mar 2024 09:19:51 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=BC=98=E5=8C=96=E4=B8=8E?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/home/index.js | 4 ++++
pages/goods/list.vue | 5 +++--
pages/index/index.vue | 35 +++++++++++++++++++++++++++++------
pages/member/index.vue | 32 +++++++++++++++++++-------------
pages/user/index.vue | 2 +-
5 files changed, 56 insertions(+), 22 deletions(-)
diff --git a/api/home/index.js b/api/home/index.js
index bac06ba..30a1fac 100644
--- a/api/home/index.js
+++ b/api/home/index.js
@@ -11,6 +11,10 @@ const api = {
search:'goods/hotWord',
chartsGoodsJing:'goods/chartsGoodsJing'
}
+// 小程序配置
+export const wxAppSetting = (param, option) => {
+ return request.post('index/wxAppSetting', param, option)
+}
// benner列表
export const getBannerList = (param, option) => {
return request.get(api.getBannerList, param, option)
diff --git a/pages/goods/list.vue b/pages/goods/list.vue
index 7a04e61..972531d 100644
--- a/pages/goods/list.vue
+++ b/pages/goods/list.vue
@@ -348,10 +348,11 @@
const param = {
sortType: app.sortType,
sortPrice: Number(app.sortPrice),
- categoryId: app.options.categoryId || 0,
+ categoryId: app.options.categoryId != 'undefined'?app.options.categoryId :"",
goodsName: app.options.search || '',
page: pageNo,
- keywords: keywords.length > 0 ? keywords.join(',') : ''
+ keywords: keywords.length > 0 ? keywords.join(',') : '',
+ keyword: app.options.search || ''
}
console.log(param)
return new Promise((resolve, reject) => {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 93c2790..6558c91 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -72,7 +72,7 @@
-
+
@@ -103,6 +103,7 @@
+
@@ -136,6 +137,7 @@
+
@@ -181,12 +183,12 @@
-
+
-
+
@@ -209,7 +211,7 @@
-
+
@@ -565,10 +567,30 @@
couList: [],
timeData: {},
tabbar: [],
- curTabIndex: 0
+ curTabIndex: 0,
+ wxAppSetting: {}
}
},
methods: {
+ /**
+ * 获取小程序配置
+ */
+ async queryWxAppSetting() {
+ let {
+ status,
+ data
+ } = await GoodsApi.wxAppSetting({});
+ if (status == 200) {
+ this.wxAppSetting = data;
+ this.list = data.same_city?[{
+ name: '首页'
+ }, {
+ name: '同城送'
+ }]: [{
+ name: '首页'
+ }]
+ }
+ },
onChangeSeckillCutDownTime(e) {
this.timeData = e
},
@@ -967,7 +989,8 @@
this.getCoupons();
this.getServeList();
this.queryBannerList();
- this.getStore()
+ this.getStore();
+ this.queryWxAppSetting();
},
onShow() {
this.isLogin = uni.getStorageSync("AccessToken") ? true : false
diff --git a/pages/member/index.vue b/pages/member/index.vue
index 132c9a0..43ea0ee 100644
--- a/pages/member/index.vue
+++ b/pages/member/index.vue
@@ -17,8 +17,8 @@
{{userInfo.user_type_text}}
-
- 会员有效期至{{userInfo.effective_time}}
+
+ 会员有效期至{{type == 'hy'?userInfo.effective_time:userInfo.fx_effective_time}}
@@ -94,7 +94,7 @@
- 选择 续费 开卡 套餐
+ 选择 续费 开卡 套餐
已省 ¥{{choseItem.cheap_price}}
-
+
¥{{choseItem.price}}开卡{{choseItem.month}}个月
@@ -264,6 +264,7 @@
})
.then((result) => {
console.log(result)
+ that.getMemberInfo();
})
.catch(err => {
console.log(err)
@@ -283,6 +284,7 @@
member.submit(params)
.then(res => {
that.$toast(res.message)
+ that.getMemberInfo();
})
.finally(() => that.isLoading = false)
},
@@ -338,24 +340,26 @@
.headIcon {
width: 114rpx;
height: 114rpx;
- margin-right: 30rpx;
+ margin-right: 20rpx;
margin-top: 12rpx;
border-radius: 50%;
}
.meInfo {
+ width: 360rpx;
.info {
display: flex;
- margin-bottom: 26rpx;
-
+ align-items: center;
.name {
height: 50rpx;
- font-size: 36rpx;
- font-family: PingFang SC, PingFang SC;
+ font-size: 31rpx;
font-weight: 500;
color: #785B45;
line-height: 50rpx;
- margin-right: 18rpx;
+ margin-right: 15rpx;
+ max-width: 250rpx;
+ overflow: hidden;
+ white-space: nowrap;
}
.hy {
@@ -381,6 +385,7 @@
font-weight: 400;
color: #785B45;
line-height: 34rpx;
+ margin-top: 26rpx;
}
}
@@ -582,7 +587,7 @@
background-color: #fff;
.fLeft {
- margin: 24rpx 0 0 74rpx;
+ margin: 24rpx 0 0 44rpx;
.ys {
height: 40rpx;
@@ -591,7 +596,7 @@
font-weight: 400;
color: #7D2D21;
line-height: 40rpx;
-
+ width: 230rpx;
text {
height: 40rpx;
font-size: 28rpx;
@@ -603,6 +608,7 @@
}
.yj {
+ width: 230rpx;
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 4e0da27..665a260 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -53,7 +53,7 @@
会员
- {{userInfo.effective_time}}到期
+ {{userInfo.user_type==20?userInfo.effective_time:userInfo.fx_effective_time}}到期