|
@@ -201,7 +201,8 @@ import {
|
|
|
getReferralCode,
|
|
getReferralCode,
|
|
|
getReferralSummary,
|
|
getReferralSummary,
|
|
|
getCommissionSummary,
|
|
getCommissionSummary,
|
|
|
- getVisibleFamilyMembers
|
|
|
|
|
|
|
+ getVisibleFamilyMembers,
|
|
|
|
|
+ productList
|
|
|
} from '../../utils/api.js'
|
|
} from '../../utils/api.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -286,6 +287,7 @@ export default {
|
|
|
var token = uni.getStorageSync('token')
|
|
var token = uni.getStorageSync('token')
|
|
|
if (!token) {
|
|
if (!token) {
|
|
|
this.isLoggedIn = false
|
|
this.isLoggedIn = false
|
|
|
|
|
+ this.loadGuestProducts()
|
|
|
this._watchPageReady()
|
|
this._watchPageReady()
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -454,6 +456,17 @@ export default {
|
|
|
goToCart() {
|
|
goToCart() {
|
|
|
uni.navigateTo({ url: '/pages/shop/cart/cart' })
|
|
uni.navigateTo({ url: '/pages/shop/cart/cart' })
|
|
|
},
|
|
},
|
|
|
|
|
+ loadGuestProducts() {
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
|
|
|
|
|
+ if (res.code === 200 && res.data && res.data.records) {
|
|
|
|
|
+ self.guestProducts = res.data.records.slice(0, 4)
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(function() {})
|
|
|
|
|
+ },
|
|
|
|
|
+ goProductDetail(id) {
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id })
|
|
|
|
|
+ },
|
|
|
onServiceClick(action) {
|
|
onServiceClick(action) {
|
|
|
if (this[action]) {
|
|
if (this[action]) {
|
|
|
this[action]()
|
|
this[action]()
|
|
@@ -804,4 +817,57 @@ export default {
|
|
|
.login-prompt .login-btn::after {
|
|
.login-prompt .login-btn::after {
|
|
|
border: none;
|
|
border: none;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+/* 品牌定位语 */
|
|
|
|
|
+.brand-strap {
|
|
|
|
|
+ margin: 16rpx 30rpx 0;
|
|
|
|
|
+ padding: 20rpx 28rpx;
|
|
|
|
|
+ background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.12));
|
|
|
|
|
+ border-radius: 16rpx;
|
|
|
|
|
+ border-left: 4rpx solid #F59E0B;
|
|
|
|
|
+}
|
|
|
|
|
+.brand-strap-text {
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ color: #92400E;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 商城精选预览 */
|
|
|
|
|
+.product-scroll {
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ padding: 0 30rpx;
|
|
|
|
|
+}
|
|
|
|
|
+.product-list {
|
|
|
|
|
+ display: inline-flex;
|
|
|
|
|
+ gap: 20rpx;
|
|
|
|
|
+}
|
|
|
|
|
+.product-card {
|
|
|
|
|
+ width: 220rpx;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ border-radius: 16rpx;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
|
|
|
|
|
+}
|
|
|
|
|
+.product-img {
|
|
|
|
|
+ width: 220rpx;
|
|
|
|
|
+ height: 220rpx;
|
|
|
|
|
+ background: #f5f5f5;
|
|
|
|
|
+}
|
|
|
|
|
+.product-name {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ padding: 12rpx 12rpx 4rpx;
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+}
|
|
|
|
|
+.product-price {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ padding: 4rpx 12rpx 12rpx;
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #F59E0B;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|