|
|
|
@ -21,10 +21,8 @@ |
|
|
|
|
<view class="scroll_box flex flex-1"> |
|
|
|
|
<view class="w-168 h-full"> |
|
|
|
|
<scroll-view :scroll-top="0" scroll-y="true" class="h-full"> |
|
|
|
|
<view class="w-168 h-96 flex-center fs-26 colorhui1" |
|
|
|
|
v-for="(item,index) in categoryList":key="index" |
|
|
|
|
:class="index == navActive?'aside_active':''" |
|
|
|
|
@tap="tapNav(index,item)"> |
|
|
|
|
<view class="w-168 h-96 flex-center fs-26 colorhui1" v-for="(item,index) in categoryList" |
|
|
|
|
:key="index" :class="index == navActive?'aside_active':''" @tap="tapNav(index,item)"> |
|
|
|
|
<view class="top-ra"> |
|
|
|
|
<text></text> |
|
|
|
|
</view> |
|
|
|
@ -67,8 +65,7 @@ |
|
|
|
|
<easy-loadimage |
|
|
|
|
:image-src="item.recommend_image ? item.recommend_image : item.image" |
|
|
|
|
:borderSrc="item.recommend_image ? '' :item.activity_frame.image" |
|
|
|
|
width="540rpx" |
|
|
|
|
:height="item.recommend_image ? '216rpx' : '540rpx'" |
|
|
|
|
width="540rpx" :height="item.recommend_image ? '216rpx' : '540rpx'" |
|
|
|
|
borderRadius="20rpx 20rpx 0 0"></easy-loadimage> |
|
|
|
|
<view class="bg--w111-fff rd-b-20rpx pt-16 pl-24 pr-24 pb-24"> |
|
|
|
|
<view class="w-full line2 fs-28 text--w111-333 lh-40rpx">{{item.store_name}} |
|
|
|
@ -84,7 +81,9 @@ |
|
|
|
|
class="w-172 h-58 rd-30rpx bg-color flex-center fs-24 text--w111-fff relative" |
|
|
|
|
v-if="item.spec_type" @tap.stop="goCartDuo(item)"> |
|
|
|
|
<text>{{item.cart_button == 0 ? '立即购买' : '加入购物车'}}</text> |
|
|
|
|
<uni-badge class="badge-style" :custom-style="{background: 'var(--view-theme)'}" v-if="item.cart_num > 0" :text="item.cart_num"></uni-badge> |
|
|
|
|
<uni-badge class="badge-style" |
|
|
|
|
:custom-style="{background: 'var(--view-theme)'}" |
|
|
|
|
v-if="item.cart_num > 0" :text="item.cart_num"></uni-badge> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="!item.spec_type && !item.cart_num"> |
|
|
|
|
<view |
|
|
|
@ -113,23 +112,16 @@ |
|
|
|
|
<view v-else-if="showType == 4"> |
|
|
|
|
<view class="mb-24 flex justify-between bgfot pd20" v-for="(item,index) in tempArr" |
|
|
|
|
:key="index" @tap="goDetail(item)"> |
|
|
|
|
<easy-loadimage |
|
|
|
|
:image-src="item.image" |
|
|
|
|
:borderSrc="item.activity_frame.image" |
|
|
|
|
width="176rpx" |
|
|
|
|
height="176rpx" |
|
|
|
|
borderRadius="16rpx"></easy-loadimage> |
|
|
|
|
<easy-loadimage :image-src="item.image" :borderSrc="item.activity_frame.image" |
|
|
|
|
width="176rpx" height="176rpx" borderRadius="16rpx"></easy-loadimage> |
|
|
|
|
<view class="flex-1 flex-col justify-between"> |
|
|
|
|
<view class="w-full"> |
|
|
|
|
<view class="line1 w-346 fs-28 colorfff lh-40rpx pl-12">{{item.store_name}}</view> |
|
|
|
|
<view class="line1 w-346 fs-28 colorfff lh-40rpx pl-12"> |
|
|
|
|
{{item.store_name}}</view> |
|
|
|
|
<view class="flex items-end flex-wrap mt-12 w-full"> |
|
|
|
|
<BaseTag |
|
|
|
|
:text="label.label_name" |
|
|
|
|
:color="label.color" |
|
|
|
|
:background="label.bg_color" |
|
|
|
|
:borderColor="label.border_color" |
|
|
|
|
:circle="label.border_color ? true : false" |
|
|
|
|
:imgSrc="label.icon" |
|
|
|
|
<BaseTag :text="label.label_name" :color="label.color" |
|
|
|
|
:background="label.bg_color" :borderColor="label.border_color" |
|
|
|
|
:circle="label.border_color ? true : false" :imgSrc="label.icon" |
|
|
|
|
v-for="(label, idx) in item.store_label" :key="idx"></BaseTag> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -146,15 +138,14 @@ |
|
|
|
|
<image src="@/static/img/flgwc.png" mode="" class="wh44"></image> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="!item.spec_type && !item.cart_num"> |
|
|
|
|
<view |
|
|
|
|
class="flex-center w-48 h-48 rd-30rpx colorhui1 " |
|
|
|
|
<view class="flex-center w-48 h-48 rd-30rpx colorhui1 " |
|
|
|
|
@tap.stop="goCartDan(item,index)"> |
|
|
|
|
<image src="@/static/img/flgwc.png" mode="" class="wh44"></image> |
|
|
|
|
<image src="@/static/img/flgwc.png" mode="" class="wh44"> |
|
|
|
|
</image> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="flex-y-center" v-if="!item.spec_type && item.cart_num"> |
|
|
|
|
<view |
|
|
|
|
class="flex-center w-48 h-48 rd-30rpx colorhui1" |
|
|
|
|
<view class="flex-center w-48 h-48 rd-30rpx colorhui1" |
|
|
|
|
@tap.stop="ChangeCartNumDan(false,index,item)"> |
|
|
|
|
<text class="iconfont icon-ic_Reduce fs-32"></text> |
|
|
|
|
</view> |
|
|
|
@ -180,7 +171,8 @@ |
|
|
|
|
<view class="h-96 footer bgfot" :class="isFooter == 1 ? 'show-footer' : ''"> |
|
|
|
|
<view class="w-100 h-100 rd-50rpx bg-color-huang flex-center abs-lt top-2 ml--4" @tap="openCart"> |
|
|
|
|
<image src="@/static/img/flgwc.png" class="wh100 colorhei"></image> |
|
|
|
|
<uni-badge class="badge-style" :custom-style="{background: '#D64D22'}" v-if="cartNum > 0" :text="cartNum"></uni-badge> |
|
|
|
|
<uni-badge class="badge-style" :custom-style="{background: '#D64D22'}" v-if="cartNum > 0" |
|
|
|
|
:text="cartNum"></uni-badge> |
|
|
|
|
</view> |
|
|
|
|
<view class="w-710 h-full flex-between-center overflow cart_box" :class="{ open: footerOpen }"> |
|
|
|
|
<view class="flex-y-center" @tap="getCartList(0)"> |
|
|
|
@ -191,7 +183,8 @@ |
|
|
|
|
class="iconfont icon-ic_uparrow fs-24"></text> </view> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="w-186 h-72 lh-72rpx text-center rd-40rpx colorhei bg-color-huang fs-26 fw-500 bg-gradient1 mr-12" |
|
|
|
|
<view |
|
|
|
|
class="w-186 h-72 lh-72rpx text-center rd-40rpx colorhei bg-color-huang fs-26 fw-500 bg-gradient1 mr-12" |
|
|
|
|
@tap="subOrder">去结算({{cartNum}})</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -235,28 +228,31 @@ |
|
|
|
|
<cartList :cartData="cartData" :isFooter='isFooter' @closeList="closeList" |
|
|
|
|
@ChangeCartNumDan="ChangeCartList" @ChangeSubDel="ChangeSubDel" @ChangeOneDel="ChangeOneDel"> |
|
|
|
|
</cartList> |
|
|
|
|
<productWindow |
|
|
|
|
:attr="attr" |
|
|
|
|
:isShow='1' |
|
|
|
|
:iSplus='1' |
|
|
|
|
:iScart='1' |
|
|
|
|
:is_vip="is_vip" |
|
|
|
|
:type="2" |
|
|
|
|
@myevent="onMyEvent" |
|
|
|
|
@ChangeAttr="ChangeAttr" |
|
|
|
|
@ChangeCartNum="ChangeCartNumDuo" |
|
|
|
|
@attrVal="attrVal" |
|
|
|
|
@iptCartNum="iptCartNum" |
|
|
|
|
@goCat="goCatNum" |
|
|
|
|
@getImg="showImg" |
|
|
|
|
id='product-window' ></productWindow> |
|
|
|
|
<productWindow :attr="attr" :isShow='1' :iSplus='1' :iScart='1' :is_vip="is_vip" :type="2" |
|
|
|
|
@myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNumDuo" @attrVal="attrVal" |
|
|
|
|
@iptCartNum="iptCartNum" @goCat="goCatNum" @getImg="showImg" id='product-window'></productWindow> |
|
|
|
|
<cusPreviewImg ref="cusPreviewImg" :list="skuArr" @changeSwitch="changeSwitch"></cusPreviewImg> |
|
|
|
|
<uni-popup ref="popup" type="center"> |
|
|
|
|
<view class="popupbox"> |
|
|
|
|
<text style="float: right;" class="iconfont iconfont icon-ic_close fs-44 colorhui1" @click="close"></text> |
|
|
|
|
<image src="https://bar.jiuhaosh.cn/static/sbgx.png" mode="" class="popupboximg"></image> |
|
|
|
|
<view class="neir"> |
|
|
|
|
购买商品需要成为会员 |
|
|
|
|
<br /> |
|
|
|
|
才可以购买哦~ |
|
|
|
|
</view> |
|
|
|
|
<view class="huiyuanbtn" @click="chuiyuan">我要充会员</view> |
|
|
|
|
</view> |
|
|
|
|
</uni-popup> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
let windowHeight = uni.getSystemInfoSync().screenHeight; |
|
|
|
|
let sysHeight = uni.getSystemInfoSync().statusBarHeight; |
|
|
|
|
import { |
|
|
|
|
getUserInfo |
|
|
|
|
} from '@/api/user.js'; |
|
|
|
|
import { |
|
|
|
|
getCategoryList, |
|
|
|
|
getProductslist, |
|
|
|
@ -296,6 +292,7 @@ |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
userInfo: {}, |
|
|
|
|
windowHeight: this.isFooter ? windowHeight : windowHeight - 50, |
|
|
|
|
showCateDrawer: false, |
|
|
|
|
sysHeight: sysHeight, |
|
|
|
@ -360,6 +357,7 @@ |
|
|
|
|
...mapGetters(['isLogin', 'uid', 'cartNum']), |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getUserInfo() |
|
|
|
|
this.getAllCategory(); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.getScrollHeight(); |
|
|
|
@ -403,6 +401,7 @@ |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
openCart() { |
|
|
|
|
if (this.footerOpen) { |
|
|
|
|
this.getCartList(0) |
|
|
|
@ -515,8 +514,29 @@ |
|
|
|
|
}) |
|
|
|
|
return list.includes(0) ? true : false |
|
|
|
|
}, |
|
|
|
|
/* |
|
|
|
|
* 获取用户信息 |
|
|
|
|
*/ |
|
|
|
|
getUserInfo: function() { |
|
|
|
|
console.log(123); |
|
|
|
|
let that = this; |
|
|
|
|
getUserInfo().then(res => { |
|
|
|
|
that.userInfo = res.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
chuiyuan(){ |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url:'/pages/annex/vip_paid/index' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
close(){ |
|
|
|
|
this.$refs.popup.close('center') |
|
|
|
|
}, |
|
|
|
|
// 生成订单; |
|
|
|
|
subOrder() { |
|
|
|
|
if (!this.userInfo.pay_vip_status) { |
|
|
|
|
this.$refs.popup.open('center') |
|
|
|
|
} else { |
|
|
|
|
let that = this, |
|
|
|
|
list = that.cartData.cartList, |
|
|
|
|
ids = []; |
|
|
|
@ -535,6 +555,7 @@ |
|
|
|
|
title: '请选择产品' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 计算总价; |
|
|
|
|
getTotalPrice() { |
|
|
|
@ -669,11 +690,48 @@ |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.popupbox{ |
|
|
|
|
width: 600rpx; |
|
|
|
|
height: 500rpx; |
|
|
|
|
background: #1C1A1F; |
|
|
|
|
box-shadow: 0rpx 5rpx 16rpx 0rpx rgba(6,3,14,0.39); |
|
|
|
|
border-radius: 20rpx; |
|
|
|
|
padding: 20rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
.popupboximg{ |
|
|
|
|
width: 171rpx; |
|
|
|
|
height: 189rpx; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
} |
|
|
|
|
.neir{ |
|
|
|
|
font-family: Alibaba PuHuiTi; |
|
|
|
|
font-weight: 400; |
|
|
|
|
font-size: 36rpx; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
line-height: 56rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
.huiyuanbtn{ |
|
|
|
|
width: 400rpx; |
|
|
|
|
height: 80rpx; |
|
|
|
|
background: #F8BF1F; |
|
|
|
|
border-radius: 40rpx; |
|
|
|
|
margin: 50rpx auto; |
|
|
|
|
font-family: Alibaba PuHuiTi; |
|
|
|
|
font-weight: 400; |
|
|
|
|
font-size: 30rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
color: #080313; |
|
|
|
|
line-height: 80rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/deep/.base-tag { |
|
|
|
|
background-color: #f5f5f5; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bntCon { |
|
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
&:before { |
|
|
|
|
position: absolute; |
|
|
|
|
content: ''; |
|
|
|
@ -773,6 +831,7 @@ |
|
|
|
|
background-color: #1B1A1D; |
|
|
|
|
padding-left: 94rpx; |
|
|
|
|
transition: 0.3s; |
|
|
|
|
|
|
|
|
|
&.open { |
|
|
|
|
width: 710rpx; |
|
|
|
|
} |
|
|
|
@ -841,19 +900,23 @@ |
|
|
|
|
.w-346 { |
|
|
|
|
width: 346rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.badge-style { |
|
|
|
|
position: absolute; |
|
|
|
|
top: -2rpx; |
|
|
|
|
right: -14rpx; |
|
|
|
|
|
|
|
|
|
/deep/ .uni-badge--error { |
|
|
|
|
background-color: var(--view-theme) !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.uni-badge { |
|
|
|
|
color: var(--view-theme); |
|
|
|
|
border: 1px solid var(--view-theme); |
|
|
|
|
z-index: 29; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.white-box { |
|
|
|
|
height: calc(300rpx + env(safe-area-inset-bottom)); |
|
|
|
|
} |
|
|
|
|