Commit bba84161 authored by 华国豪's avatar 华国豪 🙄

1

parent a4da44bb
......@@ -46,7 +46,7 @@
<el-row :gutter="17">
<el-col :span="4" v-for='(item,index) in tehuis' :key="index" v-if='index<6'>
<div class="team-item" :style="{'height':`${itemHeight}`}" @click="goUrl('detail',item.id,item)">
<img class="notamin" v-if='item.imgCover!=null&&item.imgCover.length' :src="`${JSON.parse(item.imgCover)[0].Url}`" />
<img class="notamin" v-if='item.imgCover!=null&&item.imgCover.length' :src='compressImg(JSON.parse(item.imgCover)[0].Url, "filt", 245, "")' />
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<div class="info-box">
<div class="item-title">{{item.ltName}}</div>
......@@ -61,7 +61,7 @@
<el-row :gutter="17">
<el-col :span="4" v-for='(item,index) in tehuis' :key="index" v-if='index>5'>
<div class="team-item" :style="{'height':`${itemHeight}`}" @click="goUrl('detail',item.id,item)">
<img v-if="item.imgCover!=null&&item.imgCover.length" :src="`${JSON.parse(item.imgCover)[0].Url}`" />
<img v-if="item.imgCover!=null&&item.imgCover.length" :src='compressImg(JSON.parse(item.imgCover)[0].Url, "filt", 245, "")' />
<div class="info-box">
<div class="item-title">{{item.ltName}}</div>
<div>
......@@ -81,7 +81,7 @@
<el-row :gutter="17">
<el-col :span="4" v-for="(item,index) in tiaoshui" :key="index">
<div class="team-item noradius" :style="{'height':`${itemHeight}`}" @click="goUrl('detail',item.id, item)">
<img class="notamin" v-if='item.imgCover!=null&&item.imgCover.length' :src="`${JSON.parse(item.imgCover)[0].Url}`" />
<img class="notamin" v-if='item.imgCover!=null&&item.imgCover.length' :src='compressImg(JSON.parse(item.imgCover)[0].Url, "filt", 245, "")' />
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<!-- <div class="seat" :style="{'left':`${(w-100)/2}px`,'top':`${(h-100)/2}px`}">
仅于<span class="cnt">3</span>
......@@ -142,7 +142,7 @@
<el-col :span="6" v-for='(data,index) in item.pageData' :key="index" >
<div class="group-item" :style="{'height':`${groupHeight}px`}" @click="goUrl('detail',data.id,data)">
<div class="team-item noradius" :style="{'height':`${groupItemHeight}`}">
<img class="notamin" v-if='data.imgCover!=null&&data.imgCover.length' :src="`${JSON.parse(data.imgCover)[0].Url}`"/>
<img class="notamin" v-if='data.imgCover!=null&&data.imgCover.length' :src='compressImg(JSON.parse(data.imgCover)[0].Url, "filt", 245, "")'/>
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<!-- <div class="seat" :style="{'left':`${(w-100)/2}px`,'top':`${(h-100)/2}px`}">
仅于<span class="cnt">3</span>
......
......@@ -286,11 +286,11 @@ export default {
this.$router.push({ path:'/login?type=1',query:{path:this.$route.name,id:encodeURIComponent(this.$route.params.id)} })
},
outGetTripDate(tripDate){
console.log(tripDate)
this.chosenObj.startDate=tripDate
this.changeStartDate()
},
changeStartDate(t){
//console.log(this.chosenObj.startDate)
if(this.chosenObj.startDate&&this.chosenObj.startDate!=''){
this.priceList.forEach(x=>{
if(x.startDate==this.chosenObj.startDate){
......
......@@ -6,11 +6,11 @@ export default {
apiurl: ''
},
install(Vue, options) {
Vue.prototype.isOnline = function() {
Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development';
},
//域名管理对象
Vue.prototype.domainManager = function() {
Vue.prototype.domainManager = function () {
// var domainUrl = "http://test_reborn.oytour.com";//主域名
//var domainUrl = "http://reborn.oytour.com"; //主域名
// var domainUrl = "http://192.168.2.16:8083"//主域名
......@@ -18,11 +18,12 @@ export default {
// let domainUrl = "https://reborn.oytour.com"; //刘东主域名
// let domainUrl = "https://reborn.oytour.com";
var domainUrl = "http://test.viitto.com"
domainUrl = "http://192.168.2.214:8082"
let locationName = window.location.hostname;
if (this.isOnline()) {
if(window.location.host.indexOf('viitto.com')!=-1)
if (window.location.host.indexOf('viitto.com') != -1)
domainUrl = "http://test.viitto.com"
else if(window.location.host.indexOf('oytour.com')!=-1)
else if (window.location.host.indexOf('oytour.com') != -1)
domainUrl = "https://reborn.oytour.com"
}
var obj = {
......@@ -31,8 +32,9 @@ export default {
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
// javaUrl: "http://192.168.2.16:9000",
javaUrl: "http://47.96.12.235:9001",//测试接口
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto')!==-1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130',
javaUrl: "http://47.96.12.235:9001", //测试接口
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130',
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.2.214:8120",
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
};
return obj;
......@@ -76,7 +78,7 @@ export default {
}).catch(function (res) {});
},
//消息成功提示
Vue.prototype.Success = function(msg) {
Vue.prototype.Success = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -84,7 +86,7 @@ export default {
});
},
//错误提示
Vue.prototype.Error = function(msg) {
Vue.prototype.Error = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -93,7 +95,7 @@ export default {
},
//一般提示
Vue.prototype.Info = function(msg) {
Vue.prototype.Info = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -101,7 +103,7 @@ export default {
});
},
//警告提示
Vue.prototype.Warning = function(msg) {
Vue.prototype.Warning = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -109,7 +111,7 @@ export default {
});
},
//Confirm
Vue.prototype.Confirm = function(msg, callback) {
Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -124,13 +126,30 @@ export default {
this.Info("已取消操作");
});
},
//压缩图片
//path : 图片路径
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue.prototype.compressImg = function (path, type, w, h) {
let url = this.domainManager().UploadUrl;
let poise = 'm_filt';
w = w ? w : ''
h = h ? h : ''
if (type === 'w') {
poise = 'm_w'
} else if (type === 'h') {
poise = 'm_h'
}
return url + '/image/index?filePath=' + path.replace('http://192.168.2.214:8130', '').replace('http://imgfile.oytour.com', '').split('?')[0] + '&process=resize,' + poise + ',w_' + w + ',h_' + h;
}
//打开新窗口连接
Vue.prototype.OpenNewUrl = function(URL) {
Vue.prototype.OpenNewUrl = function (URL) {
if (URL != '') {
window.open('http://' + URL, '_blank');
}
}
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -154,7 +173,7 @@ export default {
"token": token,
"sign": md5Str
}
if(localStorage.g && localStorage.g!='undefined'){
if (localStorage.g && localStorage.g != 'undefined') {
postData.groupId = parseInt(JSON.parse(localStorage.g).i)
}
this.$http.post(apiurl, postData, {
......@@ -175,7 +194,7 @@ export default {
}
}, faildCall)
},
Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -199,7 +218,7 @@ export default {
"sign": md5Str,
"uid": uid
}
if(localStorage.g && localStorage.g!='undefined'){
if (localStorage.g && localStorage.g != 'undefined') {
postData.groupId = parseInt(JSON.parse(localStorage.g).i)
}
this.$http.post(apiurl, postData, {
......@@ -222,7 +241,7 @@ export default {
},
//验证只能输入2位小数
Vue.prototype.checkPrice = function(item, filed) {
Vue.prototype.checkPrice = function (item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
......@@ -243,7 +262,7 @@ export default {
item[filed] = value;
}
//验证只能输入整数
Vue.prototype.checkInteger = function(item, filed) {
Vue.prototype.checkInteger = function (item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
......
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