Commit 11b94e54 by crushh

update: 插入链接的展示

parent bccabe74
......@@ -22,6 +22,8 @@ export default {
getUserLogin().then(res => {
if (res.errorCode === 0) {
this.userId = res.result && res.result.userId;
const wxaLinkFlag = res.result && res.result.wxaLinkFlag;
localStorage.setItem('wxaLinkFlag', wxaLinkFlag);
}
});
},
......
......@@ -67,7 +67,7 @@
</ul>
</div>
</el-popover>
<template v-if="userData.wxaLinkFlag == 1">
<template v-if="wxaLinkFlag == 1">
<span class="line"></span>
<el-button type="text" @click="transferLink.show = true">插入小程序链接</el-button>
<!-- <el-button type="text" @click="reduceLink.show = true">压缩H5链接</el-button> -->
......@@ -148,7 +148,7 @@
import linktools from '@/components/linktools-fulls/index';
import { _debounce } from '@/utils/index';
import { saveTempService, LoadTempInfo, checkSmsContext } from '@/service/api/messageApi.js';
import { compressLink, getTransferLink, getUserLogin, getSign } from '@/service/api/commonApi.js';
import { compressLink, getTransferLink, getSign } from '@/service/api/commonApi.js';
export default {
name: 'add-temp',
components: { linktools },
......@@ -206,7 +206,7 @@ export default {
remark: { required: true, message: '请输入申请说明', trigger: 'blur' }
},
editFlag: this.$route.meta.type === 'edit',
userData: {},
wxaLinkFlag: JSON.parse(localStorage.getItem('wxaLinkFlag')),
// 压缩链接
reduceLink: {
show: false,
......@@ -296,8 +296,8 @@ export default {
const sign = await getSign();
this.form.sign = sign.result.signText ? `【${sign.result.signText}】` : '';
}
this.getUserData();
},
methods: {
submit: _debounce(function(formName) {
this.$refs[formName].validate(valid => {
......@@ -345,11 +345,6 @@ export default {
};
this.loading = false;
},
getUserData() {
getUserLogin().then(res => {
this.userData = res.result || {};
});
},
// 生成短连接
onReduceLink() {
if (!this.reduceLink.link) {
......
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