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