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>
<div class="card"> <div class="card">
<div class="card-left"> <div class="card-left" @click="$linkTo('/mods/AppNewFarmerBank/AppNewFarmerBank')">
<div class="left-word" @click="$linkTo('/mods/AppNewFarmerBank/AppNewFarmerBank')"> <div class="left-word">
<p>功德银行</p> <p>功德银行</p>
<div>行好事</div> <div>行好事</div>
<div>得积分</div> <div>得积分</div>

View File

@@ -6,7 +6,7 @@
<div class="welcome"> <div class="welcome">
<div class="welcome-user"> <div class="welcome-user">
<span class="name">{{ user.realName || user.nickName }}</span> <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> <span v-else>欢迎进入{{ user.areaName }}</span>
</div> </div>

View File

@@ -1,6 +1,11 @@
<template> <template>
<div class="integralAdd"> <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> </div>
</template> </template>
@@ -10,14 +15,32 @@ export default {
appName: '积分申请', appName: '积分申请',
data() { data() {
return { return {
form: {
type: 0,
}
} }
}, },
onLoad(o) {
this.$dict.load(['clapEventStatus'])
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.integralAdd { .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> </style>

View File

@@ -1,6 +1,21 @@
<template> <template>
<div class="integralApply"> <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> </div>
</template> </template>
@@ -14,7 +29,9 @@ export default {
} }
}, },
methods: { methods: {
toAdd() {
this.$linkTo('./integralAdd')
}
}, },
onShow() { onShow() {
@@ -24,6 +41,67 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.integralApply { .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> </style>

View File

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

View File

@@ -1,5 +1,6 @@
<template> <template>
<div class="taskDetail"> <div class="page">
<div class="taskDetail" v-if="showPages">
<div class="task"> <div class="task">
<h4>{{ info.title }}</h4> <h4>{{ info.title }}</h4>
<p>{{ info.detail }}</p> <p>{{ info.detail }}</p>
@@ -55,10 +56,12 @@
</div> </div>
</div> </div>
</div> </div>
<AiLogin ref="login" @success="getAuth()"/>
</div>
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState, mapActions } from 'vuex'
var QQMapWX = require('./libs/qqmap-wx-jssdk.js') var QQMapWX = require('./libs/qqmap-wx-jssdk.js')
export default { export default {
name: "taskDetail", name: "taskDetail",
@@ -73,10 +76,11 @@ export default {
qqmapsdk: null, qqmapsdk: null,
distance: 100, distance: 100,
flag: false, flag: false,
showPages: false,
} }
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user', 'token']),
intoIntegral() { intoIntegral() {
const times = new Date().getTime() const times = new Date().getTime()
const inSTimes = new Date(this.info.intoBegintime?.replaceAll('-', '/')).getTime() const inSTimes = new Date(this.info.intoBegintime?.replaceAll('-', '/')).getTime()
@@ -174,6 +178,7 @@ export default {
} }
}, },
methods: { methods: {
...mapActions(['getUserInfo']),
toAddress() { toAddress() {
wx.openLocation({ wx.openLocation({
latitude: this.info.lat, latitude: this.info.lat,
@@ -335,17 +340,35 @@ export default {
} }
}) })
}, },
getAuth() {
this.$nextTick(() => {
this.token && this.getUserInfo('qujing')
})
}
}, },
onLoad(o) { onLoad(o) {
this.id = o.id this.id = o?.id
if (decodeURIComponent(o.scene) != 'undefined') { if (decodeURIComponent(o.scene) != 'undefined') {
this.id = decodeURIComponent(o.scene) this.id = decodeURIComponent(o.scene)
} }
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '任务详情' title: '任务详情'
}); });
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.getDetail()
this.showPages = true
}
this.qqmapsdk = new QQMapWX({ this.qqmapsdk = new QQMapWX({
key: process.env.NODE_ENV == 'production' ? 'RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S' : '3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY' key: process.env.NODE_ENV == 'production' ? 'RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S' : '3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY'
}) })