From ed913b73246cb93e1f9d2acd1c9ab75eeb824ebb Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Mon, 22 Feb 2021 20:41:21 +0800 Subject: [PATCH] no message --- app.js | 2 +- pages/login/index.js | 44 +++++++++++++++++++++------------- pages/process/index/index.js | 6 +++++ pages/process/index/index.wxml | 2 +- 4 files changed, 36 insertions(+), 18 deletions(-) diff --git a/app.js b/app.js index 45852dd..da44485 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,6 @@ //app.js App({ - release: 0, // 0: 开发版本;1:测试版本;2:生产版本 + release: 2, // 0: 开发版本;1:测试版本;2:生产版本 tmplIds: [''], version: 152, xAppId: '503258978847953926', diff --git a/pages/login/index.js b/pages/login/index.js index ca5cdb5..1d29958 100644 --- a/pages/login/index.js +++ b/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() diff --git a/pages/process/index/index.js b/pages/process/index/index.js index a43c65a..6e76795 100644 --- a/pages/process/index/index.js +++ b/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 { diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml index 4e30d4c..9658492 100644 --- a/pages/process/index/index.wxml +++ b/pages/process/index/index.wxml @@ -8,7 +8,7 @@ - {{userInfo.factoryName || userInfo.enterpriseName}} + {{userInfo.factoryName || '未注册工厂'}}