Browse Source

no message

feature/v1.0
xpz2018 5 years ago
parent
commit
ed913b7324
4 changed files with 36 additions and 18 deletions
  1. 2
      app.js
  2. 44
      pages/login/index.js
  3. 6
      pages/process/index/index.js
  4. 2
      pages/process/index/index.wxml

2
app.js

@ -1,6 +1,6 @@
//app.js
App({
release: 0, // 0: 开发版本;1:测试版本;2:生产版本
release: 2, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: [''],
version: 152,
xAppId: '503258978847953926',

44
pages/login/index.js

@ -103,28 +103,39 @@ Page({
// }
app.userInfo = result.data
app.globalData.token = authorization
if(app.userInfo.enterpriseId){
storage.put('Authorization', app.globalData.token)
this.setData({ loging: false})
if(this.data.metaData && app.userInfo.factoryId != this.data.metaData.factoryId){
Dialog.alert({ title: '温馨提示', message: '您已经绑定过工厂了,现在就进入?' }).then(() => {
wx.redirectTo({ url: '/pages/index/index' })
})
} else {
storage.put('Authorization', app.globalData.token)
if(app.userInfo.factoryId && this.data.metaData && app.userInfo.factoryId != this.data.metaData.factoryId){
Dialog.alert({ title: '温馨提示', message: '您已经绑定过工厂了,现在就进入?' }).then(() => {
wx.redirectTo({ url: '/pages/index/index' })
}
})
} else if(this.data.metaData){
// 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作;
this.setData({ loging: false, metaData: this.data.metaData })
} else if(app.userInfo.applicationStatus == 0){
this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => {
})
} else {
this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '您还不是纸通宝SAAS用户,请联系工厂管理员,或者联系纸通宝客户人员。' }).then(() => {
})
wx.redirectTo({ url: '/pages/index/index' })
}
// if(app.userInfo.enterpriseId){
// storage.put('Authorization', app.globalData.token)
// this.setData({ loging: false})
// if(this.data.metaData && app.userInfo.factoryId != this.data.metaData.factoryId){
// Dialog.alert({ title: '温馨提示', message: '您已经绑定过工厂了,现在就进入?' }).then(() => {
// wx.redirectTo({ url: '/pages/index/index' })
// })
// } else {
// wx.redirectTo({ url: '/pages/index/index' })
// }
// } else if(this.data.metaData){
// // 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作;
// this.setData({ loging: false, metaData: this.data.metaData })
// } else if(app.userInfo.applicationStatus == 0){
// this.setData({ loging: false})
// Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => {
// })
// } else {
// this.setData({ loging: false})
// Dialog.alert({ title: '温馨提示', message: '您还不是纸通宝SAAS用户,请联系工厂管理员,或者联系纸通宝客户人员。' }).then(() => {
// })
// }
}).catch(err => {
wx.hideLoading()
if(err.code == 400){
@ -314,6 +325,7 @@ Page({
wx.hideLoading()
this.setData({loging: false})
Dialog.alert({ title: '温馨提示', message: '您的申请已经提交,待管理员审核通过之后在进行登录。' }).then(() => {
wx.redirectTo({ url: '/pages/index/index' })
})
}).catch(error => {
wx.hideLoading()

6
pages/process/index/index.js

@ -1,4 +1,5 @@
// pages/index/index.js
import Dialog from '../../../components/dialog/dialog'
import { getStatisticsInfo } from "../../../api/saas"
const event = require('../../../utils/event')
const app = getApp()
@ -52,6 +53,11 @@ Component({
}
},
orderList: function (e) {
if(app.userInfo.applicationStatus == 0){
Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => {
})
return
}
if(e.currentTarget.dataset.status == 3){
wx.navigateTo({ url: '/pages/process/payment-list/index?status=' + e.currentTarget.dataset.status })
} else {

2
pages/process/index/index.wxml

@ -8,7 +8,7 @@
<view style="height:250rpx;background-color:#008AFF;border-radius: 0rpx 0rpx 12rpx 12rpx;">
<view class="flex flex-center" style="padding:32rpx 28rpx;justify-content: flex-start">
<image style="width:100rpx;height:100rpx" src="/assets/image/icon_logo.png"></image>
<view class="text-xxl text-bold name">{{userInfo.factoryName || userInfo.enterpriseName}}</view>
<view class="text-xxl text-bold name">{{userInfo.factoryName || '未注册工厂'}}</view>
</view>
</view>

Loading…
Cancel
Save