Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2023-03-31 15:00:36 +08:00
6 changed files with 189 additions and 65 deletions

View File

@@ -21,8 +21,8 @@
</div>
<div class="card">
<div class="card-left">
<div class="left-word" @click="$linkTo('/mods/AppNewFarmerBank/AppNewFarmerBank')">
<div class="card-left" @click="$linkTo('/mods/AppNewFarmerBank/AppNewFarmerBank')">
<div class="left-word">
<p>功德银行</p>
<div>行好事</div>
<div>得积分</div>

View File

@@ -6,7 +6,7 @@
<div class="welcome">
<div class="welcome-user">
<span class="name">{{ user.realName || user.nickName }}</span>
<span v-if="!user.idNumber">欢迎来功德银行</span>
<span v-if="!user.idNumber">欢迎来功德银行</span>
<span v-else>欢迎进入{{ user.areaName }}</span>
</div>

View File

@@ -1,6 +1,11 @@
<template>
<div class="integralAdd">
<div class="item">
<div class="left">事件类型</div>
<!-- <div class="right"> -->
<AiSelect class="right" dict="clapEventStatus" v-model="form.type"></AiSelect>
<!-- </div> -->
</div>
</div>
</template>
@@ -10,14 +15,32 @@ export default {
appName: '积分申请',
data() {
return {
form: {
type: 0,
}
}
},
onLoad(o) {
this.$dict.load(['clapEventStatus'])
}
}
</script>
<style lang="scss" scoped>
.integralAdd {
.item {
width: 100%;
display: flex;
justify-content: space-between;
background: #FFF;
padding: 24px 32px;
.left {
width: 250px;;
}
.right {
width: calc(100% - 200px);
text-align: right;
}
}
}
</style>

View File

@@ -1,6 +1,21 @@
<template>
<div class="integralApply">
<div class="card-list">
<div class="card">
<div class="left">
<div class="title">房钱午后卫生</div>
<div class="time">2020-12-11 10:10</div>
</div>
<div class="right">
<div class="integral">+5</div>
<div class="status">待审核</div>
</div>
</div>
</div>
<AiEmpty :description="`暂无数据`" class="emptyWrap"/>
<div class="btn-wrapper">
<div class="btn" hover-class="text-hover" @click="toAdd">积分申请</div>
</div>
</div>
</template>
@@ -14,7 +29,9 @@ export default {
}
},
methods: {
toAdd() {
this.$linkTo('./integralAdd')
}
},
onShow() {
@@ -24,6 +41,67 @@ export default {
<style lang="scss" scoped>
.integralApply {
padding-bottom: 120px;
box-sizing: border-box;
.card-list {
margin-top: 24px;
background: #FFF;
.card {
padding: 32px 40px;
box-sizing: border-box;
border-bottom: 1px solid #EEEEEE;
display: flex;
align-items: center;
.left {
width: calc(100% - 200px);
.title {
font-size: 32px;
font-weight: 600;
}
.time {
font-size: 28px;
font-weight: 400;
color: #666666;
margin-top: 8px;
}
}
.right {
width: 200px;
text-align: right;
.integral {
font-size: 38px;
font-weight: 600;
}
.status {
font-size: 28px;
font-weight: 400;
margin-top: 8px;
}
.status0 {
color: #FF9A40;
}
.status0 {
color: #5AAD6A;
}
.status0 {
color: #CD413A;
}
}
}
}
::v-deep .btn-wrapper {
background: #FFF;
}
::v-deep .btn-wrapper .btn {
height: 80px;
line-height: 80px;
border-radius: 40px;
}
}
</style>

View File

@@ -8,13 +8,13 @@
</div>
</div>
<div class="rank">
<div class="header-content" v-if="userInfo">
<div class="header-content" v-if="userInfo.length">
<div class="item">
<span class="item-num">{{ inx + 1 }}</span>
<image :src="userInfo.avatar_url" alt="" class="user-img mar-b4" v-if="userInfo.avatar_url" />
<span class="user-name-bg mar-b4 mar-r24" v-else>{{ $formatName(userInfo.name) }}</span>
<span class="item-name">{{ userInfo.name }}</span>
<span class="item-point">{{ userInfo.integral }}</span>
<image :src="userInfo[0].avatar_url" alt="" class="user-img mar-b4" v-if="userInfo[0].avatar_url" />
<span class="user-name-bg mar-b4 mar-r24" v-else>{{ $formatName(userInfo[0].name) }}</span>
<span class="item-name">{{ userInfo[0].name }}</span>
<span class="item-point">{{ userInfo[0].integral }}</span>
</div>
</div>
<div class="faultage"></div>
@@ -90,7 +90,7 @@ export default {
this.$instance.post(url).then(res => {
if (res.code === 0) {
this.list = res.data.map(e=> ({...e, index: e.index}))
this.userInfo = res.data.filter(e => e.open_id === this.user.openId)[0]
this.userInfo = res.data.filter(e => e.open_id === this.user.openId)
this.inx = res.data.findIndex(e=> e.open_id == this.user.openId)
console.log(this.inx);
this.pageShow = true

View File

@@ -1,64 +1,67 @@
<template>
<div class="taskDetail">
<div class="task">
<h4>{{ info.title }}</h4>
<p>{{ info.detail }}</p>
<div class="imgs" v-if="info.files">
<image :src="item.url" v-for="(item, index) in info.files" :key="index" mode="aspectFill" @click="preview(item.url)" />
<div class="page">
<div class="taskDetail" v-if="showPages">
<div class="task">
<h4>{{ info.title }}</h4>
<p>{{ info.detail }}</p>
<div class="imgs" v-if="info.files">
<image :src="item.url" v-for="(item, index) in info.files" :key="index" mode="aspectFill" @click="preview(item.url)" />
</div>
</div>
</div>
<div class="info">
<div class="title">基础信息</div>
<div class="items">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-dizhi.png" alt="">
<div class="items-info">
<label>活动地点</label>
<div class="value">{{ info.address }}</div>
<div class="info">
<div class="title">基础信息</div>
<div class="items">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-dizhi.png" alt="">
<div class="items-info">
<label>活动地点</label>
<div class="value">{{ info.address }}</div>
</div>
<div class="address" @click="toAddress">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-daohang.png" alt="">
<i>导航</i>
</div>
</div>
<div class="address" @click="toAddress">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-daohang.png" alt="">
<i>导航</i>
<div class="item">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-renwuleixing.png" alt="">
<div class="item-info">
<label>任务类型</label>
<div class="value">{{ $dict.getLabel('fdIntegralTaskType', info.type) }}</div>
</div>
</div>
<div class="item">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-jinchangshijian.png" alt="">
<div class="item-info" v-if="info.intoBegintime && info.intoEndtime">
<label>{{ info.type == 0 ? '进场时间:' : '报名时间:' }}</label>
<div class="value">{{ info.intoBegintime.substring(0, 16) }} {{ info.intoEndtime.substring(0, 16) }}</div>
</div>
</div>
<div class="item" v-if="info.type == 0">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-lichangshijian.png" alt="">
<div class="item-info" v-if="info.exitBegintime && info.exitEndtime">
<label>离场时间</label>
<div class="value">{{ info.exitBegintime.substring(0, 16) }} {{ info.exitEndtime.substring(0, 16) }}</div>
</div>
</div>
</div>
<div class="item">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-renwuleixing.png" alt="">
<div class="item-info">
<label>任务类型</label>
<div class="value">{{ $dict.getLabel('fdIntegralTaskType', info.type) }}</div>
<div class="btn-wrapper" v-if="info.type == 1">
<div class="btn" @click="signUp" hover-class="text-hover" :class="baoming == 1 ? 'opacity' : baoming == 0 ? 'gray' : ''">
<span v-if="baoming == 2 || baoming == 0">报名得积分<span v-if="baoming == 2">/积分+{{ info.enrollIntegral }}</span></span>
<span v-if="baoming == 1">已报名</span>
</div>
</div>
<div class="item">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-jinchangshijian.png" alt="">
<div class="item-info" v-if="info.intoBegintime && info.intoEndtime">
<label>{{ info.type == 0 ? '进场时间:' : '报名时间:' }}</label>
<div class="value">{{ info.intoBegintime.substring(0, 16) }} {{ info.intoEndtime.substring(0, 16) }}</div>
</div>
</div>
<div class="item" v-if="info.type == 0">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-lichangshijian.png" alt="">
<div class="item-info" v-if="info.exitBegintime && info.exitEndtime">
<label>离场时间</label>
<div class="value">{{ info.exitBegintime.substring(0, 16) }} {{ info.exitEndtime.substring(0, 16) }}</div>
<div class="btn-wrapper" v-if="info.type == 0">
<div class="btn" @click="clockIn" hover-class="text-hover" :class="isClock == 0 ? 'gray' : isClock == 3 ? 'gray' : isClock == 2 ? 'opacity' : isClock == 4 ? 'opacity' : ''">
<div class="daka">{{ dkqd }}<span v-if="isClock == 1">/积分+{{ intoIntegral }}</span></div>
</div>
</div>
</div>
<div class="btn-wrapper" v-if="info.type==1">
<div class="btn" @click="signUp" hover-class="text-hover" :class="baoming==1? 'opacity': baoming == 0? 'gray':''">
<span v-if="baoming==2 || baoming == 0">报名得积分<span v-if="baoming==2">/积分+{{ info.enrollIntegral }}</span></span>
<span v-if="baoming==1">已报名</span>
</div>
</div>
<div class="btn-wrapper" v-if="info.type == 0">
<div class="btn" @click="clockIn" hover-class="text-hover" :class="isClock== 0? 'gray': isClock==3? 'gray': isClock== 2? 'opacity': isClock == 4? 'opacity':''">
<div class="daka">{{ dkqd }}<span v-if="isClock==1">/积分+{{ intoIntegral }}</span></div>
</div>
</div>
<AiLogin ref="login" @success="getAuth()"/>
</div>
</template>
<script>
import { mapState } from 'vuex'
import { mapState, mapActions } from 'vuex'
var QQMapWX = require('./libs/qqmap-wx-jssdk.js')
export default {
name: "taskDetail",
@@ -73,10 +76,11 @@ export default {
qqmapsdk: null,
distance: 100,
flag: false,
showPages: false,
}
},
computed: {
...mapState(['user']),
...mapState(['user', 'token']),
intoIntegral() {
const times = new Date().getTime()
const inSTimes = new Date(this.info.intoBegintime?.replaceAll('-', '/')).getTime()
@@ -174,6 +178,7 @@ export default {
}
},
methods: {
...mapActions(['getUserInfo']),
toAddress() {
wx.openLocation({
latitude: this.info.lat,
@@ -335,17 +340,35 @@ export default {
}
})
},
getAuth() {
this.$nextTick(() => {
this.token && this.getUserInfo('qujing')
})
}
},
onLoad(o) {
this.id = o.id
this.id = o?.id
if (decodeURIComponent(o.scene) != 'undefined') {
this.id = decodeURIComponent(o.scene)
}
uni.setNavigationBarTitle({
title: '任务详情'
});
this.getDetail()
if (!this.token) {
this.$refs.login.show()
}
if (!this.user.idNumber) {
this.$dialog.confirm({
content: '您只有完成信息认证后,才可进行相关操作。',
confirmText: '去认证'
}).then(() => {
this.$linkTo('/pages/AppMine/userInfo')
}).catch(() => {
})
} else {
this.getDetail()
this.showPages = true
}
this.qqmapsdk = new QQMapWX({
key: process.env.NODE_ENV == 'production' ? 'RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S' : '3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY'
})