Commit 840fda65 authored by 罗超's avatar 罗超

2

parent 90da70f1
......@@ -1334,8 +1334,8 @@
if (this.$route.query.FxState) {
this.FxState = this.$route.query.FxState;
}
this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
this.addMsg.IsKorea = this.currentUserInfo.IsKorea;
// this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
this.addMsg.IsKorea = 0;
this.getService();
this.getRule();
this.getSpeciList();
......@@ -1374,7 +1374,7 @@
});
}
let CategoryIds = arr.join(",");
this.apipost(
this.i_post(
"/api/user/GetHpDistributorGoodsInfo", {
CategoryIds: CategoryIds,
CostPrice: "10"
......@@ -1444,7 +1444,7 @@
Name: "",
Enabled: 1
};
this.apipost("/api/user/GetMemberGradeList", msg, res => {
this.i_post("/api/user/GetMemberGradeList", msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
let pageData = res.data.data;
......@@ -1841,7 +1841,7 @@
});
},
Save(formName) {
this.addMsg.IsKorea = this.currentUserInfo.IsKorea;
this.addMsg.IsKorea = 0;
this.$refs[formName].validate(valid => {
if (valid) {
let content = this.$refs.ue.getUEContent();
......@@ -1928,8 +1928,8 @@
this.addMsg.MarketingLogo.wordsBack = '';
}
this.addMsg.EmpId = this.currentUserInfo.EmpId
this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => {
this.addMsg.EmpId = 0
this.i_post("/api/product/SetProductGoodsInfo", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.back()
......@@ -1950,7 +1950,7 @@
Id: 0,
Content: ""
};
this.apipost("/api/product/GetProductSpecificationPageList", msg, res => {
this.i_post("/api/product/GetProductSpecificationPageList", msg, res => {
if (res.data.resultCode == 1) {
let pageData = res.data.data.pageData;
this.speciList = pageData;
......@@ -2131,7 +2131,7 @@
IsShow: 1,
CategoryPageType: this.addMsg.GoodsPageType
};
this.apipost("/api/product/GetProductCategoryTreeList", msg1, res => {
this.i_post("/api/product/GetProductCategoryTreeList", msg1, res => {
if (res.data.resultCode == 1) {
let pageData = res.data.data;
this.fenleiData = pageData;
......@@ -2153,7 +2153,7 @@
},
getData() {
this.apipost(
this.i_post(
"/api/product/GetProductGoodsInfo", {
GoodsId: this.GoodsId
},
......@@ -2234,7 +2234,7 @@
CategoryIds: CategoryIds,
CostPrice: this.addMsg.CostPrice
};
this.apipost("/api/user/GetHpGoodsSuggestPrice", msg, res => {
this.i_post("/api/user/GetHpGoodsSuggestPrice", msg, res => {
if (res.data.resultCode == 1) {
this.SuggestPriceInfo = res.data.data;
}
......@@ -2247,7 +2247,7 @@
pageSize: 999,
RulesName: ""
};
this.apipost("/api/MallBase/GetLogisticsRulesPage", msg1, res => {
this.i_post("/api/MallBase/GetLogisticsRulesPage", msg1, res => {
if (res.data.resultCode == 1) {
let pageData = res.data.data.pageData;
this.ruleList = pageData;
......@@ -2261,7 +2261,7 @@
Name: "",
IsDefault: 0
};
this.apipost("/api/product/GetProductServicePageList", msg, res => {
this.i_post("/api/product/GetProductServicePageList", msg, res => {
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
......@@ -2271,7 +2271,7 @@
},
getDistributor() {
this.loading = true;
this.apipost("/api/user/GetDistributorBasicsInfo", {}, res => {
this.i_post("/api/user/GetDistributorBasicsInfo", {}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.butorInt = res.data.data.DistributorTier;
......@@ -2293,7 +2293,7 @@
Name: "",
Enabled: 1
};
this.apipost("/api/user/GetDistributorGradeDropdownList", msg, res => {
this.i_post("/api/user/GetDistributorGradeDropdownList", msg, res => {
this.DropdownList = JSON.parse(JSON.stringify(res.data.data));
let msg = {
Grade: 0,
......@@ -2361,7 +2361,7 @@
},
changeSupplier(val) {},
getSupplierList() {
this.apipost("/api/Supplier/GetSupplierAllList", {}, res => {
this.i_post("/api/Supplier/GetSupplierAllList", {}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.options = res.data.data;
......@@ -2369,7 +2369,7 @@
});
},
getFXDGradeList() {
this.apipost("/api/user/GetFXDistributorGradeList", {
this.i_post("/api/user/GetFXDistributorGradeList", {
GradeName: ''
}, res => {
this.loading = false;
......@@ -2392,11 +2392,10 @@
},
getFXDGradeList2() {
this.apipost("/api/user/GetFXDistributorGradeList", {
this.i_post("/api/user/GetFXDistributorGradeList", {
GradeName: ''
}, res => {
if (res.data.resultCode == 1) {
if (res.data.data != null) {
res.data.data.forEach(x => {
if (x.Id == this.addMsg.PresentFXGrade) {
......@@ -2434,7 +2433,7 @@
},
//获取上架版面下拉
getCateList() {
this.apipost("/api/Product/GoodsPageTypeEnumList", {}, res => {
this.i_post("/api/Product/GoodsPageTypeEnumList", {}, res => {
if (res.data.resultCode == 1) {
this.My_cateList = res.data.data;
} else {
......
This diff is collapsed.
......@@ -54,10 +54,9 @@ export default {
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = '';
let domainUrl = "http://192.168.10.02:8088";
// let domainUrl = "https://mallapi.oytour.com";
let javaUrl = 'http://192.168.10.214:8018';
domainUrl = "https://localhost:5001"
let vtUploadUrl = "http://192.168.10.214:8120";
let vtViewUrl = "http://192.168.10.214:8130";
......@@ -332,6 +331,8 @@ export default {
}
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, "");
this.$http.post(apiurl, postData, {
......@@ -373,7 +374,7 @@ export default {
var TenantId = "0"; //商户Id
var EmpId = 0; //员工编号【员工登录时使用】
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
token = this.getLocalStorage().Token ;
key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
TenantId = this.getLocalStorage().TenantId;
......@@ -575,6 +576,61 @@ export default {
query: queryObj
});
window.open(newUrl.href, '_blank');
},
// iframe-甲鹤 提交数据
Vue.prototype.i_post = function (cmd, msg, successCall, faildCall,) {
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.Get_i_Data(cmd, msg, "");
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
}, faildCall)
}
Vue.prototype.Get_i_Data = function (cmd, msg, newCmd) {
if (msg == null || msg == "") {
msg = {}
}
var timestamp = (new Date()).valueOf();
let apiData = JSON.parse(localStorage.getItem('iframeData'))
console.log(608,apiData)
var token = apiData.token;
var key = "";
var TenantId = "0"; //商户Id
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var cmdStr = "";
if (newCmd) {
cmdStr = newCmd;
}
var postData = {
msg: msg,
timestamp: timestamp,
token: token,
sign: md5Str,
languageId: 0,
cmd: cmdStr,
MallBaseId: 5,
TenantId: TenantId,
EmpId: 0,//员工编号【员工登录时使用】
SmallShopsId: 0,
MiniAppId: "wxbb033190e0ffa5db",
OpenId: "ow_7I5cKHQJeQlNJOKoeERRhe6SA",
UserId: 21382,
}
return postData
}
}
}
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