Commit 36428db0 authored by Damon's avatar Damon

从vuex获取token

parent b3be061b
; ;
(function() { (function() {
let NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境 let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境
let ENV_VAR = null; let ENV_VAR = null;
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') { if (NODE_ENV === 'dev') {
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
} }
} else if (process.env.NODE_ENV === "production") { } else if (process.env.NODE_ENV === "production") {
ENV_VAR = require('./.env.prod.js'); ENV_VAR = require('./.env.prod.js');
//ENV_VAR = require('./.env.test.js');
} }
if (ENV_VAR) { if (ENV_VAR) {
process.uniEnv = {}; process.uniEnv = {};
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
// if(e.standardId) { // if(e.standardId) {
// this.standardId = e.standardId // this.standardId = e.standardId
// } // }
this.token = getApp().globalData.token this.token = this.vuex_token
}, },
methods: { methods: {
// 保存照片到本地 // 保存照片到本地
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
// this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据 // this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据
this.loading = true this.loading = true
this.$u.api.getUserWatermark({ this.$u.api.getUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'system_id': this.systemId 'system_id': this.systemId
}).then(res => { }).then(res => {
if (res && res.result) { if (res && res.result) {
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
saveUserWatermark: function() { saveUserWatermark: function() {
this.loading = true this.loading = true
this.$u.api.saveUserWatermark({ this.$u.api.saveUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'watermark': this.result 'watermark': this.result
}).then(res => { }).then(res => {
if (res.result.code == true) { if (res.result.code == true) {
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
this.loading = true this.loading = true
let that = this let that = this
this.$u.cloudApi.getGroupStandardV2({ this.$u.cloudApi.getGroupStandardV2({
'token': getApp().globalData.token, 'token': this.vuex_token,
'classify_id': this.classifyId, 'classify_id': this.classifyId,
'system_id': this.systemId, 'system_id': this.systemId,
'brand_id': this.brandId 'brand_id': this.brandId
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
this.standardId = e.standardId this.standardId = e.standardId
} }
this.token = getApp().globalData.token this.token = this.vuex_token
}, },
methods: { methods: {
// 保存照片到本地 // 保存照片到本地
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
// this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据 // this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据
this.loading = true this.loading = true
this.$u.cloudApi.getUserWatermark({ this.$u.cloudApi.getUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'system_id': this.systemId 'system_id': this.systemId
}).then(res => { }).then(res => {
if (res && res.result) { if (res && res.result) {
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
saveUserWatermark: function() { saveUserWatermark: function() {
this.loading = true this.loading = true
this.$u.cloudApi.saveUserWatermark({ this.$u.cloudApi.saveUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'watermark': this.result 'watermark': this.result
}).then(res => { }).then(res => {
if (res.result.code == true) { if (res.result.code == true) {
......
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