fixed 修改店铺经营类目为树形(二级)
This commit is contained in:
parent
6ad52eb2c6
commit
fdb97bee30
@ -81,36 +81,17 @@ Page({
|
||||
|
||||
|
||||
// 选项切换
|
||||
onColumnChange(e) {},
|
||||
onPick(e) {},
|
||||
|
||||
// 选中
|
||||
onPickerChange(e) {
|
||||
const {
|
||||
key
|
||||
} = e.currentTarget.dataset;
|
||||
const {
|
||||
value,
|
||||
label
|
||||
} = e.detail;
|
||||
|
||||
const { selectedOptions, value } = e.detail;
|
||||
this.setData({
|
||||
[`${key}Visible`]: false,
|
||||
[`shopInfo.ShopBusinessCategoryGuid`]: value,
|
||||
[`${key}Text`]: label.join(' '),
|
||||
[`shopBusinessCategoryText`]: selectedOptions.map((item) => item.label).join('/'),
|
||||
});
|
||||
},
|
||||
|
||||
// 选项取消
|
||||
onPickerCancel(e) {
|
||||
const {
|
||||
key
|
||||
} = e.currentTarget.dataset;
|
||||
this.setData({
|
||||
[`${key}Visible`]: false,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 选择经营类目
|
||||
onshopBusinessCategoryPicker() {
|
||||
this.setData({
|
||||
|
@ -9,7 +9,9 @@
|
||||
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
|
||||
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
|
||||
"t-cell": "tdesign-miniprogram/cell/cell",
|
||||
"t-toast": "tdesign-miniprogram/toast/toast"
|
||||
"t-toast": "tdesign-miniprogram/toast/toast",
|
||||
"t-tree-select": "tdesign-miniprogram/tree-select/tree-select",
|
||||
"t-cascader": "tdesign-miniprogram/cascader/cascader"
|
||||
},
|
||||
"navigationBarTitleText": "申请开店"
|
||||
}
|
@ -3,44 +3,23 @@
|
||||
<view class="apply-shop-container">
|
||||
|
||||
<t-cell class="mb-16" title="经营类目" arrow hover note="{{shopBusinessCategoryText}}" bind:click="onshopBusinessCategoryPicker" />
|
||||
<t-input value="{{shopInfo.ShopName}}" bindchange="onChangeShopName" label="店铺名称" maxlength="10" placeholder="请输入店铺名称" align="right" />
|
||||
<t-textarea
|
||||
value="{{shopInfo.ShopIntro}}"
|
||||
t-class="external-class"
|
||||
label="店铺简介"
|
||||
placeholder="设置最大字符个数"
|
||||
maxlength="50"
|
||||
bindchange="onChangeShopIntro"
|
||||
disableDefaultPadding="{{true}}"
|
||||
indicator
|
||||
/>
|
||||
<t-input value="{{shopInfo.ShopName}}" bindchange="onChangeShopName" label="店铺名称" maxlength="10" placeholder="请输入店铺名称" align="right" />
|
||||
<t-textarea value="{{shopInfo.ShopIntro}}" t-class="external-class" label="店铺简介" placeholder="设置最大字符个数" maxlength="50" bindchange="onChangeShopIntro" disableDefaultPadding="{{true}}" indicator />
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="wrapper-title">店铺Logo</view>
|
||||
<t-upload
|
||||
mediaType="{{['image']}}"
|
||||
max="{{1}}"
|
||||
files="{{shopInfo.ShopLogo}}"
|
||||
bind:add="handleAddLogo"
|
||||
bind:remove="handleRemoveLogo"
|
||||
>
|
||||
<t-upload mediaType="{{['image']}}" max="{{1}}" files="{{shopInfo.ShopLogo}}" bind:add="handleAddLogo" bind:remove="handleRemoveLogo">
|
||||
</t-upload>
|
||||
</view>
|
||||
|
||||
<view class="wrapper">
|
||||
<view class="wrapper-title">营业执照</view>
|
||||
<t-upload
|
||||
mediaType="{{['image']}}"
|
||||
max="{{1}}"
|
||||
files="{{shopInfo.ShopBusinessLicense}}"
|
||||
bind:add="handleAddShopBusinessLicense"
|
||||
bind:remove="handleRemoveShopBusinessLicense"
|
||||
>
|
||||
<t-upload mediaType="{{['image']}}" max="{{1}}" files="{{shopInfo.ShopBusinessLicense}}" bind:add="handleAddShopBusinessLicense" bind:remove="handleRemoveShopBusinessLicense">
|
||||
</t-upload>
|
||||
</view>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<view class="sub-btn-pos-box">
|
||||
<view class="sub-btn-pos-box">
|
||||
<view class="sub-btn-box">
|
||||
<van-button class="sub-btn" type="info" size="large" round block bind:click="submit">提交</van-button>
|
||||
</view>
|
||||
@ -48,8 +27,8 @@
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<t-picker
|
||||
<!-- 单选 -->
|
||||
<!-- <t-picker
|
||||
visible="{{shopBusinessCategoryVisible}}"
|
||||
value="{{shopInfo.ShopBusinessCategoryGuid}}"
|
||||
data-key="shopBusinessCategory"
|
||||
@ -61,5 +40,16 @@
|
||||
bindcancel="onPickerCancel"
|
||||
>
|
||||
<t-picker-item options="{{shopBusinessCategoryList}}"></t-picker-item>
|
||||
</t-picker>
|
||||
</t-picker> -->
|
||||
|
||||
<!-- 树形 -->
|
||||
<t-cascader
|
||||
visible="{{shopBusinessCategoryVisible}}"
|
||||
value="{{shopInfo.ShopBusinessCategoryGuid}}"
|
||||
options="{{shopBusinessCategoryList}}"
|
||||
title="请选择地址"
|
||||
bind:change="onPickerChange"
|
||||
bind:pick="onPick"
|
||||
/>
|
||||
|
||||
<t-toast id="t-toast" />
|
Loading…
Reference in New Issue
Block a user