Compare commits
10
Commits
b3862ac356
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13bb939099 | ||
|
|
68dc57ffe5 | ||
|
|
0265cfe27c | ||
|
|
d9d8100e4a | ||
|
|
48324cd36f | ||
|
|
1a5279a8f5 | ||
|
|
74572077e4 | ||
|
|
74b05adf7c | ||
|
|
be2a7ac33c | ||
|
|
33d9d6bb06 |
Generated
-17673
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -3,7 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve --mode development",
|
||||
"dev": "vue-cli-service serve --mode development",
|
||||
"build:test": "vue-cli-service build --mode test",
|
||||
"build": "vue-cli-service build --mode production",
|
||||
"lint": "vue-cli-service lint"
|
||||
@@ -36,8 +36,8 @@
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"sass": "^1.89.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"sass-resources-loader": "^2.2.4",
|
||||
"sass-loader": "^8.0.2",
|
||||
"sass-resources-loader": "^2.2.5",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
||||
Generated
+770
-664
File diff suppressed because it is too large
Load Diff
+8
-9
@@ -1,19 +1,18 @@
|
||||
<!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 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">
|
||||
<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">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 313 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
+42
-36
@@ -2,11 +2,11 @@
|
||||
<div class="app-safe-area" :style="{ minHeight: minHeight + 'px' }">
|
||||
<div id="app" :data-height="minHeight - tabHeight" :style="{ minHeight: minHeight - tabHeight + 'px', paddingBottom: tabHeight + 'px' }">
|
||||
<router-view />
|
||||
<van-tabbar v-if="showTabbar" class="tabbar" v-model="actionRoute" ref="tabbar" active-color="#CF9E3B" inactive-color="#999">
|
||||
<van-tabbar v-if="showTabbar" class="tabbar" v-model="actionRoute" ref="tabbar" active-color="#CF9E3B;" inactive-color="#999">
|
||||
<van-tabbar-item replace name v-for="(tab, index) in tabbar" :key="index" @click="onNavigation(tab)">
|
||||
<span>{{ tab.title }}</span>
|
||||
<template #icon="props">
|
||||
<img :src="props.active ? tab.active: tab.inactive" alt="">
|
||||
<img :src="props.active ? tab.active : tab.inactive" alt="" />
|
||||
</template>
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
@@ -15,13 +15,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { tabbar } from '../src/router';
|
||||
import safeAreaInsets from 'safe-area-insets';
|
||||
import { tabbar } from "../src/router";
|
||||
import safeAreaInsets from "safe-area-insets";
|
||||
export default {
|
||||
name: 'App',
|
||||
name: "App",
|
||||
data() {
|
||||
return {
|
||||
active: '3',
|
||||
active: "3",
|
||||
minHeight: 0,
|
||||
tabbar,
|
||||
tabHeight: 0,
|
||||
@@ -39,10 +39,13 @@ export default {
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route': {
|
||||
$route: {
|
||||
handler(val) {
|
||||
document.title = val.meta.title || '自在福田'
|
||||
this.active = tabbar.map(v => v.name).indexOf(val.name).toString();
|
||||
document.title = val.meta.title || "自在福田";
|
||||
this.active = tabbar
|
||||
.map((v) => v.name)
|
||||
.indexOf(val.name)
|
||||
.toString();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
@@ -51,52 +54,55 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
const { tabbar } = this.$refs;
|
||||
this.tabHeight = tabbar ? tabbar.$el.offsetHeight - safeAreaInsets.bottom : 0;
|
||||
})
|
||||
});
|
||||
},
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$store.commit('SET_LAUNCH', this.$route.query)
|
||||
this.$store.commit("SET_LAUNCH", this.$route.query);
|
||||
setTimeout(() => {
|
||||
this.minHeight = window.innerHeight - safeAreaInsets.bottom;
|
||||
}, 30)
|
||||
}, 30);
|
||||
},
|
||||
methods: {
|
||||
onNavigation(tab) {
|
||||
const { path } = this.$route;
|
||||
if (path === tab.path) return;
|
||||
this.$router.push({ path: tab.path, query: { temple_id: this.$route.query.temple_id}})
|
||||
}
|
||||
this.$router.push({ path: tab.path, query: { temple_id: this.$route.query.temple_id } });
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
actionRoute: {
|
||||
get() {
|
||||
const { tabbar } = this;
|
||||
return tabbar.map(tab => tab.name).indexOf(this.$route.name)
|
||||
return tabbar.map((tab) => tab.name).indexOf(this.$route.name);
|
||||
},
|
||||
set(){ }
|
||||
set() {},
|
||||
},
|
||||
showTabbar() {
|
||||
const path = tabbar.map(tab => tab.name);
|
||||
const { name, query: { hideTab } } = this.$route;
|
||||
const path = tabbar.map((tab) => tab.name);
|
||||
const {
|
||||
name,
|
||||
query: { hideTab },
|
||||
} = this.$route;
|
||||
|
||||
// 等于寺庙功德箱时隐藏底部导航
|
||||
if(name === 'merit-box' || (name === 'temple-list' && hideTab === '1')){
|
||||
return false
|
||||
if (name === "merit-box" || (name === "temple-list" && hideTab === "1")) {
|
||||
return false;
|
||||
}
|
||||
return path.includes(this.$route.name);
|
||||
},
|
||||
paddingBottom() {
|
||||
return this.showTabbar ? this.$refs.tabbar ? this.$refs.tabbar.$el.offsetHeight : 0 : 0;
|
||||
}
|
||||
}
|
||||
return this.showTabbar ? (this.$refs.tabbar ? this.$refs.tabbar.$el.offsetHeight : 0) : 0;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '~@/assets/css/reset.css';
|
||||
@import '//at.alicdn.com/t/font_2897403_8d7w3rodyu2.css';
|
||||
@import "~@/assets/css/reset.css";
|
||||
@import "//at.alicdn.com/t/font_2897403_8d7w3rodyu2.css";
|
||||
.app-safe-area {
|
||||
position: relative;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
@@ -118,17 +124,17 @@ export default {
|
||||
}
|
||||
}
|
||||
.loadmore {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
padding: .4rem 0;
|
||||
padding: 0.4rem 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.icon {
|
||||
width: .6rem;
|
||||
width: 0.6rem;
|
||||
vertical-align: middle;
|
||||
margin-right: .2rem;
|
||||
margin-right: 0.2rem;
|
||||
animation: loading 3s linear infinite;
|
||||
}
|
||||
}
|
||||
@@ -136,23 +142,23 @@ export default {
|
||||
.icon-home {
|
||||
width: 1.1rem;
|
||||
height: 1.1rem;
|
||||
font-size: .5rem;
|
||||
font-size: 0.5rem;
|
||||
background: white;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 1rem;
|
||||
position: absolute;
|
||||
left: .4rem;
|
||||
top: .4rem;
|
||||
left: 0.4rem;
|
||||
top: 0.4rem;
|
||||
&:active {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
}
|
||||
|
||||
.no-more {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
padding: .4rem 0;
|
||||
padding: 0.4rem 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -161,7 +167,7 @@ export default {
|
||||
.read-more {
|
||||
height: 1.3rem;
|
||||
text-align: center;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
line-height: 1.3rem;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import service from "./service";
|
||||
|
||||
// 订单列表
|
||||
export const getOrderList = (params) => service.get("/api/admin/orders", { data: params });
|
||||
|
||||
// 订单详情
|
||||
export const getOrderDetail = (id) => service.get(`/api/admin/order/${id}`);
|
||||
|
||||
// 反馈
|
||||
export const postFeedback = (id, data) => service.post(`/api/admin/order-done/${id}`, data);
|
||||
|
||||
// 上传图片
|
||||
export const uploadImage = (data) => service.post("/admin/api/upload", data);
|
||||
@@ -179,8 +179,15 @@ const getMeritTypes = () => service.get("/api/order/get-merit-types");
|
||||
// 支付广告
|
||||
const getPayAdv = () => service.get("/api/ad/ad-pay");
|
||||
|
||||
// 保存手机号
|
||||
const saveMobileNumber = (mobile) => service.put("/api/mobile", { mobile });
|
||||
|
||||
// 检查是否有手机号
|
||||
const checkUserMobile = () => service.get("/api/mobile-check");
|
||||
|
||||
export {
|
||||
getPayAdv,
|
||||
saveMobileNumber,
|
||||
getMeritTypes,
|
||||
getDynamicDataByGoodsId,
|
||||
hasLogin,
|
||||
@@ -229,4 +236,5 @@ export {
|
||||
getCertList,
|
||||
getStationTemplate,
|
||||
getPlatformHome,
|
||||
checkUserMobile,
|
||||
};
|
||||
|
||||
@@ -28,6 +28,10 @@ instance.interceptors.request.use((request) => {
|
||||
request.data = qs.stringify(request.data);
|
||||
return request;
|
||||
}
|
||||
if (request.method == "get") {
|
||||
request.url += `${request.url.includes("?") ? "" : "?"}${qs.stringify(request.data).slice(0, -1)}`;
|
||||
return request;
|
||||
}
|
||||
return request;
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import './variable.scss';
|
||||
@use "./variable.scss" as *;
|
||||
|
||||
.divider {
|
||||
height: .24rem;
|
||||
@@ -12,6 +12,7 @@ display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.text-multiple-2 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -22,6 +23,7 @@ display: -webkit-box;
|
||||
|
||||
.panel {
|
||||
padding-bottom: .4rem;
|
||||
|
||||
.panel-head {
|
||||
//padding: .53rem .4rem;
|
||||
padding: .3rem .4rem;
|
||||
@@ -51,10 +53,12 @@ display: -webkit-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.process-more {
|
||||
line-height: 1.17rem;
|
||||
text-align: center;
|
||||
font-size: .37rem;
|
||||
|
||||
.iconfont {
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -62,6 +66,7 @@ display: -webkit-box;
|
||||
|
||||
.border-bottom {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
height: 1px;
|
||||
@@ -75,8 +80,10 @@ display: -webkit-box;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.border-top {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
height: 1px;
|
||||
@@ -90,8 +97,10 @@ display: -webkit-box;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.border-circle {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
height: 199%;
|
||||
@@ -110,9 +119,12 @@ display: -webkit-box;
|
||||
|
||||
.active {
|
||||
&::before {
|
||||
border-color: $primary-color;
|
||||
border-color: #CF9E3B;
|
||||
;
|
||||
}
|
||||
color: $primary-color;
|
||||
|
||||
color: #CF9E3B;
|
||||
;
|
||||
}
|
||||
|
||||
.multiple-line-3 {
|
||||
@@ -121,6 +133,7 @@ display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.no-more {
|
||||
height: 1rem;
|
||||
line-height: 1rem;
|
||||
@@ -128,6 +141,7 @@ display: -webkit-box;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
background: #e1e1e1 !important;
|
||||
border-color: #e1e1e1 !important;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
$primary-color: #CF9E3B;
|
||||
$btn-border-radius: .07rem;
|
||||
+14
-9
@@ -13,13 +13,16 @@ import {
|
||||
TabbarItem,
|
||||
Cell,
|
||||
CellGroup,
|
||||
Tab, Tabs,
|
||||
Tab,
|
||||
Tabs,
|
||||
Progress,
|
||||
Form,
|
||||
Field,
|
||||
Uploader,
|
||||
Step, Steps,
|
||||
Checkbox, CheckboxGroup,
|
||||
Step,
|
||||
Steps,
|
||||
Checkbox,
|
||||
CheckboxGroup,
|
||||
Popup,
|
||||
Stepper,
|
||||
Radio,
|
||||
@@ -31,10 +34,12 @@ import {
|
||||
Loading,
|
||||
Dialog,
|
||||
Icon,
|
||||
Popover,
|
||||
} from "vant";
|
||||
|
||||
Vue.use(NavBar);
|
||||
Vue.use(Button);
|
||||
Vue.use(Popover);
|
||||
Vue.use(Loading);
|
||||
Vue.use(Icon);
|
||||
Vue.use(Search);
|
||||
@@ -60,9 +65,9 @@ Vue.use(Checkbox);
|
||||
Vue.use(CheckboxGroup);
|
||||
Vue.use(Popup);
|
||||
Vue.use(Stepper);
|
||||
Vue.use(Radio)
|
||||
Vue.use(RadioGroup)
|
||||
Vue.use(Switch)
|
||||
Vue.use(ActionSheet)
|
||||
Vue.use(Cascader)
|
||||
Vue.use(Dialog)
|
||||
Vue.use(Radio);
|
||||
Vue.use(RadioGroup);
|
||||
Vue.use(Switch);
|
||||
Vue.use(ActionSheet);
|
||||
Vue.use(Cascader);
|
||||
Vue.use(Dialog);
|
||||
|
||||
+96
-58
@@ -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);
|
||||
wechatReadyPromise = new Promise((resolve, reject) => {
|
||||
wx.ready(function () {
|
||||
console.log("wechat sdk config success");
|
||||
wechatInstance = wx;
|
||||
|
||||
wx.onMenuShareAppMessage({
|
||||
title: shareConfig.title,
|
||||
desc: shareConfig.desc,
|
||||
link: util.addExternalParamsToQuery(shareConfig.link, "no_login", 1),
|
||||
imgUrl: shareConfig.imgUrl,
|
||||
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) => {
|
||||
shareConfig.callback &&
|
||||
shareConfig.callback({
|
||||
key: "updateAppMessageShareData",
|
||||
...res,
|
||||
});
|
||||
emitShareCallback(safeShareConfig, "updateAppMessageShareData", res);
|
||||
},
|
||||
});
|
||||
|
||||
// // 分享朋友圈
|
||||
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
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
});
|
||||
}
|
||||
|
||||
function getLocation() {
|
||||
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);
|
||||
});
|
||||
|
||||
if (typeof wx.error === "function") {
|
||||
wx.error((error) => {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
wx.config(defaultConfig);
|
||||
}
|
||||
|
||||
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("用户取消定位"));
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toggleCollect } from '@/api';
|
||||
import { toggleCollect } from "@/api";
|
||||
|
||||
export default {
|
||||
name: 'buddha-process',
|
||||
name: "buddha-process",
|
||||
props: {
|
||||
data: {
|
||||
required: true,
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
showGoodsBtn: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
data: {
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
covers: {
|
||||
get() {
|
||||
const type = Object.prototype.toString.call(this.privateData.covers);
|
||||
return type === '[object Object]' ? []: this.privateData.covers.slice(0, 3);
|
||||
return type === "[object Object]" ? [] : this.privateData.covers.slice(0, 3);
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -65,19 +65,19 @@ export default {
|
||||
async onCollect() {
|
||||
await toggleCollect(this.data.id);
|
||||
this.privateData.is_collected = this.privateData.is_collected === 1 ? 0 : 1;
|
||||
this.$emit('collection', this.data.id);
|
||||
this.$emit("collection", this.data.id);
|
||||
},
|
||||
onProcessDetail() {
|
||||
const { id } = this.privateData;
|
||||
this.$router.push({
|
||||
name: 'buddha-detail',
|
||||
query: { id }
|
||||
})
|
||||
name: "buddha-detail",
|
||||
query: { id },
|
||||
});
|
||||
},
|
||||
onGoodsDetail() {
|
||||
const { goods_type, goods_id, temple_id, spec_ids } = this.privateData;
|
||||
this.onPushToGoodsDetail(goods_type, goods_id, temple_id, spec_ids)
|
||||
}
|
||||
this.onPushToGoodsDetail(goods_type, goods_id, temple_id, spec_ids);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
position: relative;
|
||||
padding: 0 0.4rem;
|
||||
&::after {
|
||||
content: '';
|
||||
content: "";
|
||||
height: 1px;
|
||||
width: 200%;
|
||||
background: #ededed;
|
||||
@@ -132,8 +132,8 @@ export default {
|
||||
@extend .text-multiple-3;
|
||||
}
|
||||
.detail-text {
|
||||
font-size: .4rem;
|
||||
padding-top: .2rem;
|
||||
font-size: 0.4rem;
|
||||
padding-top: 0.2rem;
|
||||
color: #b74100;
|
||||
}
|
||||
.image-group {
|
||||
@@ -180,7 +180,7 @@ export default {
|
||||
align-items: center;
|
||||
|
||||
.iconfont {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
vertical-align: middle;
|
||||
font-size: 0.4rem;
|
||||
margin-top: -3px;
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
}
|
||||
.collect {
|
||||
.iconfont {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
.un-collect {
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<van-popover v-model="showPopover" trigger="click" placement="top-end">
|
||||
<template #reference>
|
||||
<button class="customer-service-btn">
|
||||
<svg t="1776784019841" class="icon" viewBox="0 0 1051 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5796" width="20" height="20">
|
||||
<path
|
||||
d="M55.351351 553.402811v110.924108a83.027027 83.027027 0 0 0 166.054054 0v-110.924108a83.027027 83.027027 0 0 0-166.054054 0z m763.101406 211.552865A137.852541 137.852541 0 0 1 774.918919 664.326919v-110.924108A138.378378 138.378378 0 0 1 912.328649 415.135135C898.131027 214.071351 730.499459 55.351351 525.837838 55.351351 321.148541 55.351351 153.544649 214.071351 139.347027 415.135135A138.461405 138.461405 0 0 1 276.756757 553.402811v110.924108a138.378378 138.378378 0 0 1-276.756757 0v-110.924108a138.378378 138.378378 0 0 1 83.303784-126.865297C91.883243 189.523027 286.72 0 525.837838 0s433.954595 189.523027 442.534054 426.537514A138.461405 138.461405 0 0 1 1051.675676 553.402811v110.924108a138.378378 138.378378 0 0 1-184.790487 130.269405 470.763243 470.763243 0 0 1-188.858811 121.21946A96.809514 96.809514 0 0 1 580.912432 1010.162162h-82.528864c-53.690811 0-97.113946-43.174054-97.113946-96.864865 0-53.607784 43.284757-96.864865 97.141621-96.864865h82.473514c34.954378 0 65.536 18.265946 82.639567 45.803244a415.273514 415.273514 0 0 0 154.900757-97.28zM830.27027 553.402811v110.924108a83.027027 83.027027 0 0 0 166.054054 0v-110.924108a83.027027 83.027027 0 0 0-166.054054 0zM498.438919 954.810811h82.473513c23.302919 0 41.79027-18.487351 41.790271-41.513514 0-23.053838-18.570378-41.513514-41.790271-41.513513h-82.473513c-23.302919 0-41.79027 18.487351-41.79027 41.513513 0 23.053838 18.570378 41.513514 41.79027 41.513514z"
|
||||
fill="#666666"
|
||||
p-id="5797"
|
||||
></path>
|
||||
</svg>
|
||||
<span>客服</span>
|
||||
</button>
|
||||
</template>
|
||||
<div class="customer-group">
|
||||
<p class="head">点击下方客服即可复制客服号码,可添加或添加微信号</p>
|
||||
<div class="customer-type-group" v-for="(cus, index) in list" :key="index" @click="onService(cus)">
|
||||
<img :src="cus.icon_url" alt="" />
|
||||
<div class="info">
|
||||
<h1>{{ cus.title }} <span class="wechat-account" v-copy="cus.value"></span></h1>
|
||||
<p v-html="cus.content"></p>
|
||||
</div>
|
||||
<a class="phone" :href="'tel://' + cus.value" v-if="cus.title === '电话客服'"></a>
|
||||
</div>
|
||||
</div>
|
||||
</van-popover>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCustomerList } from "@/api";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
showPopover: false,
|
||||
actions: [{ name: "选项1" }, { name: "选项2" }, { name: "选项3" }],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
showPopover(val) {
|
||||
console.log("val", val);
|
||||
document.body.style.overflow = val ? "hidden" : "auto";
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.getCustomerList();
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
async getCustomerList() {
|
||||
if (this.list.length) return;
|
||||
const res = await getCustomerList();
|
||||
this.list = res.list;
|
||||
this.qrcode = this.$config.qrcode.wechatAccount || res.platform_code;
|
||||
},
|
||||
onService(cus) {
|
||||
this.showPopover = false;
|
||||
navigator.clipboard.writeText(cus.value);
|
||||
this.$toast.success("已复制");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.customer-service-btn {
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
background: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 8px;
|
||||
font-size: 0.25rem;
|
||||
gap: 0.14rem;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.van-popover__content {
|
||||
width: 90%;
|
||||
}
|
||||
.customer-group {
|
||||
padding: 0.3rem;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
box-shadow: 0 -10px 10px rgba(0, 0, 0, 0.1);
|
||||
|
||||
.head {
|
||||
font-size: 0.3rem;
|
||||
color: #aaa;
|
||||
padding: 0 0.4rem;
|
||||
}
|
||||
.customer-type-group {
|
||||
display: flex;
|
||||
background: white;
|
||||
height: 1.67rem;
|
||||
border-radius: 0.27rem;
|
||||
padding: 0.2rem 0.4rem;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
img {
|
||||
width: 1.07rem;
|
||||
height: 1.07rem;
|
||||
border-radius: 50%;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
&::after {
|
||||
content: "";
|
||||
width: 90%;
|
||||
height: 1px;
|
||||
background: #f1f1f1;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
&:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
.phone {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.info {
|
||||
flex: 1;
|
||||
font-size: 0.37rem;
|
||||
h1 {
|
||||
font-size: 0.4rem;
|
||||
margin-bottom: 0.2rem;
|
||||
.wechat-account {
|
||||
color: rgb(167, 54, 54);
|
||||
}
|
||||
}
|
||||
p {
|
||||
color: #aaa;
|
||||
font-size: 0.3rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="detail-content-expand">
|
||||
<div class="content" :class="[contentOverflow && !show && '']" ref="wrapper" :style="{ height: (show ? contentHeight : defaultContentHeight) + 'px' }">
|
||||
<div class="content" :class="[contentOverflow && !show && '']" ref="wrapper" :style="{ height: show ? 'auto' : defaultContentHeight + 'px' }">
|
||||
<div ref="content" class="ref-content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
@@ -41,7 +41,8 @@ export default {
|
||||
mounted() {
|
||||
this.wrapperHeight = this.$refs.wrapper.offsetHeight;
|
||||
this.$nextTick(() => {
|
||||
this.contentHeight = this.$refs.content.offsetHeight;
|
||||
console.log(this.$refs.content.clientHeight);
|
||||
this.contentHeight = this.$refs.content.clientHeight;
|
||||
this.wrapperContainerHeight = this.wrapperHeight;
|
||||
this.refresh();
|
||||
});
|
||||
@@ -56,7 +57,7 @@ export default {
|
||||
this.defaultContentHeight = 100;
|
||||
return;
|
||||
}
|
||||
this.defaultContentHeight = selector.offsetHeight / (4 / 1);
|
||||
this.defaultContentHeight = selector.offsetHeight / (2 / 1);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom
|
||||
style="min-height: 50vh">
|
||||
<van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom style="min-height: 50vh">
|
||||
<div class="add-merit-name">
|
||||
<h3 class="title">心愿</h3>
|
||||
<div class="desire-input">
|
||||
@@ -22,57 +21,57 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDreamList } from '@/api';
|
||||
import { getDreamList } from "@/api";
|
||||
|
||||
export default {
|
||||
name: 'merit-desire',
|
||||
name: "merit-desire",
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'increment', // increment | single
|
||||
default: "increment", // increment | single
|
||||
},
|
||||
selected: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
maxLength: {
|
||||
type: Number,
|
||||
default: 50
|
||||
}
|
||||
default: 50,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
desire: '',
|
||||
dreamList: []
|
||||
name: "",
|
||||
desire: "",
|
||||
dreamList: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
visible(value) {
|
||||
if (value) {
|
||||
this.selectedName = this.selected.map(v => v.id)
|
||||
}
|
||||
this.selectedName = this.selected.map((v) => v.id);
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDreamList();
|
||||
},
|
||||
methods: {
|
||||
onFill(dream) {
|
||||
if(this.mode === 'single'){
|
||||
return this.desire = dream;
|
||||
if (this.mode === "single") {
|
||||
return (this.desire = dream);
|
||||
}
|
||||
this.desire += dream + ',';
|
||||
this.desire = this.desire.slice(0, this.maxLength)
|
||||
this.desire += dream + ",";
|
||||
this.desire = this.desire.slice(0, this.maxLength);
|
||||
},
|
||||
onClose() {
|
||||
this.$emit('update:visible', false);
|
||||
this.$emit("update:visible", false);
|
||||
},
|
||||
//获取心愿列表
|
||||
async getDreamList() {
|
||||
@@ -82,20 +81,20 @@ export default {
|
||||
onConfirmDream() {
|
||||
this.showDialog = false;
|
||||
this.dream = this.desire;
|
||||
this.$emit('update:visible', false);
|
||||
this.$emit('change', this.dream)
|
||||
this.$emit("update:visible", false);
|
||||
this.$emit("change", this.dream);
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.add-merit-name {
|
||||
padding: .4rem;
|
||||
padding: 0.4rem;
|
||||
|
||||
.title {
|
||||
font-size: .4rem;
|
||||
margin-bottom: .4rem;
|
||||
font-size: 0.4rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.add-name {
|
||||
@@ -103,49 +102,49 @@ export default {
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
height: .8rem;
|
||||
line-height: .8rem;
|
||||
padding-left: .3rem;
|
||||
height: 0.8rem;
|
||||
line-height: 0.8rem;
|
||||
padding-left: 0.3rem;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: .11rem;
|
||||
font-size: .4rem;
|
||||
border-radius: 0.11rem;
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: .2rem .6rem;
|
||||
background: $primary-color;
|
||||
padding: 0.2rem 0.6rem;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
font-size: .4rem;
|
||||
border-radius: .11rem;
|
||||
margin-left: .3rem;
|
||||
border: 1px solid #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
border-radius: 0.11rem;
|
||||
margin-left: 0.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.name-group {
|
||||
padding: .5rem 0;
|
||||
padding: 0.5rem 0;
|
||||
height: 30vh;
|
||||
span {
|
||||
display: inline-block;
|
||||
padding: .2rem .3rem;
|
||||
padding: 0.2rem 0.3rem;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: .08rem;
|
||||
border-radius: 0.08rem;
|
||||
position: relative;
|
||||
margin-right: .2rem;
|
||||
margin-bottom: .2rem;
|
||||
font-size: .35rem;
|
||||
margin-right: 0.2rem;
|
||||
margin-bottom: 0.2rem;
|
||||
font-size: 0.35rem;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
right: -.25rem;
|
||||
top: -.25rem;
|
||||
font-size: .5rem;
|
||||
right: -0.25rem;
|
||||
top: -0.25rem;
|
||||
font-size: 0.5rem;
|
||||
color: red;
|
||||
}
|
||||
input[type=checkbox]{
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -154,24 +153,23 @@ export default {
|
||||
opacity: 0;
|
||||
}
|
||||
&.selected {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.desire-input {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: .13rem;
|
||||
border-radius: 0.13rem;
|
||||
overflow: hidden;
|
||||
|
||||
.desire-textarea {
|
||||
border: none;
|
||||
display: block;
|
||||
font-size: .35rem;
|
||||
width: calc(100% - .5rem);
|
||||
padding: .25rem;
|
||||
font-size: 0.35rem;
|
||||
width: calc(100% - 0.5rem);
|
||||
padding: 0.25rem;
|
||||
height: 2rem;
|
||||
resize: none;
|
||||
line-height: 1.4;
|
||||
@@ -180,8 +178,8 @@ export default {
|
||||
span {
|
||||
display: block;
|
||||
text-align: right;
|
||||
padding: .2rem;
|
||||
font-size: .35rem;
|
||||
padding: 0.2rem;
|
||||
font-size: 0.35rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,34 +190,33 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: .4rem;
|
||||
margin-bottom: .3rem;
|
||||
font-size: 0.4rem;
|
||||
margin-bottom: 0.3rem;
|
||||
|
||||
.update {
|
||||
font-size: .35rem;
|
||||
color: $primary-color;
|
||||
font-size: 0.35rem;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
|
||||
.name-group {
|
||||
padding: .1rem 0;
|
||||
padding: 0.1rem 0;
|
||||
|
||||
.name {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.confirm {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
width: 100%;
|
||||
padding: .3rem 0;
|
||||
padding: 0.3rem 0;
|
||||
border-radius: 1rem;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="merit-goods" @click="onJoin">
|
||||
<img class="goods" :src="data.cover_url" alt="">
|
||||
<img class="goods" :src="data.cover_url" alt="" />
|
||||
<div class="info">
|
||||
<h3 class="title">{{ data.title }}</h3>
|
||||
<div class="bar">
|
||||
@@ -13,33 +13,35 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'merit-goods',
|
||||
props: ['data'],
|
||||
name: "merit-goods",
|
||||
props: ["data"],
|
||||
methods: {
|
||||
onJoin() {
|
||||
this.$router.push({
|
||||
name: 'goods-detail',
|
||||
name: "goods-detail",
|
||||
query: {
|
||||
goods_id: this.data.id,
|
||||
temple_id: this.data.temple_id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
temple_id: this.data.temple_id,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.merit-goods {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: .4rem;
|
||||
border-bottom: .01rem solid #f2f2f2;
|
||||
padding: 0.4rem;
|
||||
border-bottom: 0.01rem solid #f2f2f2;
|
||||
.goods {
|
||||
width: 2.93rem;
|
||||
height: 2.93rem;
|
||||
margin-right: .4rem;
|
||||
border-radius: .11rem;
|
||||
margin-right: 0.4rem;
|
||||
border-radius: 0.11rem;
|
||||
object-fit: contain;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
.info {
|
||||
flex: 1;
|
||||
@@ -47,7 +49,7 @@ export default {
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.title {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.bar {
|
||||
@@ -55,18 +57,18 @@ export default {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.join-number {
|
||||
font-size: .35rem;
|
||||
font-size: 0.35rem;
|
||||
color: #666;
|
||||
}
|
||||
.join {
|
||||
height: .67rem;
|
||||
padding: 0 .4rem;
|
||||
background: #CF9E3B;
|
||||
border: .01rem solid #CF9E3B;
|
||||
height: 0.67rem;
|
||||
padding: 0 0.4rem;
|
||||
background: #cf9e3b;
|
||||
border: 0.01rem solid #cf9e3b;
|
||||
color: white;
|
||||
border-radius: .05rem;
|
||||
font-size: .37rem;
|
||||
line-height: .67rem;
|
||||
border-radius: 0.05rem;
|
||||
font-size: 0.37rem;
|
||||
line-height: 0.67rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
<template>
|
||||
<van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom
|
||||
style="min-height: 50vh">
|
||||
<van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom style="min-height: 50vh">
|
||||
<div class="add-merit-name">
|
||||
<h3 class="title">功德芳名</h3>
|
||||
<div class="add-name">
|
||||
<input class="input" type="text" v-model="name" placeholder="请输入功德主姓名">
|
||||
<input class="input" type="text" v-model="name" placeholder="请输入功德主姓名" />
|
||||
<button class="btn" @click="addName">添加</button>
|
||||
</div>
|
||||
<div class="name-group">
|
||||
<span class="name" :class="[selectedName.includes(name.id) && 'selected']" v-for="(name, index) in names" :key="name.id" @click="onSelectName(name)">
|
||||
{{ name.name }}
|
||||
<input type="checkbox" v-model="selectedName" :value="name.id" >
|
||||
<input type="checkbox" v-model="selectedName" :value="name.id" />
|
||||
<i class="iconfont icon-biaodankongjianshanchu" @click.stop="onDeleteName(name, index)"></i>
|
||||
</span>
|
||||
</div>
|
||||
@@ -20,26 +19,26 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deleteMeritName, getMeritName, postMeritName } from '@/api';
|
||||
import { deleteMeritName, getMeritName, postMeritName } from "@/api";
|
||||
|
||||
export default {
|
||||
name: 'merit-name',
|
||||
name: "merit-name",
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
selected: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
name: '',
|
||||
name: "",
|
||||
names: [],
|
||||
selectedName: [],
|
||||
};
|
||||
@@ -47,16 +46,16 @@ export default {
|
||||
watch: {
|
||||
visible(value) {
|
||||
if (value) {
|
||||
this.selectedName = this.selected.map(v => v.id)
|
||||
}
|
||||
this.selectedName = this.selected.map((v) => v.id);
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getName();
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
this.$emit('update:visible', false);
|
||||
this.$emit("update:visible", false);
|
||||
},
|
||||
onSelectName(name) {
|
||||
this.person = name;
|
||||
@@ -65,7 +64,7 @@ export default {
|
||||
async addName() {
|
||||
if (!this.name) return;
|
||||
await postMeritName(this.name);
|
||||
this.name = '';
|
||||
this.name = "";
|
||||
await this.getName();
|
||||
},
|
||||
async onDeleteName(name) {
|
||||
@@ -80,26 +79,26 @@ export default {
|
||||
if (this.name) {
|
||||
const name = this.name;
|
||||
await this.addName(this.name);
|
||||
const selected = this.names.filter(item => item.name === name);
|
||||
const selected = this.names.filter((item) => item.name === name);
|
||||
this.onClose();
|
||||
this.$emit('change', selected);
|
||||
this.$emit("change", selected);
|
||||
return;
|
||||
}
|
||||
const selected = this.names.filter(item => this.selectedName.includes(item.id));
|
||||
const selected = this.names.filter((item) => this.selectedName.includes(item.id));
|
||||
this.onClose();
|
||||
this.$emit('change', selected);
|
||||
}
|
||||
}
|
||||
this.$emit("change", selected);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.add-merit-name {
|
||||
padding: .4rem;
|
||||
padding: 0.4rem;
|
||||
|
||||
.title {
|
||||
font-size: .4rem;
|
||||
margin-bottom: .4rem;
|
||||
font-size: 0.4rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.add-name {
|
||||
@@ -107,50 +106,50 @@ export default {
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
height: .8rem;
|
||||
line-height: .8rem;
|
||||
padding-left: .3rem;
|
||||
font-size: .35rem;
|
||||
height: 0.8rem;
|
||||
line-height: 0.8rem;
|
||||
padding-left: 0.3rem;
|
||||
font-size: 0.35rem;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: .11rem;
|
||||
font-size: .4rem;
|
||||
border-radius: 0.11rem;
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: .2rem .6rem;
|
||||
background: $primary-color;
|
||||
padding: 0.2rem 0.6rem;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
font-size: .4rem;
|
||||
border-radius: .11rem;
|
||||
margin-left: .3rem;
|
||||
border: 1px solid #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
border-radius: 0.11rem;
|
||||
margin-left: 0.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.name-group {
|
||||
padding: .5rem 0;
|
||||
padding: 0.5rem 0;
|
||||
height: 30vh;
|
||||
span {
|
||||
display: inline-block;
|
||||
padding: .3rem .6rem;
|
||||
padding: 0.3rem 0.6rem;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: .08rem;
|
||||
border-radius: 0.08rem;
|
||||
position: relative;
|
||||
margin-right: .2rem;
|
||||
margin-bottom: .2rem;
|
||||
font-size: .4rem;
|
||||
margin-right: 0.2rem;
|
||||
margin-bottom: 0.2rem;
|
||||
font-size: 0.4rem;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
right: -.25rem;
|
||||
top: -.25rem;
|
||||
font-size: .7rem;
|
||||
right: -0.25rem;
|
||||
top: -0.25rem;
|
||||
font-size: 0.7rem;
|
||||
color: red;
|
||||
}
|
||||
input[type=checkbox]{
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -159,24 +158,23 @@ export default {
|
||||
opacity: 0;
|
||||
}
|
||||
&.selected {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.desire-input {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: .13rem;
|
||||
border-radius: 0.13rem;
|
||||
overflow: hidden;
|
||||
|
||||
.desire-textarea {
|
||||
border: none;
|
||||
display: block;
|
||||
font-size: .35rem;
|
||||
width: calc(100% - .5rem);
|
||||
padding: .25rem;
|
||||
font-size: 0.35rem;
|
||||
width: calc(100% - 0.5rem);
|
||||
padding: 0.25rem;
|
||||
height: 2rem;
|
||||
resize: none;
|
||||
}
|
||||
@@ -184,8 +182,8 @@ export default {
|
||||
span {
|
||||
display: block;
|
||||
text-align: right;
|
||||
padding: .2rem;
|
||||
font-size: .35rem;
|
||||
padding: 0.2rem;
|
||||
font-size: 0.35rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,34 +194,33 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: .4rem;
|
||||
margin-bottom: .3rem;
|
||||
font-size: 0.4rem;
|
||||
margin-bottom: 0.3rem;
|
||||
|
||||
.update {
|
||||
font-size: .35rem;
|
||||
color: $primary-color;
|
||||
font-size: 0.35rem;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
|
||||
.name-group {
|
||||
padding: .1rem 0;
|
||||
padding: 0.1rem 0;
|
||||
|
||||
.name {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.confirm {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
width: 100%;
|
||||
padding: .3rem 0;
|
||||
padding: 0.3rem 0;
|
||||
border-radius: 1rem;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<van-popup v-model="value" position="bottom" @close="$emit('update:value', false)">
|
||||
<div class="red-packet" v-if="user">
|
||||
<img class="avatar" :src="anonymous ? avatar : user.avatar" alt="">
|
||||
<img class="avatar" :src="anonymous ? avatar : user.avatar" alt="" />
|
||||
<div class="username-container">
|
||||
<div class="username" v-if="!edit" @click="onEdit">
|
||||
<span>{{ user.nickname }}</span>
|
||||
<i class="iconfont icon-bianjisekuai"></i>
|
||||
</div>
|
||||
<input class="input-username" ref="input" v-if="edit" v-model="user.nickname" @blur="edit = false">
|
||||
<input class="input-username" ref="input" v-if="edit" v-model="user.nickname" @blur="edit = false" />
|
||||
</div>
|
||||
<vue-number-scroll v-model="number"></vue-number-scroll>
|
||||
<div class="money-input">
|
||||
<input type="tel" v-model="money" v-number-only @change="onMoneyInput">
|
||||
<input type="tel" v-model="money" v-number-only @change="onMoneyInput" />
|
||||
<span>元</span>
|
||||
</div>
|
||||
<!-- <div class="bar">
|
||||
<span>
|
||||
<van-checkbox v-model="anonymous" checked-color="#CF9E3B" @change="onAnonymous">匿名参与</van-checkbox>
|
||||
<van-checkbox v-model="anonymous" checked-color="#CF9E3B;" @change="onAnonymous">匿名参与</van-checkbox>
|
||||
</span>
|
||||
<span>查看服务协议</span>
|
||||
</div> -->
|
||||
@@ -29,54 +29,53 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRandMoney, getUserData } from '@/api';
|
||||
import VueNumberScroll from '../vue-number-scroll'
|
||||
import { getRandMoney, getUserData } from "@/api";
|
||||
import VueNumberScroll from "../vue-number-scroll";
|
||||
|
||||
export default {
|
||||
name: 'random-money',
|
||||
name: "random-money",
|
||||
components: {
|
||||
VueNumberScroll
|
||||
VueNumberScroll,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
avatar: require('@/assets/img/xiaoheshang.jpg'),
|
||||
avatar: require("@/assets/img/xiaoheshang.jpg"),
|
||||
edit: false,
|
||||
anonymous: false,
|
||||
numberArr: ['3', '.', '9','9'],
|
||||
numberArr: ["3", ".", "9", "9"],
|
||||
number: 0,
|
||||
money: 0,
|
||||
user: null,
|
||||
privateUser: null,
|
||||
inputNickname: '',
|
||||
inputNickname: "",
|
||||
randList: [],
|
||||
}
|
||||
};
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
mounted() {
|
||||
this.getRandMoney()
|
||||
this.getRandMoney();
|
||||
this.getUserData();
|
||||
},
|
||||
methods: {
|
||||
onAnonymous(checked) {
|
||||
this.anonymous = checked;
|
||||
if (checked) {
|
||||
this.user.nickname = '匿名用户'
|
||||
this.user.nickname = "匿名用户";
|
||||
} else {
|
||||
this.user.nickname = this.privateUser.nickname
|
||||
this.user.nickname = this.privateUser.nickname;
|
||||
}
|
||||
},
|
||||
onEdit() {
|
||||
this.edit = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.input.focus();
|
||||
})
|
||||
});
|
||||
},
|
||||
async getUserData() {
|
||||
const res = await getUserData();
|
||||
@@ -85,34 +84,34 @@ export default {
|
||||
this.inputNickname = res.nickname;
|
||||
},
|
||||
onMoneyInput(e) {
|
||||
this.number = e.target.value
|
||||
this.number = e.target.value;
|
||||
},
|
||||
changeMoney() {
|
||||
const rand = Math.floor(Math.random() * this.randList.length);
|
||||
this.number = Number(this.randList[rand])
|
||||
this.number = Number(this.randList[rand]);
|
||||
this.money = this.number;
|
||||
},
|
||||
async getRandMoney() {
|
||||
const res = await getRandMoney();
|
||||
this.randList = res;
|
||||
this.money = Number(res[0])
|
||||
this.number = Number(res[0])
|
||||
this.money = Number(res[0]);
|
||||
this.number = Number(res[0]);
|
||||
},
|
||||
onNext() {
|
||||
this.$emit('change', {
|
||||
this.$emit("change", {
|
||||
anonymous: this.anonymous,
|
||||
money: this.number
|
||||
})
|
||||
this.$emit('update:value', false)
|
||||
}
|
||||
}
|
||||
money: this.number,
|
||||
});
|
||||
this.$emit("update:value", false);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.red-packet {
|
||||
min-height: 60vh;
|
||||
background: #e85042 url('~@/assets/img/red-packet.jpg') top center no-repeat;
|
||||
background: #e85042 url("~@/assets/img/red-packet.jpg") top center no-repeat;
|
||||
background-size: contain;
|
||||
overflow: hidden;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
@@ -123,30 +122,30 @@ export default {
|
||||
display: block;
|
||||
border-radius: 1.5rem;
|
||||
border: 2px solid yellow;
|
||||
margin: 2rem auto .1rem;
|
||||
margin: 2rem auto 0.1rem;
|
||||
}
|
||||
.username-container {
|
||||
padding-top: .3rem;
|
||||
padding-top: 0.3rem;
|
||||
height: 1rem;
|
||||
.username {
|
||||
color: white;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
text-align: center;
|
||||
margin-top: .3rem;
|
||||
margin-top: 0.3rem;
|
||||
span {
|
||||
padding-right: .1rem;
|
||||
padding-right: 0.1rem;
|
||||
}
|
||||
}
|
||||
.input-username {
|
||||
border: 1px solid yellow;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
background: transparent;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
display: block;
|
||||
height: 1rem;
|
||||
color: white;
|
||||
padding: .1rem .3rem;
|
||||
padding: 0.1rem 0.3rem;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
@@ -158,8 +157,8 @@ export default {
|
||||
line-height: 1rem;
|
||||
font-size: 1rem;
|
||||
overflow: hidden;
|
||||
margin-top: .6rem;
|
||||
margin-bottom: .8rem;
|
||||
margin-top: 0.6rem;
|
||||
margin-bottom: 0.8rem;
|
||||
ul {
|
||||
li {
|
||||
display: inline-block;
|
||||
@@ -169,10 +168,10 @@ export default {
|
||||
.bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
color: white;
|
||||
padding: .3rem .6rem;
|
||||
margin-top: .6rem;
|
||||
padding: 0.3rem 0.6rem;
|
||||
margin-top: 0.6rem;
|
||||
}
|
||||
.money-input {
|
||||
border: 1px solid yellow;
|
||||
@@ -189,13 +188,13 @@ export default {
|
||||
border: 1px solid transparent;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
padding-left: .5rem;
|
||||
font-size: .5rem;
|
||||
padding-left: 0.5rem;
|
||||
font-size: 0.5rem;
|
||||
width: 50%;
|
||||
}
|
||||
span {
|
||||
padding: 0 .2rem;
|
||||
font-size: .5rem;
|
||||
padding: 0 0.2rem;
|
||||
font-size: 0.5rem;
|
||||
}
|
||||
}
|
||||
.van-checkbox__label {
|
||||
@@ -203,14 +202,14 @@ export default {
|
||||
}
|
||||
.random-button-group {
|
||||
text-align: center;
|
||||
font-size: .5rem;
|
||||
margin-top: .7rem;
|
||||
font-size: 0.5rem;
|
||||
margin-top: 0.7rem;
|
||||
display: flex;
|
||||
padding: 0 .4rem;
|
||||
margin-bottom: .5rem;
|
||||
padding: 0 0.4rem;
|
||||
margin-bottom: 0.5rem;
|
||||
button {
|
||||
background: transparent;
|
||||
margin: 0 .2rem;
|
||||
margin: 0 0.2rem;
|
||||
height: 1.3rem;
|
||||
border: 1px solid transparent;
|
||||
color: white;
|
||||
@@ -225,7 +224,7 @@ export default {
|
||||
background: yellow;
|
||||
color: rgb(224, 61, 61);
|
||||
border-radius: 4px;
|
||||
flex: 2
|
||||
flex: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
font-family: inherit;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
border-bottom: 2px solid $primary-color;
|
||||
border-bottom: 2px solid #cf9e3b;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
font-size: 1rem;
|
||||
@@ -48,13 +48,13 @@ export default {
|
||||
pasteResult: [],
|
||||
};
|
||||
},
|
||||
props: ['code'],
|
||||
props: ["code"],
|
||||
computed: {
|
||||
input() {
|
||||
if (this.code && Array.isArray(this.code) && this.code.length === this.codeCount) {
|
||||
return this.code;
|
||||
} else if (/^\d{this.codeCount}$/.test(this.code.toString())) {
|
||||
return this.code.toString().split('');
|
||||
return this.code.toString().split("");
|
||||
} else if (this.pasteResult.length === this.codeCount) {
|
||||
return this.pasteResult;
|
||||
} else {
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 解决一个输入框输入多个字符
|
||||
@@ -76,48 +76,48 @@ export default {
|
||||
var index = e.target.dataset.index * 1;
|
||||
var el = e.target;
|
||||
// el.value = el.value.replace(/Digit|Numpad/i, '').replace(/1/g, '').slice(0, 1);
|
||||
this.$set(this.input, index, el.value)
|
||||
this.$set(this.input, index, el.value);
|
||||
},
|
||||
keydown(e) {
|
||||
var index = e.target.dataset.index * 1;
|
||||
var el = e.target;
|
||||
if (e.key === 'Backspace') {
|
||||
if (e.key === "Backspace") {
|
||||
if (this.input[index].length > 0) {
|
||||
this.$set(this.input, index, '')
|
||||
this.$set(this.input, index, "");
|
||||
} else {
|
||||
if (el.previousElementSibling) {
|
||||
el.previousElementSibling.focus()
|
||||
this.$set(this.input, index - 1, '')
|
||||
el.previousElementSibling.focus();
|
||||
this.$set(this.input, index - 1, "");
|
||||
}
|
||||
}
|
||||
} else if (e.key === 'Delete') {
|
||||
} else if (e.key === "Delete") {
|
||||
if (this.input[index].length > 0) {
|
||||
this.$set(this.input, index, '')
|
||||
this.$set(this.input, index, "");
|
||||
} else {
|
||||
if (el.nextElementSibling) {
|
||||
this.$set(this.input, index = 1, '')
|
||||
this.$set(this.input, (index = 1), "");
|
||||
}
|
||||
}
|
||||
if (el.nextElementSibling) {
|
||||
el.nextElementSibling.focus()
|
||||
el.nextElementSibling.focus();
|
||||
}
|
||||
} else if (e.key === 'Home') {
|
||||
el.parentElement.children[0] && el.parentElement.children[0].focus()
|
||||
} else if (e.key === 'End') {
|
||||
el.parentElement.children[this.input.length - 1] && el.parentElement.children[this.input.length - 1].focus()
|
||||
} else if (e.key === 'ArrowLeft') {
|
||||
} else if (e.key === "Home") {
|
||||
el.parentElement.children[0] && el.parentElement.children[0].focus();
|
||||
} else if (e.key === "End") {
|
||||
el.parentElement.children[this.input.length - 1] && el.parentElement.children[this.input.length - 1].focus();
|
||||
} else if (e.key === "ArrowLeft") {
|
||||
if (el.previousElementSibling) {
|
||||
el.previousElementSibling.focus()
|
||||
el.previousElementSibling.focus();
|
||||
}
|
||||
} else if (e.key === 'ArrowRight') {
|
||||
} else if (e.key === "ArrowRight") {
|
||||
if (el.nextElementSibling) {
|
||||
el.nextElementSibling.focus()
|
||||
el.nextElementSibling.focus();
|
||||
}
|
||||
} else if (e.key === 'ArrowUp') {
|
||||
} else if (e.key === "ArrowUp") {
|
||||
if (this.input[index] * 1 < 9) {
|
||||
this.$set(this.input, index, (this.input[index] * 1 + 1).toString());
|
||||
}
|
||||
} else if (e.key === 'ArrowDown') {
|
||||
} else if (e.key === "ArrowDown") {
|
||||
if (this.input[index] * 1 > 0) {
|
||||
this.$set(this.input, index, (this.input[index] * 1 - 1).toString());
|
||||
}
|
||||
@@ -129,20 +129,20 @@ export default {
|
||||
// 解决输入e的问题
|
||||
var reg = /Digit|Numpad/i;
|
||||
this.eventObj = JSON.stringify(e);
|
||||
el.value = el.value.replace(reg, '').slice(0, 1);
|
||||
el.value = el.value.replace(reg, "").slice(0, 1);
|
||||
if (reg.test(e) || this.is_weixn) {
|
||||
// 必须在这里符直,否则输入框会是空值
|
||||
this.$set(this.input, index, el.value);
|
||||
el.nextElementSibling && el.nextElementSibling.focus();
|
||||
if (index === this.codeCount - 1) {
|
||||
if (this.input.join('').length === this.codeCount) {
|
||||
if (this.input.join("").length === this.codeCount) {
|
||||
document.activeElement.blur();
|
||||
this.$emit('complete', this.input);
|
||||
this.$emit("complete", this.input);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.input[index] === '') {
|
||||
this.$set(this.input, index, '');
|
||||
if (this.input[index] === "") {
|
||||
this.$set(this.input, index, "");
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -156,33 +156,33 @@ export default {
|
||||
if (this.input[index] * 1 > 0) {
|
||||
this.$set(this.input, index, (this.input[index] * 1 - 1).toString());
|
||||
}
|
||||
} else if (e.key === 'Enter') {
|
||||
if (this.input.join('').length === this.codeCount) {
|
||||
} else if (e.key === "Enter") {
|
||||
if (this.input.join("").length === this.codeCount) {
|
||||
document.activeElement.blur();
|
||||
this.$emit('complete', this.input);
|
||||
this.$emit("complete", this.input);
|
||||
}
|
||||
}
|
||||
},
|
||||
paste(e) {
|
||||
// 当进行粘贴时
|
||||
e.clipboardData.items[0].getAsString(str => {
|
||||
e.clipboardData.items[0].getAsString((str) => {
|
||||
if (str.toString().length === this.codeCount) {
|
||||
this.pasteResult = str.split('');
|
||||
this.pasteResult = str.split("");
|
||||
document.activeElement.blur();
|
||||
this.$emit('complete', this.input);
|
||||
this.$emit("complete", this.input);
|
||||
this.pasteResult = [];
|
||||
} else {
|
||||
// 如果粘贴内容不合规,清除所有内容
|
||||
this.input[0] = new Array(6)
|
||||
}
|
||||
})
|
||||
this.input[0] = new Array(6);
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// 等待dom渲染完成,在执行focus,否则无法获取到焦点
|
||||
this.$nextTick(() => {
|
||||
this.$refs.firstinput.focus()
|
||||
})
|
||||
this.$refs.firstinput.focus();
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
<template>
|
||||
<div class="user-merit border-bottom" v-if="data">
|
||||
<img
|
||||
:src="data.avatar || data.user_info.avatar"
|
||||
alt=""
|
||||
/>
|
||||
<img :src="avatar" alt="" />
|
||||
<div class="profile">
|
||||
<div>
|
||||
<div class="name">
|
||||
<span>{{ data.merit_name || data.nickname || data.user_info.nickname }}</span>
|
||||
<!-- <span>{{data.user_info.region}}</span>-->
|
||||
</div>
|
||||
<p class="goods_name">{{ data.goods_name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result">
|
||||
<p class="money">{{data.order_amount || data.sum_money}}元</p>
|
||||
<span class="date">{{data.paid_at}}</span>
|
||||
<p class="money">已参与</p>
|
||||
<span class="date">{{ format(data.paid_at) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,14 +19,24 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "user-merit",
|
||||
props: ['data']
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
avatar: "/touxiang.png",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
format(time) {
|
||||
return time ? time.slice(0, 10) : "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user-merit {
|
||||
display: flex;
|
||||
padding: .27rem 0.4rem;
|
||||
padding: 0.27rem 0.4rem;
|
||||
img {
|
||||
width: 1.17rem;
|
||||
height: 1.17rem;
|
||||
@@ -39,31 +45,21 @@ export default {
|
||||
}
|
||||
.profile {
|
||||
flex: 1;
|
||||
padding-top: .13rem;
|
||||
padding-top: 0.13rem;
|
||||
.name {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
margin-bottom: .27rem;
|
||||
span:first-child {
|
||||
margin-bottom: 0.2rem;
|
||||
font-size: 0.4rem;
|
||||
color: #222;
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
margin-right: .4rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
span:last-child {
|
||||
font-size: 0.32rem;
|
||||
color: #666;
|
||||
vertical-align: text-bottom;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
p.goods_name {
|
||||
font-size: 0.32rem;
|
||||
max-width: 4rem;
|
||||
white-space: nowrap;
|
||||
font-size: 0.34rem;
|
||||
max-width: 15em;
|
||||
line-height: 1.2;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
@@ -72,15 +68,15 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
padding: .13rem 0;
|
||||
padding: 0.13rem 0;
|
||||
text-align: right;
|
||||
.money {
|
||||
font-size: 0.37rem;
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
font-weight: bold;
|
||||
}
|
||||
.date {
|
||||
font-size: 0.3rem;
|
||||
font-size: 0.34rem;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>订单详情</div>
|
||||
</template>
|
||||
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<div class="order-page">
|
||||
<van-search v-model="keyword" placeholder="请输入手机号" />
|
||||
<mescroll-vue ref="mescroll" :down="mescrollDown" :up="mescrollUp" @init="mescrollInit">
|
||||
<div class="scroll-wrapper">
|
||||
<!--内容...-->
|
||||
<div class="list" v-for="(item, index) in dataList" :key="index">
|
||||
<div class="order-item">
|
||||
<div class="temple">
|
||||
<span class="sn">{{ item.order_sn }}</span>
|
||||
<span class="name">{{ item.temple_name }}</span>
|
||||
</div>
|
||||
<div class="goods">
|
||||
<h3 class="name">
|
||||
<span class="state" v-if="item.status == 2">待处理</span>
|
||||
<span>{{ item.goods_name }}</span>
|
||||
</h3>
|
||||
<div class="sku">
|
||||
<span>数量: x{{ item.buy_total }}</span>
|
||||
<span>金额: ¥{{ item.price }}</span>
|
||||
<span>行善时间: {{ item.paid_at }}</span>
|
||||
<span>行善者: {{ item.user_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<van-button type="info" block round v-if="item.status == 2" @click="onProcess(item)"> 立即处理</van-button>
|
||||
<!-- <van-button type="info" plain block round>查看详情</van-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mescroll-vue>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollVue from "mescroll.js/mescroll.vue";
|
||||
import { getOrderList } from "@/api/admin";
|
||||
export default {
|
||||
comments: {
|
||||
MescrollVue,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pagination: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
},
|
||||
keyword: "",
|
||||
mescroll: null,
|
||||
mescrollDown: {},
|
||||
mescrollUp: {
|
||||
// 上拉加载的配置.
|
||||
callback: this.upCallback,
|
||||
},
|
||||
dataList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
mescrollInit(mescroll) {
|
||||
this.mescroll = mescroll;
|
||||
},
|
||||
upCallback(page) {
|
||||
console.log("load", page);
|
||||
this.pagination.page = page.num;
|
||||
this.getOrderList();
|
||||
},
|
||||
async getOrderList() {
|
||||
const res = await getOrderList({
|
||||
keyword: this.keyword,
|
||||
...this.pagination,
|
||||
});
|
||||
this.dataList = this.dataList.concat(res.results);
|
||||
this.total = res.total;
|
||||
console.log("mescroll", this.mescroll);
|
||||
this.mescroll.endSuccess();
|
||||
console.log(res);
|
||||
},
|
||||
onProcess(item) {
|
||||
this.$router.push({
|
||||
name: "adminOrderProcess",
|
||||
query: {
|
||||
id: item.id,
|
||||
name: item.goods_name,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.order-page {
|
||||
background-color: #f5f1fd;
|
||||
height: 100vh;
|
||||
|
||||
.scroll-wrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
.list {
|
||||
padding: 0.1rem 0.2rem;
|
||||
}
|
||||
.order-item {
|
||||
background: white;
|
||||
padding: 0.2rem;
|
||||
border-radius: 0.2rem;
|
||||
box-shadow: 0 0 6ox rgba(0, 0, 0, 0.1);
|
||||
.temple {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0.2rem 0;
|
||||
.sn,
|
||||
.name {
|
||||
font-size: 0.3rem;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
.goods {
|
||||
padding-top: 0.2rem;
|
||||
.name {
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.4rem;
|
||||
line-height: 1.6;
|
||||
.state {
|
||||
font-size: 0.25rem;
|
||||
color: #fff;
|
||||
background-color: #188fff;
|
||||
padding: 0.1rem 0.2rem;
|
||||
border-radius: 0.13rem;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
}
|
||||
.sku {
|
||||
display: grid;
|
||||
gap: 0.3rem;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
font-size: 0.3rem;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
.action-buttons {
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
column-gap: 12px;
|
||||
.van {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field name="name" label="善缘名称">
|
||||
<template #input>
|
||||
<span>{{ $route.query.name }}</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="feedback_pictures" label="反馈照片">
|
||||
<template #input>
|
||||
<van-uploader preview-size="76px" accept="image/*" multiple v-model="form.feedback_pictures" :max-count="5" :after-read="afterRead" />
|
||||
</template>
|
||||
<span style="font-size: 0.2rem; color: #999">最多5张</span>
|
||||
</van-field>
|
||||
<van-field name="feedback_content" label="反馈内容" v-model="form.feedback_content"> </van-field>
|
||||
<div style="margin: 16px">
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uploadImage, postFeedback } from "@/api/admin";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
feedback_pictures: [],
|
||||
feedback_content: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
afterRead(file) {
|
||||
console.log("file", file);
|
||||
const files = Array.isArray(file) ? file : [file];
|
||||
for (const item of files) {
|
||||
item.status = "uploading";
|
||||
item.message = "上传中...";
|
||||
const formData = new FormData();
|
||||
formData.append("photo", item.file);
|
||||
uploadImage(formData)
|
||||
.then((res) => {
|
||||
console.log("res", res);
|
||||
item.status = "success";
|
||||
item.message = "上传成功";
|
||||
item.url = res.url;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("err", err);
|
||||
item.status = "error";
|
||||
item.message = "上传失败";
|
||||
});
|
||||
}
|
||||
},
|
||||
onSubmit(values) {
|
||||
if (values.feedback_pictures.some((item) => item.status == "uploading")) {
|
||||
this.$toast("还有照片正在上传,请稍后");
|
||||
return;
|
||||
}
|
||||
postFeedback(this.$route.query.id, {
|
||||
feedback_content: values.feedback_content,
|
||||
feedback_pictures: values.feedback_pictures.map((item) => item.url),
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("res", res);
|
||||
this.$toast("反馈成功");
|
||||
this.$router.replace({
|
||||
name: "adminOrder",
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("err", err);
|
||||
this.$toast("反馈失败");
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -31,17 +31,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDynamicDetail, toggleCollect } from '@/api';
|
||||
import { getDynamicDetail, toggleCollect } from "@/api";
|
||||
|
||||
export default {
|
||||
name: 'buddha-detail',
|
||||
name: "buddha-detail",
|
||||
data() {
|
||||
return {
|
||||
data: null,
|
||||
showShare: false,
|
||||
options: [
|
||||
{ name: '微信', icon: 'wechat' },
|
||||
{ name: '朋友圈', icon: 'wechat-moments' },
|
||||
{ name: "微信", icon: "wechat" },
|
||||
{ name: "朋友圈", icon: "wechat-moments" },
|
||||
],
|
||||
};
|
||||
},
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
covers: {
|
||||
get() {
|
||||
const type = Object.prototype.toString.call(this.data.covers);
|
||||
return type === '[object Object]' ? []: this.data.covers.slice(0, 3);
|
||||
return type === "[object Object]" ? [] : this.data.covers.slice(0, 3);
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -67,8 +67,8 @@ export default {
|
||||
|
||||
this.wechatReady({
|
||||
...data.shareConfig,
|
||||
link: location.href + '&jumpUrl=https://baidu.com',
|
||||
})
|
||||
link: location.href + "&jumpUrl=https://baidu.com",
|
||||
});
|
||||
},
|
||||
|
||||
async onCollect() {
|
||||
@@ -77,8 +77,8 @@ export default {
|
||||
},
|
||||
onGoodsDetail() {
|
||||
const { goods_type, goods_id, temple_id } = this.data;
|
||||
this.onPushToGoodsDetail(goods_type, goods_id, temple_id)
|
||||
}
|
||||
this.onPushToGoodsDetail(goods_type, goods_id, temple_id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -87,10 +87,10 @@ export default {
|
||||
.process-detail-wrapper {
|
||||
display: flex;
|
||||
position: relative;
|
||||
padding: .5rem .4rem env(safe-area-inset-bottom) .4rem;
|
||||
padding: 0.5rem 0.4rem env(safe-area-inset-bottom) 0.4rem;
|
||||
margin-bottom: 1rem;
|
||||
&::after {
|
||||
content: '';
|
||||
content: "";
|
||||
height: 1px;
|
||||
width: 200%;
|
||||
background: #ededed;
|
||||
@@ -111,8 +111,8 @@ export default {
|
||||
font-size: 0.35rem;
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-bottom: .3rem;
|
||||
padding: .1rem 0;
|
||||
margin-bottom: 0.3rem;
|
||||
padding: 0.1rem 0;
|
||||
}
|
||||
.title {
|
||||
font-size: 0.43rem;
|
||||
@@ -127,8 +127,8 @@ export default {
|
||||
text-align: justify;
|
||||
}
|
||||
.detail-text {
|
||||
font-size: .4rem;
|
||||
padding-top: .2rem;
|
||||
font-size: 0.4rem;
|
||||
padding-top: 0.2rem;
|
||||
color: #b74100;
|
||||
}
|
||||
.image-group {
|
||||
@@ -145,15 +145,15 @@ export default {
|
||||
}
|
||||
}
|
||||
.process-content {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
p {
|
||||
margin: .3rem 0;
|
||||
margin: 0.3rem 0;
|
||||
line-height: 1.4;
|
||||
color: #5a5a5a;
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
& * {
|
||||
@@ -190,7 +190,7 @@ export default {
|
||||
align-items: center;
|
||||
|
||||
.iconfont {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
vertical-align: middle;
|
||||
font-size: 0.4rem;
|
||||
margin-top: -3px;
|
||||
@@ -205,7 +205,7 @@ export default {
|
||||
}
|
||||
.collect {
|
||||
.iconfont {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
.un-collect {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<p class="label">自动行善</p>
|
||||
<div class="donate">
|
||||
<span>每天早上六点寺院联盟帮你自动行善一次</span>
|
||||
<van-checkbox v-model="is_auto" shape="square" checked-color="#cf9e3b"></van-checkbox>
|
||||
<van-checkbox v-model="is_auto" shape="square" checked-color="#CF9E3B;"></van-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auto-donate-time" v-if="is_auto">
|
||||
@@ -116,7 +116,7 @@
|
||||
<p class="label">每日填砖</p>
|
||||
<div class="donate">
|
||||
<span>每天早上六点寺院联盟帮你自动填砖一次</span>
|
||||
<van-checkbox v-model="is_auto" shape="square" checked-color="#cf9e3b"></van-checkbox>
|
||||
<van-checkbox v-model="is_auto" shape="square" checked-color="#CF9E3B;"></van-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auto-donate-time" v-if="is_auto">
|
||||
@@ -457,7 +457,7 @@ export default {
|
||||
user-select: none;
|
||||
color: #666;
|
||||
&:active {
|
||||
background: rgba($primary-color, 0.1);
|
||||
background: rgba(#cf9e3b, 0.1);
|
||||
}
|
||||
}
|
||||
span.spec-disabled {
|
||||
@@ -480,7 +480,7 @@ export default {
|
||||
align-items: center;
|
||||
}
|
||||
span.active {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
.auto-donate {
|
||||
@@ -537,7 +537,7 @@ export default {
|
||||
.total {
|
||||
font-size: 0.4rem;
|
||||
em {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -545,8 +545,8 @@ export default {
|
||||
.next {
|
||||
font-size: 0.4rem;
|
||||
padding: 0.3rem 1rem;
|
||||
background: $primary-color;
|
||||
border: 1px solid $primary-color;
|
||||
background: #cf9e3b;
|
||||
border: 1px solid #cf9e3b;
|
||||
color: white;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
@@ -637,13 +637,13 @@ export default {
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) + 0.2rem);
|
||||
.merit-button {
|
||||
display: inline-block;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
height: 1.2rem;
|
||||
font-size: 0.37rem;
|
||||
width: 60%;
|
||||
padding: 0 0.53rem;
|
||||
border: 0.01rem solid $primary-color;
|
||||
border: 0.01rem solid #cf9e3b;
|
||||
border-radius: 1.33rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="field">
|
||||
<label class="required">功德芳名</label>
|
||||
<div class="input-wrapper">
|
||||
<input class="input" :value="meritName" type="text" readonly placeholder="请输入功德芳名" @click="onShowDialog('name')">
|
||||
<input class="input" :value="meritName" type="text" readonly placeholder="请输入功德芳名" @click="onShowDialog('name')" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
@@ -19,27 +19,29 @@
|
||||
<div class="field">
|
||||
<label class="required">阳上人</label>
|
||||
<div class="input-wrapper">
|
||||
<input class="input" v-model="live_name" type="tel" placeholder="请填写阳上人">
|
||||
<input class="input" v-model="live_name" type="tel" placeholder="请填写阳上人" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="required">往生者</label>
|
||||
<div class="input-wrapper">
|
||||
<input class="input" v-model="die_name" type="tel" placeholder="请填写往生者">
|
||||
<input class="input" v-model="die_name" type="tel" placeholder="请填写往生者" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="field">
|
||||
<label>手机号码</label>
|
||||
<div class="input-wrapper">
|
||||
<input class="input" v-model="mobile" type="tel" placeholder="请填写手机号码">
|
||||
<input class="input" v-model="mobile" type="tel" placeholder="请填写手机号码" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-wrapper">
|
||||
<span class="total">合计: <b class="price">¥{{query.amount}}</b></span>
|
||||
<span class="total"
|
||||
>合计: <b class="price">¥{{ query.amount }}</b></span
|
||||
>
|
||||
<button type="button" @click="onNext">下一步</button>
|
||||
</div>
|
||||
|
||||
@@ -51,35 +53,34 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'fill-name',
|
||||
name: "fill-name",
|
||||
data() {
|
||||
return {
|
||||
query: this.$route.query,
|
||||
mobile: '',
|
||||
dream: '',
|
||||
merit_name_id: '',
|
||||
dialogName: '',
|
||||
mobile: "",
|
||||
dream: "",
|
||||
merit_name_id: "",
|
||||
dialogName: "",
|
||||
showMeritName: false,
|
||||
showDesire: false,
|
||||
merit_names: [],
|
||||
meritTypes: [],
|
||||
meritTypeId: null,
|
||||
showBuddhi: true,
|
||||
live_name: '', // 阳上人姓名
|
||||
die_name: '', // 往生人姓名
|
||||
}
|
||||
live_name: "", // 阳上人姓名
|
||||
die_name: "", // 往生人姓名
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
meritName() {
|
||||
return this.merit_names.map(item => item.name).join(',')
|
||||
return this.merit_names.map((item) => item.name).join(",");
|
||||
},
|
||||
meritId() {
|
||||
return this.merit_names.map(item => item.id).join(',')
|
||||
return this.merit_names.map((item) => item.id).join(",");
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
onShowDialog() {
|
||||
this.showMeritName = true;
|
||||
},
|
||||
@@ -94,33 +95,33 @@ export default {
|
||||
},
|
||||
onNext() {
|
||||
if (!this.meritId) {
|
||||
return this.$toast.fail('请填写功德芳名');
|
||||
return this.$toast.fail("请填写功德芳名");
|
||||
}
|
||||
if (this.query.is_die == 1 && (!this.live_name || !this.die_name)) {
|
||||
return this.$toast.fail('请填写阳上人与往生人')
|
||||
return this.$toast.fail("请填写阳上人与往生人");
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
name: 'pay',
|
||||
name: "pay",
|
||||
query: {
|
||||
...this.$route.query,
|
||||
dream: this.dream,
|
||||
merit_name: this.meritName,
|
||||
mobile: this.mobile,
|
||||
live_name: this.live_name,
|
||||
die_name: this.die_name
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
die_name: this.die_name,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.fill-name {
|
||||
.field {
|
||||
.van-radio__icon--checked .van-icon {
|
||||
background: #CF9E3B;
|
||||
border-color: #CF9E3B;
|
||||
background: #cf9e3b;
|
||||
border-color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,22 +132,22 @@ export default {
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
.panel-wrapper {
|
||||
padding: .3rem;
|
||||
padding: 0.3rem;
|
||||
}
|
||||
.panel {
|
||||
padding: .3rem;
|
||||
border-radius: .1rem;
|
||||
font-size: .4rem;
|
||||
padding: 0.3rem;
|
||||
border-radius: 0.1rem;
|
||||
font-size: 0.4rem;
|
||||
background: white;
|
||||
box-shadow: 0 0 .2rem rgba(0,0,0,0.05);
|
||||
box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.field {
|
||||
margin-bottom: .6rem;
|
||||
margin-bottom: 0.6rem;
|
||||
.required {
|
||||
&::after {
|
||||
content: '*';
|
||||
content: "*";
|
||||
color: red;
|
||||
margin-left: .1rem;
|
||||
margin-left: 0.1rem;
|
||||
}
|
||||
}
|
||||
label {
|
||||
@@ -154,10 +155,10 @@ export default {
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
margin-top: .2rem;
|
||||
margin-top: 0.2rem;
|
||||
border: 1px solid rgba(183, 173, 173, 0.54);
|
||||
padding: .2rem .3rem;
|
||||
border-radius: .1rem;
|
||||
padding: 0.2rem 0.3rem;
|
||||
border-radius: 0.1rem;
|
||||
position: relative;
|
||||
background: #fdfdfd;
|
||||
.input {
|
||||
@@ -166,30 +167,30 @@ export default {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
.input[type=textarea]{
|
||||
.input[type="textarea"] {
|
||||
min-height: 2rem;
|
||||
width: calc(100% - .5rem);
|
||||
padding-right: .5rem;
|
||||
width: calc(100% - 0.5rem);
|
||||
padding-right: 0.5rem;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
}
|
||||
.icon-arrow-right {
|
||||
position: absolute;
|
||||
right: .1rem;
|
||||
right: 0.1rem;
|
||||
top: 50%;
|
||||
transform: translateY(-.35rem);
|
||||
transform: translateY(-0.35rem);
|
||||
display: inline-block;
|
||||
font-size: .7rem;
|
||||
font-size: 0.7rem;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-wrapper {
|
||||
position: absolute;
|
||||
left: .3rem;
|
||||
right: .3rem;
|
||||
bottom: calc(.5rem + env(safe-area-inset-bottom));
|
||||
border: 1px solid $primary-color;
|
||||
left: 0.3rem;
|
||||
right: 0.3rem;
|
||||
bottom: calc(0.5rem + env(safe-area-inset-bottom));
|
||||
border: 1px solid #cf9e3b;
|
||||
border-radius: 100px;
|
||||
background: white;
|
||||
display: flex;
|
||||
@@ -197,21 +198,21 @@ export default {
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
.total {
|
||||
font-size: .4rem;
|
||||
color: $primary-color;
|
||||
padding-left: .4rem;
|
||||
font-size: 0.4rem;
|
||||
color: #cf9e3b;
|
||||
padding-left: 0.4rem;
|
||||
.price {
|
||||
font-size: .5rem;
|
||||
font-size: 0.5rem;
|
||||
line-height: 1;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
button {
|
||||
background: linear-gradient(to bottom, $primary-color, #9f7313);
|
||||
background: linear-gradient(to bottom, #cf9e3b, #9f7313);
|
||||
color: white;
|
||||
height: 1.4rem;
|
||||
border: none;
|
||||
font-size: .5rem;
|
||||
font-size: 0.5rem;
|
||||
padding: 0 1rem;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<h1 class="title">在线护持 寺院道场 供养三宝 广种福田</h1>
|
||||
<div class="inner">
|
||||
<div class="field">
|
||||
<input type="tel" v-model="mobile" maxlength="11" placeholder="请输入手机号码">
|
||||
<input type="tel" v-model="mobile" maxlength="11" placeholder="请输入手机号码" />
|
||||
</div>
|
||||
<p class="tip">未注册的手机号验证后自动创建账户</p>
|
||||
|
||||
@@ -25,172 +25,173 @@
|
||||
<h1 class="title">请输入验证码</h1>
|
||||
<p class="send-to">验证码已发送至 {{ mobile | fmMobile }}</p>
|
||||
<sms-code-input :code="validCode" @complete="onSubmitBefore"></sms-code-input>
|
||||
<p class="resend"><span>{{countdown}}</span>秒后重新发送验证码</p>
|
||||
<p class="resend">
|
||||
<span>{{ countdown }}</span
|
||||
>秒后重新发送验证码
|
||||
</p>
|
||||
<van-button type="info" :disabled="!(validCode.length === 4)" block @click="onSubmit">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMobileValidateCode, postMobileCode } from '@/api';
|
||||
import SmsCodeInput from '@/components/sms-code-input'
|
||||
import { getMobileValidateCode, postMobileCode } from "@/api";
|
||||
import SmsCodeInput from "@/components/sms-code-input";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SmsCodeInput
|
||||
SmsCodeInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query: this.$route.query,
|
||||
mobile: '',
|
||||
validCode: '',
|
||||
mobile: "",
|
||||
validCode: "",
|
||||
countdown: 0,
|
||||
timer: null,
|
||||
sended: false,
|
||||
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
fmMobile(val) {
|
||||
return val.replace(/(\d{3})(\d{4})/, "$1 $2 ")
|
||||
}
|
||||
return val.replace(/(\d{3})(\d{4})/, "$1 $2 ");
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
validMobile() {
|
||||
const reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
|
||||
return !reg.test(this.mobile)
|
||||
return !reg.test(this.mobile);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onAgreement(agreeId) {
|
||||
this.$router.push({ name: 'user-temple-station-agreement', query: { agreeId }})
|
||||
this.$router.push({ name: "user-temple-station-agreement", query: { agreeId } });
|
||||
},
|
||||
onSubmitBefore(code) {
|
||||
this.validCode = code
|
||||
this.validCode = code;
|
||||
this.onSubmit();
|
||||
},
|
||||
async onSubmit() {
|
||||
const { mobile, validCode } = this;
|
||||
if (!mobile) {
|
||||
return this.$toast('请输入手机号')
|
||||
return this.$toast("请输入手机号");
|
||||
}
|
||||
if (!validCode) {
|
||||
return this.$toast('请输入验证码')
|
||||
return this.$toast("请输入验证码");
|
||||
}
|
||||
const res = await postMobileCode(mobile, validCode.join(''))
|
||||
const res = await postMobileCode(mobile, validCode.join(""));
|
||||
if (res) {
|
||||
this.$toast.success('登记成功,请继续后续操作')
|
||||
this.$toast.success("登记成功,请继续后续操作");
|
||||
this.$delay(500);
|
||||
this.$bus.$emit('updateMobile')
|
||||
this.$bus.$emit("updateMobile");
|
||||
this.$router.replace({
|
||||
path: this.query.redirectPath,
|
||||
query: this.$utils.queryStringToObj(decodeURIComponent(this.query.redirectPathQuery))
|
||||
})
|
||||
query: this.$utils.queryStringToObj(decodeURIComponent(this.query.redirectPathQuery)),
|
||||
});
|
||||
}
|
||||
},
|
||||
onSendCode() {
|
||||
const { mobile } = this;
|
||||
if (!mobile) {
|
||||
return this.$toast('请输入手机号')
|
||||
return this.$toast("请输入手机号");
|
||||
}
|
||||
|
||||
getMobileValidateCode(mobile).then(success => {
|
||||
getMobileValidateCode(mobile).then((success) => {
|
||||
if (success) {
|
||||
this.$toast('发送成功,请注意查收短信');
|
||||
this.$toast("发送成功,请注意查收短信");
|
||||
this.sended = true;
|
||||
if (this.countdown === 0) {
|
||||
this.countdown = 60;
|
||||
this.countdownSecond()
|
||||
this.countdownSecond();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
countdownSecond() {
|
||||
this.timer = setInterval(() => {
|
||||
this.countdown--;
|
||||
if (this.countdown == 0) {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
}, 1000)
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.top {
|
||||
padding: 0 .5rem;
|
||||
font-size: .35rem;
|
||||
padding-top: .3rem;
|
||||
padding: 0 0.5rem;
|
||||
font-size: 0.35rem;
|
||||
padding-top: 0.3rem;
|
||||
.title {
|
||||
font-size: .5rem;
|
||||
font-size: 0.5rem;
|
||||
margin-top: 1rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
color: #a5161a;
|
||||
font-family: '宋体';
|
||||
font-family: "宋体";
|
||||
}
|
||||
.inner {
|
||||
margin-top: 1rem;
|
||||
.field {
|
||||
background: #f1f1f1;
|
||||
margin-bottom: .2rem;
|
||||
padding: .1rem .4rem;
|
||||
margin-bottom: 0.2rem;
|
||||
padding: 0.1rem 0.4rem;
|
||||
input {
|
||||
height: .8rem;
|
||||
height: 0.8rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
display: block;
|
||||
width: 100%;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
}
|
||||
.tip {
|
||||
font-size: .3rem;
|
||||
font-size: 0.3rem;
|
||||
margin-bottom: 1.2rem;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
text-align: center;
|
||||
padding-top: 2rem;
|
||||
}
|
||||
.agree {
|
||||
font-size: .35rem;
|
||||
font-size: 0.35rem;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 2rem;
|
||||
a {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
.send-to {
|
||||
font-size: .35rem;
|
||||
margin-top: .2rem;
|
||||
font-size: 0.35rem;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.notification {
|
||||
padding-top: .8rem;
|
||||
padding-top: 0.8rem;
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: .34rem;
|
||||
font-size: 0.34rem;
|
||||
color: #a5161a;
|
||||
line-height: 1.4;
|
||||
margin-bottom: .2rem;
|
||||
font-family: '宋体';
|
||||
margin-bottom: 0.2rem;
|
||||
font-family: "宋体";
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
.resend {
|
||||
padding-top: .6rem;
|
||||
padding-top: 0.6rem;
|
||||
margin-bottom: 3rem;
|
||||
span {
|
||||
color: $primary-color;
|
||||
padding-right: .2rem;
|
||||
color: #cf9e3b;
|
||||
padding-right: 0.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,9 +116,9 @@ export default {
|
||||
}
|
||||
.btn {
|
||||
padding: 0.2rem 0.6rem;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
border-radius: 0.11rem;
|
||||
margin-left: 0.3rem;
|
||||
@@ -176,7 +176,7 @@ export default {
|
||||
margin-bottom: 0.3rem;
|
||||
.update {
|
||||
font-size: 0.35rem;
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
.name-group {
|
||||
@@ -186,9 +186,9 @@ export default {
|
||||
}
|
||||
}
|
||||
.confirm {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
width: 3rem;
|
||||
padding: 0.3rem 0;
|
||||
border-radius: 0.07rem;
|
||||
|
||||
@@ -22,12 +22,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: [String, Number]
|
||||
type: [String, Number],
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -38,49 +36,49 @@ export default {
|
||||
return {
|
||||
num: 0,
|
||||
is_customized: false,
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
number: {
|
||||
handler(val) {
|
||||
this.num = val;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChangeNumber(value) {
|
||||
this.$emit('update:number', value)
|
||||
this.$emit("update:number", value);
|
||||
},
|
||||
onSelectSpec(spec) {
|
||||
this.$emit('input', spec.id)
|
||||
this.$emit("input", spec.id);
|
||||
},
|
||||
onAnyAmount() {
|
||||
this.$emit('input', 'is_customized')
|
||||
}
|
||||
}
|
||||
this.$emit("input", "is_customized");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.spec-group {
|
||||
padding: .2rem .4rem;
|
||||
padding: 0.2rem 0.4rem;
|
||||
max-height: 50vh;
|
||||
overflow: scroll;
|
||||
li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 .4rem;
|
||||
font-size: .4rem;
|
||||
padding: 0 0.4rem;
|
||||
font-size: 0.4rem;
|
||||
height: 1rem;
|
||||
& ~ li {
|
||||
margin-top: .3rem;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
}
|
||||
li.active {
|
||||
border-color: $primary-color;
|
||||
color: $primary-color;
|
||||
border-color: #cf9e3b;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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">
|
||||
@@ -32,15 +32,21 @@
|
||||
<li :class="[lTypeId === lType.id && 'active']" v-for="lType in listTypes" :key="lType.id" @click="getPayRecords(lType.id, 1)">{{ lType.name }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="paied_list">
|
||||
<user-merit v-for="pay in payList" :key="pay.id" :data="pay"></user-merit>
|
||||
<div ref="target" class="observer-target">
|
||||
<div class="read-more" v-if="noMore && page > 1">没有更多了</div>
|
||||
<div class="read-more" v-if="noMore && page === 1">暂无数据</div>
|
||||
<div class="read-more" v-else @click="loadMoreFn">查看更多</div>
|
||||
<div class="read-more" v-if="!noMore" @click="loadMoreFn">查看更多</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="safe-inset-placeholder"></div>
|
||||
|
||||
<fixed-bottom ref="fixedBottom">
|
||||
<div class="customer-absolute">
|
||||
<customer-service></customer-service>
|
||||
</div>
|
||||
<button class="iconfont icon-home" v-if="query.no_login === '1'" @click="backHome"></button>
|
||||
<button class="merit-button" @click="onHasLoginToNext">{{ data.pay_name }}</button>
|
||||
</fixed-bottom>
|
||||
@@ -77,20 +83,21 @@
|
||||
|
||||
<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";
|
||||
import ObserverInteraction from "@/util/ObserverInteraction";
|
||||
import CustomerService from "@/components/customer-service/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
swiper,
|
||||
swiperSlide,
|
||||
SelectSpec,
|
||||
CustomerService,
|
||||
FillInformation,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
observer: null,
|
||||
result: "a",
|
||||
showAnyAmount: false,
|
||||
paddingBottom: 0,
|
||||
@@ -107,9 +114,9 @@ export default {
|
||||
dreamInfo: null,
|
||||
anyPrice: 0, // 随喜金额
|
||||
swiperOption: {
|
||||
autoplay: 8000,
|
||||
autoplay: 5000,
|
||||
initialSlide: 1,
|
||||
loop: false,
|
||||
loop: true,
|
||||
pagination: ".swiper-pagination",
|
||||
onSlideChangeEnd: () => {},
|
||||
},
|
||||
@@ -136,17 +143,47 @@ 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;
|
||||
}
|
||||
return (parseInt(this.priceUnit * 100, 10) * this.quantity) / 100;
|
||||
},
|
||||
safeInsetBottomHeight() {
|
||||
return this.$store.state.safeInsetBottomHeight;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getGoodsDetail("common");
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.observer.disconnect();
|
||||
},
|
||||
methods: {
|
||||
checkPlaceholderHeight() {
|
||||
const el = document.querySelector(".safe-inset-placeholder");
|
||||
const rect = el.getBoundingClientRect();
|
||||
if (rect.height > 0) {
|
||||
el.parentNode.removeChild(el);
|
||||
} else {
|
||||
el.style.height = "1rem";
|
||||
}
|
||||
},
|
||||
initObserver() {
|
||||
this.observer = new ObserverInteraction();
|
||||
|
||||
// 3. 监听元素可见性
|
||||
this.observer.observeVisibility(
|
||||
this.$refs.target,
|
||||
() => {
|
||||
this.loadMoreFn();
|
||||
},
|
||||
{ threshold: 0.5 }
|
||||
);
|
||||
},
|
||||
backHome() {
|
||||
const { query } = this.$router.currentRoute;
|
||||
const name = query.temple_id === "1" ? "home" : "temple-home";
|
||||
@@ -217,6 +254,8 @@ export default {
|
||||
await this.getPayRecords(this.lTypeId, 1);
|
||||
this.$nextTick(() => {
|
||||
this.paddingBottom = this.$refs.fixedBottom.getOffsetHeight() - 50;
|
||||
this.initObserver();
|
||||
this.checkPlaceholderHeight();
|
||||
});
|
||||
this.wechatReady({
|
||||
...this.data.shareConfig,
|
||||
@@ -226,6 +265,7 @@ export default {
|
||||
// 获取更多感恩功德1
|
||||
loadMoreFn() {
|
||||
this.page += 1;
|
||||
if (this.noMore) return;
|
||||
this.getPayRecords(this.lTypeId, this.page);
|
||||
},
|
||||
// 获取感恩功德
|
||||
@@ -246,12 +286,24 @@ export default {
|
||||
<style lang="scss">
|
||||
$lightWidth: 1.3rem;
|
||||
.goods-detail {
|
||||
.safe-inset-placeholder {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
}
|
||||
.goods-content {
|
||||
padding-left: 0.3rem;
|
||||
padding-right: 0.3rem;
|
||||
* {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
font-size: 0.35rem;
|
||||
word-wrap: break-word;
|
||||
white-space: wrap !important;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
.light-container {
|
||||
@@ -288,7 +340,7 @@ $lightWidth: 1.3rem;
|
||||
background: #bbb;
|
||||
}
|
||||
.van-swipe__indicator--active {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,13 +391,24 @@ $lightWidth: 1.3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.paied_list {
|
||||
flex: 1 1;
|
||||
}
|
||||
}
|
||||
.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 {
|
||||
@@ -419,7 +482,7 @@ $lightWidth: 1.3rem;
|
||||
}
|
||||
.merit-button {
|
||||
display: block;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
height: 1.2rem;
|
||||
font-size: 0.37rem;
|
||||
@@ -428,7 +491,7 @@ $lightWidth: 1.3rem;
|
||||
margin-top: 0.3rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border: 0.01rem solid $primary-color;
|
||||
border: 0.01rem solid #cf9e3b;
|
||||
border-radius: 0.13rem;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
@@ -455,7 +518,7 @@ $lightWidth: 1.3rem;
|
||||
}
|
||||
}
|
||||
li.current {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -492,7 +555,7 @@ $lightWidth: 1.3rem;
|
||||
.total {
|
||||
font-size: 0.4rem;
|
||||
em {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -500,12 +563,18 @@ $lightWidth: 1.3rem;
|
||||
.next {
|
||||
font-size: 0.4rem;
|
||||
padding: 0.3rem 1rem;
|
||||
background: $primary-color;
|
||||
border: 1px solid $primary-color;
|
||||
background: #cf9e3b;
|
||||
border: 1px solid #cf9e3b;
|
||||
color: white;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.customer-absolute {
|
||||
position: absolute;
|
||||
right: 0.3rem;
|
||||
top: 0.28rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -116,9 +116,9 @@ export default {
|
||||
}
|
||||
.btn {
|
||||
padding: 0.2rem 0.6rem;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
border-radius: 0.11rem;
|
||||
margin-left: 0.3rem;
|
||||
@@ -176,7 +176,7 @@ export default {
|
||||
margin-bottom: 0.3rem;
|
||||
.update {
|
||||
font-size: 0.35rem;
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
.name-group {
|
||||
@@ -186,9 +186,9 @@ export default {
|
||||
}
|
||||
}
|
||||
.confirm {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
width: 3rem;
|
||||
padding: 0.3rem 0;
|
||||
border-radius: 0.07rem;
|
||||
|
||||
@@ -22,12 +22,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: [String, Number]
|
||||
type: [String, Number],
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -38,49 +36,49 @@ export default {
|
||||
return {
|
||||
num: 0,
|
||||
is_customized: false,
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
number: {
|
||||
handler(val) {
|
||||
this.num = val;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChangeNumber(value) {
|
||||
this.$emit('update:number', value)
|
||||
this.$emit("update:number", value);
|
||||
},
|
||||
onSelectSpec(spec) {
|
||||
this.$emit('input', spec.id)
|
||||
this.$emit("input", spec.id);
|
||||
},
|
||||
onAnyAmount() {
|
||||
this.$emit('input', 'is_customized')
|
||||
}
|
||||
}
|
||||
this.$emit("input", "is_customized");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.spec-group {
|
||||
padding: .2rem .4rem;
|
||||
padding: 0.2rem 0.4rem;
|
||||
max-height: 50vh;
|
||||
overflow: scroll;
|
||||
li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 .4rem;
|
||||
font-size: .4rem;
|
||||
padding: 0 0.4rem;
|
||||
font-size: 0.4rem;
|
||||
height: 1rem;
|
||||
& ~ li {
|
||||
margin-top: .3rem;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
}
|
||||
li.active {
|
||||
border-color: $primary-color;
|
||||
color: $primary-color;
|
||||
border-color: #cf9e3b;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -304,10 +304,10 @@ $lightWidth: 1.15rem;
|
||||
padding-right: 0;
|
||||
}
|
||||
.current-light {
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
border-radius: 4px;
|
||||
span {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
img.light-icon {
|
||||
@@ -336,7 +336,7 @@ $lightWidth: 1.15rem;
|
||||
background: #bbb;
|
||||
}
|
||||
.van-swipe__indicator--active {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -480,7 +480,7 @@ $lightWidth: 1.15rem;
|
||||
}
|
||||
.merit-button {
|
||||
display: block;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
height: 1.2rem;
|
||||
font-size: 0.37rem;
|
||||
@@ -489,7 +489,7 @@ $lightWidth: 1.15rem;
|
||||
margin-top: 0.3rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border: 0.01rem solid $primary-color;
|
||||
border: 0.01rem solid #cf9e3b;
|
||||
border-radius: 0.13rem;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
@@ -516,7 +516,7 @@ $lightWidth: 1.15rem;
|
||||
}
|
||||
}
|
||||
li.current {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -553,7 +553,7 @@ $lightWidth: 1.15rem;
|
||||
.total {
|
||||
font-size: 0.4rem;
|
||||
em {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -561,8 +561,8 @@ $lightWidth: 1.15rem;
|
||||
.next {
|
||||
font-size: 0.4rem;
|
||||
padding: 0.3rem 1rem;
|
||||
background: $primary-color;
|
||||
border: 1px solid $primary-color;
|
||||
background: #cf9e3b;
|
||||
border: 1px solid #cf9e3b;
|
||||
color: white;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
|
||||
+27
-23
@@ -46,19 +46,19 @@
|
||||
<div class="divider"></div>
|
||||
<div class="panel" v-if="data.dynamic_data.length > 0">
|
||||
<div class="panel-head">
|
||||
<span class="title">进展状态</span>
|
||||
<span class="title">法会进展</span>
|
||||
<arrow-more @click="onMoreProcess"></arrow-more>
|
||||
</div>
|
||||
<div class="panel-body goods-panel-body">
|
||||
<buddha-process v-for="process in data.dynamic_data" :key="process.id" :data="process"></buddha-process>
|
||||
<div class="process-more" @click="onMoreProcess">
|
||||
<span>查看更多进展状态</span>
|
||||
<span>查看更多法会</span>
|
||||
<i class="iconfont icon-arrow-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<thanks-giving :temple-id="query.temple_id" :agent-id="query.agent_id"></thanks-giving>
|
||||
</div>
|
||||
<thanks-giving :temple-id="query.temple_id" :agent-id="query.agent_id"></thanks-giving>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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);
|
||||
@@ -259,13 +267,13 @@ export default {
|
||||
border-radius: 10px;
|
||||
}
|
||||
.van-swipe__indicator--active {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
}
|
||||
}
|
||||
.panel {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.merit-scroll-container {
|
||||
margin: 0 0.4rem;
|
||||
height: 3.39rem;
|
||||
@@ -278,34 +286,30 @@ export default {
|
||||
padding-bottom: 0.4rem;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="merit-box" :style="{ height: root.minHeight + 'px' }">
|
||||
<div class="merit-box">
|
||||
<van-nav-bar left-arrow v-if="$route.meta.showNavBar" :title="$route.meta.title" @click-left="$router.back()" :style="{ backgroundColor: $route.meta.navBarBackgroundColor }" />
|
||||
<div class="merit-container">
|
||||
<img class="goods-picture" :style="{ width: width + 'px', height: width / 2 + 'px' }" :src="info.merit_box_cover" alt="" />
|
||||
@@ -28,11 +28,11 @@
|
||||
</scroll-view>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="merit-button-group" :style="{ bottom: tabHeight + 'px' }">
|
||||
<button class="iconfont icon-arrow-left" @click="back"></button>
|
||||
<button class="merit-button" @click="openBox">随喜功德</button>
|
||||
</div>
|
||||
</div>
|
||||
<random-money :value.sync="randVisible" @change="onRandNext"></random-money>
|
||||
</div>
|
||||
</template>
|
||||
@@ -154,26 +154,31 @@ export default {
|
||||
<style lang="scss">
|
||||
.merit-box {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.goods-picture {
|
||||
vertical-align: top;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.merit-container {
|
||||
height: 100%;
|
||||
flex: 1 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.merit-rank-container {
|
||||
background: white;
|
||||
position: relative;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
margin-top: 5rem;
|
||||
height: 61vh;
|
||||
flex: 1 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
.head {
|
||||
padding: 0.53rem 0.4rem;
|
||||
padding-bottom: 0.13rem;
|
||||
@@ -237,20 +242,20 @@ export default {
|
||||
.merit-button {
|
||||
//display: inline-block;
|
||||
//vertical-align: top;
|
||||
//background: $primary-color;
|
||||
//background: #CF9E3B;;
|
||||
//color: white;
|
||||
//height: 1.4rem;
|
||||
//font-size: .37rem;
|
||||
//padding: 0 2rem;
|
||||
//border: .01rem solid $primary-color;
|
||||
//border: .01rem solid #CF9E3B;;
|
||||
//border-radius: $btn-border-radius;
|
||||
//flex: 1;
|
||||
|
||||
flex: 1;
|
||||
font-size: 0.4rem;
|
||||
padding: 0.3rem 1rem;
|
||||
background: $primary-color;
|
||||
border: 1px solid $primary-color;
|
||||
background: #cf9e3b;
|
||||
border: 1px solid #cf9e3b;
|
||||
color: white;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--mescroll滚动区域的基本结构-->
|
||||
<mescroll-vue ref="mescroll" :down="mescrollDown" :up="mescrollUp" @init="mescrollInit">
|
||||
<!--内容...-->
|
||||
<div class="div" v-for="(v, i) in dataList" :key="i">{{ v }}</div>
|
||||
</mescroll-vue>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 引入mescroll的vue组件
|
||||
import MescrollVue from "mescroll.js/mescroll.vue";
|
||||
const axios = {
|
||||
current: 0,
|
||||
get() {
|
||||
return new Promise((resolve) => {
|
||||
this.current += 1;
|
||||
setTimeout(() => {
|
||||
if (this.current === 3) {
|
||||
resolve({
|
||||
data: [],
|
||||
});
|
||||
return;
|
||||
}
|
||||
resolve({
|
||||
data: Array.from(Array(10), () => Math.random() * 100),
|
||||
});
|
||||
}, Math.random() * 1000);
|
||||
});
|
||||
},
|
||||
};
|
||||
export default {
|
||||
components: {
|
||||
MescrollVue, // 注册mescroll组件
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
mescroll: null, // mescroll实例对象
|
||||
mescrollDown: {}, //下拉刷新的配置. (如果下拉刷新和上拉加载处理的逻辑是一样的,则mescrollDown可不用写了)
|
||||
mescrollUp: {
|
||||
// 上拉加载的配置.
|
||||
callback: this.upCallback, // 上拉回调,此处简写; 相当于 callback: function(page, mescroll) { }
|
||||
//以下是一些常用的配置,当然不写也可以的.
|
||||
page: {
|
||||
num: 0, //当前页 默认0,回调之前会加1; 即callback(page)会从1开始
|
||||
size: 10, //每页数据条数,默认10
|
||||
},
|
||||
htmlNodata: '<p class="upwarp-nodata">-- END --</p>',
|
||||
noMoreSize: 5, //如果列表已无数据,可设置列表的总数量要大于5才显示无更多数据; 避免列表数据过少(比如只有一条数据),显示无更多数据会不好看这就是为什么无更多数据有时候不显示的原因
|
||||
toTop: {
|
||||
//回到顶部按钮
|
||||
src: "./static/mescroll/mescroll-totop.png", //图片路径,默认null,支持网络图
|
||||
offset: 1000, //列表滚动1000px才显示回到顶部按钮
|
||||
},
|
||||
empty: {
|
||||
//列表第一页无任何数据时,显示的空提示布局; 需配置warpId才显示
|
||||
warpId: "xxid", //父布局的id (1.3.5版本支持传入dom元素)
|
||||
icon: "./static/mescroll/mescroll-empty.png", //图标,默认null,支持网络图
|
||||
tip: "暂无相关数据~", //提示
|
||||
},
|
||||
},
|
||||
dataList: [], // 列表数据
|
||||
};
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
// 如果没有配置顶部按钮或isBounce,则beforeRouteEnter不用写
|
||||
next((vm) => {
|
||||
// 滚动到原来的列表位置,恢复顶部按钮和isBounce的配置
|
||||
vm.$refs.mescroll && vm.$refs.mescroll.beforeRouteEnter();
|
||||
});
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
// 如果没有配置顶部按钮或isBounce,则beforeRouteLeave不用写
|
||||
// 记录列表滚动的位置,隐藏顶部按钮和isBounce的配置
|
||||
this.$refs.mescroll && this.$refs.mescroll.beforeRouteLeave();
|
||||
next();
|
||||
},
|
||||
methods: {
|
||||
// mescroll组件初始化的回调,可获取到mescroll对象
|
||||
mescrollInit(mescroll) {
|
||||
this.mescroll = mescroll; // 如果this.mescroll对象没有使用到,则mescrollInit可以不用配置
|
||||
},
|
||||
// 上拉回调 page = {num:1, size:10}; num:当前页 ,默认从1开始; size:每页数据条数,默认10
|
||||
upCallback(page, mescroll) {
|
||||
// 联网请求
|
||||
axios
|
||||
.get({
|
||||
params: {
|
||||
num: page.num, // 页码
|
||||
size: page.size, // 每页长度
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
// 请求的列表数据
|
||||
let arr = response.data;
|
||||
// 如果是第一页需手动置空列表
|
||||
if (page.num === 1) this.dataList = [];
|
||||
// 把请求到的数据添加到列表
|
||||
this.dataList = this.dataList.concat(arr);
|
||||
// 数据渲染成功后,隐藏下拉刷新的状态
|
||||
this.$nextTick(() => {
|
||||
mescroll.endSuccess(arr.length);
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
// 联网失败的回调,隐藏下拉刷新和上拉加载的状态;
|
||||
mescroll.endErr();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/*通过fixed固定mescroll的高度*/
|
||||
.mescroll {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
height: auto;
|
||||
}
|
||||
.div {
|
||||
height: 40px;
|
||||
background: red;
|
||||
border: 10px solid blue;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
+37
-37
@@ -5,8 +5,8 @@
|
||||
</div>
|
||||
<swiper class="swiper-container" :options="swiperOption">
|
||||
<swiper-slide v-for="(cover, index) in data.pictures" :key="index">
|
||||
<div style="height: 100vw;" class="picture">
|
||||
<img :src="cover" alt="">
|
||||
<div style="height: 100vw" class="picture">
|
||||
<img :src="cover" alt="" />
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
@@ -34,29 +34,28 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMasterDetail } from '@/api'
|
||||
import 'swiper/css/swiper.css'
|
||||
import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
||||
import { getMasterDetail } from "@/api";
|
||||
import "swiper/css/swiper.css";
|
||||
import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
swiper, swiperSlide
|
||||
swiper,
|
||||
swiperSlide,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query: this.$route.query,
|
||||
banners: [ '/1.jpg', '/2.jpg', '/3.jpg' ],
|
||||
banners: ["/1.jpg", "/2.jpg", "/3.jpg"],
|
||||
data: null,
|
||||
swiperOption: {
|
||||
autoplay: 8000,
|
||||
initialSlide: 1,
|
||||
loop: true,
|
||||
pagination: '.swiper-pagination',
|
||||
onSlideChangeEnd: () => {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
pagination: ".swiper-pagination",
|
||||
onSlideChangeEnd: () => {},
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMasterDetail();
|
||||
@@ -64,41 +63,42 @@ export default {
|
||||
methods: {
|
||||
onProvide() {
|
||||
const { goods_type, goods_id, temple_id, spec_id } = this.data;
|
||||
this.onPushToGoodsDetail(goods_type, goods_id, temple_id, spec_id)
|
||||
this.onPushToGoodsDetail(goods_type, goods_id, temple_id, spec_id);
|
||||
},
|
||||
async getMasterDetail() {
|
||||
const res = await getMasterDetail(this.query.master_id)
|
||||
const res = await getMasterDetail(this.query.master_id);
|
||||
this.data = res;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.swiper-container {
|
||||
background: #f5f5f5;
|
||||
.picture, img{
|
||||
.picture,
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.support {
|
||||
.support-head {
|
||||
padding: 0 .4rem;
|
||||
padding: 0 0.4rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 1.07rem;
|
||||
line-height: 1.07rem;
|
||||
.label {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.external {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
li {
|
||||
margin-left: .3rem;
|
||||
font-size: .35rem;
|
||||
margin-left: 0.3rem;
|
||||
font-size: 0.35rem;
|
||||
color: #666;
|
||||
}
|
||||
li.active {
|
||||
@@ -110,16 +110,16 @@ export default {
|
||||
}
|
||||
.monk-detail {
|
||||
.monk-profile {
|
||||
padding: .4rem;
|
||||
margin-bottom: .53rem;
|
||||
padding: 0.4rem;
|
||||
margin-bottom: 0.53rem;
|
||||
.position {
|
||||
font-size: .5rem;
|
||||
padding-top: .2rem;
|
||||
color: #19282E;
|
||||
font-size: 0.5rem;
|
||||
padding-top: 0.2rem;
|
||||
color: #19282e;
|
||||
}
|
||||
.introduction {
|
||||
font-size: .37rem;
|
||||
margin-top: .4rem;
|
||||
font-size: 0.37rem;
|
||||
margin-top: 0.4rem;
|
||||
line-height: 1.3;
|
||||
text-align: justify;
|
||||
color: #666;
|
||||
@@ -133,18 +133,18 @@ export default {
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: white;
|
||||
padding: .4rem 0;
|
||||
border-top: .01rem solid #ddd;
|
||||
padding: 0.4rem 0;
|
||||
border-top: 0.01rem solid #ddd;
|
||||
.merit-button {
|
||||
display: inline-block;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
height: 1.2rem;
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
width: 60%;
|
||||
padding: 0 .53rem;
|
||||
border: .01rem solid $primary-color;
|
||||
border-radius: 1.33rem
|
||||
padding: 0 0.53rem;
|
||||
border: 0.01rem solid #cf9e3b;
|
||||
border-radius: 1.33rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,13 +14,35 @@
|
||||
<button class="detail" @click="onToOrder">查看详情</button>
|
||||
<button class="again" @click="onPayAgain">再结善缘</button>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="show" round closeable>
|
||||
<div class="mobile-dialog">
|
||||
<div class="pic-wrap">
|
||||
<img class="mobile-picture" src="/thanks.jpeg" alt="" />
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="info">
|
||||
<span>登记手机号获取功德反馈</span>
|
||||
<i>或</i>
|
||||
<span>添加客堂微信<b>19122065157</b>获取</span>
|
||||
</div>
|
||||
<div class="field-wrap">
|
||||
<van-field v-model="mobile" placeholder="请填写手机号码" maxlength="11" border type="digit"></van-field>
|
||||
</div>
|
||||
<van-button type="info" round block @click="saveMobile">确认</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { saveMobileNumber, checkUserMobile } from "@/api";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
mobile: "",
|
||||
query: this.$route.query,
|
||||
};
|
||||
},
|
||||
@@ -29,10 +51,32 @@ export default {
|
||||
return `https://temple-h5-new.oss-cn-hangzhou.aliyuncs.com//uploads/merit/certificate/${this.query.order_id}.jpg`;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
checkUserMobile().then((hasMobile) => {
|
||||
if (!hasMobile) {
|
||||
this.show = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
onToOder() {
|
||||
onToOrder() {
|
||||
this.$router.push("/user/order");
|
||||
},
|
||||
saveMobile() {
|
||||
const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/g;
|
||||
const mobile = this.mobile;
|
||||
if (!mobile) {
|
||||
return this.$toast("请输入11位手机号");
|
||||
}
|
||||
if (!reg.test(mobile)) {
|
||||
return this.$toast("请输入合法的手机号");
|
||||
}
|
||||
saveMobileNumber(mobile).then(() => {
|
||||
this.$toast("登记成功");
|
||||
this.show = false;
|
||||
});
|
||||
console.log("mobile", mobile);
|
||||
},
|
||||
onPayAgain() {
|
||||
// 功德箱订单再结善缘重新随喜
|
||||
if (this.query.from === "meritBox") {
|
||||
@@ -59,6 +103,61 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
.pay-result {
|
||||
.mobile-dialog {
|
||||
width: 90vw;
|
||||
height: 90vh;
|
||||
background-color: white;
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.pic-wrap {
|
||||
height: 70%;
|
||||
overflow: hidden;
|
||||
.mobile-picture {
|
||||
width: 100%;
|
||||
object-fit: fill;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 12px;
|
||||
.info {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
row-gap: 8px;
|
||||
color: #383838;
|
||||
i {
|
||||
font-size: 12px;
|
||||
}
|
||||
b {
|
||||
font-weight: bold;
|
||||
color: #bc1717;
|
||||
padding: 0 4px;
|
||||
}
|
||||
}
|
||||
.van-button--info {
|
||||
background-color: #bc1717;
|
||||
border-color: #bc1717;
|
||||
}
|
||||
}
|
||||
.field-wrap {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
.van-field__control {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cert-show {
|
||||
height: 70vh;
|
||||
background: #f5f5f5;
|
||||
@@ -105,13 +204,13 @@ export default {
|
||||
background: white;
|
||||
}
|
||||
.detail {
|
||||
color: $primary-color;
|
||||
border-color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
border-color: #cf9e3b;
|
||||
}
|
||||
.again {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border-color: $primary-color;
|
||||
border-color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="temple-detail" v-if="data">
|
||||
<img class="banner" :src="data.picture" alt="">
|
||||
<img class="banner" :src="data.picture" alt="" />
|
||||
<div class="authed border-bottom">
|
||||
<img src="@/assets/img/cert.jpg" alt="">
|
||||
<img src="@/assets/img/cert.jpg" alt="" />
|
||||
<span>已通过 <b>自在福田</b> 认证,可放心访问</span>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<h4 class="title border-bottom">认证授权</h4>
|
||||
<ul class="cert">
|
||||
<li v-for="(cert, index) in data.register_cert_url" :key="index">
|
||||
<img :src="cert" @click="previewImage(cert, data.register_cert_url)" alt="">
|
||||
<img :src="cert" @click="previewImage(cert, data.register_cert_url)" alt="" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -45,30 +45,30 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTempleDetail } from "@/api"
|
||||
import { previewImage } from '@/common/wechat-web';
|
||||
import { getTempleDetail } from "@/api";
|
||||
import { previewImage } from "@/common/wechat-web";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query: this.$route.query,
|
||||
data: null,
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getTempleDetail();
|
||||
this.wechatReady()
|
||||
this.wechatReady();
|
||||
},
|
||||
methods: {
|
||||
previewImage(cert, certArr) {
|
||||
previewImage(cert, certArr)
|
||||
previewImage(cert, certArr);
|
||||
},
|
||||
async getTempleDetail() {
|
||||
const res = await getTempleDetail(this.query.temple_id);
|
||||
this.data = res;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -78,35 +78,35 @@ export default {
|
||||
width: 100%;
|
||||
}
|
||||
.authed {
|
||||
font-size: .35rem;
|
||||
font-size: 0.35rem;
|
||||
line-height: 1.2rem;
|
||||
padding-left: .4rem;
|
||||
padding-left: 0.4rem;
|
||||
color: #888;
|
||||
img {
|
||||
width: .3rem;
|
||||
width: 0.3rem;
|
||||
vertical-align: middle;
|
||||
margin-right: .1rem;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
span {
|
||||
vertical-align: middle;
|
||||
b {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
.auth {
|
||||
margin: .4rem;
|
||||
margin-top: .8rem;
|
||||
margin: 0.4rem;
|
||||
margin-top: 0.8rem;
|
||||
.title {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
padding-bottom: .3rem;
|
||||
padding-bottom: 0.3rem;
|
||||
}
|
||||
.list {
|
||||
margin-top: .2rem;
|
||||
margin-top: 0.2rem;
|
||||
li {
|
||||
line-height: .8rem;
|
||||
font-size: .4rem;
|
||||
line-height: 0.8rem;
|
||||
font-size: 0.4rem;
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 5em;
|
||||
@@ -120,13 +120,13 @@ export default {
|
||||
}
|
||||
.cert {
|
||||
white-space: nowrap;
|
||||
margin-top: .3rem;
|
||||
margin-top: 0.3rem;
|
||||
overflow-x: scroll;
|
||||
li {
|
||||
width: 5rem;
|
||||
display: inline-block;
|
||||
border: 1px solid #ddd;
|
||||
margin-right: .3rem;
|
||||
margin-right: 0.3rem;
|
||||
img {
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
@@ -134,10 +134,10 @@ export default {
|
||||
}
|
||||
}
|
||||
.description {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
color: #888;
|
||||
line-height: 1.7;
|
||||
padding-top: .35rem;
|
||||
padding-top: 0.35rem;
|
||||
letter-spacing: 1px;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
+122
-140
@@ -8,15 +8,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="certed-temple" @click="$router.push({ name: 'temple-detail', query: { temple_id: query.temple_id } })">
|
||||
<img class="cert-icon" src="@/assets/img/cert.jpg" alt="">
|
||||
<img class="cert-icon" src="@/assets/img/cert.jpg" alt="" />
|
||||
<span class="text">认证寺院可放心访问</span>
|
||||
<span class="btn">查看</span>
|
||||
</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})">
|
||||
<img :src="banner.cover" alt="" @click="$router.push({ path: banner.url })" />
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<van-swipe-item v-for="(item, index) in data.icon_data" :key="index">
|
||||
<van-grid :border="false">
|
||||
<van-grid-item icon="photo-o" :text="nav.name" v-for="(nav, _index) in item" :key="_index" @click="locationTo(nav)">
|
||||
<img :src="nav.icon_url" class="nav-icon" slot="icon">
|
||||
<img :src="nav.icon_url" class="nav-icon" slot="icon" />
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-swipe-item>
|
||||
@@ -39,9 +39,8 @@
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="temple-manager">
|
||||
<div class="manager" v-for="manager in data.member_data" :key="manager.id"
|
||||
@click="$router.push({ name: 'monk', query: { master_id: manager.id }})">
|
||||
<img class="avatar" :src="manager.avatar_url" alt="">
|
||||
<div class="manager" v-for="manager in data.member_data" :key="manager.id" @click="$router.push({ name: 'monk', query: { master_id: manager.id } })">
|
||||
<img class="avatar" :src="manager.avatar_url" alt="" />
|
||||
<div class="manager-container">
|
||||
<h3 class="name">{{ manager.title }}</h3>
|
||||
<p class="content">
|
||||
@@ -53,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">
|
||||
@@ -68,33 +67,31 @@
|
||||
</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>
|
||||
<span class="title">活动进展</span>
|
||||
<arrow-more @click="onMoreProcess"></arrow-more>
|
||||
</div>
|
||||
<div class="panel-body goods-panel-body">
|
||||
<buddha-process v-for="process in data.dynamic_data" :key="process.id" :data="process"></buddha-process>
|
||||
<div class="process-more" @click="onMoreProcess">
|
||||
<span>查看更多进展状态</span>
|
||||
<span>查看更多活动进展</span>
|
||||
<i class="iconfont icon-arrow-right"></i>
|
||||
</div>
|
||||
</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="panel-menu-btn" @click="showUserMenu = true">
|
||||
<span class="iconfont icon-liebiao"></span>
|
||||
</div>
|
||||
|
||||
|
||||
<van-popup v-model="showUserMenu" position="left" style="width: 80%; height: 100%">
|
||||
<div class="user-menu" v-if="user">
|
||||
<div class="user">
|
||||
<img class="avatar" :src="user.avatar" alt="">
|
||||
<img class="avatar" :src="user.avatar" alt="" />
|
||||
<div class="profile">
|
||||
<h5 class="name">{{ user.nickname }}</h5>
|
||||
<p class="account">用户号: {{ user.account_no }}</p>
|
||||
@@ -102,19 +99,19 @@
|
||||
</div>
|
||||
<ul class="user-list">
|
||||
<li @click="onPushForRouteName('user-order')">
|
||||
<img src="@/assets/img/user-popup/我的善缘.png" alt="">
|
||||
<img src="@/assets/img/user-popup/我的善缘.png" alt="" />
|
||||
<span>我的善缘</span>
|
||||
</li>
|
||||
<li @click="onPushForRouteName('user-customer')">
|
||||
<img src="@/assets/img/user-popup/联系客服.png" alt="">
|
||||
<img src="@/assets/img/user-popup/联系客服.png" alt="" />
|
||||
<span>联系客服</span>
|
||||
</li>
|
||||
<li @click="onPushForRouteName('merit-box')">
|
||||
<img src="@/assets/img/user-popup/功德箱.png" alt="">
|
||||
<img src="@/assets/img/user-popup/功德箱.png" alt="" />
|
||||
<span>功德箱</span>
|
||||
</li>
|
||||
<li @click="onPushForRouteName('home')">
|
||||
<img src="@/assets/img/user-popup/查看更多寺院.png" alt="">
|
||||
<img src="@/assets/img/user-popup/查看更多寺院.png" alt="" />
|
||||
<span>自在福田首页</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -130,7 +127,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTempleIndex, getUserData } from '@/api';
|
||||
import { getTempleIndex, getUserData } from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -148,59 +145,58 @@ export default {
|
||||
methods: {
|
||||
openBox() {
|
||||
this.$router.push({
|
||||
name: 'merit-box',
|
||||
query: { temple_id : this.query.temple_id, open_box: 1, fromPathName: this.$route.name }
|
||||
})
|
||||
name: "merit-box",
|
||||
query: { temple_id: this.query.temple_id, open_box: 1, fromPathName: this.$route.name },
|
||||
});
|
||||
},
|
||||
locationTo(nav) {
|
||||
|
||||
// nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态
|
||||
if (nav.icon_type === 6) {
|
||||
this.$router.push({
|
||||
name: 'goods-light-detail',
|
||||
name: "goods-light-detail",
|
||||
query: {
|
||||
goods_type: nav.goods_type,
|
||||
temple_id: nav.temple_id,
|
||||
goods_id: nav.goods_id,
|
||||
}
|
||||
})
|
||||
return
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (nav.icon_type === 0) {
|
||||
window.location.href = nav.url;
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if (nav.icon_type === 5) {
|
||||
this.$router.push({
|
||||
name: 'buddha-detail',
|
||||
query: { id: nav.dynamic_id }
|
||||
})
|
||||
return
|
||||
name: "buddha-detail",
|
||||
query: { id: nav.dynamic_id },
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (nav.icon_type === 4) {
|
||||
this.$router.push({
|
||||
name: 'merit-box'
|
||||
})
|
||||
return
|
||||
name: "merit-box",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (nav.icon_type === 3) {
|
||||
this.$router.push({
|
||||
name: 'goods-detail',
|
||||
name: "goods-detail",
|
||||
query: {
|
||||
goods_type: nav.goods_type,
|
||||
goods_id: nav.goods_id,
|
||||
temple_id: nav.temple_id,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (nav.icon_type === 1 || nav.icon_type === 2) {
|
||||
this.$router.push({
|
||||
name: 'everyday-donation',
|
||||
name: "everyday-donation",
|
||||
query: {
|
||||
goods_type: nav.goods_type,
|
||||
goods_id: nav.goods_id,
|
||||
@@ -210,13 +206,13 @@ export default {
|
||||
}
|
||||
},
|
||||
onPushForRouteName(routeName) {
|
||||
if(routeName === 'merit-box'){
|
||||
if (routeName === "merit-box") {
|
||||
return this.openBox();
|
||||
}
|
||||
if(routeName === 'temple-list'){
|
||||
return this.$router.push({ name: routeName, query: { hideTab: '1'}})
|
||||
if (routeName === "temple-list") {
|
||||
return this.$router.push({ name: routeName, query: { hideTab: "1" } });
|
||||
}
|
||||
this.$router.push({ name: routeName })
|
||||
this.$router.push({ name: routeName });
|
||||
},
|
||||
async getUserData() {
|
||||
const res = await getUserData();
|
||||
@@ -224,17 +220,17 @@ export default {
|
||||
},
|
||||
onMoreProcess() {
|
||||
this.$router.push({
|
||||
name: 'buddha-activity',
|
||||
query: this.query
|
||||
name: "buddha-activity",
|
||||
query: this.query,
|
||||
});
|
||||
},
|
||||
onToGoods(goods) {
|
||||
this.$router.push({
|
||||
name: 'goods-detail',
|
||||
name: "goods-detail",
|
||||
query: {
|
||||
goods_id: goods.goods_id,
|
||||
temple_id: goods.temple_id
|
||||
}
|
||||
temple_id: goods.temple_id,
|
||||
},
|
||||
});
|
||||
},
|
||||
async getTempleIndex() {
|
||||
@@ -243,14 +239,14 @@ export default {
|
||||
this.data.icon_data = this.sliceNav(res.icon_data);
|
||||
setTimeout(() => {
|
||||
document.title = res.temple_data.unit_name;
|
||||
}, 30)
|
||||
}, 30);
|
||||
this.wechatReady({
|
||||
...res.shareConfig,
|
||||
link: location.href,
|
||||
})
|
||||
});
|
||||
},
|
||||
onTempleStation() {
|
||||
this.$router.push({ name: 'user-temple-station'})
|
||||
this.$router.push({ name: "user-temple-station" });
|
||||
},
|
||||
sliceNav(navData) {
|
||||
const nav = [];
|
||||
@@ -263,7 +259,7 @@ export default {
|
||||
|
||||
return nav;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -283,19 +279,16 @@ 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 {
|
||||
font-size: .4rem;
|
||||
background: $primary-color;
|
||||
font-size: 0.4rem;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
border: 1px solid $primary-color;
|
||||
padding: .3rem .6rem;
|
||||
border: 1px solid #cf9e3b;
|
||||
padding: 0.3rem 0.6rem;
|
||||
border-radius: 1rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
@@ -327,7 +320,7 @@ export default {
|
||||
text-align: right;
|
||||
|
||||
.iconfont {
|
||||
font-size: .8rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,19 +336,19 @@ export default {
|
||||
width: 1.33rem;
|
||||
height: 1.33rem;
|
||||
border-radius: 1.33rem;
|
||||
margin-right: .4rem;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
|
||||
.profile {
|
||||
.name {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.account {
|
||||
margin-top: .2rem;
|
||||
margin-top: 0.2rem;
|
||||
color: #666;
|
||||
font-size: .3rem;
|
||||
font-size: 0.3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -363,18 +356,18 @@ export default {
|
||||
.user-list {
|
||||
padding-left: 1rem;
|
||||
margin-top: 1rem;
|
||||
margin-right: .6rem;
|
||||
margin-right: 0.6rem;
|
||||
|
||||
li {
|
||||
height: 1.2rem;
|
||||
line-height: 1.2rem;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: .8rem;
|
||||
margin-right: .27rem;
|
||||
width: 0.8rem;
|
||||
margin-right: 0.27rem;
|
||||
}
|
||||
|
||||
& ~ li {
|
||||
@@ -386,7 +379,7 @@ export default {
|
||||
|
||||
.panel-menu-btn {
|
||||
position: fixed;
|
||||
left: .53rem;
|
||||
left: 0.53rem;
|
||||
bottom: 1.33rem;
|
||||
z-index: 1000;
|
||||
width: 1.33rem;
|
||||
@@ -395,50 +388,49 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background: $primary-color;
|
||||
border: 1px solid $primary-color;
|
||||
background: #cf9e3b;
|
||||
border: 1px solid #cf9e3b;
|
||||
border-radius: 50%;
|
||||
.iconfont {
|
||||
font-size: .5rem;
|
||||
font-size: 0.5rem;
|
||||
color: white;
|
||||
}
|
||||
.menu-text {
|
||||
font-size: .27rem;
|
||||
margin-top: .1rem;
|
||||
font-size: 0.27rem;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.temple-manager {
|
||||
.manager {
|
||||
display: flex;
|
||||
margin: .4rem;
|
||||
margin: 0.4rem;
|
||||
|
||||
& ~ .manager {
|
||||
border-top: 1px solid #ddd;
|
||||
padding-top: .4rem;
|
||||
padding-top: 0.4rem;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border-radius: 1.33rem;
|
||||
border: .08rem solid #f7e4bf;
|
||||
border: 0.08rem solid #f7e4bf;
|
||||
vertical-align: top;
|
||||
|
||||
}
|
||||
|
||||
.manager-container {
|
||||
flex: 1;
|
||||
margin-left: .4rem;
|
||||
margin-left: 0.4rem;
|
||||
|
||||
.name {
|
||||
padding: .3rem .3rem .3rem 0;
|
||||
font-size: .4rem;
|
||||
padding: 0.3rem 0.3rem 0.3rem 0;
|
||||
font-size: 0.4rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: .35rem;
|
||||
font-size: 0.35rem;
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
@@ -452,18 +444,17 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.merit-rank-container {
|
||||
.head {
|
||||
padding: .53rem .4rem;
|
||||
padding-bottom: .13rem;
|
||||
padding: 0.53rem 0.4rem;
|
||||
padding-bottom: 0.13rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
font-size: .43rem;
|
||||
font-size: 0.43rem;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
@@ -471,12 +462,12 @@ export default {
|
||||
display: flex;
|
||||
|
||||
span {
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
color: #999999;
|
||||
display: inline-block;
|
||||
margin-left: .4rem;
|
||||
border-bottom: .03rem solid transparent;
|
||||
padding-bottom: .13rem;
|
||||
margin-left: 0.4rem;
|
||||
border-bottom: 0.03rem solid transparent;
|
||||
padding-bottom: 0.13rem;
|
||||
}
|
||||
|
||||
span.current {
|
||||
@@ -503,42 +494,42 @@ export default {
|
||||
}
|
||||
|
||||
.van-swipe__indicator--active {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.certed-temple {
|
||||
display: flex;
|
||||
border: 1px solid $primary-color;
|
||||
border: 1px solid #cf9e3b;
|
||||
border-radius: 4px;
|
||||
margin: 0 .4rem;
|
||||
margin: 0 0.4rem;
|
||||
align-items: center;
|
||||
font-size: .37rem;
|
||||
padding: .3rem;
|
||||
margin-bottom: .2rem;
|
||||
font-size: 0.37rem;
|
||||
padding: 0.3rem;
|
||||
margin-bottom: 0.2rem;
|
||||
|
||||
.cert-icon {
|
||||
width: .3rem;
|
||||
margin-right: .1rem;
|
||||
width: 0.3rem;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
font-size: .3rem;
|
||||
font-size: 0.3rem;
|
||||
color: #888;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
|
||||
.process-more {
|
||||
line-height: 1.5rem;
|
||||
text-align: center;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
|
||||
.iconfont {
|
||||
vertical-align: middle;
|
||||
@@ -546,8 +537,8 @@ export default {
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: .4rem;
|
||||
padding-bottom: .33rem;
|
||||
padding: 0.4rem;
|
||||
padding-bottom: 0.33rem;
|
||||
|
||||
.my-swipe .van-swipe-item {
|
||||
color: #fff;
|
||||
@@ -558,37 +549,36 @@ export default {
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: .16rem;
|
||||
border-radius: 0.16rem;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper {
|
||||
margin-bottom: .4rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.van-notice-bar {
|
||||
border: 1px solid #E6B759;
|
||||
border-radius: .16rem;
|
||||
border: 1px solid #e6b759;
|
||||
border-radius: 0.16rem;
|
||||
}
|
||||
}
|
||||
|
||||
.panel {
|
||||
.panel-head {
|
||||
padding: .53rem .4rem;
|
||||
padding: 0.13rem 0.4rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
font-size: .43rem;
|
||||
font-size: 0.43rem;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
padding: 0 .4rem;
|
||||
overflow-x: scroll;
|
||||
padding: 0 0.4rem;
|
||||
overflow-x: hidden;
|
||||
|
||||
.merit-group {
|
||||
display: flex;
|
||||
@@ -599,10 +589,10 @@ export default {
|
||||
|
||||
.temple-home-activity {
|
||||
.buddha-process {
|
||||
padding: 0
|
||||
padding: 0;
|
||||
}
|
||||
.process {
|
||||
padding: .4rem 0;
|
||||
padding: 0.4rem 0;
|
||||
|
||||
.bar {
|
||||
padding-bottom: 0;
|
||||
@@ -611,56 +601,48 @@ export default {
|
||||
}
|
||||
|
||||
.merit {
|
||||
width: 3.39rem;
|
||||
height: 3.39rem;
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
position: relative;
|
||||
border-radius: .16rem;
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
|
||||
gap: 0.2rem;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
padding-bottom: 0.4rem;
|
||||
& ~ .merit {
|
||||
margin-left: .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: .91rem;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
line-height: .91rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
font-size: .37rem;
|
||||
padding: 0 .11rem;
|
||||
font-size: 0.37rem;
|
||||
padding: 0 0.11rem;
|
||||
}
|
||||
}
|
||||
|
||||
.temple-home-page {
|
||||
.temple-home {
|
||||
display: flex;
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: .4rem .3rem;
|
||||
padding: 0.4rem 0.3rem;
|
||||
|
||||
.temple-name {
|
||||
font-size: .45rem;
|
||||
font-size: 0.45rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.visitor {
|
||||
color: #999;
|
||||
font-size: .3rem;
|
||||
font-size: 0.3rem;
|
||||
|
||||
span {
|
||||
padding-left: 10px;
|
||||
|
||||
@@ -13,12 +13,7 @@
|
||||
<template v-if="!authing">
|
||||
<van-notice-bar text="真实法师社区,法师身份认证审核通过后才能使用" />
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field
|
||||
v-model="form.nickname"
|
||||
label="法号"
|
||||
placeholder="请输入法号全称"
|
||||
:rules="[{ required: true }]"
|
||||
/>
|
||||
<van-field v-model="form.nickname" label="法号" placeholder="请输入法号全称" :rules="[{ required: true }]" />
|
||||
<van-field label="称谓" v-model="form.rank_text" :rules="[{ required: true }]" readonly placeholder="请选择称谓" @click="showTitle = true">
|
||||
<template #right-icon>
|
||||
<span class="iconfont icon-arrow-down-filling"></span>
|
||||
@@ -29,17 +24,8 @@
|
||||
<span class="iconfont icon-arrow-down-filling"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="form.place_temple"
|
||||
type="text"
|
||||
label="驻锡寺院"
|
||||
placeholder="名称含所在城市; 如:深圳弘法寺"
|
||||
:rules="[{ required: true }]"
|
||||
/>
|
||||
<van-field
|
||||
label="真人头像"
|
||||
placeholder="真人头像"
|
||||
>
|
||||
<van-field v-model="form.place_temple" type="text" label="驻锡寺院" placeholder="名称含所在城市; 如:深圳弘法寺" :rules="[{ required: true }]" />
|
||||
<van-field label="真人头像" placeholder="真人头像">
|
||||
<template #input>
|
||||
<div>
|
||||
<p class="input-small-tip">照片需清晰美观,用于信众展示</p>
|
||||
@@ -47,11 +33,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
type="text"
|
||||
label="戒牒照片"
|
||||
placeholder="戒牒照片"
|
||||
>
|
||||
<van-field type="text" label="戒牒照片" placeholder="戒牒照片">
|
||||
<template #input>
|
||||
<div>
|
||||
<p class="input-small-tip">仅用于认证,不公开</p>
|
||||
@@ -59,17 +41,8 @@
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
label="自我介绍"
|
||||
placeholder="向他人展示自己的文字说明"
|
||||
:rules="[{ required: true }]"
|
||||
maxlength="500"
|
||||
:rows="4"
|
||||
show-word-limit
|
||||
/>
|
||||
<div style="margin: 16px;">
|
||||
<van-field v-model="form.description" type="textarea" label="自我介绍" placeholder="向他人展示自己的文字说明" :rules="[{ required: true }]" maxlength="500" :rows="4" show-word-limit />
|
||||
<div style="margin: 16px">
|
||||
<van-button round block type="temple" native-type="submit">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
@@ -80,19 +53,13 @@
|
||||
|
||||
<!-- 选择城市 -->
|
||||
<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"
|
||||
/>
|
||||
<van-cascader v-model="cascaderValue" title="请选择所在地区" :options="cityOptions" @close="showProvince = false" @finish="onFinishProvince" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMonkAppellation, getRegion, certifyMonk } from '@/api';
|
||||
import { getMonkAppellation, getRegion, certifyMonk } from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -100,21 +67,21 @@ export default {
|
||||
showProvince: false, // 显示城市选择
|
||||
showTitle: false, // 显示法师称谓
|
||||
form: {
|
||||
nickname: '', // 法号
|
||||
rank_id: '', // 称谓
|
||||
rank_text: '', // 称谓
|
||||
region: '',
|
||||
place_temple: '', // 驻赐寺院
|
||||
nickname: "", // 法号
|
||||
rank_id: "", // 称谓
|
||||
rank_text: "", // 称谓
|
||||
region: "",
|
||||
place_temple: "", // 驻赐寺院
|
||||
avatar_url: [], // 法师照片
|
||||
cert_url: [], // 戒牒照片
|
||||
description: ''
|
||||
description: "",
|
||||
},
|
||||
cascaderValue: '',
|
||||
cascaderValue: "",
|
||||
cityOptions: [],
|
||||
uploader: [],
|
||||
actions: [],
|
||||
authing: false, // 是否正在认证
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getParams();
|
||||
@@ -125,10 +92,10 @@ export default {
|
||||
const [province_id, city_id, county_id] = form.city_id;
|
||||
const { avatar_url, cert_url } = form;
|
||||
if (!avatar_url.length) {
|
||||
return this.$toast.fail('请上传头像照片');
|
||||
return this.$toast.fail("请上传头像照片");
|
||||
}
|
||||
if (!cert_url.length) {
|
||||
return this.$toast.fail('请上传戒牒照片')
|
||||
return this.$toast.fail("请上传戒牒照片");
|
||||
}
|
||||
const params = {
|
||||
...this.form,
|
||||
@@ -136,21 +103,21 @@ export default {
|
||||
cert_url: this.form.cert_url[0].url,
|
||||
province_id,
|
||||
city_id,
|
||||
county_id
|
||||
}
|
||||
await certifyMonk(params)
|
||||
this.$toast.success('认证信息提交成功')
|
||||
await this.$delay(2000)
|
||||
await this.$router.replace({ name: 'user-temple-station-review'})
|
||||
county_id,
|
||||
};
|
||||
await certifyMonk(params);
|
||||
this.$toast.success("认证信息提交成功");
|
||||
await this.$delay(2000);
|
||||
await this.$router.replace({ name: "user-temple-station-review" });
|
||||
},
|
||||
|
||||
getParams() {
|
||||
getMonkAppellation().then(res => {
|
||||
getMonkAppellation().then((res) => {
|
||||
this.actions = res;
|
||||
})
|
||||
getRegion().then(city => {
|
||||
this.cityOptions = city
|
||||
})
|
||||
});
|
||||
getRegion().then((city) => {
|
||||
this.cityOptions = city;
|
||||
});
|
||||
},
|
||||
onSelect(action) {
|
||||
this.form.rank_id = action.id;
|
||||
@@ -158,22 +125,22 @@ export default {
|
||||
},
|
||||
onFinishProvince({ 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">
|
||||
.mega-approve {
|
||||
.input-small-tip {
|
||||
font-size: .32rem;
|
||||
font-size: 0.32rem;
|
||||
color: #aaa;
|
||||
}
|
||||
.van-button--temple {
|
||||
background: $primary-color;
|
||||
border: 1px solid $primary-color;
|
||||
background: #cf9e3b;
|
||||
border: 1px solid #cf9e3b;
|
||||
color: white;
|
||||
}
|
||||
.reviewing {
|
||||
@@ -181,11 +148,11 @@ export default {
|
||||
padding-top: 1.33rem;
|
||||
.iconfont {
|
||||
font-size: 2.33rem;
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
.review-text {
|
||||
padding: .4rem 0;
|
||||
font-size: .4rem;
|
||||
padding: 0.4rem 0;
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
.van-button {
|
||||
width: 60%;
|
||||
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
padding: 0 0.7rem;
|
||||
border-top-left-radius: 1rem;
|
||||
border-bottom-left-radius: 1rem;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
opacity: 0.8;
|
||||
height: 1.07rem;
|
||||
line-height: 1.07rem;
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
justify-content: space-between;
|
||||
.feedback {
|
||||
font-size: 0.4rem;
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
.title-text {
|
||||
font-size: 0.5rem;
|
||||
@@ -204,7 +204,7 @@ export default {
|
||||
font-size: 0.4rem;
|
||||
flex: 1;
|
||||
.btn {
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
color: white;
|
||||
font-size: 0.3rem;
|
||||
border-radius: 2px;
|
||||
@@ -244,7 +244,7 @@ export default {
|
||||
position: absolute;
|
||||
left: -0.2rem;
|
||||
top: -0.2rem;
|
||||
border: 0.2rem solid $primary-color;
|
||||
border: 0.2rem solid #cf9e3b;
|
||||
transition: transform 0.1s linear;
|
||||
transform-origin: center center;
|
||||
}
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
animation: scale 0.1s linear;
|
||||
}
|
||||
&::after {
|
||||
border-color: $primary-color;
|
||||
border-color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
span {
|
||||
@@ -317,7 +317,7 @@ export default {
|
||||
display: block;
|
||||
margin-top: 0.4rem;
|
||||
font-size: 0.4rem;
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
}
|
||||
}
|
||||
.backword {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<a href="#">
|
||||
<img src="" alt="">
|
||||
<img src="" alt="" />
|
||||
</a>
|
||||
<div class="merit-rank-container">
|
||||
<div class="head">
|
||||
@@ -89,14 +89,12 @@
|
||||
<button class="button">恭请法师加持</button>
|
||||
</div>
|
||||
<!-- 计数 -->
|
||||
<div class="on-count" @click="onToCount">
|
||||
计数
|
||||
</div>
|
||||
<div class="on-count" @click="onToCount">计数</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCourseDetail } from "@/api"
|
||||
import { getCourseDetail } from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -106,11 +104,11 @@ export default {
|
||||
data: null,
|
||||
type_id: 1,
|
||||
types: [
|
||||
{ id: 1, name: '实时' },
|
||||
{ id: 2, name: '月榜' },
|
||||
{ id: 3, name: '总榜' },
|
||||
]
|
||||
}
|
||||
{ id: 1, name: "实时" },
|
||||
{ id: 2, name: "月榜" },
|
||||
{ id: 3, name: "总榜" },
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getCourseDetail();
|
||||
@@ -126,116 +124,114 @@ export default {
|
||||
},
|
||||
onToCount() {
|
||||
this.$router.push({
|
||||
name: 'user-course-count',
|
||||
query: { id: this.data.id }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
name: "user-course-count",
|
||||
query: { id: this.data.id },
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.course-detail {
|
||||
background: url('~@/assets/img/background.jpeg') top center no-repeat;
|
||||
background: url("~@/assets/img/background.jpeg") top center no-repeat;
|
||||
background-size: 100%;
|
||||
.on-count {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 4rem;
|
||||
padding: 0 .7rem;
|
||||
padding: 0 0.7rem;
|
||||
border-top-left-radius: 1rem;
|
||||
border-bottom-left-radius: 1rem;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
opacity: 0.8;
|
||||
height: 1.07rem;
|
||||
line-height: 1.07rem;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
color: white;
|
||||
}
|
||||
.course-container {
|
||||
padding: .4rem;
|
||||
padding: 0.4rem;
|
||||
.practice {
|
||||
.title {
|
||||
font-size: .5rem;
|
||||
font-size: 0.5rem;
|
||||
color: white;
|
||||
padding-top: .4rem;
|
||||
padding-top: 0.4rem;
|
||||
margin-bottom: 1.33rem;
|
||||
}
|
||||
.accumulation {
|
||||
font-size: .35rem;
|
||||
margin-bottom: .8rem;
|
||||
font-size: 0.35rem;
|
||||
margin-bottom: 0.8rem;
|
||||
p {
|
||||
color: white;
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
.iconfont {
|
||||
margin-left: .4rem;
|
||||
margin-left: 0.4rem;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.progress {
|
||||
display: flex;
|
||||
margin-top: .2rem;
|
||||
margin-top: 0.2rem;
|
||||
align-items: center;
|
||||
color: white;
|
||||
.progress-bar {
|
||||
flex: 1;
|
||||
border-radius: 8px;
|
||||
margin-right: .27rem;
|
||||
height: .3rem;
|
||||
margin-right: 0.27rem;
|
||||
height: 0.3rem;
|
||||
background: #ddd;
|
||||
position: relative;
|
||||
.progress-inline {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: .3rem;
|
||||
height: 0.3rem;
|
||||
width: 50%;
|
||||
background: #188fff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
.progress-text {
|
||||
width: .7rem;
|
||||
width: 0.7rem;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.buddhist-scriptures {
|
||||
padding: .4rem;
|
||||
margin-top: .9rem;
|
||||
padding: 0.4rem;
|
||||
margin-top: 0.9rem;
|
||||
.scriptures {
|
||||
margin-bottom: .4rem;
|
||||
margin-bottom: 0.4rem;
|
||||
.title {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.merit-rank-container {
|
||||
.head {
|
||||
padding: .53rem .4rem;
|
||||
padding-bottom: .13rem;
|
||||
padding: 0.53rem 0.4rem;
|
||||
padding-bottom: 0.13rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.title {
|
||||
font-size: .43rem;
|
||||
font-size: 0.43rem;
|
||||
color: #222222;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
span {
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
color: #999999;
|
||||
display: inline-block;
|
||||
margin-left: .4rem;
|
||||
border-bottom: .03rem solid transparent;
|
||||
padding-bottom: .13rem;
|
||||
margin-left: 0.4rem;
|
||||
border-bottom: 0.03rem solid transparent;
|
||||
padding-bottom: 0.13rem;
|
||||
}
|
||||
span.current {
|
||||
color: #222;
|
||||
@@ -246,7 +242,7 @@ export default {
|
||||
.body {
|
||||
.user-merit-course {
|
||||
display: flex;
|
||||
padding: .27rem 0.4rem;
|
||||
padding: 0.27rem 0.4rem;
|
||||
img {
|
||||
width: 1.17rem;
|
||||
height: 1.17rem;
|
||||
@@ -255,17 +251,17 @@ export default {
|
||||
}
|
||||
.profile {
|
||||
flex: 1;
|
||||
padding-top: .13rem;
|
||||
padding-top: 0.13rem;
|
||||
.name {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
margin-bottom: .27rem;
|
||||
margin-bottom: 0.27rem;
|
||||
span:first-child {
|
||||
font-size: 0.4rem;
|
||||
color: #777;
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
margin-right: .4rem;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
span:last-child {
|
||||
font-size: 0.32rem;
|
||||
@@ -283,7 +279,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
padding: .13rem 0;
|
||||
padding: 0.13rem 0;
|
||||
text-align: right;
|
||||
.money {
|
||||
font-size: 0.35rem;
|
||||
@@ -295,16 +291,15 @@ export default {
|
||||
}
|
||||
.button-buff {
|
||||
text-align: center;
|
||||
padding: .4rem;
|
||||
padding: 0.4rem;
|
||||
.button {
|
||||
background: $primary-color;
|
||||
border: 1px solid $primary-color;
|
||||
font-size: .4rem;
|
||||
background: #cf9e3b;
|
||||
border: 1px solid #cf9e3b;
|
||||
font-size: 0.4rem;
|
||||
color: white;
|
||||
border-radius: .13rem;
|
||||
padding: .27rem .4rem;
|
||||
border-radius: 0.13rem;
|
||||
padding: 0.27rem 0.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
color: #999;
|
||||
padding-top: 0.2rem;
|
||||
span {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
padding: 0 0.13rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
font-size: 0.3rem;
|
||||
color: #666;
|
||||
span {
|
||||
color: $primary-color;
|
||||
color: #cf9e3b;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
top: 0;
|
||||
height: 0.11rem;
|
||||
width: 50%;
|
||||
background: $primary-color;
|
||||
background: #cf9e3b;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
</div>
|
||||
<div class="order-detail-container">
|
||||
<div class="top">
|
||||
<h1 class="status">{{data.status}}</h1>
|
||||
<div class="order-panel">
|
||||
<div class="order-info">
|
||||
<span class="order-icon">
|
||||
@@ -13,9 +12,14 @@
|
||||
<!-- <van-icon name="fail" />-->
|
||||
</span>
|
||||
<div class="order-desc">
|
||||
<h3 class="text">感谢您对自在福田的信任,恭祝再结善缘。</h3>
|
||||
<h3 class="text">
|
||||
<span class="tag">{{ data.status }}</span
|
||||
>{{ data.goods_name }}
|
||||
</h3>
|
||||
<p class="desc">付款时间:{{ data.paid_at }}</p>
|
||||
<p class="desc">处理时间:{{ data.created_at }}</p>
|
||||
<p class="desc">处理单位:{{ data.unit_name }}</p>
|
||||
<p class="desc">感谢您对{{ data.unit_name }}的信任,恭祝再结善缘。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-btns">
|
||||
@@ -28,17 +32,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-feedback" v-if="data.feedback_content">
|
||||
<h3 class="feed-title">反馈内容</h3>
|
||||
<h3 class="feed-title">来自{{ data.unit_name }}的反馈</h3>
|
||||
<p class="feed-content">{{ data.feedback_content }}</p>
|
||||
<div class="feed-picture">
|
||||
<img v-for="(pic, index) in data.feedback_pictures" :key="index" :src="pic" alt="" class="feed-picture" @click="onPreview(pic, data.feedback_pictures)">
|
||||
<img v-for="(pic, index) in data.feedback_pictures" :key="index" :src="pic" alt="" class="feed-picture" @click="onPreview(pic, data.feedback_pictures)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-popup v-model="showCert" round>
|
||||
<div class="cert">
|
||||
<img :src="certUrl">
|
||||
<img :src="certUrl" />
|
||||
<p class="tip">长按图片保存到手机</p>
|
||||
</div>
|
||||
</van-popup>
|
||||
@@ -46,17 +50,44 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrder } from '@/api';
|
||||
import { previewImage } from '@/common/wechat-web';
|
||||
import { getOrder } from "@/api";
|
||||
import { previewImage } from "@/common/wechat-web";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
const { query } = this.$route;
|
||||
return {
|
||||
query,
|
||||
data: null,
|
||||
data: {
|
||||
// id: 22807,
|
||||
// temple_id: 48,
|
||||
// order_sn: "K12721900403102616",
|
||||
// goods_type: 3,
|
||||
// goods_id: 355,
|
||||
// goods_name: "\u5927\u96c4\u5b9d\u6bbf\u4f5b\u50cf\u8d34\u91d1\u5706\u6ee1\uff0c\u5c3e\u6b3e\u52a9\u7f18\u9700\u60a8\u62a4\u6301\uff01",
|
||||
// spec_id: 0,
|
||||
// buy_quantity: 1,
|
||||
// buy_total: 1,
|
||||
// price: "0.01",
|
||||
// order_amount: "0.01",
|
||||
// is_customized: 1,
|
||||
// feedback_pictures: [
|
||||
// "https://temple-h5-new.oss-cn-hangzhou.aliyuncs.com/uploads/dev/2026/01/27/phpKk16ba.jpeg",
|
||||
// "https://temple-h5-new.oss-cn-hangzhou.aliyuncs.com/uploads/dev/2026/01/27/php4bqshn.jpeg",
|
||||
// ],
|
||||
// feedback_content: "\u5df2\u5904\u7406\uff0c\u8fd9\u662f\u540e\u53f0\u7684\u5904\u7406\u6d88\u606f",
|
||||
// status: "\u5df2\u5904\u7406",
|
||||
// paid_at: "2026-01-27 21:51:48",
|
||||
// created_at: "2026-01-27 21:51:40",
|
||||
// spec_name: "",
|
||||
// dream: "",
|
||||
// merit_name: "",
|
||||
// is_auto: "",
|
||||
// friendly_time: "",
|
||||
// unit_name: "\u51c6\u63d0\u9053\u573a",
|
||||
},
|
||||
showCert: false,
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getOrder();
|
||||
@@ -64,67 +95,63 @@ export default {
|
||||
|
||||
computed: {
|
||||
certUrl() {
|
||||
return `https://wdx-temple.oss-cn-hangzhou.aliyuncs.com/uploads/merit/certificate/${this.data.id}.jpg`
|
||||
}
|
||||
return `https://wdx-temple.oss-cn-hangzhou.aliyuncs.com/uploads/merit/certificate/${this.data.id}.jpg`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onPreview(picture, pictureArr) {
|
||||
previewImage(picture, pictureArr)
|
||||
previewImage(picture, pictureArr);
|
||||
},
|
||||
async getOrder() {
|
||||
const res = await getOrder(this.query.id);
|
||||
this.data = res;
|
||||
this.wechatReady((wx) => {
|
||||
this.shareToWechat(wx, res.data.shareConfig)
|
||||
})
|
||||
this.shareToWechat(wx, res.data.shareConfig);
|
||||
});
|
||||
},
|
||||
onOrderAgain() {
|
||||
this.onPushToGoodsDetail(this.data.goods_type, this.data.goods_id, this.data.temple_id, this.data.spec_ids)
|
||||
this.onPushToGoodsDetail(this.data.goods_type, this.data.goods_id, this.data.temple_id, this.data.spec_ids);
|
||||
},
|
||||
onCustomer() {
|
||||
this.$router.push({ name: 'user-customer'})
|
||||
this.$router.push({ name: "user-customer" });
|
||||
},
|
||||
onShowCert() {
|
||||
this.showCert = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.order-detail {
|
||||
font-size: .35rem;
|
||||
font-size: 0.35rem;
|
||||
min-height: 100vh;
|
||||
background: #f9f9f9;
|
||||
.cert {
|
||||
padding: .3rem;
|
||||
border-radius: .1rem;
|
||||
padding: 0.3rem;
|
||||
border-radius: 0.1rem;
|
||||
img {
|
||||
width: 8rem;
|
||||
}
|
||||
.tip {
|
||||
font-size: .4rem;
|
||||
padding: .4rem 0;
|
||||
font-size: 0.4rem;
|
||||
padding: 0.4rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.order-detail-container {
|
||||
padding: 0 .3rem;
|
||||
padding: 0 0.3rem;
|
||||
.top {
|
||||
.status{
|
||||
font-size: .5rem;
|
||||
padding: .3rem 0;
|
||||
padding-top: .6rem;
|
||||
text-indent: .4rem;
|
||||
}
|
||||
padding-top: 0.4rem;
|
||||
.order-panel {
|
||||
background: white;
|
||||
border-radius: .1rem;
|
||||
padding: .4rem;
|
||||
box-shadow: 0 0 .3rem rgba(0,0,0,0.1);
|
||||
border-radius: 0.1rem;
|
||||
padding: 0.4rem;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 0 0.3rem rgba(0, 0, 0, 0.1);
|
||||
.order-info {
|
||||
display: flex;
|
||||
padding-bottom: .3rem;
|
||||
padding-bottom: 0.3rem;
|
||||
.order-icon {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
@@ -132,40 +159,50 @@ export default {
|
||||
background: forestgreen;
|
||||
color: white;
|
||||
border-radius: 1rem;
|
||||
font-size: .6rem;
|
||||
font-size: 0.6rem;
|
||||
align-items: center;
|
||||
display: none;
|
||||
justify-content: center;
|
||||
margin-right: .3rem;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
.order-desc {
|
||||
flex: 1;
|
||||
.text {
|
||||
font-size: .4rem;
|
||||
line-height: 1.3;
|
||||
font-size: 0.4rem;
|
||||
line-height: 1.6;
|
||||
.tag {
|
||||
background: #efbe2d;
|
||||
color: white;
|
||||
padding: 3px 10px;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
font-size: .35rem;
|
||||
font-size: 0.35rem;
|
||||
color: #999;
|
||||
margin-top: .3rem;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-btns {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
padding-top: .2rem;
|
||||
justify-content: center;
|
||||
column-gap: 12px;
|
||||
padding-top: 0.2rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: .5rem;
|
||||
padding-left: 1.3rem;
|
||||
padding-right: .3rem;
|
||||
margin-bottom: .4rem;
|
||||
padding-bottom: 0.5rem;
|
||||
// padding-left: 1.3rem;
|
||||
// padding-right: 0.3rem;
|
||||
margin-bottom: 0.4rem;
|
||||
.order-btn {
|
||||
height: 1rem;
|
||||
border-radius: .1rem;
|
||||
border-radius: 0.1rem;
|
||||
border: 1px solid #ddd;
|
||||
background: white;
|
||||
padding: 0 .5rem;
|
||||
margin-right: .2rem;
|
||||
padding: 0 0.5rem;
|
||||
margin-right: 0.2rem;
|
||||
}
|
||||
}
|
||||
.order-no {
|
||||
@@ -177,37 +214,39 @@ export default {
|
||||
}
|
||||
.order-repeat {
|
||||
height: 1rem;
|
||||
border-radius: .1rem;
|
||||
border: 1px solid #e77979;
|
||||
padding: 0 .5rem;
|
||||
background: #e77979;
|
||||
border-radius: 1rem;
|
||||
border: 1px solid #efbe2d;
|
||||
padding: 0 0.5rem;
|
||||
background: #efbe2d;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-feedback {
|
||||
background: white;
|
||||
border-radius: .1rem;
|
||||
padding: .4rem;
|
||||
box-shadow: 0 0 .3rem rgba(0,0,0,0.1);
|
||||
margin-top: 1rem;
|
||||
border-radius: 0.1rem;
|
||||
padding: 0.4rem;
|
||||
box-shadow: 0 0 0.3rem rgba(0, 0, 0, 0.1);
|
||||
margin-top: 0.5rem;
|
||||
border-radius: 12px;
|
||||
.feed-title {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
.feed-content {
|
||||
padding-top: .3rem;
|
||||
padding-bottom: .3rem;
|
||||
padding-top: 0.3rem;
|
||||
padding-bottom: 0.3rem;
|
||||
line-height: 1.4;
|
||||
font-size: .38rem;
|
||||
font-size: 0.38rem;
|
||||
color: #888;
|
||||
text-align: justify;
|
||||
}
|
||||
.feed-picture {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 0.2rem;
|
||||
img {
|
||||
width: 23%;
|
||||
margin-right: 2%;
|
||||
margin-bottom: .1rem;
|
||||
height: 1.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,23 +83,16 @@
|
||||
</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() {
|
||||
@@ -107,25 +100,26 @@ export default {
|
||||
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, // 是否同意寺院联盟服务协议
|
||||
@@ -136,73 +130,75 @@ export default {
|
||||
|
||||
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: '请输入寺院来源' },
|
||||
source: { required: true, message: "请输入寺院来源" },
|
||||
register_name: { validator: {} },
|
||||
login_mobile: { required: true, message: '请输入法人手机号码' },
|
||||
password: { required: true, message: '请输入登陆密码' },
|
||||
password_confirm: { required: true, message: '请确认登录密码' }
|
||||
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() {
|
||||
return Number(this.$route.query.step) || 1;
|
||||
}
|
||||
},
|
||||
},
|
||||
canNextStep2() {
|
||||
return this.form.register_cert_url.length > 0 && this.agreement
|
||||
}
|
||||
return this.form.register_cert_url.length > 0 && this.agreement;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
TMAPLoader.load({
|
||||
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()
|
||||
return this.getStationTemplate();
|
||||
}
|
||||
if (this.form.register_cert_url.length === 0 && Number(this.$route.query.step) !== 1) {
|
||||
return this.$router.push({ query: { step: 1 } });
|
||||
@@ -213,125 +209,172 @@ export default {
|
||||
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' })
|
||||
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)
|
||||
this.$toast.fail(errors[i].message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
onNextStep(step = 1) {
|
||||
this.$router.push({ query: { step: this.step + step }})
|
||||
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 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 => {
|
||||
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) {
|
||||
this.$toast.fail('未查询到地址信息,请核对地址')
|
||||
reject();
|
||||
reject(new Error("未查询到地址信息,请核对地址"));
|
||||
return;
|
||||
}
|
||||
reject(error || new Error("地址解析失败"));
|
||||
});
|
||||
});
|
||||
})
|
||||
},
|
||||
// 根据地址更新坐标
|
||||
async onUpdateLatLng({ target: { value } }) {
|
||||
const { lat, lng } = await this.getLatLngByAddress(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() {
|
||||
const validator = new Schema(this.formRules);
|
||||
validator.validate(this.form, ((errors) => {
|
||||
validator.validate(this.form, async (errors) => {
|
||||
if (errors) {
|
||||
return this.handleErrors(errors)
|
||||
return this.handleErrors(errors);
|
||||
}
|
||||
try {
|
||||
await this.ensureFormLatLng();
|
||||
} catch (error) {
|
||||
this.$toast.fail(error.message || "经纬度获取失败,请检查地址后重试");
|
||||
return;
|
||||
}
|
||||
//
|
||||
this.onNextStep(1);
|
||||
}))
|
||||
});
|
||||
},
|
||||
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),
|
||||
}
|
||||
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 }) {
|
||||
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 {
|
||||
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;
|
||||
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;
|
||||
font-size: 0.37rem;
|
||||
color: #666;
|
||||
}
|
||||
.active {
|
||||
@@ -340,63 +383,65 @@ export default {
|
||||
color: white;
|
||||
}
|
||||
span {
|
||||
color: rgb(187, 95, 95);;
|
||||
color: rgb(187, 95, 95);
|
||||
}
|
||||
}
|
||||
}
|
||||
.settle-in {
|
||||
.infor {
|
||||
padding: .53rem .7rem;
|
||||
padding: 0.53rem 0.7rem;
|
||||
.title {
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.cert-group {
|
||||
.cert {
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
color: #666;
|
||||
span {
|
||||
font-size: .28rem;
|
||||
font-size: 0.28rem;
|
||||
}
|
||||
}
|
||||
.uploader {
|
||||
text-align: center;
|
||||
padding: .4rem 0;
|
||||
margin-top: .4rem;
|
||||
padding: 0.4rem 0;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
}
|
||||
.attention {
|
||||
font-size: .35rem;
|
||||
font-size: 0.35rem;
|
||||
color: #999;
|
||||
margin-top: .3rem;
|
||||
margin-top: 0.3rem;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
&::before {
|
||||
content: '*';
|
||||
content: "*";
|
||||
color: red;
|
||||
margin-right: .1rem;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
}
|
||||
.agreement {
|
||||
text-align: center;
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
padding: 1rem 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
}
|
||||
.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);
|
||||
margin: auto;
|
||||
border-radius: .3rem;
|
||||
font-size: .3rem;
|
||||
border-radius: 0.3rem;
|
||||
font-size: 0.3rem;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -410,16 +455,16 @@ export default {
|
||||
}
|
||||
}
|
||||
.form {
|
||||
padding: .4rem 0;
|
||||
padding: 0.4rem 0;
|
||||
.group {
|
||||
margin-bottom: .6rem;
|
||||
margin-bottom: 0.6rem;
|
||||
.label-temple {
|
||||
font-size: .4rem;
|
||||
padding-left: .4rem;
|
||||
font-size: 0.4rem;
|
||||
padding-left: 0.4rem;
|
||||
&::before {
|
||||
content: '';
|
||||
content: "";
|
||||
width: 4px;
|
||||
height: .37rem;
|
||||
height: 0.37rem;
|
||||
background: #bb5f5f;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
@@ -431,17 +476,17 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: .5rem .4rem .3rem;
|
||||
padding: 0.5rem 0.4rem 0.3rem;
|
||||
.label {
|
||||
font-size: .37rem;
|
||||
font-size: 0.37rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.administrator_wechat {
|
||||
padding: .4rem;
|
||||
padding: 0.4rem;
|
||||
.title {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
@@ -453,12 +498,12 @@ export default {
|
||||
margin-right: auto;
|
||||
}
|
||||
.label {
|
||||
font-size: .4rem;
|
||||
padding: .5rem 0;
|
||||
font-size: 0.4rem;
|
||||
padding: 0.5rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
.notice {
|
||||
font-size: .4rem;
|
||||
font-size: 0.4rem;
|
||||
color: rgb(129, 43, 43);
|
||||
margin-top: 2rem;
|
||||
text-align: center;
|
||||
@@ -467,15 +512,14 @@ export default {
|
||||
margin-top: 2rem;
|
||||
display: flex;
|
||||
.prev {
|
||||
margin-right: .3rem;
|
||||
margin-right: 0.3rem;
|
||||
width: 3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.button-group {
|
||||
padding: 0 .4rem;
|
||||
padding: 0 0.4rem;
|
||||
padding-top: 0rem;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
+244
-223
@@ -1,280 +1,301 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router';
|
||||
import Vue from "vue";
|
||||
import Router from "vue-router";
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '',
|
||||
redirect: '/home'
|
||||
path: "",
|
||||
redirect: "/home",
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
component: () => import('../pages/home.vue')
|
||||
path: "/home",
|
||||
name: "home",
|
||||
component: () => import("../pages/home.vue"),
|
||||
},
|
||||
{
|
||||
path: '/search',
|
||||
name: 'search',
|
||||
meta: { title: '搜索' },
|
||||
component: () => import('@/pages/search')
|
||||
},
|
||||
{
|
||||
path: '/mescroll',
|
||||
name: 'mescroll',
|
||||
meta: { title: '上拉下刷' },
|
||||
component: () => import('@/pages/mescroll-test')
|
||||
},
|
||||
{
|
||||
path: '/temple',
|
||||
meta: { title: '寺院', navBarBackgroundColor: 'white', showNavBar: false },
|
||||
component: { render: h => h('router-view') },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'temple-home',
|
||||
meta: { title: '寺院首页', navBarBackgroundColor: 'white', showNavBar: false },
|
||||
component: () => import('@/pages/temple-home')
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
name: 'temple-list',
|
||||
meta: { title: '寺院列表', navBarBackgroundColor: 'white',showNavBar: false },
|
||||
component: () => import('@/pages/temple-list')
|
||||
},
|
||||
{
|
||||
path: 'detail',
|
||||
name: 'temple-detail',
|
||||
meta: { title: '寺院详情', navBarBackgroundColor: 'white',showNavBar: false },
|
||||
component: () => import('@/pages/temple-detail')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/buddha-activity',
|
||||
name: 'buddha-activity',
|
||||
meta: { title: '进展活动', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/buddha-activity')
|
||||
},
|
||||
{
|
||||
path: '/buddha-activity-scroll',
|
||||
name: 'buddha-activity-scroll',
|
||||
meta: { title: '进展活动', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/buddha-activity-scroll')
|
||||
},
|
||||
{
|
||||
path: '/buddha-detail',
|
||||
name: 'buddha-detail',
|
||||
meta: { title: '进展活动详情', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/buddha-detail')
|
||||
},
|
||||
{
|
||||
path: '/merit-list',
|
||||
name: 'merit-list',
|
||||
meta: { title: '功德无量', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/merit-list')
|
||||
},
|
||||
{
|
||||
path: '/merit-box',
|
||||
name: 'merit-box',
|
||||
meta: { title: '功德无量', navBarBackgroundColor: 'white', showNavBar: false},
|
||||
component: () => import('@/pages/merit-box')
|
||||
path: "/search",
|
||||
name: "search",
|
||||
meta: { title: "搜索" },
|
||||
component: () => import("@/pages/search"),
|
||||
},
|
||||
|
||||
{
|
||||
path: '/monk',
|
||||
name: 'monk',
|
||||
meta: { title: '详情', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/monk')
|
||||
},
|
||||
{
|
||||
path: '/pay',
|
||||
name: 'pay',
|
||||
meta: { title: '支付', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/pay')
|
||||
},
|
||||
{
|
||||
path: '/pay-result',
|
||||
name: 'pay-result',
|
||||
meta: { title: '支付成功', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/pay-result')
|
||||
},
|
||||
{
|
||||
path: '/join-cert',
|
||||
name: 'join-cert',
|
||||
meta: { title: '参与成功', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/join-cert')
|
||||
},
|
||||
{
|
||||
path: '/get-user-phone',
|
||||
name: 'get-user-phone',
|
||||
meta: { title: '自在福田', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/get-user-phone')
|
||||
},
|
||||
{
|
||||
path: '/goods-detail',
|
||||
name: 'goods-detail',
|
||||
meta: { title: '详情', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/goods-detail')
|
||||
},
|
||||
{
|
||||
path: '/goods-light-detail',
|
||||
name: 'goods-light-detail',
|
||||
meta: { title: '详情', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/goods-light-detail')
|
||||
},
|
||||
{
|
||||
path: '/fill-name',
|
||||
name: 'fill-name',
|
||||
meta: { title: '详情', navBarBackgroundColor: 'white' },
|
||||
component: () => import('@/pages/fill-name')
|
||||
},
|
||||
{
|
||||
path: '/everyday-donation',
|
||||
name: 'everyday-donation',
|
||||
meta: { title: '日行一善', navBarBackgroundColor: 'white', showNavBar: false },
|
||||
component: () => import('@/pages/everyday-donation')
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: () => import('@/pages/user/root'),
|
||||
path: "/temple",
|
||||
meta: { title: "寺院", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: { render: (h) => h("router-view") },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'user-home',
|
||||
meta: { title: '个人中心', showNavBar: false },
|
||||
component: () => import('@/pages/user/index')
|
||||
path: "",
|
||||
name: "temple-home",
|
||||
meta: { title: "寺院首页", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/temple-home"),
|
||||
},
|
||||
{
|
||||
path: 'customer',
|
||||
name: 'user-customer',
|
||||
meta: { title: '客服中心' },
|
||||
component: () => import('@/pages/user/customer')
|
||||
path: "list",
|
||||
name: "temple-list",
|
||||
meta: { title: "寺院列表", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/temple-list"),
|
||||
},
|
||||
{
|
||||
path: 'temple-station',
|
||||
name: 'user-temple-station',
|
||||
meta: { title: '寺院入驻', showNavBar: false },
|
||||
component: () => import('@/pages/user/temple-station')
|
||||
path: "detail",
|
||||
name: "temple-detail",
|
||||
meta: { title: "寺院详情", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/temple-detail"),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'temple-station-agreement',
|
||||
name: 'user-temple-station-agreement',
|
||||
meta: { title: '寺院入驻协议', showNavBar: false },
|
||||
component: () => import('@/pages/user/temple-station-agreement')
|
||||
path: "/buddha-activity",
|
||||
name: "buddha-activity",
|
||||
meta: { title: "进展活动", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/buddha-activity"),
|
||||
},
|
||||
{
|
||||
path: 'temple-station-review',
|
||||
name: 'user-temple-station-review',
|
||||
meta: { title: '寺院入驻', showNavBar: false },
|
||||
component: () => import('@/pages/user/temple-station/review')
|
||||
path: "/buddha-activity-scroll",
|
||||
name: "buddha-activity-scroll",
|
||||
meta: { title: "进展活动", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/buddha-activity-scroll"),
|
||||
},
|
||||
{
|
||||
path: 'certificate',
|
||||
name: 'user-certificate',
|
||||
meta: { title: '客服中心' },
|
||||
component: () => import('@/pages/user/certificate')
|
||||
path: "/buddha-detail",
|
||||
name: "buddha-detail",
|
||||
meta: { title: "进展活动详情", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/buddha-detail"),
|
||||
},
|
||||
{
|
||||
path: 'order',
|
||||
name: 'user-order',
|
||||
meta: { title: '我的善缘' },
|
||||
component: () => import('@/pages/user/order')
|
||||
path: "/merit-list",
|
||||
name: "merit-list",
|
||||
meta: { title: "近期活动", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/merit-list"),
|
||||
},
|
||||
{
|
||||
path: 'order-detail',
|
||||
name: 'user-order-detail',
|
||||
meta: { title: '善缘详情' },
|
||||
component: () => import('@/pages/user/order-detail')
|
||||
path: "/merit-box",
|
||||
name: "merit-box",
|
||||
meta: { title: "近期活动", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/merit-box"),
|
||||
},
|
||||
|
||||
{
|
||||
path: "/monk",
|
||||
name: "monk",
|
||||
meta: { title: "详情", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/monk"),
|
||||
},
|
||||
{
|
||||
path: 'focus',
|
||||
name: 'user-focus',
|
||||
meta: { title: '我的关注' },
|
||||
component: () => import('@/pages/user/focus')
|
||||
path: "/pay",
|
||||
name: "pay",
|
||||
meta: { title: "捐赠", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/pay"),
|
||||
},
|
||||
{
|
||||
path: 'approve',
|
||||
name: 'user-approve',
|
||||
meta: { title: '认证法师' },
|
||||
component: () => import('@/pages/user/approve')
|
||||
path: "/pay-result",
|
||||
name: "pay-result",
|
||||
meta: { title: "护持成功", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/pay-result"),
|
||||
},
|
||||
{
|
||||
path: 'course',
|
||||
meta: { title: '修行' },
|
||||
name: 'user-course',
|
||||
component: { render: h => h('router-view')},
|
||||
path: "/join-cert",
|
||||
name: "join-cert",
|
||||
meta: { title: "参与成功", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/join-cert"),
|
||||
},
|
||||
{
|
||||
path: "/get-user-phone",
|
||||
name: "get-user-phone",
|
||||
meta: { title: "自在福田", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/get-user-phone"),
|
||||
},
|
||||
{
|
||||
path: "/goods-detail",
|
||||
name: "goods-detail",
|
||||
meta: { title: "详情", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/goods-detail"),
|
||||
},
|
||||
{
|
||||
path: "/goods-light-detail",
|
||||
name: "goods-light-detail",
|
||||
meta: { title: "详情", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/goods-light-detail"),
|
||||
},
|
||||
{
|
||||
path: "/fill-name",
|
||||
name: "fill-name",
|
||||
meta: { title: "详情", navBarBackgroundColor: "white" },
|
||||
component: () => import("@/pages/fill-name"),
|
||||
},
|
||||
{
|
||||
path: "/everyday-donation",
|
||||
name: "everyday-donation",
|
||||
meta: { title: "日行一善", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/everyday-donation"),
|
||||
},
|
||||
{
|
||||
path: "/user",
|
||||
component: () => import("@/pages/user/root"),
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'user-course-list',
|
||||
meta: { title: '修行', showNavBar: false },
|
||||
component: () => import('@/pages/user/course'),
|
||||
path: "",
|
||||
name: "user-home",
|
||||
meta: { title: "个人中心", showNavBar: false },
|
||||
component: () => import("@/pages/user/index"),
|
||||
},
|
||||
{
|
||||
path: 'detail',
|
||||
name: 'user-course-detail',
|
||||
meta: { title: '我的功课', showNavBar: false },
|
||||
component: () => import('@/pages/user/course/detail'),
|
||||
path: "customer",
|
||||
name: "user-customer",
|
||||
meta: { title: "客服中心" },
|
||||
component: () => import("@/pages/user/customer"),
|
||||
},
|
||||
{
|
||||
path: 'count',
|
||||
name: 'user-course-count',
|
||||
meta: { title: '我的功课 - 修行', showNavBar: false },
|
||||
component: () => import('@/pages/user/course/count'),
|
||||
path: "temple-station",
|
||||
name: "user-temple-station",
|
||||
meta: { title: "寺院入驻", showNavBar: false },
|
||||
component: () => import("@/pages/user/temple-station"),
|
||||
},
|
||||
]
|
||||
{
|
||||
path: "temple-station-agreement",
|
||||
name: "user-temple-station-agreement",
|
||||
meta: { title: "寺院入驻协议", showNavBar: false },
|
||||
component: () => import("@/pages/user/temple-station-agreement"),
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
path: "temple-station-review",
|
||||
name: "user-temple-station-review",
|
||||
meta: { title: "寺院入驻", showNavBar: false },
|
||||
component: () => import("@/pages/user/temple-station/review"),
|
||||
},
|
||||
{
|
||||
path: "certificate",
|
||||
name: "user-certificate",
|
||||
meta: { title: "客服中心" },
|
||||
component: () => import("@/pages/user/certificate"),
|
||||
},
|
||||
{
|
||||
path: "order",
|
||||
name: "user-order",
|
||||
meta: { title: "我的善缘" },
|
||||
component: () => import("@/pages/user/order"),
|
||||
},
|
||||
{
|
||||
path: "order-detail",
|
||||
name: "user-order-detail",
|
||||
meta: { title: "善缘详情" },
|
||||
component: () => import("@/pages/user/order-detail"),
|
||||
},
|
||||
{
|
||||
path: "focus",
|
||||
name: "user-focus",
|
||||
meta: { title: "我的关注" },
|
||||
component: () => import("@/pages/user/focus"),
|
||||
},
|
||||
{
|
||||
path: "approve",
|
||||
name: "user-approve",
|
||||
meta: { title: "认证法师" },
|
||||
component: () => import("@/pages/user/approve"),
|
||||
},
|
||||
{
|
||||
path: "course",
|
||||
meta: { title: "修行" },
|
||||
name: "user-course",
|
||||
component: { render: (h) => h("router-view") },
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "user-course-list",
|
||||
meta: { title: "修行", showNavBar: false },
|
||||
component: () => import("@/pages/user/course"),
|
||||
},
|
||||
{
|
||||
path: "detail",
|
||||
name: "user-course-detail",
|
||||
meta: { title: "我的功课", showNavBar: false },
|
||||
component: () => import("@/pages/user/course/detail"),
|
||||
},
|
||||
{
|
||||
path: "count",
|
||||
name: "user-course-count",
|
||||
meta: { title: "我的功课 - 修行", showNavBar: false },
|
||||
component: () => import("@/pages/user/course/count"),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/admin",
|
||||
name: "admin",
|
||||
meta: { title: "后台", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: { render: (h) => h("router-view") },
|
||||
children: [
|
||||
{
|
||||
path: "orders",
|
||||
name: "adminOrder",
|
||||
meta: { title: "订单列表", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/admin/order/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "order-detail",
|
||||
name: "adminOrderDetail",
|
||||
meta: { title: "订单详情", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/admin/order/detail.vue"),
|
||||
},
|
||||
{
|
||||
path: "order-process",
|
||||
name: "adminOrderProcess",
|
||||
meta: { title: "订单处理", navBarBackgroundColor: "white", showNavBar: false },
|
||||
component: () => import("@/pages/admin/order/process.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
const router = new Router({
|
||||
mode: 'hash',
|
||||
mode: "hash",
|
||||
routes,
|
||||
scrollBehavior() {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
y: 0,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
export const tabbar = [
|
||||
{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
active: require('../assets/img/tabbar/tabbar_icon_01_click.png'),
|
||||
inactive: require('../assets/img/tabbar/tabbar_icon_01.png'),
|
||||
title: '首页'
|
||||
path: "/home",
|
||||
name: "home",
|
||||
active: require("../assets/img/tabbar/tabbar_icon_01_click.png"),
|
||||
inactive: require("../assets/img/tabbar/tabbar_icon_01.png"),
|
||||
title: "首页",
|
||||
},
|
||||
// {
|
||||
// path: '/user/course',
|
||||
// name: 'user-course-list',
|
||||
// active: require('../assets/img/tabbar/tabbar_icon_02_click.png'),
|
||||
// inactive: require('../assets/img/tabbar/tabbar_icon_02.png'),
|
||||
// title: '修行'
|
||||
// },
|
||||
{
|
||||
path: "/merit-box",
|
||||
name: "merit-box",
|
||||
active: require("../assets/img/tabbar/tabbar_icon_03_click.png"),
|
||||
inactive: require("../assets/img/tabbar/tabbar_icon_03.png"),
|
||||
title: "每日功德",
|
||||
},
|
||||
{
|
||||
path: '/user/course',
|
||||
name: 'user-course-list',
|
||||
active: require('../assets/img/tabbar/tabbar_icon_02_click.png'),
|
||||
inactive: require('../assets/img/tabbar/tabbar_icon_02.png'),
|
||||
title: '修行'
|
||||
path: "/temple/list",
|
||||
name: "temple-list",
|
||||
active: require("../assets/img/tabbar/tabbar_icon_04_click.png"),
|
||||
inactive: require("../assets/img/tabbar/tabbar_icon_04.png"),
|
||||
title: "参寺",
|
||||
},
|
||||
{
|
||||
path: '/merit-box',
|
||||
name: 'merit-box',
|
||||
active: require('../assets/img/tabbar/tabbar_icon_03_click.png'),
|
||||
inactive: require('../assets/img/tabbar/tabbar_icon_03.png'),
|
||||
title: '每日功德'
|
||||
path: "/user/",
|
||||
name: "user-home",
|
||||
active: require("../assets/img/tabbar/tabbar_icon_05_click.png"),
|
||||
inactive: require("../assets/img/tabbar/tabbar_icon_05.png"),
|
||||
title: "我的",
|
||||
},
|
||||
{
|
||||
path: '/temple/list',
|
||||
name: 'temple-list',
|
||||
active: require('../assets/img/tabbar/tabbar_icon_04_click.png'),
|
||||
inactive: require('../assets/img/tabbar/tabbar_icon_04.png'),
|
||||
title: '参寺'
|
||||
},
|
||||
{
|
||||
path: '/user/',
|
||||
name: 'user-home',
|
||||
active: require('../assets/img/tabbar/tabbar_icon_05_click.png'),
|
||||
inactive: require('../assets/img/tabbar/tabbar_icon_05.png'),
|
||||
title: '我的'
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
@@ -0,0 +1,284 @@
|
||||
// utils/ObserverInteraction.js
|
||||
|
||||
class ObserverInteraction {
|
||||
constructor(options = {}) {
|
||||
this.options = {
|
||||
attributes: true, // 观察属性变化
|
||||
childList: false, // 观察子节点变化
|
||||
subtree: false, // 观察后代节点
|
||||
attributeFilter: [], // 观察特定属性
|
||||
attributeOldValue: false, // 记录属性旧值
|
||||
...options,
|
||||
};
|
||||
|
||||
this.observer = null;
|
||||
this.callbacks = new Map();
|
||||
this.targets = new Set();
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始观察目标元素
|
||||
* @param {HTMLElement} target - 要观察的DOM元素
|
||||
* @param {Function} callback - 变化时的回调函数
|
||||
* @param {Object} customOptions - 自定义观察选项
|
||||
*/
|
||||
observe(target, callback, customOptions = {}) {
|
||||
if (!target) {
|
||||
console.error("ObserverInteraction: 目标元素不存在");
|
||||
return;
|
||||
}
|
||||
|
||||
const options = { ...this.options, ...customOptions };
|
||||
|
||||
// 如果已存在观察器,先断开
|
||||
if (this.observer) {
|
||||
this.disconnect();
|
||||
}
|
||||
|
||||
// 创建新的观察器
|
||||
this.observer = new MutationObserver((mutationsList) => {
|
||||
const changes = this._processMutations(mutationsList);
|
||||
if (changes.length > 0 && callback) {
|
||||
callback(changes, target);
|
||||
}
|
||||
|
||||
// 触发所有注册的回调
|
||||
this.callbacks.forEach((cb, element) => {
|
||||
if (element === target || element.contains(target)) {
|
||||
cb(changes, target);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 开始观察
|
||||
this.observer.observe(target, options);
|
||||
this.targets.add(target);
|
||||
|
||||
// 存储回调
|
||||
if (callback) {
|
||||
this.callbacks.set(target, callback);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听特定属性的变化
|
||||
* @param {HTMLElement} target - 目标元素
|
||||
* @param {string} attributeName - 属性名
|
||||
* @param {Function} callback - 回调函数
|
||||
*/
|
||||
watchAttribute(target, attributeName, callback) {
|
||||
return this.observe(target, callback, {
|
||||
attributes: true,
|
||||
attributeFilter: [attributeName],
|
||||
attributeOldValue: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听元素大小变化(使用 ResizeObserver)
|
||||
* @param {HTMLElement} target - 目标元素
|
||||
* @param {Function} callback - 回调函数
|
||||
*/
|
||||
observeResize(target, callback) {
|
||||
if (!window.ResizeObserver) {
|
||||
console.warn("ResizeObserver 不支持当前浏览器");
|
||||
return;
|
||||
}
|
||||
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
for (const entry of entries) {
|
||||
const { width, height } = entry.contentRect;
|
||||
callback({ width, height, target: entry.target });
|
||||
}
|
||||
});
|
||||
|
||||
resizeObserver.observe(target);
|
||||
|
||||
// 存储以便清理
|
||||
this.resizeObservers = this.resizeObservers || new Map();
|
||||
this.resizeObservers.set(target, resizeObserver);
|
||||
|
||||
return () => this.unobserveResize(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理 mutations 数据
|
||||
* @private
|
||||
*/
|
||||
_processMutations(mutationsList) {
|
||||
const changes = [];
|
||||
|
||||
for (const mutation of mutationsList) {
|
||||
const change = {
|
||||
type: mutation.type,
|
||||
target: mutation.target,
|
||||
timestamp: Date.now(),
|
||||
};
|
||||
|
||||
if (mutation.type === "attributes") {
|
||||
change.attributeName = mutation.attributeName;
|
||||
change.oldValue = mutation.oldValue;
|
||||
change.newValue = mutation.target.getAttribute(mutation.attributeName);
|
||||
}
|
||||
|
||||
if (mutation.type === "childList") {
|
||||
change.addedNodes = Array.from(mutation.addedNodes);
|
||||
change.removedNodes = Array.from(mutation.removedNodes);
|
||||
}
|
||||
|
||||
changes.push(change);
|
||||
}
|
||||
|
||||
return changes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册交互事件
|
||||
* @param {HTMLElement} element - 元素
|
||||
* @param {string} eventType - 事件类型
|
||||
* @param {Function} callback - 回调
|
||||
*/
|
||||
on(element, eventType, callback) {
|
||||
if (!element || !callback) return;
|
||||
|
||||
const handler = (event) => {
|
||||
callback(event, element);
|
||||
};
|
||||
|
||||
element.addEventListener(eventType, handler);
|
||||
|
||||
// 存储以便清理
|
||||
this.eventHandlers = this.eventHandlers || new Map();
|
||||
if (!this.eventHandlers.has(element)) {
|
||||
this.eventHandlers.set(element, new Map());
|
||||
}
|
||||
this.eventHandlers.get(element).set(eventType, handler);
|
||||
|
||||
return () => this.off(element, eventType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除事件监听
|
||||
* @param {HTMLElement} element - 元素
|
||||
* @param {string} eventType - 事件类型
|
||||
*/
|
||||
off(element, eventType) {
|
||||
if (!this.eventHandlers?.has(element)) return;
|
||||
|
||||
const handlers = this.eventHandlers.get(element);
|
||||
if (eventType) {
|
||||
const handler = handlers.get(eventType);
|
||||
if (handler) {
|
||||
element.removeEventListener(eventType, handler);
|
||||
handlers.delete(eventType);
|
||||
}
|
||||
} else {
|
||||
handlers.forEach((handler, type) => {
|
||||
element.removeEventListener(type, handler);
|
||||
});
|
||||
this.eventHandlers.delete(element);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 观察元素可见性(Intersection Observer)
|
||||
* @param {HTMLElement} target - 目标元素
|
||||
* @param {Function} callback - 可见性变化回调
|
||||
* @param {Object} options - IntersectionObserver 配置
|
||||
*/
|
||||
observeVisibility(target, callback, options = {}) {
|
||||
const defaultOptions = {
|
||||
threshold: 0.1,
|
||||
rootMargin: "0px",
|
||||
};
|
||||
|
||||
const intersectionObserver = new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
callback({
|
||||
isIntersecting: entry.isIntersecting,
|
||||
intersectionRatio: entry.intersectionRatio,
|
||||
boundingClientRect: entry.boundingClientRect,
|
||||
target: entry.target,
|
||||
});
|
||||
});
|
||||
},
|
||||
{ ...defaultOptions, ...options }
|
||||
);
|
||||
|
||||
intersectionObserver.observe(target);
|
||||
|
||||
this.intersectionObservers = this.intersectionObservers || new Map();
|
||||
this.intersectionObservers.set(target, intersectionObserver);
|
||||
|
||||
return () => this.unobserveVisibility(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止观察可见性
|
||||
* @param {HTMLElement} target - 目标元素
|
||||
*/
|
||||
unobserveVisibility(target) {
|
||||
const observer = this.intersectionObservers?.get(target);
|
||||
if (observer) {
|
||||
observer.unobserve(target);
|
||||
this.intersectionObservers.delete(target);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止观察大小变化
|
||||
* @param {HTMLElement} target - 目标元素
|
||||
*/
|
||||
unobserveResize(target) {
|
||||
const observer = this.resizeObservers?.get(target);
|
||||
if (observer) {
|
||||
observer.unobserve(target);
|
||||
this.resizeObservers.delete(target);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断开所有观察器
|
||||
*/
|
||||
disconnect() {
|
||||
if (this.observer) {
|
||||
this.observer.disconnect();
|
||||
this.observer = null;
|
||||
}
|
||||
|
||||
// 清理 ResizeObservers
|
||||
this.resizeObservers?.forEach((observer) => {
|
||||
observer.disconnect();
|
||||
});
|
||||
this.resizeObservers?.clear();
|
||||
|
||||
// 清理 IntersectionObservers
|
||||
this.intersectionObservers?.forEach((observer) => {
|
||||
observer.disconnect();
|
||||
});
|
||||
this.intersectionObservers?.clear();
|
||||
|
||||
this.targets.clear();
|
||||
this.callbacks.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 销毁实例
|
||||
*/
|
||||
destroy() {
|
||||
this.disconnect();
|
||||
|
||||
// 清理所有事件监听
|
||||
this.eventHandlers?.forEach((handlers, element) => {
|
||||
handlers.forEach((handler, type) => {
|
||||
element.removeEventListener(type, handler);
|
||||
});
|
||||
});
|
||||
this.eventHandlers?.clear();
|
||||
}
|
||||
}
|
||||
|
||||
export default ObserverInteraction;
|
||||
+15
-16
@@ -1,34 +1,33 @@
|
||||
export default {
|
||||
setSearchParamsFromObj(obj) {
|
||||
let search = '?';
|
||||
let search = "?";
|
||||
for (let i in obj) {
|
||||
search += `${i}=${obj[i]}&`
|
||||
search += `${i}=${obj[i]}&`;
|
||||
}
|
||||
return search.slice(0, -1);
|
||||
},
|
||||
addExternalParamsToQuery(url, key, value) {
|
||||
if (!url) {
|
||||
return ''
|
||||
return "";
|
||||
}
|
||||
const hasQuery = url.indexOf('?') > -1
|
||||
url = url.split('?')
|
||||
const before = url.shift()
|
||||
let after = url.join('&')
|
||||
const searchParams = new URLSearchParams(after);
|
||||
const [beforeHash] = url.split("#");
|
||||
const [beforeQuery, query = ""] = beforeHash.split("?");
|
||||
const searchParams = new URLSearchParams(query);
|
||||
if (!searchParams.has(key)) {
|
||||
return before+'?'+after+'&'+key+'='+value;
|
||||
searchParams.set(key, value);
|
||||
}
|
||||
return before+(hasQuery ? '?': '&') + after;
|
||||
const queryString = searchParams.toString();
|
||||
return `${beforeQuery}?${queryString}`;
|
||||
},
|
||||
queryStringToObj(queryString) {
|
||||
const string = queryString.split('&');
|
||||
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;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
+7
-3
@@ -51,11 +51,15 @@ module.exports = {
|
||||
css: {
|
||||
sourceMap: false,
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
sassOptions: {
|
||||
silenceDeprecations: ["legacy-js-api", "import"],
|
||||
},
|
||||
},
|
||||
scss: {
|
||||
data: null,
|
||||
sassOptions: {
|
||||
silenceDeprecations: ["legacy-js-api", "import"],
|
||||
},
|
||||
postcss: {
|
||||
plugins: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user