Commit 3881a267 by huaying

fix: 积分老数据兼容修改

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