|
|
@ -1,6 +1,7 @@ |
|
|
// pages/stock/index.js
|
|
|
// pages/stock/index.js
|
|
|
import Dialog from '../../../components/dialog/dialog' |
|
|
import Dialog from '../../../components/dialog/dialog' |
|
|
import { finalizeToken } from "../../../api/user" |
|
|
import { finalizeToken } from "../../../api/user" |
|
|
|
|
|
import { getBaseInfo } from "../../../api/saas" |
|
|
const util = require('../../../utils/util') |
|
|
const util = require('../../../utils/util') |
|
|
const event = require('../../../utils/event') |
|
|
const event = require('../../../utils/event') |
|
|
const storage = require('../../../utils/storage') |
|
|
const storage = require('../../../utils/storage') |
|
|
@ -39,14 +40,13 @@ Component({ |
|
|
onEvent: function (message) { |
|
|
onEvent: function (message) { |
|
|
if (message.what == 82) { |
|
|
if (message.what == 82) { |
|
|
// 认证成功
|
|
|
// 认证成功
|
|
|
} else if (message.what == 888) { |
|
|
|
|
|
this.setData({creditInfo: { availableCreditLine: 0, creditLine: 0, usedCreditLine: 0.00 }}) |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
setUserInfo: function(){ |
|
|
setUserInfo: function(){ |
|
|
if(!app.userInfo){ |
|
|
if(!app.userInfo){ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var nickname = '' |
|
|
var nickname = '' |
|
|
if(app.userInfo.isAuth) { |
|
|
if(app.userInfo.isAuth) { |
|
|
nickname = app.userInfo.realName.substring(0, 14) |
|
|
nickname = app.userInfo.realName.substring(0, 14) |
|
|
@ -74,7 +74,7 @@ Component({ |
|
|
wx.navigateTo({ url: '/pages/mall/order-list/index' }) |
|
|
wx.navigateTo({ url: '/pages/mall/order-list/index' }) |
|
|
}, |
|
|
}, |
|
|
loginOut: function () { |
|
|
loginOut: function () { |
|
|
Dialog.confirm({ title: '温馨提示', message: '确定退出云印通账号?' }).then(() => { |
|
|
|
|
|
|
|
|
Dialog.confirm({ title: '温馨提示', message: '确定退出纸通宝账号?' }).then(() => { |
|
|
storage.remove('Authorization') |
|
|
storage.remove('Authorization') |
|
|
app.globalData.token = null |
|
|
app.globalData.token = null |
|
|
app.userInfo = null |
|
|
app.userInfo = null |
|
|
|