更改阳上人往生者

This commit is contained in:
2022-03-21 18:09:42 +08:00
parent ec94965858
commit 2f4bd26b22
10 changed files with 81 additions and 33 deletions
+5 -1
View File
@@ -57,7 +57,7 @@ const postMobileCode = (mobile, code) => service.post('/api/sms-validate', { mob
const getGoodsDetail = (goods_type, goods_id, temple_id) => service.get(`/api/${goods_type}/get-info?id=${goods_id}&temple_id=${temple_id}`);
// 佛前供灯商品
const getGoodsLightDetail = (goods_type, goods_id, temple_id) => service.get(`/api/temple/light?id=${goods_id}&temple_id=${temple_id}`);
const getGoodsLightDetail = (goods_type, goods_id, temple_id) => service.get(`/api/temple/light?temple_id=${temple_id}`);
// 创建日行一善商品订单
const createFriendlyDayOrder = data => service.post('/api/order/create-friendly', data);
@@ -167,7 +167,11 @@ const getPlatformHome = agent_id => service.get(`/api/home?agent_id=${agent_id}`
// 查询是否登录
const hasLogin = () => service.get('/api/has-login');
// 查询
const getMeritTypes = () => service.get('/api/order/get-merit-types');
export {
getMeritTypes,
getDynamicDataByGoodsId,
hasLogin,
getHotWords,
+1 -1
View File
@@ -34,7 +34,7 @@ export default {
default(){
return []
}
}
},
},
data() {
return {
+1 -1
View File
@@ -400,7 +400,7 @@ export default {
}
.caret{
padding-bottom: 2.2rem;
padding-bottom: .2rem;
.head{
display: flex;
justify-content: space-between;
+50 -22
View File
@@ -5,7 +5,7 @@
<div class="field">
<label class="required">功德芳名</label>
<div class="input-wrapper">
<input class="input" :value="meritName" type="text" readonly placeholder="请填写功德主姓名" @click="onShowDialog('name')">
<input class="input" :value="meritName" type="text" readonly placeholder="请输入功德芳名" @click="onShowDialog('name')">
</div>
</div>
<div class="field">
@@ -15,6 +15,20 @@
<i class="iconfont icon-arrow-right"></i>
</div>
</div>
<template v-if="query.is_die == '1'">
<div class="field">
<label class="required">阳上人</label>
<div class="input-wrapper">
<input class="input" v-model="live_name" type="tel" placeholder="请填写阳上人">
</div>
</div>
<div class="field">
<label class="required">往生者</label>
<div class="input-wrapper">
<input class="input" v-model="die_name" type="tel" placeholder="请填写往生者">
</div>
</div>
</template>
<div class="field">
<label >手机号码</label>
<div class="input-wrapper">
@@ -25,7 +39,7 @@
</div>
<div class="btn-wrapper">
<span class="total">合计: ¥{{query.amount}}</span>
<span class="total">合计: <b class="price">¥{{query.amount}}</b></span>
<button type="button" @click="onNext">下一步</button>
</div>
@@ -36,7 +50,6 @@
</template>
<script>
export default {
name: 'fill-name',
data(){
@@ -48,7 +61,12 @@ export default {
dialogName: '',
showMeritName: false,
showDesire: false,
merit_names: []
merit_names: [],
meritTypes: [],
meritTypeId: null,
showBuddhi: true,
live_name: '', // 阳上人姓名
die_name: '', // 往生人姓名
}
},
computed: {
@@ -57,12 +75,11 @@ export default {
},
meritId(){
return this.merit_names.map(item => item.id).join(',')
}
},
created() {
},
},
methods: {
onShowDialog(){
this.showMeritName = true;
},
@@ -79,18 +96,10 @@ export default {
if(!this.meritId){
return this.$toast.fail('请填写功德芳名');
}
// if(!this.dream){
// return this.$toast.fail('请填写心愿');
// }
// if(!this.mobile){
// return this.$toast.fail('请填写功德主手机号');
// }
console.log('query', {
...this.$route.query,
dream: this.dream,
merit_name: this.meritName,
mobile: this.mobile,
})
if(this.query.is_die == 1 && (!this.live_name || !this.die_name)){
return this.$toast.fail('请填写阳上人与往生人')
}
this.$router.push({
name: 'pay',
query: {
@@ -98,13 +107,24 @@ export default {
dream: this.dream,
merit_name: this.meritName,
mobile: this.mobile,
live_name: this.live_name,
die_name: this.die_name
}
})
}
}
};
</script>
<style lang="scss">
.fill-name{
.field{
.van-radio__icon--checked .van-icon{
background: #CF9E3B;
border-color: #CF9E3B;
}
}
}
</style>
<style scoped lang="scss">
.fill-name{
background: #f9f9f9;
@@ -121,7 +141,7 @@ export default {
box-shadow: 0 0 .2rem rgba(0,0,0,0.05);
}
.field{
margin-bottom: .8rem;
margin-bottom: .6rem;
.required{
&::after{
content: '*';
@@ -132,16 +152,19 @@ export default {
label{
color: #333;
}
.input-wrapper{
margin-top: .2rem;
border: 1px solid rgba(183, 173, 173, 0.54);
padding: .2rem .3rem;
border-radius: .1rem;
position: relative;
background: #fdfdfd;
.input{
display: block;
width: 100%;
border: none;
background: transparent;
}
.input[type=textarea]{
min-height: 2rem;
@@ -175,8 +198,13 @@ export default {
align-items: center;
.total{
font-size: .4rem;
color: #666666;
color: $primary-color;
padding-left: .4rem;
.price{
font-size: .5rem;
line-height: 1;
font-weight: bold;
}
}
button{
background: linear-gradient(to bottom, $primary-color, #9f7313);
+4 -2
View File
@@ -32,7 +32,8 @@
</div>
<div>
<user-merit v-for="pay in payList" :key="pay.id" :data="pay"></user-merit>
<div class="read-more" v-if="noMore">没有更多了</div>
<div class="read-more" v-if="noMore && page > 1">没有更多了</div>
<div class="read-more" v-if="noMore && page === 1">暂无数据</div>
<div class="read-more" v-else @click="loadMoreFn">查看更多</div>
</div>
</div>
@@ -199,6 +200,7 @@ export default {
quantity: this.quantity,
title: this.data.name,
subTitle: selectedSpec.spec_name,
is_die: selectedSpec.is_die,
amount: this.priceTotal,
is_customized: this.spec_id === 'is_customized' ? 1 : 0,
from: 'common_goods', // 标识为通用商品
@@ -211,7 +213,7 @@ export default {
this.data = response;
await this.getPayRecords(this.lTypeId, 1);
this.$nextTick(() => {
this.paddingBottom = this.$refs.fixedBottom.getOffsetHeight()
this.paddingBottom = this.$refs.fixedBottom.getOffsetHeight() - 50
})
this.wechatReady({
...this.data.shareConfig,
+1
View File
@@ -229,6 +229,7 @@ export default {
title: this.data.details.title,
subTitle: this.currentLight.name + ':'+this.lightSize.name,
amount: this.totalPrice,
is_die: this.currentLight.is_die,
from: 'goods_light', // 标识为通用商品
}
})
+2 -2
View File
@@ -91,7 +91,8 @@ export default {
name: 'goods-detail',
query: {
goods_id: goods.goods_id,
temple_id: goods.temple_id
temple_id: goods.temple_id,
goods_type: goods.goods_type
}
})
},
@@ -103,7 +104,6 @@ export default {
query: {
goods_type: nav.goods_type,
temple_id: nav.temple_id,
goods_id: nav.goods_id,
}
})
return
+1 -1
View File
@@ -115,7 +115,7 @@ export default {
}
this.wechatReady({
title: `${this.info.unit_name} - 在线功德箱 | 已有 ${this.total} 人广种福田`,
title: `${this.info.unit_name} - 在线功德箱 | 已有 ${this.total} 人广种福田,布施增福慧,转发即功德!`,
desc: '随缘布施,广种福田,喜结善缘',
imgUrl: 'https://temple-h5.oss-cn-hangzhou.aliyuncs.com/uploads/common/merit_box.png',
link: location.href
+14 -1
View File
@@ -7,7 +7,11 @@
<h1 class="amount"><b>¥</b>{{query.amount}}</h1>
<div class="order-info">
<h3 class="goods_title">{{query.title}}</h3>
<div class="goods-lucky-to" >
<span>功德芳名:{{query.merit_name}}</span>
<span v-if="query.is_die == '1'">阳上人:{{query.live_name}}</span>
<span v-if="query.is_die == '1'">往生人:{{query.die_name}}</span>
</div>
<div class="desc">
<!-- subTitle: 规格名称 -->
<span>{{query.subTitle}}</span>
@@ -165,6 +169,15 @@ export default {
font-size: .4rem;
font-weight: bold;
}
.goods-lucky-to{
font-size: .35rem;
padding-top: .4rem;
span ~ span{
padding-left: .2rem;
border-left: 1px solid #ddd;
margin-left: .2rem;
}
}
.desc{
padding-top: .5rem;
color: #666;
+1 -1
View File
File diff suppressed because one or more lines are too long