Commit a6818df2 authored by youjie's avatar youjie

Merge branch 'master' of http://gitlab.oytour.com/viitto/million

parents d0836562 ed8cfdad
......@@ -9,48 +9,39 @@ import message from './message'
import product from './product'
import VueViewer from 'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player'
import 'animate.css';
// import 'animate.css';
// 或者只引入需要的动画类
import 'animate.css/source/attention_seekers/bounce.css';
// import 'animate.css/source/attention_seekers/bounce.css';
Vue.prototype.$EventBus = new Vue()
Vue.use(VueCoreVideoPlayer)
Vue.use(VueViewer)
Vue.prototype.$md5 = md5;
Vue.prototype.$message = message
Vue.prototype.$product = product
//域名管理对象
Vue.prototype.domainManager = function() {
let domainUrl = '';
domainUrl = "http://192.168.2.214:8082";
domainUrl = "http://192.168.5.46";
// domainUrl = "http://reborn.oytour.com";
let domainNameUrl = '';
domainNameUrl = this.GetDomain();
// domainNameUrl = "http://tmb2b.oytour.com/"
domainNameUrl = window.location.hostname
if (domainNameUrl.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com";
} else if (domainNameUrl.indexOf('oytour') !== -1) {
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = "http://192.168.5.214";
let domainNameUrl = this.GetDomain();
if (domainNameUrl.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com";
// domainUrl = 'http://192.168.10.68' //'http://192.168.10.226:8015' ''http://192.168.10.9:8083' '
}
//domainUrl = "http://192.168.5.46:8501";
var obj = {
//主地址
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
javaUrl: 'http://efficient.oytour.com'
};
return obj;
}
//获取当前域名
Vue.prototype.GetDomain = function() {
}
//获取当前域名
Vue.prototype.GetDomain = function () {
var domainNameUrl = window.location.hostname;
domainNameUrl = "www.oytour.com";
return domainNameUrl;
}
Vue.prototype.groupBy = function(array, f) {
Vue.prototype.groupBy = function (array, f) {
const groups = {};
array.forEach((item) => {
const group = JSON.stringify(f(item));
......@@ -64,7 +55,7 @@ Vue.prototype.groupBy = function(array, f) {
};
});
}
Vue.prototype.moneyFormat = function(num, decimal = 2, split = ',') {
Vue.prototype.moneyFormat = function (num, decimal = 2, split = ',') {
function thousandFormat(num) {
const len = num.length
return len <= 3 ? num : thousandFormat(num.substr(0, len - 3)) + split + num.substr(len - 3, 3)
......@@ -88,9 +79,9 @@ Vue.prototype.moneyFormat = function(num, decimal = 2, split = ',') {
} else {
return '--'
}
}
//HTTP提交数据
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
}
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -128,10 +119,12 @@ Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
}
})
.then(res => {
if(res.data.resultCode === 10000) {
if (res.data.resultCode === 10000) {
this.$router.replace({
path: '/login',
query: {path: path}
query: {
path: path
}
});
return
}
......@@ -140,7 +133,7 @@ Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
}, faildCall)
}
Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -181,7 +174,7 @@ Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
//获取缓存
Vue.prototype.getLocalStorage = function() {
Vue.prototype.getLocalStorage = function () {
try {
var localStorageData = window.localStorage["b2bUser"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
......@@ -196,7 +189,7 @@ Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
}
//向外跳转
Vue.prototype.OpenNewUrl = function(URL) {
Vue.prototype.OpenNewUrl = function (URL) {
if (URL && URL != '') {
if (URL.indexOf("https") != -1) {
var str = 'http://' + URL.substring(8);
......@@ -211,8 +204,8 @@ Vue.prototype.OpenNewUrl = function(URL) {
}
//公用跳转
Vue.prototype.CommonJump = function(path, obj, type = 'push') {
let p = typeof(path) == 'string' ? path : this.$product.genernalUrl(path)
Vue.prototype.CommonJump = function (path, obj, type = 'push') {
let p = typeof (path) == 'string' ? path : this.$product.genernalUrl(path)
if (type === 'blank') { // 新窗口打开
let routeUrl = this.$router.resolve({
path: p,
......@@ -232,7 +225,7 @@ Vue.prototype.CommonJump = function(path, obj, type = 'push') {
}
}
Vue.prototype.$user = user
Vue.prototype.createCalendar = function(dateStr) {
Vue.prototype.createCalendar = function (dateStr) {
var days = [];
var date;
if (dateStr) {
......@@ -285,9 +278,9 @@ Vue.prototype.createCalendar = function(dateStr) {
CurrentYear: currentYear,
CurrentWeek: currentWeek
};
}
//格式化日期
Vue.prototype.formatDate = function(year, month, day) {
}
//格式化日期
Vue.prototype.formatDate = function (year, month, day) {
var y = year;
var m = month;
if (m < 10) m = "0" + m;
......@@ -297,7 +290,7 @@ Vue.prototype.formatDate = function(year, month, day) {
}
//格式化日期二
Vue.prototype.formatDate2 = function(dateStr) {
Vue.prototype.formatDate2 = function (dateStr) {
var date = new Date(dateStr);
return {
CYear: date.getFullYear(),
......@@ -307,7 +300,7 @@ Vue.prototype.formatDate2 = function(dateStr) {
}
//添加月份
Vue.prototype.AddMonth = function(dateStr, month) {
Vue.prototype.AddMonth = function (dateStr, month) {
var v = new Date(dateStr);
if (v) {
var t = new Date(v.getFullYear(), v.getMonth(), v.getDate(), v.getHours(), v.getMinutes(), v.getSeconds(), v.getMilliseconds());
......@@ -320,10 +313,10 @@ Vue.prototype.AddMonth = function(dateStr, month) {
}
//获取URL中参数
Vue.prototype.getUrlKey = function(name, url) {
Vue.prototype.getUrlKey = function (name, url) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null
}
Vue.prototype.GetHtml = function(str) {
Vue.prototype.GetHtml = function (str) {
if (str && str != "") {
return str.replace(/&lt;/g, '<').replace(/&gt;/g, '>')
.replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&apos;/g, "'");
......
......@@ -565,8 +565,11 @@ export default {
},
created() {
this.msg = this.qMsg;
// this.msg.teamType = [];
//this.initAreaList();
if(this.qMsg&&this.qMsg.TeamType==1)
{
this.msg.TeamType=1;
}
this.initGoods();
this.msg.priceRange = {
min: 1,
......
This diff is collapsed.
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