diff --git a/doc/center/3.png b/doc/center/3.png new file mode 100644 index 0000000..5dc9f6b Binary files /dev/null and b/doc/center/3.png differ diff --git a/doc/center/4.png b/doc/center/4.png new file mode 100644 index 0000000..9bfe474 Binary files /dev/null and b/doc/center/4.png differ diff --git a/doc/center/5.png b/doc/center/5.png new file mode 100644 index 0000000..faabfa7 Binary files /dev/null and b/doc/center/5.png differ diff --git a/doc/center/6.png b/doc/center/6.png new file mode 100644 index 0000000..2ac854d Binary files /dev/null and b/doc/center/6.png differ diff --git a/doc/center/7.png b/doc/center/7.png new file mode 100644 index 0000000..59f3ae1 Binary files /dev/null and b/doc/center/7.png differ diff --git a/doc/center/8.png b/doc/center/8.png new file mode 100644 index 0000000..5d2f373 Binary files /dev/null and b/doc/center/8.png differ diff --git a/doc/center/9.png b/doc/center/9.png new file mode 100644 index 0000000..241b2d6 Binary files /dev/null and b/doc/center/9.png differ diff --git a/doc/center/address.png b/doc/center/address.png new file mode 100644 index 0000000..e6a8691 Binary files /dev/null and b/doc/center/address.png differ diff --git a/doc/center/logout.png b/doc/center/logout.png new file mode 100644 index 0000000..f4dacd8 Binary files /dev/null and b/doc/center/logout.png differ diff --git a/pages/index/cart.vue b/pages/index/cart.vue index 006ab28..d3db8f2 100644 --- a/pages/index/cart.vue +++ b/pages/index/cart.vue @@ -2,7 +2,13 @@ - + + + + @@ -111,6 +117,7 @@ }, data() { return { + isLogin: false, value : 0, checkboxValue : [], options: [ @@ -121,7 +128,7 @@ } }, ], - mixinsListApi : 'getCartPageList', + mixinsListApi : '', } }, computed: { @@ -138,7 +145,24 @@ return price }, }, + onLoad(){ + this.checkLogin() + }, + onShow() { + this.checkLogin() + }, methods: { + // 检查是否登录 + checkLogin() { + const token = uni.getStorageSync('token') + this.isLogin = !!token + + if (this.isLogin) { + this.mixinsListApi = 'getCartPageList' + this.getData() + } + }, + valChange(item, e) { this.$api('updateCartNum', { id: item.id, @@ -185,6 +209,31 @@ width: 100%; } } + + .not-login { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 400rpx; + background-color: #fff; + margin: 20rpx; + border-radius: 16rpx; + + .tips { + font-size: 32rpx; + color: #666; + margin-bottom: 30rpx; + } + + .login-btn { + background-color: $uni-color; + color: #fff; + padding: 20rpx 80rpx; + border-radius: 40rpx; + font-size: 30rpx; + } + } .user { .item{ diff --git a/pages/index/center.vue b/pages/index/center.vue index 83c45c4..e0389c0 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -6,87 +6,103 @@ @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" /> - - - - + + -