mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
【新增】后台页面设计【导航组件】增加跳转到其他小程序的下拉设置。
This commit is contained in:
@@ -305,6 +305,19 @@ module.exports = {
|
||||
} else if (type == navLinkType.shopCategory) {
|
||||
//商品分类
|
||||
this.$u.route('/pages/category/list/list', { id: val });
|
||||
} else if (type == navLinkType.wxMiNiProgram) {
|
||||
//跳转微信小程序
|
||||
console.log("跳转微信小程序");
|
||||
uni.navigateToMiniProgram({
|
||||
appId: val,
|
||||
path: '',
|
||||
extraData: {},
|
||||
success(res) {
|
||||
console.log("跳转小程序成功", res);
|
||||
}, fail(res) {
|
||||
console.log("跳转小程序失败", res);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.route(val);
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ export const navLinkType = {
|
||||
article: 3,// "文章"
|
||||
articleCategory: 4,// "文章分类",
|
||||
intelligentForms: 5,// "智能表单"
|
||||
shopCategory: 6// "商品分类"
|
||||
shopCategory: 6,// "商品分类"
|
||||
wxMiNiProgram: 7// "跳转小程序Appid"
|
||||
};
|
||||
|
||||
|
||||
@@ -652,6 +652,7 @@ Vue.component('select-link', {
|
||||
changeSelect: function () {
|
||||
this.$emit('update:type', this.selectType)
|
||||
this.$emit("update:id", '')
|
||||
this.$emit("update:linkUrl", '')
|
||||
},
|
||||
updateLinkValue: function () {
|
||||
this.$emit("update:id", this.linkUrl)
|
||||
@@ -866,7 +867,7 @@ Vue.component('layout-config', {
|
||||
coreHelper.Post(getDesign, { id: id }, function (e) {
|
||||
if (e.code === 0) {
|
||||
//console.log(e);
|
||||
linkType = { "1": "URL链接", "2": "商品", "6": "商品分类", "3": "文章", "4": "文章分类", "5": "智能表单" };
|
||||
linkType = { "1": "URL链接", "2": "商品", "6": "商品分类", "3": "文章", "4": "文章分类", "5": "智能表单", "7": "小程序AppId" };
|
||||
that.pageCode = e.data.model.code;
|
||||
that.brandList = e.data.brandList;
|
||||
that.pageConfig = e.data.pageConfig;
|
||||
|
||||
@@ -1218,8 +1218,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="链接指向:">
|
||||
<div v-if="selectType==1">
|
||||
<el-input type="textarea" autosize placeholder="http开头为webview跳转,其他为站内页面跳转" v-model="linkUrl"
|
||||
@change="updateLinkValue"></el-input>
|
||||
<el-input type="textarea" autosize placeholder="http开头为webview跳转,其他为站内页面跳转" v-model="linkUrl" @change="updateLinkValue"></el-input>
|
||||
</div>
|
||||
<div v-if="selectType==2">
|
||||
<input type="text" v-model="id" class="selectLinkVal" :readonly="true" @click="selectLink" placeholder="请选择">
|
||||
@@ -1240,6 +1239,9 @@
|
||||
<div v-if="selectType==6">
|
||||
<input type="text" v-model="id" class="selectLinkVal" :readonly="true" @click="selectLink" placeholder="请选择">
|
||||
</div>
|
||||
<div v-if="selectType==7">
|
||||
<el-input type="textarea" autosize placeholder="请填写小程序的appId" v-model="linkUrl" @change="updateLinkValue"></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user