From e2e8e9de828dc83db2fb254f29e544d6e7ff4d57 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 19 Sep 2023 11:17:17 +0800
Subject: [PATCH] bannner
---
src/main/resources/templates/febs/views/modules/news/indexVideoSetting.html | 106 +++++++++++++++
/dev/null | 73 ----------
src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java | 15 ++
src/main/java/cc/mrbird/febs/mall/service/impl/MallNewsInfoServiceImpl.java | 20 ++
src/main/java/cc/mrbird/febs/mall/service/IApiMallNewsService.java | 2
src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java | 21 ++
src/main/java/cc/mrbird/febs/mall/dto/AdminIndexVideoDto.java | 8 +
src/main/java/cc/mrbird/febs/common/enumerates/DataDictionaryEnum.java | 2
src/main/resources/templates/febs/views/modules/system/indexVideo.html | 95 +++++++++++++
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallNewsServiceImpl.java | 22 ++-
src/main/java/cc/mrbird/febs/mall/controller/ApiMallNewsController.java | 6
src/main/java/cc/mrbird/febs/mall/service/IMallNewsInfoService.java | 2
12 files changed, 286 insertions(+), 86 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/common/enumerates/DataDictionaryEnum.java b/src/main/java/cc/mrbird/febs/common/enumerates/DataDictionaryEnum.java
index cbded5e..f8125d8 100644
--- a/src/main/java/cc/mrbird/febs/common/enumerates/DataDictionaryEnum.java
+++ b/src/main/java/cc/mrbird/febs/common/enumerates/DataDictionaryEnum.java
@@ -8,6 +8,8 @@
//微信订阅模板ID,
// 微信订单通知
// WX_TEMPLATE_ID_ONE("WX_TEMPLATE", "WX_TEMPLATE_ID_ONE"),
+ // 首页视屏链接
+ VIDEO_URL_INDEX("VIDEO_URL_INDEX", "VIDEO_URL_INDEX"),
// 充值金额
CHARGE_AMOUNT("CHARGE_SET", "CHARGE_AMOUNT"),
// 赠送金额
diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
index ba2bc2b..f6444ee 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
@@ -5,6 +5,7 @@
import cc.mrbird.febs.common.enumerates.DataDictionaryEnum;
import cc.mrbird.febs.mall.dto.AdminAgentAmountDto;
import cc.mrbird.febs.mall.dto.AdminAgentDetailDto;
+import cc.mrbird.febs.mall.dto.AdminIndexVideoDto;
import cc.mrbird.febs.mall.dto.CashOutSettingDto;
import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
@@ -135,6 +136,20 @@
return new FebsResponse().success();
}
+ @PostMapping(value = "/indexVideoSet")
+ public FebsResponse indexVideoSet(AdminIndexVideoDto adminIndexVideoDto) {
+ DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+ DataDictionaryEnum.VIDEO_URL_INDEX.getType(),
+ DataDictionaryEnum.VIDEO_URL_INDEX.getCode()
+ );
+ if(ObjectUtil.isEmpty(dic)){
+ return new FebsResponse().fail().message("请刷新页面重试");
+ }
+ dic.setValue(adminIndexVideoDto.getVideoUrl());
+ dataDictionaryCustomMapper.updateById(dic);
+ return new FebsResponse().success();
+ }
+
// public static void main(String[] args) {
// List<Integer> lines = Arrays.asList(new Integer[]{1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0});
// //数字连续出现的计数
diff --git a/src/main/java/cc/mrbird/febs/mall/controller/ApiMallNewsController.java b/src/main/java/cc/mrbird/febs/mall/controller/ApiMallNewsController.java
index cf94025..cbdaa62 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/ApiMallNewsController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/ApiMallNewsController.java
@@ -67,4 +67,10 @@
public FebsResponse findPlatformBannerList() {
return newsService.findAllBanner();
}
+
+ @ApiOperation(value = "首页视频", notes = "首页视频")
+ @GetMapping(value = "/indexVideo")
+ public FebsResponse indexVideo() {
+ return newsService.indexVideo();
+ }
}
diff --git a/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java b/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
index 0e946b7..ff3fdea 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
@@ -3,10 +3,7 @@
import cc.mrbird.febs.common.entity.FebsConstant;
import cc.mrbird.febs.common.enumerates.DataDictionaryEnum;
import cc.mrbird.febs.common.utils.FebsUtil;
-import cc.mrbird.febs.mall.dto.AdminAgentAmountDto;
-import cc.mrbird.febs.mall.dto.AdminAgentDetailDto;
-import cc.mrbird.febs.mall.dto.CashOutSettingDto;
-import cc.mrbird.febs.mall.dto.ScoreSettingDto;
+import cc.mrbird.febs.mall.dto.*;
import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
import cn.hutool.core.util.ObjectUtil;
@@ -86,4 +83,20 @@
}
return FebsUtil.view("modules/system/agentDetail");
}
+
+
+
+ @GetMapping("indexVideo")
+ @RequiresPermissions("indexVideo:update")
+ public String indexVideoSet(Model model) {
+ DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+ DataDictionaryEnum.VIDEO_URL_INDEX.getType(),
+ DataDictionaryEnum.VIDEO_URL_INDEX.getCode());
+ AdminIndexVideoDto adminIndexVideoDto = new AdminIndexVideoDto();
+ if (ObjectUtil.isNotEmpty(dic)) {
+ adminIndexVideoDto.setVideoUrl(dic.getValue());
+ }
+ model.addAttribute("indexVideoSet", adminIndexVideoDto);
+ return FebsUtil.view("modules/system/indexVideo");
+ }
}
diff --git a/src/main/java/cc/mrbird/febs/mall/dto/AdminIndexVideoDto.java b/src/main/java/cc/mrbird/febs/mall/dto/AdminIndexVideoDto.java
new file mode 100644
index 0000000..8c31018
--- /dev/null
+++ b/src/main/java/cc/mrbird/febs/mall/dto/AdminIndexVideoDto.java
@@ -0,0 +1,8 @@
+package cc.mrbird.febs.mall.dto;
+
+import lombok.Data;
+
+@Data
+public class AdminIndexVideoDto {
+ private String videoUrl;
+}
diff --git a/src/main/java/cc/mrbird/febs/mall/service/IApiMallNewsService.java b/src/main/java/cc/mrbird/febs/mall/service/IApiMallNewsService.java
index 2965c2f..8ffa9b7 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/IApiMallNewsService.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/IApiMallNewsService.java
@@ -19,4 +19,6 @@
List<NewsListVo> findTopNews();
FebsResponse findAllBanner();
+
+ FebsResponse indexVideo();
}
diff --git a/src/main/java/cc/mrbird/febs/mall/service/IMallNewsInfoService.java b/src/main/java/cc/mrbird/febs/mall/service/IMallNewsInfoService.java
index 0e42280..2723d8c 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/IMallNewsInfoService.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/IMallNewsInfoService.java
@@ -30,4 +30,6 @@
MallNewsCategory findNewsCategoryById(Long id);
List<MallNewsCategory> findAllCategory();
+
+ FebsResponse addVideoInfo(MallNewsInfoDto mallNewsInfoDto);
}
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallNewsServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallNewsServiceImpl.java
index f94df2b..2c0a85d 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallNewsServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallNewsServiceImpl.java
@@ -1,18 +1,14 @@
package cc.mrbird.febs.mall.service.impl;
import cc.mrbird.febs.common.entity.FebsResponse;
+import cc.mrbird.febs.common.enumerates.DataDictionaryEnum;
import cc.mrbird.febs.mall.dto.NewsListDto;
-import cc.mrbird.febs.mall.entity.MallGoods;
-import cc.mrbird.febs.mall.entity.MallNewsCategory;
-import cc.mrbird.febs.mall.entity.MallNewsInfo;
-import cc.mrbird.febs.mall.entity.PlatformBanner;
-import cc.mrbird.febs.mall.mapper.MallGoodsMapper;
-import cc.mrbird.febs.mall.mapper.MallNewsCategoryMapper;
-import cc.mrbird.febs.mall.mapper.MallNewsInfoMapper;
-import cc.mrbird.febs.mall.mapper.PlatformBannerMapper;
+import cc.mrbird.febs.mall.entity.*;
+import cc.mrbird.febs.mall.mapper.*;
import cc.mrbird.febs.mall.service.IApiMallNewsService;
import cc.mrbird.febs.mall.vo.NewsListVo;
import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -35,6 +31,7 @@
private final MallNewsCategoryMapper mallNewsCategoryMapper;
private final PlatformBannerMapper platformBannerMapper;
private final MallGoodsMapper mallGoodsMapper;
+ private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
@Override
public List<MallNewsCategory> findNewsCategoryList() {
@@ -81,4 +78,13 @@
}
return new FebsResponse().success().data(paymentMethodList);
}
+
+ @Override
+ public FebsResponse indexVideo() {
+ DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+ DataDictionaryEnum.VIDEO_URL_INDEX.getType(),
+ DataDictionaryEnum.VIDEO_URL_INDEX.getCode()
+ );
+ return new FebsResponse().success().data(dataDictionaryCustom.getValue());
+ }
}
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/MallNewsInfoServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/MallNewsInfoServiceImpl.java
index a8daf2a..7e2fbae 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/MallNewsInfoServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/MallNewsInfoServiceImpl.java
@@ -2,15 +2,19 @@
import cc.mrbird.febs.common.entity.FebsResponse;
import cc.mrbird.febs.common.entity.QueryRequest;
+import cc.mrbird.febs.common.enumerates.DataDictionaryEnum;
import cc.mrbird.febs.mall.dto.MallNewsInfoDto;
+import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
import cc.mrbird.febs.mall.entity.MallNewsCategory;
import cc.mrbird.febs.mall.entity.MallNewsInfo;
+import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
import cc.mrbird.febs.mall.mapper.MallNewsCategoryMapper;
import cc.mrbird.febs.mall.mapper.MallNewsInfoMapper;
import cc.mrbird.febs.mall.service.IMallNewsInfoService;
import cc.mrbird.febs.mall.vo.AdminMallNewsInfoVo;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -30,7 +34,8 @@
public class MallNewsInfoServiceImpl extends ServiceImpl<MallNewsInfoMapper, MallNewsInfo> implements IMallNewsInfoService {
private final MallNewsCategoryMapper mallNewsCategoryMapper;
-
+ private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
+
@Override
public IPage<AdminMallNewsInfoVo> getNewInfoList(MallNewsInfo mallNewsInfo, QueryRequest request) {
Page<AdminMallNewsInfoVo> page = new Page<>(request.getPageNum(), request.getPageSize());
@@ -129,4 +134,17 @@
public List<MallNewsCategory> findAllCategory() {
return mallNewsCategoryMapper.selectList(null);
}
+
+ @Override
+ public FebsResponse addVideoInfo(MallNewsInfoDto mallNewsInfoDto) {
+ DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+ DataDictionaryEnum.VIDEO_URL_INDEX.getType(),
+ DataDictionaryEnum.VIDEO_URL_INDEX.getCode()
+ );
+ if(StrUtil.isNotEmpty(mallNewsInfoDto.getVideoUrl())){
+ dataDictionaryCustom.setValue(mallNewsInfoDto.getVideoUrl());
+ dataDictionaryCustomMapper.updateById(dataDictionaryCustom);
+ }
+ return new FebsResponse().success();
+ }
}
diff --git a/src/main/resources/templates/febs/views/modules/news/indexVideoSetting.html b/src/main/resources/templates/febs/views/modules/news/indexVideoSetting.html
new file mode 100644
index 0000000..211414b
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/news/indexVideoSetting.html
@@ -0,0 +1,106 @@
+<div class="layui-fluid layui-anim febs-anim" id="index-video-setting" lay-title="首页视频设置">
+ <div class="layui-row layui-col-space8 febs-container">
+ <form class="layui-form" action="" lay-filter="index-video-setting-form">
+ <div class="layui-card">
+ <div class="layui-card-body">
+<!-- <div class="layui-form-item">-->
+<!-- <label class="layui-form-label ">视频链接:</label>-->
+<!-- <div class="layui-input-block">-->
+<!-- <input id="videoUrl" type="text" name="videoUrl" lay-verify="" autocomplete="off" class="layui-input" >-->
+<!-- </div>-->
+<!-- </div>-->
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">视频:</label>
+ <div class="layui-input-block">
+ <button type="button" class="layui-btn upload" id="upload" style="background-color: #009688; margin-bottom: 2px">上传文件</button>
+ <input type="text" name="videoUrl" autocomplete="off" value="" id="videoUrl" class="layui-input" readonly>
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-card-footer">
+ <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="index-video-setting-form-submit" id="submit">保存</button>
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
+<style>
+ .layui-form-label {
+ width: 120px;
+ }
+
+ .layui-form-item .layui-input-block {
+ margin-left: 150px;
+ }
+
+ .layui-table-form .layui-form-item {
+ margin-bottom: 20px !important;
+ }
+</style>
+<script data-th-inline="javascript" type="text/javascript">
+ layui.use(['dropdown', 'jquery', 'validate', 'febs', 'form', 'eleTree'], function () {
+ var $ = layui.jquery,
+ febs = layui.febs,
+ form = layui.form,
+ validate = layui.validate,
+ $view = $('#index-video-setting');
+
+ form.verify(validate);
+
+ // const client = new OSS({
+ // // yourRegion填写Bucket所在地域。以华东1(杭州)为例,yourRegion填写为oss-cn-hangzhou。
+ // region: "yourRegion",
+ // // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
+ // accessKeyId: "yourAccessKeyId",
+ // accessKeySecret: "yourAccessKeySecret",
+ // // 从STS服务获取的安全令牌(SecurityToken)。
+ // stsToken: "yourSecurityToken",
+ // // 填写Bucket名称。
+ // bucket: "examplebucket",
+ // });
+
+ form.render();
+
+
+ form.on('submit(index-video-setting-form-submit)', function (data) {
+ console.log(data);
+ febs.post(ctx + 'admin/news/addVideoInfo', data.field, function (res) {
+ if (res.code == 200) {
+ febs.alert.success(res.message);
+ } else {
+ febs.alert.warn(res.message);
+ }
+ });
+ // window.location.reload();
+ return false;
+ });
+
+ bindUpload();
+ function bindUpload() {
+ upload.render({
+ elem: '.upload'
+ ,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('上传失败');
+ }
+ });
+ }
+ });
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/system/index-video-setting.html b/src/main/resources/templates/febs/views/modules/system/index-video-setting.html
deleted file mode 100644
index 8794063..0000000
--- a/src/main/resources/templates/febs/views/modules/system/index-video-setting.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<div class="layui-fluid layui-anim febs-anim" id="index-video-setting" lay-title="首页视频设置">
- <div class="layui-row layui-col-space8 febs-container">
- <form class="layui-form" action="" lay-filter="index-video-setting-form">
- <div class="layui-card">
- <div class="layui-card-body">
- <div class="layui-form-item">
- <label class="layui-form-label ">视频链接:</label>
- <div class="layui-input-block">
- <input id="videoUrl" type="text" name="videoUrl" lay-verify="" autocomplete="off" class="layui-input" >
- </div>
- </div>
- </div>
-
- <div class="layui-card-footer">
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="index-video-setting-form-submit" id="submit">保存</button>
- </div>
- </div>
- </form>
- </div>
-</div>
-<style>
- .layui-form-label {
- width: 120px;
- }
-
- .layui-form-item .layui-input-block {
- margin-left: 150px;
- }
-
- .layui-table-form .layui-form-item {
- margin-bottom: 20px !important;
- }
-</style>
-<script data-th-inline="javascript" type="text/javascript">
- layui.use(['dropdown', 'jquery', 'validate', 'febs', 'form', 'eleTree'], function () {
- var $ = layui.jquery,
- febs = layui.febs,
- form = layui.form,
- agentAmountSet = [[${agentAmountSet}]],
- validate = layui.validate,
- $view = $('#index-video-setting');
-
- form.verify(validate);
-
- const client = new OSS({
- // yourRegion填写Bucket所在地域。以华东1(杭州)为例,yourRegion填写为oss-cn-hangzhou。
- region: "yourRegion",
- // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
- accessKeyId: "yourAccessKeyId",
- accessKeySecret: "yourAccessKeySecret",
- // 从STS服务获取的安全令牌(SecurityToken)。
- stsToken: "yourSecurityToken",
- // 填写Bucket名称。
- bucket: "examplebucket",
- });
-
- form.render();
-
-
- form.on('submit(index-video-setting-form-submit)', function (data) {
- console.log(data);
- febs.post(ctx + 'admin/system/agentAmountSetSetting', data.field, function (res) {
- if (res.code == 200) {
- febs.alert.success(res.message);
- } else {
- febs.alert.warn(res.message);
- }
- });
- // window.location.reload();
- return false;
- });
- });
-</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/system/indexVideo.html b/src/main/resources/templates/febs/views/modules/system/indexVideo.html
new file mode 100644
index 0000000..5c2ed1a
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/system/indexVideo.html
@@ -0,0 +1,95 @@
+<div class="layui-fluid layui-anim febs-anim" id="index-video-set" lay-title="充值设置">
+ <div class="layui-row layui-col-space8 febs-container">
+ <form class="layui-form" action="" lay-filter="index-video-set-form">
+ <div class="layui-card">
+ <div class="layui-card-body">
+ <div class="layui-form-item">
+ <label class="layui-form-label">视频:</label>
+ <div class="layui-input-block">
+ <button type="button" class="layui-btn upload" id="upload" style="background-color: #009688; margin-bottom: 2px">上传文件</button>
+ <input type="text" name="videoUrl" autocomplete="off" value="" id="videoUrl" class="layui-input" readonly>
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-card-footer">
+ <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="index-video-set-form-submit" id="submit">保存</button>
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
+<style>
+ .layui-form-label {
+ width: 120px;
+ }
+
+ .layui-form-item .layui-input-block {
+ margin-left: 150px;
+ }
+
+ .layui-table-form .layui-form-item {
+ margin-bottom: 20px !important;
+ }
+</style>
+<script data-th-inline="javascript" type="text/javascript">
+ layui.use(['dropdown', 'jquery', 'validate', 'febs', 'form', 'eleTree', 'upload'], function () {
+ var $ = layui.jquery,
+ febs = layui.febs,
+ form = layui.form,
+ indexVideoSet = [[${indexVideoSet}]],
+ validate = layui.validate,
+ upload = layui.upload,
+ $view = $('#index-video-set');
+
+ form.verify(validate);
+
+ initIndexVideoValue();
+
+ form.render();
+
+ function initIndexVideoValue() {
+ form.val("index-video-set-form", {
+ "videoUrl": indexVideoSet.videoUrl,
+ });
+ }
+
+ form.on('submit(index-video-set-form-submit)', function (data) {
+ console.log(data);
+ febs.post(ctx + 'admin/system/indexVideoSet', data.field, function (res) {
+ if (res.code == 200) {
+ febs.alert.success("操作成功");
+ } else {
+ febs.alert.warn(res.message);
+ }
+ });
+ return false;
+ });
+
+ bindUpload();
+ function bindUpload() {
+ upload.render({
+ elem: '.upload'
+ ,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('上传失败');
+ }
+ });
+ }
+ });
+</script>
\ No newline at end of file
--
Gitblit v1.9.1