order 7.23
This commit is contained in:
@@ -9,31 +9,30 @@
|
||||
<image src="/static/image/common/19.png"></image>
|
||||
客服
|
||||
</view>
|
||||
<view class="button" style="background:rgba(253,211,96,0.6);">试穿试送</view>
|
||||
<view class="button" style="background:rgba(253,211,96,0.6);" v-if="info.goods_try == 1">试穿试送</view>
|
||||
<view class="button" style="background:rgba(253,211,96,1);" @click="buy(2)">加入购物车</view>
|
||||
<view class="button" style="background:rgba(255,120,15,1);" @click="buy(1)">立即购买</view>
|
||||
</view>
|
||||
<u-popup v-model="show" mode="bottom">
|
||||
<scroll-view scroll-y="true" class="popup">
|
||||
<view>
|
||||
<view class="head">
|
||||
<image class="image" :src="info.goods_image"></image>
|
||||
<view class="info">
|
||||
<text class="u-line-2">{{info.goods_name}}</text>
|
||||
<text>¥{{info.goods_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<guige @sel="self" ref="guige" v-for="(item,index) in info.spec_value" :key="index" :title="info.spec_name[index]" :item="item"></guige>
|
||||
<view class="num">
|
||||
<text>购买数量</text>
|
||||
<u-number-box v-model="value" @change="valChange"></u-number-box>
|
||||
</view>
|
||||
<view style="height:180rpx"></view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
<scroll-view scroll-y="true" class="popup">
|
||||
<view>
|
||||
<view class="head">
|
||||
<image class="image" :src="info.goods_image"></image>
|
||||
<view class="info">
|
||||
<text class="u-line-2">{{info.goods_name}}</text>
|
||||
<text>¥{{info.goods_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<guige @sel="self" ref="guige" v-for="(item,index) in info.spec_value" :key="index" :title="info.spec_name[index]" :item="item"></guige>
|
||||
<view class="num">
|
||||
<text>购买数量</text>
|
||||
<u-number-box v-model="value" @change="valChange"></u-number-box>
|
||||
</view>
|
||||
<view style="height:100rpx"></view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
@@ -41,26 +40,29 @@
|
||||
import guige from "./guige"
|
||||
export default {
|
||||
name:"tloos",
|
||||
props: ['id','info'],
|
||||
props: ['id', 'info'],
|
||||
components:{
|
||||
guige
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
show:false,
|
||||
value:1,
|
||||
sel:"",
|
||||
quanxuan:false
|
||||
show: false,
|
||||
value: 1,
|
||||
sel: "",
|
||||
quanxuan: false
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.show = false;
|
||||
},
|
||||
methods: {
|
||||
buy(type){
|
||||
let that = this;
|
||||
if(this.show){
|
||||
if(this.info.spec_value == null){
|
||||
this.$emit("buy",{type,value:that.value})
|
||||
this.$emit("buy", { type, value: that.value })
|
||||
}else if(this.quanxuan){
|
||||
this.$emit("buy",{type,value:that.value})
|
||||
this.$emit("buy", { type, value: that.value })
|
||||
}else{
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择规格',
|
||||
@@ -68,7 +70,7 @@ export default {
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.show = true
|
||||
this.show = true;
|
||||
}
|
||||
|
||||
},
|
||||
@@ -87,7 +89,6 @@ export default {
|
||||
if(sel != 0){
|
||||
arr.push(sel)
|
||||
}
|
||||
|
||||
}
|
||||
// console.log(arr.length)
|
||||
if(arr.length == index){
|
||||
|
||||
Reference in New Issue
Block a user