fix: 采集跳转问题

This commit is contained in:
From-wh 2023-03-06 09:31:10 +08:00
parent b2f2bd0a43
commit 40af13b9c9
4 changed files with 88 additions and 77 deletions

View File

@ -1,87 +1,83 @@
<template>
<div>
<div class="i-layout-page-header header-title">
<span class="ivu-page-header-title" v-if="!isShowList">短信账户</span>
<div v-if="isShowList" class="acea-row row-between-wrapper picTxt">
<div slot="content">
<Avatar class="dashboard-workplace-header-avatar" :src="imgUrl" />
<div class="dashboard-workplace-header-tip">
<p class="dashboard-workplace-header-tip-title">{{ smsAccount }},祝您每一天开心!</p>
<p class="dashboard-workplace-header-tip-desc">
<a href="#" @click="onChangePassswordIndex">修改密码</a>
<Divider type="vertical" />
<!-- <a href="#" @click="onChangePhone">修改手机号</a>
<span class="ivu-page-header-title" v-if="!isShowList">短信账户</span>
<div v-if="isShowList" class="acea-row row-between-wrapper picTxt">
<div slot="content">
<Avatar class="dashboard-workplace-header-avatar" :src="imgUrl" />
<div class="dashboard-workplace-header-tip">
<p class="dashboard-workplace-header-tip-title">{{ smsAccount }},祝您每一天开心!</p>
<p class="dashboard-workplace-header-tip-desc">
<a href="#" @click="onChangePassswordIndex">修改密码</a>
<Divider type="vertical" />
<!-- <a href="#" @click="onChangePhone">修改手机号</a>
<Divider type="vertical" /> -->
<a href="#" @click="signOut">退出登录</a>
</p>
</div>
<a href="#" @click="signOut">退出登录</a>
</p>
</div>
<div class="dashboard">
<div class="dashboard-workplace-header-extra">
<div class="acea-row">
<div class="header-extra">
<p class="mb5"><span>短信条数</span></p>
<div v-if="sms.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('sms')">开通服务</Button>
</div>
<div v-else>
<p>{{ sms.num || 0 }}</p>
<Button
size="small"
type="primary"
class="mt3 samll_font"
style="textalign: center"
@click="mealPay('sms')"
>套餐购买</Button
>
</div>
</div>
<div class="dashboard">
<div class="dashboard-workplace-header-extra">
<div class="acea-row">
<div class="header-extra">
<p class="mb5"><span>短信条数</span></p>
<div v-if="sms.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('sms')">开通服务</Button>
</div>
<div class="header-extra">
<p class="mb5"><span>采集次数</span></p>
<div v-if="copy.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('copy')">开通服务</Button>
</div>
<div v-else>
<p>{{ copy.num || 0 }}</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="mealPay('copy')"
>套餐购买</Button
>
</div>
<div v-else>
<p>{{ sms.num || 0 }}</p>
<Button
size="small"
type="primary"
class="mt3 samll_font"
style="textalign: center"
@click="mealPay('sms')"
>套餐购买</Button
>
</div>
<div class="header-extra">
<p class="mb5"><span>物流查询次数</span></p>
<div v-if="query.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('query')"
>开通服务</Button
>
</div>
<div v-else>
<p>{{ query.num || 0 }}</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="mealPay('expr_query')"
>套餐购买</Button
>
</div>
</div>
<div class="header-extra">
<p class="mb5"><span>采集次数</span></p>
<div v-if="copy.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('copy')">开通服务</Button>
</div>
<div class="header-extra" style="border: none">
<p class="mb5"><span>面单打印次数</span></p>
<div v-if="dump.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('dump')">开通服务</Button>
</div>
<div v-else>
<p>{{ dump.num || 0 }}</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="mealPay('expr_dump')"
>套餐购买</Button
>
</div>
<div v-else>
<p>{{ copy.num || 0 }}</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="mealPay('copy')">套餐购买</Button>
</div>
</div>
<div class="header-extra">
<p class="mb5"><span>物流查询次数</span></p>
<div v-if="query.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('query')">开通服务</Button>
</div>
<div v-else>
<p>{{ query.num || 0 }}</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="mealPay('expr_query')"
>套餐购买</Button
>
</div>
</div>
<div class="header-extra" style="border: none">
<p class="mb5"><span>面单打印次数</span></p>
<div v-if="dump.open === 0">
<p>暂未开通</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="onOpen('dump')">开通服务</Button>
</div>
<div v-else>
<p>{{ dump.num || 0 }}</p>
<Button size="small" type="primary" class="mt3 samll_font" @click="mealPay('expr_dump')"
>套餐购买</Button
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<Card :bordered="false" dis-hover class="ivu-mt" style="min-height: 600px">
<login-from
@ -269,7 +265,7 @@ export default {
onLogin() {
let url = this.$route.query.url;
if (url) {
this.$router.replace(url);
this.$router.replace(url + '?type=' + this.$route.query.type);
} else {
this.isShowLogn = false;
this.isShow = false;

View File

@ -106,6 +106,7 @@ export default {
created() {
this.isChecked = this.$route.query.type;
this.onIsLogin();
console.log(this.$route);
},
methods: {
// 查看是否登录
@ -116,7 +117,12 @@ export default {
let data = res.data;
if (!data.status) {
this.$Message.warning('请先登录');
this.$router.push(this.$routeProStr + '/setting/sms/sms_config/index?url=' + this.$route.path);
this.$router.push({
path: this.$routeProStr + '/setting/sms/sms_config/index?url=' + this.$route.path,
query: {
type: this.$route.query.type,
},
});
} else {
this.getServeInfo();
this.getPrice();

View File

@ -7,7 +7,9 @@
>如何配置密钥</a
>
<span v-else
>您当前剩余{{ copyConfig.copy_num }}条采集次数,<a href="#" @click="mealPay('copy')">增加采集次数</a></span
>您当前剩余{{ copyConfig.copy_num }}条采集次数,<span class="add" @click="mealPay('copy')"
>增加采集次数</span
></span
>
</div>
<div>商品采集设置:设置 > 系统设置 > 第三方接口设置 > 采集商品配置</div>
@ -72,6 +74,7 @@ export default {
},
methods: {
mealPay(val) {
console.log(val);
this.$router.push({ path: this.$routeProStr + '/setting/sms/sms_pay/index', query: { type: val } });
},
getCopyConfig() {
@ -115,7 +118,10 @@ export default {
.Box .ivu-radio-wrapper {
margin-right: 25px;
}
.add{
color: #2D8cF0;
cursor pointer
}
.Box .numPut {
width: 100% !important;
}

View File

@ -7,7 +7,7 @@
>如何配置密钥</a
>
<span v-else
>您当前剩余{{ copyConfig.copy_num }}条采集次数,<a href="#" @click="mealPay('copy')">增加采集次数</a></span
>您当前剩余{{ copyConfig.copy_num }}条采集次数,<a class="add" @click="mealPay('copy')">增加采集次数</a></span
>
</div>
<div>商品采集设置:设置 > 系统设置 > 第三方接口设置 > 采集商品配置</div>
@ -721,7 +721,10 @@ export default {
.Box .numPut {
width: 100% !important;
}
.add{
color: #2D8cF0;
cursor pointer
}
.lunBox {
/* width 80px */
display: flex;