记得上下班打卡 | git大法好,push需谨慎

Commit b7f2c1a8 authored by 张国柄's avatar 张国柄

后台页面调整;

parent a1b9924e
package com.liquidnet.client.admin.web.controller.zhengzai.candy; package com.liquidnet.client.admin.web.controller.zhengzai.candy;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.liquidnet.client.admin.common.annotation.Log; import com.liquidnet.client.admin.common.annotation.Log;
import com.liquidnet.client.admin.common.core.controller.BaseController; import com.liquidnet.client.admin.common.core.controller.BaseController;
...@@ -8,6 +9,7 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult; ...@@ -8,6 +9,7 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo; import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.common.enums.BusinessType; import com.liquidnet.client.admin.common.enums.BusinessType;
import com.liquidnet.client.admin.common.utils.ShiroUtils; import com.liquidnet.client.admin.common.utils.ShiroUtils;
import com.liquidnet.client.admin.zhengzai.candy.service.ICandyCouponAdminService;
import com.liquidnet.client.admin.zhengzai.candy.service.ICandyCouponRuleAdminService; import com.liquidnet.client.admin.zhengzai.candy.service.ICandyCouponRuleAdminService;
import com.liquidnet.client.admin.zhengzai.candy.service.ICandyMgtCouponAdminService; import com.liquidnet.client.admin.zhengzai.candy.service.ICandyMgtCouponAdminService;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl; import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl;
...@@ -15,13 +17,16 @@ import com.liquidnet.service.candy.dto.admin.CandyCouponRuleBuildParam; ...@@ -15,13 +17,16 @@ import com.liquidnet.service.candy.dto.admin.CandyCouponRuleBuildParam;
import com.liquidnet.service.candy.dto.admin.CandyMgtCouponBuildParam; import com.liquidnet.service.candy.dto.admin.CandyMgtCouponBuildParam;
import com.liquidnet.service.candy.dto.admin.CandyMgtCouponInfoDto; import com.liquidnet.service.candy.dto.admin.CandyMgtCouponInfoDto;
import com.liquidnet.service.candy.dto.admin.CandyMgtCouponListParam; import com.liquidnet.service.candy.dto.admin.CandyMgtCouponListParam;
import com.liquidnet.service.candy.entity.CandyCoupon;
import com.liquidnet.service.candy.entity.CandyCouponRule; import com.liquidnet.service.candy.entity.CandyCouponRule;
import com.liquidnet.service.candy.entity.CandyMgtCoupon;
import com.liquidnet.service.kylin.dao.PerformanceSimpleAllDao; import com.liquidnet.service.kylin.dao.PerformanceSimpleAllDao;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -29,6 +34,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -29,6 +34,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -37,9 +43,15 @@ import java.util.List; ...@@ -37,9 +43,15 @@ import java.util.List;
@RequestMapping("candy/coupon/mgt") @RequestMapping("candy/coupon/mgt")
public class CandyMgtCouponAdminController extends BaseController { public class CandyMgtCouponAdminController extends BaseController {
private final String prefix = "zhengzai/candy/coupon/mgt"; private final String prefix = "zhengzai/candy/coupon/mgt";
@Value("${liquidnet.client.admin.phpMallUrl}")
private String phpMallUrl;
@Autowired @Autowired
private ICandyMgtCouponAdminService candyMgtCouponAdminService; private ICandyMgtCouponAdminService candyMgtCouponAdminService;
@Autowired @Autowired
private ICandyCouponAdminService candyCouponAdminService;
@Autowired
private ICandyCouponRuleAdminService candyCouponRuleAdminService; private ICandyCouponRuleAdminService candyCouponRuleAdminService;
@Autowired @Autowired
private KylinPerformancesAdminServiceImpl kylinPerformancesService; private KylinPerformancesAdminServiceImpl kylinPerformancesService;
...@@ -135,8 +147,56 @@ public class CandyMgtCouponAdminController extends BaseController { ...@@ -135,8 +147,56 @@ public class CandyMgtCouponAdminController extends BaseController {
return prefix + "/detail" + couType; return prefix + "/detail" + couType;
} }
@RequiresPermissions("candy:coupon:mgt:cancel")
@GetMapping("cancel/{mcouponId}")
@ResponseBody
public AjaxResult cancel(@PathVariable("mcouponId") String mcouponId) {
LambdaQueryWrapper<CandyMgtCoupon> mgtCouponLambdaQueryWrapper = Wrappers.lambdaQuery(CandyMgtCoupon.class);
mgtCouponLambdaQueryWrapper.eq(CandyMgtCoupon::getMcouponId, mcouponId);
CandyMgtCoupon mgtCoupon = candyMgtCouponAdminService.getOne(mgtCouponLambdaQueryWrapper);
if (null == mgtCoupon) {
return AjaxResult.warn(String.format("券记录不存在【%s】", mcouponId));
}
if (mgtCoupon.getState() == 1) {
return AjaxResult.warn("券记录已完成发放");
}
if (mgtCoupon.getState() == 9) {
return AjaxResult.warn("券记录已开始发放");
}
if (mgtCoupon.getState() != 0) {
return AjaxResult.warn("券记录不可取消");
}
LocalDateTime now = LocalDateTime.now();
String loginName = ShiroUtils.getLoginName();
LambdaUpdateWrapper<CandyMgtCoupon> mgtCouponLambdaUpdateWrapper = Wrappers.lambdaUpdate(CandyMgtCoupon.class);
mgtCouponLambdaUpdateWrapper.eq(CandyMgtCoupon::getMcouponId, mcouponId);
mgtCouponLambdaUpdateWrapper.eq(CandyMgtCoupon::getState, 0);
mgtCouponLambdaUpdateWrapper.set(CandyMgtCoupon::getState, 3);
mgtCouponLambdaUpdateWrapper.set(CandyMgtCoupon::getUpdatedAt, now);
mgtCouponLambdaUpdateWrapper.set(CandyMgtCoupon::getOperator, loginName);
boolean updateMgtCouponFlg = candyMgtCouponAdminService.update(mgtCouponLambdaUpdateWrapper);
if (!updateMgtCouponFlg) {
return AjaxResult.warn("券记录取消失败,已发放或正在发放中");
}
LambdaUpdateWrapper<CandyCoupon> couponLambdaUpdateWrapper = Wrappers.lambdaUpdate(CandyCoupon.class);
couponLambdaUpdateWrapper.eq(CandyCoupon::getCouponId, mgtCoupon.getCouponId());
couponLambdaUpdateWrapper.set(CandyCoupon::getState, 2);
couponLambdaUpdateWrapper.set(CandyCoupon::getUpdatedAt, now);
couponLambdaUpdateWrapper.set(CandyCoupon::getOperator, loginName);
candyCouponAdminService.update(couponLambdaUpdateWrapper);
LambdaUpdateWrapper<CandyCouponRule> couponRuleLambdaUpdateWrapper = Wrappers.lambdaUpdate(CandyCouponRule.class);
couponRuleLambdaUpdateWrapper.eq(CandyCouponRule::getCouponId, mgtCoupon.getCouponId());
couponRuleLambdaUpdateWrapper.set(CandyCouponRule::getState, 2);
candyCouponRuleAdminService.update(couponRuleLambdaUpdateWrapper);
return toAjax(updateMgtCouponFlg);
}
@GetMapping("add/{couType}") @GetMapping("add/{couType}")
public String add(@PathVariable("couType") String couType) { public String add(@PathVariable("couType") String couType, ModelMap mmap) {
mmap.put("phpMallUrl", phpMallUrl);
return prefix + "/add" + couType; return prefix + "/add" + couType;
} }
......
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增代金券')" />
<th:block th:include="include :: select2-css" />
<link rel="stylesheet" href="">
<style>
.layui-form {
padding: 20px;
}
.main_title, .main_type, .money, .scope_application, .sendType,.phoneNumber,.playMethod {
margin-bottom: 20px;
}
.scope_application,.sendType,.phoneNumber,#test1,.playMethod {
display: none;
}
#test1 {
display: none;
}
.labelName {
display: inline-block;
width: 100px;
text-align: right;
}
input {
border: 1px solid #ddd;
border-radius: 4px;
background: transparent;
outline: none;
padding-left: 5px;
height: 30px;
}
.main_title input {
width: 200px;
}
.prompt {
margin-left: 100px !important;
}
.main_type input, .sendType input,.playMethod input {
margin-top: -2px;
margin-right: 5px;
}
.main_type span, .sendType span, .playMethod span {
margin-right: 12px;
line-height: 28px;
}
.layui-form .money input {
width: 60px;
}
.changeData .dataOne {
margin-bottom: 20px;
}
.changeData .dataOne p {
margin: 12px 0 0 20px;
color: #ccc;
}
.changeData .dataOne input {
width: 60px;
}
.main_bottom .describe, .main_bottom .sendTime {
margin-bottom: 20px;
}
.describe,.main_type {
display: flex;
}
.describe textarea,.phoneNumber textarea {
width: 400px;
}
.sendTime {
display: flex;
}
.sendTime input {
margin-top: -6px;
margin-right: 5px;
}
.bottom_btn {
width: 25%;
text-align: center;
}
select {
border: 1px solid #ddd;
border-radius: 4px;
background: transparent;
outline: none;
height: 30px;
width: 200px;
}
.search_ipt ul,.search_ipt li{
padding: 0;
margin: 0;
font-style: normal;
list-style: none;
}
.search_ipt ul {
display: none;
position: absolute;
left: 0;
top: 26px;
padding: 5px 0;
z-index: 899;
min-width: 200px;
border: 1px solid #eee;
max-height: 300px;
overflow-y: auto;
background-color: #fff;
border-radius: 2px;
box-sizing: border-box;
box-shadow: 1px 1px 4px rgb(0 0 0 / 8%);
}
.search_ipt li {
background-color: #fff;
cursor: pointer;
padding-left: 10px!important;
color: #999;
padding: 0 10px;
line-height: 36px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.search_ipt li:hover {
background: #F6F6F6;
}
.search_ipt .layui-input {
width: 200px;
}
#test1 {
display: none;
}
.required {
font-style: normal;
color: red;
}
#iptModal {
display: none;
}
</style>
</head>
<body>
<form id="form-user-add" class="layui-form">
<div class="main_title">
<span class="labelName"><i class="required">*</i>名称:</span><input type="text" id="title" name="keyword" placeholder="券名称" required />
</div>
<div class="main_type">
<span class="labelName">类别:</span>
<div class="layui-input-block" style="display: flex">
<input type="radio" value="0" class="typeOne" name="typeOne" checked><span>全场</span>
<input type="radio" value="1" class="typeOne" name="typeOne"><span>演出</span>
<input type="radio" value="2" class="typeOne" name="typeOne"><span>商品</span>
<input type="radio" value="3" class="typeOne" name="typeOne"><span>优先购</span>
</div>
</div>
<div class="money">
<span class="labelName"><i class="required">*</i>金额:</span><input type="text" id="valFace" required />
</div>
<div class="main_type">
<span class="labelName">类型:</span>
<div class="layui-input-block" style="display: flex">
<input type="radio" value="0" class="typeTwo" name="typeTwo" checked><span>用户输入兑换</span>
<input type="radio" value="1" class="typeTwo" name="typeTwo"><span>发送至“我的券”</span>
</div>
</div>
<div class="scope_application" id="scope_application">
<span class="labelName">适用范围:</span>
<div class="search_ipt" style="position: relative;display: inline;">
<input type="text" id="searchIpt" autocomplete="off" class="layui-input" placeholder="全部">
<ul id="dataList" style="position: absolute;"></ul>
</div>
<select name="bindType" id="selectTwo">
<option value="">所有</option>
</select>
<select name="bindType" id="selectThree">
<option value="">所有</option>
</select>
</div>
<div class="changeData">
<div id="modalOne">
<div class="dataOne">
<span class="labelName"><i class="required">*</i>数量:</span>
<input type="text" id="num" required />
</div>
<div class="dataOne">
<span class="labelName"><i class="required">*</i>券的有效期:</span>
<input type="text" id="ticketTime" required />
<p class="prompt">*可兑换的时间</p>
</div>
<div class="dataOne" id="exchange">
<span class="labelName"><i class="required">*</i>兑换有效期:</span>
<input type="text" id="exchangeTime" required />
<p class="prompt">*兑换后的有效时间</p>
</div>
</div>
</div>
<div class="sendType">
<div style="display: flex;align-items: center;">
<span class="labelName">发送类型:</span>
<div class="layui-input-block" style="display: flex">
<input type="radio" value="10" class="sendType" name="sendType" checked><span>全体用户</span>
<input type="radio" value="1" class="sendType" name="sendType"><span>会员</span>
<input type="radio" value="2" class="sendType" name="sendType"><span>手机号</span>
</div>
</div>
</div>
<div class="phoneNumber">
<span style="display:inline-block;margin-bottom: 12px;"><i class="required">*</i>请输入手机号<span style="color: #ccc">(手机号可填多个,使用","隔开)</span></span>
<textarea id="phoneNum" class="form-control" rows="4" style="margin-left: 100px"></textarea>
</div>
<div class="main_bottom">
<div class="describe">
<span class="labelName">
描述说明:
</span>
<textarea id="describeTxt" class="form-control" rows="4"></textarea>
</div>
<div class="playMethod">
<div style="display: flex;align-items: center;">
<span class="labelName">使用限制:</span>
<div class="layui-input-block" style="display: flex">
<input type="radio" value="1" class="playMethod" name="playMethod" checked><span>叠加</span>
<input type="radio" value="0" class="playMethod" name="playMethod"><span>限制</span>
</div>
</div>
</div>
<div class="sendTime">
<span class="labelName">发送时间:</span>
<div class="layui-input-block" style="display: flex">
<input type="radio" name="sex" value="1" title="立即" checked><span>立即</span>
<span style="margin-right:12px;" id="iptModal"><p style="display:flex"><input type="radio" name="sex" value="2" title="预约" style="margin-left: 12px;">预约</p></span>
</div>
<input type="text" class="layui-input" id="test1" placeholder="请选择时间">
</div>
<div class="bottom_btn">
<!-- <button type="button" class="layui-btn btn btn-primary" lay-filter="formDemo" onclick="create()">创建代金券</button> -->
<button type="button" class="btn btn-primary" onclick="create()">创建代金券</button>
</div>
</div>
</form>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-suggest-js"/>
</body>
<script>
var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", "");
let prefix = ctx;
let typeOne = '0'; // 类别
let typeTwo = '0'; // 类型
let sendType = '10'; // 发送类型
let searchVal = ''; // 输入框内数据
let searchData = []; // 搜索总数据
let showId = ''; // 选中演出id
let selectTwoId = ''; // 选中演出下级的ID
let selectTwoName = ''; // 选中演出下级的名称
let selectThreeId = ''; // 选中演出三级的ID
let selectThreeName = ''; // 选中演出三级的名称
let sendTimeType = '';
let playMethod = '1'; // 叠加/限制
function search() {
let data = {
status: '(3,6)',
title: searchVal
}
let str = '';
promiseMethods(ctx+'kylin/base/performance/status','get',data,'application/x-www-form-urlencoded').then(res=>{
if (res.value.length>0) {
searchData = res.value;
searchData.forEach((item,index)=>{
str+= `<li class="selectData" onclick="selectOne(${item.performancesId},'${item.title}')">${item.title}</li>`
})
$('#dataList').html(str);
} else {
$('#dataList').html('<li style="width:100%;text-align:center;color:#ccc;">--- 暂无数据 ---</li>');
}
})
};
function getMallList() {
let data = {
title: ''
}
let str = '';
promiseMethods('http://testmall.zhengzai.tv/admin/goodListForQuick','get',data,'application/x-www-form-urlencoded').then(res=>{
if (res.data.length>0) {
searchData = res.data;
searchData.forEach((item,index)=>{
str+= `<li class="selectData" onclick="selectOne(${item.id},'${item.title}')">${item.title}</li>`
})
$('#dataList').html(str);
} else {
$('#dataList').html('<li style="width:100%;text-align:center;color:#ccc;">--- 暂无数据 ---</li>');
}
})
// $.ajax({
// type:'get',
// url:'http://testmall.zhengzai.tv/admin/goodListForQuick',
// success:function(e){
// console.log(e)
// }
// });
};
function selectOne(id,name) {
$("#searchIpt").val(name);
showId = id;
if (typeOne == 2) {
return
}
let str = `<option value="0" label="">所有</option>`;
searchData.forEach(item=>{
if (item.performancesId == id) {
str+= `<option value=${item.timeId} label=${item.timeTitle}>${item.timeTitle}</option>`
}
})
selectTwoId = ''; // 选中演出下级的ID
selectThreeId = ''; // 选中演出三级的ID
$('#selectTwo').empty().append(str);
$('#selectThree').empty();
};
$("#searchIpt").focus(function(){
if (typeOne == 2) {
getMallList()
} else {
console.log('search')
search()
}
$('#dataList').show()
});
$("#searchIpt").blur(function(){
setTimeout(() => {
$('#dataList').hide()
}, 500);
});
$("#searchIpt").keyup(function(){
searchVal = $("#searchIpt").val()
search()
});
$('#selectTwo').change(function(e){
selectTwoId = $(this).val();
console.log(selectTwoId,'kankna')
selectTwoName = $('#selectTwo').find('option:selected').attr('label');
let str = `<option value="0" label="" >所有</option>`;
searchData.forEach(item=>{
if (item.timeId == selectTwoId) {
str+= `<option value=${item.ticketId} label=${item.ticketTitle}>${item.ticketTitle}</option>`
}
})
selectThreeId = ''; // 选中演出三级的ID
$('#selectThree').empty().append(str);
});
$('#selectThree').change(function(e){
selectThreeId = $(this).val();
selectThreeName = $('#selectThree').find('option:selected').attr('label');
});
$("input[name=typeOne]").change(function(e){
typeOne = e.target.value;
if (typeOne != 0) {
showId = ''; // 选中演出id
selectTwoId = ''; // 选中演出下级的ID
selectThreeId = ''; // 选中演出三级的ID
$('#scope_application').show();
} else {
$('#searchIpt').val('');
$('#selectTwo').empty();
$('#selectThree').empty('');
$('#scope_application').hide();
}
if (typeOne == 2 || typeOne == 3) {
showId = '';
$('#selectTwo').val('');
$('#selectThree').val('');
$('#selectTwo').hide();
$('#selectThree').hide();
$('#searchIpt').val('');
$('#selectTwo').empty();
$('#selectThree').empty();
$('#dataList').empty();
} else {
$('#selectTwo').show();
$('#selectThree').show();
$('#selectTwo').empty();
$('#selectThree').empty();
$('#dataList').empty();
}
if (typeOne == 3) {
$('.playMethod').show()
} else {
$('.playMethod').hide()
}
});
$("input[name=typeTwo]").change(function(e){
typeTwo = e.target.value;
if (typeTwo == 1) {
$('#iptModal').show();
$('.sendType').show();
$('#exchangeTime').val('')
$('#exchange').hide();
if (sendType == 2) {
$('.phoneNumber').show();
}
} else {
$('#iptModal').hide();
$('#exchange').show();
$('.sendType').hide();
$('.phoneNumber').hide();
$('.test1').val('');
$('.phoneNum').val('');
$('.test1').hide();
}
});
$("input[name=sendType]").change(function(e){
sendType = e.target.value;
if (e.target.value == 2) {
$('.phoneNumber').show();
$('.test1').show();
} else {
$('.phoneNumber').hide();
$('.test1').val('');
$('.test1').hide();
}
});
$("input[name=sex]").change(function(e){
sendTimeType = e.target.value;
if (sendTimeType == 2) {
$('#test1').show();
} else {
$('#test1').val('')
$('#test1').hide();
}
});
$("input[name=playMethod]").change(function(e){
playMethod = e.target.value;
});
layui.use('laydate', function(){
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#test1', //指定元素
type: 'datetime'
});
});
function create() {
if (!$('#valFace').val() || !$('#title').val() || !$('#num').val() || !$('#ticketTime').val()) {
return layer.msg('请将必填项输入完整~!');
if (typeTwo != 1) {
if (!$('#exchangeTime').val()) {
return layer.msg('请将必填项输入完整~!');
}
}
}
let useScope = 100;
let busiName = '';
let busiId = '';
if (!$('#searchIpt').val()) {
showId = '';
}
if (showId) {
useScope = 90;
}
if (selectTwoId) {
useScope = 91;
busiId = selectTwoId;
busiName = selectTwoName;
}
if (selectThreeId) {
useScope = 92;
busiId = selectThreeId;
busiName = selectThreeName;
}
if (typeOne == 2) {
if (showId) {
useScope = 80;
busiId = showId;
}
busiName = $("#searchIpt").val();
}
if (typeOne == 3) {
if (showId) {
useScope = 90;
busiId = showId;
}
busiName = $("#searchIpt").val();
}
let data = {
"bindType": Number(typeTwo), // 兑换券/发放
"busiType": Number(typeOne), // 业务类别
"couType": 1, // 券类型
"couponRuleList": [ // 适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]
{
"useScope": useScope,
"busiName": busiName,
"busiId": busiId
}
],
"discount": '', // 折扣券需传
"eventAmt": Number($('#num').val()), // 数量
"eventAt": $('#test1').val() || $.common.dateFormat(new Date(), 'yyyy-MM-dd HH:mm:ss'),
"eventLimit": $('#phoneNum').val(), // 手机号
"eventType": Number(sendType),
"label": "标注", // 不需管
"notice": $('#describeTxt').val(),
"overlay": playMethod, // 优先购ticketTime
"redeemValidity": Number($('#exchangeTime').val()), // 兑换有效期
"title": $('#title').val(),
"valFace": $('#valFace').val(), // 金额
"validity": Number($('#ticketTime').val()),
}
if (typeTwo == 1) {
delete data.redeemValidity
} else {
delete data.eventType
}
if (typeOne == 0 || typeOne == 1 || typeOne == 2) {
delete data.discount;
delete data.overlay;
}
if (sendType != 2) {
delete data.eventLimit;
}
console.log(data,'data')
promiseMethods('/candy/coupon/mgt/add','post',JSON.stringify(data),'application/json').then(res=>{
console.log(res)
})
}
function promiseMethods(url,type,data,contentType) {
return new Promise((resolve,reject)=>{
$.ajax({
url,
type,
data,
contentType,
success:function(res) {
resolve(res)
}
})
})
}
</script>
</html>
...@@ -247,7 +247,8 @@ ...@@ -247,7 +247,8 @@
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-suggest-js"/> <th:block th:include="include :: bootstrap-suggest-js"/>
</body> </body>
<script> <script th:inline="javascript">
var phpMallUrl = [[${phpMallUrl}]];
var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", ""); var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", "");
let prefix = ctx; let prefix = ctx;
let typeOne = '0'; // 类别 let typeOne = '0'; // 类别
...@@ -285,7 +286,7 @@ ...@@ -285,7 +286,7 @@
title: '' title: ''
} }
let str = ''; let str = '';
promiseMethods('http://testmall.zhengzai.tv/admin/goodListForQuick','get',data,'application/x-www-form-urlencoded').then(res=>{ promiseMethods(phpMallUrl + '/admin/goodListForQuick','get',data,'application/x-www-form-urlencoded').then(res=>{
if (res.data.length>0) { if (res.data.length>0) {
searchData = res.data; searchData = res.data;
searchData.forEach((item,index)=>{ searchData.forEach((item,index)=>{
...@@ -298,7 +299,7 @@ ...@@ -298,7 +299,7 @@
}) })
// $.ajax({ // $.ajax({
// type:'get', // type:'get',
// url:'http://testmall.zhengzai.tv/admin/goodListForQuick', // url:phpMallUrl + '/admin/goodListForQuick',
// success:function(e){ // success:function(e){
// console.log(e) // console.log(e)
// } // }
......
...@@ -250,7 +250,8 @@ ...@@ -250,7 +250,8 @@
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-suggest-js"/> <th:block th:include="include :: bootstrap-suggest-js"/>
</body> </body>
<script> <script th:inline="javascript">
var phpMallUrl = [[${phpMallUrl}]];
var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", ""); var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", "");
let prefix = ctx; let prefix = ctx;
let typeOne = '0'; // 类别 let typeOne = '0'; // 类别
...@@ -288,7 +289,7 @@ ...@@ -288,7 +289,7 @@
title: '' title: ''
} }
let str = ''; let str = '';
promiseMethods('http://testmall.zhengzai.tv/admin/goodListForQuick','get',data,'application/x-www-form-urlencoded').then(res=>{ promiseMethods(phpMallUrl + '/admin/goodListForQuick','get',data,'application/x-www-form-urlencoded').then(res=>{
if (res.data.length>0) { if (res.data.length>0) {
searchData = res.data; searchData = res.data;
searchData.forEach((item,index)=>{ searchData.forEach((item,index)=>{
...@@ -301,7 +302,7 @@ ...@@ -301,7 +302,7 @@
}) })
// $.ajax({ // $.ajax({
// type:'get', // type:'get',
// url:'http://testmall.zhengzai.tv/admin/goodListForQuick', // url:phpMallUrl + '/admin/goodListForQuick',
// success:function(e){ // success:function(e){
// console.log(e) // console.log(e)
// } // }
......
...@@ -199,7 +199,8 @@ ...@@ -199,7 +199,8 @@
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-suggest-js"/> <th:block th:include="include :: bootstrap-suggest-js"/>
</body> </body>
<script> <script th:inline="javascript">
var phpMallUrl = [[${phpMallUrl}]];
var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", ""); var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", "");
let prefix = ctx; let prefix = ctx;
let searchVal = ''; // 输入框内数据 let searchVal = ''; // 输入框内数据
......
...@@ -223,7 +223,8 @@ ...@@ -223,7 +223,8 @@
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-suggest-js"/> <th:block th:include="include :: bootstrap-suggest-js"/>
</body> </body>
<script> <script th:inline="javascript">
var phpMallUrl = [[${phpMallUrl}]];
var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", ""); var roadShowId = '[[${roadShowId}]]'.replaceAll("\"", "");
let prefix = ctx; let prefix = ctx;
let typeOne = '2'; // 类别 let typeOne = '2'; // 类别
...@@ -238,7 +239,7 @@ ...@@ -238,7 +239,7 @@
title: '' title: ''
} }
let str = ''; let str = '';
promiseMethods('http://testmall.zhengzai.tv/admin/goodListForQuick','get',data,'application/x-www-form-urlencoded').then(res=>{ promiseMethods(phpMallUrl + 'admin/goodListForQuick','get',data,'application/x-www-form-urlencoded').then(res=>{
if (res.data.length>0) { if (res.data.length>0) {
searchData = res.data; searchData = res.data;
searchData.forEach((item,index)=>{ searchData.forEach((item,index)=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment