From 62678b39d136f6a92d5c99f31e633260db0a3570 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 21 Jul 2023 18:05:29 +0800
Subject: [PATCH] 订单支付后生成对应的课程单

---
 src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html b/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
index 748e7eb..331d3c0 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
@@ -124,6 +124,14 @@
                                             </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>
                                             <div class="layui-input-block">
@@ -778,6 +786,28 @@
                 });
             })
         }
+        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;
@@ -800,6 +830,7 @@
                 "levelOnePrice": goodsInfo.levelOnePrice,
                 "levelTwoPrice": goodsInfo.levelTwoPrice,
                 "levelThreePrice": goodsInfo.levelThreePrice,
+                "videoUrl": goodsInfo.videoUrl,
                 "houseName": goodsInfo.houseName,
                 "houseAddress": goodsInfo.houseAddress,
                 "isUnreal": goodsInfo.isUnreal,
@@ -827,6 +858,10 @@
 
             if (goodsInfo.isNormal == 5) {
                 $(".house-set").show();
+            }
+
+            if (goodsInfo.isNormal == 4) {
+                $(".class-set").show();
             }
 
             if (goodsInfo.levelTwoPrice == 1) {
@@ -926,6 +961,13 @@
                     $(this).hide();
                 }
             })
+            $('.class-set').each(function() {
+                if (data.value == 4) {
+                    $(this).show();
+                } else {
+                    $(this).hide();
+                }
+            })
         });
 
         form.on('radio(hasRoll)', function(data){

--
Gitblit v1.9.1