Browse Source

no message

feature/v1.2
xpz2018 5 years ago
parent
commit
ca5bae7a95
52 changed files with 353 additions and 64 deletions
  1. 4
      api/saas.js
  2. 15
      app.json
  3. 68
      components/tree-select/index.js
  4. 8
      components/tree-select/index.json
  5. 22
      components/tree-select/index.wxml
  6. 12
      components/tree-select/index.wxs
  7. 1
      components/tree-select/index.wxss
  8. 6
      pages/client/bank-add/index.json
  9. 1
      pages/client/bank-add/index.wxss
  10. 6
      pages/client/bank-list/index.json
  11. 2
      pages/client/home/index.js
  12. 4
      pages/client/home/index.wxml
  13. 1
      pages/client/withdrawal/index.wxss
  14. 27
      pages/home/customer-info/index.js
  15. 2
      pages/home/customer-info/index.json
  16. 9
      pages/home/customer-info/index.wxml
  17. 3
      pages/home/customer-list/index.js
  18. 84
      pages/home/employee-info/index.js
  19. 14
      pages/home/employee-info/index.json
  20. 24
      pages/home/employee-info/index.wxml
  21. 8
      pages/home/employee-info/index.wxss
  22. 24
      pages/home/employee/index.js
  23. 2
      pages/home/index/index.js
  24. 4
      pages/home/index/index.wxml
  25. 12
      pages/login/index.js
  26. 2
      pages/message/notification/index.js
  27. 2
      pages/process/payment/index.js
  28. 0
      pages/setting/authory/index.js
  29. 0
      pages/setting/authory/index.json
  30. 1
      pages/setting/authory/index.wxml
  31. 0
      pages/setting/authory/index.wxss
  32. 5
      pages/setting/bank-add/index.js
  33. 0
      pages/setting/bank-add/index.json
  34. 6
      pages/setting/bank-add/index.wxml
  35. 1
      pages/setting/bank-add/index.wxss
  36. 9
      pages/setting/bank-list/index.js
  37. 7
      pages/setting/bank-list/index.json
  38. 3
      pages/setting/bank-list/index.wxml
  39. 2
      pages/setting/bank-list/index.wxss
  40. 2
      pages/setting/index/index.wxml
  41. 0
      pages/setting/mobile/index.js
  42. 0
      pages/setting/mobile/index.json
  43. 0
      pages/setting/mobile/index.wxml
  44. 0
      pages/setting/mobile/index.wxss
  45. 0
      pages/setting/password/index.js
  46. 7
      pages/setting/password/index.json
  47. 0
      pages/setting/password/index.wxml
  48. 0
      pages/setting/password/index.wxss
  49. 4
      pages/setting/withdrawal/index.js
  50. 0
      pages/setting/withdrawal/index.json
  51. 2
      pages/setting/withdrawal/index.wxml
  52. 1
      pages/setting/withdrawal/index.wxss

4
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
}

15
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",

68
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 });
},
},
});

8
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"
}
}

22
components/tree-select/index.wxml

@ -0,0 +1,22 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="wxs" />
<view class="van-tree-select" style="height: {{ utils.addUnit(height) }}">
<scroll-view scroll-y class="van-tree-select__nav">
<van-sidebar active-key="{{ mainActiveIndex }}" bind:change="onClickNav" custom-class="van-tree-select__nav__inner">
<van-sidebar-item wx:for="{{ items }}" wx:key="index" custom-class="main-item-class"
active-class="main-active-class" disabled-class="main-disabled-class" badge="{{ item.badge }}"
dot="{{ item.dot }}" title="{{ item.text }}" disabled="{{ item.disabled }}" />
</van-sidebar>
</scroll-view>
<scroll-view scroll-y class="van-tree-select__content">
<slot name="content" />
<view wx:for="{{ subItems }}" wx:key="id"
class="van-ellipsis content-item-class {{ utils.bem('tree-select__item', { active: wxs.isActive(activeId, item.id), disabled: item.disabled }) }} {{ wxs.isActive(activeId, item.id) ? 'content-active-class' : '' }} {{ item.disabled ? 'content-disabled-class' : '' }}"
data-item="{{ item }}" bind:tap="onSelectItem">
{{ item.text }}
<van-icon wx:if="{{ wxs.isActive(activeId, item.id) }}" name="{{ selectedIcon }}" size="16px"
class="van-tree-select__selected" />
</view>
</scroll-view>
</view>

12
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;

1
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)}

6
pages/client/bank-add/index.json

@ -1,6 +0,0 @@
{
"usingComponents": {
"van-button": "/components/button/index",
"van-count-down": "/components/count-down/index"
}
}

1
pages/client/bank-add/index.wxss

@ -1 +0,0 @@
/* pages/client/bank-add/index.wxss */

6
pages/client/bank-list/index.json

@ -1,6 +0,0 @@
{
"usingComponents": {
"van-dialog": "/components/dialog/index",
"van-action-sheet": "/components/action-sheet/index"
}
}

2
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(){

4
pages/client/home/index.wxml

@ -50,13 +50,13 @@
</view>
<view style="height:16rpx"></view>
<van-cell-group>
<van-cell is-link link-type="navigateTo" url="/pages/client/withdrawal/index">
<van-cell is-link link-type="navigateTo" url="/pages/setting/withdrawal/index">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="cash-back-record" size="20"/>
<text class="text-sg" style="margin-left:12rpx">提现</text>
</view>
</van-cell>
<van-cell is-link link-type="navigateTo" url="/pages/client/bank-list/index">
<van-cell is-link link-type="navigateTo" url="/pages/setting/bank-list/index">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="credit-pay" size="18"/>
<text class="text-sg" style="margin-left:12rpx">我的银行卡</text>

1
pages/client/withdrawal/index.wxss

@ -1 +0,0 @@
/* pages/client/withdrawal/index.wxss */

27
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('请输入客户姓名')

2
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"
}
}

9
pages/home/customer-info/index.wxml

@ -4,11 +4,11 @@
<view wx:if="{{form}}">
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="{{form.id ? '点击可以修改客户信息' : '添加客户信息'}}" />
<van-field value="{{ form.cardNo }}" label="卡号:" disabled/>
<van-field value="{{ form.cardNo }}" label="卡号:" disabled wx:if="{{ form.cardNo }}"/>
<van-field id="name" value="{{ form.name }}" label="客户姓名:" placeholder="请输入客户姓名" bind:input="bindInput"/>
<van-field id="mobile" value="{{ form.mobile }}" type="number" label="手机号码:" placeholder="请输入手机号码" bind:input="bindInput"/>
<van-field value="{{ form.defaultPaymentMethod ? form.defaultPaymentMethod == 2 ? '转账' : '现金' : '选择付款方式'}}" readonly label="付款方式:" is-link bindtap="chooseMethod" />
<van-field id="bankName" value="{{ form.bankName }}" label="银行名称:" placeholder="请输入银行名称" bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}"/>
<van-field value="{{ form.defaultPaymentMethod ? form.defaultPaymentMethod == 2 ? '转账' : '现金' : '选择付款方式'}}" readonly label="付款方式:" is-link bindtap="chooseMethod" />
<van-field id="bankName" value="{{ form.bankName }}" label="银行名称:" readonly is-link placeholder="请选择银行" bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}" bindtap="chooseMethod"/>
<van-field id="bankBranchName" value="{{ form.bankBranchName }}" label="开户行:" placeholder="请输入开户行" bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}"/>
<van-field id="bankCardNo" value="{{ form.bankCardNo }}" label="银行卡号:" placeholder="请输入银行卡号" bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}"/>
@ -22,4 +22,7 @@
</view>
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:cancel="onClose" bind:close="onClose" bind:select="onSelect" cancel-text="取消" z-index="22"/>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ bankList }}" bind:cancel="onHide" bind:confirm="onConfirm" />
</van-popup>
<notification id="qn-notification"/>

3
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]

84
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)
})
}
}
})

14
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"
}
}

24
pages/home/employee-info/index.wxml

@ -0,0 +1,24 @@
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">员工资料</view>
</cu-custom>
<view wx:if="{{form}}">
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="{{form.id ? '点击可以修改客户信息' : '添加客户信息'}}" />
<van-field value="{{ form.enterpriseMemberId }}" label="员工编号:" disabled wx:if="{{ form.enterpriseMemberId }}"/>
<van-field id="name" value="{{ form.enterpriseMemberName || form.name }}" label="员工姓名:" placeholder="请输入客户姓名" bind:input="bindInput"/>
<van-field id="mobile" value="{{ form.mobile }}" type="number" label="手机号码:" placeholder="请输入手机号码" bind:input="bindInput"/>
<van-field value="{{ form.defaultPaymentMethod ? form.defaultPaymentMethod == 2 ? '转账' : '现金' : '请选择角色'}}" readonly label="员工角色:" is-link bindtap="chooseMethod" />
<view style="height:32rpx"></view>
<view style="margin-top:20rpx;padding:48rpx 32rpx">
<van-button block type="danger" bind:click="registCustomer">删除</van-button>
<view style="height:36rpx"></view>
<van-button block type="info" bind:click="submitForm">保存</van-button>
</view>
</view>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择银行" columns="{{ bankList }}" bind:cancel="onHide" bind:confirm="onConfirm" />
</van-popup>
<notification id="qn-notification"/>

8
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%;
}

24
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 })

2
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(){

4
pages/home/index/index.wxml

@ -76,13 +76,13 @@
</van-cell-group>
<view style="height:16rpx"></view>
<van-cell-group>
<van-cell is-link clickable url="/pages/home/password/index">
<van-cell is-link clickable url="/pages/setting/password/index">
<view class="flex" slot="title" style="align-items: center">
<text class="cuIcon-lock text-black" style="font-size:36rpx"></text>
<text class="text-sg" style="margin-left:12rpx">修改密码</text>
</view>
</van-cell>
<van-cell is-link clickable url="/pages/home/mobile/index">
<van-cell is-link clickable url="/pages/setting/mobile/index">
<view class="flex" slot="title" style="align-items: center">
<text class="cuIcon-mobile text-black" style="font-size:36rpx"></text>
<text class="text-sg" style="margin-left:12rpx">修改手机号码</text>

12
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' })

2
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

2
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){

pages/home/authory/index.js → pages/setting/authory/index.js

pages/home/authory/index.json → pages/setting/authory/index.json

pages/home/authory/index.wxml → pages/setting/authory/index.wxml

@ -3,7 +3,6 @@
<view slot="content">实名认证</view>
</cu-custom>
<view class="cu-bar bg-white" style="min-height:90rpx" wx:if="{{step == 0}}">
<view class="action" style="color:#333333"><text class="text-red" style="padding-top: 18px;font-size: 30px;">*</text>请拍摄/上传本人身份证(头像面)</view>
</view>

pages/home/authory/index.wxss → pages/setting/authory/index.wxss

pages/client/bank-add/index.js → 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({
/**
* 页面的初始数据
*/

pages/home/mobile/index.json → pages/setting/bank-add/index.json

pages/client/bank-add/index.wxml → pages/setting/bank-add/index.wxml

@ -1,4 +1,4 @@
<!--pages/client/bank-add/index.wxml-->
<!--pages/setting/bank-add/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">添加银行卡</view>
</cu-custom>
@ -41,4 +41,6 @@
<view style="margin-top:20rpx;padding:80rpx 32rpx">
<van-button block type="info" bind:click="submitForm">{{form.type == 4 ? '提交' : '下一步'}}</van-button>
</view>
</view>
<notification id="qn-notification"/>

1
pages/setting/bank-add/index.wxss

@ -0,0 +1 @@
/* pages/setting/bank-add/index.wxss */

pages/client/bank-list/index.js → 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 })

7
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"
}
}

pages/client/bank-list/index.wxml → pages/setting/bank-list/index.wxml

@ -1,4 +1,4 @@
<!--pages/client/bank-list/index.wxml-->
<!--pages/setting/bank-list/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">我的银行卡</view>
</cu-custom>
@ -28,3 +28,4 @@
<van-dialog id="van-dialog" />
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" z-index="22" />
<notification id="qn-notification"/>

pages/client/bank-list/index.wxss → 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%;

2
pages/setting/index/index.wxml

@ -13,7 +13,7 @@
</view>
</view>
</van-cell>
<van-cell is-link clickable url="/pages/home/password/index">
<van-cell is-link clickable url="/pages/home/setting/index">
<view class="flex" slot="title" style="align-items: center">
<text class="text-sg">修改密码</text>
</view>

pages/home/mobile/index.js → pages/setting/mobile/index.js

pages/home/password/index.json → pages/setting/mobile/index.json

pages/home/mobile/index.wxml → pages/setting/mobile/index.wxml

pages/home/mobile/index.wxss → pages/setting/mobile/index.wxss

pages/home/password/index.js → pages/setting/password/index.js

7
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"
}
}

pages/home/password/index.wxml → pages/setting/password/index.wxml

pages/home/password/index.wxss → pages/setting/password/index.wxss

pages/client/withdrawal/index.js → 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 => {
})
}

pages/client/withdrawal/index.json → pages/setting/withdrawal/index.json

pages/client/withdrawal/index.wxml → pages/setting/withdrawal/index.wxml

@ -1,4 +1,4 @@
<!--pages/client/withdrawal/index.wxml-->
<!--pages/setting/withdrawal/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">申请提现</view>

1
pages/setting/withdrawal/index.wxss

@ -0,0 +1 @@
/* pages/setting/withdrawal/index.wxss */
Loading…
Cancel
Save