Commit fef2e9ed authored by 黄奎's avatar 黄奎

新增页面

parent 73bb01c2
<style>
.copyrightset .mimitBody {
padding: 20px;
background-color: #fff;
margin: 10px 0 20px 0;
display: table;
width: 100%;
}
.copyrightset .mimitList {
margin-bottom: 15px;
display: flex;
flex-direction: row;
}
.copyrightset .mimitBody .el-tag {
min-width: 120px;
padding-right: 50px;
}
.copyrightset .el-button--small {
padding: 9px 25px;
}
</style>
<template>
<div class="copyrightset">
<div class="CommonHeader">版权设置</div>
<div class="mimitBody">
<el-form :model="copyRightMsg" ref="copyRightMsg" label-width="150px">
<el-form-item label="版权开关">
<el-switch v-model="copyRightMsg.IsOpenCopyRight" :active-value="0" :inactive-value="1"></el-switch>
</el-form-item>
<el-form-item label="底部版权文字">
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="copyRightMsg.CopyRightWord">
</el-input>
</el-form-item>
<el-form-item label="底部版权图标">
<div>
<el-tooltip class="item" effect="dark" content="建议尺寸:160*50" placement="top-start">
<el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage">
<el-button size="small">选择图片</el-button>
</el-upload>
</el-tooltip>
</div>
<div class="indexApp_image">
<img v-if="copyRightMsg.CopyRightImg" :src="copyRightMsg.CopyRightImg" alt="" />
</div>
</el-form-item>
<el-form-item label="底部版权链接">
<el-input style="width:250px" size="small" maxlength="200" v-model="copyRightMsg.CopyRightLink">
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="UpdateCopyRight()">确 定</el-button>
</span>
</div>
</div>
</template>
<script>
export default {
data() {
return {
//修改版权MSG
copyRightMsg: {
MallBaseId: 0, //小程序Id
CopyRightWord: '', //版权文字
CopyRightImg: '', //版权图片
CopyRightLink: '', //版权链接
IsOpenCopyRight: 0, //是否开启版权设置(0-开启,1-关闭)
},
};
},
created() {
},
methods: {
//选择图片
UploadImage(file) {
this.UploadFileToTencent(this.FileType().UserImg, file.file, res => {
if (res.resultCode == 1) {
this.copyRightMsg.CopyRightImg = res.FileUrl;
}
})
},
//版权信息
GetCopyRight() {
this.copyRightMsg.MallBaseId = this.getLocalStorage().MallBaseId;
this.apipost("/api/Tenant/GetMiniPrograme", {
MallBaseId: this.copyRightMsg.MallBaseId,
}, res => {
if (res.data.resultCode == 1) {
this.copyRightMsg.CopyRightWord = res.data.data.CopyRightWord;
this.copyRightMsg.CopyRightImg = res.data.data.CopyRightImg;
this.copyRightMsg.CopyRightLink = res.data.data.CopyRightLink;
this.copyRightMsg.IsOpenCopyRight = res.data.data.IsOpenCopyRight;
} else {
this.Info(res.data.message);
}
})
},
//修改版权
UpdateCopyRight() {
this.apipost("/api/Tenant/SetMiniProgrameCopyRight", this.copyRightMsg, res => {
if (res.data.resultCode == 1) {
this.GetCopyRight();
this.Success("操作成功!");
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.GetCopyRight();
}
};
</script>
......@@ -163,6 +163,12 @@ export default new Router({
name: 'minititle',
component: resolve => require(['@/components/StoreDesign/minititle'], resolve),
}
, //店铺管理 版权设置
{
path: '/copyrightset',
name: 'copyrightset',
component: resolve => require(['@/components/StoreDesign/copyrightset'], resolve),
}
]
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment