Commit 3881a267 by huaying

fix: 积分老数据兼容修改

parent 4d996a3c
module.exports = { module.exports = {
proxyList: { proxyList: {
'/api-auth/': { '/api-auth/': {
target: 'http://gicdev.demogic.com/api-auth/', target: 'http://www.gicdev.com/api-auth/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api-auth': '' '^/api-auth': ''
} }
}, },
'/api-admin/': { '/api-admin/': {
target: 'http://gicdev.demogic.com/api-admin/', target: 'http://www.gicdev.com/api-admin/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api-admin': '' '^/api-admin': ''
} }
}, },
'/api-plug/': { '/api-plug/': {
target: 'http://gicdev.demogic.com/api-plug/', target: 'http://www.gicdev.com/api-plug/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api-plug': '' '^/api-plug': ''
} }
}, },
'/api-mall/': { '/api-mall/': {
target: 'http://gicdev.demogic.com/api-mall/', target: 'http://www.gicdev.com/api-mall/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api-mall': '' '^/api-mall': ''
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
(function() { (function() {
var src = '/component/static/import-component.js?timestrap='+ new Date().getTime(); var src = '/component/static/import-component.js?timestrap='+ new Date().getTime();
var host = window.location.host; var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'gicdev.demogic.com' : host; host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'www.gicdev.com' : host;
document.write('<script src="//'+ host + src +'"><\/script>') document.write('<script src="//'+ host + src +'"><\/script>')
})() })()
</script> </script>
......
...@@ -5,7 +5,7 @@ import { Message } from 'element-ui'; ...@@ -5,7 +5,7 @@ import { Message } from 'element-ui';
// Vue.axios.defaults.timeout = 30000; // Vue.axios.defaults.timeout = 30000;
var local = window.location.origin; var local = window.location.origin;
if (local.indexOf('localhost') != -1) { if (local.indexOf('localhost') != -1) {
local = 'http://gicdev.demogic.com'; local = 'http://www.gicdev.com';
} }
Vue.axios.interceptors.request.use( Vue.axios.interceptors.request.use(
config => { config => {
......
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
errorMsg: function(response) { errorMsg: function(response) {
var local = window.location.origin; var local = window.location.origin;
if (local.indexOf('localhost') != -1) { if (local.indexOf('localhost') != -1) {
local = 'http://gicdev.demogic.com'; local = 'http://www.gicdev.com';
} }
if (response.errorCode != 0) { if (response.errorCode != 0) {
if (response.errorCode == 401) { if (response.errorCode == 401) {
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
var config = window.location.origin; // 获取域名和协议 var config = window.location.origin; // 获取域名和协议
// eslint-disable-next-line // eslint-disable-next-line
module.exports = { module.exports = {
// config: 'http://gicdev.demogic.com', // config: 'http://www.gicdev.com',
config config
}; };
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
integralScript: '', //说明 integralScript: '', //说明
integralGetStatus: '0', //积分获得开启(0:否,1:是) integralGetStatus: '0', //积分获得开启(0:否,1:是)
integralUseStatus: '0', //积分使用开启(0:否,1:是) integralUseStatus: '0', //积分使用开启(0:否,1:是)
effectiveTime: '', //积分有效期 effectiveTime: '0', //积分有效期
integralGetDiscountControl: '2', integralGetDiscountControl: '2',
integralGetDiscountControlUpper: undefined, // 折扣控制 折扣范围 下限 integralGetDiscountControlUpper: undefined, // 折扣控制 折扣范围 下限
integralGetDiscountControlLower: undefined, // 折扣控制 折扣范围 上限 integralGetDiscountControlLower: undefined, // 折扣控制 折扣范围 上限
...@@ -259,7 +259,7 @@ export default { ...@@ -259,7 +259,7 @@ export default {
integralUseDiscountControlLower: undefined, integralUseDiscountControlLower: undefined,
useProportionalRestriction: '90', //抵现比例限制 useProportionalRestriction: '90', //抵现比例限制
integralCost: { fee: undefined, integral: undefined }, //积分成本 integralCost: { fee: undefined, integral: undefined }, //积分成本
integralExpireType: '', //积分有效期类型 0 未默认滚动到期 1永久 2 按年失效 3按月失效 integralExpireType: '0', //积分有效期类型 0 未默认滚动到期 1永久 2 按年失效 3按月失效
integralExpireRule: '', //积分有效期规则 年 x(年),x(月),x(日,为0标识月末) 月,x(月),x(日,为0标识月末) integralExpireRule: '', //积分有效期规则 年 x(年),x(月),x(日,为0标识月末) 月,x(月),x(日,为0标识月末)
}, },
rules: { rules: {
...@@ -621,12 +621,11 @@ export default { ...@@ -621,12 +621,11 @@ export default {
postRequest('/api-admin/get-member-integral-setting',param) postRequest('/api-admin/get-member-integral-setting',param)
.then((res) => { .then((res) => {
var resData = res.data var resData = res.data
console.log(resData, 'ppp'); // console.log(resData, 'ppp');
if (resData.errorCode == 0) { if (resData.errorCode == 0) {
// that.pointInfo = that.handleData(resData.result.memberIntegral) // that.pointInfo = that.handleData(resData.result.memberIntegral)
that.ruleForm = that.handleData(resData.result.memberIntegral); that.ruleForm = that.handleData(resData.result.memberIntegral);
that.ruleForm.integralExpireRule = that.ruleForm.integralExpireRule ? that.ruleForm.integralExpireRule.split(',') : '';
that.ruleForm.integralExpireRule = that.ruleForm.integralExpireRule.split(',')
if(this.ruleForm.integralGetStatus == 0) { if(this.ruleForm.integralGetStatus == 0) {
this.ruleForm.integralGet.fee = undefined; this.ruleForm.integralGet.fee = undefined;
this.ruleForm.integralGet.integral = undefined; this.ruleForm.integralGet.integral = undefined;
...@@ -650,8 +649,8 @@ export default { ...@@ -650,8 +649,8 @@ export default {
this.ruleForm.integralUseDiscountControlLower = undefined; this.ruleForm.integralUseDiscountControlLower = undefined;
this.ruleForm.integralUseDiscountControlUpper = undefined this.ruleForm.integralUseDiscountControlUpper = undefined
} }
if(this.ruleForm.integralExpireType == null){ if(this.ruleForm.integralExpireType == 'null'){
this.ruleForm.integralExpireType = 1; this.ruleForm.integralExpireType = '0';
}else if(that.ruleForm.integralExpireType == 2) { }else if(that.ruleForm.integralExpireType == 2) {
this.yearY = Number(this.ruleForm.integralExpireRule[0]); this.yearY = Number(this.ruleForm.integralExpireRule[0]);
this.yearM = Number(this.ruleForm.integralExpireRule[1]); this.yearM = Number(this.ruleForm.integralExpireRule[1]);
......
...@@ -355,7 +355,7 @@ export default { ...@@ -355,7 +355,7 @@ export default {
postRequest('/api-admin/download-clique-settlement', para).then(res => { postRequest('/api-admin/download-clique-settlement', para).then(res => {
let config = window.location.origin; // 获取域名和协议 let config = window.location.origin; // 获取域名和协议
if (config.indexOf('localhost') > -1) { if (config.indexOf('localhost') > -1) {
config = 'http://gicdev.demogic.com'; config = 'http://www.gicdev.com';
} }
window.location.href = config + '/api-admin/download-clique-settlement?requestProject=' + this.repProjectName; window.location.href = config + '/api-admin/download-clique-settlement?requestProject=' + this.repProjectName;
}); });
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
let host = window.location.origin; let host = window.location.origin;
log('当前host:', host); log('当前host:', host);
if (host.indexOf('localhost') != '-1') { if (host.indexOf('localhost') != '-1') {
that.baseUrl = 'http://gicdev.demogic.com'; that.baseUrl = 'http://www.gicdev.com';
} else { } else {
that.baseUrl = host; that.baseUrl = host;
} }
......
...@@ -457,7 +457,7 @@ export default { ...@@ -457,7 +457,7 @@ export default {
yearDT: '', //按年失效 日 yearDT: '', //按年失效 日
mouthMT: '', //按月失效 月 mouthMT: '', //按月失效 月
mouthDT: '', //按月失效 月 mouthDT: '', //按月失效 月
effectiveDays: undefined, effectiveDays: '',
timeType: -1, timeType: -1,
timeRuleType: '', timeRuleType: '',
dayList: dayList(), dayList: dayList(),
...@@ -802,7 +802,7 @@ export default { ...@@ -802,7 +802,7 @@ export default {
var resData = res.data var resData = res.data
if(resData.errorCode == 0) { if(resData.errorCode == 0) {
this.timeType = resData.result.memberIntegral.integralExpireType; this.timeType = resData.result.memberIntegral.integralExpireType;
this.timeRuleType = resData.result.memberIntegral.integralExpireRule.split(','); this.timeRuleType = resData.result.memberIntegral.integralExpireRule ? resData.result.memberIntegral.integralExpireRule.split(',') : '';
if(this.timeType ==2) { if(this.timeType ==2) {
this.yearYT = Number(this.timeRuleType[0]) this.yearYT = Number(this.timeRuleType[0])
this.yearMT = Number(this.timeRuleType[1]) this.yearMT = Number(this.timeRuleType[1])
...@@ -811,7 +811,7 @@ export default { ...@@ -811,7 +811,7 @@ export default {
this.mouthMT = Number(this.timeRuleType[0]) this.mouthMT = Number(this.timeRuleType[0])
this.mouthDT = Number(this.timeRuleType[1]) this.mouthDT = Number(this.timeRuleType[1])
} else if (this.timeType == 0 || this.timeType == null) { } else if (this.timeType == 0 || this.timeType == null) {
this.effectiveDays = resData.result.memberIntegral.effectiveTime; this.effectiveDays = resData.result.memberIntegral.integralGetEffectiveDays;
} }
} }
}) })
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
let host = window.location.origin; let host = window.location.origin;
log('当前host:', host); log('当前host:', host);
if (host.indexOf('localhost') != '-1') { if (host.indexOf('localhost') != '-1') {
that.baseUrl = 'http://gicdev.demogic.com'; that.baseUrl = 'http://www.gicdev.com';
} else { } else {
that.baseUrl = host; that.baseUrl = host;
} }
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
let baseUrl; let baseUrl;
log('当前host:', host); log('当前host:', host);
if (host.indexOf('localhost') != '-1') { if (host.indexOf('localhost') != '-1') {
baseUrl = 'http://gicdev.demogic.com'; baseUrl = 'http://www.gicdev.com';
} else { } else {
baseUrl = host; baseUrl = host;
} }
......
...@@ -658,7 +658,7 @@ export default { ...@@ -658,7 +658,7 @@ export default {
yearDT: '', //按年失效 日 yearDT: '', //按年失效 日
mouthMT: '', //按月失效 月 mouthMT: '', //按月失效 月
mouthDT: '', //按月失效 月 mouthDT: '', //按月失效 月
effectiveDays: undefined, effectiveDays: '',
timeType: '', timeType: '',
timeRuleType: '', timeRuleType: '',
dayList: dayList(), dayList: dayList(),
...@@ -904,7 +904,7 @@ export default { ...@@ -904,7 +904,7 @@ export default {
this.mouthMT = Number(this.timeRuleType[0]) this.mouthMT = Number(this.timeRuleType[0])
this.mouthDT = Number(this.timeRuleType[1]) this.mouthDT = Number(this.timeRuleType[1])
} else if (this.timeType == 0 || this.timeType == null) { } else if (this.timeType == 0 || this.timeType == null) {
this.effectiveDays = resData.result.memberIntegral.effectiveTime; this.effectiveDays = resData.result.memberIntegral.integralGetEffectiveDays;
} }
} }
}) })
...@@ -1528,14 +1528,10 @@ export default { ...@@ -1528,14 +1528,10 @@ export default {
// 积分有效期 // 积分有效期
// 当有效期类型为null时判断有效期天数是否为null 不为null 有效期类型为0 为null 无选中状态 // 当有效期类型为null时判断有效期天数是否为null 不为null 有效期类型为0 为null 无选中状态
if(that.ruleForm.integralExpireType==null) { if(that.ruleForm.integralExpireType==null) {
if(that.ruleForm.integralGetEffectiveDays != null) { this.ruleForm.integralExpireType = 0;
this.ruleForm.integralExpireType = 0;
}else {
this.ruleForm.integralExpireType = -1;
}
} }
// 积分有效期 // 积分有效期
that.ruleForm.integralExpireRule = that.ruleForm.integralExpireRule.split(',') that.ruleForm.integralExpireRule = that.ruleForm.integralExpireRule ? that.ruleForm.integralExpireRule.split(',') : '';
if(that.ruleForm.userGeneralIntegralExpireRule==0){ if(that.ruleForm.userGeneralIntegralExpireRule==0){
// 当有效期类型为null时判断有效期天数是否为null 不为null 有效期类型为0 为null 无选中状态 // 当有效期类型为null时判断有效期天数是否为null 不为null 有效期类型为0 为null 无选中状态
if(that.ruleForm.integralExpireType==null) { if(that.ruleForm.integralExpireType==null) {
......
...@@ -474,7 +474,7 @@ export default { ...@@ -474,7 +474,7 @@ export default {
parentId: 'tb-cid-11' parentId: 'tb-cid-11'
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/list_mall_goods_category', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/list_mall_goods_category', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -539,7 +539,7 @@ export default { ...@@ -539,7 +539,7 @@ export default {
let that = this; let that = this;
let para = {}; let para = {};
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/list_mall_goods_tag_tree', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/list_mall_goods_tag_tree', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -641,7 +641,7 @@ export default { ...@@ -641,7 +641,7 @@ export default {
parentId: parentId parentId: parentId
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/list_mall_goods_category', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/list_mall_goods_category', qs.stringify(para))
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 0) { if (resData.errorCode == 0) {
...@@ -784,7 +784,7 @@ export default { ...@@ -784,7 +784,7 @@ export default {
// that.total = 50; // that.total = 50;
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/page-mall-goods', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/page-mall-goods', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -954,7 +954,7 @@ export default { ...@@ -954,7 +954,7 @@ export default {
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-plug/list-link-data', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-plug/list-link-data', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -1036,7 +1036,7 @@ export default { ...@@ -1036,7 +1036,7 @@ export default {
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-plug/query-store-by-code-name', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-plug/query-store-by-code-name', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -1074,7 +1074,7 @@ export default { ...@@ -1074,7 +1074,7 @@ export default {
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-auth/do-login', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-auth/do-login', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
that.getLinksList(0, 1); that.getLinksList(0, 1);
......
...@@ -463,7 +463,7 @@ export default { ...@@ -463,7 +463,7 @@ export default {
parentId: 'tb-cid-11' parentId: 'tb-cid-11'
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/list_mall_goods_category', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/list_mall_goods_category', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -528,7 +528,7 @@ export default { ...@@ -528,7 +528,7 @@ export default {
let that = this; let that = this;
let para = {}; let para = {};
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/list_mall_goods_tag_tree', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/list_mall_goods_tag_tree', qs.stringify(para))
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 0) { if (resData.errorCode == 0) {
...@@ -602,7 +602,7 @@ export default { ...@@ -602,7 +602,7 @@ export default {
parentId: parentId parentId: parentId
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/list_mall_goods_category', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/list_mall_goods_category', qs.stringify(para))
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 0) { if (resData.errorCode == 0) {
...@@ -738,7 +738,7 @@ export default { ...@@ -738,7 +738,7 @@ export default {
// that.total = 50; // that.total = 50;
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-mall/page-mall-goods', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-mall/page-mall-goods', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -907,7 +907,7 @@ export default { ...@@ -907,7 +907,7 @@ export default {
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-plug/list-link-data', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-plug/list-link-data', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -989,7 +989,7 @@ export default { ...@@ -989,7 +989,7 @@ export default {
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-plug/query-store-by-code-name', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-plug/query-store-by-code-name', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
let resData = res.data; let resData = res.data;
...@@ -1027,7 +1027,7 @@ export default { ...@@ -1027,7 +1027,7 @@ export default {
}; };
that.axios that.axios
.post('http://gicdev.demogic.com:9310/api-auth/do-login', qs.stringify(para)) .post('http://www.gicdev.com:9310/api-auth/do-login', qs.stringify(para))
.then(res => { .then(res => {
log(res, res.data, res.data.errorCode); log(res, res.data, res.data.errorCode);
that.getLinksList(0, 1); that.getLinksList(0, 1);
......
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