Commit ff4e19e1 by chenwq

bug修复

1 parent e37f8c63
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
margin-right: 12rpx; margin-right: 12rpx;
border-radius: 50%;
} }
.message-text { .message-text {
......
...@@ -15,20 +15,20 @@ ...@@ -15,20 +15,20 @@
<image wx:if="{{item.weChatAvatarUrl}}" src="{{item.weChatAvatarUrl}}" class="avatar" /> <image wx:if="{{item.weChatAvatarUrl}}" src="{{item.weChatAvatarUrl}}" class="avatar" />
<glsx-image wx:else src="personal/staff_defalut_avatar.png" class="avatar" /> <glsx-image wx:else src="personal/staff_defalut_avatar.png" class="avatar" />
<view class="message-text"> <view class="message-text">
<view class="merchant">{{item.merchantName}}</view> <view class="merchant">{{item.employeeName || ''}}</view>
<view class="contact">{{item.contactName}} {{item.phone}}</view> <view class="contact">{{item.phone}}</view>
</view> </view>
</view> </view>
<view class="department"> <view class="department">
<glsx-image src="personal/icon-department.png" class="icon-department" /> <glsx-image src="personal/icon-department.png" class="icon-department" />
<view>{{item.departmentName}}</view> <view>{{item.departmentName || ''}}</view>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="sale_name"> <view class="sale_name">
所属:{{item.merchantCustomerName}} 所属:{{item.merchantCustomerName}}
</view> </view>
<view class="time">{{item.createdDate}}</view> <view class="time">{{item.createdDate || ''}}</view>
</view> </view>
</view> </view>
<view class="bottomTips" wx:if="{{saleList.length>10}}">到底啦!</view> <view class="bottomTips" wx:if="{{saleList.length>10}}">到底啦!</view>
......
...@@ -77,11 +77,41 @@ Page({ ...@@ -77,11 +77,41 @@ Page({
}) })
}, },
dealFormItem() {
let { formItems } = this.data
if (this.data.addOrEdit == 'add') {
formItems.shift()
this.setData({
formItems
})
} else {
wx.setNavigationBarTitle({ title: '编辑服务中心' })
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options?.isRedirect) {
this.setData({
addOrEdit: options?.addOrEdit || 'add'
})
this.dealFormItem()
return true
}
wx.$router.getData(res => {
let { addOrEdit, target } = res
this.setData({
addOrEdit: addOrEdit || 'add',
formData: {
...target,
oldPhone: target.phone || '',
oldMerchantName: target.merchantName || ''
}
})
this.dealFormItem()
})
}, },
/** /**
...@@ -95,27 +125,7 @@ Page({ ...@@ -95,27 +125,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
let { formItems } = this.data
wx.$router.getData(res => {
console.log(res)
let { addOrEdit, target } = res
this.setData({
addOrEdit: addOrEdit || 'add',
formData: {
...target,
oldPhone: target.phone || '',
oldMerchantName: target.merchantName || ''
}
})
if (this.data.addOrEdit == 'add') {
formItems.shift()
this.setData({
formItems
})
} else {
wx.setNavigationBarTitle({ title: '编辑服务中心' })
}
})
}, },
/** /**
......
...@@ -3,13 +3,13 @@ const obj = { ...@@ -3,13 +3,13 @@ const obj = {
service: { service: {
navigationTitle: '创建服务中心', navigationTitle: '创建服务中心',
primaryBtn: '继续创建服务中心', primaryBtn: '继续创建服务中心',
primaryCallback: 'packageMine.editService', primaryCallback: 'packageMine.editService?addOrEdit=add&isRedirect=true',
cancelBtn: 'S后自动跳转我的服务中心' cancelBtn: 'S后自动跳转我的服务中心'
}, },
customer: { customer: {
navigationTitle: '创建客户', navigationTitle: '创建客户',
primaryBtn: '邀请销售顾问', primaryBtn: '邀请销售顾问',
primaryCallback: 'packageMine.editService', primaryCallback: 'packageMine.editCustomer?addOrEdit=add',
cancelBtn: 'S后自动跳转我的客户' cancelBtn: 'S后自动跳转我的客户'
}, },
staff: { staff: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!