Commit ae89bd60 authored by 华国豪's avatar 华国豪 🙄
parents cbc3bea0 a6e4d558
...@@ -651,12 +651,9 @@ ...@@ -651,12 +651,9 @@
let UploadUrl = this.domainManager().UploadUrl let UploadUrl = this.domainManager().UploadUrl
let _this = this let _this = this
if (this.showType >= 4) { // 判断是否为行程特色 if (this.showType >= 4) { // 判断是否为行程特色
$.ajax({ //调用是否已经存在文件夹接口判断是否进行上传图片操作 var apiurl = this.domainManager().UploadUrl + '/Upload/GetImage?filePath=Feature/' + tcid;
url: UploadUrl + '/Upload/GetImage?filePath=Feature/' + tcid, this.$http.post(apiurl).then(res => {
type: "POST", let msg = res
datatype: "jsonP",
success: function (data) {
let msg = JSON.parse(data)
if (msg.ResultCode) { // 已经存在文件 直接调用下载 if (msg.ResultCode) { // 已经存在文件 直接调用下载
_this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum +
'日游', isPc) '日游', isPc)
...@@ -696,6 +693,12 @@ ...@@ -696,6 +693,12 @@
context.imageSmoothingEnabled = false context.imageSmoothingEnabled = false
var image = new Image(); var image = new Image();
image.src = canvas.toDataURL("image/png"); image.src = canvas.toDataURL("image/png");
// this.uploadImg(tcid,{myfile: image.src,fileIndex: index},res=>{
// console.log(res)
// },err=>{
// console.log(err)
// })
// return
$.ajax({ $.ajax({
url: UploadUrl + url: UploadUrl +
'/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Feature/' + tcid, '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Feature/' + tcid,
...@@ -726,11 +729,8 @@ ...@@ -726,11 +729,8 @@
_this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum +
'日游', isPc) '日游', isPc)
} }
}, }, null)
error: function () { return
// console.log("上传失败");
}
});
} else { } else {
this.ToWord(this.orderMsg.startDate + this.orderMsg.lineteamName + this.orderMsg.dayNum + '日游', isPc) this.ToWord(this.orderMsg.startDate + this.orderMsg.lineteamName + this.orderMsg.dayNum + '日游', isPc)
} }
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
let newUrl = url.substring(url.indexOf("=")+1); let newUrl = url.substring(url.indexOf("=")+1);
return newUrl; return newUrl;
} }
import axios from "axios";
export default { export default {
name: "signature", name: "signature",
data(){ data(){
......
...@@ -116,13 +116,6 @@ export default { ...@@ -116,13 +116,6 @@ export default {
let domainUrl = ''; let domainUrl = '';
let locationName = window.location.hostname; let locationName = window.location.hostname;
domainUrl = "http://127.0.0.1"; //214主域名 domainUrl = "http://127.0.0.1"; //214主域名
// 127.0.0.12
// domainUrl = "http://192.168.2.88"; //王悦主域名
// domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.16:8083"; //王悦主域名
// domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.65:8025"; //吴春主域名
// domainUrl = "http://192.168.2.106:8082"; //罗超主域名
if (locationName.indexOf('oytour')!==-1) { if (locationName.indexOf('oytour')!==-1) {
domainUrl = "https://reborn.oytour.com"; domainUrl = "https://reborn.oytour.com";
}else if (locationName.indexOf('viitto')!==-1) { }else if (locationName.indexOf('viitto')!==-1) {
...@@ -150,9 +143,9 @@ export default { ...@@ -150,9 +143,9 @@ export default {
//google地图图片地址 //google地图图片地址
GoogleMapImageUrl: "http://super.oytour.com", GoogleMapImageUrl: "http://super.oytour.com",
//上传站点 //上传站点
UploadUrl: locationName.indexOf('oytour') !== -1||locationName.indexOf('viitto')!==-1 ? "http://upload.oytour.com" : "http://192.168.2.214:8120", UploadUrl: locationName.indexOf('oytour') !== -1||locationName.indexOf('viitto')!==-1 ? "http://upload.oytour.com" : "http://127.0.0.1:8120",
//文件站点 //文件站点
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto')!==-1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130' ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto')!==-1 ? "http://imgfile.oytour.com" : 'http://127.0.0.1:8130'
}; };
return obj; return obj;
}, },
...@@ -215,17 +208,33 @@ export default { ...@@ -215,17 +208,33 @@ export default {
//打开新窗口连接 //打开新窗口连接
Vue.prototype.OpenNewUrl = function (URL) { Vue.prototype.OpenNewUrl = function (URL) {
if (URL != '') { if (URL != '') {
window.open('http://' + URL, '_blank'); if(URL.indexOf("https")!=-1){
var str='http://' + URL.substring(8);
window.open(str, '_blank');
}else if(URL.indexOf("http")!=-1)
{
var str='http://' + URL.substring(7);
window.open(str, '_blank');
}
else
{
window.open("http://"+URL, '_blank');
}
} }
} }
Vue.prototype.uploadImg = function (tcID, msg, successCall, faildCall) { Vue.prototype.uploadImg = function (tcID, msg, successCall, faildCall) {
var apiurl = this.domainManager().Upload + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/TCID' + tcID; var apiurl = this.domainManager().UploadUrl + '/Upload/UploadBase64Two?fileType=1&fileLimit=5&&filePath=Freature/' + tcID;
this.$http.post(apiurl, msg, { console.log("msg",msg);
datatype:"jsonP",
}).then(res => { this.$http.post(apiurl,{FileIndex:msg.FileIndex,MyFile:msg.MyFile},{
successCall(res); headers: {
}, faildCall) "Content-Type": "application/x-www-form-urlencoded;"
},
}).then(function(res){
console.log(res)
})
} }
//HTTP提交数据 //HTTP提交数据
......
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