更新企微投放权限
This commit is contained in:
@@ -278,7 +278,7 @@ const constantRoutes = [
|
||||
{
|
||||
path: 'enterprise-weChat',
|
||||
name: 'enterprise-weChat',
|
||||
meta: { showPreview: false, showPublish: false, keepAlive: true, showShare: true },
|
||||
meta: { showPreview: false, showPublish: false, keepAlive: true, showShare: true, permission:'super_admin_flag' },
|
||||
component: () => import(/* webpackChunkName: "publish" */ '@/views/Publish/launch-center/launch-task/enterpriseWeChat')
|
||||
},
|
||||
// {
|
||||
@@ -424,6 +424,16 @@ router.beforeEach((to, from, next) => {
|
||||
// window.parent.location.href = 'https://yip-uat.dctest.digitalyili.com/login';
|
||||
}
|
||||
}
|
||||
if(!to.meta.permission) {
|
||||
next()
|
||||
return
|
||||
}
|
||||
if(!JSON.parse(localStorage.getItem('plantUserInfo'))[to.meta.permission]) {
|
||||
next({
|
||||
path:'/error/404',
|
||||
})
|
||||
return
|
||||
}
|
||||
next()
|
||||
})
|
||||
export default router
|
||||
|
||||
@@ -55,6 +55,7 @@ export default defineComponent({
|
||||
const { data } = await loginIn();
|
||||
localStorage.setItem("plantUserInfo", JSON.stringify(data));
|
||||
localStorage.setItem("plantId", JSON.stringify(data.id));
|
||||
store.commit("common/M_COMMON_SET_USERINFO", JSON.stringify(data));
|
||||
} catch (error) {
|
||||
this.$message.error(
|
||||
error.data?.message || error.message || "服务器错误"
|
||||
|
||||
@@ -69,44 +69,44 @@
|
||||
</div>
|
||||
<div v-else></div>
|
||||
<a-modal
|
||||
v-model:visible="visible"
|
||||
wrapClassName="custom-modal"
|
||||
width="624px"
|
||||
style="height:368px"
|
||||
:destroyOnClose="true"
|
||||
:centered="true"
|
||||
:maskClosable="false"
|
||||
:footer="null"
|
||||
@cancel="onCancel"
|
||||
title="选择投放类型"
|
||||
>
|
||||
<div class="delivery-type">
|
||||
<div class="wechat-type" :class="isSelected===1?'selected':''" @click="onSelected(1)">
|
||||
<div class="title">
|
||||
<img :src="require('@/assets/img/business_wechat.png')" alt="">
|
||||
<span>企业微信</span>
|
||||
</div>
|
||||
<div class="present">
|
||||
<p>适用于内部员工调研</p>
|
||||
<p>可指定多成员、多部门、多标签参与</p>
|
||||
</div>
|
||||
<a-button class="custom-button" style="color: #000;" @click="onNewBuilt(1)">
|
||||
开始新建
|
||||
</a-button>
|
||||
v-model:visible="visible"
|
||||
wrapClassName="custom-modal"
|
||||
:width="userInfo.super_admin_flag?'624px':''"
|
||||
style="height:368px"
|
||||
:destroyOnClose="true"
|
||||
:centered="true"
|
||||
:maskClosable="false"
|
||||
:footer="null"
|
||||
@cancel="onCancel"
|
||||
title="选择投放类型"
|
||||
>
|
||||
<div class="delivery-type">
|
||||
<div class="wechat-type" :class="isSelected===1?'selected':''" @click="onSelected(1)" v-if="userInfo.super_admin_flag">
|
||||
<div class="title">
|
||||
<img :src="require('@/assets/img/business_wechat.png')" alt="">
|
||||
<span>企业微信</span>
|
||||
</div>
|
||||
<div class="wechat-type" :class="isSelected===2?'selected':''" @click="onSelected(2)">
|
||||
<div class="title">小程序</div>
|
||||
<div class="present program">
|
||||
<p>通过消息中心传递至小程序</p>
|
||||
<p>请先联系小程序运营人员支持标签参与</p>
|
||||
</div>
|
||||
<div class="typeBtn"></div>
|
||||
<a-button class="custom-button" style="color: #000;" @click="onNewBuilt(2)">
|
||||
开始新建
|
||||
</a-button>
|
||||
<div class="present">
|
||||
<p>适用于内部员工调研</p>
|
||||
<p>可指定多成员、多部门、多标签参与</p>
|
||||
</div>
|
||||
<a-button class="custom-button" style="color: #000;" @click="onNewBuilt(1)">
|
||||
开始新建
|
||||
</a-button>
|
||||
</div>
|
||||
</a-modal>
|
||||
<div class="wechat-type" :class="isSelected===2?'selected':''" @click="onSelected(2)">
|
||||
<div class="title">小程序</div>
|
||||
<div class="present program">
|
||||
<p>通过消息中心传递至小程序</p>
|
||||
<p>请先联系小程序运营人员支持标签参与</p>
|
||||
</div>
|
||||
<div class="typeBtn"></div>
|
||||
<a-button class="custom-button" style="color: #000;" @click="onNewBuilt(2)">
|
||||
开始新建
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
import launchListEmpty from "../components/launchListEmpty.vue";
|
||||
import shareLinks from "../components/shareLinks.vue";
|
||||
import SubTitle from "@/views/DataAnalyse/components/SubTitle.vue";
|
||||
import { reactive, ref } from "@vue/reactivity";
|
||||
import { reactive, ref, computed } from "@vue/reactivity";
|
||||
// import { list } from "../api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import createQuantityLimit from "../components/createQuantityLimit.vue";
|
||||
@@ -125,6 +125,7 @@ import { Modal } from "ant-design-vue";
|
||||
import Pagination, { getPagination } from "@components/Pagination.vue";
|
||||
// import { getAnswerSetting } from "@/views/planetDesign/api/api";
|
||||
import { canPlanetPublish } from "@/Layouts/utils.js";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -293,6 +294,12 @@ export default {
|
||||
const onCancel = () => {
|
||||
isSelected.value = 0
|
||||
}
|
||||
const store = useStore();
|
||||
// 判断超管权限
|
||||
let userInfo = computed((state) => {
|
||||
const info = store.state.common.userInfo
|
||||
return info||{}
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchInfo(route.query.sn);
|
||||
@@ -331,6 +338,7 @@ export default {
|
||||
onCancel,
|
||||
onNewBuilt,
|
||||
shareRef,
|
||||
userInfo,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user