Commit 1e773bfe by chenwq

bug修复

1 parent 9df04358
......@@ -65,6 +65,10 @@ Page({
this.getList(true)
},
scrollonReachBottom() {
this.getList()
},
getList(isReset = false) {
let { customerList, pageCof, total, selectInfo } = this.data
if (total == customerList.length) {
......
......@@ -16,7 +16,7 @@
</view>
</view>
</view>
<scroll-view wx:if="{{customerList.length}}" scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="onRefreshBottom" bindscrolltolower="getList" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<scroll-view wx:if="{{customerList.length}}" scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="onRefreshBottom" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{customerList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="top">
<view class="message">
......
......@@ -142,7 +142,8 @@ Page({
addOrEdit,
formData: {
...target,
oldPhone: target?.phone
oldPhone: target?.phone,
oldMerchantName: target.merchantName || ''
}
})
if (addOrEdit == 'edit') {
......
......@@ -88,7 +88,7 @@ Page({
sceneStr = sceneStr + (sceneStr ? (',' + sceneToNum[item]) : sceneToNum[item])
})
let params = {
merchantId: customerInfo.serviceCenterMerchantId,
merchantId: customerInfo.merchantId,
staffLabel: sceneStr
}
mineCustomerApi.getInviteCode(params).then(res => {
......
......@@ -81,17 +81,33 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
let { formItems } = this.data
wx.$router.getData(res => {
console.log(res)
let { addOrEdit, target } = res
this.setData({
addOrEdit,
addOrEdit: addOrEdit || 'add',
formData: {
...target,
oldPhone: target.phone || ''
oldPhone: target.phone || '',
oldMerchantName: target.merchantName || ''
}
})
if (addOrEdit == 'add') {
if (this.data.addOrEdit == 'add') {
formItems.shift()
this.setData({
formItems
......@@ -103,20 +119,6 @@ Page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
......
......@@ -35,6 +35,10 @@ Page({
this.getList(true)
},
scrollonReachBottom() {
this.getList()
},
getList(isReset = false) {
let { serviceList, pageCof, total } = this.data
if (total == serviceList.length) {
......
......@@ -8,7 +8,7 @@
<view class="title-box">
<view class="title">服务中心数量:<text class="number">{{total < 0 ? 0 : total}}</text></view>
</view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="getList" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{serviceList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="top">
<view class="message">
......
......@@ -34,16 +34,15 @@ Page({
}, {
name: '服务中心管理',
path: 'packageMine.serviceList',
hasRedPot: true,
isRead: false
isHide: true
}, {
name: '员工管理',
path: 'packageMine.staffList',
hasRedPot: true,
isRead: false
isHide: true
}, {
name: '客户管理',
path: 'packageMine.customerList'
path: 'packageMine.customerList',
isHide: true
}],
isShowService: false,
},
......@@ -145,6 +144,19 @@ Page({
})
},
judgeIsHide() {
let { boxItemList, userInfo } = this.data
let nameList = ['服务中心管理', '员工管理', '客户管理']
if(!userInfo.isSuper) {
nameList.forEach(item => {
let idx = boxItemList.findIndex(k => k.name == item)
this.setData({
[`boxItemList[${idx}].isHide`]: false
})
})
}
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -162,6 +174,7 @@ Page({
this.setData({
isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
})
this.judgeIsHide()
console.log(serviceMerchantId)
},
/**
......
......@@ -15,11 +15,13 @@
<view class="utilBoxTitle">常用工具</view>
<view class="boxItemCon">
<view wx:for="{{boxItemList}}" wx:key="index" class="item" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO">
<view class="imgcon">
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" />
<glsx-image class="img" src="{{IMAGES['icon' + index]}}" />
</view>
<view class="name">{{item.name}}</view>
<block wx:if="{{!item.isHide}}">
<view class="imgcon">
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" />
<glsx-image class="img" src="{{IMAGES['icon' + index]}}" />
</view>
<view class="name">{{item.name}}</view>
</block>
</view>
<!-- <view class="item" data-path="packagesList.customerManagement" bind:tap="navGO">
<view class="imgcon">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!