提交 591d1dbb 编写于 作者: xinglee23's avatar xinglee23

feat: 三伏贴

上级 b40bd4d2
......@@ -45,3 +45,12 @@ export const getRequestParm = (params) => {
withCredentials: true,
});
};
export const getInsProjectInfo = (params) => {
return request({
url: '/activity/act/projectInfo',
method: 'get',
params,
withCredentials: true,
});
};
......@@ -143,6 +143,14 @@ const routerConfig = [
title: '惠民保癌筛权益领取',
},
},
{
path: '/sh-public',
name: 'sh-public',
component: () => import('@/views/sh-public/index.vue'),
meta: {
title: '上海惠民保',
},
},
{
path: '/sz-public-new2',
name: 'sz-public-new2',
......
<!-- eslint-disable -->
<template>
<div class="page-wrapper">
<!-- <img
v-if="bgPath"
class="pic"
:src="bgPath"
/> -->
<!-- <div
v-for="(url, index) in staticINFO.logoUrlList"
:key="index"
>
<img
class="pic"
:src="url"
/>
</div> -->
<div
v-for="(url, index) in insuranceInfo.descList"
:key="index"
@click="handleBanner(index)"
>
<img
class="pic"
:src="url"
/>
</div>
<div class="footer-box">
<div class="fixed-btn">
<div
class="wx-btn"
v-if="picaWechat !== 'wechat'"
>
<span>预约权益</span>
</div>
<wx-open-launch-weapp
v-else
style="display: block; width: 100%"
:username="openWebAppConfigPositive.username"
:path="openWebAppConfigPositive.path"
:env-version="envVersion"
@error="handleErrorFn"
@launch="handleLaunchFn"
>
<script type="text/wxtag-template">
<div class="wx-btn">
<span>预约权益</span>
</div>
<style>
.wx-btn {
display: block;
width: 93.33333%;
height: 40px;
margin: 5px auto;
border-radius: 40px;
font-size: 16px;
font-weight: 600;
color: #ffffff;
line-height: 40px;
text-align: center;
background: linear-gradient(270deg, #ff7400 0%, #fe4000 100%);
}
</style>
</script>
</wx-open-launch-weapp>
</div>
</div>
</div>
</template>
<script>
import { getInsProjectInfo } from '@/api/entitlement';
import { isWeixin, isMobile } from '@/utils/index';
export default {
data() {
return {
picaWechat: window._picaWechat,
headerInfo: {
title: '权益领取',
isBlack: true,
backMethod: 'web',
style: 'backgroundColor:#ffffff;zIndex:100;',
background: '',
},
envVersion: process.env.VUE_APP_MINI_PROGRAM_ENV,
openWebAppConfigPositive: {
username: 'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path: 'pagesInsurance/exclusively-activity/submit', // 打开页面
extraData: JSON.stringify({}),
},
bgPath: '',
insuranceInfo: {
descList: [],
},
};
},
created() {
console.log('🚀 isMobile', isMobile());
console.log('🚀 isWeixin', isWeixin());
if (!isMobile()) {
this.$dialog
.alert({
type: 'warning',
title: '提示',
message: '请使用手机微信打开!',
confirmButtonText: '我知道了',
})
.then(() => {
// on close
});
} else if (!isWeixin()) {
this.$dialog
.alert({
type: 'warning',
title: '提示',
message: '请在微信中扫码打开!',
confirmButtonText: '我知道了',
})
.then(() => {
// on close
});
}
},
async mounted() {
document.title = this.headerInfo.title;
let { rightsNo, projectEquityNo } = this.$route.query;
const result = await getInsProjectInfo({ rightsNo });
if (result.code === '000000') {
rightsNo = result.data.rightsNo;
projectEquityNo = result.data.projectEquityNo;
this.insuranceInfo = result.data.insuranceExplainInfoResp;
}
this.openWebAppConfigPositive.path = `pagesInsurance/exclusively-activity/submit?projectEquityNo=${projectEquityNo}&rightsNo=${rightsNo}&source=h5`;
this.$sendBuriedData(
{
action: 'ACTION_WEB_ENTER',
component_tag: `7802964#0#0#保险入口页面#${rightsNo}`,
web_data: {
rightsNo: rightsNo,
},
},
'enter'
);
},
methods: {
getProjectInfo() {
getInsProjectInfo({ rightsNo: 'RZH2024042650031001' }).then((res) => {
console.log('res', res);
});
},
handleErrorFn(e) {
console.log('handleErrorFn', e);
},
handleLaunchFn(e) {
console.log('handleLaunchFn', e);
},
handleBanner(index) {
console.log('index', index);
window.location.href = this.staticINFO2.descBottomList[index];
},
},
};
</script>
<style lang="scss" scoped>
.page-wrapper {
min-height: 100vh;
}
.footer-box {
height: 50px;
padding-bottom: calc(constant(safe-area-inset-bottom) / 2);
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
box-sizing: content-box;
}
.fixed-btn {
position: fixed;
left: 0;
right: 0;
bottom: 0;
height: 50px;
padding-bottom: calc(constant(safe-area-inset-bottom) / 2);
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
box-shadow: inset 0px 1px 0px 0px #e9e9e9;
background-color: #fff;
box-sizing: content-box;
z-index: 9999;
.wx-btn {
display: block;
width: 93.33333%;
height: 40px;
margin: 5px auto;
border-radius: 40px;
font-size: 16px;
font-weight: 600;
color: #ffffff;
line-height: 40px;
text-align: center;
background: linear-gradient(270deg, #ff7400 0%, #fe4000 100%);
}
}
</style>
module.exports = {
transpileDependencies: [
/[/\\]node_modules[/\\][@\\]pica-cli[/\\]vue-cli-plugin-pica-cli-plugin[/\\]core/,
/[/\\]node_modules[/\\][@\\]pica-kit[/\\]page-model/
/[/\\]node_modules[/\\][@\\]pica-kit[/\\]page-model/,
],
productionSourceMap: false,
pluginOptions: {
......@@ -11,23 +11,23 @@ module.exports = {
skeletonRoutes: [],
enableAutoSkeletonRoutes: false,
routeMode: 'history',
dpsLimit: 5
dpsLimit: 5,
},
tinypng: {
key: 'kYWBH2Ck5kn4BwJj8QqjcF0mZJBtZwNR'
}
key: 'kYWBH2Ck5kn4BwJj8QqjcF0mZJBtZwNR',
},
},
chainWebpack: config => {
chainWebpack: (config) => {
config.set('externals', {
vue: 'Vue',
vuex: 'Vuex',
'vue-router': 'VueRouter',
'vconsole': 'VConsole',
vconsole: 'VConsole',
jqery: 'jQuery',
axios: 'axios',
vant: 'vant',
'crypto-js/crypto-js': 'CryptoJS',
'jsencrypt/bin/jsencrypt': 'JSEncrypt'
'jsencrypt/bin/jsencrypt': 'JSEncrypt',
});
config.plugins.delete('prefetch');
config.plugins.delete('preload');
......@@ -52,4 +52,7 @@ module.exports = {
},
};
module.exports.publicPath = process.env.VUE_APP_ENV === 'development' && process.env.VUE_APP_IS_LOCAL ? process.env.BASE_URL : `${process.env.VUE_APP_OSS_URL}/static${process.env.BASE_URL}`;
module.exports.publicPath =
process.env.VUE_APP_ENV === 'development' && process.env.VUE_APP_IS_LOCAL
? process.env.BASE_URL
: `${process.env.VUE_APP_OSS_URL}/static${process.env.BASE_URL}`;
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册