From 41115bb4b6d0161ff6d2c15ef6b3d5386a14ac9c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 02 三月 2026 16:40:54 +0800
Subject: [PATCH] 合并
---
mini-program/pages/special-zone/special-zone.vue | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/mini-program/pages/special-zone/special-zone.vue b/mini-program/pages/special-zone/special-zone.vue
index f9dfd9a..e32d04e 100644
--- a/mini-program/pages/special-zone/special-zone.vue
+++ b/mini-program/pages/special-zone/special-zone.vue
@@ -6,7 +6,7 @@
<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
<view class="head-bar-nav" :style="{ height: navHeight + 'px' }">
<image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix" @click="fanhui"></image>
- <text>鍟嗗搧涓撳尯</text>
+ <text>{{title}}</text>
<image src="/static/icon/nav_ic_bac@2x.png" style="opacity: 0;" mode="widthFix"></image>
</view>
</view>
@@ -48,6 +48,7 @@
<view class="cart-num" v-if="cardObj && cardObj.cartTypeNum > 0">{{cardObj.cartTypeNum}}</view>
</view>
</view>
+ <Login ref="login" />
</view>
</template>
@@ -55,12 +56,15 @@
import {
mapState
} from 'vuex'
+ import Login from '@/components/login/login.vue'
export default {
+ components: {Login},
computed: {
- ...mapState(['navHeight', 'statusbarHeight'])
+ ...mapState(['navHeight', 'statusbarHeight', 'userInfo'])
},
data() {
return {
+ title:'鍟嗗搧涓撳尯',
goodsName: '',
next: true,
page: 1,
@@ -70,9 +74,13 @@
};
},
onLoad(options) {
+ console.log(options)
this.qualityId = options.qualityId
+ this.title = options.title || '鍟嗗搧涓撳尯'
this.getGoodsList()
- this.cardNum()
+ if (this.userInfo) {
+ this.cardNum()
+ }
},
onReachBottom() {
this.getGoodsList()
@@ -84,18 +92,26 @@
})
},
addCard(e) {
+ if (!this.userInfo) {
+ this.$refs.login.open()
+ return;
+ }
this.$u.api.addCart({
goodsId: e.id,
- goodsSkuId: e.skuResponsesList[0].id,
+ goodsSkuId: e.goodsSkuResponseList[0].id,
num: 1
}).then(res => {
if (res.code === 200) {
this.cardNum()
- uni.showToast({ title: '娣诲姞鎴愬姛', icon: 'none' })
+ uni.showToast({ title: '娣诲姞鎴愬姛', icon: 'success', mask: true })
}
})
},
jumpCard() {
+ if (!this.userInfo) {
+ this.$refs.login.open()
+ return;
+ }
uni.navigateTo({
url: '/pages/shopping-cart/shopping-cart'
})
--
Gitblit v1.9.3