Commit d9dbfb3b authored by 张锡奇's avatar 张锡奇

upload

parent 71209afb
......@@ -14,8 +14,8 @@ function urlFun(name){
*/
// default:`http://192.168.4.34:5001`,
// default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`,
default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
// default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
default:`https://weixin.huansi.net/apiproxy/huansi/Tip`,
/**
* 基本地址
*/
......
......@@ -14,7 +14,7 @@ Http.install = function (Vue) {
* @param toast 是否提示
* @returns {string}
*/
Vue.prototype.request = function (method, opts, toast,header) {
Vue.prototype.request = function (method, opts, toast,header={}) {
let m = methodMap[method];
if (m) {
let optsType = typeof (opts);
......@@ -53,7 +53,9 @@ Http.install = function (Vue) {
* @param toast 是否显示 modal
* @returns {Promise}
*/
Vue.prototype.apiPost = function (url, data, toast = false,header) {
Vue.prototype.apiPost = function (url, data, toast = false,header={}) {
!!store.state.iProjectId && (header.iProjectId = store.state.iProjectId);
for(let x in header){
AsInst.defaults.headers.common[x] = header[x];
}
......@@ -91,7 +93,9 @@ Http.install = function (Vue) {
* @param data 请求数据
* @returns {Promise}
*/
Vue.prototype.apiGet = function (url, data, toast = false,header) {
Vue.prototype.apiGet = function (url, data, toast = false,header={}) {
!!store.state.iProjectId && (header.iProjectId = store.state.iProjectId);
if (toast && typeof (toast) === 'boolean') {
loading();
} else if (toast && typeof (toast) === 'string') {
......
......@@ -66,8 +66,11 @@ FastClick.attach(document.body)
Vue.config.productionTip = false;
router.beforeEach((to, from, next) => {
if(to.path.indexOf('shopVersion') != -1 && to.params.hasOwnProperty('iProjectId')){
if(to.params.hasOwnProperty('iProjectId')){
store.dispatch('setIproject',to.params.iProjectId);
}else if(to.query.hasOwnProperty('iProjectId')){
console.log(to.query.iProjectId)
store.dispatch('setIproject',to.query.iProjectId);
}
if(to.name != 'tiipOperateDetail'){
store.dispatch("CAHNGE_META_INFO", {title:to.meta.title})
......
......@@ -157,6 +157,7 @@ import Util from '@/libs/util.js'
import customerTable from '@/components/Table'
import { mapState } from 'vuex'
import { XButton } from 'vux'
import host from '@/libs/host.js'
export default {
name: 'profitAnalysisTrack',
......@@ -216,6 +217,7 @@ export default {
},
async mounted(){
window.d = this;
console.log(host)
},
async activated(){
// window.removeEventListener("resize", this.renderResize, false)
......
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