Commit 873b8a25 by chenwq

服务中心联调

1 parent 163920de
......@@ -21,6 +21,11 @@ const formRule = {
}
const formItems = [{
label: '商户号',
props: 'merchantId',
type: 'input',
disabled: true
}, {
label: '服务中心名称',
props: 'merchantName',
type: 'input',
......@@ -44,6 +49,7 @@ const formItems = [{
tips: '(可用于PC端登录)',
props: 'password',
type: 'input',
inputType: 'safe-password',
password: true,
placeholder: '请输入登录密码(6-20位字母+数字)',
maxlength: 20
......
......@@ -62,6 +62,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let { formItems } = this.data
wx.$router.getData(res => {
let { addOrEdit, target } = res
this.setData({
......@@ -71,6 +72,12 @@ Page({
oldPhone: target.phone || ''
}
})
if (addOrEdit == 'add') {
formItems.shift()
this.setData({
formItems
})
}
})
},
......
......@@ -37,6 +37,10 @@
color: #323436;
}
.input-disabled {
background: #E1E2E6;
}
.select-box {
display: flex;
justify-content: space-between;
......
......@@ -7,8 +7,8 @@
<view class="form-content">
<block wx:for="{{formItems}}" wx:key="index">
<view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view>
<view class="input-box" wx:if="{{item.type == 'input'}}">
<input type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{formData[item.props]}}" password="{{item.password}}" placeholder-class="input-placeholder" data-attr="{{item.props}}" bindinput="handleInput" />
<view class="input-box {{item.disabled ? 'input-disabled' : ''}}" wx:if="{{item.type == 'input'}}">
<input placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{formData[item.props]}}" type="{{item.inputType || 'text'}}" password="{{item.password}}" disabled="{{item.disabled}}" placeholder-class="input-placeholder" data-attr="{{item.props}}" bindinput="handleInput" />
</view>
<view class="select-box" wx:if="{{item.type == 'select'}}" bindtap="jump" data-type="{{item.pageType}}">
<view class="name" wx:if="{{formData[item.valueFn]}}">{{formData[item.valueFn]}}</view>
......
......@@ -23,6 +23,7 @@ Page({
addOrEdit: type,
target: e.currentTarget.dataset?.target || {}
}
delete params.target?.createdDate
wx.$router.go('packageMine.editService', params)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!