Merge remote-tracking branch 'remotes/old/zmj' into old
This commit is contained in:
commit
e5abdf536d
@ -17,8 +17,9 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="" v-if="cloudList.length>0">
|
<view class="" v-if="cloudList.length>0">
|
||||||
|
|
||||||
<view class="">
|
<view class="">
|
||||||
<!-- <view style="height: var(--status-bar-height);"></view> -->
|
<!-- <view :style="`height: ${appInfo.top}px;background-color: red;z-index: 99999;`"></view> -->
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<view class="head" style="padding-top: var(--status-bar-height);" v-if="showtit">
|
<view class="head" style="padding-top: var(--status-bar-height);" v-if="showtit">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
@ -59,15 +60,12 @@
|
|||||||
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
|
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
|
||||||
height="50.82rpx"></u--image>
|
height="50.82rpx"></u--image>
|
||||||
<text class="">全部</text>
|
<text class="">全部</text>
|
||||||
<view class="flag">
|
<view class="flags">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</transition>
|
</transition>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view :class="act_swiper">
|
<view :class="act_swiper">
|
||||||
@ -75,11 +73,10 @@
|
|||||||
:circular="true" previous-margin='0rpx' next-margin='0rpx' :current="current"
|
:circular="true" previous-margin='0rpx' next-margin='0rpx' :current="current"
|
||||||
:disable-touch="true">
|
:disable-touch="true">
|
||||||
<swiper-item v-for="(item,index) in cloudList">
|
<swiper-item v-for="(item,index) in cloudList">
|
||||||
<u--image :showLoading="true" :src="item.cover" width="750rpx"
|
<u--image :showLoading="true" :src="item.cover" :class="act_img" width="750rpx"
|
||||||
height="998.83rpx"></u--image>
|
height="998.83rpx"></u--image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="height:998.83rpx;" v-if="act_swiper">
|
<view class="" style="height:998.83rpx;" v-if="act_swiper">
|
||||||
|
|
||||||
@ -97,15 +94,15 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_sift" :style="{position:pocls,top:headtop+'px'}" v-if="!showtit">
|
|
||||||
<view :class="{act:item.act}" v-for="item,index in actList" :key="index"
|
|
||||||
@click="screenGoods(item.screen,index)">
|
|
||||||
{{item.tit}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
<view class="content_sift" :style="{position:pocls,top:(headtop+16)+'px'}" v-if="!showtit">
|
||||||
|
<view :class="{act:item.act}" v-for="item,index in actList" :key="index"
|
||||||
|
@click="screenGoods(item.screen,index)">
|
||||||
|
{{item.tit}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="goods_list" v-if="goodsList.length>0">
|
<view class="goods_list" v-if="goodsList.length>0">
|
||||||
<view class="empty" v-if='showLoading'>
|
<view class="empty" v-if='showLoading'>
|
||||||
<u-loading-icon v-if='showLoading' text="加载中" textSize="18"></u-loading-icon>
|
<u-loading-icon v-if='showLoading' text="加载中" textSize="18"></u-loading-icon>
|
||||||
@ -135,10 +132,14 @@
|
|||||||
¥30.00
|
¥30.00
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="good_price_r" @click="addcart(item.price)">
|
<!-- :style="{'transform': `translateY(${trnList[index].bottom}) translateX(${trnList[index].left})`,'transition':'1s'}" -->
|
||||||
<u--image class="act_class" :showLoading="true"
|
<view class="good_price_r" @click.stop="addcart(item)">
|
||||||
|
<u--image :class="'act_class'+index" class="act_class"
|
||||||
|
:showLoading="true" src="/static/images/LHYC/J.png"
|
||||||
|
width="49.07rpx" height="49.07rpx"></u--image>
|
||||||
|
<!-- <u--image class="act_class" :showLoading="true"
|
||||||
src="/static/images/LHYC/J.png" width="49.07rpx"
|
src="/static/images/LHYC/J.png" width="49.07rpx"
|
||||||
height="49.07rpx"></u--image>
|
height="49.07rpx"></u--image> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -159,9 +160,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card" :style="`bottom:${appInfo.bottom}px`">
|
<view class="card" :style="`bottom:${appInfo.bottom}px`"
|
||||||
|
@click="navgo('/pages/order_addcart/order_addcart')">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="" style="position: relative;">
|
<view class="cart" :class="{act_cart:act_cart}"
|
||||||
|
style="position: relative;z-index: 9999999;">
|
||||||
<u--image :showLoading="true" src="/static/images/LHYC/GWC.png" width="63.09rpx"
|
<u--image :showLoading="true" src="/static/images/LHYC/GWC.png" width="63.09rpx"
|
||||||
height="63.09rpx"></u--image>
|
height="63.09rpx"></u--image>
|
||||||
|
|
||||||
@ -178,7 +181,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right" @click="navgo('/pages/order_addcart/order_addcart')">
|
<view class="right">
|
||||||
去结算
|
去结算
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -256,10 +259,15 @@
|
|||||||
import {
|
import {
|
||||||
goShopDetail
|
goShopDetail
|
||||||
} from '@/libs/order.js'
|
} from '@/libs/order.js'
|
||||||
|
import {
|
||||||
|
postCartAdd,
|
||||||
|
} from '@/api/store.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
||||||
return {
|
return {
|
||||||
|
trnList: [],
|
||||||
|
act_cart: false,
|
||||||
appInfo: {},
|
appInfo: {},
|
||||||
pocls: "",
|
pocls: "",
|
||||||
type: "",
|
type: "",
|
||||||
@ -280,8 +288,10 @@
|
|||||||
showtit: true,
|
showtit: true,
|
||||||
cartList: [],
|
cartList: [],
|
||||||
activeClass: 'activeClass',
|
activeClass: 'activeClass',
|
||||||
headtop: "",
|
headtop: 0,
|
||||||
page_num: 1,
|
page_num: 1,
|
||||||
|
act_img: "",
|
||||||
|
cartTagInfo: {},
|
||||||
actList: [{
|
actList: [{
|
||||||
tit: '综合',
|
tit: '综合',
|
||||||
act: "",
|
act: "",
|
||||||
@ -337,14 +347,15 @@
|
|||||||
.in(this)
|
.in(this)
|
||||||
.select('.content')
|
.select('.content')
|
||||||
.boundingClientRect(rect => {
|
.boundingClientRect(rect => {
|
||||||
// console.log(rect)
|
if (rect.top <= (this.headtop + 16)) {
|
||||||
if (rect.top <= this.headtop) {
|
|
||||||
this.pocls = 'fixed'
|
this.pocls = 'fixed'
|
||||||
this.act_swiper = 'act_swiper'
|
this.act_swiper = 'act_swiper'
|
||||||
|
this.act_img = 'act_img'
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.pocls = ''
|
this.pocls = ''
|
||||||
this.act_swiper = ''
|
this.act_swiper = ''
|
||||||
|
this.act_img = ''
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -352,11 +363,19 @@
|
|||||||
if (this.headtop) return
|
if (this.headtop) return
|
||||||
uni.createSelectorQuery()
|
uni.createSelectorQuery()
|
||||||
.in(this)
|
.in(this)
|
||||||
.select('.flag')
|
.select('.flags')
|
||||||
.boundingClientRect(rect => {
|
.boundingClientRect(rect => {
|
||||||
this.headtop = rect.top
|
this.headtop = rect.top
|
||||||
})
|
})
|
||||||
.exec();
|
.exec();
|
||||||
|
uni.createSelectorQuery()
|
||||||
|
.in(this)
|
||||||
|
.select('.cart')
|
||||||
|
.boundingClientRect(rect => {
|
||||||
|
this.cartTagInfo = rect
|
||||||
|
})
|
||||||
|
.exec();
|
||||||
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
@ -374,14 +393,11 @@
|
|||||||
this.cartList[0].list.forEach(e => {
|
this.cartList[0].list.forEach(e => {
|
||||||
this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num
|
this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
getCartCounts().then(res => {
|
getCartCounts().then(res => {
|
||||||
this.goodsNum = res.data[0].count
|
this.goodsNum = res.data[0].count
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
godDetail(item) {
|
godDetail(item) {
|
||||||
goShopDetail(item, this.uid).then(res => {
|
goShopDetail(item, this.uid).then(res => {
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
@ -442,8 +458,46 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
addcart(price) {
|
addcart(i) {
|
||||||
this.tot_price += Number(price)
|
let data = {
|
||||||
|
cart_num: 1,
|
||||||
|
is_new: 0,
|
||||||
|
product_attr_unique: i.sku[''].unique,
|
||||||
|
product_id: i.product_id,
|
||||||
|
product_type: i.product_type,
|
||||||
|
spread_id: "",
|
||||||
|
}
|
||||||
|
let that = this
|
||||||
|
let res = postCartAdd({
|
||||||
|
...data
|
||||||
|
}).then((res, err) => {
|
||||||
|
this.act_cart = true
|
||||||
|
this.cartFn()
|
||||||
|
uni.showToast({
|
||||||
|
title: "加入成功",
|
||||||
|
duration: 1000,
|
||||||
|
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
// this.act_cart = false
|
||||||
|
uni.showToast({
|
||||||
|
title: err,
|
||||||
|
icon: "none",
|
||||||
|
duration: 1000,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
that.act_cart = false
|
||||||
|
}, 500)
|
||||||
|
// let that = this
|
||||||
|
// uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => {
|
||||||
|
// that.trnList[i].left = this.cartTagInfo.left - data1.left + 'px';
|
||||||
|
// that.trnList[i].bottom = this.cartTagInfo.top - data1.top + 'px';
|
||||||
|
// console.log(that.trnList[i])
|
||||||
|
|
||||||
|
|
||||||
|
// }).exec();
|
||||||
|
// this.tot_price += Number(price)
|
||||||
},
|
},
|
||||||
all(index) {
|
all(index) {
|
||||||
this.showPop = false
|
this.showPop = false
|
||||||
@ -469,6 +523,12 @@
|
|||||||
category_id: this.cloudList[this.current].category_id
|
category_id: this.cloudList[this.current].category_id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.goodsList = res.data.list
|
this.goodsList = res.data.list
|
||||||
|
this.goodsList.forEach(item => {
|
||||||
|
this.trnList.push({
|
||||||
|
left: 0,
|
||||||
|
bottom: 0
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
// console.log(this.cloudList)
|
// console.log(this.cloudList)
|
||||||
data.length < 1 ? Toast("暂无云仓") : '';
|
data.length < 1 ? Toast("暂无云仓") : '';
|
||||||
@ -478,6 +538,16 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.flags {
|
||||||
|
background-color: red;
|
||||||
|
z-index: 99999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.act_cart {
|
||||||
|
transition: 0.5s;
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@ -488,7 +558,7 @@
|
|||||||
// border-top: 5px solid red;
|
// border-top: 5px solid red;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
padding: 0 10rpx;
|
// padding: 0 10rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,6 +566,7 @@
|
|||||||
|
|
||||||
.active_swiper {
|
.active_swiper {
|
||||||
transform: scale(1.3);
|
transform: scale(1.3);
|
||||||
|
// transform: translateX() translateY();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,14 +594,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.act_class {
|
.act_class {
|
||||||
transition: 1s;
|
transition: 0.5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.act_class:active {
|
.act_class:active {
|
||||||
transform: scale(2);
|
transform: scale(2);
|
||||||
// transform: translate(-500rpx, 500rpx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.content_act {
|
.content_act {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -646,7 +718,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goods_list {
|
.goods_list {
|
||||||
min-height: 100vh;
|
min-height: 95vh;
|
||||||
|
padding: 0 10rpx;
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
|
|
||||||
.goods {
|
.goods {
|
||||||
@ -687,6 +760,10 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
width: 60vw;
|
width: 60vw;
|
||||||
|
|
||||||
|
.good_price_r {
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
||||||
.good_price_l {
|
.good_price_l {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@ -717,6 +794,12 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.act_img {
|
||||||
|
// transition:t;
|
||||||
|
transform: translateY(-848rpx);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// .act_swiper2 {
|
// .act_swiper2 {
|
||||||
// height: 998rpx;
|
// height: 998rpx;
|
||||||
// }
|
// }
|
||||||
@ -727,8 +810,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
// background-color: green;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -740,6 +825,7 @@
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
width: 720rpx;
|
width: 720rpx;
|
||||||
|
z-index: 999999;
|
||||||
// margin:auto;
|
// margin:auto;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
@ -829,6 +915,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.body-wrapper {
|
.body-wrapper {
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -895,4 +982,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cart {
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
x
Reference in New Issue
Block a user