feat(setting): 添加店铺H5和小程序二维码展示功能

This commit is contained in:
pikachu1995@126.com
2026-08-26 10:59:52 +08:00
parent 404492b7a3
commit ebcc0075ce
4 changed files with 229 additions and 1 deletions

View File

@@ -64,6 +64,14 @@
<el-form-item label="wap站点地址" prop="staticPageWapAddress">
<el-input v-model="formValidate.staticPageWapAddress" />
</el-form-item>
<el-form-item label="展示店铺H5地址" prop="showStoreH5Address">
<el-switch v-model="formValidate.showStoreH5Address" active-text="开" inactive-text="关" />
<span class="desc">开启后商家后台顶栏展示 H5 店铺首页二维码需先填写上方wap站点地址</span>
</el-form-item>
<el-form-item label="展示店铺小程序地址" prop="showStoreMpAddress">
<el-switch v-model="formValidate.showStoreMpAddress" active-text="开" inactive-text="关" />
<span class="desc">开启后商家后台顶栏展示小程序店铺首页码需先配置微信小程序且小程序已发布店铺页</span>
</el-form-item>
<div class="label-btns">
<el-button type="primary" @click="submit('formValidate')">保存</el-button>
</div>
@@ -106,6 +114,8 @@ export default {
siteName: "",
staticPageAddress: "",
staticPageWapAddress: "",
showStoreH5Address: false,
showStoreMpAddress: false,
},
selected: "",
ruleValidate: {},
@@ -150,8 +160,16 @@ export default {
},
init() {
this.result = JSON.parse(this.res);
this.formValidate = { ...this.result };
this.formValidate = {
...this.formValidate,
...this.result,
showStoreH5Address: this.result.showStoreH5Address === true,
showStoreMpAddress: this.result.showStoreMpAddress === true,
};
Object.keys(this.result).forEach((item) => {
if (item === "showStoreH5Address" || item === "showStoreMpAddress") {
return;
}
this.ruleValidate[item] = [
{
required: true,