Commit e4366a21 authored by 黄奎's avatar 黄奎

页面修改

parent 06ca7492
...@@ -137,11 +137,11 @@ export default { ...@@ -137,11 +137,11 @@ export default {
var index = filename.lastIndexOf("."); var index = filename.lastIndexOf(".");
var suffix = filename.substr(index); var suffix = filename.substr(index);
var timestamp1 = Date.parse(new Date()); var timestamp1 = Date.parse(new Date());
let str=''; let str = '';
if(this.isOnline()){ if (this.isOnline()) {
str="/Test" str = "/Test"
} }
var newFileName =str +'/Upload/' + path +"/"+ timestamp1 + "" + suffix; var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
var uploadMsg = { var uploadMsg = {
Bucket: "viitto-1301420277", Bucket: "viitto-1301420277",
Region: "ap-chengdu", Region: "ap-chengdu",
...@@ -164,9 +164,9 @@ export default { ...@@ -164,9 +164,9 @@ export default {
}, function (err, data) { }, function (err, data) {
if (data && data.statusCode == 200) { if (data && data.statusCode == 200) {
var uploadResult = { var uploadResult = {
resultCode:1, resultCode: 1,
FileName: fileObj.name, FileName: fileObj.name,
FileUrl: "http://"+data.Location FileUrl: "http://" + data.Location
} }
if (callback) { if (callback) {
callback(uploadResult); callback(uploadResult);
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
}); });
}, },
//公用跳转 //公用跳转
Vue.prototype.CommonJump = function(path,obj){ Vue.prototype.CommonJump = function (path, obj) {
this.$router.push({ this.$router.push({
name: path, name: path,
query: obj query: obj
...@@ -200,9 +200,13 @@ export default { ...@@ -200,9 +200,13 @@ export default {
} }
var token = ""; var token = "";
var key = ""; var key = "";
var MallBaseId = "0"; //小程序ID
var TenantId = "0"; //商户Id
if (this.getLocalStorage() != null) { if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token; token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey; key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
TenantId = this.getLocalStorage().TenantId;
} }
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
...@@ -221,6 +225,8 @@ export default { ...@@ -221,6 +225,8 @@ export default {
"sign": md5Str, "sign": md5Str,
"languageId": tempLanguage, "languageId": tempLanguage,
"cmd": cmd, "cmd": cmd,
"MallBaseId": MallBaseId,
"TenantId": TenantId
} }
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
headers: { headers: {
...@@ -240,7 +246,7 @@ export default { ...@@ -240,7 +246,7 @@ export default {
} }
}, faildCall) }, faildCall)
} }
Vue.prototype.JavaGetLocalFile = function(cmd, msg, fileName, successCall) { Vue.prototype.JavaGetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().JavaLocalFileStreamDownLoadUrl + cmd; var apiurl = this.domainManager().JavaLocalFileStreamDownLoadUrl + cmd;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
if (!localStorage.mall_userInfo && localStorage.mall_userInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.mall_userInfo && localStorage.mall_userInfo != "" && this.$route.path.toLowerCase() != "/login") {
...@@ -286,7 +292,7 @@ export default { ...@@ -286,7 +292,7 @@ export default {
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function(res) {}); }).catch(function (res) {});
} }
} }
} }
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