直播的修改

This commit is contained in:
2020-07-17 09:49:42 +08:00
parent feb2b358e1
commit 4bade07d14
6 changed files with 82 additions and 26 deletions

View File

@@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name:"shop-item",
data(){
return {
}
}
}
</script>

View File

@@ -15,8 +15,10 @@
<view class="u-inputes">
<u-input v-model="form.name" />
</view>
<u-button class="custom-style-button" shape="circle" size="default">确定</u-button>
<u-button class="custom-style-button" shape="circle" size="default" @click="chuangjian">确定</u-button>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
@@ -50,6 +52,24 @@
} else {
this.rSelect.splice(this.rSelect.indexOf(e), 1); //取消
}
},
chuangjian(){
this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{
if(res.errCode != 0){
this.$refs.uToast.show({
title: res.message,
type: 'error'
})
}else{
this.show_add()
this.$refs.uToast.show({
title: res.message,
type: 'success'
})
this.$emit("chuangjian")
}
})
}
}
}