提交 618a1778 编写于 作者: xingli.wu's avatar xingli.wu

Merge branch 'feature/wxl' into 'release'

feat: 保险入口页新增活动过期提醒、跳转路径修改

See merge request !296
......@@ -63,3 +63,12 @@ export const getActivityInfo = (params) => {
withCredentials: true,
});
};
export const insuranceStatusCheck = (params) => {
return request({
url: '/tis/insurance/merchant/check/projectOpened',
method: 'get',
params,
withCredentials: true,
});
};
......@@ -32,7 +32,8 @@
<div class="fixed-btn">
<div
class="wx-btn"
v-if="picaWechat != 'wechat'"
v-if="picaWechat !== 'wechat' || hideWeApp"
@click="handleClick"
>
<span>领取权益</span>
</div>
......@@ -72,7 +73,11 @@
</template>
<script>
import { getBanner, getRequestParm } from '@/api/entitlement';
import {
getBanner,
getRequestParm,
insuranceStatusCheck,
} from '@/api/entitlement';
import { uploadPointData } from '@/api/question';
import { isWeixin, isMobile } from '@/utils/index';
......@@ -90,7 +95,7 @@ export default {
envVersion: process.env.VUE_APP_MINI_PROGRAM_ENV,
openWebAppConfigPositive: {
username: 'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path: 'pagesInsurance/health-card/index', // 打开页面
path: 'pagesInsurance/my-right/index', // 打开页面
extraData: JSON.stringify({}),
},
bgPath: '',
......@@ -101,6 +106,7 @@ export default {
descList: [],
descBottomList: [],
},
hideWeApp: false,
};
},
created() {
......@@ -148,6 +154,7 @@ export default {
projectEquityNo === 'YX202306161001636491' ||
projectEquityNo === 'YX202302271000328363'
) {
this.handleInsuranceStatusCheck(projectEquityNo, rightsNo);
const url = `${window.location.origin}/pica-insurance/sz-public-new2?projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}`;
window.location.href = url;
return;
......@@ -168,8 +175,10 @@ export default {
this.getBanner(7, rightsNo || projectEquityNo);
this.getBanner2(36, rightsNo || projectEquityNo);
this.handleInsuranceStatusCheck(projectEquityNo, rightsNo);
// this.openWebAppConfigPositive.path = `pagesInsurance/health-card/index?channelCode=${channelCode}&projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}&rightsNo=${rightsNo}&userInfo=${userInfo}&identity=${identity}&token=${token}&cardNo=${cardNo}`;
this.openWebAppConfigPositive.path = `/pagesInsurance/my-right/index?channelCode=${channelCode}&projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}&rightsNo=${rightsNo}&userInfo=${userInfo}&identity=${identity}&token=${token}&cardNo=${cardNo}`;
this.openWebAppConfigPositive.path = `pagesInsurance/health-card/index?channelCode=${channelCode}&projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}&rightsNo=${rightsNo}&userInfo=${userInfo}&identity=${identity}&token=${token}&cardNo=${cardNo}`;
if (channelCode) uploadPointData({ channelCode });
this.$sendBuriedData(
{
......@@ -190,6 +199,16 @@ export default {
);
},
methods: {
handleInsuranceStatusCheck(projectEquityNo, rightsNo) {
insuranceStatusCheck({ projectEquityNo, rightsNo }).then((res) => {
if (res.code === '000000') {
this.hideWeApp = res.data === 0 ? true : false;
if (this.hideWeApp) {
return this.$toast('活动已结束');
}
}
});
},
getBanner(pageType, yunOrderNo) {
this.$loading.show();
getBanner(pageType, yunOrderNo).then((res) => {
......@@ -219,6 +238,11 @@ export default {
console.log('index', index);
window.location.href = this.staticINFO2.descBottomList[index];
},
handleClick() {
if (this.hideWeApp) {
this.$toast('活动已结束');
}
},
},
};
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册