This commit is contained in:
2025-07-13 14:42:38 +08:00
parent b3862ac356
commit 33d9d6bb06
37 changed files with 2093 additions and 29315 deletions
-17673
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -36,8 +36,8 @@
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"sass": "^1.89.0", "sass": "^1.89.0",
"sass-loader": "^7.1.0", "sass-loader": "^8.0.2",
"sass-resources-loader": "^2.2.4", "sass-resources-loader": "^2.2.5",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
}, },
"eslintConfig": { "eslintConfig": {
+770 -664
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

+42 -36
View File
@@ -2,11 +2,11 @@
<div class="app-safe-area" :style="{ minHeight: minHeight + 'px' }"> <div class="app-safe-area" :style="{ minHeight: minHeight + 'px' }">
<div id="app" :data-height="minHeight - tabHeight" :style="{ minHeight: minHeight - tabHeight + 'px', paddingBottom: tabHeight + 'px' }"> <div id="app" :data-height="minHeight - tabHeight" :style="{ minHeight: minHeight - tabHeight + 'px', paddingBottom: tabHeight + 'px' }">
<router-view /> <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)"> <van-tabbar-item replace name v-for="(tab, index) in tabbar" :key="index" @click="onNavigation(tab)">
<span>{{ tab.title }}</span> <span>{{ tab.title }}</span>
<template #icon="props"> <template #icon="props">
<img :src="props.active ? tab.active: tab.inactive" alt=""> <img :src="props.active ? tab.active : tab.inactive" alt="" />
</template> </template>
</van-tabbar-item> </van-tabbar-item>
</van-tabbar> </van-tabbar>
@@ -15,13 +15,13 @@
</template> </template>
<script> <script>
import { tabbar } from '../src/router'; import { tabbar } from "../src/router";
import safeAreaInsets from 'safe-area-insets'; import safeAreaInsets from "safe-area-insets";
export default { export default {
name: 'App', name: "App",
data() { data() {
return { return {
active: '3', active: "3",
minHeight: 0, minHeight: 0,
tabbar, tabbar,
tabHeight: 0, tabHeight: 0,
@@ -39,10 +39,13 @@ export default {
}; };
}, },
watch: { watch: {
'$route': { $route: {
handler(val) { handler(val) {
document.title = val.meta.title || '自在福田' document.title = val.meta.title || "自在福田";
this.active = tabbar.map(v => v.name).indexOf(val.name).toString(); this.active = tabbar
.map((v) => v.name)
.indexOf(val.name)
.toString();
}, },
deep: true, deep: true,
}, },
@@ -51,52 +54,55 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
const { tabbar } = this.$refs; const { tabbar } = this.$refs;
this.tabHeight = tabbar ? tabbar.$el.offsetHeight - safeAreaInsets.bottom : 0; this.tabHeight = tabbar ? tabbar.$el.offsetHeight - safeAreaInsets.bottom : 0;
}) });
}, },
immediate: true, immediate: true,
} },
}, },
mounted() { mounted() {
this.$store.commit('SET_LAUNCH', this.$route.query) this.$store.commit("SET_LAUNCH", this.$route.query);
setTimeout(() => { setTimeout(() => {
this.minHeight = window.innerHeight - safeAreaInsets.bottom; this.minHeight = window.innerHeight - safeAreaInsets.bottom;
}, 30) }, 30);
}, },
methods: { methods: {
onNavigation(tab) { onNavigation(tab) {
const { path } = this.$route; const { path } = this.$route;
if (path === tab.path) return; 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: { computed: {
actionRoute: { actionRoute: {
get() { get() {
const { tabbar } = this; 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() { showTabbar() {
const path = tabbar.map(tab => tab.name); const path = tabbar.map((tab) => tab.name);
const { name, query: { hideTab } } = this.$route; const {
name,
query: { hideTab },
} = this.$route;
// 等于寺庙功德箱时隐藏底部导航 // 等于寺庙功德箱时隐藏底部导航
if(name === 'merit-box' || (name === 'temple-list' && hideTab === '1')){ if (name === "merit-box" || (name === "temple-list" && hideTab === "1")) {
return false return false;
} }
return path.includes(this.$route.name); return path.includes(this.$route.name);
}, },
paddingBottom() { 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> </script>
<style lang="scss"> <style lang="scss">
@import '~@/assets/css/reset.css'; @import "~@/assets/css/reset.css";
@import '//at.alicdn.com/t/font_2897403_8d7w3rodyu2.css'; @import "//at.alicdn.com/t/font_2897403_8d7w3rodyu2.css";
.app-safe-area { .app-safe-area {
position: relative; position: relative;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
@@ -118,17 +124,17 @@ export default {
} }
} }
.loadmore { .loadmore {
font-size: .4rem; font-size: 0.4rem;
text-align: center; text-align: center;
color: #888; color: #888;
padding: .4rem 0; padding: 0.4rem 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.icon { .icon {
width: .6rem; width: 0.6rem;
vertical-align: middle; vertical-align: middle;
margin-right: .2rem; margin-right: 0.2rem;
animation: loading 3s linear infinite; animation: loading 3s linear infinite;
} }
} }
@@ -136,23 +142,23 @@ export default {
.icon-home { .icon-home {
width: 1.1rem; width: 1.1rem;
height: 1.1rem; height: 1.1rem;
font-size: .5rem; font-size: 0.5rem;
background: white; background: white;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 1rem; border-radius: 1rem;
position: absolute; position: absolute;
left: .4rem; left: 0.4rem;
top: .4rem; top: 0.4rem;
&:active { &:active {
background: #f1f1f1; background: #f1f1f1;
} }
} }
.no-more { .no-more {
font-size: .4rem; font-size: 0.4rem;
text-align: center; text-align: center;
color: #888; color: #888;
padding: .4rem 0; padding: 0.4rem 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -161,7 +167,7 @@ export default {
.read-more { .read-more {
height: 1.3rem; height: 1.3rem;
text-align: center; text-align: center;
font-size: .4rem; font-size: 0.4rem;
line-height: 1.3rem; line-height: 1.3rem;
color: #888; color: #888;
} }
+17 -3
View File
@@ -1,4 +1,4 @@
@import './variable.scss'; @import 'variable.scss';
.divider { .divider {
height: .24rem; height: .24rem;
@@ -12,6 +12,7 @@ display: -webkit-box;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.text-multiple-2 { .text-multiple-2 {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -22,6 +23,7 @@ display: -webkit-box;
.panel { .panel {
padding-bottom: .4rem; padding-bottom: .4rem;
.panel-head { .panel-head {
//padding: .53rem .4rem; //padding: .53rem .4rem;
padding: .3rem .4rem; padding: .3rem .4rem;
@@ -51,10 +53,12 @@ display: -webkit-box;
} }
} }
} }
.process-more { .process-more {
line-height: 1.17rem; line-height: 1.17rem;
text-align: center; text-align: center;
font-size: .37rem; font-size: .37rem;
.iconfont { .iconfont {
vertical-align: middle; vertical-align: middle;
} }
@@ -62,6 +66,7 @@ display: -webkit-box;
.border-bottom { .border-bottom {
position: relative; position: relative;
&::after { &::after {
content: ''; content: '';
height: 1px; height: 1px;
@@ -75,8 +80,10 @@ display: -webkit-box;
left: 0; left: 0;
} }
} }
.border-top { .border-top {
position: relative; position: relative;
&::before { &::before {
content: ''; content: '';
height: 1px; height: 1px;
@@ -90,8 +97,10 @@ display: -webkit-box;
left: 0; left: 0;
} }
} }
.border-circle { .border-circle {
position: relative; position: relative;
&::before { &::before {
content: ''; content: '';
height: 199%; height: 199%;
@@ -110,9 +119,12 @@ display: -webkit-box;
.active { .active {
&::before { &::before {
border-color: $primary-color; border-color: #CF9E3B;
;
} }
color: $primary-color;
color: #CF9E3B;
;
} }
.multiple-line-3 { .multiple-line-3 {
@@ -121,6 +133,7 @@ display: -webkit-box;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.no-more { .no-more {
height: 1rem; height: 1rem;
line-height: 1rem; line-height: 1rem;
@@ -128,6 +141,7 @@ display: -webkit-box;
color: #666; color: #666;
text-align: center; text-align: center;
} }
button:disabled { button:disabled {
background: #e1e1e1 !important; background: #e1e1e1 !important;
border-color: #e1e1e1 !important; border-color: #e1e1e1 !important;
-1
View File
@@ -1,2 +1 @@
$primary-color: #CF9E3B;
$btn-border-radius: .07rem; $btn-border-radius: .07rem;
+15 -15
View File
@@ -27,10 +27,10 @@
</template> </template>
<script> <script>
import { toggleCollect } from '@/api'; import { toggleCollect } from "@/api";
export default { export default {
name: 'buddha-process', name: "buddha-process",
props: { props: {
data: { data: {
required: true, required: true,
@@ -38,7 +38,7 @@ export default {
showGoodsBtn: { showGoodsBtn: {
type: Boolean, type: Boolean,
default: true, default: true,
} },
}, },
watch: { watch: {
data: { data: {
@@ -57,7 +57,7 @@ export default {
covers: { covers: {
get() { get() {
const type = Object.prototype.toString.call(this.privateData.covers); 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() { async onCollect() {
await toggleCollect(this.data.id); await toggleCollect(this.data.id);
this.privateData.is_collected = this.privateData.is_collected === 1 ? 0 : 1; this.privateData.is_collected = this.privateData.is_collected === 1 ? 0 : 1;
this.$emit('collection', this.data.id); this.$emit("collection", this.data.id);
}, },
onProcessDetail() { onProcessDetail() {
const { id } = this.privateData; const { id } = this.privateData;
this.$router.push({ this.$router.push({
name: 'buddha-detail', name: "buddha-detail",
query: { id } query: { id },
}) });
}, },
onGoodsDetail() { onGoodsDetail() {
const { goods_type, goods_id, temple_id, spec_ids } = this.privateData; 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> </script>
@@ -94,7 +94,7 @@ export default {
position: relative; position: relative;
padding: 0 0.4rem; padding: 0 0.4rem;
&::after { &::after {
content: ''; content: "";
height: 1px; height: 1px;
width: 200%; width: 200%;
background: #ededed; background: #ededed;
@@ -132,8 +132,8 @@ export default {
@extend .text-multiple-3; @extend .text-multiple-3;
} }
.detail-text { .detail-text {
font-size: .4rem; font-size: 0.4rem;
padding-top: .2rem; padding-top: 0.2rem;
color: #b74100; color: #b74100;
} }
.image-group { .image-group {
@@ -180,7 +180,7 @@ export default {
align-items: center; align-items: center;
.iconfont { .iconfont {
color: $primary-color; color: #cf9e3b;
vertical-align: middle; vertical-align: middle;
font-size: 0.4rem; font-size: 0.4rem;
margin-top: -3px; margin-top: -3px;
@@ -195,7 +195,7 @@ export default {
} }
.collect { .collect {
.iconfont { .iconfont {
color: $primary-color; color: #cf9e3b;
} }
} }
.un-collect { .un-collect {
@@ -1,6 +1,6 @@
<template> <template>
<div class="detail-content-expand"> <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"> <div ref="content" class="ref-content">
<slot></slot> <slot></slot>
</div> </div>
@@ -41,7 +41,8 @@ export default {
mounted() { mounted() {
this.wrapperHeight = this.$refs.wrapper.offsetHeight; this.wrapperHeight = this.$refs.wrapper.offsetHeight;
this.$nextTick(() => { 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.wrapperContainerHeight = this.wrapperHeight;
this.refresh(); this.refresh();
}); });
+62 -65
View File
@@ -1,6 +1,5 @@
<template> <template>
<van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom <van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom style="min-height: 50vh">
style="min-height: 50vh">
<div class="add-merit-name"> <div class="add-merit-name">
<h3 class="title">心愿</h3> <h3 class="title">心愿</h3>
<div class="desire-input"> <div class="desire-input">
@@ -22,57 +21,57 @@
</template> </template>
<script> <script>
import { getDreamList } from '@/api'; import { getDreamList } from "@/api";
export default { export default {
name: 'merit-desire', name: "merit-desire",
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
mode: { mode: {
type: String, type: String,
default: 'increment', // increment | single default: "increment", // increment | single
}, },
selected: { selected: {
type: Array, type: Array,
default() { default() {
return [] return [];
} },
}, },
maxLength: { maxLength: {
type: Number, type: Number,
default: 50 default: 50,
} },
}, },
data() { data() {
return { return {
name: '', name: "",
desire: '', desire: "",
dreamList: [] dreamList: [],
}; };
}, },
watch: { watch: {
visible(value) { visible(value) {
if (value) { if (value) {
this.selectedName = this.selected.map(v => v.id) this.selectedName = this.selected.map((v) => v.id);
}
} }
}, },
},
created() { created() {
this.getDreamList(); this.getDreamList();
}, },
methods: { methods: {
onFill(dream) { onFill(dream) {
if(this.mode === 'single'){ if (this.mode === "single") {
return this.desire = dream; return (this.desire = dream);
} }
this.desire += dream + ','; this.desire += dream + ",";
this.desire = this.desire.slice(0, this.maxLength) this.desire = this.desire.slice(0, this.maxLength);
}, },
onClose() { onClose() {
this.$emit('update:visible', false); this.$emit("update:visible", false);
}, },
//获取心愿列表 //获取心愿列表
async getDreamList() { async getDreamList() {
@@ -82,20 +81,20 @@ export default {
onConfirmDream() { onConfirmDream() {
this.showDialog = false; this.showDialog = false;
this.dream = this.desire; this.dream = this.desire;
this.$emit('update:visible', false); this.$emit("update:visible", false);
this.$emit('change', this.dream) this.$emit("change", this.dream);
},
}, },
}
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.add-merit-name { .add-merit-name {
padding: .4rem; padding: 0.4rem;
.title { .title {
font-size: .4rem; font-size: 0.4rem;
margin-bottom: .4rem; margin-bottom: 0.4rem;
} }
.add-name { .add-name {
@@ -103,49 +102,49 @@ export default {
.input { .input {
flex: 1; flex: 1;
height: .8rem; height: 0.8rem;
line-height: .8rem; line-height: 0.8rem;
padding-left: .3rem; padding-left: 0.3rem;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: .11rem; border-radius: 0.11rem;
font-size: .4rem; font-size: 0.4rem;
} }
.btn { .btn {
padding: .2rem .6rem; padding: 0.2rem 0.6rem;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
font-size: .4rem; font-size: 0.4rem;
border-radius: .11rem; border-radius: 0.11rem;
margin-left: .3rem; margin-left: 0.3rem;
} }
} }
.name-group { .name-group {
padding: .5rem 0; padding: 0.5rem 0;
height: 30vh; height: 30vh;
span { span {
display: inline-block; display: inline-block;
padding: .2rem .3rem; padding: 0.2rem 0.3rem;
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: .08rem; border-radius: 0.08rem;
position: relative; position: relative;
margin-right: .2rem; margin-right: 0.2rem;
margin-bottom: .2rem; margin-bottom: 0.2rem;
font-size: .35rem; font-size: 0.35rem;
position: relative; position: relative;
vertical-align: top; vertical-align: top;
.iconfont { .iconfont {
position: absolute; position: absolute;
right: -.25rem; right: -0.25rem;
top: -.25rem; top: -0.25rem;
font-size: .5rem; font-size: 0.5rem;
color: red; color: red;
} }
input[type=checkbox]{ input[type="checkbox"] {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
@@ -154,24 +153,23 @@ export default {
opacity: 0; opacity: 0;
} }
&.selected { &.selected {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
} }
} }
} }
.desire-input { .desire-input {
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: .13rem; border-radius: 0.13rem;
overflow: hidden; overflow: hidden;
.desire-textarea { .desire-textarea {
border: none; border: none;
display: block; display: block;
font-size: .35rem; font-size: 0.35rem;
width: calc(100% - .5rem); width: calc(100% - 0.5rem);
padding: .25rem; padding: 0.25rem;
height: 2rem; height: 2rem;
resize: none; resize: none;
line-height: 1.4; line-height: 1.4;
@@ -180,8 +178,8 @@ export default {
span { span {
display: block; display: block;
text-align: right; text-align: right;
padding: .2rem; padding: 0.2rem;
font-size: .35rem; font-size: 0.35rem;
} }
} }
@@ -192,34 +190,33 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: .4rem; font-size: 0.4rem;
margin-bottom: .3rem; margin-bottom: 0.3rem;
.update { .update {
font-size: .35rem; font-size: 0.35rem;
color: $primary-color; color: #cf9e3b;
} }
} }
.name-group { .name-group {
padding: .1rem 0; padding: 0.1rem 0;
.name { .name {
} }
} }
} }
.confirm { .confirm {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
width: 100%; width: 100%;
padding: .3rem 0; padding: 0.3rem 0;
border-radius: 1rem; border-radius: 1rem;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
font-size: .4rem; font-size: 0.4rem;
} }
} }
</style> </style>
+23 -23
View File
@@ -1,6 +1,6 @@
<template> <template>
<div class="merit-goods" @click="onJoin"> <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"> <div class="info">
<h3 class="title">{{ data.title }}</h3> <h3 class="title">{{ data.title }}</h3>
<div class="bar"> <div class="bar">
@@ -13,33 +13,33 @@
<script> <script>
export default { export default {
name: 'merit-goods', name: "merit-goods",
props: ['data'], props: ["data"],
methods: { methods: {
onJoin() { onJoin() {
this.$router.push({ this.$router.push({
name: 'goods-detail', name: "goods-detail",
query: { query: {
goods_id: this.data.id, goods_id: this.data.id,
temple_id: this.data.temple_id temple_id: this.data.temple_id,
} },
}) });
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.merit-goods { .merit-goods {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: .4rem; padding: 0.4rem;
border-bottom: .01rem solid #f2f2f2; border-bottom: 0.01rem solid #f2f2f2;
.goods { .goods {
width: 2.93rem; width: 2.93rem;
height: 2.93rem; height: 2.93rem;
margin-right: .4rem; margin-right: 0.4rem;
border-radius: .11rem; border-radius: 0.11rem;
} }
.info { .info {
flex: 1; flex: 1;
@@ -47,7 +47,7 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.title { .title {
font-size: .4rem; font-size: 0.4rem;
line-height: 1.3; line-height: 1.3;
} }
.bar { .bar {
@@ -55,18 +55,18 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.join-number { .join-number {
font-size: .35rem; font-size: 0.35rem;
color: #666; color: #666;
} }
.join { .join {
height: .67rem; height: 0.67rem;
padding: 0 .4rem; padding: 0 0.4rem;
background: #CF9E3B; background: #cf9e3b;
border: .01rem solid #CF9E3B; border: 0.01rem solid #cf9e3b;
color: white; color: white;
border-radius: .05rem; border-radius: 0.05rem;
font-size: .37rem; font-size: 0.37rem;
line-height: .67rem; line-height: 0.67rem;
} }
} }
} }
+60 -63
View File
@@ -1,16 +1,15 @@
<template> <template>
<van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom <van-popup :value.sync="visible" position="bottom" @close="onClose" @click-overlay="onClose" safe-area-inset-bottom style="min-height: 50vh">
style="min-height: 50vh">
<div class="add-merit-name"> <div class="add-merit-name">
<h3 class="title">功德芳名</h3> <h3 class="title">功德芳名</h3>
<div class="add-name"> <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> <button class="btn" @click="addName">添加</button>
</div> </div>
<div class="name-group"> <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)"> <span class="name" :class="[selectedName.includes(name.id) && 'selected']" v-for="(name, index) in names" :key="name.id" @click="onSelectName(name)">
{{ name.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> <i class="iconfont icon-biaodankongjianshanchu" @click.stop="onDeleteName(name, index)"></i>
</span> </span>
</div> </div>
@@ -20,26 +19,26 @@
</template> </template>
<script> <script>
import { deleteMeritName, getMeritName, postMeritName } from '@/api'; import { deleteMeritName, getMeritName, postMeritName } from "@/api";
export default { export default {
name: 'merit-name', name: "merit-name",
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
selected: { selected: {
type: Array, type: Array,
default() { default() {
return [] return [];
} },
}, },
}, },
data() { data() {
return { return {
loading: false, loading: false,
name: '', name: "",
names: [], names: [],
selectedName: [], selectedName: [],
}; };
@@ -47,16 +46,16 @@ export default {
watch: { watch: {
visible(value) { visible(value) {
if (value) { if (value) {
this.selectedName = this.selected.map(v => v.id) this.selectedName = this.selected.map((v) => v.id);
}
} }
}, },
},
created() { created() {
this.getName(); this.getName();
}, },
methods: { methods: {
onClose() { onClose() {
this.$emit('update:visible', false); this.$emit("update:visible", false);
}, },
onSelectName(name) { onSelectName(name) {
this.person = name; this.person = name;
@@ -65,7 +64,7 @@ export default {
async addName() { async addName() {
if (!this.name) return; if (!this.name) return;
await postMeritName(this.name); await postMeritName(this.name);
this.name = ''; this.name = "";
await this.getName(); await this.getName();
}, },
async onDeleteName(name) { async onDeleteName(name) {
@@ -80,26 +79,26 @@ export default {
if (this.name) { if (this.name) {
const name = this.name; const name = this.name;
await this.addName(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.onClose();
this.$emit('change', selected); this.$emit("change", selected);
return; 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.onClose();
this.$emit('change', selected); this.$emit("change", selected);
} },
} },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.add-merit-name { .add-merit-name {
padding: .4rem; padding: 0.4rem;
.title { .title {
font-size: .4rem; font-size: 0.4rem;
margin-bottom: .4rem; margin-bottom: 0.4rem;
} }
.add-name { .add-name {
@@ -107,50 +106,50 @@ export default {
.input { .input {
flex: 1; flex: 1;
height: .8rem; height: 0.8rem;
line-height: .8rem; line-height: 0.8rem;
padding-left: .3rem; padding-left: 0.3rem;
font-size: .35rem; font-size: 0.35rem;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: .11rem; border-radius: 0.11rem;
font-size: .4rem; font-size: 0.4rem;
} }
.btn { .btn {
padding: .2rem .6rem; padding: 0.2rem 0.6rem;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
font-size: .4rem; font-size: 0.4rem;
border-radius: .11rem; border-radius: 0.11rem;
margin-left: .3rem; margin-left: 0.3rem;
} }
} }
.name-group { .name-group {
padding: .5rem 0; padding: 0.5rem 0;
height: 30vh; height: 30vh;
span { span {
display: inline-block; display: inline-block;
padding: .3rem .6rem; padding: 0.3rem 0.6rem;
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: .08rem; border-radius: 0.08rem;
position: relative; position: relative;
margin-right: .2rem; margin-right: 0.2rem;
margin-bottom: .2rem; margin-bottom: 0.2rem;
font-size: .4rem; font-size: 0.4rem;
position: relative; position: relative;
vertical-align: top; vertical-align: top;
.iconfont { .iconfont {
position: absolute; position: absolute;
right: -.25rem; right: -0.25rem;
top: -.25rem; top: -0.25rem;
font-size: .7rem; font-size: 0.7rem;
color: red; color: red;
} }
input[type=checkbox]{ input[type="checkbox"] {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
@@ -159,24 +158,23 @@ export default {
opacity: 0; opacity: 0;
} }
&.selected { &.selected {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
} }
} }
} }
.desire-input { .desire-input {
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: .13rem; border-radius: 0.13rem;
overflow: hidden; overflow: hidden;
.desire-textarea { .desire-textarea {
border: none; border: none;
display: block; display: block;
font-size: .35rem; font-size: 0.35rem;
width: calc(100% - .5rem); width: calc(100% - 0.5rem);
padding: .25rem; padding: 0.25rem;
height: 2rem; height: 2rem;
resize: none; resize: none;
} }
@@ -184,8 +182,8 @@ export default {
span { span {
display: block; display: block;
text-align: right; text-align: right;
padding: .2rem; padding: 0.2rem;
font-size: .35rem; font-size: 0.35rem;
} }
} }
@@ -196,34 +194,33 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: .4rem; font-size: 0.4rem;
margin-bottom: .3rem; margin-bottom: 0.3rem;
.update { .update {
font-size: .35rem; font-size: 0.35rem;
color: $primary-color; color: #cf9e3b;
} }
} }
.name-group { .name-group {
padding: .1rem 0; padding: 0.1rem 0;
.name { .name {
} }
} }
} }
.confirm { .confirm {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
width: 100%; width: 100%;
padding: .3rem 0; padding: 0.3rem 0;
border-radius: 1rem; border-radius: 1rem;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
font-size: .4rem; font-size: 0.4rem;
} }
} }
</style> </style>
+50 -51
View File
@@ -1,22 +1,22 @@
<template> <template>
<van-popup v-model="value" position="bottom" @close="$emit('update:value', false)"> <van-popup v-model="value" position="bottom" @close="$emit('update:value', false)">
<div class="red-packet" v-if="user"> <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-container">
<div class="username" v-if="!edit" @click="onEdit"> <div class="username" v-if="!edit" @click="onEdit">
<span>{{ user.nickname }}</span> <span>{{ user.nickname }}</span>
<i class="iconfont icon-bianjisekuai"></i> <i class="iconfont icon-bianjisekuai"></i>
</div> </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> </div>
<vue-number-scroll v-model="number"></vue-number-scroll> <vue-number-scroll v-model="number"></vue-number-scroll>
<div class="money-input"> <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> <span>元</span>
</div> </div>
<!-- <div class="bar"> <!-- <div class="bar">
<span> <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>查看服务协议</span> <span>查看服务协议</span>
</div> --> </div> -->
@@ -29,54 +29,53 @@
</template> </template>
<script> <script>
import { getRandMoney, getUserData } from '@/api'; import { getRandMoney, getUserData } from "@/api";
import VueNumberScroll from '../vue-number-scroll' import VueNumberScroll from "../vue-number-scroll";
export default { export default {
name: 'random-money', name: "random-money",
components: { components: {
VueNumberScroll VueNumberScroll,
}, },
data() { data() {
return { return {
avatar: require('@/assets/img/xiaoheshang.jpg'), avatar: require("@/assets/img/xiaoheshang.jpg"),
edit: false, edit: false,
anonymous: false, anonymous: false,
numberArr: ['3', '.', '9','9'], numberArr: ["3", ".", "9", "9"],
number: 0, number: 0,
money: 0, money: 0,
user: null, user: null,
privateUser: null, privateUser: null,
inputNickname: '', inputNickname: "",
randList: [], randList: [],
} };
}, },
props: { props: {
value: { value: {
type: Boolean, type: Boolean,
default: false, default: false,
} },
}, },
mounted() { mounted() {
this.getRandMoney() this.getRandMoney();
this.getUserData(); this.getUserData();
}, },
methods: { methods: {
onAnonymous(checked) { onAnonymous(checked) {
this.anonymous = checked; this.anonymous = checked;
if (checked) { if (checked) {
this.user.nickname = '匿名用户' this.user.nickname = "匿名用户";
} else { } else {
this.user.nickname = this.privateUser.nickname this.user.nickname = this.privateUser.nickname;
} }
}, },
onEdit() { onEdit() {
this.edit = true; this.edit = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.input.focus(); this.$refs.input.focus();
}) });
}, },
async getUserData() { async getUserData() {
const res = await getUserData(); const res = await getUserData();
@@ -85,34 +84,34 @@ export default {
this.inputNickname = res.nickname; this.inputNickname = res.nickname;
}, },
onMoneyInput(e) { onMoneyInput(e) {
this.number = e.target.value this.number = e.target.value;
}, },
changeMoney() { changeMoney() {
const rand = Math.floor(Math.random() * this.randList.length); 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; this.money = this.number;
}, },
async getRandMoney() { async getRandMoney() {
const res = await getRandMoney(); const res = await getRandMoney();
this.randList = res; this.randList = res;
this.money = Number(res[0]) this.money = Number(res[0]);
this.number = Number(res[0]) this.number = Number(res[0]);
}, },
onNext() { onNext() {
this.$emit('change', { this.$emit("change", {
anonymous: this.anonymous, anonymous: this.anonymous,
money: this.number money: this.number,
}) });
this.$emit('update:value', false) this.$emit("update:value", false);
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.red-packet { .red-packet {
min-height: 60vh; 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; background-size: contain;
overflow: hidden; overflow: hidden;
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
@@ -123,30 +122,30 @@ export default {
display: block; display: block;
border-radius: 1.5rem; border-radius: 1.5rem;
border: 2px solid yellow; border: 2px solid yellow;
margin: 2rem auto .1rem; margin: 2rem auto 0.1rem;
} }
.username-container { .username-container {
padding-top: .3rem; padding-top: 0.3rem;
height: 1rem; height: 1rem;
.username { .username {
color: white; color: white;
font-size: .4rem; font-size: 0.4rem;
text-align: center; text-align: center;
margin-top: .3rem; margin-top: 0.3rem;
span { span {
padding-right: .1rem; padding-right: 0.1rem;
} }
} }
.input-username { .input-username {
border: 1px solid yellow; border: 1px solid yellow;
font-size: .4rem; font-size: 0.4rem;
background: transparent; background: transparent;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
display: block; display: block;
height: 1rem; height: 1rem;
color: white; color: white;
padding: .1rem .3rem; padding: 0.1rem 0.3rem;
border-radius: 4px; border-radius: 4px;
} }
} }
@@ -158,8 +157,8 @@ export default {
line-height: 1rem; line-height: 1rem;
font-size: 1rem; font-size: 1rem;
overflow: hidden; overflow: hidden;
margin-top: .6rem; margin-top: 0.6rem;
margin-bottom: .8rem; margin-bottom: 0.8rem;
ul { ul {
li { li {
display: inline-block; display: inline-block;
@@ -169,10 +168,10 @@ export default {
.bar { .bar {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: .4rem; font-size: 0.4rem;
color: white; color: white;
padding: .3rem .6rem; padding: 0.3rem 0.6rem;
margin-top: .6rem; margin-top: 0.6rem;
} }
.money-input { .money-input {
border: 1px solid yellow; border: 1px solid yellow;
@@ -189,13 +188,13 @@ export default {
border: 1px solid transparent; border: 1px solid transparent;
flex: 1; flex: 1;
height: 100%; height: 100%;
padding-left: .5rem; padding-left: 0.5rem;
font-size: .5rem; font-size: 0.5rem;
width: 50%; width: 50%;
} }
span { span {
padding: 0 .2rem; padding: 0 0.2rem;
font-size: .5rem; font-size: 0.5rem;
} }
} }
.van-checkbox__label { .van-checkbox__label {
@@ -203,14 +202,14 @@ export default {
} }
.random-button-group { .random-button-group {
text-align: center; text-align: center;
font-size: .5rem; font-size: 0.5rem;
margin-top: .7rem; margin-top: 0.7rem;
display: flex; display: flex;
padding: 0 .4rem; padding: 0 0.4rem;
margin-bottom: .5rem; margin-bottom: 0.5rem;
button { button {
background: transparent; background: transparent;
margin: 0 .2rem; margin: 0 0.2rem;
height: 1.3rem; height: 1.3rem;
border: 1px solid transparent; border: 1px solid transparent;
color: white; color: white;
@@ -225,7 +224,7 @@ export default {
background: yellow; background: yellow;
color: rgb(224, 61, 61); color: rgb(224, 61, 61);
border-radius: 4px; border-radius: 4px;
flex: 2 flex: 2;
} }
} }
} }
+40 -40
View File
@@ -22,7 +22,7 @@
font-family: inherit; font-family: inherit;
border: 0; border: 0;
outline: 0; outline: 0;
border-bottom: 2px solid $primary-color; border-bottom: 2px solid #cf9e3b;
height: 60px; height: 60px;
width: 60px; width: 60px;
font-size: 1rem; font-size: 1rem;
@@ -48,13 +48,13 @@ export default {
pasteResult: [], pasteResult: [],
}; };
}, },
props: ['code'], props: ["code"],
computed: { computed: {
input() { input() {
if (this.code && Array.isArray(this.code) && this.code.length === this.codeCount) { if (this.code && Array.isArray(this.code) && this.code.length === this.codeCount) {
return this.code; return this.code;
} else if (/^\d{this.codeCount}$/.test(this.code.toString())) { } 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) { } else if (this.pasteResult.length === this.codeCount) {
return this.pasteResult; return this.pasteResult;
} else { } else {
@@ -68,7 +68,7 @@ export default {
} else { } else {
return false; return false;
} }
} },
}, },
methods: { methods: {
// 解决一个输入框输入多个字符 // 解决一个输入框输入多个字符
@@ -76,48 +76,48 @@ export default {
var index = e.target.dataset.index * 1; var index = e.target.dataset.index * 1;
var el = e.target; var el = e.target;
// el.value = el.value.replace(/Digit|Numpad/i, '').replace(/1/g, '').slice(0, 1); // 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) { keydown(e) {
var index = e.target.dataset.index * 1; var index = e.target.dataset.index * 1;
var el = e.target; var el = e.target;
if (e.key === 'Backspace') { if (e.key === "Backspace") {
if (this.input[index].length > 0) { if (this.input[index].length > 0) {
this.$set(this.input, index, '') this.$set(this.input, index, "");
} else { } else {
if (el.previousElementSibling) { if (el.previousElementSibling) {
el.previousElementSibling.focus() el.previousElementSibling.focus();
this.$set(this.input, index - 1, '') this.$set(this.input, index - 1, "");
} }
} }
} else if (e.key === 'Delete') { } else if (e.key === "Delete") {
if (this.input[index].length > 0) { if (this.input[index].length > 0) {
this.$set(this.input, index, '') this.$set(this.input, index, "");
} else { } else {
if (el.nextElementSibling) { if (el.nextElementSibling) {
this.$set(this.input, index = 1, '') this.$set(this.input, (index = 1), "");
} }
} }
if (el.nextElementSibling) { if (el.nextElementSibling) {
el.nextElementSibling.focus() el.nextElementSibling.focus();
} }
} else if (e.key === 'Home') { } else if (e.key === "Home") {
el.parentElement.children[0] && el.parentElement.children[0].focus() el.parentElement.children[0] && el.parentElement.children[0].focus();
} else if (e.key === 'End') { } else if (e.key === "End") {
el.parentElement.children[this.input.length - 1] && el.parentElement.children[this.input.length - 1].focus() el.parentElement.children[this.input.length - 1] && el.parentElement.children[this.input.length - 1].focus();
} else if (e.key === 'ArrowLeft') { } else if (e.key === "ArrowLeft") {
if (el.previousElementSibling) { if (el.previousElementSibling) {
el.previousElementSibling.focus() el.previousElementSibling.focus();
} }
} else if (e.key === 'ArrowRight') { } else if (e.key === "ArrowRight") {
if (el.nextElementSibling) { 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) { if (this.input[index] * 1 < 9) {
this.$set(this.input, index, (this.input[index] * 1 + 1).toString()); 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) { if (this.input[index] * 1 > 0) {
this.$set(this.input, index, (this.input[index] * 1 - 1).toString()); this.$set(this.input, index, (this.input[index] * 1 - 1).toString());
} }
@@ -129,20 +129,20 @@ export default {
// 解决输入e的问题 // 解决输入e的问题
var reg = /Digit|Numpad/i; var reg = /Digit|Numpad/i;
this.eventObj = JSON.stringify(e); 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) { if (reg.test(e) || this.is_weixn) {
// 必须在这里符直,否则输入框会是空值 // 必须在这里符直,否则输入框会是空值
this.$set(this.input, index, el.value); this.$set(this.input, index, el.value);
el.nextElementSibling && el.nextElementSibling.focus(); el.nextElementSibling && el.nextElementSibling.focus();
if (index === this.codeCount - 1) { if (index === this.codeCount - 1) {
if (this.input.join('').length === this.codeCount) { if (this.input.join("").length === this.codeCount) {
document.activeElement.blur(); document.activeElement.blur();
this.$emit('complete', this.input); this.$emit("complete", this.input);
} }
} }
} else { } else {
if (this.input[index] === '') { if (this.input[index] === "") {
this.$set(this.input, index, ''); this.$set(this.input, index, "");
} }
} }
}, },
@@ -156,33 +156,33 @@ export default {
if (this.input[index] * 1 > 0) { if (this.input[index] * 1 > 0) {
this.$set(this.input, index, (this.input[index] * 1 - 1).toString()); this.$set(this.input, index, (this.input[index] * 1 - 1).toString());
} }
} else if (e.key === 'Enter') { } else if (e.key === "Enter") {
if (this.input.join('').length === this.codeCount) { if (this.input.join("").length === this.codeCount) {
document.activeElement.blur(); document.activeElement.blur();
this.$emit('complete', this.input); this.$emit("complete", this.input);
} }
} }
}, },
paste(e) { paste(e) {
// 当进行粘贴时 // 当进行粘贴时
e.clipboardData.items[0].getAsString(str => { e.clipboardData.items[0].getAsString((str) => {
if (str.toString().length === this.codeCount) { if (str.toString().length === this.codeCount) {
this.pasteResult = str.split(''); this.pasteResult = str.split("");
document.activeElement.blur(); document.activeElement.blur();
this.$emit('complete', this.input); this.$emit("complete", this.input);
this.pasteResult = []; this.pasteResult = [];
} else { } else {
// 如果粘贴内容不合规,清除所有内容 // 如果粘贴内容不合规,清除所有内容
this.input[0] = new Array(6) this.input[0] = new Array(6);
}
})
} }
});
},
}, },
mounted() { mounted() {
// 等待dom渲染完成,在执行focus,否则无法获取到焦点 // 等待dom渲染完成,在执行focus,否则无法获取到焦点
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.firstinput.focus() this.$refs.firstinput.focus();
}) });
}, },
} };
</script> </script>
+13 -11
View File
@@ -1,9 +1,6 @@
<template> <template>
<div class="user-merit border-bottom" v-if="data"> <div class="user-merit border-bottom" v-if="data">
<img <img :src="avatar" alt="" />
:src="data.avatar || data.user_info.avatar"
alt=""
/>
<div class="profile"> <div class="profile">
<div> <div>
<div class="name"> <div class="name">
@@ -23,14 +20,19 @@
<script> <script>
export default { export default {
name: "user-merit", name: "user-merit",
props: ['data'] props: ["data"],
data() {
return {
avatar: "/touxiang.png",
};
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.user-merit { .user-merit {
display: flex; display: flex;
padding: .27rem 0.4rem; padding: 0.27rem 0.4rem;
img { img {
width: 1.17rem; width: 1.17rem;
height: 1.17rem; height: 1.17rem;
@@ -39,17 +41,17 @@ export default {
} }
.profile { .profile {
flex: 1; flex: 1;
padding-top: .13rem; padding-top: 0.13rem;
.name { .name {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
margin-bottom: .27rem; margin-bottom: 0.27rem;
span:first-child { span:first-child {
font-size: 0.4rem; font-size: 0.4rem;
color: #222; color: #222;
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
margin-right: .4rem; margin-right: 0.4rem;
line-height: 1.3; line-height: 1.3;
} }
span:last-child { span:last-child {
@@ -72,11 +74,11 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
padding: .13rem 0; padding: 0.13rem 0;
text-align: right; text-align: right;
.money { .money {
font-size: 0.37rem; font-size: 0.37rem;
color: $primary-color; color: #cf9e3b;
font-weight: bold; font-weight: bold;
} }
.date { .date {
+20 -20
View File
@@ -31,17 +31,17 @@
</template> </template>
<script> <script>
import { getDynamicDetail, toggleCollect } from '@/api'; import { getDynamicDetail, toggleCollect } from "@/api";
export default { export default {
name: 'buddha-detail', name: "buddha-detail",
data() { data() {
return { return {
data: null, data: null,
showShare: false, showShare: false,
options: [ options: [
{ name: '微信', icon: 'wechat' }, { name: "微信", icon: "wechat" },
{ name: '朋友圈', icon: 'wechat-moments' }, { name: "朋友圈", icon: "wechat-moments" },
], ],
}; };
}, },
@@ -49,7 +49,7 @@ export default {
covers: { covers: {
get() { get() {
const type = Object.prototype.toString.call(this.data.covers); 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({ this.wechatReady({
...data.shareConfig, ...data.shareConfig,
link: location.href + '&jumpUrl=https://baidu.com', link: location.href + "&jumpUrl=https://baidu.com",
}) });
}, },
async onCollect() { async onCollect() {
@@ -77,8 +77,8 @@ export default {
}, },
onGoodsDetail() { onGoodsDetail() {
const { goods_type, goods_id, temple_id } = this.data; 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> </script>
@@ -87,10 +87,10 @@ export default {
.process-detail-wrapper { .process-detail-wrapper {
display: flex; display: flex;
position: relative; 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; margin-bottom: 1rem;
&::after { &::after {
content: ''; content: "";
height: 1px; height: 1px;
width: 200%; width: 200%;
background: #ededed; background: #ededed;
@@ -111,8 +111,8 @@ export default {
font-size: 0.35rem; font-size: 0.35rem;
color: #666666; color: #666666;
display: block; display: block;
margin-bottom: .3rem; margin-bottom: 0.3rem;
padding: .1rem 0; padding: 0.1rem 0;
} }
.title { .title {
font-size: 0.43rem; font-size: 0.43rem;
@@ -127,8 +127,8 @@ export default {
text-align: justify; text-align: justify;
} }
.detail-text { .detail-text {
font-size: .4rem; font-size: 0.4rem;
padding-top: .2rem; padding-top: 0.2rem;
color: #b74100; color: #b74100;
} }
.image-group { .image-group {
@@ -145,15 +145,15 @@ export default {
} }
} }
.process-content { .process-content {
font-size: .4rem; font-size: 0.4rem;
img { img {
max-width: 100%; max-width: 100%;
} }
p { p {
margin: .3rem 0; margin: 0.3rem 0;
line-height: 1.4; line-height: 1.4;
color: #5a5a5a; color: #5a5a5a;
font-size: .37rem; font-size: 0.37rem;
letter-spacing: 1px; letter-spacing: 1px;
} }
& * { & * {
@@ -190,7 +190,7 @@ export default {
align-items: center; align-items: center;
.iconfont { .iconfont {
color: $primary-color; color: #cf9e3b;
vertical-align: middle; vertical-align: middle;
font-size: 0.4rem; font-size: 0.4rem;
margin-top: -3px; margin-top: -3px;
@@ -205,7 +205,7 @@ export default {
} }
.collect { .collect {
.iconfont { .iconfont {
color: $primary-color; color: #cf9e3b;
} }
} }
.un-collect { .un-collect {
+9 -9
View File
@@ -78,7 +78,7 @@
<p class="label">自动行善</p> <p class="label">自动行善</p>
<div class="donate"> <div class="donate">
<span>每天早上六点寺院联盟帮你自动行善一次</span> <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> </div>
<div class="auto-donate-time" v-if="is_auto"> <div class="auto-donate-time" v-if="is_auto">
@@ -116,7 +116,7 @@
<p class="label">每日填砖</p> <p class="label">每日填砖</p>
<div class="donate"> <div class="donate">
<span>每天早上六点寺院联盟帮你自动填砖一次</span> <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> </div>
<div class="auto-donate-time" v-if="is_auto"> <div class="auto-donate-time" v-if="is_auto">
@@ -457,7 +457,7 @@ export default {
user-select: none; user-select: none;
color: #666; color: #666;
&:active { &:active {
background: rgba($primary-color, 0.1); background: rgba(#cf9e3b, 0.1);
} }
} }
span.spec-disabled { span.spec-disabled {
@@ -480,7 +480,7 @@ export default {
align-items: center; align-items: center;
} }
span.active { span.active {
color: $primary-color; color: #cf9e3b;
} }
} }
.auto-donate { .auto-donate {
@@ -537,7 +537,7 @@ export default {
.total { .total {
font-size: 0.4rem; font-size: 0.4rem;
em { em {
color: $primary-color; color: #cf9e3b;
font-size: 0.4rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
} }
@@ -545,8 +545,8 @@ export default {
.next { .next {
font-size: 0.4rem; font-size: 0.4rem;
padding: 0.3rem 1rem; padding: 0.3rem 1rem;
background: $primary-color; background: #cf9e3b;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
color: white; color: white;
border-radius: 0.1rem; border-radius: 0.1rem;
} }
@@ -637,13 +637,13 @@ export default {
padding-bottom: calc(env(safe-area-inset-bottom) + 0.2rem); padding-bottom: calc(env(safe-area-inset-bottom) + 0.2rem);
.merit-button { .merit-button {
display: inline-block; display: inline-block;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
height: 1.2rem; height: 1.2rem;
font-size: 0.37rem; font-size: 0.37rem;
width: 60%; width: 60%;
padding: 0 0.53rem; padding: 0 0.53rem;
border: 0.01rem solid $primary-color; border: 0.01rem solid #cf9e3b;
border-radius: 1.33rem; border-radius: 1.33rem;
} }
} }
+54 -53
View File
@@ -5,7 +5,7 @@
<div class="field"> <div class="field">
<label class="required">功德芳名</label> <label class="required">功德芳名</label>
<div class="input-wrapper"> <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> </div>
<div class="field"> <div class="field">
@@ -19,27 +19,29 @@
<div class="field"> <div class="field">
<label class="required">阳上人</label> <label class="required">阳上人</label>
<div class="input-wrapper"> <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> </div>
<div class="field"> <div class="field">
<label class="required">往生者</label> <label class="required">往生者</label>
<div class="input-wrapper"> <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>
</div> </div>
</template> </template>
<div class="field"> <div class="field">
<label>手机号码</label> <label>手机号码</label>
<div class="input-wrapper"> <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> </div>
</div> </div>
<div class="btn-wrapper"> <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> <button type="button" @click="onNext">下一步</button>
</div> </div>
@@ -51,35 +53,34 @@
<script> <script>
export default { export default {
name: 'fill-name', name: "fill-name",
data() { data() {
return { return {
query: this.$route.query, query: this.$route.query,
mobile: '', mobile: "",
dream: '', dream: "",
merit_name_id: '', merit_name_id: "",
dialogName: '', dialogName: "",
showMeritName: false, showMeritName: false,
showDesire: false, showDesire: false,
merit_names: [], merit_names: [],
meritTypes: [], meritTypes: [],
meritTypeId: null, meritTypeId: null,
showBuddhi: true, showBuddhi: true,
live_name: '', // 阳上人姓名 live_name: "", // 阳上人姓名
die_name: '', // 往生人姓名 die_name: "", // 往生人姓名
} };
}, },
computed: { computed: {
meritName() { meritName() {
return this.merit_names.map(item => item.name).join(',') return this.merit_names.map((item) => item.name).join(",");
}, },
meritId() { meritId() {
return this.merit_names.map(item => item.id).join(',') return this.merit_names.map((item) => item.id).join(",");
}, },
}, },
methods: { methods: {
onShowDialog() { onShowDialog() {
this.showMeritName = true; this.showMeritName = true;
}, },
@@ -94,33 +95,33 @@ export default {
}, },
onNext() { onNext() {
if (!this.meritId) { if (!this.meritId) {
return this.$toast.fail('请填写功德芳名'); return this.$toast.fail("请填写功德芳名");
} }
if (this.query.is_die == 1 && (!this.live_name || !this.die_name)) { if (this.query.is_die == 1 && (!this.live_name || !this.die_name)) {
return this.$toast.fail('请填写阳上人与往生人') return this.$toast.fail("请填写阳上人与往生人");
} }
this.$router.push({ this.$router.push({
name: 'pay', name: "pay",
query: { query: {
...this.$route.query, ...this.$route.query,
dream: this.dream, dream: this.dream,
merit_name: this.meritName, merit_name: this.meritName,
mobile: this.mobile, mobile: this.mobile,
live_name: this.live_name, live_name: this.live_name,
die_name: this.die_name die_name: this.die_name,
} },
}) });
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.fill-name { .fill-name {
.field { .field {
.van-radio__icon--checked .van-icon { .van-radio__icon--checked .van-icon {
background: #CF9E3B; background: #cf9e3b;
border-color: #CF9E3B; border-color: #cf9e3b;
} }
} }
} }
@@ -131,22 +132,22 @@ export default {
height: 100vh; height: 100vh;
position: relative; position: relative;
.panel-wrapper { .panel-wrapper {
padding: .3rem; padding: 0.3rem;
} }
.panel { .panel {
padding: .3rem; padding: 0.3rem;
border-radius: .1rem; border-radius: 0.1rem;
font-size: .4rem; font-size: 0.4rem;
background: white; 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 { .field {
margin-bottom: .6rem; margin-bottom: 0.6rem;
.required { .required {
&::after { &::after {
content: '*'; content: "*";
color: red; color: red;
margin-left: .1rem; margin-left: 0.1rem;
} }
} }
label { label {
@@ -154,10 +155,10 @@ export default {
} }
.input-wrapper { .input-wrapper {
margin-top: .2rem; margin-top: 0.2rem;
border: 1px solid rgba(183, 173, 173, 0.54); border: 1px solid rgba(183, 173, 173, 0.54);
padding: .2rem .3rem; padding: 0.2rem 0.3rem;
border-radius: .1rem; border-radius: 0.1rem;
position: relative; position: relative;
background: #fdfdfd; background: #fdfdfd;
.input { .input {
@@ -166,30 +167,30 @@ export default {
border: none; border: none;
background: transparent; background: transparent;
} }
.input[type=textarea]{ .input[type="textarea"] {
min-height: 2rem; min-height: 2rem;
width: calc(100% - .5rem); width: calc(100% - 0.5rem);
padding-right: .5rem; padding-right: 0.5rem;
line-height: 1.4; line-height: 1.4;
text-align: justify; text-align: justify;
} }
.icon-arrow-right { .icon-arrow-right {
position: absolute; position: absolute;
right: .1rem; right: 0.1rem;
top: 50%; top: 50%;
transform: translateY(-.35rem); transform: translateY(-0.35rem);
display: inline-block; display: inline-block;
font-size: .7rem; font-size: 0.7rem;
color: #aaa; color: #aaa;
} }
} }
} }
.btn-wrapper { .btn-wrapper {
position: absolute; position: absolute;
left: .3rem; left: 0.3rem;
right: .3rem; right: 0.3rem;
bottom: calc(.5rem + env(safe-area-inset-bottom)); bottom: calc(0.5rem + env(safe-area-inset-bottom));
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
border-radius: 100px; border-radius: 100px;
background: white; background: white;
display: flex; display: flex;
@@ -197,21 +198,21 @@ export default {
overflow: hidden; overflow: hidden;
align-items: center; align-items: center;
.total { .total {
font-size: .4rem; font-size: 0.4rem;
color: $primary-color; color: #cf9e3b;
padding-left: .4rem; padding-left: 0.4rem;
.price { .price {
font-size: .5rem; font-size: 0.5rem;
line-height: 1; line-height: 1;
font-weight: bold; font-weight: bold;
} }
} }
button { button {
background: linear-gradient(to bottom, $primary-color, #9f7313); background: linear-gradient(to bottom, #cf9e3b, #9f7313);
color: white; color: white;
height: 1.4rem; height: 1.4rem;
border: none; border: none;
font-size: .5rem; font-size: 0.5rem;
padding: 0 1rem; padding: 0 1rem;
width: 50%; width: 50%;
} }
+52 -51
View File
@@ -6,7 +6,7 @@
<h1 class="title">在线护持 寺院道场 供养三宝 广种福田</h1> <h1 class="title">在线护持 寺院道场 供养三宝 广种福田</h1>
<div class="inner"> <div class="inner">
<div class="field"> <div class="field">
<input type="tel" v-model="mobile" maxlength="11" placeholder="请输入手机号码"> <input type="tel" v-model="mobile" maxlength="11" placeholder="请输入手机号码" />
</div> </div>
<p class="tip">未注册的手机号验证后自动创建账户</p> <p class="tip">未注册的手机号验证后自动创建账户</p>
@@ -25,172 +25,173 @@
<h1 class="title">请输入验证码</h1> <h1 class="title">请输入验证码</h1>
<p class="send-to">验证码已发送至 {{ mobile | fmMobile }}</p> <p class="send-to">验证码已发送至 {{ mobile | fmMobile }}</p>
<sms-code-input :code="validCode" @complete="onSubmitBefore"></sms-code-input> <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> <van-button type="info" :disabled="!(validCode.length === 4)" block @click="onSubmit">提交</van-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getMobileValidateCode, postMobileCode } from '@/api'; import { getMobileValidateCode, postMobileCode } from "@/api";
import SmsCodeInput from '@/components/sms-code-input' import SmsCodeInput from "@/components/sms-code-input";
export default { export default {
components: { components: {
SmsCodeInput SmsCodeInput,
}, },
data() { data() {
return { return {
query: this.$route.query, query: this.$route.query,
mobile: '', mobile: "",
validCode: '', validCode: "",
countdown: 0, countdown: 0,
timer: null, timer: null,
sended: false, sended: false,
}; };
}, },
filters: { filters: {
fmMobile(val) { fmMobile(val) {
return val.replace(/(\d{3})(\d{4})/, "$1 $2 ") return val.replace(/(\d{3})(\d{4})/, "$1 $2 ");
} },
}, },
computed: { computed: {
validMobile() { 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}$/; 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: { methods: {
onAgreement(agreeId) { onAgreement(agreeId) {
this.$router.push({ name: 'user-temple-station-agreement', query: { agreeId }}) this.$router.push({ name: "user-temple-station-agreement", query: { agreeId } });
}, },
onSubmitBefore(code) { onSubmitBefore(code) {
this.validCode = code this.validCode = code;
this.onSubmit(); this.onSubmit();
}, },
async onSubmit() { async onSubmit() {
const { mobile, validCode } = this; const { mobile, validCode } = this;
if (!mobile) { if (!mobile) {
return this.$toast('请输入手机号') return this.$toast("请输入手机号");
} }
if (!validCode) { if (!validCode) {
return this.$toast('请输入验证码') return this.$toast("请输入验证码");
} }
const res = await postMobileCode(mobile, validCode.join('')) const res = await postMobileCode(mobile, validCode.join(""));
if (res) { if (res) {
this.$toast.success('登记成功,请继续后续操作') this.$toast.success("登记成功,请继续后续操作");
this.$delay(500); this.$delay(500);
this.$bus.$emit('updateMobile') this.$bus.$emit("updateMobile");
this.$router.replace({ this.$router.replace({
path: this.query.redirectPath, path: this.query.redirectPath,
query: this.$utils.queryStringToObj(decodeURIComponent(this.query.redirectPathQuery)) query: this.$utils.queryStringToObj(decodeURIComponent(this.query.redirectPathQuery)),
}) });
} }
}, },
onSendCode() { onSendCode() {
const { mobile } = this; const { mobile } = this;
if (!mobile) { if (!mobile) {
return this.$toast('请输入手机号') return this.$toast("请输入手机号");
} }
getMobileValidateCode(mobile).then(success => { getMobileValidateCode(mobile).then((success) => {
if (success) { if (success) {
this.$toast('发送成功,请注意查收短信'); this.$toast("发送成功,请注意查收短信");
this.sended = true; this.sended = true;
if (this.countdown === 0) { if (this.countdown === 0) {
this.countdown = 60; this.countdown = 60;
this.countdownSecond() this.countdownSecond();
} }
} }
}) });
}, },
countdownSecond() { countdownSecond() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.countdown--; this.countdown--;
if (this.countdown == 0) { if (this.countdown == 0) {
clearInterval(this.timer) clearInterval(this.timer);
}
}, 1000)
} }
}, 1000);
},
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.top { .top {
padding: 0 .5rem; padding: 0 0.5rem;
font-size: .35rem; font-size: 0.35rem;
padding-top: .3rem; padding-top: 0.3rem;
.title { .title {
font-size: .5rem; font-size: 0.5rem;
margin-top: 1rem; margin-top: 1rem;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
color: #a5161a; color: #a5161a;
font-family: '宋体'; font-family: "宋体";
} }
.inner { .inner {
margin-top: 1rem; margin-top: 1rem;
.field { .field {
background: #f1f1f1; background: #f1f1f1;
margin-bottom: .2rem; margin-bottom: 0.2rem;
padding: .1rem .4rem; padding: 0.1rem 0.4rem;
input { input {
height: .8rem; height: 0.8rem;
background: transparent; background: transparent;
border: none; border: none;
display: block; display: block;
width: 100%; width: 100%;
font-size: .4rem; font-size: 0.4rem;
} }
} }
.tip { .tip {
font-size: .3rem; font-size: 0.3rem;
margin-bottom: 1.2rem; margin-bottom: 1.2rem;
color: #888; color: #888;
} }
.desc { .desc {
font-size: .4rem; font-size: 0.4rem;
text-align: center; text-align: center;
padding-top: 2rem; padding-top: 2rem;
} }
.agree { .agree {
font-size: .35rem; font-size: 0.35rem;
text-align: center; text-align: center;
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: 2rem; bottom: 2rem;
a { a {
color: $primary-color; color: #cf9e3b;
} }
} }
} }
.send-to { .send-to {
font-size: .35rem; font-size: 0.35rem;
margin-top: .2rem; margin-top: 0.2rem;
} }
.notification { .notification {
padding-top: .8rem; padding-top: 0.8rem;
p { p {
margin: 0; margin: 0;
font-size: .34rem; font-size: 0.34rem;
color: #a5161a; color: #a5161a;
line-height: 1.4; line-height: 1.4;
margin-bottom: .2rem; margin-bottom: 0.2rem;
font-family: '宋体'; font-family: "宋体";
text-align: justify; text-align: justify;
} }
} }
.resend { .resend {
padding-top: .6rem; padding-top: 0.6rem;
margin-bottom: 3rem; margin-bottom: 3rem;
span { span {
color: $primary-color; color: #cf9e3b;
padding-right: .2rem; padding-right: 0.2rem;
} }
} }
} }
@@ -116,9 +116,9 @@ export default {
} }
.btn { .btn {
padding: 0.2rem 0.6rem; padding: 0.2rem 0.6rem;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
font-size: 0.4rem; font-size: 0.4rem;
border-radius: 0.11rem; border-radius: 0.11rem;
margin-left: 0.3rem; margin-left: 0.3rem;
@@ -176,7 +176,7 @@ export default {
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
.update { .update {
font-size: 0.35rem; font-size: 0.35rem;
color: $primary-color; color: #cf9e3b;
} }
} }
.name-group { .name-group {
@@ -186,9 +186,9 @@ export default {
} }
} }
.confirm { .confirm {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
width: 3rem; width: 3rem;
padding: 0.3rem 0; padding: 0.3rem 0;
border-radius: 0.07rem; border-radius: 0.07rem;
@@ -22,12 +22,10 @@
</template> </template>
<script> <script>
export default { export default {
props: { props: {
value: { value: {
type: [String, Number] type: [String, Number],
}, },
data: { data: {
type: Object, type: Object,
@@ -38,49 +36,49 @@ export default {
return { return {
num: 0, num: 0,
is_customized: false, is_customized: false,
} };
}, },
watch: { watch: {
number: { number: {
handler(val) { handler(val) {
this.num = val; this.num = val;
} },
} },
}, },
methods: { methods: {
onChangeNumber(value) { onChangeNumber(value) {
this.$emit('update:number', value) this.$emit("update:number", value);
}, },
onSelectSpec(spec) { onSelectSpec(spec) {
this.$emit('input', spec.id) this.$emit("input", spec.id);
}, },
onAnyAmount() { onAnyAmount() {
this.$emit('input', 'is_customized') this.$emit("input", "is_customized");
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.spec-group { .spec-group {
padding: .2rem .4rem; padding: 0.2rem 0.4rem;
max-height: 50vh; max-height: 50vh;
overflow: scroll; overflow: scroll;
li { li {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 .4rem; padding: 0 0.4rem;
font-size: .4rem; font-size: 0.4rem;
height: 1rem; height: 1rem;
& ~ li { & ~ li {
margin-top: .3rem; margin-top: 0.3rem;
} }
} }
li.active { li.active {
border-color: $primary-color; border-color: #cf9e3b;
color: $primary-color; color: #cf9e3b;
} }
} }
</style> </style>
+7 -7
View File
@@ -288,7 +288,7 @@ $lightWidth: 1.3rem;
background: #bbb; background: #bbb;
} }
.van-swipe__indicator--active { .van-swipe__indicator--active {
background: $primary-color; background: #cf9e3b;
} }
} }
} }
@@ -419,7 +419,7 @@ $lightWidth: 1.3rem;
} }
.merit-button { .merit-button {
display: block; display: block;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
height: 1.2rem; height: 1.2rem;
font-size: 0.37rem; font-size: 0.37rem;
@@ -428,7 +428,7 @@ $lightWidth: 1.3rem;
margin-top: 0.3rem; margin-top: 0.3rem;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
border: 0.01rem solid $primary-color; border: 0.01rem solid #cf9e3b;
border-radius: 0.13rem; border-radius: 0.13rem;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
} }
@@ -455,7 +455,7 @@ $lightWidth: 1.3rem;
} }
} }
li.current { li.current {
color: $primary-color; color: #cf9e3b;
} }
} }
} }
@@ -492,7 +492,7 @@ $lightWidth: 1.3rem;
.total { .total {
font-size: 0.4rem; font-size: 0.4rem;
em { em {
color: $primary-color; color: #cf9e3b;
font-size: 0.4rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
} }
@@ -500,8 +500,8 @@ $lightWidth: 1.3rem;
.next { .next {
font-size: 0.4rem; font-size: 0.4rem;
padding: 0.3rem 1rem; padding: 0.3rem 1rem;
background: $primary-color; background: #cf9e3b;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
color: white; color: white;
border-radius: 0.1rem; border-radius: 0.1rem;
} }
@@ -116,9 +116,9 @@ export default {
} }
.btn { .btn {
padding: 0.2rem 0.6rem; padding: 0.2rem 0.6rem;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
font-size: 0.4rem; font-size: 0.4rem;
border-radius: 0.11rem; border-radius: 0.11rem;
margin-left: 0.3rem; margin-left: 0.3rem;
@@ -176,7 +176,7 @@ export default {
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
.update { .update {
font-size: 0.35rem; font-size: 0.35rem;
color: $primary-color; color: #cf9e3b;
} }
} }
.name-group { .name-group {
@@ -186,9 +186,9 @@ export default {
} }
} }
.confirm { .confirm {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
width: 3rem; width: 3rem;
padding: 0.3rem 0; padding: 0.3rem 0;
border-radius: 0.07rem; border-radius: 0.07rem;
@@ -22,12 +22,10 @@
</template> </template>
<script> <script>
export default { export default {
props: { props: {
value: { value: {
type: [String, Number] type: [String, Number],
}, },
data: { data: {
type: Object, type: Object,
@@ -38,49 +36,49 @@ export default {
return { return {
num: 0, num: 0,
is_customized: false, is_customized: false,
} };
}, },
watch: { watch: {
number: { number: {
handler(val) { handler(val) {
this.num = val; this.num = val;
} },
} },
}, },
methods: { methods: {
onChangeNumber(value) { onChangeNumber(value) {
this.$emit('update:number', value) this.$emit("update:number", value);
}, },
onSelectSpec(spec) { onSelectSpec(spec) {
this.$emit('input', spec.id) this.$emit("input", spec.id);
}, },
onAnyAmount() { onAnyAmount() {
this.$emit('input', 'is_customized') this.$emit("input", "is_customized");
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.spec-group { .spec-group {
padding: .2rem .4rem; padding: 0.2rem 0.4rem;
max-height: 50vh; max-height: 50vh;
overflow: scroll; overflow: scroll;
li { li {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 .4rem; padding: 0 0.4rem;
font-size: .4rem; font-size: 0.4rem;
height: 1rem; height: 1rem;
& ~ li { & ~ li {
margin-top: .3rem; margin-top: 0.3rem;
} }
} }
li.active { li.active {
border-color: $primary-color; border-color: #cf9e3b;
color: $primary-color; color: #cf9e3b;
} }
} }
</style> </style>
+9 -9
View File
@@ -304,10 +304,10 @@ $lightWidth: 1.15rem;
padding-right: 0; padding-right: 0;
} }
.current-light { .current-light {
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
border-radius: 4px; border-radius: 4px;
span { span {
color: $primary-color; color: #cf9e3b;
} }
} }
img.light-icon { img.light-icon {
@@ -336,7 +336,7 @@ $lightWidth: 1.15rem;
background: #bbb; background: #bbb;
} }
.van-swipe__indicator--active { .van-swipe__indicator--active {
background: $primary-color; background: #cf9e3b;
} }
} }
} }
@@ -480,7 +480,7 @@ $lightWidth: 1.15rem;
} }
.merit-button { .merit-button {
display: block; display: block;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
height: 1.2rem; height: 1.2rem;
font-size: 0.37rem; font-size: 0.37rem;
@@ -489,7 +489,7 @@ $lightWidth: 1.15rem;
margin-top: 0.3rem; margin-top: 0.3rem;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
border: 0.01rem solid $primary-color; border: 0.01rem solid #cf9e3b;
border-radius: 0.13rem; border-radius: 0.13rem;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
} }
@@ -516,7 +516,7 @@ $lightWidth: 1.15rem;
} }
} }
li.current { li.current {
color: $primary-color; color: #cf9e3b;
} }
} }
} }
@@ -553,7 +553,7 @@ $lightWidth: 1.15rem;
.total { .total {
font-size: 0.4rem; font-size: 0.4rem;
em { em {
color: $primary-color; color: #cf9e3b;
font-size: 0.4rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
} }
@@ -561,8 +561,8 @@ $lightWidth: 1.15rem;
.next { .next {
font-size: 0.4rem; font-size: 0.4rem;
padding: 0.3rem 1rem; padding: 0.3rem 1rem;
background: $primary-color; background: #cf9e3b;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
color: white; color: white;
border-radius: 0.1rem; border-radius: 0.1rem;
} }
+4 -4
View File
@@ -46,19 +46,19 @@
<div class="divider"></div> <div class="divider"></div>
<div class="panel" v-if="data.dynamic_data.length > 0"> <div class="panel" v-if="data.dynamic_data.length > 0">
<div class="panel-head"> <div class="panel-head">
<span class="title">进展状态</span> <span class="title">法会进展</span>
<arrow-more @click="onMoreProcess"></arrow-more> <arrow-more @click="onMoreProcess"></arrow-more>
</div> </div>
<div class="panel-body goods-panel-body"> <div class="panel-body goods-panel-body">
<buddha-process v-for="process in data.dynamic_data" :key="process.id" :data="process"></buddha-process> <buddha-process v-for="process in data.dynamic_data" :key="process.id" :data="process"></buddha-process>
<div class="process-more" @click="onMoreProcess"> <div class="process-more" @click="onMoreProcess">
<span>查看更多进展状态</span> <span>查看更多法会</span>
<i class="iconfont icon-arrow-right"></i> <i class="iconfont icon-arrow-right"></i>
</div> </div>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<thanks-giving :temple-id="query.temple_id" :agent-id="query.agent_id"></thanks-giving>
</div> </div>
<thanks-giving :temple-id="query.temple_id" :agent-id="query.agent_id"></thanks-giving>
</div> </div>
</template> </template>
@@ -259,7 +259,7 @@ export default {
border-radius: 10px; border-radius: 10px;
} }
.van-swipe__indicator--active { .van-swipe__indicator--active {
background: $primary-color; background: #cf9e3b;
} }
} }
.panel { .panel {
+16 -11
View File
@@ -1,5 +1,5 @@
<template> <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 }" /> <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"> <div class="merit-container">
<img class="goods-picture" :style="{ width: width + 'px', height: width / 2 + 'px' }" :src="info.merit_box_cover" alt="" /> <img class="goods-picture" :style="{ width: width + 'px', height: width / 2 + 'px' }" :src="info.merit_box_cover" alt="" />
@@ -28,11 +28,11 @@
</scroll-view> </scroll-view>
</div> </div>
</div> </div>
</div>
<div class="merit-button-group" :style="{ bottom: tabHeight + 'px' }"> <div class="merit-button-group" :style="{ bottom: tabHeight + 'px' }">
<button class="iconfont icon-arrow-left" @click="back"></button> <button class="iconfont icon-arrow-left" @click="back"></button>
<button class="merit-button" @click="openBox">随喜功德</button> <button class="merit-button" @click="openBox">随喜功德</button>
</div> </div>
</div>
<random-money :value.sync="randVisible" @change="onRandNext"></random-money> <random-money :value.sync="randVisible" @change="onRandNext"></random-money>
</div> </div>
</template> </template>
@@ -154,26 +154,31 @@ export default {
<style lang="scss"> <style lang="scss">
.merit-box { .merit-box {
position: relative; position: relative;
height: 100%; height: 100vh;
display: flex;
flex-direction: column;
.goods-picture { .goods-picture {
vertical-align: top; vertical-align: top;
position: fixed;
left: 0; left: 0;
top: 0; top: 0;
right: 0; right: 0;
} }
.merit-container { .merit-container {
height: 100%; flex: 1 1;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
display: flex;
flex-direction: column;
} }
.merit-rank-container { .merit-rank-container {
background: white; background: white;
position: relative; position: relative;
border-top-left-radius: 10px; border-top-left-radius: 10px;
border-top-right-radius: 10px; border-top-right-radius: 10px;
margin-top: 5rem; flex: 1 1;
height: 61vh; display: flex;
flex-direction: column;
overflow: hidden;
.head { .head {
padding: 0.53rem 0.4rem; padding: 0.53rem 0.4rem;
padding-bottom: 0.13rem; padding-bottom: 0.13rem;
@@ -237,20 +242,20 @@ export default {
.merit-button { .merit-button {
//display: inline-block; //display: inline-block;
//vertical-align: top; //vertical-align: top;
//background: $primary-color; //background: #CF9E3B;;
//color: white; //color: white;
//height: 1.4rem; //height: 1.4rem;
//font-size: .37rem; //font-size: .37rem;
//padding: 0 2rem; //padding: 0 2rem;
//border: .01rem solid $primary-color; //border: .01rem solid #CF9E3B;;
//border-radius: $btn-border-radius; //border-radius: $btn-border-radius;
//flex: 1; //flex: 1;
flex: 1; flex: 1;
font-size: 0.4rem; font-size: 0.4rem;
padding: 0.3rem 1rem; padding: 0.3rem 1rem;
background: $primary-color; background: #cf9e3b;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
color: white; color: white;
border-radius: 0.1rem; border-radius: 0.1rem;
} }
+37 -37
View File
@@ -5,8 +5,8 @@
</div> </div>
<swiper class="swiper-container" :options="swiperOption"> <swiper class="swiper-container" :options="swiperOption">
<swiper-slide v-for="(cover, index) in data.pictures" :key="index"> <swiper-slide v-for="(cover, index) in data.pictures" :key="index">
<div style="height: 100vw;" class="picture"> <div style="height: 100vw" class="picture">
<img :src="cover" alt=""> <img :src="cover" alt="" />
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
@@ -34,29 +34,28 @@
</template> </template>
<script> <script>
import { getMasterDetail } from '@/api' import { getMasterDetail } from "@/api";
import 'swiper/css/swiper.css' import "swiper/css/swiper.css";
import { swiper, swiperSlide } from 'vue-awesome-swiper' import { swiper, swiperSlide } from "vue-awesome-swiper";
export default { export default {
components: { components: {
swiper, swiperSlide swiper,
swiperSlide,
}, },
data() { data() {
return { return {
query: this.$route.query, query: this.$route.query,
banners: [ '/1.jpg', '/2.jpg', '/3.jpg' ], banners: ["/1.jpg", "/2.jpg", "/3.jpg"],
data: null, data: null,
swiperOption: { swiperOption: {
autoplay: 8000, autoplay: 8000,
initialSlide: 1, initialSlide: 1,
loop: true, loop: true,
pagination: '.swiper-pagination', pagination: ".swiper-pagination",
onSlideChangeEnd: () => { onSlideChangeEnd: () => {},
},
} };
}
}
}, },
mounted() { mounted() {
this.getMasterDetail(); this.getMasterDetail();
@@ -64,41 +63,42 @@ export default {
methods: { methods: {
onProvide() { onProvide() {
const { goods_type, goods_id, temple_id, spec_id } = this.data; 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() { async getMasterDetail() {
const res = await getMasterDetail(this.query.master_id) const res = await getMasterDetail(this.query.master_id);
this.data = res; this.data = res;
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.swiper-container { .swiper-container {
background: #f5f5f5; background: #f5f5f5;
.picture, img{ .picture,
img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.support { .support {
.support-head { .support-head {
padding: 0 .4rem; padding: 0 0.4rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 1.07rem; height: 1.07rem;
line-height: 1.07rem; line-height: 1.07rem;
.label { .label {
font-size: .4rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
} }
.external { .external {
display: flex; display: flex;
align-items: center; align-items: center;
li { li {
margin-left: .3rem; margin-left: 0.3rem;
font-size: .35rem; font-size: 0.35rem;
color: #666; color: #666;
} }
li.active { li.active {
@@ -110,16 +110,16 @@ export default {
} }
.monk-detail { .monk-detail {
.monk-profile { .monk-profile {
padding: .4rem; padding: 0.4rem;
margin-bottom: .53rem; margin-bottom: 0.53rem;
.position { .position {
font-size: .5rem; font-size: 0.5rem;
padding-top: .2rem; padding-top: 0.2rem;
color: #19282E; color: #19282e;
} }
.introduction { .introduction {
font-size: .37rem; font-size: 0.37rem;
margin-top: .4rem; margin-top: 0.4rem;
line-height: 1.3; line-height: 1.3;
text-align: justify; text-align: justify;
color: #666; color: #666;
@@ -133,18 +133,18 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
background: white; background: white;
padding: .4rem 0; padding: 0.4rem 0;
border-top: .01rem solid #ddd; border-top: 0.01rem solid #ddd;
.merit-button { .merit-button {
display: inline-block; display: inline-block;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
height: 1.2rem; height: 1.2rem;
font-size: .37rem; font-size: 0.37rem;
width: 60%; width: 60%;
padding: 0 .53rem; padding: 0 0.53rem;
border: .01rem solid $primary-color; border: 0.01rem solid #cf9e3b;
border-radius: 1.33rem border-radius: 1.33rem;
} }
} }
} }
+4 -4
View File
@@ -105,13 +105,13 @@ export default {
background: white; background: white;
} }
.detail { .detail {
color: $primary-color; color: #cf9e3b;
border-color: $primary-color; border-color: #cf9e3b;
} }
.again { .again {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border-color: $primary-color; border-color: #cf9e3b;
} }
} }
} }
+27 -27
View File
@@ -1,8 +1,8 @@
<template> <template>
<div class="temple-detail" v-if="data"> <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"> <div class="authed border-bottom">
<img src="@/assets/img/cert.jpg" alt=""> <img src="@/assets/img/cert.jpg" alt="" />
<span>已通过 <b>自在福田</b> 认证,可放心访问</span> <span>已通过 <b>自在福田</b> 认证,可放心访问</span>
</div> </div>
@@ -32,7 +32,7 @@
<h4 class="title border-bottom">认证授权</h4> <h4 class="title border-bottom">认证授权</h4>
<ul class="cert"> <ul class="cert">
<li v-for="(cert, index) in data.register_cert_url" :key="index"> <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> </li>
</ul> </ul>
</div> </div>
@@ -45,30 +45,30 @@
</template> </template>
<script> <script>
import { getTempleDetail } from "@/api" import { getTempleDetail } from "@/api";
import { previewImage } from '@/common/wechat-web'; import { previewImage } from "@/common/wechat-web";
export default { export default {
data() { data() {
return { return {
query: this.$route.query, query: this.$route.query,
data: null, data: null,
} };
}, },
mounted() { mounted() {
this.getTempleDetail(); this.getTempleDetail();
this.wechatReady() this.wechatReady();
}, },
methods: { methods: {
previewImage(cert, certArr) { previewImage(cert, certArr) {
previewImage(cert, certArr) previewImage(cert, certArr);
}, },
async getTempleDetail() { async getTempleDetail() {
const res = await getTempleDetail(this.query.temple_id); const res = await getTempleDetail(this.query.temple_id);
this.data = res; this.data = res;
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
@@ -78,35 +78,35 @@ export default {
width: 100%; width: 100%;
} }
.authed { .authed {
font-size: .35rem; font-size: 0.35rem;
line-height: 1.2rem; line-height: 1.2rem;
padding-left: .4rem; padding-left: 0.4rem;
color: #888; color: #888;
img { img {
width: .3rem; width: 0.3rem;
vertical-align: middle; vertical-align: middle;
margin-right: .1rem; margin-right: 0.1rem;
} }
span { span {
vertical-align: middle; vertical-align: middle;
b { b {
color: $primary-color; color: #cf9e3b;
} }
} }
} }
.auth { .auth {
margin: .4rem; margin: 0.4rem;
margin-top: .8rem; margin-top: 0.8rem;
.title { .title {
font-size: .4rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
padding-bottom: .3rem; padding-bottom: 0.3rem;
} }
.list { .list {
margin-top: .2rem; margin-top: 0.2rem;
li { li {
line-height: .8rem; line-height: 0.8rem;
font-size: .4rem; font-size: 0.4rem;
.label { .label {
display: inline-block; display: inline-block;
width: 5em; width: 5em;
@@ -120,13 +120,13 @@ export default {
} }
.cert { .cert {
white-space: nowrap; white-space: nowrap;
margin-top: .3rem; margin-top: 0.3rem;
overflow-x: scroll; overflow-x: scroll;
li { li {
width: 5rem; width: 5rem;
display: inline-block; display: inline-block;
border: 1px solid #ddd; border: 1px solid #ddd;
margin-right: .3rem; margin-right: 0.3rem;
img { img {
width: 100%; width: 100%;
vertical-align: top; vertical-align: top;
@@ -134,10 +134,10 @@ export default {
} }
} }
.description { .description {
font-size: .4rem; font-size: 0.4rem;
color: #888; color: #888;
line-height: 1.7; line-height: 1.7;
padding-top: .35rem; padding-top: 0.35rem;
letter-spacing: 1px; letter-spacing: 1px;
text-align: justify; text-align: justify;
} }
+108 -114
View File
@@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="certed-temple" @click="$router.push({ name: 'temple-detail', query: { temple_id: query.temple_id } })"> <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="text">认证寺院可放心访问</span>
<span class="btn">查看</span> <span class="btn">查看</span>
</div> </div>
@@ -16,7 +16,7 @@
<div class="swiper" v-if="data.banner_data.length > 0"> <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="8000" indicator-color="white">
<van-swipe-item v-for="(banner, index) in data.banner_data" :key="index"> <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-item>
</van-swipe> </van-swipe>
</div> </div>
@@ -24,7 +24,7 @@
<van-swipe-item v-for="(item, index) in data.icon_data" :key="index"> <van-swipe-item v-for="(item, index) in data.icon_data" :key="index">
<van-grid :border="false"> <van-grid :border="false">
<van-grid-item icon="photo-o" :text="nav.name" v-for="(nav, _index) in item" :key="_index" @click="locationTo(nav)"> <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-item>
</van-grid> </van-grid>
</van-swipe-item> </van-swipe-item>
@@ -39,9 +39,8 @@
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="temple-manager"> <div class="temple-manager">
<div class="manager" v-for="manager in data.member_data" :key="manager.id" <div class="manager" v-for="manager in data.member_data" :key="manager.id" @click="$router.push({ name: 'monk', query: { master_id: manager.id } })">
@click="$router.push({ name: 'monk', query: { master_id: manager.id }})"> <img class="avatar" :src="manager.avatar_url" alt="" />
<img class="avatar" :src="manager.avatar_url" alt="">
<div class="manager-container"> <div class="manager-container">
<h3 class="name">{{ manager.title }}</h3> <h3 class="name">{{ manager.title }}</h3>
<p class="content"> <p class="content">
@@ -90,11 +89,10 @@
<span class="iconfont icon-liebiao"></span> <span class="iconfont icon-liebiao"></span>
</div> </div>
<van-popup v-model="showUserMenu" position="left" style="width: 80%; height: 100%"> <van-popup v-model="showUserMenu" position="left" style="width: 80%; height: 100%">
<div class="user-menu" v-if="user"> <div class="user-menu" v-if="user">
<div class="user"> <div class="user">
<img class="avatar" :src="user.avatar" alt=""> <img class="avatar" :src="user.avatar" alt="" />
<div class="profile"> <div class="profile">
<h5 class="name">{{ user.nickname }}</h5> <h5 class="name">{{ user.nickname }}</h5>
<p class="account">用户号: {{ user.account_no }}</p> <p class="account">用户号: {{ user.account_no }}</p>
@@ -102,19 +100,19 @@
</div> </div>
<ul class="user-list"> <ul class="user-list">
<li @click="onPushForRouteName('user-order')"> <li @click="onPushForRouteName('user-order')">
<img src="@/assets/img/user-popup/我的善缘.png" alt=""> <img src="@/assets/img/user-popup/我的善缘.png" alt="" />
<span>我的善缘</span> <span>我的善缘</span>
</li> </li>
<li @click="onPushForRouteName('user-customer')"> <li @click="onPushForRouteName('user-customer')">
<img src="@/assets/img/user-popup/联系客服.png" alt=""> <img src="@/assets/img/user-popup/联系客服.png" alt="" />
<span>联系客服</span> <span>联系客服</span>
</li> </li>
<li @click="onPushForRouteName('merit-box')"> <li @click="onPushForRouteName('merit-box')">
<img src="@/assets/img/user-popup/功德箱.png" alt=""> <img src="@/assets/img/user-popup/功德箱.png" alt="" />
<span>功德箱</span> <span>功德箱</span>
</li> </li>
<li @click="onPushForRouteName('home')"> <li @click="onPushForRouteName('home')">
<img src="@/assets/img/user-popup/查看更多寺院.png" alt=""> <img src="@/assets/img/user-popup/查看更多寺院.png" alt="" />
<span>自在福田首页</span> <span>自在福田首页</span>
</li> </li>
</ul> </ul>
@@ -130,7 +128,7 @@
</template> </template>
<script> <script>
import { getTempleIndex, getUserData } from '@/api'; import { getTempleIndex, getUserData } from "@/api";
export default { export default {
data() { data() {
@@ -148,59 +146,58 @@ export default {
methods: { methods: {
openBox() { openBox() {
this.$router.push({ this.$router.push({
name: 'merit-box', name: "merit-box",
query: { temple_id : this.query.temple_id, open_box: 1, fromPathName: this.$route.name } query: { temple_id: this.query.temple_id, open_box: 1, fromPathName: this.$route.name },
}) });
}, },
locationTo(nav) { locationTo(nav) {
// nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态 // nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态
if (nav.icon_type === 6) { if (nav.icon_type === 6) {
this.$router.push({ this.$router.push({
name: 'goods-light-detail', name: "goods-light-detail",
query: { query: {
goods_type: nav.goods_type, goods_type: nav.goods_type,
temple_id: nav.temple_id, temple_id: nav.temple_id,
goods_id: nav.goods_id, goods_id: nav.goods_id,
} },
}) });
return return;
} }
if (nav.icon_type === 0) { if (nav.icon_type === 0) {
window.location.href = nav.url; window.location.href = nav.url;
return return;
} }
if (nav.icon_type === 5) { if (nav.icon_type === 5) {
this.$router.push({ this.$router.push({
name: 'buddha-detail', name: "buddha-detail",
query: { id: nav.dynamic_id } query: { id: nav.dynamic_id },
}) });
return return;
} }
if (nav.icon_type === 4) { if (nav.icon_type === 4) {
this.$router.push({ this.$router.push({
name: 'merit-box' name: "merit-box",
}) });
return return;
} }
if (nav.icon_type === 3) { if (nav.icon_type === 3) {
this.$router.push({ this.$router.push({
name: 'goods-detail', name: "goods-detail",
query: { query: {
goods_type: nav.goods_type, goods_type: nav.goods_type,
goods_id: nav.goods_id, goods_id: nav.goods_id,
temple_id: nav.temple_id, temple_id: nav.temple_id,
} },
}) });
} }
if (nav.icon_type === 1 || nav.icon_type === 2) { if (nav.icon_type === 1 || nav.icon_type === 2) {
this.$router.push({ this.$router.push({
name: 'everyday-donation', name: "everyday-donation",
query: { query: {
goods_type: nav.goods_type, goods_type: nav.goods_type,
goods_id: nav.goods_id, goods_id: nav.goods_id,
@@ -210,13 +207,13 @@ export default {
} }
}, },
onPushForRouteName(routeName) { onPushForRouteName(routeName) {
if(routeName === 'merit-box'){ if (routeName === "merit-box") {
return this.openBox(); return this.openBox();
} }
if(routeName === 'temple-list'){ if (routeName === "temple-list") {
return this.$router.push({ name: routeName, query: { hideTab: '1'}}) return this.$router.push({ name: routeName, query: { hideTab: "1" } });
} }
this.$router.push({ name: routeName }) this.$router.push({ name: routeName });
}, },
async getUserData() { async getUserData() {
const res = await getUserData(); const res = await getUserData();
@@ -224,17 +221,17 @@ export default {
}, },
onMoreProcess() { onMoreProcess() {
this.$router.push({ this.$router.push({
name: 'buddha-activity', name: "buddha-activity",
query: this.query query: this.query,
}); });
}, },
onToGoods(goods) { onToGoods(goods) {
this.$router.push({ this.$router.push({
name: 'goods-detail', name: "goods-detail",
query: { query: {
goods_id: goods.goods_id, goods_id: goods.goods_id,
temple_id: goods.temple_id temple_id: goods.temple_id,
} },
}); });
}, },
async getTempleIndex() { async getTempleIndex() {
@@ -243,14 +240,14 @@ export default {
this.data.icon_data = this.sliceNav(res.icon_data); this.data.icon_data = this.sliceNav(res.icon_data);
setTimeout(() => { setTimeout(() => {
document.title = res.temple_data.unit_name; document.title = res.temple_data.unit_name;
}, 30) }, 30);
this.wechatReady({ this.wechatReady({
...res.shareConfig, ...res.shareConfig,
link: location.href, link: location.href,
}) });
}, },
onTempleStation() { onTempleStation() {
this.$router.push({ name: 'user-temple-station'}) this.$router.push({ name: "user-temple-station" });
}, },
sliceNav(navData) { sliceNav(navData) {
const nav = []; const nav = [];
@@ -263,7 +260,7 @@ export default {
return nav; return nav;
}, },
} },
}; };
</script> </script>
@@ -291,11 +288,11 @@ export default {
} }
} }
.temple-station-in { .temple-station-in {
font-size: .4rem; font-size: 0.4rem;
background: $primary-color; background: #cf9e3b;
color: white; color: white;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
padding: .3rem .6rem; padding: 0.3rem 0.6rem;
border-radius: 1rem; border-radius: 1rem;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@@ -327,7 +324,7 @@ export default {
text-align: right; text-align: right;
.iconfont { .iconfont {
font-size: .8rem; font-size: 0.8rem;
} }
} }
} }
@@ -343,19 +340,19 @@ export default {
width: 1.33rem; width: 1.33rem;
height: 1.33rem; height: 1.33rem;
border-radius: 1.33rem; border-radius: 1.33rem;
margin-right: .4rem; margin-right: 0.4rem;
} }
.profile { .profile {
.name { .name {
font-size: .4rem; font-size: 0.4rem;
color: #666; color: #666;
} }
.account { .account {
margin-top: .2rem; margin-top: 0.2rem;
color: #666; color: #666;
font-size: .3rem; font-size: 0.3rem;
} }
} }
} }
@@ -363,18 +360,18 @@ export default {
.user-list { .user-list {
padding-left: 1rem; padding-left: 1rem;
margin-top: 1rem; margin-top: 1rem;
margin-right: .6rem; margin-right: 0.6rem;
li { li {
height: 1.2rem; height: 1.2rem;
line-height: 1.2rem; line-height: 1.2rem;
font-size: .4rem; font-size: 0.4rem;
display: flex; display: flex;
align-items: center; align-items: center;
img { img {
width: .8rem; width: 0.8rem;
margin-right: .27rem; margin-right: 0.27rem;
} }
& ~ li { & ~ li {
@@ -386,7 +383,7 @@ export default {
.panel-menu-btn { .panel-menu-btn {
position: fixed; position: fixed;
left: .53rem; left: 0.53rem;
bottom: 1.33rem; bottom: 1.33rem;
z-index: 1000; z-index: 1000;
width: 1.33rem; width: 1.33rem;
@@ -395,50 +392,49 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
background: $primary-color; background: #cf9e3b;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
border-radius: 50%; border-radius: 50%;
.iconfont { .iconfont {
font-size: .5rem; font-size: 0.5rem;
color: white; color: white;
} }
.menu-text { .menu-text {
font-size: .27rem; font-size: 0.27rem;
margin-top: .1rem; margin-top: 0.1rem;
} }
} }
.temple-manager { .temple-manager {
.manager { .manager {
display: flex; display: flex;
margin: .4rem; margin: 0.4rem;
& ~ .manager { & ~ .manager {
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
padding-top: .4rem; padding-top: 0.4rem;
} }
.avatar { .avatar {
width: 1rem; width: 1rem;
height: 1rem; height: 1rem;
border-radius: 1.33rem; border-radius: 1.33rem;
border: .08rem solid #f7e4bf; border: 0.08rem solid #f7e4bf;
vertical-align: top; vertical-align: top;
} }
.manager-container { .manager-container {
flex: 1; flex: 1;
margin-left: .4rem; margin-left: 0.4rem;
.name { .name {
padding: .3rem .3rem .3rem 0; padding: 0.3rem 0.3rem 0.3rem 0;
font-size: .4rem; font-size: 0.4rem;
color: #666; color: #666;
} }
.content { .content {
font-size: .35rem; font-size: 0.35rem;
line-height: 1.5; line-height: 1.5;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
@@ -452,18 +448,17 @@ export default {
} }
} }
} }
} }
.merit-rank-container { .merit-rank-container {
.head { .head {
padding: .53rem .4rem; padding: 0.53rem 0.4rem;
padding-bottom: .13rem; padding-bottom: 0.13rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.title { .title {
font-size: .43rem; font-size: 0.43rem;
color: #222222; color: #222222;
} }
@@ -471,12 +466,12 @@ export default {
display: flex; display: flex;
span { span {
font-size: .37rem; font-size: 0.37rem;
color: #999999; color: #999999;
display: inline-block; display: inline-block;
margin-left: .4rem; margin-left: 0.4rem;
border-bottom: .03rem solid transparent; border-bottom: 0.03rem solid transparent;
padding-bottom: .13rem; padding-bottom: 0.13rem;
} }
span.current { span.current {
@@ -503,42 +498,42 @@ export default {
} }
.van-swipe__indicator--active { .van-swipe__indicator--active {
background: $primary-color; background: #cf9e3b;
} }
} }
} }
.certed-temple { .certed-temple {
display: flex; display: flex;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
border-radius: 4px; border-radius: 4px;
margin: 0 .4rem; margin: 0 0.4rem;
align-items: center; align-items: center;
font-size: .37rem; font-size: 0.37rem;
padding: .3rem; padding: 0.3rem;
margin-bottom: .2rem; margin-bottom: 0.2rem;
.cert-icon { .cert-icon {
width: .3rem; width: 0.3rem;
margin-right: .1rem; margin-right: 0.1rem;
} }
.text { .text {
flex: 1; flex: 1;
font-size: .3rem; font-size: 0.3rem;
color: #888; color: #888;
padding-top: 2px; padding-top: 2px;
} }
.btn { .btn {
color: $primary-color; color: #cf9e3b;
} }
} }
.process-more { .process-more {
line-height: 1.5rem; line-height: 1.5rem;
text-align: center; text-align: center;
font-size: .4rem; font-size: 0.4rem;
.iconfont { .iconfont {
vertical-align: middle; vertical-align: middle;
@@ -546,8 +541,8 @@ export default {
} }
.container { .container {
padding: .4rem; padding: 0.4rem;
padding-bottom: .33rem; padding-bottom: 0.33rem;
.my-swipe .van-swipe-item { .my-swipe .van-swipe-item {
color: #fff; color: #fff;
@@ -558,36 +553,35 @@ export default {
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: .16rem; border-radius: 0.16rem;
} }
} }
.swiper { .swiper {
margin-bottom: .4rem; margin-bottom: 0.4rem;
} }
.van-notice-bar { .van-notice-bar {
border: 1px solid #E6B759; border: 1px solid #e6b759;
border-radius: .16rem; border-radius: 0.16rem;
} }
} }
.panel { .panel {
.panel-head { .panel-head {
padding: .53rem .4rem; padding: 0.53rem 0.4rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.title { .title {
font-size: .43rem; font-size: 0.43rem;
color: #222222; color: #222222;
} }
} }
.panel-body { .panel-body {
padding: 0 .4rem; padding: 0 0.4rem;
overflow-x: scroll; overflow-x: scroll;
.merit-group { .merit-group {
@@ -599,10 +593,10 @@ export default {
.temple-home-activity { .temple-home-activity {
.buddha-process { .buddha-process {
padding: 0 padding: 0;
} }
.process { .process {
padding: .4rem 0; padding: 0.4rem 0;
.bar { .bar {
padding-bottom: 0; padding-bottom: 0;
@@ -615,12 +609,12 @@ export default {
height: 3.39rem; height: 3.39rem;
display: inline-block; display: inline-block;
position: relative; position: relative;
border-radius: .16rem; border-radius: 0.16rem;
vertical-align: top; vertical-align: top;
overflow: hidden; overflow: hidden;
& ~ .merit { & ~ .merit {
margin-left: .4rem; margin-left: 0.4rem;
} }
img { img {
@@ -633,34 +627,34 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
height: .91rem; height: 0.91rem;
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
color: white; color: white;
line-height: .91rem; line-height: 0.91rem;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
font-size: .37rem; font-size: 0.37rem;
padding: 0 .11rem; padding: 0 0.11rem;
} }
} }
.temple-home-page { .temple-home-page {
.temple-home { .temple-home {
display: flex; display: flex;
font-size: .37rem; font-size: 0.37rem;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: .4rem .3rem; padding: 0.4rem 0.3rem;
.temple-name { .temple-name {
font-size: .45rem; font-size: 0.45rem;
color: #666; color: #666;
} }
.visitor { .visitor {
color: #999; color: #999;
font-size: .3rem; font-size: 0.3rem;
span { span {
padding-left: 10px; padding-left: 10px;
+40 -73
View File
@@ -13,12 +13,7 @@
<template v-if="!authing"> <template v-if="!authing">
<van-notice-bar text="真实法师社区,法师身份认证审核通过后才能使用" /> <van-notice-bar text="真实法师社区,法师身份认证审核通过后才能使用" />
<van-form @submit="onSubmit"> <van-form @submit="onSubmit">
<van-field <van-field v-model="form.nickname" label="法号" placeholder="请输入法号全称" :rules="[{ required: true }]" />
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"> <van-field label="称谓" v-model="form.rank_text" :rules="[{ required: true }]" readonly placeholder="请选择称谓" @click="showTitle = true">
<template #right-icon> <template #right-icon>
<span class="iconfont icon-arrow-down-filling"></span> <span class="iconfont icon-arrow-down-filling"></span>
@@ -29,17 +24,8 @@
<span class="iconfont icon-arrow-down-filling"></span> <span class="iconfont icon-arrow-down-filling"></span>
</template> </template>
</van-field> </van-field>
<van-field <van-field v-model="form.place_temple" type="text" label="驻锡寺院" placeholder="名称含所在城市; 如:深圳弘法寺" :rules="[{ required: true }]" />
v-model="form.place_temple" <van-field label="真人头像" placeholder="真人头像">
type="text"
label="驻锡寺院"
placeholder="名称含所在城市; 如:深圳弘法寺"
:rules="[{ required: true }]"
/>
<van-field
label="真人头像"
placeholder="真人头像"
>
<template #input> <template #input>
<div> <div>
<p class="input-small-tip">照片需清晰美观,用于信众展示</p> <p class="input-small-tip">照片需清晰美观,用于信众展示</p>
@@ -47,11 +33,7 @@
</div> </div>
</template> </template>
</van-field> </van-field>
<van-field <van-field type="text" label="戒牒照片" placeholder="戒牒照片">
type="text"
label="戒牒照片"
placeholder="戒牒照片"
>
<template #input> <template #input>
<div> <div>
<p class="input-small-tip">仅用于认证,不公开</p> <p class="input-small-tip">仅用于认证,不公开</p>
@@ -59,17 +41,8 @@
</div> </div>
</template> </template>
</van-field> </van-field>
<van-field <van-field v-model="form.description" type="textarea" label="自我介绍" placeholder="向他人展示自己的文字说明" :rules="[{ required: true }]" maxlength="500" :rows="4" show-word-limit />
v-model="form.description" <div style="margin: 16px">
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> <van-button round block type="temple" native-type="submit">提交</van-button>
</div> </div>
</van-form> </van-form>
@@ -80,19 +53,13 @@
<!-- 选择城市 --> <!-- 选择城市 -->
<van-popup v-model="showProvince" round position="bottom" safe-area-inset-bottom> <van-popup v-model="showProvince" round position="bottom" safe-area-inset-bottom>
<van-cascader <van-cascader v-model="cascaderValue" title="请选择所在地区" :options="cityOptions" @close="showProvince = false" @finish="onFinishProvince" />
v-model="cascaderValue"
title="请选择所在地区"
:options="cityOptions"
@close="showProvince = false"
@finish="onFinishProvince"
/>
</van-popup> </van-popup>
</div> </div>
</template> </template>
<script> <script>
import { getMonkAppellation, getRegion, certifyMonk } from '@/api'; import { getMonkAppellation, getRegion, certifyMonk } from "@/api";
export default { export default {
data() { data() {
@@ -100,21 +67,21 @@ export default {
showProvince: false, // 显示城市选择 showProvince: false, // 显示城市选择
showTitle: false, // 显示法师称谓 showTitle: false, // 显示法师称谓
form: { form: {
nickname: '', // 法号 nickname: "", // 法号
rank_id: '', // 称谓 rank_id: "", // 称谓
rank_text: '', // 称谓 rank_text: "", // 称谓
region: '', region: "",
place_temple: '', // 驻赐寺院 place_temple: "", // 驻赐寺院
avatar_url: [], // 法师照片 avatar_url: [], // 法师照片
cert_url: [], // 戒牒照片 cert_url: [], // 戒牒照片
description: '' description: "",
}, },
cascaderValue: '', cascaderValue: "",
cityOptions: [], cityOptions: [],
uploader: [], uploader: [],
actions: [], actions: [],
authing: false, // 是否正在认证 authing: false, // 是否正在认证
} };
}, },
mounted() { mounted() {
this.getParams(); this.getParams();
@@ -125,10 +92,10 @@ export default {
const [province_id, city_id, county_id] = form.city_id; const [province_id, city_id, county_id] = form.city_id;
const { avatar_url, cert_url } = form; const { avatar_url, cert_url } = form;
if (!avatar_url.length) { if (!avatar_url.length) {
return this.$toast.fail('请上传头像照片'); return this.$toast.fail("请上传头像照片");
} }
if (!cert_url.length) { if (!cert_url.length) {
return this.$toast.fail('请上传戒牒照片') return this.$toast.fail("请上传戒牒照片");
} }
const params = { const params = {
...this.form, ...this.form,
@@ -136,21 +103,21 @@ export default {
cert_url: this.form.cert_url[0].url, cert_url: this.form.cert_url[0].url,
province_id, province_id,
city_id, city_id,
county_id county_id,
} };
await certifyMonk(params) await certifyMonk(params);
this.$toast.success('认证信息提交成功') this.$toast.success("认证信息提交成功");
await this.$delay(2000) await this.$delay(2000);
await this.$router.replace({ name: 'user-temple-station-review'}) await this.$router.replace({ name: "user-temple-station-review" });
}, },
getParams() { getParams() {
getMonkAppellation().then(res => { getMonkAppellation().then((res) => {
this.actions = res; this.actions = res;
}) });
getRegion().then(city => { getRegion().then((city) => {
this.cityOptions = city this.cityOptions = city;
}) });
}, },
onSelect(action) { onSelect(action) {
this.form.rank_id = action.id; this.form.rank_id = action.id;
@@ -158,22 +125,22 @@ export default {
}, },
onFinishProvince({ selectedOptions }) { onFinishProvince({ selectedOptions }) {
this.showProvince = false; this.showProvince = false;
this.form.city_name = selectedOptions.map(v => v.text).join(' / ') this.form.city_name = selectedOptions.map((v) => v.text).join(" / ");
this.form.city_id = selectedOptions.map(v => v.value) this.form.city_id = selectedOptions.map((v) => v.value);
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.mega-approve { .mega-approve {
.input-small-tip { .input-small-tip {
font-size: .32rem; font-size: 0.32rem;
color: #aaa; color: #aaa;
} }
.van-button--temple { .van-button--temple {
background: $primary-color; background: #cf9e3b;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
color: white; color: white;
} }
.reviewing { .reviewing {
@@ -181,11 +148,11 @@ export default {
padding-top: 1.33rem; padding-top: 1.33rem;
.iconfont { .iconfont {
font-size: 2.33rem; font-size: 2.33rem;
color: $primary-color; color: #cf9e3b;
} }
.review-text { .review-text {
padding: .4rem 0; padding: 0.4rem 0;
font-size: .4rem; font-size: 0.4rem;
} }
.van-button { .van-button {
width: 60%; width: 60%;
+6 -6
View File
@@ -138,7 +138,7 @@ export default {
padding: 0 0.7rem; padding: 0 0.7rem;
border-top-left-radius: 1rem; border-top-left-radius: 1rem;
border-bottom-left-radius: 1rem; border-bottom-left-radius: 1rem;
background: $primary-color; background: #cf9e3b;
opacity: 0.8; opacity: 0.8;
height: 1.07rem; height: 1.07rem;
line-height: 1.07rem; line-height: 1.07rem;
@@ -155,7 +155,7 @@ export default {
justify-content: space-between; justify-content: space-between;
.feedback { .feedback {
font-size: 0.4rem; font-size: 0.4rem;
color: $primary-color; color: #cf9e3b;
} }
.title-text { .title-text {
font-size: 0.5rem; font-size: 0.5rem;
@@ -204,7 +204,7 @@ export default {
font-size: 0.4rem; font-size: 0.4rem;
flex: 1; flex: 1;
.btn { .btn {
background: $primary-color; background: #cf9e3b;
color: white; color: white;
font-size: 0.3rem; font-size: 0.3rem;
border-radius: 2px; border-radius: 2px;
@@ -244,7 +244,7 @@ export default {
position: absolute; position: absolute;
left: -0.2rem; left: -0.2rem;
top: -0.2rem; top: -0.2rem;
border: 0.2rem solid $primary-color; border: 0.2rem solid #cf9e3b;
transition: transform 0.1s linear; transition: transform 0.1s linear;
transform-origin: center center; transform-origin: center center;
} }
@@ -263,7 +263,7 @@ export default {
animation: scale 0.1s linear; animation: scale 0.1s linear;
} }
&::after { &::after {
border-color: $primary-color; border-color: #cf9e3b;
} }
} }
span { span {
@@ -317,7 +317,7 @@ export default {
display: block; display: block;
margin-top: 0.4rem; margin-top: 0.4rem;
font-size: 0.4rem; font-size: 0.4rem;
color: $primary-color; color: #cf9e3b;
} }
} }
.backword { .backword {
+52 -57
View File
@@ -58,7 +58,7 @@
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<a href="#"> <a href="#">
<img src="" alt=""> <img src="" alt="" />
</a> </a>
<div class="merit-rank-container"> <div class="merit-rank-container">
<div class="head"> <div class="head">
@@ -89,14 +89,12 @@
<button class="button">恭请法师加持</button> <button class="button">恭请法师加持</button>
</div> </div>
<!-- 计数 --> <!-- 计数 -->
<div class="on-count" @click="onToCount"> <div class="on-count" @click="onToCount">计数</div>
计数
</div>
</div> </div>
</template> </template>
<script> <script>
import { getCourseDetail } from "@/api" import { getCourseDetail } from "@/api";
export default { export default {
data() { data() {
@@ -106,11 +104,11 @@ export default {
data: null, data: null,
type_id: 1, type_id: 1,
types: [ types: [
{ id: 1, name: '实时' }, { id: 1, name: "实时" },
{ id: 2, name: '月榜' }, { id: 2, name: "月榜" },
{ id: 3, name: '总榜' }, { id: 3, name: "总榜" },
] ],
} };
}, },
mounted() { mounted() {
this.getCourseDetail(); this.getCourseDetail();
@@ -126,116 +124,114 @@ export default {
}, },
onToCount() { onToCount() {
this.$router.push({ this.$router.push({
name: 'user-course-count', name: "user-course-count",
query: { id: this.data.id } query: { id: this.data.id },
}) });
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.course-detail { .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%; background-size: 100%;
.on-count { .on-count {
position: fixed; position: fixed;
right: 0; right: 0;
bottom: 4rem; bottom: 4rem;
padding: 0 .7rem; padding: 0 0.7rem;
border-top-left-radius: 1rem; border-top-left-radius: 1rem;
border-bottom-left-radius: 1rem; border-bottom-left-radius: 1rem;
background: $primary-color; background: #cf9e3b;
opacity: 0.8; opacity: 0.8;
height: 1.07rem; height: 1.07rem;
line-height: 1.07rem; line-height: 1.07rem;
font-size: .4rem; font-size: 0.4rem;
color: white; color: white;
} }
.course-container { .course-container {
padding: .4rem; padding: 0.4rem;
.practice { .practice {
.title { .title {
font-size: .5rem; font-size: 0.5rem;
color: white; color: white;
padding-top: .4rem; padding-top: 0.4rem;
margin-bottom: 1.33rem; margin-bottom: 1.33rem;
} }
.accumulation { .accumulation {
font-size: .35rem; font-size: 0.35rem;
margin-bottom: .8rem; margin-bottom: 0.8rem;
p { p {
color: white; color: white;
font-size: .4rem; font-size: 0.4rem;
.iconfont { .iconfont {
margin-left: .4rem; margin-left: 0.4rem;
display: inline-block; display: inline-block;
} }
} }
.progress { .progress {
display: flex; display: flex;
margin-top: .2rem; margin-top: 0.2rem;
align-items: center; align-items: center;
color: white; color: white;
.progress-bar { .progress-bar {
flex: 1; flex: 1;
border-radius: 8px; border-radius: 8px;
margin-right: .27rem; margin-right: 0.27rem;
height: .3rem; height: 0.3rem;
background: #ddd; background: #ddd;
position: relative; position: relative;
.progress-inline { .progress-inline {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
height: .3rem; height: 0.3rem;
width: 50%; width: 50%;
background: #188fff; background: #188fff;
border-radius: 8px; border-radius: 8px;
} }
} }
.progress-text { .progress-text {
width: .7rem; width: 0.7rem;
display: inline-block; display: inline-block;
text-align: right; text-align: right;
} }
} }
} }
} }
} }
.buddhist-scriptures { .buddhist-scriptures {
padding: .4rem; padding: 0.4rem;
margin-top: .9rem; margin-top: 0.9rem;
.scriptures { .scriptures {
margin-bottom: .4rem; margin-bottom: 0.4rem;
.title { .title {
font-size: .4rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
} }
} }
} }
.merit-rank-container { .merit-rank-container {
.head { .head {
padding: .53rem .4rem; padding: 0.53rem 0.4rem;
padding-bottom: .13rem; padding-bottom: 0.13rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.title { .title {
font-size: .43rem; font-size: 0.43rem;
color: #222222; color: #222222;
} }
.list { .list {
display: flex; display: flex;
span { span {
font-size: .37rem; font-size: 0.37rem;
color: #999999; color: #999999;
display: inline-block; display: inline-block;
margin-left: .4rem; margin-left: 0.4rem;
border-bottom: .03rem solid transparent; border-bottom: 0.03rem solid transparent;
padding-bottom: .13rem; padding-bottom: 0.13rem;
} }
span.current { span.current {
color: #222; color: #222;
@@ -246,7 +242,7 @@ export default {
.body { .body {
.user-merit-course { .user-merit-course {
display: flex; display: flex;
padding: .27rem 0.4rem; padding: 0.27rem 0.4rem;
img { img {
width: 1.17rem; width: 1.17rem;
height: 1.17rem; height: 1.17rem;
@@ -255,17 +251,17 @@ export default {
} }
.profile { .profile {
flex: 1; flex: 1;
padding-top: .13rem; padding-top: 0.13rem;
.name { .name {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
margin-bottom: .27rem; margin-bottom: 0.27rem;
span:first-child { span:first-child {
font-size: 0.4rem; font-size: 0.4rem;
color: #777; color: #777;
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
margin-right: .4rem; margin-right: 0.4rem;
} }
span:last-child { span:last-child {
font-size: 0.32rem; font-size: 0.32rem;
@@ -283,7 +279,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
padding: .13rem 0; padding: 0.13rem 0;
text-align: right; text-align: right;
.money { .money {
font-size: 0.35rem; font-size: 0.35rem;
@@ -295,16 +291,15 @@ export default {
} }
.button-buff { .button-buff {
text-align: center; text-align: center;
padding: .4rem; padding: 0.4rem;
.button { .button {
background: $primary-color; background: #cf9e3b;
border: 1px solid $primary-color; border: 1px solid #cf9e3b;
font-size: .4rem; font-size: 0.4rem;
color: white; color: white;
border-radius: .13rem; border-radius: 0.13rem;
padding: .27rem .4rem; padding: 0.27rem 0.4rem;
} }
} }
} }
</style> </style>
+3 -3
View File
@@ -78,7 +78,7 @@ export default {
color: #999; color: #999;
padding-top: 0.2rem; padding-top: 0.2rem;
span { span {
color: $primary-color; color: #cf9e3b;
padding: 0 0.13rem; padding: 0 0.13rem;
font-weight: bold; font-weight: bold;
} }
@@ -134,7 +134,7 @@ export default {
font-size: 0.3rem; font-size: 0.3rem;
color: #666; color: #666;
span { span {
color: $primary-color; color: #cf9e3b;
font-weight: bold; font-weight: bold;
} }
} }
@@ -151,7 +151,7 @@ export default {
top: 0; top: 0;
height: 0.11rem; height: 0.11rem;
width: 50%; width: 50%;
background: $primary-color; background: #cf9e3b;
border-radius: 4px; border-radius: 4px;
} }
} }
-8
View File
@@ -50,13 +50,5 @@ module.exports = {
}, },
css: { css: {
sourceMap: false, sourceMap: false,
loaderOptions: {
scss: {
data: null,
},
postcss: {
plugins: [],
},
},
}, },
}; };
-9621
View File
File diff suppressed because it is too large Load Diff