[锶源昆仑-寺庙捐赠活动]

This commit is contained in:
2023-05-15 13:53:32 +08:00
parent 1b6eb2668c
commit c9b18c9074
284 changed files with 9505 additions and 3822 deletions

View File

@@ -3,15 +3,14 @@
<view class="exhibition">
<rich-text :nodes="detailsImg"></rich-text>
</view>
<view class="exhibition-receive">
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="popClick">
记录三高
<!-- <view class="exhibition-receive">
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="userCode">
活动分享
</view>
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="judge()">
{{nowText}}
</view>
<!-- $Router.push({name: 'UserCode'}) -->
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="userCode">
活动分享
</view>
</view>
</view> -->
<view class="popBack" v-if="popShow"></view>
<view class="popCont" v-if="popShow">
@@ -82,6 +81,8 @@
<script>
import { goods, Receive, create, index } from '@/apis/interfaces/mall'
import { authFollow } from '@/apis/interfaces/authUrl'
import { userIndex } from '@/apis/interfaces/user'
export default {
data() {
return {
@@ -110,17 +111,25 @@
regiArr : [],
regiId : 0,
regiIndex : 0,
}
},
nowStatus : '', //流程判断
nowText : '',
popStatus : false, //流程判断弹出层状态
userData : ''
};
},
onShow() {
// 获取商品详情数据
this.detailsInfo();
this.detailsInfo();
// 获取用户信息
// this.userInfo();
},
methods: {
// 商品详情数据
detailsInfo() {
goods(2).then(res => {
goods(1).then(res => {
this.detailsData = res
this.detailsImg = res.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
this.canSample = res.canSample
@@ -132,6 +141,60 @@
})
},
// 用户信息
userInfo() {
userIndex().then(res => {
this.userData = res
this.nowStatus = res.nowStatus
if(res.nowStatus.value == 'isSubscribe') {
this.nowText = '关注公众号'
} else if(res.nowStatus.value == 'isCase') {
this.nowText = '创建档案'
}
else if(res.nowStatus.value == 'isVip') {
this.nowText = '开通季度会员'
}else {
this.nowText = '上传报告'
}
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 流程判断
judge(name){
switch (this.nowStatus.value) {
// 关注公众号
case 'isSubscribe':
// 获取微信授权信息
authFollow({
url: '/wechat'
}).then(res => {
window.location.href = res
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
break;
// 创建档案
case 'isCase':
this.$Router.push({name: 'Attestation'})
break;
case 'isVip':
this.$Router.push({name: 'memberIndex'})
break;
// 创建档案
default:
this.$Router.push({name: 'Attestation', params: { hasCase: this.userData.status.isCase }})
break;
}
},
// 去登陆
popLogin() {
this.$Router.push({ name: 'Login' });
@@ -310,7 +373,7 @@
}
.exhibition {
border-bottom: 120rpx solid transparent;
// border-bottom: 120rpx solid transparent;
.exhibition-img {
width: 100vw;
}
@@ -328,7 +391,7 @@
box-sizing: border-box;
z-index: 9;
.exhibition-receive-btn {
background-color: $mian-color;
background-color: #bf9960;
color: #FFFFFF;
height: 88rpx;
line-height: 88rpx;