Fix:view视图中使用赋值语句导致运行报错
This commit is contained in:
@@ -32,6 +32,9 @@ export default {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
changeShare(){
|
||||
this.showShare=!this.showShare
|
||||
},
|
||||
init() {
|
||||
getSeason(this.id).then(({data}) => {
|
||||
if (data.sliderImages) data.swiper = data.sliderImages.split(",");
|
||||
@@ -130,7 +133,7 @@ export default {
|
||||
<view class="product-season">
|
||||
<template v-if="info">
|
||||
<image class="img-top" :src="info.topImage" mode="widthFix"/>
|
||||
<view class="share-label flex jc-center ai-center" @click="showShare=true" v-if="posterUrl.length>0">
|
||||
<view class="share-label flex jc-center ai-center" @click="changeShare" v-if="posterUrl.length>0">
|
||||
<image class="icon-share" :src="webUrl+'/20230911105727684131.png'" mode="scaleToFill"/>
|
||||
分享好友
|
||||
</view>
|
||||
@@ -138,7 +141,7 @@ export default {
|
||||
<u-popup :show="showShare" mode="center" bgColor="transparent">
|
||||
<view class="box-share">
|
||||
<view class="box-img">
|
||||
<image class="icon" :src="webUrl+'/20230608112219219303.png'" @click="showShare=false"/>
|
||||
<image class="icon" :src="webUrl+'/20230608112219219303.png'" @click="changeShare"/>
|
||||
<image class="main-img" :src="posterUrl"/>
|
||||
</view>
|
||||
<image class="btn" :src="webUrl+'/20230608112210135038.png'" @click="saveImg"/>
|
||||
|
||||
@@ -14,6 +14,9 @@ export default {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
changeType(index){
|
||||
this.typeIndex=index
|
||||
},
|
||||
init() {
|
||||
seasonHomeData().then(({data}) => this.list = data.seasonalFoodType || []);
|
||||
},
|
||||
@@ -31,7 +34,7 @@ export default {
|
||||
<template v-if="typeList.length">
|
||||
<view class="type-box">
|
||||
<u-grid col="4">
|
||||
<u-grid-item v-for="(item,index) in list" :key="index" @click="typeIndex=index">
|
||||
<u-grid-item v-for="(item,index) in list" :key="index" @click="changeType(index)">
|
||||
<image class="icon-logo" :class="{'choose-icon':typeIndex===index}" :src="item.logo" mode="scaleToFill"/>
|
||||
<text class="type-name" :class="{'choose-name':typeIndex===index}">{{ item.name }}</text>
|
||||
</u-grid-item>
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
<view class="img-box flex jc-between ai-end">
|
||||
<image class="img-seckill" :src="webUrl+'/20221222155145987590.png'" mode="scaleToFill"/>
|
||||
<image class="img-rule" :src="webUrl+'/20221222155206016851.png'" mode="scaleToFill" @click="showRule=true"/>
|
||||
<image class="img-rule" :src="webUrl+'/20221222155206016851.png'" mode="scaleToFill" @click="changeRule"/>
|
||||
</view>
|
||||
|
||||
<view class="dialog-mask" v-show="showRule">
|
||||
<view class="dialog">
|
||||
<image class="icon-close" :src="webUrl+'/20221230200935413332.png'" mode="scaleToFill" @click="showRule=false"/>
|
||||
<image class="icon-close" :src="webUrl+'/20221230200935413332.png'" mode="scaleToFill" @click="changeRule"/>
|
||||
|
||||
<view class="dialog-body">
|
||||
<view class="flex jc-center">
|
||||
@@ -133,6 +133,9 @@ export default {
|
||||
this.fetchList();
|
||||
},
|
||||
methods: {
|
||||
changeRule(){
|
||||
this.showRule=!this.showRule
|
||||
},
|
||||
navChange(index) {
|
||||
if (this.seckillTimeIndex === index) return;
|
||||
this.seckillTimeIndex = index;
|
||||
|
||||
Reference in New Issue
Block a user