Merge remote-tracking branch 'remotes/old/zmj' into old
This commit is contained in:
commit
448fa85d2b
@ -20,53 +20,55 @@
|
||||
|
||||
<view class="">
|
||||
<!-- <view :style="`height: ${appInfo.top}px;background-color: red;z-index: 99999;`"></view> -->
|
||||
<transition name="fade">
|
||||
<view class="head" style="padding-top: var(--status-bar-height);" v-if="showtit">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
|
||||
height="50.82rpx" @click='goBack'></u--image>
|
||||
<view class="head_tit">
|
||||
{{town}}里海云仓
|
||||
<!-- <transition name="fade"> -->
|
||||
<view :class="{'head':true,'show':showtit}" style="padding-top: var(--status-bar-height);"
|
||||
v-show="showtit">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
|
||||
height="50.82rpx" @click='goBack'></u--image>
|
||||
<view class="head_tit">
|
||||
{{town}}里海云仓
|
||||
</view>
|
||||
</view>
|
||||
<view class="head_r" @click="showPop=true">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
|
||||
height="50.82rpx"></u--image>
|
||||
<text>全部</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- </transition> -->
|
||||
<!-- <transition name="fade"> -->
|
||||
<!-- 滚动 -->
|
||||
<view :class="{'heads':true,'show':!showtit}" style="padding-top: var(--status-bar-height);"
|
||||
v-show="!show">
|
||||
<view style="align-items: center;display: flex;justify-content: space-between;">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<view class="back" style="margin-right: 17rpx;">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
|
||||
height="50.82rpx" @click='goBack'></u--image>
|
||||
</view>
|
||||
<view class="" style="font-size: 40rpx;transform: skewX(-10deg);">
|
||||
供销综合云市场
|
||||
</view>
|
||||
</view>
|
||||
<view class="head_r" @click="showPop=true">
|
||||
|
||||
<view style="position: relative;width: 289.14rpx;">
|
||||
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="请输入..."
|
||||
v-model="keyword" class="serch_cls"></u-search>
|
||||
<u--image class="img_cls" :showLoading="true" src="/static/images/GXSC/SS.png"
|
||||
width="115.65rpx" height="56.82rpx" @click="serch"></u--image>
|
||||
</view>
|
||||
<view class='head_r' @click="showPop=true">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
|
||||
height="50.82rpx"></u--image>
|
||||
<text>全部</text>
|
||||
</view>
|
||||
</view>
|
||||
</transition>
|
||||
<transition name="fade">
|
||||
<!-- 滚动 -->
|
||||
<view class="heads" style="padding-top: var(--status-bar-height);" v-if="!showtit">
|
||||
<view style="align-items: center;display: flex;justify-content: space-between;">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<view class="back" style="margin-right: 17rpx;">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
|
||||
height="50.82rpx" @click='goBack'></u--image>
|
||||
</view>
|
||||
<view class="" style="font-size: 40rpx;transform: skewX(-10deg);">
|
||||
供销综合云市场
|
||||
</view>
|
||||
</view>
|
||||
<text class="">全部</text>
|
||||
<view class="flags">
|
||||
|
||||
<view style="position: relative;width: 289.14rpx;">
|
||||
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="请输入..."
|
||||
v-model="keyword" class="serch_cls"></u-search>
|
||||
<u--image class="img_cls" :showLoading="true" src="/static/images/GXSC/SS.png"
|
||||
width="115.65rpx" height="56.82rpx" @click="serch"></u--image>
|
||||
</view>
|
||||
<view class='head_r' @click="showPop=true">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
|
||||
height="50.82rpx"></u--image>
|
||||
<text class="">全部</text>
|
||||
<view class="flags">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</transition>
|
||||
</view>
|
||||
<!-- </transition> -->
|
||||
<view class="box">
|
||||
<view :class="act_swiper">
|
||||
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swipers"
|
||||
@ -101,7 +103,7 @@
|
||||
<!-- 商品列表 -->
|
||||
<transition name="fade">
|
||||
<view class="content">
|
||||
<view class="content_sift" :style="{position:pocls,top:(headtop+16)+'px'}" v-if="!showtit">
|
||||
<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}}
|
||||
@ -318,6 +320,9 @@
|
||||
this.getCloundShop()
|
||||
// console.log(this.appInfo, "手机信息")
|
||||
},
|
||||
onShow() {
|
||||
this.cartFn()
|
||||
},
|
||||
// 分页
|
||||
// onReachBottom() {
|
||||
// if (this.flag) return
|
||||
@ -343,7 +348,7 @@
|
||||
.in(this)
|
||||
.select('.content')
|
||||
.boundingClientRect(rect => {
|
||||
if (rect.top <= (this.headtop + 16)) {
|
||||
if (rect.top <= (this.headtop)) {
|
||||
this.pocls = 'fixed'
|
||||
this.act_swiper = 'act_swiper'
|
||||
this.act_img = 'act_img'
|
||||
@ -374,10 +379,10 @@
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
this.getCloundShop()
|
||||
this.getList()
|
||||
this.cartFn()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
// onReachBottom() {
|
||||
// console.log("daidi")
|
||||
@ -390,13 +395,13 @@
|
||||
this.totalMoney = 0
|
||||
this.cartList = res.data.list
|
||||
this.cartList.forEach(e => {
|
||||
this.totalMoney += e.list[0].cart_num * e.list[0].productAttr.price
|
||||
// console.log(e.list[0].cart_num, e.list[0].productAttr.price)
|
||||
// return
|
||||
// console.log(e.list[0].cart_num, e.productAttr[0].price)
|
||||
// this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num
|
||||
// console.log(e.productAttr.price, e.cart_num)
|
||||
|
||||
e.list.forEach(item => {
|
||||
this.totalMoney += item.cart_num * item.productAttr.price
|
||||
})
|
||||
|
||||
})
|
||||
this.totalMoney = this.totalMoney.toFixed(2)
|
||||
})
|
||||
getCartCounts().then(res => {
|
||||
this.goodsNum = res.data[0].count
|
||||
@ -710,7 +715,7 @@
|
||||
}
|
||||
|
||||
.head {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
color: white;
|
||||
display: flex;
|
||||
@ -718,6 +723,7 @@
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
align-items: center;
|
||||
transition: .3s;
|
||||
|
||||
|
||||
|
||||
@ -729,22 +735,23 @@
|
||||
color: white;
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
// background-color: white;
|
||||
|
||||
|
||||
|
||||
|
||||
transition: .3s;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.menu {
|
||||
position: absolute;
|
||||
top: 748rpx;
|
||||
width: 750rpx;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
height: 250rpx;
|
||||
// height: 175.23rpx;
|
||||
// box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.5);
|
||||
box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9);
|
||||
// box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9);
|
||||
|
||||
}
|
||||
|
||||
@ -819,7 +826,7 @@
|
||||
}
|
||||
|
||||
.act_swiper {
|
||||
height: 150rpx;
|
||||
// height: 500rpx;
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
overflow: hidden;
|
||||
@ -827,7 +834,7 @@
|
||||
|
||||
.act_img {
|
||||
// transition:t;
|
||||
transform: translateY(-848rpx);
|
||||
transform: translateY(-800rpx);
|
||||
|
||||
}
|
||||
|
||||
|
@ -140,11 +140,16 @@
|
||||
width="49.07rpx" height="49.07rpx"></u--image>
|
||||
|
||||
</view> -->
|
||||
<div class="good_price_r" ref="jia" @click.stop="addcart(index)">
|
||||
<div ref="jia1" style="transition: 1s cubic-bezier(0.5,-0.5,1,1);">
|
||||
<div class="good_price_r" @click.stop="addcart(index)" ref="container">
|
||||
<!-- transform:translateY(${trnList[index].bottom});transition: 1s cubic-bezier(0.5, -0.5, 1, 1); -->
|
||||
<!-- :style="`transform:translateX(${trnList[index].left})`" -->
|
||||
<!-- :class="{x_tra:trnList[index].bottom}" -->
|
||||
<div :class="{x_tra:trnList[index].bottom }"
|
||||
:style="`transform:translateY(${trnList[index].bottom});transition: 0.75s cubic-bezier(0.5, -0.5, 1, 1);`">
|
||||
<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>
|
||||
:style="`transform:translateX(${trnList[index].left})`"
|
||||
src="/static/images/LHYC/J.png" width="49.07rpx"
|
||||
height="49.07rpx"></u--image>
|
||||
</div>
|
||||
|
||||
|
||||
@ -467,11 +472,9 @@
|
||||
})
|
||||
|
||||
},
|
||||
addcart(i) {
|
||||
addcarts(i) {
|
||||
let that = this
|
||||
console.log((this.$refs.jia[i]))
|
||||
this.a = this.$refs.jia[i]
|
||||
return
|
||||
// return
|
||||
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';
|
||||
@ -480,8 +483,8 @@
|
||||
// console.log(this.$refs.jia1[i])
|
||||
// return
|
||||
// this.$refs.jia[i].style.transition = "0.5s"
|
||||
this.$refs.jia[i].style.transform = `translateX(${this.trnList[i].left})`
|
||||
this.$refs.jia1[i].style.transform = `translateY(${this.trnList[i].bottom})`
|
||||
// this.$refs.jia[i].style.transform = `translateX(${this.trnList[i].left})`
|
||||
// this.$refs.jia1[i].style.transform = `translateY(${this.trnList[i].bottom})`
|
||||
// this.$refs.jia[i].style.transform = `translateY(${this.trnList[i].bottom})`
|
||||
|
||||
// this.trnList[i].left
|
||||
@ -563,8 +566,61 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script module='renderjs' lang="renderjs">
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
,
|
||||
render(h) {
|
||||
// 渲染函数
|
||||
return h('div', {
|
||||
on: {
|
||||
click: this.addcart, // 绑定点击事件
|
||||
},
|
||||
}, 'Click me');
|
||||
},
|
||||
methods: {
|
||||
addcart(i) {
|
||||
console.log(7878)
|
||||
return
|
||||
var divElement = document.createElement('div');
|
||||
|
||||
// 设置div的样式
|
||||
divElement.style.width = '200px';
|
||||
divElement.style.height = '200px';
|
||||
divElement.style.backgroundColor = 'red';
|
||||
|
||||
// 添加文本内容
|
||||
divElement.textContent = 'Hello, Uni-App!';
|
||||
|
||||
// 获取容器元素的引用
|
||||
var container = this.$refs.container;
|
||||
|
||||
// 将div元素添加到容器中
|
||||
container[i].appendChild(divElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@keyframes addcatr {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
95% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.flags {
|
||||
background-color: red;
|
||||
z-index: 99999999;
|
||||
@ -623,9 +679,9 @@
|
||||
padding-top: 200rpx;
|
||||
}
|
||||
|
||||
// .act_class {
|
||||
// transition: 0.5s;
|
||||
// }
|
||||
.act_class {
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
// .act_class:active {
|
||||
// transform: scale(2);
|
||||
@ -893,6 +949,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.x_tra {
|
||||
animation-name: addcatr;
|
||||
animation-duration: .75s;
|
||||
animation-timing-function: ease-in-out;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards; // animation-iteration-count: 1;
|
||||
/* 设置为1 */
|
||||
// transition: 1s cubic-bezier(0.5, -0.5, 1, 1);
|
||||
}
|
||||
|
||||
.badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -736,6 +736,7 @@
|
||||
let allArr = [];
|
||||
let totalMoney = 0
|
||||
let totalNum = 0
|
||||
console.log(this.cartList)
|
||||
this.cartList.valid.forEach((el, index) => {
|
||||
if (type == 'goodsCheck') {
|
||||
let tempArr = el.list.filter(goods => {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.2 MiB After Width: | Height: | Size: 528 KiB |
Loading…
x
Reference in New Issue
Block a user