Commit 4401f9de by 李伟康

commit 提交

1 parent 976f1d89
<template>
<uni-popup
ref="qr"
type="center"
:is-mask-click="false"
animation
class="qrPopup"
>
<view class="box">
<template v-if="count > 0">
<view class="icon-close-box count">{{count}}</view>
</template>
<template v-else>
<view
class="icon-close-box flex"
@click="close"
>
<uni-icons
class="icon-close"
type="closeempty"
:size="16"
color="#1A1A1A"
></uni-icons>
</view>
</template>
<view class="content flex">
<view class="title flex">
<view class="sprite-icon icon-scan"></view>
请让客户扫码领取
</view>
<template v-if="received">
<view class="received flex">
<view class="sprite-icon icon-qr-success"></view>
<view class="received-title">客户领券成功</view>
<view class="received-text">车主已领取该礼券,请前往客户邀约列表查看</view>
</view>
</template>
<template v-else>
<view class="qr-box">
<image :src="url" />
</view>
</template>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'QRBox',
props: {
url: {
type: String,
default: '',
},
received: Boolean
},
data () {
return {
count: 4
}
},
mounted () {
},
methods: {
open () {
this.$refs.qr.open();
this.count = 3
this.countDown()
},
close () {
this.$refs.qr.close();
this.$emit('close')
},
countDown(){
setTimeout(() => {
if(this.count > 0){
this.count--
this.countDown()
}
}, 1000)
}
}
}
</script>
<style scoped lang='scss'>
.qrPopup {
z-index: 99 !important;
}
.box {
width: 1040rpx;
height: 800rpx;
background: #ffffff;
border-radius: 48rpx;
position: relative;
.icon-close-box {
position: absolute;
padding: 48rpx;
top: 0;
right: 0;
}
.count{
color: #999999;
}
.content {
flex-direction: column;
.title {
padding: 80rpx 0 48rpx;
font-weight: 500;
font-size: 32rpx;
color: #333333;
.sprite-icon {
margin-right: 12rpx;
}
}
.qr-box {
width: 560rpx;
height: 560rpx;
background: #ffffff;
box-shadow: 0 0 24rpx 0 #0000001a;
border-radius: 32rpx;
padding: 40rpx;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
vertical-align: top;
}
}
.received {
width: 560rpx;
height: 560rpx;
background: #f9f9f9;
border-radius: 32rpx;
flex-direction: column;
justify-content: center;
&-title {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin: 16rpx 0 48rpx;
}
&-text {
font-size: 28rpx;
color: #666666;
margin: 0 56rpx;
}
}
}
}
</style>
\ No newline at end of file
......@@ -14,7 +14,10 @@
</view>
</template>
</view>
<view class="risk-informed flex">
<view
class="risk-informed flex"
@click="$refs.riskInformedPop.open()"
>
风险告知
<view class="sprite-icon icon-info_shield"></view>
</view>
......@@ -24,7 +27,10 @@
:key="updateViewKey"
@click="showPicture(currentItem.detailImgUrl)"
>
<image :src="currentItem.poster" class="poster" />
<image
:src="currentItem.poster"
class="poster"
/>
<view class="tips">* 点击图片查看详情 &gt;</view>
</view>
<view class="right-content">
......@@ -52,6 +58,10 @@
ref="couponPopup"
/>
<picture-box :imgUrl="currentImgUrl" />
<risk-informed-box
ref="riskInformedPop"
:popupImg="popupImg"
/>
</view>
</template>
......@@ -60,15 +70,17 @@ import SkuBox from './SkuBox.vue'
import CarBrands from '@/components/CarBrands.vue'
import CouponPop from './CouponPop.vue'
import PictureBox from './Picture.vue'
import RiskInformedBox from './RiskInformedBox.vue'
export default {
name: 'Reception',
components: { SkuBox, CarBrands, CouponPop, PictureBox },
components: { SkuBox, CarBrands, CouponPop, PictureBox, RiskInformedBox },
props: {
customerType: Number,
show: Boolean,
tabId: Number,
currentCar: String,
type: String
type: String,
popupImg: String
},
data () {
return {
......@@ -136,12 +148,12 @@ export default {
this.updateViewKey = Date.now()
},
handleSelect (item) {
console.log(item)
this.customerInfo.carModel = item.name
this.$store.dispatch('setCustomerInfo', this.customerInfo)
this.carInfo = item
},
showPicture (e) {
this.currentImgUrl = e
}
}
......@@ -218,7 +230,7 @@ export default {
width: 1328rpx;
height: 100%;
position: relative;
.poster{
.poster {
width: 100%;
height: 100%;
}
......
<template>
<uni-popup
ref="riskInformed"
type="center"
:is-mask-click="false"
animation
class="risk-popup"
>
<view class="box">
<view
class="icon-close-box flex"
@click="close"
>
<uni-icons
class="icon-close"
type="closeempty"
:size="24"
color="#fff"
></uni-icons>
</view>
<image
class="img"
:src="popupImg"
/>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'RiskInformedBox',
props: {
popupImg: String
},
data () {
return {
}
},
mounted () {
},
methods: {
open () {
this.$refs.riskInformed.open();
},
close () {
this.$refs.riskInformed.close();
},
}
}
</script>
<style scoped lang='scss'>
.risk-popup {
z-index: 99 !important;
}
.box {
width: 2026rpx;
height: 1280rpx;
background: #ffffff;
border-radius: 48rpx;
position: relative;
.icon-close-box {
position: absolute;
top: 32rpx;
right: 48rpx;
width: 72rpx;
height: 72rpx;
justify-content: center;
border-radius: 100%;
background: rgb(121, 123, 127);
z-index: 2;
}
.img {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
......@@ -23,7 +23,7 @@
<view
:class="['second-type-item flex',secondIndex == index ? 'active' : '']"
:key="index"
@click="secondIndex = index"
@click="secondClick(index)"
>{{i}}一二三四五一二三四</view>
</template>
<view class="padding-right"></view>
......@@ -41,7 +41,7 @@
<view
:class="['thirdly-type-item flex',thirdlyIndex == index ? 'active' : '']"
:key="index"
@click="thirdlyIndex = index"
@click="thirdlyClick(index)"
>{{i}}</view>
</template>
<view class="padding-right"></view>
......@@ -91,7 +91,7 @@ export default {
contentHeight: '0',
requested: false,
currentItem: {
poster:'https://img02.glsx.com.cn/weapp/resource/app-tape/common/default-cover.webp',
poster: 'https://img02.glsx.com.cn/weapp/resource/app-tape/common/default-cover.webp',
detailImgUrl: 'https://wx.glsx.com.cn/upload/biz/d3c64724-3e0c-4401-aabe-56dc0060f6d6.png'
},
test: '·AITO汽车专享 3M车窗膜(全车)\n·M7专享天窗冰甲\n·AITO汽车专享 挡泥板(适配M7)\n·AITO汽车专享 底盘护板(适配M7)\n·AITO汽车专享 挡泥板(适配M7)\n·AITO汽车专享 M7中控屏钢化保护膜\n·M7专享后备箱垫'
......@@ -148,12 +148,11 @@ export default {
this.tabId = tabId
this.blockIndex = index
this.getSkuConfig()
this.setScrollHeight()
},
async getSkuConfig () {
this.test = this.test.replace(/<\/?br\s*\/?>|\n/g, '<br>')
// this.$forceUpdate()
this.changeGoods(0)
this.secondClick(0)
},
setScrollHeight () {
this.$nextTick(() => {
......@@ -163,10 +162,27 @@ export default {
}).exec()
})
},
secondClick (index) {
this.secondIndex = index
if (this.tabId == 2) {
/**获取品牌 */
this.thirdlyIndex = 0
this.getGoodsList()
} else this.getGoodsList()
},
thirdlyClick (index) {
this.thirdlyIndex = index
this.getGoodsList()
},
changeGoods (index) {
this.goodsId = index
this.changePreView()
},
getGoodsList () {
console.log('获取商品列表')
this.setScrollHeight()
this.changeGoods(0)
},
changePreView () {
this.$emit('changePreView', this.currentItem)
}
......@@ -292,7 +308,6 @@ export default {
.content-scroll-box {
.goods-item {
width: calc(100% - 64rpx);
min-height: 244rpx;
border: 2rpx solid #33333333;
border-radius: 16rpx;
padding: 24rpx 32rpx;
......
......@@ -169,7 +169,7 @@
<script type='text/ecmascript-6'>
import Employee from '@/components/Employee.vue'
import CarBrands from '@/components/CarBrands.vue'
import QrBox from './QrBox.vue'
import QrBox from './RiskInformedBox.vue'
import dayjs from 'dayjs'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
......
......@@ -38,6 +38,7 @@
:tabId="tabId"
:currentCar="currentCar"
:type="type"
:popupImg="item.popupImg"
/>
</view>
</template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!