|  |  |  | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-form-item"> | 
|---|
|  |  |  | <label class="layui-form-label febs-form-item-require">商品品类</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <select name="isUnreal" class="goods-type"> | 
|---|
|  |  |  | <option value="1">【虚拟产品】。即购买结束,订单自动完成。</option> | 
|---|
|  |  |  | <option value="2">【实物】。需要收到发货,客户确认。</option> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-form-item febs-hide class-set"> | 
|---|
|  |  |  | <label class="layui-form-label">课程视频:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <button type="button" class="layui-btn upload" id="uploadVideo" style="margin-bottom: 2px">上传文件</button> | 
|---|
|  |  |  | <input type="text" name="videoUrl" autocomplete="off" value="" id="videoUrl" class="layui-input" readonly> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-form-item febs-hide house-set"> | 
|---|
|  |  |  | <label class="layui-form-label">酒店名称:</label> | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | upload.render({ | 
|---|
|  |  |  | elem: '#uploadVideo' | 
|---|
|  |  |  | ,url: ctx + 'admin/goods/uploadFileBase64' //改成您自己的上传接口 | 
|---|
|  |  |  | ,accept: 'file' | 
|---|
|  |  |  | ,before: function(obj){ | 
|---|
|  |  |  | layer.msg('上传中', {icon: 16, time: 0}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ,done: function(res){ | 
|---|
|  |  |  | var item = this.item; | 
|---|
|  |  |  | //如果上传失败 | 
|---|
|  |  |  | if(res.code !== 0){ | 
|---|
|  |  |  | return layer.msg('上传失败'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // $(item).parent().prev().find('input').val(res.data[0]); | 
|---|
|  |  |  | $("#videoUrl").val(res.data.src); | 
|---|
|  |  |  | layer.msg('上传完毕', {icon: 1}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ,error: function(err){ | 
|---|
|  |  |  | return layer.msg('上传失败'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function initValue() { | 
|---|
|  |  |  | var images = goodsInfo.images; | 
|---|
|  |  |  | 
|---|
|  |  |  | "levelOnePrice": goodsInfo.levelOnePrice, | 
|---|
|  |  |  | "levelTwoPrice": goodsInfo.levelTwoPrice, | 
|---|
|  |  |  | "levelThreePrice": goodsInfo.levelThreePrice, | 
|---|
|  |  |  | "videoUrl": goodsInfo.videoUrl, | 
|---|
|  |  |  | "houseName": goodsInfo.houseName, | 
|---|
|  |  |  | "houseAddress": goodsInfo.houseAddress, | 
|---|
|  |  |  | "isUnreal": goodsInfo.isUnreal, | 
|---|
|  |  |  | "costPrice": goodsInfo.costPrice, | 
|---|
|  |  |  | "isSku": goodsInfo.isSku, | 
|---|
|  |  |  | "thumb": goodsInfo.thumb, | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (goodsInfo.isNormal == 5) { | 
|---|
|  |  |  | $(".house-set").show(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (goodsInfo.isNormal == 4) { | 
|---|
|  |  |  | $(".class-set").show(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (goodsInfo.levelTwoPrice == 1) { | 
|---|
|  |  |  | 
|---|
|  |  |  | $(this).hide(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | $('.class-set').each(function() { | 
|---|
|  |  |  | if (data.value == 4) { | 
|---|
|  |  |  | $(this).show(); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | $(this).hide(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.on('radio(hasRoll)', function(data){ | 
|---|