Merge branch 'master' of http://git.luyuan.tk/luyuan/demingshangjia into xbx
This commit is contained in:
		
						commit
						67edac985e
					
				| @ -2,10 +2,16 @@ | |||||||
| 	<view id="release"> | 	<view id="release"> | ||||||
| 		<!-- 标签 --> | 		<!-- 标签 --> | ||||||
| 		<view> | 		<view> | ||||||
| 			<view class="titles">标签</view> | 			<view class="titles flex-title"> | ||||||
|  | 			    <text>标签</text> | ||||||
|  | 			    <text @click="editing">{{ is_edit ? "取消编辑" : "编辑" }}</text> | ||||||
|  | 			</view> | ||||||
| 			<view class="form-view" @click="show_add()">+ 新建标签</view> | 			<view class="form-view" @click="show_add()">+ 新建标签</view> | ||||||
| 			<view class="form-view" :class=" {'cur': rSelect.indexOf(item.id)!=-1} " @tap="tapInfo(item.id)" v-for="(item,index) in fileListes" | 			<view class="form-view" :class=" {'cur': rSelect.indexOf(item.id)!=-1} " @tap="tapInfo(item.id)" v-for="(item,index) in fileListes" | ||||||
| 			 :key="index">{{item.name}}</view> | 			 :key="index"> | ||||||
|  |              {{item.name}} | ||||||
|  |              <u-icon v-show="is_edit && item.user_id != 0" class="close" name="close" color="#666" size="18" @click="isTable(item.id,index)"></u-icon> | ||||||
|  |              </view> | ||||||
| 		</view> | 		</view> | ||||||
| 		<!-- 添加标签的按钮 --> | 		<!-- 添加标签的按钮 --> | ||||||
| 		<u-popup v-model="show" mode="center" border-radius="14" :closeable="true"> | 		<u-popup v-model="show" mode="center" border-radius="14" :closeable="true"> | ||||||
| @ -35,7 +41,8 @@ | |||||||
| 				action: 'http://www.example.com/upload', | 				action: 'http://www.example.com/upload', | ||||||
| 				fileList: [], | 				fileList: [], | ||||||
| 				show: false, | 				show: false, | ||||||
| 				rSelect: [] | 				rSelect: [], | ||||||
|  |                 is_edit: false, | ||||||
| 			} | 			} | ||||||
| 		}, | 		}, | ||||||
| 		props:['fileListes'], | 		props:['fileListes'], | ||||||
| @ -44,6 +51,10 @@ | |||||||
| 				console.log(this.show) | 				console.log(this.show) | ||||||
| 				this.show = !this.show | 				this.show = !this.show | ||||||
| 			}, | 			}, | ||||||
|  |             // 编辑标签 | ||||||
|  |             editing() { | ||||||
|  |                 this.is_edit = !this.is_edit; | ||||||
|  |             }, | ||||||
| 			// 颜色切换 | 			// 颜色切换 | ||||||
| 			tapInfo(e) { | 			tapInfo(e) { | ||||||
| 				if (this.rSelect.indexOf(e) == -1) { | 				if (this.rSelect.indexOf(e) == -1) { | ||||||
| @ -54,6 +65,31 @@ | |||||||
| 				} | 				} | ||||||
| 				this.$emit("qiehuan",this.rSelect) | 				this.$emit("qiehuan",this.rSelect) | ||||||
| 			}, | 			}, | ||||||
|  |             // 删除标签 | ||||||
|  |             isTable(id,index) { | ||||||
|  |                 uni.showModal({ | ||||||
|  |                     title: "提示", | ||||||
|  |                     content: "是否删除此标签?", | ||||||
|  |                     success: (res) => { | ||||||
|  |                         console.log(); | ||||||
|  |                         if (res.confirm) { | ||||||
|  |                             this.delTable(id,index); | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                 }) | ||||||
|  |             }, | ||||||
|  |             delTable(id,index) { | ||||||
|  |                 let me = this; | ||||||
|  |                 this.$u.post("Streaming/deltLabel", {label_id: id}).then(res => { | ||||||
|  |                     if (res.errCode == 0) { | ||||||
|  |                         this.$refs.uToast.show({ | ||||||
|  |                         	title: res.message, | ||||||
|  |                         	type: 'success' | ||||||
|  |                         }); | ||||||
|  |                         this.fileListes.splice(index,1); | ||||||
|  |                     } | ||||||
|  |                 }) | ||||||
|  |             }, | ||||||
| 			chuangjian(){ | 			chuangjian(){ | ||||||
| 				this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{ | 				this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{ | ||||||
| 					if(res.errCode != 0){ | 					if(res.errCode != 0){ | ||||||
| @ -81,7 +117,12 @@ | |||||||
| 	#release { | 	#release { | ||||||
| 		width: 690rpx; | 		width: 690rpx; | ||||||
| 		margin: 0 auto; | 		margin: 0 auto; | ||||||
| 
 |          | ||||||
|  |         .flex-title { | ||||||
|  |             display: flex; | ||||||
|  |             justify-content: space-between; | ||||||
|  |         } | ||||||
|  |          | ||||||
| 		.form-view { | 		.form-view { | ||||||
| 			background: rgba(255, 255, 255, 1); | 			background: rgba(255, 255, 255, 1); | ||||||
| 			border-radius: 6rpx; | 			border-radius: 6rpx; | ||||||
| @ -91,6 +132,10 @@ | |||||||
| 			display: inline-block; | 			display: inline-block; | ||||||
| 			margin-bottom: 28rpx; | 			margin-bottom: 28rpx; | ||||||
| 			color: #333; | 			color: #333; | ||||||
|  |             .close { | ||||||
|  |                 margin-left: 10rpx; | ||||||
|  |                 vertical-align: middle; | ||||||
|  |             } | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		.titles { | 		.titles { | ||||||
|  | |||||||
| @ -181,6 +181,9 @@ export default { | |||||||
| 		}; | 		}; | ||||||
| 	}, | 	}, | ||||||
| 	onLoad(option) { | 	onLoad(option) { | ||||||
|  |         let pages = getCurrentPages(); | ||||||
|  |         let prePage = pages[pages.length - 2]; | ||||||
|  |         console.log(prePage); | ||||||
| 		this.type = option.type; | 		this.type = option.type; | ||||||
| 		console.log(this.type) | 		console.log(this.type) | ||||||
| 		this.orderid = option.id; | 		this.orderid = option.id; | ||||||
| @ -270,8 +273,8 @@ export default { | |||||||
| 				// 确定退款 | 				// 确定退款 | ||||||
| 				this.$u.api.refund({ | 				this.$u.api.refund({ | ||||||
| 					refund_id: this.refundid, | 					refund_id: this.refundid, | ||||||
| 					seller_state:2, | 					seller_state: 2, | ||||||
| 					seller_message:"" | 					seller_message: "" | ||||||
| 				}).then(res => { | 				}).then(res => { | ||||||
| 					if (res.errCode != 0) { | 					if (res.errCode != 0) { | ||||||
| 						this.$refs.uToast.show({ | 						this.$refs.uToast.show({ | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ | |||||||
| 				<view class="form-view active" @click="show_add()">+ 新建标签</view> | 				<view class="form-view active" @click="show_add()">+ 新建标签</view> | ||||||
| 				<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)"> | 				<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)"> | ||||||
| 					{{ item.name }} | 					{{ item.name }} | ||||||
|                     <u-icon v-show="is_edit" class="close" name="close" color="#666" size="18"></u-icon> |                     <u-icon v-show="is_edit && item.user_id != 0" class="close" name="close" color="#666" size="18" @click="isTable(item.id,index)"></u-icon> | ||||||
| 				</view> | 				</view> | ||||||
| 			</view> | 			</view> | ||||||
| 			<!-- 简介 --> | 			<!-- 简介 --> | ||||||
| @ -246,6 +246,31 @@ export default { | |||||||
| 					} | 					} | ||||||
| 				}); | 				}); | ||||||
| 		}, | 		}, | ||||||
|  |         // 删除标签 | ||||||
|  |         isTable(id,index) { | ||||||
|  |             uni.showModal({ | ||||||
|  |                 title: "提示", | ||||||
|  |                 content: "是否删除此标签?", | ||||||
|  |                 success: (res) => { | ||||||
|  |                     console.log(); | ||||||
|  |                     if (res.confirm) { | ||||||
|  |                         this.delTable(id,index); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             }) | ||||||
|  |         }, | ||||||
|  |         delTable(id,index) { | ||||||
|  |             let me = this; | ||||||
|  |             this.$u.post("Streaming/deltLabel", {label_id: id}).then(res => { | ||||||
|  |                 if (res.errCode == 0) { | ||||||
|  |                     this.$refs.uToast.show({ | ||||||
|  |                     	title: res.message, | ||||||
|  |                     	type: 'success' | ||||||
|  |                     }); | ||||||
|  |                     this.fileListes.splice(index,1); | ||||||
|  |                 } | ||||||
|  |             }) | ||||||
|  |         }, | ||||||
| 		// 上传封面 | 		// 上传封面 | ||||||
| 		uploadcover(data) { | 		uploadcover(data) { | ||||||
| 			console.log(data); | 			console.log(data); | ||||||
|  | |||||||
| @ -16,17 +16,26 @@ | |||||||
| 				@on-success="uploadcover" | 				@on-success="uploadcover" | ||||||
| 			></u-upload> | 			></u-upload> | ||||||
| 			<view class="titles">视频</view> | 			<view class="titles">视频</view> | ||||||
| 			<view class="videobox" v-if="videostate == false" @click="uploadvideo"> | 			<view class="videobox video-flex" v-if="videostate == false" @click="uploadvideo"> | ||||||
| 				<u-icon name="plus" class="u-add-btn" size="40"></u-icon> | 				<u-icon name="plus" class="u-add-btn" size="40"></u-icon> | ||||||
| 				<view class="videotext">选择视频</view> | 				<view class="videotext">选择视频</view> | ||||||
| 			</view> | 			</view> | ||||||
| 			<view class="videobox" v-else @click="uploadvideo"><video :src="videopath" controls></video></view> | 			<view class="videobox" v-else @click="uploadvideo"> | ||||||
|  |                 <video v-if="!is_video" :src="videopath" controls></video> | ||||||
|  |                 <view v-else class="video-mode"> | ||||||
|  |                     <image src="../../static/videoPlay.png" mode=""></image> | ||||||
|  |                 </view> | ||||||
|  |             </view> | ||||||
| 			<!-- 标签 --> | 			<!-- 标签 --> | ||||||
| 			<view> | 			<view> | ||||||
| 				<view class="titles">标签</view> | 				<view class="titles flex-title"> | ||||||
|  | 				    <text>标签</text> | ||||||
|  | 				    <text @click="editing">{{ is_edit ? "取消编辑" : "编辑" }}</text> | ||||||
|  | 				</view> | ||||||
| 				<view class="form-view active" @click="show_add()">+ 新建标签</view> | 				<view class="form-view active" @click="show_add()">+ 新建标签</view> | ||||||
| 				<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)"> | 				<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)"> | ||||||
| 					{{ item.name }} | 					{{ item.name }} | ||||||
|  |                     <u-icon v-show="is_edit && item.user_id != 0" class="close" name="close" color="#666" size="18" @click="isTable(item.id,index)"></u-icon> | ||||||
| 				</view> | 				</view> | ||||||
| 			</view> | 			</view> | ||||||
| 			<!-- 简介 --> | 			<!-- 简介 --> | ||||||
| @ -167,6 +176,7 @@ export default { | |||||||
| 			videopath: '', //视频链接 | 			videopath: '', //视频链接 | ||||||
| 			fileListes: [], | 			fileListes: [], | ||||||
| 			show: false, | 			show: false, | ||||||
|  |             is_video: false, | ||||||
| 			show_two: false, | 			show_two: false, | ||||||
| 			arres_list: [], | 			arres_list: [], | ||||||
| 			shoplist: [], //选择商品列表 | 			shoplist: [], //选择商品列表 | ||||||
| @ -176,13 +186,27 @@ export default { | |||||||
| 			tagcontent: '', //新建标签名字 | 			tagcontent: '', //新建标签名字 | ||||||
| 			selectvideo: '', //视频名字 | 			selectvideo: '', //视频名字 | ||||||
| 			videostate: false, //视频状态 | 			videostate: false, //视频状态 | ||||||
| 			progress: 0 | 			progress: 0, | ||||||
|  |             is_edit: false, // 编辑标签 | ||||||
| 		}; | 		}; | ||||||
| 	}, | 	}, | ||||||
| 	onLoad() { | 	onLoad() { | ||||||
| 		this.getLiveSpec(); | 		this.getLiveSpec(); | ||||||
| 		this.resetgood(); | 		this.resetgood(); | ||||||
| 	}, | 	}, | ||||||
|  |     watch: { | ||||||
|  |       show() { | ||||||
|  |           let me = this; | ||||||
|  |           if (this.show) { | ||||||
|  |               this.is_video = true; | ||||||
|  |           } else { | ||||||
|  |               setTimeout(function() { | ||||||
|  |                   me.is_video = false; | ||||||
|  |               },600) | ||||||
|  |           } | ||||||
|  |       }, | ||||||
|  |       immediate: true | ||||||
|  |     }, | ||||||
| 	methods: { | 	methods: { | ||||||
| 		// 获取可以推荐的商品 | 		// 获取可以推荐的商品 | ||||||
| 		resetgood() { | 		resetgood() { | ||||||
| @ -291,6 +315,31 @@ export default { | |||||||
| 				} | 				} | ||||||
| 			}); | 			}); | ||||||
| 		}, | 		}, | ||||||
|  |         // 删除标签 | ||||||
|  |         isTable(id,index) { | ||||||
|  |             uni.showModal({ | ||||||
|  |                 title: "提示", | ||||||
|  |                 content: "是否删除此标签?", | ||||||
|  |                 success: (res) => { | ||||||
|  |                     console.log(); | ||||||
|  |                     if (res.confirm) { | ||||||
|  |                         this.delTable(id,index); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             }) | ||||||
|  |         }, | ||||||
|  |         delTable(id,index) { | ||||||
|  |             let me = this; | ||||||
|  |             this.$u.post("Streaming/deltLabel", {label_id: id}).then(res => { | ||||||
|  |                 if (res.errCode == 0) { | ||||||
|  |                     this.$refs.uToast.show({ | ||||||
|  |                     	title: res.message, | ||||||
|  |                     	type: 'success' | ||||||
|  |                     }); | ||||||
|  |                     this.fileListes.splice(index,1); | ||||||
|  |                 } | ||||||
|  |             }) | ||||||
|  |         }, | ||||||
| 		// 上传封面 | 		// 上传封面 | ||||||
| 		uploadcover(data) { | 		uploadcover(data) { | ||||||
| 			let obj = data.data; | 			let obj = data.data; | ||||||
| @ -305,6 +354,10 @@ export default { | |||||||
| 		show_add() { | 		show_add() { | ||||||
| 			this.show = !this.show; | 			this.show = !this.show; | ||||||
| 		}, | 		}, | ||||||
|  |         // 编辑标签 | ||||||
|  |         editing() { | ||||||
|  |             this.is_edit = !this.is_edit; | ||||||
|  |         }, | ||||||
| 		// 选择直播商品点击确定 | 		// 选择直播商品点击确定 | ||||||
| 		changes() { | 		changes() { | ||||||
| 			let that = this; | 			let that = this; | ||||||
| @ -353,6 +406,10 @@ export default { | |||||||
| 	width: 690rpx; | 	width: 690rpx; | ||||||
| 	margin: 0 auto; | 	margin: 0 auto; | ||||||
| 	padding-bottom:20rpx; | 	padding-bottom:20rpx; | ||||||
|  |     .flex-title { | ||||||
|  |         display: flex; | ||||||
|  |         justify-content: space-between; | ||||||
|  |     } | ||||||
| 	.titles_border, | 	.titles_border, | ||||||
| 	.uni-textarea-compute { | 	.uni-textarea-compute { | ||||||
| 		border: 1px #bababa solid !important; | 		border: 1px #bababa solid !important; | ||||||
| @ -487,6 +544,10 @@ export default { | |||||||
| 		display: inline-block; | 		display: inline-block; | ||||||
| 		margin-bottom: 28rpx; | 		margin-bottom: 28rpx; | ||||||
| 		color: #fff; | 		color: #fff; | ||||||
|  |         .close { | ||||||
|  |             margin-left: 10rpx; | ||||||
|  |             vertical-align: middle; | ||||||
|  |         } | ||||||
| 	} | 	} | ||||||
| 	.active { | 	.active { | ||||||
| 		background: #ff780f; | 		background: #ff780f; | ||||||
| @ -497,16 +558,33 @@ export default { | |||||||
| 		color: rgba(51, 51, 51, 1); | 		color: rgba(51, 51, 51, 1); | ||||||
| 		margin: 30rpx 0; | 		margin: 30rpx 0; | ||||||
| 	} | 	} | ||||||
|  |     .video-flex { | ||||||
|  |         flex-direction: column; | ||||||
|  |         font-size: 28rpx; | ||||||
|  |         color: #666; | ||||||
|  |     } | ||||||
| 	.videobox { | 	.videobox { | ||||||
| 		width: 200rpx; | 		width: 200rpx; | ||||||
| 		height: 200rpx; | 		height: 200rpx; | ||||||
| 		display: flex; | 		display: flex; | ||||||
| 		flex-direction: column; |  | ||||||
| 		justify-content: center; | 		justify-content: center; | ||||||
| 		align-items: center; | 		align-items: center; | ||||||
| 		background: #f4f5f6; | 		background-color: #f4f5f6; | ||||||
| 		margin-left: 10rpx; | 		margin-left: 10rpx; | ||||||
| 		border-radius: 10rpx; | 		border-radius: 10rpx; | ||||||
|  |          | ||||||
|  |         .video-mode { | ||||||
|  |             width: 200rpx; | ||||||
|  |             height: 200rpx; | ||||||
|  |             line-height: 280rpx; | ||||||
|  |             text-align: center; | ||||||
|  |             border-radius: 10rpx; | ||||||
|  |             background-color: #000; | ||||||
|  |             & > image { | ||||||
|  |                 width: 100rpx; | ||||||
|  |                 height: 100rpx; | ||||||
|  |             } | ||||||
|  |         } | ||||||
| 	} | 	} | ||||||
| 	.videotext { | 	.videotext { | ||||||
| 		margin-top: 10rpx; | 		margin-top: 10rpx; | ||||||
|  | |||||||
							
								
								
									
										
											BIN
										
									
								
								static/videoPlay.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/videoPlay.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 4.7 KiB | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user