选择完成
This commit is contained in:
parent
d2ddb26479
commit
72f56fe563
@ -12,6 +12,9 @@ const install = (Vue, vm) => {
|
|||||||
},
|
},
|
||||||
createLivesp({spec_name}){
|
createLivesp({spec_name}){
|
||||||
return vm.$u.post("Streaming/createLivesp",{spec_name})
|
return vm.$u.post("Streaming/createLivesp",{spec_name})
|
||||||
|
},
|
||||||
|
getStoreGoodsList(){
|
||||||
|
return vm.$u.post("article/getStoreGoodsList")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="item">
|
<view class="item" @click="xuanzhongs">
|
||||||
<image></image>
|
<image :src="image"></image>
|
||||||
<view class="title u-line-1" ></view>
|
<view class="title u-line-1" >{{title}}</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text></text>
|
<text>{{price}}</text>
|
||||||
<text></text>
|
<text>销量:{{num}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<u-checkbox class="xuanzhong" active-color="#FF7A15" :name="sid" v-model="xuanzhong" @change="xuanzhongs">
|
||||||
|
</u-checkbox>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -13,7 +15,14 @@ export default {
|
|||||||
name:"shop-item",
|
name:"shop-item",
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
xuanzhong:true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:['image','title','price','num','sid'],
|
||||||
|
methods:{
|
||||||
|
xuanzhongs(){
|
||||||
|
this.xuanzhong = !this.xuanzhong
|
||||||
|
this.$emit("xuanzhong")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -21,7 +30,11 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.item{
|
.item{
|
||||||
width: 214rpx;
|
width: 214rpx;
|
||||||
height: 297rpx;
|
// height: 297rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius:10rpx 10rpx 0 0;
|
||||||
|
padding-bottom: 14rpx;
|
||||||
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
>image{
|
>image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -49,5 +62,10 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.xuanzhong{
|
||||||
|
position: absolute;
|
||||||
|
left: 8rpx;
|
||||||
|
top: 8rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -1,9 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="selectshop">
|
<view class="selectshop">
|
||||||
<view class="title">我的商品</view>
|
<view class="title">我的商品</view>
|
||||||
|
<u-checkbox-group>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<shopItem></shopItem>
|
<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>
|
</view>
|
||||||
|
</u-checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -12,7 +14,8 @@ export default {
|
|||||||
name:"selectshop",
|
name:"selectshop",
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
list:[],
|
||||||
|
sele:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
@ -20,21 +23,45 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
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(){
|
onLoad(){
|
||||||
|
this.$u.api.getStoreGoodsList().then((res)=>{
|
||||||
|
this.list = res.data.list
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.selectshop{
|
.selectshop{
|
||||||
padding: 15rpx 30rpx;
|
padding: 15rpx 30rpx;
|
||||||
|
padding-left: 6rpx;
|
||||||
background-color: #2D2D2D;
|
background-color: #2D2D2D;
|
||||||
min-height: calc(100vh - 45px);
|
min-height: calc(100vh - 45px);
|
||||||
.title{
|
.title{
|
||||||
color: #FF780F;
|
color: #FF780F;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
margin-left: 26rpx;
|
||||||
|
}
|
||||||
|
.list{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-top: 35rpx;
|
||||||
|
.items{
|
||||||
|
margin-left: 24rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -22,7 +22,7 @@
|
|||||||
<view class="values"><text>{{max_two}}</text>/20</view>
|
<view class="values"><text>{{max_two}}</text>/20</view>
|
||||||
<u-form-item label-position="right">
|
<u-form-item label-position="right">
|
||||||
<u-input v-model="form.values" placeholder="我的售货袋" />
|
<u-input v-model="form.values" placeholder="我的售货袋" />
|
||||||
<view class="rightes">售货袋</view>
|
<view class="rightes" @click="navto('selectshop')">售货袋</view>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<!-- 标签的引入 -->
|
<!-- 标签的引入 -->
|
||||||
@ -86,11 +86,17 @@
|
|||||||
tupian(a){
|
tupian(a){
|
||||||
console.log(a)
|
console.log(a)
|
||||||
},
|
},
|
||||||
|
navto(url){
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/release/" + url
|
||||||
|
})
|
||||||
|
},
|
||||||
init(){
|
init(){
|
||||||
this.$u.api.getLiveSpec().then((res)=>{
|
this.$u.api.getLiveSpec().then((res)=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.fileListes = res.data
|
this.fileListes = res.data
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user