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

This commit is contained in:
aixianling
2023-04-04 18:11:04 +08:00
3 changed files with 104 additions and 62 deletions

View File

@@ -10,7 +10,7 @@
<span v-else>欢迎进入{{ user.areaName }}</span> <span v-else>欢迎进入{{ user.areaName }}</span>
</div> </div>
<div class="signin" @click="toPages('./signIn')">签到</div> <div class="signin" @click="toPages('./signIn',status)">{{ status==1? '已签到':'签到' }}</div>
</div> </div>
<div class="card-list"> <div class="card-list">
<div class="jfsq" @click="toPages('./integralApply')"> <div class="jfsq" @click="toPages('./integralApply')">
@@ -30,15 +30,16 @@
<h4>兑换得好物</h4> <h4>兑换得好物</h4>
</div> </div>
</div> </div>
<div class="handpick"> <div class="handpick" v-if="list.length">
<div class="title"> <div class="title">
<h1>精选动态</h1> <h1>精选动态</h1>
<div class="more" @click="toPages('./handpick')"> <div class="more" v-if="list.length > 3" @click="toPages('./handpick')">
<span>更多</span> <span>更多</span>
<u-icon name="arrow-right" color="#687DA6" size="28"></u-icon> <u-icon name="arrow-right" color="#687DA6" size="28"></u-icon>
</div> </div>
</div> </div>
<div class="list" @click="toPages('内容建设中...')"> <div class="list" v-if="list.length">
<div class="card" v-for="(item,index) in list" :key="index" @click="toPages(`./handpick?id=${item.id}`)">
<div class="top"> <div class="top">
<div class="left">百年征和波澜壮阔百年初心历争议弥坚7月1日上午庆祝中国共产党成立100周年</div> <div class="left">百年征和波澜壮阔百年初心历争议弥坚7月1日上午庆祝中国共产党成立100周年</div>
<div class="right"> <div class="right">
@@ -52,6 +53,8 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <AiEmpty :description="`暂无数据`" class="emptyWrap" v-else/> -->
</div>
</div> </div>
</template> </template>
@@ -62,24 +65,32 @@ export default {
appName: "功德银行", appName: "功德银行",
data() { data() {
return { return {
status: null,
current: 1,
list: [],
} }
}, },
computed: { computed: {
...mapState(['user']) ...mapState(['user'])
}, },
methods: { methods: {
getList() { getList(moduleId) {
this.$instance.post(``).then(res=> { this.$instance.post(`/app/appcontentinfo/list-web`,null,{
params: {
moduleId: moduleId,
current: this.current,
// areaId: this.user.areaId
}
}).then(res=> {
if(res?.data) { if(res?.data) {
console.log(res); this.list = res.data.records.length > 3 ? res.data.records.slice(2) : res.data.records
} }
}) })
}, },
handleBannerClick() { handleBannerClick() {
}, },
toPages(url) { toPages(url,status) {
if(!this.user.idNumber) { if(!this.user.idNumber) {
this.$dialog.confirm({ this.$dialog.confirm({
content: '您只有完成信息认证后,才可进行相关操作。', content: '您只有完成信息认证后,才可进行相关操作。',
@@ -89,22 +100,41 @@ export default {
}).catch(() => { }).catch(() => {
}) })
} else { } else {
if(!status) {
this.$linkTo(url) this.$linkTo(url)
} else {
// 停留
} }
} }
}, },
getStatus() {
this.$instance.post(`/app/appwechatsigninfo/checkSign`).then(res=> {
if(res?.data !== null) {
this.status = 1
}
})
},
getModule() {
this.$instance.post(`/app/appintegraluserapply/queryModuleByName`).then(res=> {
if(res?.data) {
this.getList(res.data)
}
})
}
},
onShow() { onShow() {
uni.setNavigationBarTitle({ this.getStatus()
title: '功德银行' this.getModule()
});
// this.getList()
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.AppNewFarmerBank { .AppNewFarmerBank {
padding-bottom: 20px;
box-sizing: border-box;
.swiper-content { .swiper-content {
width: 100%; width: 100%;
height: 332px; height: 332px;
@@ -221,11 +251,12 @@ export default {
} }
.list { .list {
.card {
margin-bottom: 24px;
padding: 32px 24px; padding: 32px 24px;
box-sizing: border-box; box-sizing: border-box;
background: #FFF; background: #FFF;
border-radius: 12px; border-radius: 12px;
// margin-bottom: 24px;
.top { .top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -260,5 +291,6 @@ export default {
} }
} }
} }
}
</style> </style>

View File

@@ -84,6 +84,10 @@ export default {
return this.$u.toast('请选择事件类型') return this.$u.toast('请选择事件类型')
} }
if (!this.form.content) {
return this.$u.toast('请输入详细描述')
}
if ((this.form.images.length + this.form.videos.length) > 9) { if ((this.form.images.length + this.form.videos.length) > 9) {
return this.$u.toast('图片和视频不得超过9个') return this.$u.toast('图片和视频不得超过9个')
} else { } else {
@@ -98,7 +102,6 @@ export default {
this.$instance.post(`/app/appintegraluserapply/addOrUpdate`,{ this.$instance.post(`/app/appintegraluserapply/addOrUpdate`,{
...this.form ...this.form
}).then(res=> { }).then(res=> {
this.flag = false
if(res?.data) { if(res?.data) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
uni.$emit('edit') uni.$emit('edit')

View File

@@ -5,10 +5,10 @@
<img src="https://cdn.cunwuyun.cn/fengdu/img-qiandaochenggong.png" alt=""> <img src="https://cdn.cunwuyun.cn/fengdu/img-qiandaochenggong.png" alt="">
</div> </div>
<p class="status">今日已完成签到</p> <p class="status">今日已完成签到</p>
<h4>积分<span>+5</span></h4> <h4>积分<span v-if="data.changeIntegral">+{{ data.changeIntegral || 0}}</span></h4>
<div class="times"> <div class="times">
<div>时间</div> <div>时间</div>
<div class="value">2020-12-11 10:10</div> <div class="value">{{ data.createTime.slice(0,16) }}</div>
</div> </div>
</div> </div>
</div> </div>
@@ -20,14 +20,21 @@ export default {
appName: '签到', appName: '签到',
data() { data() {
return { return {
showPage: false,
data: {},
} }
}, },
methods: { methods: {
sign() {
this.$instance.post(`/app/appwechatsigninfo/sign`,{}).then(res=> {
if(res?.data) {
this.data = res.data
}
})
}
}, },
onShow() { onShow() {
this.sign()
} }
} }
</script> </script>