选择完成

This commit is contained in:
2020-07-21 15:00:39 +08:00
parent d2ddb26479
commit 72f56fe563
4 changed files with 68 additions and 14 deletions

View File

@@ -1,9 +1,11 @@
<template>
<view class="selectshop">
<view class="title">我的商品</view>
<view class="list">
<shopItem></shopItem>
</view>
<u-checkbox-group>
<view class="list">
<shopItem @xuanzhong="xuanzhong" class="items" v-for="(i,j) in list" :key="j" :image="i.goods_image" :title="i.goods_name" :price="i.goods_marketprice" :num="i.goods_salenum" :sid="i.goods_id" ref="shop"></shopItem>
</view>
</u-checkbox-group>
</view>
</template>
<script>
@@ -12,29 +14,54 @@ export default {
name:"selectshop",
data(){
return {
list:[],
sele:[]
}
},
components:{
shopItem
},
methods:{
xuanzhong(){
// console.log(this.$refs.shop)
this.sele = []
for(let i of this.$refs.shop){
// console.log(i)
if(i.xuanzhong){
this.sele.push(i.sid)
}
}
console.log(this.sele)
}
},
onLoad(){
this.$u.api.getStoreGoodsList().then((res)=>{
this.list = res.data.list
})
}
}
</script>
<style lang="scss" scoped>
.selectshop{
padding: 15rpx 30rpx;
padding-left: 6rpx;
background-color: #2D2D2D;
min-height: calc(100vh - 45px);
.title{
color: #FF780F;
font-size: 30rpx;
font-weight: 400;
margin-left: 26rpx;
}
.list{
display: flex;
flex-wrap: wrap;
margin-top: 35rpx;
.items{
margin-left: 24rpx;
margin-bottom: 30rpx;
}
}
}
</style>

View File

@@ -22,7 +22,7 @@
<view class="values"><text>{{max_two}}</text>/20</view>
<u-form-item label-position="right">
<u-input v-model="form.values" placeholder="我的售货袋" />
<view class="rightes">售货袋</view>
<view class="rightes" @click="navto('selectshop')">售货袋</view>
</u-form-item>
</u-form>
<!-- 标签的引入 -->
@@ -86,11 +86,17 @@
tupian(a){
console.log(a)
},
navto(url){
this.$u.route({
url:"/pages/release/" + url
})
},
init(){
this.$u.api.getLiveSpec().then((res)=>{
console.log(res)
this.fileListes = res.data
})
}
},
components: {