From ca5bae7a95a175bd16e91f300ee99b44cf3ca080 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Tue, 13 Apr 2021 17:31:21 +0800 Subject: [PATCH] no message --- api/saas.js | 4 + app.json | 15 ++-- components/tree-select/index.js | 68 +++++++++++++++ components/tree-select/index.json | 8 ++ components/tree-select/index.wxml | 22 +++++ components/tree-select/index.wxs | 12 +++ components/tree-select/index.wxss | 1 + pages/client/bank-add/index.json | 6 -- pages/client/bank-add/index.wxss | 1 - pages/client/bank-list/index.json | 6 -- pages/client/home/index.js | 2 +- pages/client/home/index.wxml | 4 +- pages/client/withdrawal/index.wxss | 1 - pages/home/customer-info/index.js | 27 +++++- pages/home/customer-info/index.json | 2 + pages/home/customer-info/index.wxml | 9 +- pages/home/customer-list/index.js | 3 +- pages/home/employee-info/index.js | 84 +++++++++++++++++++ pages/home/employee-info/index.json | 14 ++++ pages/home/employee-info/index.wxml | 24 ++++++ pages/home/employee-info/index.wxss | 8 ++ pages/home/employee/index.js | 24 ++++-- pages/home/index/index.js | 2 +- pages/home/index/index.wxml | 4 +- pages/login/index.js | 12 +-- pages/message/notification/index.js | 2 +- pages/process/payment/index.js | 2 +- pages/{home => setting}/authory/index.js | 0 pages/{home => setting}/authory/index.json | 0 pages/{home => setting}/authory/index.wxml | 1 - pages/{home => setting}/authory/index.wxss | 0 pages/{client => setting}/bank-add/index.js | 5 +- .../mobile => setting/bank-add}/index.json | 0 pages/{client => setting}/bank-add/index.wxml | 6 +- pages/setting/bank-add/index.wxss | 1 + pages/{client => setting}/bank-list/index.js | 9 +- pages/setting/bank-list/index.json | 7 ++ .../{client => setting}/bank-list/index.wxml | 3 +- .../{client => setting}/bank-list/index.wxss | 2 +- pages/setting/index/index.wxml | 2 +- pages/{home => setting}/mobile/index.js | 0 .../password => setting/mobile}/index.json | 0 pages/{home => setting}/mobile/index.wxml | 0 pages/{home => setting}/mobile/index.wxss | 0 pages/{home => setting}/password/index.js | 0 pages/setting/password/index.json | 7 ++ pages/{home => setting}/password/index.wxml | 0 pages/{home => setting}/password/index.wxss | 0 pages/{client => setting}/withdrawal/index.js | 4 +- .../{client => setting}/withdrawal/index.json | 0 .../{client => setting}/withdrawal/index.wxml | 2 +- pages/setting/withdrawal/index.wxss | 1 + 52 files changed, 353 insertions(+), 64 deletions(-) create mode 100644 components/tree-select/index.js create mode 100644 components/tree-select/index.json create mode 100644 components/tree-select/index.wxml create mode 100644 components/tree-select/index.wxs create mode 100644 components/tree-select/index.wxss delete mode 100644 pages/client/bank-add/index.json delete mode 100644 pages/client/bank-add/index.wxss delete mode 100644 pages/client/bank-list/index.json delete mode 100644 pages/client/withdrawal/index.wxss create mode 100644 pages/home/employee-info/index.js create mode 100644 pages/home/employee-info/index.json create mode 100644 pages/home/employee-info/index.wxml create mode 100644 pages/home/employee-info/index.wxss rename pages/{home => setting}/authory/index.js (100%) rename pages/{home => setting}/authory/index.json (100%) rename pages/{home => setting}/authory/index.wxml (99%) rename pages/{home => setting}/authory/index.wxss (100%) rename pages/{client => setting}/bank-add/index.js (98%) rename pages/{home/mobile => setting/bank-add}/index.json (100%) rename pages/{client => setting}/bank-add/index.wxml (96%) create mode 100644 pages/setting/bank-add/index.wxss rename pages/{client => setting}/bank-list/index.js (90%) create mode 100644 pages/setting/bank-list/index.json rename pages/{client => setting}/bank-list/index.wxml (95%) rename pages/{client => setting}/bank-list/index.wxss (94%) rename pages/{home => setting}/mobile/index.js (100%) rename pages/{home/password => setting/mobile}/index.json (100%) rename pages/{home => setting}/mobile/index.wxml (100%) rename pages/{home => setting}/mobile/index.wxss (100%) rename pages/{home => setting}/password/index.js (100%) create mode 100644 pages/setting/password/index.json rename pages/{home => setting}/password/index.wxml (100%) rename pages/{home => setting}/password/index.wxss (100%) rename pages/{client => setting}/withdrawal/index.js (98%) rename pages/{client => setting}/withdrawal/index.json (100%) rename pages/{client => setting}/withdrawal/index.wxml (97%) create mode 100644 pages/setting/withdrawal/index.wxss diff --git a/api/saas.js b/api/saas.js index 1d9166d..3f8c64c 100644 --- a/api/saas.js +++ b/api/saas.js @@ -12,7 +12,9 @@ const sconfig = { const loginToken = (params) => mPost(`/recycle-user-center/authorize/get/product-line-token/by/login-token`, params, sconfig) const getUserInfo = () => mGet(`/recycle-user-center/user/get/user-info`, null, sconfig) const getEmployeList = (params) => mGet(`/recycle-user-center/get/self-department-member-list`, params, sconfig) +const getRoleList = (params) => mGet(`/recycle-user-center/get/self-department-role-list`, params, sconfig) const getBaseInfo = () => mGet(`/ztb-factory/get/self-enterprise-profile-detail`, null, sconfig) +const getBankList = () => mGet(`/ztb-factory/get/bank-list`, null, sconfig) const getStatisticsInfo = (params) => mGet(`/ztb-factory/get/my-workbench-statistics-info`, params, sconfig) const bindingAdmin = (params) => mPost(`/recycle-user-center/bind/factory-admin`, params, sconfig) const getOrderList = (params) => mGet(`/ztb-factory/factory-customer/get/order-list`, params, sconfig) @@ -50,6 +52,7 @@ export { sconfig, loginToken, getBaseInfo, + getBankList, getUserInfo, bindingAdmin, getFactoryOrderList, @@ -82,6 +85,7 @@ export { getStatisticsInfo, getCustomerOrderList, getEmployeList, + getRoleList, getMessageList, readMessage } \ No newline at end of file diff --git a/app.json b/app.json index 41fc530..192c56c 100644 --- a/app.json +++ b/app.json @@ -2,12 +2,10 @@ "pages":[ "pages/login/index", "pages/index/index", - "pages/home/mobile/index", - "pages/home/password/index", "pages/home/employee/index", + "pages/home/employee-info/index", "pages/home/customer-list/index", "pages/home/customer-info/index", - "pages/home/authory/index", "pages/home/qrcode/index", "pages/process/agent-list/index", "pages/process/check-list/index", @@ -21,16 +19,19 @@ "pages/message/detail/index", "pages/storage/index/index", "pages/setting/index/index", + "pages/setting/authory/index", + "pages/setting/password/index", + "pages/setting/mobile/index", "pages/setting/paper/index", + "pages/setting/bank-list/index", + "pages/setting/bank-add/index", "pages/setting/paper-detial/index", + "pages/setting/withdrawal/index", "pages/client/index/index", "pages/client/registe/index", "pages/client/home/index", "pages/client/order-list/index", - "pages/client/factory-list/index", - "pages/client/bank-list/index", - "pages/client/bank-add/index", - "pages/client/withdrawal/index" + "pages/client/factory-list/index" ], "window":{ "backgroundTextStyle":"light", diff --git a/components/tree-select/index.js b/components/tree-select/index.js new file mode 100644 index 0000000..8dc4ed8 --- /dev/null +++ b/components/tree-select/index.js @@ -0,0 +1,68 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'main-item-class', + 'content-item-class', + 'main-active-class', + 'content-active-class', + 'main-disabled-class', + 'content-disabled-class', + ], + props: { + items: { + type: Array, + observer: 'updateSubItems', + }, + activeId: null, + mainActiveIndex: { + type: Number, + value: 0, + observer: 'updateSubItems', + }, + height: { + type: null, + value: 300, + }, + max: { + type: Number, + value: Infinity, + }, + selectedIcon: { + type: String, + value: 'success', + }, + }, + data: { + subItems: [], + }, + methods: { + // 当一个子项被选择时 + onSelectItem(event) { + const { item } = event.currentTarget.dataset; + const isArray = Array.isArray(this.data.activeId); + // 判断有没有超出右侧选择的最大数 + const isOverMax = isArray && this.data.activeId.length >= this.data.max; + // 判断该项有没有被选中, 如果有被选中,则忽视是否超出的条件 + const isSelected = isArray + ? this.data.activeId.indexOf(item.id) > -1 + : this.data.activeId === item.id; + if (!item.disabled && (!isOverMax || isSelected)) { + this.$emit('click-item', item); + } + }, + // 当一个导航被点击时 + onClickNav(event) { + const index = event.detail; + const item = this.data.items[index]; + if (!item.disabled) { + this.$emit('click-nav', { index }); + } + }, + // 更新子项列表 + updateSubItems() { + const { items, mainActiveIndex } = this.data; + const { children = [] } = items[mainActiveIndex] || {}; + this.setData({ subItems: children }); + }, + }, +}); diff --git a/components/tree-select/index.json b/components/tree-select/index.json new file mode 100644 index 0000000..42991a2 --- /dev/null +++ b/components/tree-select/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-sidebar": "../sidebar/index", + "van-sidebar-item": "../sidebar-item/index" + } +} diff --git a/components/tree-select/index.wxml b/components/tree-select/index.wxml new file mode 100644 index 0000000..c2a75ba --- /dev/null +++ b/components/tree-select/index.wxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + {{ item.text }} + + + + \ No newline at end of file diff --git a/components/tree-select/index.wxs b/components/tree-select/index.wxs new file mode 100644 index 0000000..b1cbb39 --- /dev/null +++ b/components/tree-select/index.wxs @@ -0,0 +1,12 @@ +/* eslint-disable */ +var array = require('../wxs/array.wxs'); + +function isActive (activeList, itemId) { + if (array.isArray(activeList)) { + return activeList.indexOf(itemId) > -1; + } + + return activeList === itemId; +} + +module.exports.isActive = isActive; diff --git a/components/tree-select/index.wxss b/components/tree-select/index.wxss new file mode 100644 index 0000000..3f7cca6 --- /dev/null +++ b/components/tree-select/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tree-select{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;font-size:14px;font-size:var(--tree-select-font-size,14px)}.van-tree-select__nav{-webkit-flex:1;flex:1;background-color:#f7f8fa;background-color:var(--tree-select-nav-background-color,#f7f8fa);--sidebar-padding:12px 8px 12px 12px}.van-tree-select__nav__inner{width:100%!important;height:100%}.van-tree-select__content{-webkit-flex:2;flex:2;background-color:#fff;background-color:var(--tree-select-content-background-color,#fff)}.van-tree-select__item{position:relative;font-weight:700;padding:0 32px 0 16px;padding:0 32px 0 var(--padding-md,16px);line-height:44px;line-height:var(--tree-select-item-height,44px)}.van-tree-select__item--active{color:#ee0a24;color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:#c8c9cc;color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;right:var(--padding-md,16px)} \ No newline at end of file diff --git a/pages/client/bank-add/index.json b/pages/client/bank-add/index.json deleted file mode 100644 index 346e5d4..0000000 --- a/pages/client/bank-add/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "van-button": "/components/button/index", - "van-count-down": "/components/count-down/index" - } -} \ No newline at end of file diff --git a/pages/client/bank-add/index.wxss b/pages/client/bank-add/index.wxss deleted file mode 100644 index 512b5ab..0000000 --- a/pages/client/bank-add/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/client/bank-add/index.wxss */ \ No newline at end of file diff --git a/pages/client/bank-list/index.json b/pages/client/bank-list/index.json deleted file mode 100644 index 919af10..0000000 --- a/pages/client/bank-list/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "van-dialog": "/components/dialog/index", - "van-action-sheet": "/components/action-sheet/index" - } -} \ No newline at end of file diff --git a/pages/client/home/index.js b/pages/client/home/index.js index cae523e..444fec6 100644 --- a/pages/client/home/index.js +++ b/pages/client/home/index.js @@ -72,7 +72,7 @@ Component({ return } if(!app.userInfo.isAuth){ - wx.navigateTo({ url: '/pages/home/authory/index' }) + wx.navigateTo({ url: '/pages/setting/authory/index' }) } }, orderList: function(){ diff --git a/pages/client/home/index.wxml b/pages/client/home/index.wxml index e61dbe5..ae1181d 100644 --- a/pages/client/home/index.wxml +++ b/pages/client/home/index.wxml @@ -50,13 +50,13 @@ - + 提现 - + 我的银行卡 diff --git a/pages/client/withdrawal/index.wxss b/pages/client/withdrawal/index.wxss deleted file mode 100644 index 96d3d59..0000000 --- a/pages/client/withdrawal/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/client/withdrawal/index.wxss */ \ No newline at end of file diff --git a/pages/home/customer-info/index.js b/pages/home/customer-info/index.js index 500134b..08519ad 100644 --- a/pages/home/customer-info/index.js +++ b/pages/home/customer-info/index.js @@ -1,6 +1,6 @@ // pages/home/customer-info/index.js import Scene from '../../index/scene' -import { getCustomerInfo, editCustomer, saveCustomer} from "../../../api/saas" +import { getCustomerInfo, getBankList, editCustomer, saveCustomer} from "../../../api/saas" const util = require('../../../utils/util') const event = require('../../../utils/event') const app = getApp() @@ -18,6 +18,8 @@ Scene({ { id: 2, name: '转账' }, { id: 1, name: '现金' } ], + visible: false, + bankList: null }, /** * 生命周期函数--监听页面加载 @@ -32,7 +34,14 @@ Scene({ wx.hideLoading() util.showToast(err) }) - } + } + getBankList().then(result => { + var bankList = [] + for (let index = 0; index < result.data.length; index++) { + bankList.push(result.data[index].bank) + } + this.setData({ bankList }) + }) if(options.cardNo){ this.data.form.factoryId = app.userInfo.factoryId this.setData({ ['form.cardNo']: options.cardNo }) @@ -41,8 +50,12 @@ Scene({ bindInput: function(e){ this.data.form[e.currentTarget.id] = e.detail }, - chooseMethod: function(){ - this.setData({ show: true }) + chooseMethod: function(e){ + if(e.currentTarget.id == 'bankName'){ + this.setData({ visible: true }) + } else { + this.setData({ show: true }) + } }, onClose: function() { this.setData({ show: false }) @@ -53,6 +66,12 @@ Scene({ registCustomer: function(){ wx.navigateTo({ url: `/pages/client/registe/index?id=${this.data.form.id}` }) }, + onHide: function() { + this.setData({ visible: false }) + }, + onConfirm: function({detail}) { + this.setData({ visible: false, ['form.bankName']: detail.value }) + }, submitForm: function(){ if (util.isEmpty(this.data.form.name)) { util.showToast('请输入客户姓名') diff --git a/pages/home/customer-info/index.json b/pages/home/customer-info/index.json index 79f0dfc..36f609f 100644 --- a/pages/home/customer-info/index.json +++ b/pages/home/customer-info/index.json @@ -8,6 +8,8 @@ "van-icon": "/components/icon/index", "van-action-sheet": "/components/action-sheet/index", "van-notice-bar": "/components/notice-bar/index", + "van-picker": "/components/picker/index", + "van-popup": "/components/popup/index", "notification": "/pages/message/notification/index" } } \ No newline at end of file diff --git a/pages/home/customer-info/index.wxml b/pages/home/customer-info/index.wxml index 9497cc7..b1bd176 100644 --- a/pages/home/customer-info/index.wxml +++ b/pages/home/customer-info/index.wxml @@ -4,11 +4,11 @@ - + - - + + @@ -22,4 +22,7 @@ + + + \ No newline at end of file diff --git a/pages/home/customer-list/index.js b/pages/home/customer-list/index.js index 7ceee5f..a1627ec 100644 --- a/pages/home/customer-list/index.js +++ b/pages/home/customer-list/index.js @@ -83,8 +83,7 @@ Scene({ this.data.page = e.currentTarget.dataset.page this.data.index = e.currentTarget.dataset.index var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] - // wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}` }) - wx.navigateTo({ url: `/pages/home/customer-info/index?cardNo=${item.id}` }) + wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}` }) }, bindCustomer: function(e){ var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] diff --git a/pages/home/employee-info/index.js b/pages/home/employee-info/index.js new file mode 100644 index 0000000..feeb32b --- /dev/null +++ b/pages/home/employee-info/index.js @@ -0,0 +1,84 @@ +// pages/home/customer-info/index.js +import Scene from '../../index/scene' +import { getRoleList, editCustomer, saveCustomer} from "../../../api/saas" +const util = require('../../../utils/util') +const event = require('../../../utils/event') +const app = getApp() + +Scene({ + /** + * 页面的初始数据 + */ + data: { + form: {}, + visible: false, + roleList: null + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + if(options.id){ + let channel = this.getOpenerEventChannel() + let that = this + channel.on('onParam', function (data) { + that.setData({ form: data }) + }) + } + getRoleList().then(result => { + this.setData({ roleList: result.data.records }) + }) + }, + bindInput: function(e){ + this.data.form[e.currentTarget.id] = e.detail + }, + chooseMethod: function(e){ + if(e.currentTarget.id == 'bankName'){ + this.setData({ visible: true }) + } else { + this.setData({ show: true }) + } + }, + registCustomer: function(){ + wx.navigateTo({ url: `/pages/client/registe/index?id=${this.data.form.id}` }) + }, + onHide: function() { + this.setData({ visible: false }) + }, + onConfirm: function({detail}) { + this.setData({ visible: false, ['form.bankName']: detail.value }) + }, + submitForm: function(){ + if (util.isEmpty(this.data.form.name)) { + util.showToast('请输入客户姓名') + return + } + if (util.isEmpty(this.data.form.defaultPaymentMethod)) { + util.showToast('请选择客户的付款方式') + return + } + if (util.isEmpty(this.data.form.defaultPaymentMethod)) { + this.data.form.defaultPaymentMethod = 1 + } + wx.showLoading({ title: '正在获取', mask: true }) + if(this.data.form.id) { + editCustomer(this.data.form).then(result => { + wx.hideLoading() + util.showBackToast('修改成功') + event.emit('EventMessage', { what: 102, detail: this.data.form }) + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) + } else { + saveCustomer(this.data.form).then(result => { + wx.hideLoading() + util.showBackToast('添加成功') + event.emit('EventMessage', { what: 102, detail: this.data.form }) + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) + } + } +}) \ No newline at end of file diff --git a/pages/home/employee-info/index.json b/pages/home/employee-info/index.json new file mode 100644 index 0000000..5a722f0 --- /dev/null +++ b/pages/home/employee-info/index.json @@ -0,0 +1,14 @@ +{ + "usingComponents": { + "van-button": "/components/button/index", + "van-cell": "/components/cell/index", + "van-field": "/components/field/index", + "van-loading": "/components/loading/index", + "van-image": "/components/image/index", + "van-icon": "/components/icon/index", + "van-notice-bar": "/components/notice-bar/index", + "van-picker": "/components/picker/index", + "van-popup": "/components/popup/index", + "notification": "/pages/message/notification/index" + } +} \ No newline at end of file diff --git a/pages/home/employee-info/index.wxml b/pages/home/employee-info/index.wxml new file mode 100644 index 0000000..6aa9cc5 --- /dev/null +++ b/pages/home/employee-info/index.wxml @@ -0,0 +1,24 @@ + + 员工资料 + + + + + + + + + + + + 删除 + + 保存 + + + + + + + + \ No newline at end of file diff --git a/pages/home/employee-info/index.wxss b/pages/home/employee-info/index.wxss new file mode 100644 index 0000000..fd5a5bd --- /dev/null +++ b/pages/home/employee-info/index.wxss @@ -0,0 +1,8 @@ +/* pages/home/customer-info/index.wxss */ +.wrapper { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + padding: 0px 15%; +} \ No newline at end of file diff --git a/pages/home/employee/index.js b/pages/home/employee/index.js index 2083216..f39be3b 100644 --- a/pages/home/employee/index.js +++ b/pages/home/employee/index.js @@ -56,11 +56,25 @@ Scene({ lookItem: function(e){ this.data.nowIndex = e.currentTarget.dataset.index var item = this.data.memberList[this.data.nowIndex] - if(item.position == 'ADMINISTRATOR'){ - this.setData({ actions: [ { id: 1, name: '删除该员工' } ], show: true }) - } else [ - this.setData({ actions: [ { id: 2, name: '设为管理员' }, { id: 1, name: '删除该员工' } ], show: true }) - ] + item.apply = 0 + // if(item.position == 'ADMINISTRATOR'){ + // this.setData({ actions: [ { id: 1, name: '删除该员工' } ], show: true }) + // } else [ + // this.setData({ actions: [ { id: 2, name: '设为管理员' }, { id: 1, name: '删除该员工' } ], show: true }) + // ] + wx.navigateTo({ + url: `/pages/home/employee-info/index?id=${item.enterpriseMemberId}`, + events: { + onCallback: (data) => { + // if (data.what == 12) { + // that.fetchOrderInfo(that.data.form.id) + // } + } + }, + success: function(res) { + res.eventChannel.emit('onParam', item) + } + }) }, onClose() { this.setData({ show: false }) diff --git a/pages/home/index/index.js b/pages/home/index/index.js index d4fe542..707a13a 100644 --- a/pages/home/index/index.js +++ b/pages/home/index/index.js @@ -66,7 +66,7 @@ Component({ return } if(!app.userInfo.isAuth){ - wx.navigateTo({ url: '/pages/home/authory/index' }) + wx.navigateTo({ url: '/pages/setting/authory/index' }) } }, orderList: function(){ diff --git a/pages/home/index/index.wxml b/pages/home/index/index.wxml index 72a779a..0c1585e 100644 --- a/pages/home/index/index.wxml +++ b/pages/home/index/index.wxml @@ -76,13 +76,13 @@ - + 修改密码 - + 修改手机号码 diff --git a/pages/login/index.js b/pages/login/index.js index d47bb17..72a3fd6 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -25,7 +25,7 @@ Page({ regist: false, metaData: null, code: null - // code: '?mark=ztb_saas&QrCodeRecordId=562333739288498176' + // code: '?mark=ztb_saas&QrCodeRecordId=579287987658035200' }, /************************************** 初始化登录流程 ********************************************/ onLoad: function (options) { @@ -100,11 +100,6 @@ Page({ pconfig.header = { 'Authorization': 'QNT ' + result.data } getUserInfo().then(result => { wx.hideLoading() - if(!result.data.isSaasPerssion){ - Dialog.alert({ title: '温馨提示', message: '您的打包站还在授权中,请耐心等待,或者联系相关客服人员?' }).then(() => { - }) - return - } app.userInfo = result.data app.globalData.token = authorization storage.put('Authorization', app.globalData.token) @@ -124,6 +119,11 @@ Page({ } } else { if(app.userInfo.factoryId){ + if(!result.data.isSaasPerssion){ + Dialog.alert({ title: '温馨提示', message: '您的打包站还在授权中,请耐心等待,或者联系相关客服人员?' }).then(() => { + }) + return + } wx.redirectTo({ url: '/pages/index/index' }) } else { wx.redirectTo({ url: '/pages/client/index/index' }) diff --git a/pages/message/notification/index.js b/pages/message/notification/index.js index 8561283..3d2acc5 100644 --- a/pages/message/notification/index.js +++ b/pages/message/notification/index.js @@ -40,7 +40,7 @@ Component({ if(!this.data.message.redirectInfo || !this.data.message.redirectInfo.targetView){ return } - if(util.isEmpty(e.currentTarget.id)){ + if(!util.isEmpty(e.currentTarget.id)){ app.globalData.msgIdList.push(this.data.message.id) this.setData({ notice: false }) return diff --git a/pages/process/payment/index.js b/pages/process/payment/index.js index f530c1c..99e2c44 100644 --- a/pages/process/payment/index.js +++ b/pages/process/payment/index.js @@ -141,7 +141,7 @@ Scene({ console.log(err) if(err.indexOf('用户未实名') >= 0){ Dialog.confirm({ title: '温馨提示', message: '您还没有实名认证,无法使用千鸟代付,现在去实名认证?' }).then(() => { - wx.navigateTo({ url: '/pages/home/authory/index' }) + wx.navigateTo({ url: '/pages/setting/authory/index' }) }).catch(err => { }) } else if(err.indexOf('客户未注册') >= 0){ diff --git a/pages/home/authory/index.js b/pages/setting/authory/index.js similarity index 100% rename from pages/home/authory/index.js rename to pages/setting/authory/index.js diff --git a/pages/home/authory/index.json b/pages/setting/authory/index.json similarity index 100% rename from pages/home/authory/index.json rename to pages/setting/authory/index.json diff --git a/pages/home/authory/index.wxml b/pages/setting/authory/index.wxml similarity index 99% rename from pages/home/authory/index.wxml rename to pages/setting/authory/index.wxml index f9ff687..f7de2f7 100644 --- a/pages/home/authory/index.wxml +++ b/pages/setting/authory/index.wxml @@ -3,7 +3,6 @@ 实名认证 - *请拍摄/上传本人身份证(头像面) diff --git a/pages/home/authory/index.wxss b/pages/setting/authory/index.wxss similarity index 100% rename from pages/home/authory/index.wxss rename to pages/setting/authory/index.wxss diff --git a/pages/client/bank-add/index.js b/pages/setting/bank-add/index.js similarity index 98% rename from pages/client/bank-add/index.js rename to pages/setting/bank-add/index.js index dc47bd7..e8ee87b 100644 --- a/pages/client/bank-add/index.js +++ b/pages/setting/bank-add/index.js @@ -1,11 +1,12 @@ -// pages/client/bank-add/index.js +// pages/setting/bank-add/index.js +import Scene from '../../index/scene' import { getBankcardInfo, ocrBankcard, verifyBankcard } from "../../../api/payment" import { postCaptcha } from "../../../api/user" const util = require('../../../utils/util') const event = require('../../../utils/event') const app = getApp() -Page({ +Scene({ /** * 页面的初始数据 */ diff --git a/pages/home/mobile/index.json b/pages/setting/bank-add/index.json similarity index 100% rename from pages/home/mobile/index.json rename to pages/setting/bank-add/index.json diff --git a/pages/client/bank-add/index.wxml b/pages/setting/bank-add/index.wxml similarity index 96% rename from pages/client/bank-add/index.wxml rename to pages/setting/bank-add/index.wxml index 79bce9c..c8d1799 100644 --- a/pages/client/bank-add/index.wxml +++ b/pages/setting/bank-add/index.wxml @@ -1,4 +1,4 @@ - + 添加银行卡 @@ -41,4 +41,6 @@ {{form.type == 4 ? '提交' : '下一步'}} - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/setting/bank-add/index.wxss b/pages/setting/bank-add/index.wxss new file mode 100644 index 0000000..014949a --- /dev/null +++ b/pages/setting/bank-add/index.wxss @@ -0,0 +1 @@ +/* pages/setting/bank-add/index.wxss */ \ No newline at end of file diff --git a/pages/client/bank-list/index.js b/pages/setting/bank-list/index.js similarity index 90% rename from pages/client/bank-list/index.js rename to pages/setting/bank-list/index.js index 4754db5..87971a4 100644 --- a/pages/client/bank-list/index.js +++ b/pages/setting/bank-list/index.js @@ -1,11 +1,12 @@ -// pages/client/bank-list/index.js +// pages/setting/bank-list/index.js +import Scene from '../../index/scene' import Dialog from '../../../components/dialog/dialog' import { getBankCardList, deleteBankcard } from "../../../api/payment" const util = require('../../../utils/util') const event = require('../../../utils/event') const app = getApp() -Page({ +Scene({ /** * 页面的初始数据 */ @@ -38,11 +39,11 @@ Page({ if (this.data.nowIndex < 0) { // if(!app.userInfo.isAuth){ // Dialog.alert({ title: '温馨提示', message: '您还没有进行个人信息认证,无法绑定银行卡,现在去进行个人信息认证?' }).then(() => { - // wx.navigateTo({ url: '/pages/home/authory/index' }) + // wx.navigateTo({ url: '/pages/setting/authory/index' }) // }) // return // } - wx.navigateTo({url: '/pages/client/bank-add/index'}) + wx.navigateTo({url: '/pages/setting/bank-add/index'}) return } this.setData({ show: true }) diff --git a/pages/setting/bank-list/index.json b/pages/setting/bank-list/index.json new file mode 100644 index 0000000..ffd9d0b --- /dev/null +++ b/pages/setting/bank-list/index.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-dialog": "/components/dialog/index", + "van-action-sheet": "/components/action-sheet/index", + "notification": "/pages/message/notification/index" + } +} \ No newline at end of file diff --git a/pages/client/bank-list/index.wxml b/pages/setting/bank-list/index.wxml similarity index 95% rename from pages/client/bank-list/index.wxml rename to pages/setting/bank-list/index.wxml index 956d8d5..061e0b7 100644 --- a/pages/client/bank-list/index.wxml +++ b/pages/setting/bank-list/index.wxml @@ -1,4 +1,4 @@ - + 我的银行卡 @@ -28,3 +28,4 @@ + diff --git a/pages/client/bank-list/index.wxss b/pages/setting/bank-list/index.wxss similarity index 94% rename from pages/client/bank-list/index.wxss rename to pages/setting/bank-list/index.wxss index 155fedf..4f1d9e4 100644 --- a/pages/client/bank-list/index.wxss +++ b/pages/setting/bank-list/index.wxss @@ -1,4 +1,4 @@ -/* pages/client/bank-list/index.wxss */ +/* pages/setting/bank-list/index.wxss */ .add-bank { height: 150rpx; width: 100%; diff --git a/pages/setting/index/index.wxml b/pages/setting/index/index.wxml index 35691c7..e221f56 100644 --- a/pages/setting/index/index.wxml +++ b/pages/setting/index/index.wxml @@ -13,7 +13,7 @@ - + 修改密码 diff --git a/pages/home/mobile/index.js b/pages/setting/mobile/index.js similarity index 100% rename from pages/home/mobile/index.js rename to pages/setting/mobile/index.js diff --git a/pages/home/password/index.json b/pages/setting/mobile/index.json similarity index 100% rename from pages/home/password/index.json rename to pages/setting/mobile/index.json diff --git a/pages/home/mobile/index.wxml b/pages/setting/mobile/index.wxml similarity index 100% rename from pages/home/mobile/index.wxml rename to pages/setting/mobile/index.wxml diff --git a/pages/home/mobile/index.wxss b/pages/setting/mobile/index.wxss similarity index 100% rename from pages/home/mobile/index.wxss rename to pages/setting/mobile/index.wxss diff --git a/pages/home/password/index.js b/pages/setting/password/index.js similarity index 100% rename from pages/home/password/index.js rename to pages/setting/password/index.js diff --git a/pages/setting/password/index.json b/pages/setting/password/index.json new file mode 100644 index 0000000..24db294 --- /dev/null +++ b/pages/setting/password/index.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-button": "/components/button/index", + "van-count-down": "/components/count-down/index", + "notification": "/pages/message/notification/index" + } +} \ No newline at end of file diff --git a/pages/home/password/index.wxml b/pages/setting/password/index.wxml similarity index 100% rename from pages/home/password/index.wxml rename to pages/setting/password/index.wxml diff --git a/pages/home/password/index.wxss b/pages/setting/password/index.wxss similarity index 100% rename from pages/home/password/index.wxss rename to pages/setting/password/index.wxss diff --git a/pages/client/withdrawal/index.js b/pages/setting/withdrawal/index.js similarity index 98% rename from pages/client/withdrawal/index.js rename to pages/setting/withdrawal/index.js index 2680f61..78bcde3 100644 --- a/pages/client/withdrawal/index.js +++ b/pages/setting/withdrawal/index.js @@ -1,4 +1,4 @@ -// pages/client/withdrawal/index.js +// pages/setting/withdrawal/index.js import Dialog from '../../../components/dialog/dialog' import { getBalanceInfo, getWithdrawalList, getBankCardList, paymentOrder } from '../../../api/payment' const util = require('../../../utils/util') @@ -92,7 +92,7 @@ Page({ this.setData({ visible: true }) } else { Dialog.confirm({ title: '温馨提示', message: '您还没有绑定银行卡,请先去绑定银行卡' }).then(() => { - wx.navigateTo({ url: '/pages/client/bank-add/index' }) + wx.navigateTo({ url: '/pages/setting/bank-add/index' }) }).catch(err => { }) } diff --git a/pages/client/withdrawal/index.json b/pages/setting/withdrawal/index.json similarity index 100% rename from pages/client/withdrawal/index.json rename to pages/setting/withdrawal/index.json diff --git a/pages/client/withdrawal/index.wxml b/pages/setting/withdrawal/index.wxml similarity index 97% rename from pages/client/withdrawal/index.wxml rename to pages/setting/withdrawal/index.wxml index 0046960..5fbd491 100644 --- a/pages/client/withdrawal/index.wxml +++ b/pages/setting/withdrawal/index.wxml @@ -1,4 +1,4 @@ - + 申请提现 diff --git a/pages/setting/withdrawal/index.wxss b/pages/setting/withdrawal/index.wxss new file mode 100644 index 0000000..259e1c8 --- /dev/null +++ b/pages/setting/withdrawal/index.wxss @@ -0,0 +1 @@ +/* pages/setting/withdrawal/index.wxss */ \ No newline at end of file