update
This commit is contained in:
+22
-23
@@ -1,26 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="" manifest="IGNORE.manifest">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Cache" content="no-cache">
|
||||
<meta http-equiv="Cache-control" content="no-cache,must-revalidate">
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
|
||||
<meta name="referrer" content="never">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
|
||||
<script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache" content="no-cache" />
|
||||
<meta http-equiv="Cache-control" content="no-cache,must-revalidate" />
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta name="referrer" content="never" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no" />
|
||||
<script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import 'variable.scss';
|
||||
@use "./variable.scss" as *;
|
||||
|
||||
.divider {
|
||||
height: .24rem;
|
||||
@@ -146,4 +146,4 @@ button:disabled {
|
||||
background: #e1e1e1 !important;
|
||||
border-color: #e1e1e1 !important;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+98
-60
@@ -1,88 +1,126 @@
|
||||
let wechatInstance;
|
||||
import util from "@/util";
|
||||
let wechatReadyPromise = null;
|
||||
// import util from "@/util";
|
||||
|
||||
function getShareConfig(shareConfig = {}) {
|
||||
// const link = shareConfig.link || location.href;
|
||||
return {
|
||||
title: shareConfig.title || document.title || "自在福田",
|
||||
desc: shareConfig.desc || "",
|
||||
link: shareConfig.link,
|
||||
imgUrl: shareConfig.imgUrl || "",
|
||||
callback: shareConfig.callback,
|
||||
};
|
||||
}
|
||||
|
||||
function emitShareCallback(shareConfig, key, res) {
|
||||
shareConfig.callback &&
|
||||
shareConfig.callback({
|
||||
key,
|
||||
...res,
|
||||
});
|
||||
}
|
||||
|
||||
function signToWechat(config, shareConfig) {
|
||||
if (!wx) {
|
||||
console.warn("请安装微信网页JS-SDK, url: https://res2.wx.qq.com/open/js/jweixin-1.6.0.js");
|
||||
return;
|
||||
}
|
||||
const defaultConfig = {
|
||||
...config,
|
||||
debug: false,
|
||||
jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage", "scanQRCode", "getLocation", "openLocation", "updateAppMessageShareData", "updateTimelineShareData"],
|
||||
};
|
||||
wx.config(defaultConfig);
|
||||
wx.ready(function () {
|
||||
console.log("wechat sdk config success");
|
||||
wechatInstance = wx;
|
||||
wechatReadyPromise = new Promise((resolve, reject) => {
|
||||
wx.ready(function () {
|
||||
wechatInstance = wx;
|
||||
|
||||
wx.onMenuShareAppMessage({
|
||||
title: shareConfig.title,
|
||||
desc: shareConfig.desc,
|
||||
link: util.addExternalParamsToQuery(shareConfig.link, "no_login", 1),
|
||||
imgUrl: shareConfig.imgUrl,
|
||||
complete: (res) => {
|
||||
shareConfig.callback &&
|
||||
shareConfig.callback({
|
||||
key: "updateAppMessageShareData",
|
||||
...res,
|
||||
});
|
||||
},
|
||||
const safeShareConfig = getShareConfig(shareConfig);
|
||||
if (typeof wx.updateAppMessageShareData === "function") {
|
||||
wx.updateAppMessageShareData({
|
||||
title: safeShareConfig.title,
|
||||
desc: safeShareConfig.desc,
|
||||
link: safeShareConfig.link,
|
||||
imgUrl: safeShareConfig.imgUrl,
|
||||
complete: (res) => {
|
||||
emitShareCallback(safeShareConfig, "updateAppMessageShareData", res);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof wx.updateTimelineShareData === "function") {
|
||||
wx.updateTimelineShareData({
|
||||
title: safeShareConfig.title,
|
||||
link: safeShareConfig.link,
|
||||
imgUrl: safeShareConfig.imgUrl,
|
||||
complete: (res) => {
|
||||
emitShareCallback(safeShareConfig, "updateTimelineShareData", res);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof wx.onMenuShareAppMessage === "function") {
|
||||
wx.onMenuShareAppMessage({
|
||||
title: safeShareConfig.title,
|
||||
desc: safeShareConfig.desc,
|
||||
link: safeShareConfig.link,
|
||||
imgUrl: safeShareConfig.imgUrl,
|
||||
complete: (res) => {
|
||||
emitShareCallback(safeShareConfig, "onMenuShareAppMessage", res);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof wx.onMenuShareTimeline === "function") {
|
||||
wx.onMenuShareTimeline({
|
||||
title: safeShareConfig.title,
|
||||
link: safeShareConfig.link,
|
||||
imgUrl: safeShareConfig.imgUrl,
|
||||
complete: (res) => {
|
||||
emitShareCallback(safeShareConfig, "onMenuShareTimeline", res);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
resolve(wx);
|
||||
});
|
||||
|
||||
// // 分享朋友圈
|
||||
wx.onMenuShareTimeline({
|
||||
title: shareConfig.title,
|
||||
link: util.addExternalParamsToQuery(shareConfig.link, "no_login", 1),
|
||||
imgUrl: shareConfig.imgUrl,
|
||||
complete: (res) => {
|
||||
shareConfig.callback &&
|
||||
shareConfig.callback({
|
||||
key: "updateTimelineShareData",
|
||||
...res,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
// wx.updateAppMessageShareData({
|
||||
// title: shareConfig.title,
|
||||
// desc: shareConfig.desc,
|
||||
// link: shareConfig.link,
|
||||
// imgUrl: shareConfig.imgUrl,
|
||||
// complete: res => {
|
||||
// shareConfig.callback && shareConfig.callback({
|
||||
// key: 'updateAppMessageShareData',
|
||||
// ...res
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// // 分享朋友圈
|
||||
// wx.updateTimelineShareData({
|
||||
// title: shareConfig.title,
|
||||
// link: shareConfig.link,
|
||||
// imgUrl: shareConfig.imgUrl,
|
||||
// complete: res => {
|
||||
// shareConfig.callback && shareConfig.callback({
|
||||
// key: 'updateTimelineShareData',
|
||||
// ...res
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
if (typeof wx.error === "function") {
|
||||
wx.error((error) => {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
wx.config(defaultConfig);
|
||||
}
|
||||
|
||||
function getLocation() {
|
||||
async function getWechatInstance() {
|
||||
if (wechatInstance) {
|
||||
return wechatInstance;
|
||||
}
|
||||
if (wechatReadyPromise) {
|
||||
return wechatReadyPromise;
|
||||
}
|
||||
return Promise.reject(new Error("微信 JS-SDK 尚未初始化"));
|
||||
}
|
||||
|
||||
async function getLocation() {
|
||||
const instance = await getWechatInstance();
|
||||
return new Promise((resolve, reject) => {
|
||||
wechatInstance.getLocation({
|
||||
instance.getLocation({
|
||||
type: "wgs84",
|
||||
success: (res) => {
|
||||
if (res.errMsg === "getLocation:ok") {
|
||||
resolve(res);
|
||||
} else {
|
||||
reject();
|
||||
reject(new Error(res.errMsg || "获取定位失败"));
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
reject();
|
||||
fail: (error) => {
|
||||
reject(error || new Error("获取定位失败"));
|
||||
},
|
||||
cancel: () => {
|
||||
reject(new Error("用户取消定位"));
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,6 +40,8 @@ export default {
|
||||
height: 2.93rem;
|
||||
margin-right: 0.4rem;
|
||||
border-radius: 0.11rem;
|
||||
object-fit: contain;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
.info {
|
||||
flex: 1;
|
||||
|
||||
@@ -51,12 +51,13 @@ export default {
|
||||
align-items: flex-end;
|
||||
margin-bottom: 0.2rem;
|
||||
font-size: 0.4rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
p.goods_name {
|
||||
font-size: 0.34rem;
|
||||
max-width: 15em;
|
||||
line-height: 1.2;
|
||||
overflow-x: hidden;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="goods-detail" v-if="data" :style="{ paddingBottom: paddingBottom + 'px' }">
|
||||
<swiper class="swiper-container" :options="swiperOption">
|
||||
<swiper-slide>
|
||||
<div style="height: 100vw" class="picture">
|
||||
<img :src="data.cover_url" alt="" />
|
||||
<van-swipe class="swiper-container" :autoplay="4000" indicator-color="white">
|
||||
<van-swipe-item v-for="(banner, index) in pictures" :key="index">
|
||||
<div class="picture-wrap">
|
||||
<img :src="banner" alt="" />
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
<div class="monk-profile">
|
||||
<h1 class="position">{{ data.name }}</h1>
|
||||
<div class="bar">
|
||||
@@ -83,7 +83,6 @@
|
||||
|
||||
<script>
|
||||
import "swiper/css/swiper.css";
|
||||
import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
import { getGoodsDetail, getOrderCompare, hasLogin } from "@/api";
|
||||
import SelectSpec from "./components/select-spec.vue";
|
||||
import FillInformation from "./components/fill-information.vue";
|
||||
@@ -92,8 +91,6 @@ import CustomerService from "@/components/customer-service/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
swiper,
|
||||
swiperSlide,
|
||||
SelectSpec,
|
||||
CustomerService,
|
||||
FillInformation,
|
||||
@@ -117,9 +114,9 @@ export default {
|
||||
dreamInfo: null,
|
||||
anyPrice: 0, // 随喜金额
|
||||
swiperOption: {
|
||||
autoplay: 8000,
|
||||
autoplay: 5000,
|
||||
initialSlide: 1,
|
||||
loop: false,
|
||||
loop: true,
|
||||
pagination: ".swiper-pagination",
|
||||
onSlideChangeEnd: () => {},
|
||||
},
|
||||
@@ -146,6 +143,9 @@ export default {
|
||||
}
|
||||
return Number(spec.price);
|
||||
},
|
||||
pictures() {
|
||||
return [this.data.cover_url, ...this.data.pictures];
|
||||
},
|
||||
priceTotal() {
|
||||
if (this.is_auto) {
|
||||
return (parseInt(this.priceUnit * 100, 10) * this.quantity * 30) / 100;
|
||||
@@ -397,10 +397,18 @@ $lightWidth: 1.3rem;
|
||||
}
|
||||
.swiper-container {
|
||||
background: #f5f5f5;
|
||||
height: 10rem;
|
||||
.picture-wrap {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.picture,
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
.monk-profile {
|
||||
|
||||
+43
-39
@@ -166,6 +166,14 @@ export default {
|
||||
this.data = res;
|
||||
this.$store.commit("setTempleMeritId", res.temple_merit_id);
|
||||
this.data.icon_data = this.sliceNav(res.icon_data);
|
||||
this.wechatReady({
|
||||
...res.shareConfig,
|
||||
link: location.href.replace("#/home", ""),
|
||||
title: "菩提家园",
|
||||
desc: "给心一个家",
|
||||
imgUrl: "https://temple-h5-new.oss-cn-hangzhou.aliyuncs.com/uploads/dev/2025/04/16/phpGweHzl.jpg",
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
document.title = "自在福田";
|
||||
}, 10);
|
||||
@@ -265,47 +273,43 @@ export default {
|
||||
.panel {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
.merit-scroll-container {
|
||||
margin: 0 0.4rem;
|
||||
height: 3.39rem;
|
||||
overflow-x: auto;
|
||||
.merit-scroll-wrapper {
|
||||
white-space: nowrap;
|
||||
|
||||
.merit-scroll-container {
|
||||
margin: 0 0.4rem;
|
||||
height: 3.39rem;
|
||||
overflow-x: auto;
|
||||
.merit-scroll-wrapper {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.merit-group {
|
||||
padding-bottom: 0.4rem;
|
||||
}
|
||||
.merit {
|
||||
width: 3.39rem;
|
||||
height: 3.39rem;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
border-radius: 0.16rem;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
& ~ .merit {
|
||||
margin-left: 0.4rem;
|
||||
.merit-group {
|
||||
padding-bottom: 0.4rem;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.title {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 0.91rem;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
line-height: 0.91rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 0.37rem;
|
||||
padding: 0 0.11rem;
|
||||
.merit {
|
||||
display: flex;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
gap: 0.2rem;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
padding-bottom: 0.4rem;
|
||||
& ~ .merit {
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
object-fit: cover;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #333;
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
font-size: 0.37rem;
|
||||
padding: 0 0.11rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="swiper" v-if="data.banner_data.length > 0">
|
||||
<van-swipe class="my-swipe" :autoplay="8000" indicator-color="white">
|
||||
<van-swipe class="my-swipe" :autoplay="5000" indicator-color="white">
|
||||
<van-swipe-item v-for="(banner, index) in data.banner_data" :key="index">
|
||||
<img :src="banner.cover" alt="" @click="$router.push({ path: banner.url })" />
|
||||
</van-swipe-item>
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="divider"></div>
|
||||
<div class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="title">功德无量</span>
|
||||
<span class="title">近期活动</span>
|
||||
<arrow-more @click="$router.push({ name: 'merit-list', query: { temple_id: query.temple_id } })"></arrow-more>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="panel temple-home-activity">
|
||||
<div class="panel temple-home-activity" v-if="data.dynamic_data.length">
|
||||
<div class="panel-head">
|
||||
<span class="title">活动进展</span>
|
||||
<arrow-more @click="onMoreProcess"></arrow-more>
|
||||
@@ -79,11 +79,10 @@
|
||||
<i class="iconfont icon-arrow-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<thanks-giving :temple-id="query.temple_id || '1'"></thanks-giving>
|
||||
|
||||
<button class="temple-station-in" @click="onTempleStation">寺院入驻</button>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<thanks-giving :temple-id="query.temple_id || '1'"></thanks-giving>
|
||||
<button class="temple-station-in" @click="onTempleStation">寺院入驻</button>
|
||||
|
||||
<div class="panel-menu-btn" @click="showUserMenu = true">
|
||||
<span class="iconfont icon-liebiao"></span>
|
||||
@@ -280,11 +279,8 @@ export default {
|
||||
margin-right: auto;
|
||||
}
|
||||
.merit-scroll-container {
|
||||
height: 3.39rem;
|
||||
margin: 0;
|
||||
overflow-x: auto;
|
||||
.merit-scroll-wrapper {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.temple-station-in {
|
||||
@@ -569,7 +565,7 @@ export default {
|
||||
|
||||
.panel {
|
||||
.panel-head {
|
||||
padding: 0.53rem 0.4rem;
|
||||
padding: 0.13rem 0.4rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
@@ -582,7 +578,7 @@ export default {
|
||||
|
||||
.panel-body {
|
||||
padding: 0 0.4rem;
|
||||
overflow-x: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
.merit-group {
|
||||
display: flex;
|
||||
@@ -605,34 +601,26 @@ export default {
|
||||
}
|
||||
|
||||
.merit {
|
||||
width: 3.39rem;
|
||||
height: 3.39rem;
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
position: relative;
|
||||
border-radius: 0.16rem;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
|
||||
gap: 0.2rem;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
padding-bottom: 0.4rem;
|
||||
& ~ .merit {
|
||||
margin-left: 0.4rem;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
object-fit: cover;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
|
||||
.title {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 0.91rem;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
line-height: 0.91rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
font-size: 0.37rem;
|
||||
padding: 0 0.11rem;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="settle-in">
|
||||
<div class="topbar" ref="topbar">
|
||||
<van-nav-bar left-arrow v-if="$route.meta.showNavBar" :title="$route.meta.title" @click-left="$router.back()" :style="{backgroundColor: $route.meta.navBarBackgroundColor}" />
|
||||
<van-nav-bar left-arrow v-if="$route.meta.showNavBar" :title="$route.meta.title" @click-left="$router.back()" :style="{ backgroundColor: $route.meta.navBarBackgroundColor }" />
|
||||
</div>
|
||||
<div class="steps">
|
||||
<div class="step" :class="[step == 1 && 'active']" >
|
||||
<div class="step" :class="[step == 1 && 'active']">
|
||||
<span class="circle">1</span>
|
||||
<span class="text">资料准备</span>
|
||||
</div>
|
||||
@@ -38,17 +38,17 @@
|
||||
<van-form>
|
||||
<div class="group">
|
||||
<label class="label-temple" for="#">寺院信息设置</label>
|
||||
<van-field label="单位名称" v-model="form.unit_name" name="单位名称" placeholder="单位名称" />
|
||||
<van-field label="机构代码" v-model="form.institution_code" name="机构代码" maxlength="18" placeholder="机构代码、信用代码(18位)" />
|
||||
<van-field label="省份城市" v-model="form.city_name" name="省份城市" is-link readonly placeholder="省份城市" @click="showProvince = true" />
|
||||
<van-field label="详细地址" v-model="form.details_address" name="详细地址" placeholder="请输入详细地址" @blur="onUpdateLatLng">
|
||||
<van-field label="单位名称" v-model="form.unit_name" name="单位名称" placeholder="单位名称" />
|
||||
<van-field label="机构代码" v-model="form.institution_code" name="机构代码" maxlength="18" placeholder="机构代码、信用代码(18位)" />
|
||||
<van-field label="省份城市" v-model="form.city_name" name="省份城市" is-link readonly placeholder="省份城市" @click="showProvince = true" />
|
||||
<van-field label="详细地址" v-model="form.details_address" name="详细地址" placeholder="请输入详细地址" @blur="onUpdateLatLng">
|
||||
<template #right-icon>
|
||||
<van-button type="info" size="small" @click="onGetAddress">自动获取</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="寺院法人" v-model="form.represent" name="寺院法人" placeholder="请输入真实姓名" />
|
||||
<van-field label="手机号码" v-model="form.mobile" name="手机号码" placeholder="请输入法人手机号码" type="tel"/>
|
||||
<van-field label="寺院来源" v-model="form.source" name="寺院来源" placeholder="请输入来源" />
|
||||
<van-field label="寺院法人" v-model="form.represent" name="寺院法人" placeholder="请输入真实姓名" />
|
||||
<van-field label="手机号码" v-model="form.mobile" name="手机号码" placeholder="请输入法人手机号码" type="tel" />
|
||||
<van-field label="寺院来源" v-model="form.source" name="寺院来源" placeholder="请输入来源" />
|
||||
</div>
|
||||
<div class="group">
|
||||
<label class="label-temple" for="#">后台登录设置</label>
|
||||
@@ -57,7 +57,7 @@
|
||||
<van-checkbox v-model="form.is_representd" shape="aquare"></van-checkbox>
|
||||
</div>
|
||||
<van-field v-if="!form.is_representd" v-model="form.register_name" label="注册人" placeholder="请输入真实姓名"></van-field>
|
||||
<van-field label="手机号码" v-model="form.login_mobile" placeholder="请输入手机号码" type="tel" />
|
||||
<van-field label="手机号码" v-model="form.login_mobile" placeholder="请输入手机号码" type="tel" />
|
||||
<van-field label="登录密码" v-model="form.password" placeholder="请输入至少6位数字、字母和符号组合" type="password"></van-field>
|
||||
<van-field label="确认密码" v-model="form.password_confirm" placeholder="请确认密码" type="password"></van-field>
|
||||
</div>
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
<div class="administrator_wechat" v-if="step === 3">
|
||||
<h1 class="title">扫码添加平台管理员微信</h1>
|
||||
<img class="qrcode" src="https://wdx-temple.oss-cn-hangzhou.aliyuncs.com/uploads/common/religion-cert-bg.jpg" alt="">
|
||||
<img class="qrcode" src="https://wdx-temple.oss-cn-hangzhou.aliyuncs.com/uploads/common/religion-cert-bg.jpg" alt="" />
|
||||
<p class="label">平台入驻管理员微信</p>
|
||||
<p class="notice">审核通过后将微信通知入驻上架具体事宜</p>
|
||||
<div class="button-group">
|
||||
@@ -83,49 +83,43 @@
|
||||
</div>
|
||||
|
||||
<van-popup v-model="showProvince" round position="bottom" safe-area-inset-bottom>
|
||||
<van-cascader
|
||||
v-model="cascaderValue"
|
||||
title="请选择所在地区"
|
||||
:options="cityOptions"
|
||||
@close="showProvince = false"
|
||||
@finish="onFinishProvince"
|
||||
@change="onChangeProvince"
|
||||
/>
|
||||
<van-cascader v-model="cascaderValue" title="请选择所在地区" :options="cityOptions" @close="showProvince = false" @finish="onFinishProvince" @change="onChangeProvince" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRegion, getStationTemplate, postTemple } from '@/api';
|
||||
import { getLocation } from '@/common/wechat-web';
|
||||
import TMAPLoader from '@/common/tmap';
|
||||
import Schema from 'async-validator';
|
||||
import { getRegion, getStationTemplate, postTemple } from "@/api";
|
||||
import { getLocation } from "@/common/wechat-web";
|
||||
import TMAPLoader from "@/common/tmap";
|
||||
import Schema from "async-validator";
|
||||
|
||||
export default {
|
||||
data(){
|
||||
data() {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const testForm = {
|
||||
// register_cert_url: [{url: 'https://caiyuehui.oss-cn-hangzhou.aliyuncs.com/uploads/dev/2021/11/04/phpjXpokW.jpeg'}],
|
||||
register_cert_url: [],
|
||||
unit_name: '123', // 单位名称
|
||||
institution_code: '123123123123123123', // 机构代码
|
||||
unit_name: "123", // 单位名称
|
||||
institution_code: "123123123123123123", // 机构代码
|
||||
province_id: 3, // 省份ID
|
||||
city_name: 32, // 省份ID
|
||||
city_id: [3, 23, 32],
|
||||
details_address: '孤男弘法寺', // 详细地址
|
||||
details_address: "孤男弘法寺", // 详细地址
|
||||
lng: 103.5, // 经度
|
||||
lat: 23, // 纬度
|
||||
represent: '赵', // 寺院法人
|
||||
mobile: '13892894922', // 手机号
|
||||
source: '网络', // 寺院来源
|
||||
represent: "赵", // 寺院法人
|
||||
mobile: "13892894922", // 手机号
|
||||
source: "网络", // 寺院来源
|
||||
is_representd: false, // 是否为寺院法人
|
||||
register_name: '赵', // 法人姓名
|
||||
login_mobile: '13983828488', // 登录手机号
|
||||
password: '123456', // 登录密码
|
||||
password_confirm: '123456', // 确认密码
|
||||
}
|
||||
register_name: "赵", // 法人姓名
|
||||
login_mobile: "13983828488", // 登录手机号
|
||||
password: "123456", // 登录密码
|
||||
password_confirm: "123456", // 确认密码
|
||||
};
|
||||
return {
|
||||
loading: false,
|
||||
locating: false,
|
||||
query: this.$route.query,
|
||||
active: 0,
|
||||
agreement: true, // 是否同意寺院联盟服务协议
|
||||
@@ -133,275 +127,326 @@ export default {
|
||||
cityOptions: [],
|
||||
cascaderValue: 0,
|
||||
fileList: [],
|
||||
|
||||
|
||||
form: {
|
||||
register_cert_url: [],
|
||||
unit_name: '', // 单位名称
|
||||
institution_code: '', // 机构代码
|
||||
province_id: '', // 省份ID
|
||||
city_name: '', // 城市名称
|
||||
details_address: '', // 详细地址
|
||||
lng: '', // 经度
|
||||
lat: '', // 纬度
|
||||
represent: '', // 寺院法人
|
||||
mobile: '', // 手机号
|
||||
source: '', // 寺院来源
|
||||
is_representd: '', // 是否为寺院法人
|
||||
register_name: '', // 法人姓名
|
||||
login_mobile: '', // 登录手机号
|
||||
password: '', // 登录密码
|
||||
password_confirm: '', // 确认密码
|
||||
unit_name: "", // 单位名称
|
||||
institution_code: "", // 机构代码
|
||||
province_id: "", // 省份ID
|
||||
city_name: "", // 城市名称
|
||||
details_address: "", // 详细地址
|
||||
lng: "", // 经度
|
||||
lat: "", // 纬度
|
||||
represent: "", // 寺院法人
|
||||
mobile: "", // 手机号
|
||||
source: "", // 寺院来源
|
||||
is_representd: "", // 是否为寺院法人
|
||||
register_name: "", // 法人姓名
|
||||
login_mobile: "", // 登录手机号
|
||||
password: "", // 登录密码
|
||||
password_confirm: "", // 确认密码
|
||||
},
|
||||
formRules: {
|
||||
unit_name: { required: true, message: '请输入单位名称' },
|
||||
unit_name: { required: true, message: "请输入单位名称" },
|
||||
institution_code: [
|
||||
{ required: true, message: '请输入机构代码' },
|
||||
{ message: '请输入18位的机构代码', validator: (rule, value) => value.length === 18 }
|
||||
{ required: true, message: "请输入机构代码" },
|
||||
{ message: "请输入18位的机构代码", validator: (rule, value) => value.length === 18 },
|
||||
],
|
||||
city_id: { required: true, message: '请选择城市' },
|
||||
details_address: { required: true, message: '请输入详细地址' },
|
||||
represent: { required: true, message: '请输入寺院法人' },
|
||||
city_id: { required: true, message: "请选择城市" },
|
||||
details_address: { required: true, message: "请输入详细地址" },
|
||||
represent: { required: true, message: "请输入寺院法人" },
|
||||
mobile: [
|
||||
{ required: true, message: '请输入手机号码' },
|
||||
{ validator: (rule, value) => this.$config.RegExp.mobile.test(value), message: '请输入合法的手机号码'}
|
||||
{ required: true, message: "请输入手机号码" },
|
||||
{ validator: (rule, value) => this.$config.RegExp.mobile.test(value), message: "请输入合法的手机号码" },
|
||||
],
|
||||
source: { required: true, message: '请输入寺院来源' },
|
||||
register_name: { validator: {} },
|
||||
login_mobile: { required: true, message: '请输入法人手机号码' },
|
||||
password: { required: true, message: '请输入登陆密码' },
|
||||
password_confirm: { required: true, message: '请确认登录密码' }
|
||||
source: { required: true, message: "请输入寺院来源" },
|
||||
register_name: { validator: {} },
|
||||
login_mobile: { required: true, message: "请输入法人手机号码" },
|
||||
password: { required: true, message: "请输入登陆密码" },
|
||||
password_confirm: { required: true, message: "请确认登录密码" },
|
||||
},
|
||||
// form: testForm,
|
||||
geocoder: null,
|
||||
TMap: null,
|
||||
mapReady: null,
|
||||
selectedOptions: [],
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
step: {
|
||||
get(){
|
||||
get() {
|
||||
return Number(this.$route.query.step) || 1;
|
||||
}
|
||||
},
|
||||
},
|
||||
canNextStep2() {
|
||||
return this.form.register_cert_url.length > 0 && this.agreement;
|
||||
},
|
||||
canNextStep2(){
|
||||
return this.form.register_cert_url.length > 0 && this.agreement
|
||||
}
|
||||
},
|
||||
created(){
|
||||
TMAPLoader.load({
|
||||
created() {
|
||||
this.mapReady = TMAPLoader.load({
|
||||
key: process.env.VUE_APP_TMAP_KEY,
|
||||
libraries: ['service']
|
||||
}).then(TMap => {
|
||||
libraries: ["service"],
|
||||
}).then((TMap) => {
|
||||
this.TMap = TMap;
|
||||
this.geocoder = new TMap.service.Geocoder();
|
||||
})
|
||||
return TMap;
|
||||
});
|
||||
this.getParams();
|
||||
this.wechatReady(() => {
|
||||
console.log('wechat ready')
|
||||
console.log("wechat ready");
|
||||
});
|
||||
},
|
||||
mounted(){
|
||||
if(this.$route.query.template_id){
|
||||
return this.getStationTemplate()
|
||||
mounted() {
|
||||
if (this.$route.query.template_id) {
|
||||
return this.getStationTemplate();
|
||||
}
|
||||
if(this.form.register_cert_url.length === 0 && Number(this.$route.query.step) !== 1){
|
||||
return this.$router.push({ query: { step: 1 }});
|
||||
if (this.form.register_cert_url.length === 0 && Number(this.$route.query.step) !== 1) {
|
||||
return this.$router.push({ query: { step: 1 } });
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getStationTemplate(){
|
||||
async getStationTemplate() {
|
||||
this.loading = true;
|
||||
const data = await getStationTemplate(this.$route.query.template_id);
|
||||
this.loading = false;
|
||||
data.register_cert_url = data.register_cert_url.split(',').map(item => ({ url: item }));
|
||||
data.register_cert_url = data.register_cert_url.split(",").map((item) => ({ url: item }));
|
||||
data.is_representd = data.is_representd === 1;
|
||||
this.form = { ...this.form, ...data }
|
||||
this.form = { ...this.form, ...data };
|
||||
const selectedOptions = [];
|
||||
const province = this.cityOptions.find(item => item.value === data.province_id);
|
||||
const province = this.cityOptions.find((item) => item.value === data.province_id);
|
||||
selectedOptions.push(province);
|
||||
const city = province.children.find(item => item.value === data.city_id);
|
||||
selectedOptions.push(city)
|
||||
this.onFinishProvince({ selectedOptions })
|
||||
const city = province.children.find((item) => item.value === data.city_id);
|
||||
selectedOptions.push(city);
|
||||
this.onFinishProvince({ selectedOptions });
|
||||
},
|
||||
onAgreement(){
|
||||
this.$router.push({ name: 'user-temple-station-agreement' })
|
||||
onAgreement() {
|
||||
this.$router.push({ name: "user-temple-station-agreement" });
|
||||
},
|
||||
handleErrors(errors){
|
||||
for(let i = 0; i < errors.length; i++){
|
||||
if(errors[i]){
|
||||
this.$toast.fail(errors[i].message)
|
||||
handleErrors(errors) {
|
||||
for (let i = 0; i < errors.length; i++) {
|
||||
if (errors[i]) {
|
||||
this.$toast.fail(errors[i].message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
onNextStep(step = 1){
|
||||
this.$router.push({ query: { step: this.step + step }})
|
||||
onNextStep(step = 1) {
|
||||
this.$router.push({ query: { step: this.step + step } });
|
||||
},
|
||||
onGetAddress(){
|
||||
getLocation().then(({ longitude, latitude}) => {
|
||||
const location = new this.TMap.LatLng(latitude, longitude)
|
||||
this.geocoder.getAddress({ location }).then(res => {
|
||||
this.form.details_address = res.result.address
|
||||
this.form.lng = longitude
|
||||
this.form.lat = latitude
|
||||
})
|
||||
})
|
||||
async ensureMapReady() {
|
||||
if (this.geocoder && this.TMap) {
|
||||
return;
|
||||
}
|
||||
await this.mapReady;
|
||||
},
|
||||
async getLatLngByAddress(addressText){
|
||||
async onGetAddress() {
|
||||
try {
|
||||
this.locating = true;
|
||||
await this.ensureMapReady();
|
||||
const { longitude, latitude } = await getLocation();
|
||||
const location = new this.TMap.LatLng(latitude, longitude);
|
||||
const res = await this.geocoder.getAddress({ location });
|
||||
this.form.details_address = res.result.address;
|
||||
this.form.lng = longitude || "0.0";
|
||||
this.form.lat = latitude || "0.0";
|
||||
} catch (error) {
|
||||
const message = error && error.message ? error.message : "自动获取地址失败,请稍后重试";
|
||||
this.$toast.fail(message);
|
||||
} finally {
|
||||
this.locating = false;
|
||||
}
|
||||
},
|
||||
async getLatLngByAddress(addressText) {
|
||||
await this.ensureMapReady();
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true;
|
||||
const cityAddress = this.selectedOptions.map(v => v.text).join('')
|
||||
this.geocoder.getLocation({address: cityAddress + addressText}).then(res => {
|
||||
this.loading = false
|
||||
resolve(res.result.location)
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
if(error.status === 347){
|
||||
this.$toast.fail('未查询到地址信息,请核对地址')
|
||||
reject();
|
||||
}
|
||||
});
|
||||
})
|
||||
const cityAddress = this.selectedOptions.map((v) => v.text).join("");
|
||||
const address = `${cityAddress}${addressText || ""}`.trim();
|
||||
this.geocoder
|
||||
.getLocation({ address })
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res && res.result && res.result.location) {
|
||||
resolve(res.result.location);
|
||||
return;
|
||||
}
|
||||
reject(new Error("未查询到地址信息,请核对地址"));
|
||||
})
|
||||
.catch((error) => {
|
||||
this.loading = false;
|
||||
if (error.status === 347) {
|
||||
reject(new Error("未查询到地址信息,请核对地址"));
|
||||
return;
|
||||
}
|
||||
reject(error || new Error("地址解析失败"));
|
||||
});
|
||||
});
|
||||
},
|
||||
// 根据地址更新坐标
|
||||
async onUpdateLatLng({ target: { value }}){
|
||||
const { lat, lng } = await this.getLatLngByAddress(value)
|
||||
async onUpdateLatLng({ target: { value } }) {
|
||||
if (!value || !this.selectedOptions.length) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const { lat, lng } = await this.getLatLngByAddress(value);
|
||||
this.form.lat = lat;
|
||||
this.form.lng = lng;
|
||||
} catch (error) {
|
||||
const message = error && error.message ? error.message : "地址解析失败";
|
||||
this.$toast.fail(message);
|
||||
}
|
||||
},
|
||||
getParams() {
|
||||
getRegion().then((city) => {
|
||||
this.cityOptions = city;
|
||||
});
|
||||
},
|
||||
onChangeProvince() {},
|
||||
async ensureFormLatLng() {
|
||||
if (this.form.lat && this.form.lng) {
|
||||
return;
|
||||
}
|
||||
if (!this.form.details_address || !this.selectedOptions.length) {
|
||||
throw new Error("请先完善省市和详细地址");
|
||||
}
|
||||
const { lat, lng } = await this.getLatLngByAddress(this.form.details_address);
|
||||
this.form.lat = lat;
|
||||
this.form.lng = lng;
|
||||
},
|
||||
getParams(){
|
||||
getRegion().then(city => {
|
||||
this.cityOptions = city
|
||||
})
|
||||
},
|
||||
onChangeProvince(){
|
||||
|
||||
},
|
||||
onSubmitBefore(){
|
||||
onSubmitBefore() {
|
||||
const validator = new Schema(this.formRules);
|
||||
validator.validate(this.form, ((errors) => {
|
||||
if(errors){
|
||||
return this.handleErrors(errors)
|
||||
validator.validate(this.form, async (errors) => {
|
||||
if (errors) {
|
||||
return this.handleErrors(errors);
|
||||
}
|
||||
try {
|
||||
await this.ensureFormLatLng();
|
||||
} catch (error) {
|
||||
this.$toast.fail(error.message || "经纬度获取失败,请检查地址后重试");
|
||||
return;
|
||||
}
|
||||
//
|
||||
this.onNextStep(1);
|
||||
}))
|
||||
});
|
||||
},
|
||||
async onSubmit(){
|
||||
async onSubmit() {
|
||||
const [province_id, city_id, country_id] = this.form.city_id;
|
||||
const request = {
|
||||
...this.form,
|
||||
is_representd: this.form.is_representd ? 1: 0,
|
||||
province_id, city_id, country_id,
|
||||
register_cert_url: this.form.register_cert_url.map(v => v.url),
|
||||
}
|
||||
is_representd: this.form.is_representd ? 1 : 0,
|
||||
province_id,
|
||||
city_id,
|
||||
country_id,
|
||||
register_cert_url: this.form.register_cert_url.map((v) => v.url),
|
||||
};
|
||||
await postTemple(request);
|
||||
this.$toast.success('提交成功')
|
||||
await this.$delay(2000)
|
||||
this.$router.replace({ name: 'user-home'})
|
||||
this.$toast.success("提交成功");
|
||||
await this.$delay(2000);
|
||||
this.$router.replace({ name: "user-home" });
|
||||
},
|
||||
onFinishProvince({selectedOptions}){
|
||||
onFinishProvince({ selectedOptions }) {
|
||||
this.selectedOptions = selectedOptions;
|
||||
this.showProvince = false;
|
||||
this.form.city_name = selectedOptions.map(v => v.text).join(' / ')
|
||||
this.form.city_id = selectedOptions.map(v => v.value)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.form.city_name = selectedOptions.map((v) => v.text).join(" / ");
|
||||
this.form.city_id = selectedOptions.map((v) => v.value);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.steps{
|
||||
.steps {
|
||||
background: #f5f5f5;
|
||||
padding: .27rem .4rem;
|
||||
font-size: .37rem;
|
||||
padding: 0.27rem 0.4rem;
|
||||
font-size: 0.37rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ddd;
|
||||
.circle{
|
||||
width: .8rem;
|
||||
height: .8rem;
|
||||
.circle {
|
||||
width: 0.8rem;
|
||||
height: 0.8rem;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: .9rem;
|
||||
line-height: 0.9rem;
|
||||
background: #ddd;
|
||||
color: white;
|
||||
border-radius: .53rem;
|
||||
margin-right: .27rem;
|
||||
border-radius: 0.53rem;
|
||||
margin-right: 0.27rem;
|
||||
}
|
||||
.text{
|
||||
font-size: .37rem;
|
||||
.text {
|
||||
font-size: 0.37rem;
|
||||
color: #666;
|
||||
}
|
||||
.active{
|
||||
.circle{
|
||||
.active {
|
||||
.circle {
|
||||
background: rgb(187, 95, 95);
|
||||
color: white;
|
||||
}
|
||||
span{
|
||||
color: rgb(187, 95, 95);;
|
||||
span {
|
||||
color: rgb(187, 95, 95);
|
||||
}
|
||||
}
|
||||
}
|
||||
.settle-in{
|
||||
.infor{
|
||||
padding: .53rem .7rem;
|
||||
.title{
|
||||
font-size: .37rem;
|
||||
.settle-in {
|
||||
.infor {
|
||||
padding: 0.53rem 0.7rem;
|
||||
.title {
|
||||
font-size: 0.37rem;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.cert-group{
|
||||
.cert{
|
||||
font-size: .37rem;
|
||||
|
||||
.cert-group {
|
||||
.cert {
|
||||
font-size: 0.37rem;
|
||||
color: #666;
|
||||
span{
|
||||
font-size: .28rem;
|
||||
span {
|
||||
font-size: 0.28rem;
|
||||
}
|
||||
}
|
||||
.uploader{
|
||||
.uploader {
|
||||
text-align: center;
|
||||
padding: .4rem 0;
|
||||
margin-top: .4rem;
|
||||
padding: 0.4rem 0;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
}
|
||||
.attention{
|
||||
font-size: .35rem;
|
||||
.attention {
|
||||
font-size: 0.35rem;
|
||||
color: #999;
|
||||
margin-top: .3rem;
|
||||
margin-top: 0.3rem;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
&::before{
|
||||
content: '*';
|
||||
&::before {
|
||||
content: "*";
|
||||
color: red;
|
||||
margin-right: .1rem;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
}
|
||||
.agreement{
|
||||
.agreement {
|
||||
text-align: center;
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
padding: 1rem 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
}
|
||||
.loading{
|
||||
.loading {
|
||||
position: fixed;
|
||||
left: 0;top:0;right: 0;bottom: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
background: rgba(0,0,0,0.6);
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
margin: auto;
|
||||
border-radius: .3rem;
|
||||
font-size: .3rem;
|
||||
border-radius: 0.3rem;
|
||||
font-size: 0.3rem;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.loading-mask{
|
||||
.loading-mask {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -409,17 +454,17 @@ export default {
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
.form{
|
||||
padding: .4rem 0;
|
||||
.group{
|
||||
margin-bottom: .6rem;
|
||||
.label-temple{
|
||||
font-size: .4rem;
|
||||
padding-left: .4rem;
|
||||
&::before{
|
||||
content: '';
|
||||
.form {
|
||||
padding: 0.4rem 0;
|
||||
.group {
|
||||
margin-bottom: 0.6rem;
|
||||
.label-temple {
|
||||
font-size: 0.4rem;
|
||||
padding-left: 0.4rem;
|
||||
&::before {
|
||||
content: "";
|
||||
width: 4px;
|
||||
height: .37rem;
|
||||
height: 0.37rem;
|
||||
background: #bb5f5f;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
@@ -427,55 +472,54 @@ export default {
|
||||
margin-top: -4px;
|
||||
}
|
||||
}
|
||||
.legal-person{
|
||||
.legal-person {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: .5rem .4rem .3rem;
|
||||
.label{
|
||||
font-size: .37rem;
|
||||
padding: 0.5rem 0.4rem 0.3rem;
|
||||
.label {
|
||||
font-size: 0.37rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.administrator_wechat{
|
||||
padding: .4rem;
|
||||
.title{
|
||||
font-size: .4rem;
|
||||
.administrator_wechat {
|
||||
padding: 0.4rem;
|
||||
.title {
|
||||
font-size: 0.4rem;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.qrcode{
|
||||
.qrcode {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.label{
|
||||
font-size: .4rem;
|
||||
padding: .5rem 0;
|
||||
.label {
|
||||
font-size: 0.4rem;
|
||||
padding: 0.5rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
.notice{
|
||||
font-size: .4rem;
|
||||
.notice {
|
||||
font-size: 0.4rem;
|
||||
color: rgb(129, 43, 43);
|
||||
margin-top: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.button-group{
|
||||
.button-group {
|
||||
margin-top: 2rem;
|
||||
display: flex;
|
||||
.prev{
|
||||
margin-right: .3rem;
|
||||
.prev {
|
||||
margin-right: 0.3rem;
|
||||
width: 3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.button-group{
|
||||
padding: 0 .4rem;
|
||||
.button-group {
|
||||
padding: 0 0.4rem;
|
||||
padding-top: 0rem;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
+3
-3
@@ -66,13 +66,13 @@ const routes = [
|
||||
{
|
||||
path: "/merit-list",
|
||||
name: "merit-list",
|
||||
meta: { title: "功德无量", navBarBackgroundColor: "white" },
|
||||
meta: { title: "近期活动", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/merit-list"),
|
||||
},
|
||||
{
|
||||
path: "/merit-box",
|
||||
name: "merit-box",
|
||||
meta: { title: "功德无量", navBarBackgroundColor: "white", showNavBar: false },
|
||||
meta: { title: "近期活动", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/merit-box"),
|
||||
},
|
||||
|
||||
@@ -91,7 +91,7 @@ const routes = [
|
||||
{
|
||||
path: "/pay-result",
|
||||
name: "pay-result",
|
||||
meta: { title: "捐赠成功", navBarBackgroundColor: "white" },
|
||||
meta: { title: "护持成功", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/pay-result"),
|
||||
},
|
||||
{
|
||||
|
||||
+21
-22
@@ -1,34 +1,33 @@
|
||||
export default {
|
||||
setSearchParamsFromObj(obj){
|
||||
let search = '?';
|
||||
for(let i in obj){
|
||||
search += `${i}=${obj[i]}&`
|
||||
setSearchParamsFromObj(obj) {
|
||||
let search = "?";
|
||||
for (let i in obj) {
|
||||
search += `${i}=${obj[i]}&`;
|
||||
}
|
||||
return search.slice(0, -1);
|
||||
},
|
||||
addExternalParamsToQuery(url, key, value){
|
||||
if(!url){
|
||||
return ''
|
||||
addExternalParamsToQuery(url, key, value) {
|
||||
if (!url) {
|
||||
return "";
|
||||
}
|
||||
const hasQuery = url.indexOf('?') > -1
|
||||
url = url.split('?')
|
||||
const before = url.shift()
|
||||
let after = url.join('&')
|
||||
const searchParams = new URLSearchParams(after);
|
||||
if(!searchParams.has(key)){
|
||||
return before+'?'+after+'&'+key+'='+value;
|
||||
const [beforeHash] = url.split("#");
|
||||
const [beforeQuery, query = ""] = beforeHash.split("?");
|
||||
const searchParams = new URLSearchParams(query);
|
||||
if (!searchParams.has(key)) {
|
||||
searchParams.set(key, value);
|
||||
}
|
||||
return before+(hasQuery ? '?': '&') + after;
|
||||
const queryString = searchParams.toString();
|
||||
return `${beforeQuery}?${queryString}`;
|
||||
},
|
||||
queryStringToObj(queryString){
|
||||
const string = queryString.split('&');
|
||||
queryStringToObj(queryString) {
|
||||
const string = queryString.split("&");
|
||||
const obj = {};
|
||||
|
||||
string.forEach(str => {
|
||||
const [key, value] = str.split('=');
|
||||
string.forEach((str) => {
|
||||
const [key, value] = str.split("=");
|
||||
obj[key] = value;
|
||||
})
|
||||
});
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -50,5 +50,17 @@ module.exports = {
|
||||
},
|
||||
css: {
|
||||
sourceMap: false,
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
sassOptions: {
|
||||
silenceDeprecations: ["legacy-js-api", "import"],
|
||||
},
|
||||
},
|
||||
scss: {
|
||||
sassOptions: {
|
||||
silenceDeprecations: ["legacy-js-api", "import"],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user