Merge pull request 'gdpaoup' (#52) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/52
This commit is contained in:
		
						commit
						12d095dc05
					
				@ -2,10 +2,16 @@
 | 
			
		||||
	<view id="release">
 | 
			
		||||
		<!-- 标签 -->
 | 
			
		||||
		<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" :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>
 | 
			
		||||
		<!-- 添加标签的按钮 -->
 | 
			
		||||
		<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
 | 
			
		||||
@ -35,7 +41,8 @@
 | 
			
		||||
				action: 'http://www.example.com/upload',
 | 
			
		||||
				fileList: [],
 | 
			
		||||
				show: false,
 | 
			
		||||
				rSelect: []
 | 
			
		||||
				rSelect: [],
 | 
			
		||||
                is_edit: false,
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		props:['fileListes'],
 | 
			
		||||
@ -44,6 +51,10 @@
 | 
			
		||||
				console.log(this.show)
 | 
			
		||||
				this.show = !this.show
 | 
			
		||||
			},
 | 
			
		||||
            // 编辑标签
 | 
			
		||||
            editing() {
 | 
			
		||||
                this.is_edit = !this.is_edit;
 | 
			
		||||
            },
 | 
			
		||||
			// 颜色切换
 | 
			
		||||
			tapInfo(e) {
 | 
			
		||||
				if (this.rSelect.indexOf(e) == -1) {
 | 
			
		||||
@ -54,6 +65,31 @@
 | 
			
		||||
				}
 | 
			
		||||
				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(){
 | 
			
		||||
				this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{
 | 
			
		||||
					if(res.errCode != 0){
 | 
			
		||||
@ -81,7 +117,12 @@
 | 
			
		||||
	#release {
 | 
			
		||||
		width: 690rpx;
 | 
			
		||||
		margin: 0 auto;
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
        .flex-title {
 | 
			
		||||
            display: flex;
 | 
			
		||||
            justify-content: space-between;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
		.form-view {
 | 
			
		||||
			background: rgba(255, 255, 255, 1);
 | 
			
		||||
			border-radius: 6rpx;
 | 
			
		||||
@ -91,6 +132,10 @@
 | 
			
		||||
			display: inline-block;
 | 
			
		||||
			margin-bottom: 28rpx;
 | 
			
		||||
			color: #333;
 | 
			
		||||
            .close {
 | 
			
		||||
                margin-left: 10rpx;
 | 
			
		||||
                vertical-align: middle;
 | 
			
		||||
            }
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		.titles {
 | 
			
		||||
 | 
			
		||||
@ -181,6 +181,9 @@ export default {
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	onLoad(option) {
 | 
			
		||||
        let pages = getCurrentPages();
 | 
			
		||||
        let prePage = pages[pages.length - 2];
 | 
			
		||||
        console.log(prePage);
 | 
			
		||||
		this.type = option.type;
 | 
			
		||||
		console.log(this.type)
 | 
			
		||||
		this.orderid = option.id;
 | 
			
		||||
@ -270,8 +273,8 @@ export default {
 | 
			
		||||
				// 确定退款
 | 
			
		||||
				this.$u.api.refund({
 | 
			
		||||
					refund_id: this.refundid,
 | 
			
		||||
					seller_state:2,
 | 
			
		||||
					seller_message:""
 | 
			
		||||
					seller_state: 2,
 | 
			
		||||
					seller_message: ""
 | 
			
		||||
				}).then(res => {
 | 
			
		||||
					if (res.errCode != 0) {
 | 
			
		||||
						this.$refs.uToast.show({
 | 
			
		||||
 | 
			
		||||
@ -38,7 +38,7 @@
 | 
			
		||||
				<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)">
 | 
			
		||||
					{{ 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>
 | 
			
		||||
			<!-- 简介 -->
 | 
			
		||||
@ -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) {
 | 
			
		||||
			console.log(data);
 | 
			
		||||
 | 
			
		||||
@ -16,17 +16,26 @@
 | 
			
		||||
				@on-success="uploadcover"
 | 
			
		||||
			></u-upload>
 | 
			
		||||
			<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>
 | 
			
		||||
				<view class="videotext">选择视频</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 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', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(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>
 | 
			
		||||
			<!-- 简介 -->
 | 
			
		||||
@ -167,6 +176,7 @@ export default {
 | 
			
		||||
			videopath: '', //视频链接
 | 
			
		||||
			fileListes: [],
 | 
			
		||||
			show: false,
 | 
			
		||||
            is_video: false,
 | 
			
		||||
			show_two: false,
 | 
			
		||||
			arres_list: [],
 | 
			
		||||
			shoplist: [], //选择商品列表
 | 
			
		||||
@ -176,13 +186,27 @@ export default {
 | 
			
		||||
			tagcontent: '', //新建标签名字
 | 
			
		||||
			selectvideo: '', //视频名字
 | 
			
		||||
			videostate: false, //视频状态
 | 
			
		||||
			progress: 0
 | 
			
		||||
			progress: 0,
 | 
			
		||||
            is_edit: false, // 编辑标签
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {
 | 
			
		||||
		this.getLiveSpec();
 | 
			
		||||
		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: {
 | 
			
		||||
		// 获取可以推荐的商品
 | 
			
		||||
		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) {
 | 
			
		||||
			let obj = data.data;
 | 
			
		||||
@ -305,6 +354,10 @@ export default {
 | 
			
		||||
		show_add() {
 | 
			
		||||
			this.show = !this.show;
 | 
			
		||||
		},
 | 
			
		||||
        // 编辑标签
 | 
			
		||||
        editing() {
 | 
			
		||||
            this.is_edit = !this.is_edit;
 | 
			
		||||
        },
 | 
			
		||||
		// 选择直播商品点击确定
 | 
			
		||||
		changes() {
 | 
			
		||||
			let that = this;
 | 
			
		||||
@ -353,6 +406,10 @@ export default {
 | 
			
		||||
	width: 690rpx;
 | 
			
		||||
	margin: 0 auto;
 | 
			
		||||
	padding-bottom:20rpx;
 | 
			
		||||
    .flex-title {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
    }
 | 
			
		||||
	.titles_border,
 | 
			
		||||
	.uni-textarea-compute {
 | 
			
		||||
		border: 1px #bababa solid !important;
 | 
			
		||||
@ -487,6 +544,10 @@ export default {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		margin-bottom: 28rpx;
 | 
			
		||||
		color: #fff;
 | 
			
		||||
        .close {
 | 
			
		||||
            margin-left: 10rpx;
 | 
			
		||||
            vertical-align: middle;
 | 
			
		||||
        }
 | 
			
		||||
	}
 | 
			
		||||
	.active {
 | 
			
		||||
		background: #ff780f;
 | 
			
		||||
@ -497,16 +558,33 @@ export default {
 | 
			
		||||
		color: rgba(51, 51, 51, 1);
 | 
			
		||||
		margin: 30rpx 0;
 | 
			
		||||
	}
 | 
			
		||||
    .video-flex {
 | 
			
		||||
        flex-direction: column;
 | 
			
		||||
        font-size: 28rpx;
 | 
			
		||||
        color: #666;
 | 
			
		||||
    }
 | 
			
		||||
	.videobox {
 | 
			
		||||
		width: 200rpx;
 | 
			
		||||
		height: 200rpx;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		flex-direction: column;
 | 
			
		||||
		justify-content: center;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		background: #f4f5f6;
 | 
			
		||||
		background-color: #f4f5f6;
 | 
			
		||||
		margin-left: 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 {
 | 
			
		||||
		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