Compare commits
12 Commits
65459954ad
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d50cb09d98 | ||
|
|
ed1fc2b718 | ||
|
|
bcd540914a | ||
|
|
b9b70ea740 | ||
|
|
1de1e3b6d6 | ||
|
|
549dc9f18e | ||
|
|
7274566ef7 | ||
|
|
ba3b2ba0e1 | ||
|
|
025f42bf76 | ||
|
|
9528bf2553 | ||
|
|
0d20009d04 | ||
|
|
f83091b0e6 |
664
src/project/icswb/AppEnteringVillage/AppEnteringVillage.vue
Normal file
@@ -0,0 +1,664 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="header" :class="[isFixed ? 'header-active' : '']">
|
||||
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
||||
<div class="nav-bar">
|
||||
<h2>活动</h2>
|
||||
</div>
|
||||
</div>
|
||||
<header>
|
||||
<image src="https://cdn.sinoecare.com/i/2024/07/23/669f246434b23.png"/>
|
||||
<div>
|
||||
<AiAreaPicker :selectRoot="false" ref="area" :value="areaId" :name.sync="areaName" :areaId="$areaId"
|
||||
@input="areaSelect">
|
||||
<div class="ai-area__wrapper">
|
||||
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||
<span v-else>请选择</span>
|
||||
<image src="/static/img/area-bottom.png"/>
|
||||
</div>
|
||||
</AiAreaPicker>
|
||||
<div class="welcome">欢迎进入{{ areaName }}</div>
|
||||
<div class="tag" v-if="user.homeArea === areaId">我的家乡</div>
|
||||
<div class="tag1" @click="updateUserInfo" v-if="!user.homeArea && token">设为家乡</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- <div class="card">-->
|
||||
<!-- <div class="card-item" hover-class="text-hover" @click="$linkTo('/mods/AppVillagerInfo/AppVillagerInfo?type=0')">-->
|
||||
<!-- <image src="/static/img/bcjj.png"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="card-item" hover-class="text-hover" @click="$linkTo('/mods/AppVillagerInfo/AppVillagerInfo?type=4')">-->
|
||||
<!-- <image src="/static/img/cgmy.png"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="card-item" hover-class="text-hover"-->
|
||||
<!-- @click="linkTo('/mods/AppCreditPoints/AppIntegralRanking', 'idNumber')">-->
|
||||
<!-- <image src="/static/img/jfph.png"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="card-item" hover-class="text-hover"-->
|
||||
<!-- @click="linkTo('/mods/AppVillagerDiscussion/AppVillagerDiscussion', 'idNumber')">-->
|
||||
<!-- <image src="/static/img/cmys.png"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="banner" @click="linkTo('/mods/AppCreditPoints/AppCpSupermarket', 'idNumber')">
|
||||
<image src="/static/img/jf-banner.png" class="banner"/>
|
||||
</div>
|
||||
<tempalte v-if="publicList.length">
|
||||
<div class="title-wrap">
|
||||
<span class="title">三务公开</span>
|
||||
<div class="right" hover-class="text-hover"
|
||||
@click="$linkTo(`/mods/AppContent/AppContent?names=三务公开&areaId=${areaId}`)">
|
||||
<span class="title-more">更多专题</span>
|
||||
<u-icon name="arrow-right" size="28" color="#999999"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-news">
|
||||
<div class="news-wrap" v-for="(item,index) in publicList" :key="index"
|
||||
@click="$linkTo('/mods/AppContent/contentDetail?id='+ item.id)">
|
||||
<div class="news-title">{{ item.title }}</div>
|
||||
<div class="news-bottom">
|
||||
<div class="tag">{{ item.categoryName }}</div>
|
||||
<div class="date">{{ item.createTime ? item.createTime.split(' ')[0] : '' }}</div>
|
||||
<div class="view">
|
||||
<em>{{ item.viewCount }}</em>
|
||||
人看过
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tempalte>
|
||||
<div class="title-wrap" v-if="activityList.length">
|
||||
<span class="title">居民活动</span>
|
||||
<div class="right">
|
||||
<span class="title-more" @click="$linkTo('/mods/AppVillageActivity/AppVillageActivity')">更多活动</span>
|
||||
<u-icon name="arrow-right" size="28" color="#999999"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<scroll-view :scroll-x="true" style="width: 100%" class="scroll-wrap" v-if="activityList.length">
|
||||
<div
|
||||
class="scroll-card"
|
||||
@click="$linkTo('/mods/AppVillageActivity/ActivityDetail?id=' + item.id)"
|
||||
hover-class="text-hover"
|
||||
v-for="(item, index) in activityList"
|
||||
:key="index">
|
||||
<image :src="item.url" mode="aspectFill"/>
|
||||
<div class="text">
|
||||
<span>{{ item.title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!activityList.length"></AiEmpty>
|
||||
</scroll-view>
|
||||
<!-- <div class="title-wrap">-->
|
||||
<!-- <span class="title">乡村相册</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="album-list">-->
|
||||
<!-- <div-->
|
||||
<!-- class="album"-->
|
||||
<!-- v-for="(item, index) in albumList"-->
|
||||
<!-- hover-class="text-hover"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- @click="$linkTo('/mods/AppPhotoAlbum/AppPhotoAlbum?type=' + item.type + '&name=' + item.name + '&url=' + item.coverImg)">-->
|
||||
<!-- <image :src="item.coverImg"/>-->
|
||||
<!-- <div class="total">共{{ item.total }}张</div>-->
|
||||
<!-- <div class="desc">{{ item.name }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <AiEmpty style="width: 100%" v-if="!albumList.length"></AiEmpty>-->
|
||||
<!-- </div>-->
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "AppEnteringVillage",
|
||||
appName: "进村",
|
||||
customNavigation: true,
|
||||
data() {
|
||||
return {
|
||||
isFixed: false,
|
||||
statusBarHeight: 20,
|
||||
top: 0,
|
||||
areaName: '',
|
||||
areaId: '',
|
||||
$areaId: '',
|
||||
albumList: [],
|
||||
activityList: [],
|
||||
publicList: [],
|
||||
moduleId: "",
|
||||
isInit: false
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.areaId = this.$mp.query.areaId || this.$areaId
|
||||
this.areaName = this.$mp.query.areaName || this.$areaName
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
||||
this.autoLogin()
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getAlbumList()
|
||||
this.getActiveList()
|
||||
this.getName()
|
||||
})
|
||||
|
||||
uni.$on('update', () => {
|
||||
this.getAlbumList()
|
||||
})
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.$nextTick(() => {
|
||||
this.token && this.getUserInfo()
|
||||
})
|
||||
|
||||
if (this.user.homeArea) {
|
||||
if (!this.isInit) {
|
||||
this.areaId = this.user.homeArea
|
||||
this.areaName = this.user.homeName
|
||||
uni.setStorageSync('areaId', this.user.homeArea)
|
||||
uni.setStorageSync('areaName', this.user.homeName)
|
||||
this.isInit = true
|
||||
}
|
||||
} else if (!this.isInit && !this.user.homeArea) {
|
||||
setTimeout(() => {
|
||||
this.$dialog.alert({
|
||||
content: '请选择您的家乡'
|
||||
}).then(() => {
|
||||
this.$refs.area?.handleJump()
|
||||
this.isInit = true
|
||||
})
|
||||
}, 600)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions(['autoLogin', 'getUserInfo']),
|
||||
getName() {
|
||||
this.$instance.post("/app/appcontentmoduleinfo/listByNames", null, {
|
||||
params: {names: "三务公开"}
|
||||
}).then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.moduleId = res.data[0]["id"];
|
||||
this.getPublicList();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
updateUserInfo() {
|
||||
if (this.areaId.endsWith('000')) {
|
||||
this.$dialog.alert({
|
||||
content: '请选择村'
|
||||
}).then(() => {
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.$instance.post("/app/appwechatuser/updateById", {
|
||||
id: this.user.id,
|
||||
homeArea: this.areaId,
|
||||
homeName: this.areaName
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.getUserInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getPublicList() {
|
||||
this.$instance.post("/app/appcontentinfo/list", null, {
|
||||
params: {moduleId: this.moduleId, size: 3, areaId: this.areaId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.publicList = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
linkTo(url, type) {
|
||||
if (type) {
|
||||
if (this.token) {
|
||||
if (type === 'idNumber') {
|
||||
if (!this.user.residentId) {
|
||||
this.$linkTo('/mods/AppAuth/AppAuth')
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$refs.login.show()
|
||||
}
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
},
|
||||
|
||||
areaSelect(v) {
|
||||
this.areaId = v
|
||||
this.isMore = false
|
||||
this.current = 0
|
||||
this.newsList = []
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getActiveList()
|
||||
this.getAlbumList()
|
||||
this.getPublicList()
|
||||
uni.setStorageSync('areaId', this.areaId)
|
||||
uni.setStorageSync('areaName', this.areaName)
|
||||
})
|
||||
},
|
||||
|
||||
getAlbumList() {
|
||||
this.$instance.post(`/app/appvillagepicturealbum/queryAlbumMenu?areaId=${this.areaId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.albumList = res.data.map(v => {
|
||||
return {
|
||||
...v,
|
||||
coverImg: `${this.$cdn}/dvcp/album/album${v.type}.png`
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getActiveList() {
|
||||
this.$instance.post(`/app/appvillageactivityinfo/listUp`, null, {
|
||||
params: {
|
||||
current: 1,
|
||||
size: 6,
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.activityList = res.data.records.map(v => {
|
||||
return {
|
||||
...v,
|
||||
url: v.url ? JSON.parse(v.url)[0].url : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用数字乡村治理服务一体化平台~',
|
||||
path: `/pages/AppEnteringVillage/AppEnteringVillage`
|
||||
}
|
||||
},
|
||||
|
||||
onPageScroll(params) {
|
||||
this.isFixed = params.scrollTop > 60;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.wrapper {
|
||||
min-height: 100%;
|
||||
background: #F3F6F9;
|
||||
|
||||
::v-deep .emptyImg {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&.header-active {
|
||||
z-index: 1111;
|
||||
opacity: 1;
|
||||
background: #4181FF;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
position: relative;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
color: #fff;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
& > header {
|
||||
position: relative;
|
||||
height: 656px;
|
||||
box-sizing: border-box;
|
||||
padding-left: 32px;
|
||||
|
||||
& > div {
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
}
|
||||
|
||||
.ai-area__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 100px;
|
||||
|
||||
span {
|
||||
margin-right: 16px;
|
||||
color: #FFFFFF;
|
||||
font-size: 44px;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
& > image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 656px;
|
||||
}
|
||||
|
||||
.welcome {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
line-height: 40px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
width: 120px;
|
||||
height: 44px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
color: #c0cae0;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.tag1 {
|
||||
width: 120px;
|
||||
height: 44px;
|
||||
border: 1px solid #c0cae0;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
color: #c0cae0;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
background: #FFFFFF;
|
||||
border-radius: 32px 32px 0 0;
|
||||
margin-top: -336px;
|
||||
box-sizing: border-box;
|
||||
padding: 32px 32px 0 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.card-item {
|
||||
width: 332px;
|
||||
height: 160px;
|
||||
margin-bottom: 32px;
|
||||
border-radius: 16px;
|
||||
|
||||
image {
|
||||
width: 332px;
|
||||
height: 160px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.banner {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
height: 200px;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F3F6F9 100%);
|
||||
|
||||
image {
|
||||
display: block;
|
||||
width: 692px;
|
||||
height: 200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 48px 32px 32px;
|
||||
|
||||
.title {
|
||||
font-size: 44px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.right {
|
||||
|
||||
.title-more {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-news {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
|
||||
.news-wrap {
|
||||
height: 186px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.news-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tag {
|
||||
width: 144px;
|
||||
height: 48px;
|
||||
background: #EEEEEE;
|
||||
border-radius: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.view {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > em {
|
||||
color: #4181FF;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
|
||||
.scroll-card {
|
||||
display: inline-block;
|
||||
width: 400px;
|
||||
height: 332px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
margin-right: 32px;
|
||||
font-size: 0;
|
||||
|
||||
& > image {
|
||||
width: 400px;
|
||||
height: 240px;
|
||||
border-radius: 16px 16px 0 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
height: calc(100% - 240px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
|
||||
& > span {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.album-list {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
|
||||
.album {
|
||||
position: relative;
|
||||
width: 218px;
|
||||
height: 240px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.total {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
z-index: 2;
|
||||
width: 74px;
|
||||
height: 40px;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
border-radius: 8px;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.desc {
|
||||
position: absolute;
|
||||
bottom: 16px;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 12px;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .AiArea {
|
||||
padding-top: 64px;
|
||||
height: 88px;
|
||||
|
||||
._img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.area-name {
|
||||
font-size: 44px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/icswb/AppEnteringVillage/custom.png
Normal file
|
After Width: | Height: | Size: 970 B |
BIN
src/project/icswb/AppEnteringVillage/custom_selected.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
491
src/project/icswb/AppHome/AppHome.vue
Normal file
@@ -0,0 +1,491 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="search-wrap">
|
||||
<div class="search fill" @click="$linkTo('/mods/AppContent/contentManager?moduleId=' + search.moduleId)">
|
||||
<u-icon name="search" color="#ffffff" size="40"></u-icon>
|
||||
<span class="desc">请输入需要搜索的内容</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-bg"></div>
|
||||
<img class="border" :src="`${cdn}/border.png`" alt="">
|
||||
<div class="swiper-content">
|
||||
<u-swiper :list="swiperList" mode="none" height="240" bg-color="none" @click="handleBannerClick"/>
|
||||
</div>
|
||||
<div class="grid-content">
|
||||
<u-grid :col="4" hover-class="text-hover" :border="false">
|
||||
<u-grid-item v-for="(item, index) in grids" :key="index" :custom-style="{padding:'8px 0'}" bg-color="none"
|
||||
class="grid-item" @click="handleClick(item)">
|
||||
<img :src="item.pictureUrl" alt=""/>
|
||||
<div class="grid-text">{{ item.name }}</div>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</div>
|
||||
<div class="notice">
|
||||
<img :src="`${cdn}/notice-new.png`" alt="">
|
||||
<u-notice-bar mode="vertical" color="#4181FF" style="flex: 1;" :volume-icon="false" :is-circular="false"
|
||||
duration="5000" speed="5000" :list="noticeList" @click="clickNotice"/>
|
||||
</div>
|
||||
<template v-if="activeList.length>0">
|
||||
<header>推荐专题</header>
|
||||
<scroll-view :scroll-x="true" style="width: 100%" class="scroll-wrap">
|
||||
<div class="scroll-card"
|
||||
:style="{background:'url(' + item.pictureUrl + ') no-repeat no-repeat;background-size:100% 100%;'}"
|
||||
v-for="(item,index) in activeList" :key="index" @click="handleActive(item)"/>
|
||||
</scroll-view>
|
||||
</template>
|
||||
<template v-if="categorys&&categorys.length>0">
|
||||
<u-tabs :list="categorys.map(e=>({name:e.categoryName}))" font-size="40" bg-color="transparent"
|
||||
inactive-color="#999999" :active-item-style="active"
|
||||
:is-scroll="true" :current="index" @change="tabChange"/>
|
||||
<div class="list-wrap" v-if="categoryList && categoryList.length>0">
|
||||
<div class="list-card" v-for="(category,index) in categoryList" :key="index"
|
||||
@click="$linkTo('/mods/AppContent/contentDetail?id='+category.id)">
|
||||
<div class="header">{{ category.title }}</div>
|
||||
<div class="content-wrap"
|
||||
v-if="category.contentType==0 && category.files && category.files.length<3&&category.files.length>0">
|
||||
<img class="img" :src="item.url" v-for="(item,index) in category.files.slice(0,1)" :key="index.id">
|
||||
</div>
|
||||
<div class="content-wrap" v-if="category.contentType==0 && category.files && category.files.length >= 3">
|
||||
<img class="min-img" :src="item.url" v-for="(item,index) in category.files.slice(0,3)" :key="index.id">
|
||||
</div>
|
||||
<div class="content-wrap" v-if="category.contentType == 1">
|
||||
<img class="img" :src="category.pictureUrl" alt=""/>
|
||||
<img class="play-icon" :src="`${cdn}/play.png`" alt=""/>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="tag">{{ category.categoryName }}</div>
|
||||
{{ category.createTime }}
|
||||
</div>
|
||||
<div class="right">
|
||||
<em>{{ category.viewCount }}</em>
|
||||
人看过
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else/>
|
||||
</template>
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppHome',
|
||||
appName: "首页",
|
||||
data() {
|
||||
return {
|
||||
cdn: "https://cdn.cunwuyun.cn/wxmp",
|
||||
swiperList: [],
|
||||
index: 0,
|
||||
grids: [],
|
||||
activeList: [],
|
||||
notices: [],
|
||||
categorys: [],
|
||||
categoryList: [],
|
||||
search: {areaId: ''},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
active() {
|
||||
return {
|
||||
fontSize: '22px',
|
||||
color: '#333333',
|
||||
}
|
||||
},
|
||||
noticeList() {
|
||||
let {notices} = this
|
||||
return notices?.length > 0 ? notices?.map(e => e.title) || ['暂无公告'] : ['暂无公告']
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
uni.setNavigationBarTitle({title: "党媒e家"})
|
||||
},
|
||||
onLoad() {
|
||||
this.autoLogin().then(() => {
|
||||
this.getSwiperList();
|
||||
this.getName();
|
||||
this.getGrids();
|
||||
this.getActive();
|
||||
this.getNotice();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['autoLogin', 'authCheck']),
|
||||
getName() {
|
||||
this.$instance.post("/app/appcontentmoduleinfo/listByName", null, {
|
||||
params: {names: "新闻发布"},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data[0]?.categoryList?.length) {
|
||||
this.categorys = res.data[0]["categoryList"];
|
||||
this.search.moduleId = res.data[0]['id']
|
||||
this.search.categoryId = res.data[0]['categoryList'][0]['id']
|
||||
this.getCategoryList()
|
||||
}
|
||||
})
|
||||
},
|
||||
tabChange(idx) {
|
||||
this.index = idx
|
||||
this.search.categoryId = this.categorys[idx]['id']
|
||||
this.getCategoryList()
|
||||
},
|
||||
getCategoryList() {
|
||||
this.$instance.post("/app/appcontentinfo/list", null, {
|
||||
params: {...this.search, size: 100}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.categoryList = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
clickNotice(val) {
|
||||
const id = this.notices[val]["id"];
|
||||
if (id) {
|
||||
uni.navigateTo({
|
||||
url: "/mods/AppNotice/AppNotice?id=" + id
|
||||
})
|
||||
}
|
||||
},
|
||||
handleActive({type, appId, url}) {
|
||||
if (type == 0) {
|
||||
uni.navigateToMiniProgram({appId})
|
||||
} else if (type == 1) {
|
||||
this.$linkTo("/subPages/h5/webview?link=" + url);
|
||||
}
|
||||
},
|
||||
getNotice() {
|
||||
this.$instance.post("/app/appmininotice/list", null, {
|
||||
params: {size: 999},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.notices = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
getActive() {
|
||||
this.$instance.post("/app/appminitopicconfig/list", null, {
|
||||
params: {size: 999},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.activeList = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取顶部九宫格
|
||||
*/
|
||||
getGrids() {
|
||||
this.$instance.post("/app/appminihomeconfig/list", null, {
|
||||
params: {picked: 1},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.grids = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
getSwiperList() {
|
||||
this.$instance.post('/app/appbanner/listForWx', null, {
|
||||
withoutToken: true
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
this.swiperList = res.data?.map((e) => ({...e, image: e.imgUrl})) || []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick({type, appId, modulePath, url, checkType, corpId}) {
|
||||
//先判读是不是系统应用
|
||||
if (type != "0") {
|
||||
if (type == "1") {
|
||||
uni.navigateToMiniProgram({appId});
|
||||
} else if (type == "2") {
|
||||
uni.navigateTo({url: "/subPages/h5/webview?link=" + url});
|
||||
} else if (type == "3") {
|
||||
this.$linkTo(url);
|
||||
} else if (type == "4") {
|
||||
uni.openCustomerServiceChat({
|
||||
extInfo: {url: url},
|
||||
corpId: corpId,
|
||||
fail: () => {
|
||||
this.$u.toast('请使用普通微信打开小程序进行咨询');
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (type && type == "0") {
|
||||
uni.showLoading({title: '正在进入应用...'})
|
||||
this.authCheck({checkType, modulePath}).finally(() => uni.hideLoading())
|
||||
}
|
||||
},
|
||||
handleBannerClick(index) {
|
||||
if (!this.swiperList[index].linkUrl) return
|
||||
|
||||
if (this.swiperList[index].type == '0') { //0 h5链接; 1 小程序链接; 2外部小程序
|
||||
this.$linkTo(`/subPages/h5/webview?link=${this.swiperList?.[index]?.linkUrl}&title=${this.swiperList?.[index]?.title}`)
|
||||
} else if (this.swiperList[index].type == '1') {
|
||||
this.$linkTo(`${this.swiperList?.[index]?.linkUrl}`)
|
||||
} else {
|
||||
wx.navigateToMiniProgram({
|
||||
appId: this.swiperList[index].linkUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用数字乡村治理服务一体化平台~',
|
||||
path: `/pages/AppHome/AppHome`
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
background-color: #F3F6F9;
|
||||
position: relative;
|
||||
|
||||
.search-wrap {
|
||||
width: 750px;
|
||||
height: 112px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #4181FF;
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
background: #000000;
|
||||
border-radius: 32px;
|
||||
opacity: 0.2;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.desc {
|
||||
font-size: 28px;
|
||||
color: #FFFFFF;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.area-content {
|
||||
height: 96px;
|
||||
line-height: 96px;
|
||||
background-color: #2d80fb;
|
||||
|
||||
.area-ai {
|
||||
display: block;
|
||||
width: 200px;
|
||||
margin-left: 34px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.picker-location {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.header-bg {
|
||||
width: 100%;
|
||||
height: 160px;
|
||||
background-color: #4181FF;
|
||||
}
|
||||
|
||||
.border {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.swiper-content {
|
||||
width: 686px;
|
||||
height: 240px;
|
||||
margin: -176px auto 24px;
|
||||
}
|
||||
|
||||
.grid-content {
|
||||
box-sizing: border-box;
|
||||
|
||||
.grid-item {
|
||||
img {
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
object-fit: fill;
|
||||
}
|
||||
|
||||
.grid-text {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .notice {
|
||||
width: 686px;
|
||||
height: 88px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 24px;
|
||||
margin: 30px auto 48px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
& > img {
|
||||
width: 128px;
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
.u-news-item {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.list-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
|
||||
.list-card {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.header {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 50px;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 24px;
|
||||
position: relative;
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.min-img {
|
||||
width: 204px;
|
||||
height: 204px;
|
||||
}
|
||||
|
||||
.play-icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 24px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
.tag {
|
||||
width: 144px;
|
||||
height: 48px;
|
||||
background: #EEEEEE;
|
||||
border-radius: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
font-size: 44px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
padding: 0 32px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.scroll-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.scroll-card {
|
||||
display: inline-block;
|
||||
width: 440px;
|
||||
height: 240px;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
margin-right: 32px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/icswb/AppHome/home.png
Normal file
|
After Width: | Height: | Size: 965 B |
BIN
src/project/icswb/AppHome/home_selected.png
Normal file
|
After Width: | Height: | Size: 1000 B |
266
src/project/lianhua/AppCircle/Add.vue
Normal file
@@ -0,0 +1,266 @@
|
||||
<template>
|
||||
<div class="Add">
|
||||
<div class="add-content">
|
||||
<div class="top">
|
||||
<!-- <image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-edit.png" /> -->
|
||||
<textarea placeholder="发布内容" v-model="form.content" :maxlength="500"></textarea>
|
||||
<div class="bottom">
|
||||
<div></div>
|
||||
<div>
|
||||
<i>{{ form.content.length }}</i>
|
||||
<span>/500</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<h2>最多上传9张</h2>
|
||||
<div class="img">
|
||||
<AiUploader v-model="form.files" :limit="9" multiple/>
|
||||
</div>
|
||||
<div class="topic">
|
||||
<h3 v-if="!form.themeId" @click="isShow = true">#绑定话题</h3>
|
||||
<div class="choosed" v-else @click="isShow = true">
|
||||
<span>#{{ form.themeTitle }}</span>
|
||||
</div>
|
||||
<p>绑定一个与您发布内容相关很高的话题,会被更多人看到哦。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="bottom">
|
||||
<h2>仅本社区可见</h2>
|
||||
<switch color="#2D7DFF" @change="onSwitchChange"></switch>
|
||||
</div> -->
|
||||
<div class="btn-wrapper">
|
||||
<div class="btn" hover-class="text-hover" :class="[!form.content ? 'active' : '']" @click="submit">发布服务</div>
|
||||
</div>
|
||||
<!-- <u-popup v-model="isShow" mode="bottom" hidden height="700rpx" border-radius="30">
|
||||
<div class="popup">
|
||||
<h2>请选择</h2>
|
||||
<scroll-view class="popup-list" scroll-y>
|
||||
<div
|
||||
v-for="(item, index) in topicList"
|
||||
:class="[form.themeId === item.id ? 'active' : '']"
|
||||
:key="index"
|
||||
@click="form.themeId = item.id, form.themeTitle = item.title, isShow = false">
|
||||
#{{ item.title }}
|
||||
</div>
|
||||
</scroll-view>
|
||||
</div>
|
||||
</u-popup> -->
|
||||
<u-select v-model="isShow" :list="topicList" value-name="id"
|
||||
label-name="title" @confirm="confirm"></u-select>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'Add',
|
||||
appName: '发新贴',
|
||||
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
files: [],
|
||||
themeId: '',
|
||||
themeTitle: '',
|
||||
source: 0,
|
||||
content: '',
|
||||
visibleRange: 1
|
||||
},
|
||||
topicList: [],
|
||||
isShow: false
|
||||
}
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
this.getTopicList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
confirm(val) {
|
||||
this.form.themeId = val[0].value;
|
||||
this.form.themeTitle = val[0].label;
|
||||
},
|
||||
submit () {
|
||||
if (!this.form.content) {
|
||||
return this.$toast(`内容不能为空`)
|
||||
}
|
||||
if (!this.form.themeId) {
|
||||
return this.$toast(`请绑定话题`)
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/addOrUpdate`, {
|
||||
...this.form
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code === 0) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
content: '提交成功'
|
||||
}).then(() => {
|
||||
uni.navigateBack()
|
||||
uni.$emit('updateList')
|
||||
}).catch(() => {})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onSwitchChange (e) {
|
||||
this.form.visibleRange = e.detail.value ? 0 : 1
|
||||
},
|
||||
|
||||
getTopicList () {
|
||||
this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, {
|
||||
withoutToken: true,
|
||||
params: {
|
||||
current: 1,
|
||||
size: 100,
|
||||
status: 1
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.topicList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.Add {
|
||||
padding: 24px 0 130px;
|
||||
|
||||
& > div {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.btn-wrapper .active {
|
||||
background: rgba(45, 125, 255, 0.6);
|
||||
}
|
||||
|
||||
.popup {
|
||||
height: 700px;
|
||||
border-radius: 20px 20px 0 0;
|
||||
|
||||
h2 {
|
||||
height: 98px;
|
||||
line-height: 98px;
|
||||
text-align: center;
|
||||
color: #333333;
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.popup-list {
|
||||
height: calc(100% - 98px);
|
||||
|
||||
div {
|
||||
padding: 20px 48px;
|
||||
color: #333333;
|
||||
font-size: 30px;
|
||||
|
||||
&.active {
|
||||
color: #2D7DFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.add-content {
|
||||
margin-bottom: 24px;
|
||||
|
||||
& > .top {
|
||||
padding: 32px;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 14px;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: 24px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 24px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > .bottom {
|
||||
padding: 32px 32px;
|
||||
|
||||
h2 {
|
||||
margin-bottom: 16px;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.topic {
|
||||
h3 {
|
||||
width: 134px;
|
||||
height: 52px;
|
||||
line-height: 52px;
|
||||
margin-bottom: 12px;
|
||||
text-align: center;
|
||||
border: 1px solid #999;
|
||||
border-radius: 26px;
|
||||
color: #666;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 20px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.choosed {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 52px;
|
||||
padding: 0 16px;
|
||||
width: fit-content;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #2D7DFF;
|
||||
border-radius: 26px;
|
||||
font-size: 22px;
|
||||
color: #2D7DFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > .bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 98px;
|
||||
padding: 0 32px;
|
||||
|
||||
h2 {
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
559
src/project/lianhua/AppCircle/AppCircle.vue
Normal file
@@ -0,0 +1,559 @@
|
||||
<template>
|
||||
<div class="AppCircle">
|
||||
<u-navbar :is-back="true" title="邻里互助" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar"></u-navbar>
|
||||
<div class="header-bg">
|
||||
<div class="header">
|
||||
<div class="top">
|
||||
<div class="left">
|
||||
<span @click="changeTab(0)" :class="{active:currIndex === 0}">广场</span>
|
||||
<!-- <span @click="changeTab(1)" :class="{active:currIndex === 1}">社区</span> -->
|
||||
</div>
|
||||
<div class="right" @click="$linkTo('./MyPostList')" hover-class="text-hover">
|
||||
<span>我的贴子<img src="https://cdn.cunwuyun.cn/wechat/wuxi/circle-top-icon.png" alt=""></span>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-content" v-if="topic.length">
|
||||
<div class="nav">
|
||||
<div
|
||||
class="nav-item"
|
||||
hover-class="text-hover"
|
||||
v-for="(item, index) in topic" :key="index" @click="$linkTo('./TopicDetail?themeId=' + item.id + '&name=' + item.title)">
|
||||
<image :src="item.picUrl" mode="aspectFill"/>
|
||||
<h2>{{ item.title }}</h2>
|
||||
</div>
|
||||
<div class="nav-item" hover-class="text-hover" @click="$linkTo('./Topic')" v-if="topicList.length > 6">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-more.png"/>
|
||||
<h2>更多</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="AppCircle-list">
|
||||
<div class="item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||
<div class="item-top">
|
||||
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<div class="right">
|
||||
<h3>{{ item.createUserName }}</h3>
|
||||
<!-- <span v-if="item.publishDepartName">{{ item.publishDepartName }}</span> -->
|
||||
<span>{{ item.createTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span hover-stop-propagation v-if="item.topicName"
|
||||
@click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#{{ item.topicName }}</span>
|
||||
<text>{{ item.content }}</text>
|
||||
</div>
|
||||
<div class="item-imgs" v-if="item.files.length">
|
||||
<image mode="aspectFill" @click.stop="previewImage(e.url, item.files)" v-for="(e, i) in item.files" :key="i" :src="e.url"/>
|
||||
</div>
|
||||
<p v-if="item.publishDepartName">{{ item.publishDepartName }}</p>
|
||||
<div class="item-bottom">
|
||||
<button hover-stop-propagation @click.stop="onBtnClick" open-type="share" :data-content="item.content" :data-themeid="item.themeId" :data-id="item.id"
|
||||
:data-name="item.topicName">
|
||||
<image src="https://cdn.cunwuyun.cn/wechat/wuxi/circle-zf-icon.png"/>
|
||||
<i>{{ item.sharedCount }}</i>
|
||||
</button>
|
||||
<div hover-stop-propagation @click.stop="reciate(item.id, item.appreciateStatus)">
|
||||
<image :src="item.appreciateStatus ? 'https://cdn.cunwuyun.cn/wechat/wuxi/circle-dz-select-icon.png' : 'https://cdn.cunwuyun.cn/wechat/wuxi/circle-dz-icon.png'"/>
|
||||
<i>{{ item.appreciateCount }}</i>
|
||||
</div>
|
||||
<div>
|
||||
<image src="https://cdn.cunwuyun.cn/wechat/wuxi/circle-pl-icon.png"/>
|
||||
<i>{{ item.commentCount }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"/>
|
||||
</div>
|
||||
<div class="add" hover-class="text-hover" @click="toAdd">
|
||||
<image src="https://cdn.cunwuyun.cn/wechat/wuxi/circle-add.png" mode="aspectFill" />
|
||||
</div>
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
customNavigation: true,
|
||||
name: 'AppCircle',
|
||||
appName: '邻里互助',
|
||||
data() {
|
||||
return {
|
||||
currIndex: 0,
|
||||
topicList: [],
|
||||
list: [],
|
||||
isMore: false,
|
||||
current: 1,
|
||||
isFixed: false,
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
total: 0,
|
||||
backgroundNavbar: {
|
||||
background: 'url(https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-nav-bg.png) no-repeat',
|
||||
backgroundSize: 'cover',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
|
||||
topic() {
|
||||
return this.topicList.filter((v, index) => index < 7)
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(option) {
|
||||
if(option.id) { //有id直接跳入话题详情页
|
||||
this.$linkTo('./TopicDetail?themeId=' + option.id + '&name=' + option.name)
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: '邻里互助'
|
||||
});
|
||||
|
||||
this.getTopicList()
|
||||
|
||||
uni.$on('updateList', () => {
|
||||
this.getMyPublishCount()
|
||||
this.changeTab(this.currIndex)
|
||||
})
|
||||
|
||||
if (!this.token) {
|
||||
this.autoLogin({ loginWay: 'qujing' }).then(() => {
|
||||
this.getMyPublishCount()
|
||||
})
|
||||
} else {
|
||||
this.getMyPublishCount()
|
||||
}
|
||||
},
|
||||
|
||||
onPageScroll (params) {
|
||||
this.isFixed = params.scrollTop > 60
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
uni.$off('updateList')
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions(['autoLogin']),
|
||||
|
||||
previewImage(url, files) {
|
||||
uni.previewImage({
|
||||
current: url,
|
||||
urls: files.map(v => v.url)
|
||||
})
|
||||
},
|
||||
|
||||
onBtnClick(e) {
|
||||
},
|
||||
|
||||
reciate(id, appreciateStatus) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(appreciateStatus ? '取消点赞' : '点赞成功')
|
||||
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getMyPublishCount() {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
listType: 0,
|
||||
createUserId: this.user.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd() {
|
||||
if (this.user.areaId) {
|
||||
this.$linkTo('./Add')
|
||||
} else {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo?isFromTabbar=1&path=/pages/AppCircle/AppCircle')
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getTopicList() {
|
||||
this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, {
|
||||
withoutToken: true,
|
||||
params: {
|
||||
current: 1,
|
||||
size: 100,
|
||||
status: 1
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.topicList = res.data.records
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
changeTab(index) {
|
||||
this.currIndex = index
|
||||
this.isMore = false
|
||||
this.current = 1
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
getList() {
|
||||
if (this.isMore) return
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
withoutToken: !this.token,
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10,
|
||||
visibleRange: this.currIndex === 0 ? 1 : 0
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})]
|
||||
} else {
|
||||
this.list = res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
this.isMore = true
|
||||
}
|
||||
}).finally(() => this.$hideLoading())
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
onShareAppMessage(e) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/share?id=${e.target.dataset.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
title: e.target.dataset.content.substr(0, 20),
|
||||
path: `/mods/AppCircle/Detail?id=${e.target.dataset.id}&themeId=${e.target.dataset.themeid}&name=${e.target.dataset.name}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppCircle {
|
||||
// padding-top: 100px;
|
||||
padding-bottom: 40px;
|
||||
.header-bg {
|
||||
background: url('https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-header-bg.png') center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.header {
|
||||
width: 100%;
|
||||
opacity: 1;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.add {
|
||||
position: fixed;
|
||||
right: 32px;
|
||||
bottom: 32px;
|
||||
z-index: 111;
|
||||
|
||||
image {
|
||||
width: 124px;
|
||||
height: 124px;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-content {
|
||||
padding-top: 16px;
|
||||
width: 100%;
|
||||
height: 192px;
|
||||
margin-bottom: 230px;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 32px 24px;
|
||||
padding-top: 30px;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
// box-shadow: inset 0 -1px 0 0 #eeeeee;
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
width: 25%;
|
||||
padding-bottom: 32px;
|
||||
|
||||
image {
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 32px;
|
||||
margin-top: 8px;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.AppCircle-list {
|
||||
.item {
|
||||
margin: 0 32px 24px;
|
||||
padding: 24px 24px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
box-shadow: inset 0 -1px 0 0 #eeeeee;
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-top: 12px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
margin: 12px 0;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #999;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 88px;
|
||||
border-top: 1px solid #eeeeee;
|
||||
|
||||
div, button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
|
||||
image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #687DA6;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item-content {
|
||||
margin: 16px 0;
|
||||
line-height: 1.3;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #4181FF;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
padding: 0 32px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100px;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
color: #222;
|
||||
font-size: 30px;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 64px;
|
||||
}
|
||||
|
||||
&.active {
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
left: 50%;
|
||||
width: 40px;
|
||||
height: 8px;
|
||||
background: #026AF2;
|
||||
border-radius: 4px;
|
||||
transform: translateX(-50%);
|
||||
content: ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
position: relative;
|
||||
|
||||
i {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: 0;
|
||||
z-index: 11;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: #FF4747;
|
||||
// height: 24px;
|
||||
// line-height: 24px;
|
||||
// padding: 0 10px;
|
||||
// font-size: 16px;
|
||||
// color: #4181FF;
|
||||
// border-radius: 50%;
|
||||
// border: 2px solid #4181FF;
|
||||
// background: #fff;
|
||||
// box-sizing: border-box;
|
||||
// transform: translateX(50%);
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #333;
|
||||
line-height: 54px;
|
||||
text-align: center;
|
||||
width: 164px;
|
||||
height: 56px;
|
||||
border: 1px solid #8A929F;
|
||||
border-radius: 28px;
|
||||
img {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row2 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
791
src/project/lianhua/AppCircle/Detail.vue
Normal file
@@ -0,0 +1,791 @@
|
||||
<template>
|
||||
<div class="Detail" v-if="pageShow">
|
||||
<div class="top">
|
||||
<div class="item-top">
|
||||
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<div class="right">
|
||||
<h3>{{ info.createUserName }}</h3>
|
||||
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
|
||||
</div>
|
||||
<div class="top-btn" v-if="info.integralTaskId && info.integralTaskInfo.status != 2 && info.showSignBtn"
|
||||
@click="toTask">去参与
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span v-if="name" @click="toTopic('./TopicDetail?themeId=' + themeId + '&name=' + name)">#【{{ name }}】</span>
|
||||
<text v-if="info.integralTaskId">{{ info.integralTaskInfo.detail }}</text>
|
||||
<text v-else>{{ info.content }}</text>
|
||||
</div>
|
||||
<div v-if="info.integralTaskId">
|
||||
<div class="info-flex">
|
||||
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/address-icon.png" alt="">活动地点:</div>
|
||||
<div class="value">{{ info.integralTaskInfo.address }}</div>
|
||||
</div>
|
||||
<div class="info-flex">
|
||||
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/come-icon.png" alt="">任务类型:</div>
|
||||
<div class="value">{{ info.integralTaskInfo.type == 1 ? '报名得积分' : '打卡得积分' }}</div>
|
||||
</div>
|
||||
<div class="info-flex">
|
||||
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/time-icon.png"
|
||||
alt="">{{ info.integralTaskInfo.type == 1 ? '报名时间:' : '进场时间:' }}
|
||||
</div>
|
||||
<div class="value">{{ info.integralTaskInfo.intoBegintime }}至{{ info.integralTaskInfo.intoEndtime }}</div>
|
||||
</div>
|
||||
<div class="info-flex" v-if="info.integralTaskInfo.type != 1">
|
||||
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/leave-icon.png" alt="">离场时间:</div>
|
||||
<div class="value">{{ info.integralTaskInfo.exitBegintime }}至{{ info.integralTaskInfo.exitEndtime }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-imgs" v-if="info.files && info.files.length">
|
||||
<image mode="aspectFill" @click="previewImage(item.url, info.files)" v-for="(item, index) in info.files"
|
||||
:key="index" :src="item.url"/>
|
||||
</div>
|
||||
<p>{{ info.createTime }}</p>
|
||||
<div class="item-bottom">
|
||||
<button open-type="share">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png"/>
|
||||
<i>{{ info.sharedCount }}</i>
|
||||
</button>
|
||||
<div>
|
||||
<image
|
||||
:src="info.appreciateStatus ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png'"
|
||||
@click="reciate"/>
|
||||
<i>{{ info.appreciateCount }}</i>
|
||||
</div>
|
||||
<div>
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png"/>
|
||||
<i>{{ info.commentCount }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment">
|
||||
<h2>评论</h2>
|
||||
<div class="comment-wrapper">
|
||||
<div class="comment-item" v-for="(item, index) in list" :key="index">
|
||||
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<div class="right">
|
||||
<h3>{{ item.createUserName }}</h3>
|
||||
<p>{{ item.content }}</p>
|
||||
<div class="bottom">
|
||||
<span>{{ item.createTime }}</span>
|
||||
<div hover-class="text-hover" @click="replay(item)">回复</div>
|
||||
</div>
|
||||
<div class="replay-list" v-if="item.replyList.length">
|
||||
<div class="replay-item" v-for="replay in item.replyList" :key="replay.id">
|
||||
<image :src="replay.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<div class="replay-item__right">
|
||||
<div class="top">
|
||||
<div class="replay-left">
|
||||
<h3>{{ replay.createUserName }}</h3>
|
||||
<span>回复</span>
|
||||
<h3>{{ item.createUserName }}</h3>
|
||||
</div>
|
||||
<p>{{ replay.createTime }}</p>
|
||||
</div>
|
||||
<p>{{ replay.content }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" @click="showComment">
|
||||
<span>请输入评论内容</span>
|
||||
<!-- <div hover-class="hover-class">发送</div> -->
|
||||
</div>
|
||||
<u-popup v-model="isShow" mode="bottom" hidden height="350rpx" border-radius="30">
|
||||
<div class="popup">
|
||||
<div class="popup-title">
|
||||
<h2>请选择</h2>
|
||||
<image @click="isShow = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png"/>
|
||||
</div>
|
||||
<div class="popup-list">
|
||||
<button open-type="share">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-wechat.png"/>
|
||||
<span>微信</span>
|
||||
</button>
|
||||
<!-- <button open-type="share">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pyq.png" />
|
||||
<span>朋友圈</span>
|
||||
</button>
|
||||
<button>
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-link.png" />
|
||||
<span>复制链接</span>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
<u-popup v-model="isShowComment" mode="bottom" hidden height="400rpx" border-radius="30" @close="focus = false">
|
||||
<div class="popup">
|
||||
<div class="popup-title">
|
||||
<h2>评论</h2>
|
||||
<image @click="isShowComment = false, focus = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png"/>
|
||||
</div>
|
||||
<div class="form">
|
||||
<textarea :maxlength="100" :cursor-spacing="10"
|
||||
:placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus"
|
||||
v-model="content"></textarea>
|
||||
<div>
|
||||
<div class="send-btn" hover-class="hover-class" @click="send">发送</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Detail',
|
||||
appName: '详情',
|
||||
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
isShow: false,
|
||||
info: {},
|
||||
name: '',
|
||||
themeId: '',
|
||||
isFrom: '',
|
||||
list: [],
|
||||
isMore: false,
|
||||
isShowComment: false,
|
||||
current: 1,
|
||||
content: '',
|
||||
focus: false,
|
||||
pageShow: false,
|
||||
commentId: '',
|
||||
replyName: ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.isFrom = query.isFrom
|
||||
this.id = query.id
|
||||
this.themeId = query.themeId
|
||||
this.name = query.name || ''
|
||||
this.$loading()
|
||||
Promise.resolve(this.token || this.autoLogin()).then(() =>
|
||||
Promise.all([
|
||||
this.getInfo(query.id),
|
||||
this.getCommontList(query.id)
|
||||
])
|
||||
).finally(() => this.$hideLoading())
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['autoLogin']),
|
||||
|
||||
toTask() {
|
||||
if (!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo')
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.$linkTo(`/mods/AppNewFarmerBank/taskDetail?id=${this.info.integralTaskId}`)
|
||||
},
|
||||
|
||||
previewImage(url, files) {
|
||||
uni.previewImage({
|
||||
current: url,
|
||||
urls: files.map(v => v.url)
|
||||
})
|
||||
},
|
||||
|
||||
showComment() {
|
||||
if (!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo')
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.commentId = ''
|
||||
this.replyName = ''
|
||||
this.isShowComment = true
|
||||
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.focus = true
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
|
||||
replay(item) {
|
||||
if (!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo')
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.commentId = item.id
|
||||
this.replyName = item.createUserName
|
||||
|
||||
this.isShowComment = true
|
||||
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.focus = true
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
|
||||
getInfo(id) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||
withoutToken: !this.token,
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.pageShow = true
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
reciate() {
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(this.info.appreciateStatus ? '取消点赞' : '点赞成功')
|
||||
uni.$emit('updateList')
|
||||
this.getInfo(this.id)
|
||||
}
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
send() {
|
||||
if (!this.content) {
|
||||
return this.$toast('内容不能为空')
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(!this.commentId ? `/app/appneighborhoodassistance/addComment` : `/app/appneighborhoodassistance/addReply`, {
|
||||
content: this.content,
|
||||
naId: this.id,
|
||||
type: this.commentId ? 1 : 0,
|
||||
commentId: this.commentId || ''
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code === 0) {
|
||||
this.isShowComment = false
|
||||
this.$toast('提交成功')
|
||||
this.content = ''
|
||||
this.replyName = ''
|
||||
this.commentId = ''
|
||||
this.focus = false
|
||||
|
||||
this.isMore = false
|
||||
this.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getCommontList(this.id)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toTopic(url) {
|
||||
if (this.isFrom === 'topic') {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
},
|
||||
|
||||
getCommontList(id) {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
||||
withoutToken: !this.token,
|
||||
params: {
|
||||
id,
|
||||
current: this.current,
|
||||
size: 10
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$hideLoading()
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
} else {
|
||||
this.list = res.data.records
|
||||
}
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
this.current++
|
||||
} else {
|
||||
this.isMore = true
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.getCommontList()
|
||||
},
|
||||
|
||||
// onShareTimeline() {
|
||||
// return {
|
||||
// title: this.info.content,
|
||||
// // path: `/mods/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
||||
// }
|
||||
// },
|
||||
onShareAppMessage() {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/share?id=${this.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
uni.$emit('updateList')
|
||||
this.getInfo(this.id)
|
||||
}
|
||||
})
|
||||
return {
|
||||
title: this.info.content,
|
||||
path: `/mods/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.Detail {
|
||||
padding-top: 24px;
|
||||
padding-bottom: 130px;
|
||||
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.popup {
|
||||
height: 400px;
|
||||
border-radius: 20px 20px 0 0;
|
||||
|
||||
.popup-title {
|
||||
position: relative;
|
||||
height: 98px;
|
||||
line-height: 98px;
|
||||
text-align: center;
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
top: 50%;
|
||||
z-index: 1;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #333333;
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 30px;
|
||||
|
||||
button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
|
||||
image {
|
||||
width: 94px;
|
||||
height: 94px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 26px;
|
||||
color: #1D2229;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
padding: 0 32px;
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
height: 200px;
|
||||
line-height: 1.3;
|
||||
padding: 20px;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
& > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: right;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
color: #fff;
|
||||
border-radius: 30px;
|
||||
background: #2d7dffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 111;
|
||||
width: 100%;
|
||||
padding: 18px 32px;
|
||||
background: #fff;
|
||||
|
||||
span {
|
||||
flex: 1;
|
||||
height: 70px;
|
||||
line-height: 70px;
|
||||
// margin-right: 16px;
|
||||
padding: 0 24px;
|
||||
border-radius: 36px;
|
||||
font-size: 26px;
|
||||
box-sizing: border-box;
|
||||
background: #eeeeee;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
div {
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
color: #fff;
|
||||
border-radius: 30px;
|
||||
background: #2d7dffff;
|
||||
}
|
||||
}
|
||||
|
||||
.comment {
|
||||
margin-top: 24px;
|
||||
padding: 32px 32px 26px;
|
||||
background: #fff;
|
||||
|
||||
.comment-wrapper {
|
||||
.comment-item {
|
||||
display: flex;
|
||||
padding: 26px 0;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
& > image {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.replay-list {
|
||||
margin-top: 32px;
|
||||
|
||||
.replay-item {
|
||||
display: flex;
|
||||
margin-bottom: 32px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.replay-item__right {
|
||||
flex: 1;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6px;
|
||||
|
||||
.replay-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #666666;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
span {
|
||||
margin: 0 8px;
|
||||
font-size: 24px;
|
||||
color: #687DA6;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #999999;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
line-height: 1.3;
|
||||
color: #333333;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > .right {
|
||||
flex: 1;
|
||||
padding-bottom: 32px;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
|
||||
& > h3 {
|
||||
line-height: 40px;
|
||||
margin-bottom: 8px;
|
||||
color: #666666;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
& > p {
|
||||
line-height: 42px;
|
||||
margin-bottom: 24px;
|
||||
color: #333;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
span {
|
||||
color: #999999;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
div {
|
||||
color: #687DA6;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-bottom: 0;
|
||||
|
||||
.right {
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > h2 {
|
||||
margin-bottom: 32px;
|
||||
color: #3d3d3d;
|
||||
font-size: 38px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
& > .top {
|
||||
padding: 32px 32px 0;
|
||||
background: #ffffff;
|
||||
position: relative;
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-top: 12px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
margin: 12px 0;
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 88px;
|
||||
border-top: 1px solid #eeeeee;
|
||||
|
||||
div, button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
|
||||
image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #687DA6;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-content {
|
||||
margin: 16px 0;
|
||||
line-height: 1.3;
|
||||
text-align: justify;
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #4181FF;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.info-flex {
|
||||
display: flex;
|
||||
color: #666;
|
||||
font-size: 24px;
|
||||
font-family: "PingFang SC";
|
||||
line-height: 30px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.label {
|
||||
width: 160px;
|
||||
|
||||
img {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-right: 8px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
|
||||
.value {
|
||||
width: calc(100% - 160px);
|
||||
color: #333;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
}
|
||||
|
||||
.top-btn {
|
||||
width: 154px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
background-color: #2E7DFF;
|
||||
border-radius: 28px;
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
font-family: "PingFang SC";
|
||||
position: absolute;
|
||||
top: 52px;
|
||||
right: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
748
src/project/lianhua/AppCircle/MyPostList.vue
Normal file
@@ -0,0 +1,748 @@
|
||||
<template>
|
||||
<div class="MyPostList">
|
||||
<div class="userinfo">
|
||||
<div class="top">
|
||||
<div class="left">
|
||||
<image :src="user.avatarUrl || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<h2>{{ user.nickName }}</h2>
|
||||
</div>
|
||||
<div class="add-btn" hover-class="text-hover" @click="handleAdd">发贴</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="bottom-item" @click="changeTab(0)" :class="[currIndex === 0 ? 'active' : '']">
|
||||
<span>发贴</span>
|
||||
<h2>{{ totalInfo['发帖'] }}</h2>
|
||||
</div>
|
||||
<div class="bottom-item" @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">
|
||||
<span>点赞</span>
|
||||
<h2>{{ totalInfo['点赞'] }}</h2>
|
||||
</div>
|
||||
<div class="bottom-item" @click="changeTab(2)" :class="[currIndex === 2 ? 'active' : '']">
|
||||
<span>评论</span>
|
||||
<h2>{{ totalInfo['评论'] }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="body-list" v-if="currIndex === 0">
|
||||
<div class="item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||
<div class="item-top">
|
||||
<image class="avatar" :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<div class="right">
|
||||
<h3>{{ item.createUserName }}</h3>
|
||||
<span v-if="item.publishDepartName">{{ item.publishDepartName }}</span>
|
||||
</div>
|
||||
<image hover-stop-propagation @click.stop="remove(item.id)" class="remove" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png"/>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span v-if="item.topicName" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#【{{ item.topicName }}】</span>
|
||||
<text>{{ item.content }}</text>
|
||||
</div>
|
||||
<div class="item-imgs" v-if="item.files.length">
|
||||
<image mode="aspectFill" hover-stop-propagation @click.stop="previewImage(e.url, item.files)" v-for="(e, i) in item.files" :key="i" :src="e.url"/>
|
||||
</div>
|
||||
<p>{{ item.createTime }}</p>
|
||||
<div class="item-bottom">
|
||||
<div>
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png"/>
|
||||
<i>{{ item.sharedCount }}</i>
|
||||
</div>
|
||||
<div>
|
||||
<image :src="item.appreciateStatus ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png'"/>
|
||||
<i>{{ item.appreciateCount }}</i>
|
||||
</div>
|
||||
<div>
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png"/>
|
||||
<i>{{ item.commentCount }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body-list" v-if="currIndex === 1">
|
||||
<div class="item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||
<div class="item-top">
|
||||
<image class="avatar" :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<div class="right">
|
||||
<h3>{{ item.createUserName }}</h3>
|
||||
<span v-if="item.publishDepartName">{{ item.publishDepartName }}</span>
|
||||
</div>
|
||||
<image hover-stop-propagation @click.stop="removeLike(item.id)" class="remove" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png"/>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span v-if="item.topicName" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#【{{ item.topicName }}】</span>
|
||||
<text>{{ item.content }}</text>
|
||||
</div>
|
||||
<div class="item-imgs" v-if="item.files.length">
|
||||
<image mode="aspectFill" hover-stop-propagation @click.stop="previewImage(e.url, item.files)" v-for="(e, i) in item.files" :key="i" :src="e.url"/>
|
||||
</div>
|
||||
<p>{{ item.createTime }}</p>
|
||||
<div class="item-bottom">
|
||||
<div>
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png"/>
|
||||
<i>{{ item.sharedCount }}</i>
|
||||
</div>
|
||||
<div>
|
||||
<image :src="item.appreciateStatus ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png'"/>
|
||||
<i>{{ item.appreciateCount }}</i>
|
||||
</div>
|
||||
<div>
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png"/>
|
||||
<i>{{ item.commentCount }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment" v-if="currIndex === 2">
|
||||
<div class="comment-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="comment-top">
|
||||
<span>{{ item.myComment.createTime }}</span>
|
||||
<image hover-stop-propagation @click.stop="removeComment(item.myComment.id)" class="remove"
|
||||
src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png"/>
|
||||
</div>
|
||||
<p>{{ item.myComment.content }}</p>
|
||||
<div
|
||||
class="bottom"
|
||||
@click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||
<div class="item-top">
|
||||
<image class="avatar" :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||
<div class="right">
|
||||
<h3>{{ item.createUserName }}</h3>
|
||||
<span v-if="item.publishDepartName">{{ item.publishDepartName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span v-if="item.topicName">#【{{ item.topicName }}】</span>
|
||||
<text>{{ item.content }}</text>
|
||||
</div>
|
||||
<div class="item-imgs" v-if="item.files.length">
|
||||
<image mode="aspectFill" hover-stop-propagation @click.stop="previewImage(e.url, item.files)" v-for="(e, i) in item.files" :key="i" :src="e.url"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length && isMore"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'MyPostList',
|
||||
appName: '我的帖子',
|
||||
data() {
|
||||
return {
|
||||
currIndex: 0,
|
||||
totalInfo: {},
|
||||
list: [],
|
||||
isMore: false,
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
isAuth: v => !!v.user.areaId
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.getTopicList()
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getTopicList() {
|
||||
this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, {
|
||||
withoutToken: true,
|
||||
params: {
|
||||
current: 1,
|
||||
size: 1000,
|
||||
status: 1
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.topicList = res.data.records
|
||||
this.getMyPublish()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getInfo() {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/wechatInfo`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.totalInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
previewImage(url, files) {
|
||||
uni.previewImage({
|
||||
current: url,
|
||||
urls: files.map(v => v.url)
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
content: '您确定删除该帖子吗?'
|
||||
}).then(() => {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast('删除成功!')
|
||||
this.getInfo()
|
||||
uni.$emit('updateList')
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
removeLike(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
content: '您确定取消点赞吗?'
|
||||
}).then(() => {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast('删除成功!')
|
||||
this.getInfo()
|
||||
uni.$emit('updateList')
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
removeComment(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
content: '您确定删除吗?'
|
||||
}).then(() => {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/delComment?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast('删除成功!')
|
||||
this.getInfo()
|
||||
uni.$emit('updateList')
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
changeTab(index) {
|
||||
this.currIndex = index
|
||||
this.isMore = false
|
||||
this.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (this.currIndex === 0) {
|
||||
this.getMyPublish()
|
||||
} else if (this.currIndex === 1) {
|
||||
this.myPraiseList()
|
||||
} else {
|
||||
this.getMyCommentList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getMyPublish() {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10,
|
||||
listType: 0,
|
||||
createUserId: this.user.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$hideLoading()
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})]
|
||||
} else {
|
||||
this.list = res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
this.isMore = true
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
getMyCommentList() {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10,
|
||||
listType: 2
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$hideLoading()
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})]
|
||||
} else {
|
||||
this.list = res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
this.isMore = true
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
myPraiseList() {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10,
|
||||
listType: 1
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$hideLoading()
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})]
|
||||
} else {
|
||||
this.list = res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.filter((v, index) => index < 3),
|
||||
topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
this.isMore = true
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.isAuth) {
|
||||
this.$linkTo('./Add')
|
||||
} else {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo')
|
||||
}).catch(() => 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
if (this.currIndex === 0) {
|
||||
this.getMyPublish()
|
||||
} else if (this.currIndex === 1) {
|
||||
this.myPraiseList()
|
||||
} else {
|
||||
this.getMyCommentList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.MyPostList {
|
||||
padding-bottom: 40px;
|
||||
box-sizing: border-box;
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
position: sticky;
|
||||
top: 0px;
|
||||
margin: 0 0 24px;
|
||||
border-top: 24px solid #eee;
|
||||
background: #fff;
|
||||
z-index: 202303211143;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 32px 56px;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #333333;
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
width: 132px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
color: #fff;
|
||||
border-radius: 26px;
|
||||
background: #2D7DFF;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
height: 120px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.bottom-item {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
|
||||
&.active:after {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
z-index: 1;
|
||||
width: 40px;
|
||||
height: 6px;
|
||||
border-radius: 3px;
|
||||
background: #2D7DFF;
|
||||
transform: translateX(-50%);
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 48px;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment {
|
||||
padding: 0 32px;
|
||||
|
||||
.comment-item {
|
||||
margin-bottom: 24px;
|
||||
padding: 28px 24px;
|
||||
border-radius: 18px;
|
||||
background: #fff;
|
||||
|
||||
.comment-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
line-height: 1.3;
|
||||
margin: 26px 0 20px;
|
||||
font-size: 28px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
padding: 24px;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.avatar {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.remove {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-top: 12px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-content {
|
||||
margin: 16px 0;
|
||||
line-height: 1.3;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #4181FF;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.body-list {
|
||||
.item {
|
||||
margin: 0 32px 24px;
|
||||
padding: 24px 24px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
box-shadow: inset 0 -1px 0 0 #eeeeee;
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.avatar {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.remove {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-top: 12px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
margin: 12px 0;
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 88px;
|
||||
border-top: 1px solid #eeeeee;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
|
||||
image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #687DA6;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-content {
|
||||
margin: 16px 0;
|
||||
line-height: 1.3;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #4181FF;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.row2 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
89
src/project/lianhua/AppCircle/Topic.vue
Normal file
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div class="Topic">
|
||||
<div
|
||||
class="Topic-item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
hover-class="text-hover"
|
||||
@click="$linkTo('./TopicDetail?themeId=' + item.id + '&name=' + item.title)">
|
||||
<h2>#{{item.title}}</h2>
|
||||
<span>去看看</span>
|
||||
</div>
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Topic',
|
||||
appName: '更多话题',
|
||||
|
||||
data () {
|
||||
return {
|
||||
current: 1,
|
||||
pages: 2,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
if (this.current > this.pages) return
|
||||
this.$instance.post(`/app/appneighborhoodassistancetheme/list?current=${this.current}&size=20&status=1`).then(res => {
|
||||
if (res.code === 0 && res.data) {
|
||||
const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
this.pages = Math.ceil(res.data.total / 10)
|
||||
this.list = list
|
||||
}
|
||||
})
|
||||
},
|
||||
toTopicDetail(id) {
|
||||
uni.navigateTo({url: `./TopicDetail?id=${id}`})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.Topic {
|
||||
min-height: 100vh;
|
||||
background: #fff;
|
||||
padding-bottom: 40px;
|
||||
border-top: 24px solid #f4f6fa;
|
||||
box-sizing: border-box;
|
||||
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.Topic-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px 32px;
|
||||
|
||||
h2 {
|
||||
font-size: 30px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
span {
|
||||
width: 126px;
|
||||
height: 52px;
|
||||
line-height: 52px;
|
||||
text-align: center;
|
||||
border-radius: 26px;
|
||||
border: 2px solid #2d7dffff;
|
||||
font-size: 24px;
|
||||
color: #2D7DFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
336
src/project/lianhua/AppCircle/TopicDetail.vue
Normal file
@@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<div class="TopicDetail">
|
||||
<h2>#{{ name }}</h2>
|
||||
<p>贴子:{{ total }}</p>
|
||||
<div class="tab">
|
||||
<span @click="changeTab(0)" :class="[currIndex === 0 ? 'active' : '']">广场</span>
|
||||
<!-- <span @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">社区</span> -->
|
||||
</div>
|
||||
<div class="AppCircle-list">
|
||||
<div
|
||||
class="item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="$linkTo('./Detail?isFrom=topic&id=' + item.id + '&name=' + name + '&themeId=' + themeId)">
|
||||
<div class="item-top">
|
||||
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||
<div class="right">
|
||||
<h3>{{ item.createUserName }}</h3>
|
||||
<span v-if="item.publishDepartName">{{ item.publishDepartName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<text v-if="item.integralTaskId">{{ item.integralTaskInfo.detail }}</text>
|
||||
<text v-else>{{ item.content }}</text>
|
||||
</div>
|
||||
<div class="item-imgs" v-if="item.files.length">
|
||||
<image mode="aspectFill" hover-stop-propagation @click.stop="previewImage(e.url, item.files)" v-for="(e, i) in item.files" :key="i" :src="e.url" />
|
||||
</div>
|
||||
<p>{{ item.createTime }}</p>
|
||||
<div class="item-bottom">
|
||||
<button
|
||||
hover-stop-propagation
|
||||
@click.stop=""
|
||||
open-type="share"
|
||||
:data-content="item.content"
|
||||
:data-themeid="item.themeId"
|
||||
:data-id="item.id"
|
||||
:data-name="item.topicName">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
||||
<i>{{ item.sharedCount }}</i>
|
||||
</button>
|
||||
<div hover-stop-propagation @click.stop="reciate(item.id, item.appreciateStatus)">
|
||||
<image :src="item.appreciateStatus ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png'" />
|
||||
<i>{{ item.appreciateCount }}</i>
|
||||
</div>
|
||||
<div>
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" />
|
||||
<i>{{ item.commentCount }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapActions, mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'TopicDetail',
|
||||
appName: '话题详情',
|
||||
|
||||
data () {
|
||||
return {
|
||||
currIndex: 0,
|
||||
name: '',
|
||||
themeId: '',
|
||||
list: [],
|
||||
isMore: false,
|
||||
current: 1,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
this.themeId = query.themeId
|
||||
this.name = query.name
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions(['autoLogin', 'authCheck']),
|
||||
|
||||
changeTab (index) {
|
||||
this.currIndex = index
|
||||
this.isMore = false
|
||||
this.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
reciate (id, appreciateStatus) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(appreciateStatus ? '取消点赞' : '点赞成功')
|
||||
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
previewImage (url, files) {
|
||||
uni.previewImage({
|
||||
current: url,
|
||||
urls: files.map(v => v.url)
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10,
|
||||
themeId: this.themeId,
|
||||
visibleRange: this.currIndex === 0 ? 1 : 0
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$hideLoading()
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
} else {
|
||||
this.list = res.data.records
|
||||
}
|
||||
|
||||
this.total = res.data.total
|
||||
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
this.isMore = true
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom () {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
onShareAppMessage (e) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/share?id=${e.target.dataset.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.changeTab(this.currIndex)
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
title: e.target.dataset.content,
|
||||
path: `/mods/AppCircle/Detail?id=${e.target.dataset.id}&themeId=${e.target.dataset.themeid}&name=${e.target.dataset.name}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.TopicDetail {
|
||||
padding-top: 32px;
|
||||
padding-bottom: 40px;
|
||||
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
& > h2 {
|
||||
margin: 0 32px 24px;
|
||||
font-size: 46px;
|
||||
color: #3d3d3d;
|
||||
}
|
||||
|
||||
.tab {
|
||||
margin: 0 32px 24px;
|
||||
}
|
||||
|
||||
& > p {
|
||||
margin: 0 32px 12px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.AppCircle-list {
|
||||
.item {
|
||||
margin: 0 24px 24px;
|
||||
padding: 24px 24px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
box-shadow: inset 0 -1px 0 0 #eeeeee;
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-top: 12px;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
margin: 12px 0;
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 88px;
|
||||
border-top: 1px solid #eeeeee;
|
||||
|
||||
div, button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
|
||||
image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #687DA6;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-content {
|
||||
margin: 16px 0;
|
||||
line-height: 1.3;
|
||||
text-align: justify;
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #4181FF;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100px;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
color: #222;
|
||||
font-size: 30px;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 64px;
|
||||
}
|
||||
|
||||
&.active {
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
left: 50%;
|
||||
width: 40px;
|
||||
height: 6px;
|
||||
border-radius: 3px;
|
||||
background: #2d7dffff;
|
||||
transform: translateX(-50%);
|
||||
content: ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppCircle/circle-selected.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/project/lianhua/AppCircle/circle.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
665
src/project/lianhua/AppHome/AppHome.vue
Normal file
@@ -0,0 +1,665 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="header-content">
|
||||
<u-navbar :is-back="false" title="数字莲花" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar"></u-navbar>
|
||||
<div class="header-bg">
|
||||
<!-- <div class="weather-info" v-if="weatherInfo.wea">
|
||||
<img :src="weatherInfo.icon" alt="" />
|
||||
<p>今天:{{weatherInfo.wea}}{{weatherInfo.tem2}}~{{weatherInfo.tem1}},{{weatherInfo.air_tips}}</p>
|
||||
</div> -->
|
||||
<div class="swiper-content">
|
||||
<u-swiper :list="swiperList" mode="none" height="364" bg-color="none" @click="handleBannerClick"/>
|
||||
</div>
|
||||
<div class="notice">
|
||||
<img :src="`${cdn}/notice-new.png`" alt="">
|
||||
<u-notice-bar mode="vertical" color="#4181FF" style="flex: 1;" :volume-icon="false" :is-circular="false"
|
||||
duration="5000" speed="5000" :list="noticeList" @click="clickNotice"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-list" v-for="(item, index) in appList" :key="index">
|
||||
<div class="title-content">
|
||||
<h2>{{item.name}}</h2>
|
||||
<div @click="toService()">更多<img src="https://cdn.cunwuyun.cn/wechat/wuxi/right-icon-blue.png" alt=""></div>
|
||||
</div>
|
||||
<div class="banner-flex" v-if="item.bannerApp && item.bannerApp.length">
|
||||
<div class="item-banner" v-for="(banner, bannerIndex) in item.bannerApp" :key="bannerIndex" @click="openApp(banner)">
|
||||
<img :src="banner.pictureUrl" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-content" v-if="item.apps && item.apps.length">
|
||||
<div class="item-app" v-for="(app, appIndex) in item.apps" :key="appIndex" @click="openApp(app)">
|
||||
<img :src="app.pictureUrl">
|
||||
<p>{{app.name}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="categorys&&categorys.length>0">
|
||||
<u-tabs :list="categorys.map(e=>({name:e.categoryName}))" font-size="40" bg-color="transparent"
|
||||
inactive-color="#999999" :active-item-style="active"
|
||||
:is-scroll="true" :current="index" @change="tabChange"/>
|
||||
<div class="list-wrap" v-if="categoryList && categoryList.length>0">
|
||||
<div class="list-card" v-for="(category,index) in categoryList" :key="index"
|
||||
@click="$linkTo('/mods/AppContent/contentDetail?id='+category.id)">
|
||||
<div class="header">{{ category.title }}</div>
|
||||
<div class="content-wrap"
|
||||
v-if="category.contentType==0 && category.files && category.files.length<3&&category.files.length>0">
|
||||
<img class="img" :src="item.url" v-for="(item,index) in category.files.slice(0,1)" :key="index.id">
|
||||
</div>
|
||||
<div class="content-wrap" v-if="category.contentType==0 && category.files && category.files.length >= 3">
|
||||
<img class="min-img" :src="item.url" v-for="(item,index) in category.files.slice(0,3)" :key="index.id">
|
||||
</div>
|
||||
<div class="content-wrap" v-if="category.contentType == 1">
|
||||
<img class="img" :src="category.pictureUrl" alt=""/>
|
||||
<img class="play-icon" :src="`${cdn}/play.png`" alt=""/>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="tag">{{ category.categoryName }}</div>
|
||||
{{ category.createTime }}
|
||||
</div>
|
||||
<div class="right">
|
||||
<em>{{ category.viewCount }}</em>
|
||||
人看过
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else/>
|
||||
</template>
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
customNavigation: true,
|
||||
name: 'AppHome',
|
||||
appName: "首页",
|
||||
data() {
|
||||
return {
|
||||
cdn: "https://cdn.cunwuyun.cn/wxmp",
|
||||
swiperList: ['https://cdn.cunwuyun.cn/wechat/biaopin/home/home-swiper1.png'],
|
||||
index: 0,
|
||||
grids: [],
|
||||
activeList: [],
|
||||
notices: [],
|
||||
categorys: [],
|
||||
categoryList: [],
|
||||
search: {areaId: ''},
|
||||
backgroundNavbar: {
|
||||
background: 'url(https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-nav-bg.png) no-repeat',
|
||||
backgroundSize: 'cover',
|
||||
},
|
||||
appList: [], //应用列表
|
||||
weatherInfo: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
active() {
|
||||
return {
|
||||
fontSize: '22px',
|
||||
color: '#333333',
|
||||
}
|
||||
},
|
||||
noticeList() {
|
||||
let {notices} = this
|
||||
return notices?.length > 0 ? notices?.map(e => e.title) || ['暂无公告'] : ['暂无公告']
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// uni.setNavigationBarTitle({title: "基层治理"})
|
||||
},
|
||||
onLoad() {
|
||||
this.autoLogin().then(() => {
|
||||
this.getSwiperList();
|
||||
this.getName();
|
||||
// this.getGrids();
|
||||
this.getActive();
|
||||
this.getNotice();
|
||||
this.getAppList()
|
||||
this.getWeather()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['autoLogin', 'authCheck']),
|
||||
getName() {
|
||||
this.$instance.post("/app/appcontentmoduleinfo/listByName", null, {
|
||||
params: {names: "新闻发布"},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data[0]?.categoryList?.length) {
|
||||
this.categorys = res.data[0]["categoryList"];
|
||||
this.search.moduleId = res.data[0]['id']
|
||||
this.search.categoryId = res.data[0]['categoryList'][0]['id']
|
||||
this.getCategoryList()
|
||||
}
|
||||
})
|
||||
},
|
||||
tabChange(idx) {
|
||||
this.index = idx
|
||||
this.search.categoryId = this.categorys[idx]['id']
|
||||
this.getCategoryList()
|
||||
},
|
||||
getCategoryList() {
|
||||
this.$instance.post("/app/appcontentinfo/list", null, {
|
||||
params: {...this.search, size: 100}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.categoryList = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
clickNotice(val) {
|
||||
const id = this.notices[val]["id"];
|
||||
if (id) {
|
||||
uni.navigateTo({
|
||||
url: "/mods/AppNotice/AppNotice?id=" + id
|
||||
})
|
||||
}
|
||||
},
|
||||
handleActive({type, appId, url}) {
|
||||
if (type == 0) {
|
||||
uni.navigateToMiniProgram({appId})
|
||||
} else if (type == 1) {
|
||||
this.$linkTo("/subPages/h5/webview?link=" + url);
|
||||
}
|
||||
},
|
||||
getNotice() {
|
||||
this.$instance.post("/app/appmininotice/list", null, {
|
||||
params: {size: 999},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.notices = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
getActive() {
|
||||
this.$instance.post("/app/appminitopicconfig/list", null, {
|
||||
params: {size: 999},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.activeList = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取顶部九宫格
|
||||
*/
|
||||
getGrids() {
|
||||
this.$instance.post("/app/appminihomeconfig/list", null, {
|
||||
params: {picked: 1},
|
||||
withoutToken: true
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.grids = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
getSwiperList() {
|
||||
this.$instance.post('/app/appbanner/listForWx', null, {
|
||||
withoutToken: true
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
this.swiperList = res.data?.map((e) => ({...e, image: e.imgUrl})) || []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick({type, appId, modulePath, url, checkType, corpId}) {
|
||||
//先判读是不是系统应用
|
||||
if (type != "0") {
|
||||
if (type == "1") {
|
||||
uni.navigateToMiniProgram({appId});
|
||||
} else if (type == "2") {
|
||||
uni.navigateTo({url: "/subPages/h5/webview?link=" + url});
|
||||
} else if (type == "3") {
|
||||
this.$linkTo(url);
|
||||
} else if (type == "4") {
|
||||
uni.openCustomerServiceChat({
|
||||
extInfo: {url: url},
|
||||
corpId: corpId,
|
||||
fail: () => {
|
||||
this.$u.toast('请使用普通微信打开小程序进行咨询');
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (type && type == "0") {
|
||||
uni.showLoading({title: '正在进入应用...'})
|
||||
this.authCheck({checkType, modulePath}).finally(() => uni.hideLoading())
|
||||
}
|
||||
},
|
||||
handleBannerClick(index) {
|
||||
if (!this.swiperList[index].linkUrl) return
|
||||
|
||||
if (this.swiperList[index].type == '0') { //0 h5链接; 1 小程序链接; 2外部小程序
|
||||
this.$linkTo(`/subPages/h5/webview?link=${this.swiperList?.[index]?.linkUrl}&title=${this.swiperList?.[index]?.title}`)
|
||||
} else if (this.swiperList[index].type == '1') {
|
||||
this.$linkTo(`${this.swiperList?.[index]?.linkUrl}`)
|
||||
} else {
|
||||
wx.navigateToMiniProgram({
|
||||
appId: this.swiperList[index].linkUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
getAppList() {
|
||||
this.$instance.get("/biaopin_home.json", null, { withoutToken: true }).then(res => {
|
||||
if (res.length) {
|
||||
this.appList = res
|
||||
}
|
||||
})
|
||||
},
|
||||
toService() {
|
||||
uni.switchTab({
|
||||
url: '/pages/AppModules/AppModules'
|
||||
})
|
||||
},
|
||||
openApp(row) {
|
||||
if(row.type == 1) { //type 0:内置应用, 1:外链, 2:tabbar页面
|
||||
uni.navigateToMiniProgram({appId: row.appId});
|
||||
}else if(row.type == 2) {
|
||||
uni.switchTab({url: row.modulePath})
|
||||
}else {
|
||||
uni.navigateTo({url: row.modulePath})
|
||||
}
|
||||
},
|
||||
getWeather() {
|
||||
this.$instance.post("/app/weather/queryWeather", {cityId: 101041800}, { withoutToken: true }).then(res => {
|
||||
if (res.data) {
|
||||
this.weatherInfo = res.data
|
||||
this.weatherInfo.icon = 'https://cdn.cunwuyun.cn/wuxi/home/weather-'+this.weatherInfo.wea_img+'.png'
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用基层治理~',
|
||||
path: `/pages/AppHome/AppHome`
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
background-color: #F4F5FA;
|
||||
position: relative;
|
||||
|
||||
.header-content {
|
||||
.header-bg {
|
||||
background: url('https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-header-bg.png') center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.weather-info {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
padding: 12px 34px;
|
||||
display: flex;
|
||||
img {
|
||||
width: 56px;
|
||||
height: 52px;
|
||||
margin-right: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
p {
|
||||
width: calc(100% - 68px);
|
||||
}
|
||||
}
|
||||
.swiper-content {
|
||||
width: 686px;
|
||||
height: 364px;
|
||||
margin: 0 auto 24px;
|
||||
}
|
||||
::v-deep .notice {
|
||||
width: 686px;
|
||||
height: 88px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 24px;
|
||||
margin: 0 auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
& > img {
|
||||
width: 128px;
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
.u-news-item {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .app-list {
|
||||
// margin-bottom: 24px;
|
||||
// }
|
||||
|
||||
.title-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 32px;
|
||||
line-height: 40px;
|
||||
h2 {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #222;
|
||||
}
|
||||
div {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #687DA6;
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.banner-flex {
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
.item-banner {
|
||||
display: inline-block;
|
||||
width: calc(50% - 20px);
|
||||
height: 160px;
|
||||
position: relative;
|
||||
margin-bottom: 16px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.banner-text {
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
left: 28px;
|
||||
}
|
||||
h2 {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 30px;
|
||||
line-height: 48px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 22px;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
.item-banner:nth-of-type(2n-1) {
|
||||
margin-right: 32px;
|
||||
}
|
||||
.color-3872BC {
|
||||
color: #3872BC;
|
||||
}
|
||||
.color-CE5A5A {
|
||||
color: #CE5A5A;
|
||||
}
|
||||
.color-409681 {
|
||||
color: #409681;
|
||||
}
|
||||
}
|
||||
|
||||
.app-content {
|
||||
padding: 48px 16px 8px;
|
||||
// display: flex;
|
||||
.item-app {
|
||||
display: inline-block;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
.item-app:nth-of-type(4n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.banner-content {
|
||||
display: flex;
|
||||
padding: 0 32px;
|
||||
.banner-left {
|
||||
width: 322px;
|
||||
height: 462px;
|
||||
margin-right: 30px;
|
||||
position: relative;
|
||||
h2 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 36px;
|
||||
line-height: 48px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 22px;
|
||||
line-height: 40px;
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.color-4C3FCD {
|
||||
color: #4C3FCD;
|
||||
}
|
||||
.banner-right {
|
||||
.item {
|
||||
width: 334px;
|
||||
height: 216px;
|
||||
position: relative;
|
||||
h2 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 500;
|
||||
font-size: 30px;
|
||||
line-height: 48px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 22px;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
.item:nth-of-type(1) {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.color-DF863E {
|
||||
color: #DF863E;
|
||||
}
|
||||
.color-D9606E {
|
||||
color: #D9606E;
|
||||
}
|
||||
}
|
||||
.banner-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.banner-text {
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
left: 28px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.grid-content {
|
||||
box-sizing: border-box;
|
||||
|
||||
.grid-item {
|
||||
img {
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
object-fit: fill;
|
||||
}
|
||||
|
||||
.grid-text {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
|
||||
.list-card {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.header {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 50px;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 24px;
|
||||
position: relative;
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.min-img {
|
||||
width: 204px;
|
||||
height: 204px;
|
||||
}
|
||||
|
||||
.play-icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 24px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
.tag {
|
||||
width: 144px;
|
||||
height: 48px;
|
||||
background: #EEEEEE;
|
||||
border-radius: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
font-size: 44px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
padding: 0 32px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.scroll-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.scroll-card {
|
||||
display: inline-block;
|
||||
width: 440px;
|
||||
height: 240px;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
margin-right: 32px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppHome/home.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/project/lianhua/AppHome/home_selected.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
122
src/project/lianhua/AppHome/openPage.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<div class="openPage">
|
||||
<!-- <img class="images" :src="picUrl" alt=""> -->
|
||||
<div class="uni-swiper-dot-box">
|
||||
<swiper class="swiper-box" @change="change" :current="current">
|
||||
<swiper-item v-for="(item, index) in imgList" :key="index">
|
||||
<img :src="item" alt="" class="banner-img">
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<div class="dot-list">
|
||||
<span v-for="(item, index) in dotList" :key="index" :class="current == index ? 'active' : ''"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "openPage",
|
||||
customNavigation: true,
|
||||
data() {
|
||||
return {
|
||||
picUrl: '',
|
||||
status: '',
|
||||
imgList: [
|
||||
'https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-page1.png',
|
||||
'https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-page2.png',
|
||||
'https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-page3.png',
|
||||
],
|
||||
current: 0,
|
||||
dotList: [0, 1, 2]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(e) {
|
||||
this.current = e.detail.current;
|
||||
if(this.current == 2) {
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/AppHome/AppHome'
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
},
|
||||
getStatus() {
|
||||
this.$instance.post('/app/appwechatguidepage/enableStatus',null, { withoutToken: true }).then(res=> {
|
||||
if(res?.data) {
|
||||
this.status = res.data
|
||||
if(this.status==0) {
|
||||
uni.switchTab({
|
||||
url: '/pages/AppHome/AppHome'
|
||||
})
|
||||
} else {
|
||||
// this.getList()
|
||||
// setTimeout(() => {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/AppHome/AppHome'
|
||||
// })
|
||||
// }, 3000)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post('/app/appwechatguidepage/listForXCX',null, {
|
||||
withoutToken: true,
|
||||
params: {
|
||||
current: 1,
|
||||
size: 100,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
let nums = res.data.records
|
||||
let index = Math.floor(Math.random() * nums.length)
|
||||
this.picUrl = nums[index].picUrl
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getStatus()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.openPage {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
::v-deep .uni-swiper-dot-box {
|
||||
width: 100%!important;
|
||||
height: 100%!important;
|
||||
}
|
||||
::v-deep .swiper-box {
|
||||
height: 100%!important;
|
||||
}
|
||||
.banner-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.dot-list {
|
||||
position: fixed;
|
||||
bottom: 118px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
opacity: 0.3;
|
||||
background: #026AF2;
|
||||
border-radius: 6px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.active {
|
||||
width: 22px;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
441
src/project/lianhua/AppMine/AppMine.vue
Normal file
@@ -0,0 +1,441 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="header-bg">
|
||||
<div class="header-info">
|
||||
<div class="wrap" @click="handleLogin()">
|
||||
<div class="user-img-div">
|
||||
<img :src="user.avatarUrl" alt="" class="user-img" v-if="user.id && user.avatarUrl"/>
|
||||
<img class="user-img" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" v-else alt="">
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<div class="option">
|
||||
<template v-if="!user.id">
|
||||
<p>登录</p>
|
||||
<p>点击进行登录</p>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p v-if="isApprove">{{ user.realName }}</p>
|
||||
<p v-else>{{ user.nickName }}</p>
|
||||
<p>{{ user.areaName || "" }}</p>
|
||||
</template>
|
||||
</div>
|
||||
<p class="info" v-if="user.id" @click.stop="$linkTo('./userInfo')">个人信息</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="approve" @click="$linkTo('./userInfo')">
|
||||
<img class="icon" src="https://cdn.cunwuyun.cn/wxmp/mine/approve.png" alt="">
|
||||
<div class="flex">
|
||||
<span class="cert" v-if="isApprove" v-text="approveLabel"></span>
|
||||
<u-icon v-else name="arrow-right" color="#E7F2FF" size="28"
|
||||
:label="approveLabel" label-color="#E7F2FF" label-pos="left" @click="approve"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-wrap">
|
||||
<div class="card" v-for="(group,index) in listGroup" :key="index">
|
||||
<div class="item" v-for="(item) in group" hover-class="bg-hover" :key="item.label"
|
||||
@click="linkTo(item.path, item.type)">
|
||||
<div class="block">
|
||||
<img class="icon" :src="item.icon" alt="">
|
||||
</div>
|
||||
<span class="desc solid" v-if="!item.share">{{ item.label }}</span>
|
||||
<button open-type="share" v-else>
|
||||
<span>{{ item.label }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div class="item" hover-class="bg-hover" @click="scan">
|
||||
<div class="block">
|
||||
<img class="icon" src="https://cdn.cunwuyun.cn/wxmp/mine/saoyisao.png" alt="">
|
||||
</div>
|
||||
<span class="desc">扫一扫</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="logout" v-if="token">
|
||||
<b class="login-out" @click="onLogout">退出登录</b>
|
||||
</div>
|
||||
<AiLogin ref="login" @success="getAuth()"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppMine",
|
||||
appName: "我的",
|
||||
customNavigation: true,
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
isApprove() {
|
||||
return this.user?.status == 2;
|
||||
},
|
||||
approveLabel() {
|
||||
return this.user?.areaId? "已认证" : "前往认证"
|
||||
},
|
||||
listGroup() {
|
||||
return [
|
||||
[
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiaxiang.png",
|
||||
// label: "我的家乡",
|
||||
// path: "/mods/AppHometown/AppHometown",
|
||||
// type: 'token'
|
||||
// },
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-wdjt.png",
|
||||
label: "我的家庭",
|
||||
path: "./myFamily",
|
||||
type: 'token'
|
||||
},
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-wdjf.png",
|
||||
label: "我的积分",
|
||||
path: "./myIntegral",
|
||||
type: 'token'
|
||||
},
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-wdewm.png",
|
||||
label: "我的二维码",
|
||||
path: "./myHarvestQR",
|
||||
type: 'token'
|
||||
},
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-sys.png",
|
||||
label: "扫一扫",
|
||||
path: "./myHarvestQR",
|
||||
type: 'scan'
|
||||
},
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-fxxcx.png",
|
||||
label: "分享小程序",
|
||||
path: "./myHarvestQR",
|
||||
type: 'share',
|
||||
share: true
|
||||
},
|
||||
],
|
||||
// [
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejifen.png",
|
||||
// label: "我的积分",
|
||||
// path: "/mods/AppCreditPoints/AppCreditPoints?type=detail",
|
||||
// type: 'idNumber'
|
||||
// },
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/chaoshidingdan.png",
|
||||
// label: "超市订单",
|
||||
// path: "/mods/AppOrderList/AppOrderList",
|
||||
// type: 'idNumber'
|
||||
// },
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/banshijindu.png",
|
||||
// label: "办事进度",
|
||||
// path: "/mods/AppProgress/AppProgress",
|
||||
// type: 'idNumber'
|
||||
// }
|
||||
// ],
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getUserInfo']),
|
||||
approve() {
|
||||
if (!this.token) {
|
||||
this.$refs.login.show();
|
||||
} else if (!this.isApprove) {
|
||||
if (this.user.status == 0) {
|
||||
this.$linkTo('/mods/AppAuth/AppAuth');
|
||||
} else {
|
||||
this.$linkTo('/mods/AppAuth/authSuccess')
|
||||
}
|
||||
}
|
||||
},
|
||||
linkTo(url, type) {
|
||||
if (type) {
|
||||
if (this.token) {
|
||||
if (type == 'token') {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
if (type == 'idNumber') {
|
||||
if (this.user.status == 0) {
|
||||
if (!this.user.phone) {
|
||||
this.$linkTo('/pages/phone/bingPhoneNumber?from=auth')
|
||||
} else {
|
||||
this.$linkTo('/mods/AppAuth/AppAuth')
|
||||
}
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
}
|
||||
if (type == 'scan') {
|
||||
this.scan()
|
||||
}
|
||||
if (type == 'share') {
|
||||
|
||||
}
|
||||
if (type == 'null') {
|
||||
this.$u.toast('内容建设中...')
|
||||
}
|
||||
} else {
|
||||
this.$refs.login.show()
|
||||
}
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
},
|
||||
handleLogin() {
|
||||
if (!this.token) {
|
||||
this.$refs.login.show();
|
||||
}
|
||||
},
|
||||
getAuth() {
|
||||
this.$nextTick(() => {
|
||||
this.token && this.getUserInfo('qujing')
|
||||
})
|
||||
},
|
||||
onLogout() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: "是否要退出登录",
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$store.commit('logout')
|
||||
this.$toast('退出成功');
|
||||
setTimeout(() => {
|
||||
this.getAuth();
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
scan() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
var info = JSON.parse(res.result)
|
||||
uni.navigateTo({url: `./addFamily?avatarUrl=${info.avatarUrl || ''}&nickName=${info.nickName}&openId=${info.openId}`})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getAuth();
|
||||
uni.$on('auth',()=> {
|
||||
this.getAuth();
|
||||
})
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用数字乡村治理服务一体化平台~',
|
||||
path: `/pages/AppModules/AppModules`
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
background-color: #F3F6F9;
|
||||
position: relative;
|
||||
|
||||
.header-bg {
|
||||
width: 100%;
|
||||
height: 512px;
|
||||
position: relative;
|
||||
|
||||
.header-info {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-top-bg.png') no-repeat;
|
||||
background-size: 100% auto;
|
||||
box-sizing: border-box;
|
||||
padding: 240px 0 0 48px;
|
||||
|
||||
.wrap {
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.user-img-div {
|
||||
display: inline-block;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
border: 4px solid #FFFFFF;
|
||||
flex-shrink: 0;
|
||||
|
||||
.user-img {
|
||||
display: inline-block;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border-radius: 58px;
|
||||
}
|
||||
}
|
||||
|
||||
.user-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-left: 26px;
|
||||
box-sizing: border-box;
|
||||
padding-right: 32px;
|
||||
|
||||
.option {
|
||||
& > p:first-child {
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 54px;
|
||||
}
|
||||
|
||||
& > p:last-child {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: #7088A0;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 136px;
|
||||
height: 48px;
|
||||
border-radius: 8px;
|
||||
border: 2px solid #7088A0;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: #7088A0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.approve {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 400px;
|
||||
transform: translateX(-50%);
|
||||
width: 686px;
|
||||
height: 112px;
|
||||
background: linear-gradient(90deg, #8FB4FF 0%, #4181FF 100%);
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20px;
|
||||
|
||||
.icon {
|
||||
width: 296px;
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
.cert {
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-size: 28px;
|
||||
color: #E7F2FF;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.list-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
border-radius: 16px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.item {
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:last-child {
|
||||
.desc {
|
||||
// border-bottom: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.block {
|
||||
width: 80px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
.icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
}
|
||||
|
||||
.desc, & > button {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
& > span {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.solid {
|
||||
border-bottom: 1px solid #EEE;
|
||||
}
|
||||
|
||||
|
||||
.no-border {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.logout {
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
line-height: 96px;
|
||||
text-align: center;
|
||||
.login-out {
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
84
src/project/lianhua/AppMine/addFamily.vue
Normal file
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<img :src="familyInfo.avatarUrl" alt="" v-if="familyInfo.avatarUrl">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<p class="user-name">{{familyInfo.nickName}}</p>
|
||||
<div class="btn" @click="add">加为家人</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
appName: "加家人",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
familyInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.familyInfo = {...options}
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.$instance.post(`/app/appwechatuserrelation/addRelation?openId=${this.familyInfo.openId}`).then(res=> {
|
||||
if(res.code == 0) {
|
||||
this.$u.toast('添加成功')
|
||||
setTimeout(() => uni.navigateBack({}), 1500)
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$u.toast(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding: 32px 32px 96px 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f6f9;
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
img {
|
||||
width: 176px;
|
||||
height: 176px;
|
||||
border-radius: 88px;
|
||||
margin: 160px auto 24px auto;
|
||||
}
|
||||
.user-name {
|
||||
margin-bottom: 100px;
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 36px;
|
||||
color: #333;
|
||||
}
|
||||
.btn {
|
||||
width: 400px;
|
||||
height: 80px;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
background: #4181FF;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppMine/me.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/project/lianhua/AppMine/me_selected.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
133
src/project/lianhua/AppMine/myFamily.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="user-list" v-if="list.length">
|
||||
<div class="item">
|
||||
<div class="item-left">
|
||||
<img :src="user.avatarUrl" alt="">
|
||||
<div class="user-info">
|
||||
<h3>{{user.nickName}}</h3>
|
||||
<p>{{user.girdName || ''}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-for="(item, index) in list" :key="index" v-if="user.openId != item.openId">
|
||||
<div class="item-left">
|
||||
<img :src="item.avatarUrl" alt="" v-if="item.avatarUrl">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<div class="user-info">
|
||||
<h3>{{item.nickName}}</h3>
|
||||
<p>{{item.girdName || ''}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-right">
|
||||
<div @click="toTransfer(item)">转积分</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else/>
|
||||
<p class="bottom-text">如果绑定错误,请联系网格员解绑!</p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
appName: "我的家庭",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$instance.post(`/app/appwechatuserrelation/list`).then(res => {
|
||||
if (res.code === 0 && res.data) {
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
toTransfer(row) {
|
||||
uni.navigateTo({url: `./transferIntrgral?openId=${row.openId}&nickName=${row.nickName}&avatarUrl=${row.avatarUrl || ''}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f3f6f9;
|
||||
|
||||
.user-list {
|
||||
padding: 32px 32px 0;
|
||||
height: calc(100% - 180px);
|
||||
overflow-y: scroll;
|
||||
.item {
|
||||
padding: 26px;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
margin-bottom: 24px;
|
||||
.item-left {
|
||||
width: calc(100% - 150px);
|
||||
display: flex;
|
||||
img {
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
border-radius: 54px;
|
||||
}
|
||||
.user-info {
|
||||
margin-left: 20px;
|
||||
h3 {
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 32px;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-right {
|
||||
width: 150px;
|
||||
div {
|
||||
width: 126px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
background: #2D7DFF;
|
||||
border-radius: 30px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #FFF;
|
||||
margin-top: 26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-text {
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
position: fixed;
|
||||
bottom: 92px;
|
||||
left: 180px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
125
src/project/lianhua/AppMine/myHarvestQR.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="AppHarvestQR">
|
||||
<div class="card">
|
||||
<div class="myself">
|
||||
<img class="avatar" :src="user.avatarUrl" alt="" v-if="user.avatarUrl">
|
||||
<img class="avatar" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<div class="info">
|
||||
<div class="name">{{ user.nickName }}</div>
|
||||
<div class="area">{{ user.areaName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qr">
|
||||
<img :src="user.qrCode" alt="">
|
||||
</div>
|
||||
|
||||
<div class="my-qr">我的丰收码</div>
|
||||
|
||||
<div class="pic">
|
||||
<img src="https://cdn.cunwuyun.cn/fengdu/img-zhuangshi.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "AppHarvestQR",
|
||||
data() {
|
||||
return {
|
||||
qrCode: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getQrCode() {
|
||||
this.$instance.post('/app/appwechatuserqujing/queryMyQrCode').then(res=> {
|
||||
if(res?.data) {
|
||||
this.qrCode = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
onLoad() {
|
||||
// this.getQrCode()
|
||||
uni.setNavigationBarTitle({
|
||||
title: '我的丰收码'
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppHarvestQR {
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16px;
|
||||
background: #FFF;
|
||||
|
||||
.myself {
|
||||
padding: 72px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.avatar {
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.info {
|
||||
width: calc(100% - 128px);
|
||||
height: 100%;
|
||||
.name {
|
||||
color: #333333;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.area {
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.qr {
|
||||
margin: 10% auto 24px;
|
||||
width: 542px;
|
||||
height: 542px;
|
||||
border-radius: 32px;
|
||||
border: 8px solid #f6f5f8;
|
||||
padding: 36px;
|
||||
box-sizing: border-box;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.my-qr {
|
||||
color: #999999;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
.pic {
|
||||
margin-top: 10%;
|
||||
width: 100%;
|
||||
height: 234px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 234px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
224
src/project/lianhua/AppMine/myIntegral.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<div class="myIntegral">
|
||||
<div class="header-content">
|
||||
<div class="top">
|
||||
<div class="total">
|
||||
<h1>{{info.integral || '0'}}</h1>
|
||||
<p>积分余额</p>
|
||||
</div>
|
||||
<div class="total right-total">
|
||||
<h1>{{info.houseIntegral || '0'}}</h1>
|
||||
<p>家庭积分</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="item">
|
||||
<div class="num">{{ info.serialNo || '0'}}</div>
|
||||
<div class="label">积分排行</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="num">{{ info.totalIntegral|| '0'}}</div>
|
||||
<div class="label">历史累计获取</div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
||||
</div>
|
||||
<div class="detail-content" v-if="list && list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-info">
|
||||
<p>{{ item.integralRuleName || ''}}
|
||||
<span v-if="item.integralRuleName && item.eventDesc">:</span>
|
||||
{{ item.eventDesc || '' }}</p>
|
||||
<span> {{ item.doTime }}</span>
|
||||
</div>
|
||||
<div class="item-num" :class="'color-'+ item.integralCalcType">
|
||||
{{ (item.integralCalcType == 1 ? '+' : '-') + item.changeIntegral }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "myIntegral",
|
||||
appName: "我的积分",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
current: 1,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getToatl()
|
||||
},
|
||||
methods: {
|
||||
getToatl() {
|
||||
this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegraldetail/list?integralUserId=${this.info.id}¤t=${this.current}&size=10`).then(res => {
|
||||
if (res?.data) {
|
||||
if (this.current > res.data.pages) {
|
||||
return
|
||||
}
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.myIntegral {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
height: calc(100% - 136px);
|
||||
background-color: #f3f6f9;
|
||||
padding-bottom: 30px;
|
||||
|
||||
.header-content {
|
||||
width: 690px;
|
||||
height: 358px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 70px 0 40px 30px;
|
||||
position: relative;
|
||||
.top {
|
||||
width: 100%;
|
||||
height: 213px;
|
||||
z-index: 99;
|
||||
position: relative;
|
||||
.total {
|
||||
width: 50%;
|
||||
padding-top: 48px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
h1 {
|
||||
font-size: 68px;
|
||||
color: #5AAD6A;
|
||||
}
|
||||
p {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.right-total {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
h1 {
|
||||
color: #4083E9;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
height: 145px;
|
||||
padding: 16px 0;
|
||||
box-sizing: border-box;
|
||||
border-top: 2px solid #EEEEEE;
|
||||
.item {
|
||||
text-align: center;
|
||||
z-index: 99;
|
||||
|
||||
.num {
|
||||
font-family: DIN;
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
width: 360px;
|
||||
height: 250px;
|
||||
top: -40px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 0 0 0 32px;
|
||||
padding: 16px 30px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.item {
|
||||
padding: 34px 0 32px 0;
|
||||
border-bottom: 2px solid #ddd;
|
||||
display: flex;
|
||||
|
||||
.item-info {
|
||||
width: 500px;
|
||||
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-num {
|
||||
width: calc(100% - 500px);
|
||||
text-align: right;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
.item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
.color-1 {
|
||||
color: #2C51CE !important;
|
||||
}
|
||||
|
||||
.color-0 {
|
||||
color: #E6736E !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
130
src/project/lianhua/AppMine/transferIntrgral.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<p class="text">积分收入方</p>
|
||||
<img :src="userInfo.avatarUrl" alt="" v-if="userInfo.avatarUrl">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<p class="user-name">{{userInfo.nickName}}</p>
|
||||
<u-input v-model="num" type="number" placeholder="请输入积分数量" :maxlength="11" :border="true" input-align="center" border-color="#ddd" height="76" class="input-num" />
|
||||
<p class="num-text">剩余积分余额:{{total}}</p>
|
||||
<div class="btn" @click="confirm">确认转出</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
appName: "我的家庭",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
num: '',
|
||||
total: '',
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userInfo = {...options}
|
||||
this.getIntegral()
|
||||
},
|
||||
methods: {
|
||||
getIntegral() {
|
||||
this.$instance.post(`/app/appintegraluser/girdDetail?id=${this.user.openId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.total = res.data.integral || 0
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
if (!/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/g.test(this.num)) {
|
||||
this.num = ''
|
||||
return this.$message.error('积分数量最多只保留两位小数点')
|
||||
}
|
||||
if (this.num > this.total) {
|
||||
return this.$u.toast('转出积分不能大于剩余积分')
|
||||
}
|
||||
this.$instance.post(`/app/appintegraluser/transferIntegral`,{
|
||||
fromId: this.user.openId,
|
||||
ids: [this.userInfo.openId],
|
||||
integral: this.num,
|
||||
integralUserType: '3',
|
||||
integralCalcType: '1'
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('积分转出成功!')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding: 32px 32px 96px 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f6f9;
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
.text {
|
||||
padding-top: 96px;
|
||||
line-height: 40px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
img {
|
||||
width: 176px;
|
||||
height: 176px;
|
||||
border-radius: 88px;
|
||||
margin: 0 auto 24px auto;
|
||||
}
|
||||
.user-name {
|
||||
margin-bottom: 100px;
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 36px;
|
||||
color: #333;
|
||||
}
|
||||
.input-num {
|
||||
width: calc(100% - 144px);
|
||||
margin: 0 0 16px 72px;
|
||||
}
|
||||
.num-text {
|
||||
color: #222;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
margin-bottom: 82px;
|
||||
}
|
||||
.btn {
|
||||
width: 400px;
|
||||
height: 80px;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
background: #4181FF;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
398
src/project/lianhua/AppMine/userInfo.vue
Normal file
@@ -0,0 +1,398 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="info-list">
|
||||
<div class="item-content mar-b8">
|
||||
<div class="item solid">
|
||||
<p class="mar-t22">头像</p>
|
||||
<!-- <button class="user-img-div" v-if="editAvatarUrl" open-type="chooseAvatar" @chooseavatar="handleWeixinSync">
|
||||
<img v-if="user.avatarUrl && !avatar" :src="user.avatarUrl" class="user-img">
|
||||
<img v-if="avatar" :src="avatar" alt="" class="user-img">
|
||||
<img v-if="!user.avatarUrl && !avatar" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" class="user-img">
|
||||
</button> -->
|
||||
<div class="user-img-div" v-if="editAvatarUrl">
|
||||
<AiUploader v-model="avatarUrlList" multiple placeholder="上传头像" :limit="1"></AiUploader>
|
||||
</div>
|
||||
<div class="user-img-div" v-else>
|
||||
<img v-if="user.avatarUrl && !avatar" :src="user.avatarUrl" class="user-img">
|
||||
<img v-else src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" class="user-img">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>用户昵称</p>
|
||||
<div class="item-right" v-if="!editNickName">
|
||||
<p class="name">{{ user.nickName }}</p>
|
||||
</div>
|
||||
<input class="item-right" v-else type="text" v-model="userName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-content mar-b8">
|
||||
<div class="item">
|
||||
<p>手机号</p>
|
||||
<div class="item-right" v-if="!!!editPhone">
|
||||
<p class="name">{{ user.phone || ''}}</p>
|
||||
</div>
|
||||
<input class="item-right" v-else type="number" v-model="userPhone" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-content mar-b8">
|
||||
<!-- <div class="item solid">
|
||||
<p>真实姓名</p>
|
||||
<div class="item-right" v-if="!editRealName">
|
||||
<p class="name">{{ user.realName || '' }}</p>
|
||||
</div>
|
||||
<input class="item-right" v-else type="text" v-model="userRealName" @input="idNumberInput">
|
||||
</div>
|
||||
<div class="item solid">
|
||||
<p>身份证号</p>
|
||||
<div class="item-right" v-if="!editIdNumber">
|
||||
<p class="name">{{ user.idNumber || '' }}</p>
|
||||
</div>
|
||||
<input class="item-right" v-else type="idNumber" v-model="userIdNumber" maxlength="18" @input="idNumberInput">
|
||||
</div> -->
|
||||
<div class="item">
|
||||
<p>所属网格</p>
|
||||
<div class="item-right" v-if="!editGird">
|
||||
<p class="name">{{ user.girdName || '' }}</p>
|
||||
</div>
|
||||
<AiPagePicker type="gird" class="item-right" v-model="userGirdId" :params="{formType:2}" @select="handleSelectGrid" nodeKey="id" v-else>
|
||||
<AiMore v-model="userGirdName" />
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="btn-wrapper btn-edit">
|
||||
<b class="btn" @click="btnText? submit(): editBtn()">{{ btnText? '提交': '修改' }}</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "userInfo",
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
},
|
||||
onLoad(o) {
|
||||
this.isFromTabbar = o.isFromTabbar
|
||||
this.path = o.path
|
||||
this.getUserInfo('qujing')
|
||||
uni.setNavigationBarTitle({
|
||||
title: '个人中心'
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editAvatarUrl: false,
|
||||
editNickName: false,
|
||||
editPhone: false,
|
||||
editRealName: false,
|
||||
editIdNumber: false,
|
||||
editGird: false,
|
||||
avatar: '',
|
||||
userName: '',
|
||||
userPhone: '',
|
||||
userRealName: '',
|
||||
userIdNumber: '',
|
||||
userGirdId: '',
|
||||
userGirdName: '',
|
||||
btnText: false,
|
||||
isFromTabbar: '',
|
||||
path: '',
|
||||
avatarUrlList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getUserInfo', 'autoLogin']),
|
||||
editBtn() {
|
||||
this.btnText = true
|
||||
this.editAvatarUrl = true;
|
||||
this.avatar = this.user.avatarUrl
|
||||
this.editNickName = true;
|
||||
this.userName = this.user.nickName
|
||||
this.editPhone = true;
|
||||
this.userPhone = this.user.phone
|
||||
this.editRealName = true;
|
||||
this.userRealName = this.user.realName
|
||||
this.editIdNumber = true;
|
||||
this.userIdNumber = this.user.idNumber
|
||||
this.editGird = true
|
||||
this.userGirdId = this.user.girdId
|
||||
this.userGirdName = this.user.girdName
|
||||
this.avatarUrlList = [{'url': this.user.avatarUrl}]
|
||||
},
|
||||
submit() {
|
||||
if(this.flag) return
|
||||
if(!this.avatarUrlList.length) {
|
||||
return this.$u.toast('请上传头像')
|
||||
}
|
||||
if (!this.userName) {
|
||||
return this.$u.toast('请输入用户昵称')
|
||||
}
|
||||
if (this.userName == '微信用户') {
|
||||
return this.$u.toast('请修改用户昵称')
|
||||
}
|
||||
if (!this.userPhone) {
|
||||
return this.$u.toast('请输入手机号')
|
||||
}
|
||||
// if (!this.userRealName) {
|
||||
// return this.$u.toast('请输入真实姓名')
|
||||
// }
|
||||
// if (!this.userIdNumber) {
|
||||
// return this.$u.toast('请输入身份证号')
|
||||
// }
|
||||
// if (!this.$idCardNoUtil.checkIdCardNo(this.userIdNumber)) {
|
||||
// return this.$u.toast('请输入正确的身份证号码')
|
||||
// }
|
||||
if (!this.userGirdId) {
|
||||
return this.$u.toast('请选择所属网格')
|
||||
}
|
||||
// if (!this.userAreaId) {
|
||||
// return this.$u.toast('请选择所属地区')
|
||||
// }
|
||||
// if (!/[^0]0{0,2}$/.test(this.userAreaId)) {
|
||||
// return this.$u.toast('所属地区必须选到村级')
|
||||
// }
|
||||
this.flag = true
|
||||
this.$instance.post(`/app/appwechatuserqujing/idNumberAttestation`, {
|
||||
// avatarUrl: this.avatar,
|
||||
avatarUrl: this.avatarUrlList[0].url,
|
||||
nickName: this.userName,
|
||||
phone: this.userPhone,
|
||||
name: this.userName,
|
||||
idNumber: this.userIdNumber,
|
||||
girdId: this.userGirdId,
|
||||
girdName: this.userGirdName
|
||||
}).then(res=> {
|
||||
if(res?.code==0) {
|
||||
this.$u.toast('提交成功')
|
||||
this.autoLogin({ loginWay:'qujing'})
|
||||
uni.$emit('auth')
|
||||
setTimeout(() => {
|
||||
if (this.isFromTabbar == 1) {
|
||||
uni.switchTab({ url: this.path })
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}, 600);
|
||||
}
|
||||
}).catch(err=> {
|
||||
this.$u.toast(err.msg)
|
||||
})
|
||||
},
|
||||
upLoad(img) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
url: `${this.$instance.defaults.baseURL}/admin/file/add`,
|
||||
filePath: img,
|
||||
name: 'file',
|
||||
header: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
Authorization: uni.getStorageSync('token')
|
||||
},
|
||||
success: uploadFileRes => {
|
||||
this.avatar = JSON.parse(uploadFileRes.data).data[0].split(';')[0]
|
||||
resolve(uploadFileRes)
|
||||
},
|
||||
fail: err => {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleWeixinSync({detail}) {
|
||||
const { avatarUrl } = detail
|
||||
if(avatarUrl?.length) {
|
||||
this.upLoad(avatarUrl)
|
||||
}
|
||||
},
|
||||
handleSelectGrid(v) {
|
||||
this.userGirdName = v.girdName
|
||||
this.userGirdId = v.id
|
||||
},
|
||||
idNumberInput() {
|
||||
if(this.userIdNumber.length == 18 && this.userRealName) {
|
||||
if(!this.userGirdId) {
|
||||
this.$instance.post(`/app/appresidentapplet/queryDetailByIdNumberAndName`,{
|
||||
name: this.userRealName,
|
||||
idNumber: this.userIdNumber
|
||||
}).then(res=> {
|
||||
if(res.data && res.data.id) {
|
||||
this.userGirdId = res.data.id
|
||||
this.userGirdName = res.data.girdName
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
background-color: #F5F5F5;
|
||||
|
||||
.info-list {
|
||||
padding: 50px 32px 0 32px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.item-content {
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 32px;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 36px 0;
|
||||
line-height: 40px;
|
||||
width: 100%;
|
||||
box-sizing: content-box;
|
||||
display: flex;
|
||||
|
||||
p {
|
||||
color: #333;
|
||||
font-weight: 400;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
div {
|
||||
color: #666;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.item-right {
|
||||
width: calc(100% - 200px);
|
||||
text-align: right;
|
||||
font-size: 28px;
|
||||
p {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ai-area__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 100px;
|
||||
|
||||
span {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #999;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .AiAreaPicker {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.user-img-div {
|
||||
width: calc(100% - 200px);
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.user-img {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
vertical-align: middle;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.right-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mar-t22 {
|
||||
margin-top: 44px;
|
||||
}
|
||||
}
|
||||
|
||||
.login-out {
|
||||
width: 100%;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
|
||||
.self-knowledge-show {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.toast-bg {
|
||||
position: fixed;
|
||||
z-index: 101;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.toast {
|
||||
background-color: #fff;
|
||||
width: 686px;
|
||||
height: 316px;
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.toast-msg {
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
padding: 84px 0 80px 0;
|
||||
}
|
||||
|
||||
.toast-btn {
|
||||
display: inline-block;
|
||||
width: 120px;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.cancel {
|
||||
margin-left: 394px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.confirm {
|
||||
color: #197DF0;
|
||||
}
|
||||
|
||||
.btn-edit {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
::v-deep.ai-uploader {
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
.imgList {
|
||||
width: 228px;
|
||||
height: 200px;
|
||||
display: inline-block!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
176
src/project/lianhua/AppModules/AppModules.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<!-- <div class="header" :class="[isFixed ? 'header-active' : '']">
|
||||
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
||||
<div class="nav-bar">
|
||||
<h2>服务</h2>
|
||||
</div>
|
||||
</div> -->
|
||||
<u-navbar :is-back="false" title="服务" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar"></u-navbar>
|
||||
<div class="header-bg"></div>
|
||||
<div class="body" v-if="list">
|
||||
<div class="card" v-for="(obj,key) in list" :key="key">
|
||||
<div class="title">{{ $dict.getLabel('homeConfigMenuType', key) }}</div>
|
||||
<u-grid :col="4" hover-class="text-hover">
|
||||
<u-grid-item
|
||||
v-for="(item, index) in obj" :key="index" class="grid-item" :custom-style="{padding:'9px 0'}"
|
||||
@click="handleClick(item)">
|
||||
<img :src="item.pictureUrl" alt=""/>
|
||||
<div class="grid-text">{{ item.name }}</div>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapActions, mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppModules",
|
||||
appName: "服务",
|
||||
customNavigation: true,
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
isFixed: false,
|
||||
statusBarHeight: 20,
|
||||
backgroundNavbar: {
|
||||
background: 'url(https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-nav-bg.png) no-repeat',
|
||||
backgroundSize: 'cover',
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
this.$dict.load("homeConfigMenuType").then(() => {
|
||||
this.getList()
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['authCheck']),
|
||||
handleClick({type, appId, modulePath, url, checkType, corpId}) {
|
||||
if (checkType == 3 && this.user.partyStatusForWX != 2) { //张硕让改的
|
||||
return this.$u.toast('您还不是党员,暂时无法使用该功能')
|
||||
}
|
||||
//先判读是不是系统应用
|
||||
if (type != "0") {
|
||||
if (type == "1") {
|
||||
uni.navigateToMiniProgram({appId});
|
||||
} else if (type == "2") {
|
||||
uni.navigateTo({url: "/subPages/h5/webview?link=" + url});
|
||||
} else if (type == "3") {
|
||||
this.$linkTo(url);
|
||||
} else if (type == "4") {
|
||||
uni.openCustomerServiceChat({
|
||||
extInfo: {url: url},
|
||||
corpId: corpId,
|
||||
fail: () => {
|
||||
this.$u.toast('请使用普通微信打开小程序进行咨询');
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (type && type == "0") {
|
||||
uni.showLoading({title: '正在进入应用...'})
|
||||
this.authCheck({checkType, modulePath}).finally(() => uni.hideLoading())
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post("/app/appminihomeconfig/listAll", null, {withoutToken: true}).then(res => {
|
||||
if (res?.data) {
|
||||
this.list = res.data.all;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
onPageScroll(params) {
|
||||
this.isFixed = params.scrollTop > 60;
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用数字乡村治理服务一体化平台~',
|
||||
path: `/pages/AppModules/AppModules`
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&.header-active {
|
||||
z-index: 1111;
|
||||
opacity: 1;
|
||||
background: #4181FF;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
position: relative;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
color: #fff;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.header-bg {
|
||||
height: 592px;
|
||||
background: url('https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-header-bg.png') center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.liner {
|
||||
height: 192px;
|
||||
background: linear-gradient(360deg, #F3F6F9 0%, #4181FF 100%);
|
||||
}
|
||||
|
||||
.body {
|
||||
margin-top: -568px;
|
||||
|
||||
.card {
|
||||
width: 686px;
|
||||
min-height: 304px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
margin: 0 auto 24px;
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 48px;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
img {
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
object-fit: fill;
|
||||
}
|
||||
|
||||
.grid-text {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppModules/service.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/project/lianhua/AppModules/service_selected.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
345
src/project/lianhua/AppNewFarmerBank/AppNewFarmerBank.vue
Normal file
@@ -0,0 +1,345 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="header-content">
|
||||
<u-navbar :is-back="false" title="积分" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar"></u-navbar>
|
||||
<div class="header-bg">
|
||||
<div class="swiper-content">
|
||||
<u-swiper :list="swiperList" mode="none" height="364" bg-color="none" @click="handleBannerClick"/>
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<p>{{ user.realName || user.nickName }},欢迎进入{{user.areaName}}!</p>
|
||||
<div @click="toPages('./signIn',status)">{{ status==1? '已签到':'签到' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="banner-list">
|
||||
<div class="item" v-for="(item, index) in bannerList" :key="index" @click="toPages(item.path)">
|
||||
<img :src="item.imgUrl" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<tempalte>
|
||||
<div class="title-wrap">
|
||||
<span class="title">精选动态</span>
|
||||
<div class="right" hover-class="text-hover" @click="$linkTo('./handpick')">
|
||||
<span class="title-more">更多</span>
|
||||
<u-icon name="arrow-right" size="28" color="#687DA6"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-news" v-if="list.length">
|
||||
<div class="item" v-for="(item,index) in list" :key="index" @click="$linkTo(`./pickDetail?id=${item.id}`)">
|
||||
<p class="title" v-if="item.girdName">{{item.girdName}}</p>
|
||||
<div class="user-flex">
|
||||
<span>{{item.createUserName}}</span>
|
||||
<p>{{item.title}}</p>
|
||||
<div @click.stop="upCount(item.id,index)">
|
||||
<img :src="item.upStatus==0? 'https://cdn.cunwuyun.cn/wechat/biaopin/integral/dianzan.png':'https://cdn.cunwuyun.cn/wechat/biaopin/integral/dianzan-select.png'" alt="">{{ item.upCount || 0 }}<span v-if="item.upCount > 99">+</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="item-content">{{item.content}}</p>
|
||||
<div class="img-list" v-if="item.images.length">
|
||||
<img v-for="(img, i) in item.images" :key="i" :src="img.url">
|
||||
</div>
|
||||
<div class="img-list" v-if="!item.images.length && item.videos.length">
|
||||
<img v-for="(video, ins) in item.videos" :key="ins" :src="video.facePicture.toString()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tempalte>
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
customNavigation: true,
|
||||
name: 'AppIntegral',
|
||||
appName: "积分",
|
||||
data() {
|
||||
return {
|
||||
cdn: "https://cdn.cunwuyun.cn/wxmp",
|
||||
swiperList: ['https://cdn.cunwuyun.cn/wechat/biaopin/integral/integral-swiper1.png'],
|
||||
backgroundNavbar: {
|
||||
background: 'url(https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-nav-bg.png) no-repeat',
|
||||
backgroundSize: 'cover',
|
||||
},
|
||||
bannerList: [
|
||||
{
|
||||
imgUrl: 'https://cdn.cunwuyun.cn/wechat/biaopin/integral/integral-banner-jfsq.png',
|
||||
path: './integralApply'
|
||||
},
|
||||
{
|
||||
imgUrl: 'https://cdn.cunwuyun.cn/wechat/biaopin/integral/integral-banner-jfrw.png',
|
||||
path: './integralTask'
|
||||
},
|
||||
{
|
||||
imgUrl: 'https://cdn.cunwuyun.cn/wechat/biaopin/integral/integral-banner-jfph.png',
|
||||
path: './integralRank'
|
||||
},
|
||||
{
|
||||
imgUrl: 'https://cdn.cunwuyun.cn/wechat/biaopin/integral/integral-banner-jfsc.png',
|
||||
path: '/mods/AppRedemptionPoints/AppRedemptionPoints'
|
||||
},
|
||||
{
|
||||
imgUrl: 'https://cdn.cunwuyun.cn/wechat/biaopin/integral/integral-banner-jfgs.png',
|
||||
path: '/mods/AppRedemptionPoints/pointsPublicity'
|
||||
},
|
||||
{
|
||||
imgUrl: 'https://cdn.cunwuyun.cn/wechat/biaopin/integral/integral-banner-wdjf.png',
|
||||
path: '/pages/AppMine/myIntegral'
|
||||
}
|
||||
],
|
||||
status: null,
|
||||
current: 1,
|
||||
list: [],
|
||||
allList: [],
|
||||
flag: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
methods: {
|
||||
getList(moduleId) {
|
||||
this.$instance.post(`/app/appcontentinfo/list-web`,null,{
|
||||
params: {
|
||||
moduleId: moduleId,
|
||||
current: this.current,
|
||||
girdId: this.user.girdId,
|
||||
containContent: true,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.allList = res.data.records
|
||||
let newList = res.data.records.length > 3 ? res.data.records.slice(0,3) : res.data.records
|
||||
let mapList = newList.map(e=> {
|
||||
|
||||
return {
|
||||
...e,
|
||||
images: e?.files.filter(i => (i.postfix == '.jpg' || i.postfix == '.jpeg' || i.postfix == '.png')),
|
||||
videos: e?.files.filter(i => (i.postfix == '.mp4' || i.postfix == '.MP4')),
|
||||
}
|
||||
})
|
||||
this.list = mapList.map(v=> {
|
||||
return {
|
||||
...v,
|
||||
images: v.images.length > 3? v.images.slice(0, 3) : v.images,
|
||||
videos: v.videos.length > 3? v.videos.slice(0, 3) : v.videos,
|
||||
upStatus: 0
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleBannerClick() {
|
||||
|
||||
},
|
||||
// 点赞
|
||||
upCount(id,index) {
|
||||
if (this.flag) return
|
||||
|
||||
this.flag = true
|
||||
this.$instance.post(`/app/appcontentinfo/supportById?id=${id}`).then(res=> {
|
||||
if(res?.code==0) {
|
||||
this.flag = false
|
||||
this.list[index].upStatus = 1
|
||||
this.$u.toast(`点赞成功`)
|
||||
}
|
||||
}).finally(() => this.flag = false)
|
||||
},
|
||||
toPages(url,status) {
|
||||
if(!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo')
|
||||
}).catch(() => {
|
||||
})
|
||||
} else {
|
||||
if(!status) {
|
||||
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() {
|
||||
this.getStatus()
|
||||
this.getModule()
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用基层治理~',
|
||||
path: `/pages/AppHome/AppHome`
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
|
||||
.header-content {
|
||||
.header-bg {
|
||||
background: url('https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-header-bg.png') center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.swiper-content {
|
||||
width: 686px;
|
||||
height: 364px;
|
||||
margin: 0 auto 24px;
|
||||
}
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 14px 32px 18px;
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
line-height: 56px;
|
||||
}
|
||||
div {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #0262F2;
|
||||
line-height: 52px;
|
||||
padding: 0 24px;
|
||||
border: 1px solid #0262f280;
|
||||
border-radius: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.banner-list {
|
||||
padding: 32px 0 0 32px;
|
||||
background-color: #fff;
|
||||
.item {
|
||||
display: inline-block;
|
||||
width: 330px;
|
||||
height: 160px;
|
||||
margin: 0 26px 32px 0;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 32px 32px 24px;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 700;
|
||||
font-size: 44px;
|
||||
color: #222;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
.right {
|
||||
|
||||
.title-more {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
line-height: 44px;
|
||||
color: #687DA6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-news {
|
||||
width: 686px;
|
||||
margin: 0 0 0 32px;
|
||||
.item {
|
||||
padding: 32px 24px 16px 24px;
|
||||
background-color: #fff;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 32px;
|
||||
.title {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.user-flex {
|
||||
line-height: 40px;
|
||||
font-family: PingFangSC-Regular;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 34px;
|
||||
color: #2D7DFF;
|
||||
margin-right: 20px;
|
||||
}
|
||||
p {
|
||||
display: inline-block;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
}
|
||||
div {
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
color: #687DA6;
|
||||
line-height: 40px;
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 4px;
|
||||
vertical-align: sub;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-content {
|
||||
margin-top: 30px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.img-list {
|
||||
margin-top: 24px;
|
||||
img {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin: 0 16px 16px 0;
|
||||
}
|
||||
img:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
396
src/project/lianhua/AppNewFarmerBank/AppNewFarmerBankOld.vue
Normal file
@@ -0,0 +1,396 @@
|
||||
<template>
|
||||
<div class="AppNewFarmerBank">
|
||||
<div class="swiper-content">
|
||||
<img src="https://cdn.cunwuyun.cn/fengdu/img-gongdeyinhang.png" alt="">
|
||||
</div>
|
||||
<div class="welcome">
|
||||
<div class="welcome-user">
|
||||
<span class="name">{{ user.realName || user.nickName }}</span>,
|
||||
<span v-if="!user.idNumber">欢迎来到功德银行!</span>
|
||||
<span v-else>欢迎进入{{ user.areaName }}!</span>
|
||||
|
||||
</div>
|
||||
<div class="signin" @click="toPages('./signIn',status)">{{ status==1? '已签到':'签到' }}</div>
|
||||
</div>
|
||||
<div class="card-list">
|
||||
<div class="jfsq" @click="toPages('./integralApply')">
|
||||
<p>积分申请</p>
|
||||
<h4>好事自荐得积分</h4>
|
||||
</div>
|
||||
<div class="jsrw" @click="toPages('./integralTask')">
|
||||
<p>积分任务</p>
|
||||
<h4>完成任务得积分</h4>
|
||||
</div>
|
||||
<div class="jfph" @click="toPages('./integralRank')">
|
||||
<p>积分排行</p>
|
||||
<h4>社区荣誉榜</h4>
|
||||
</div>
|
||||
<div class="jfsc" @click="toPages('/mods/AppRedemptionPoints/AppRedemptionPoints')">
|
||||
<p>积分商城</p>
|
||||
<h4>兑换得好物</h4>
|
||||
</div>
|
||||
<div class="jfgs" @click="toPages('/mods/AppRedemptionPoints/pointsPublicity')">
|
||||
<p>积分公示</p>
|
||||
<h4>积分获取规则</h4>
|
||||
</div>
|
||||
<div class="wdjf" @click="toPages('/pages/AppMine/myIntegral')">
|
||||
<p>我的积分</p>
|
||||
<h4>积分获取一目了然</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="handpick" v-if="list.length">
|
||||
<div class="title">
|
||||
<h1>精选动态</h1>
|
||||
<div class="more" v-if="allList.length > 3" @click="$linkTo('./handpick')">
|
||||
<span>更多</span>
|
||||
<u-icon name="arrow-right" color="#687DA6" size="28"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" v-if="list.length">
|
||||
<div class="card" v-for="(item,index) in list" :key="index" @click="$linkTo(`./pickDetail?id=${item.id}`)">
|
||||
<div class="title-info" v-if="item.girdName">
|
||||
{{item.girdName}}
|
||||
</div>
|
||||
<div class="top">
|
||||
<div class="left" >
|
||||
<div class="type-info">{{item.createUserName}}<span>{{item.title}}</span></div>
|
||||
</div>
|
||||
<div class="right" @click.stop="upCount(item.id,index)">
|
||||
<img :src="item.upStatus==0? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png':'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png'" alt="">
|
||||
<span>{{ item.upCount || 0 }}</span><span v-if="item.upCount > 99">+</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="content-info">{{item.content}}</p>
|
||||
<div class="imgs" v-if="item.images.length">
|
||||
<image v-for="(img, i) in item.images" :key="i" class="banner" :src="img.url"/>
|
||||
</div>
|
||||
<div class="imgs" v-if="!item.images.length && item.videos.length">
|
||||
<image v-for="(video, ins) in item.videos" :key="ins" class="banner" :src="video.facePicture.toString()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "AppNewFarmerBank",
|
||||
appName: "功德银行",
|
||||
data() {
|
||||
return {
|
||||
status: null,
|
||||
current: 1,
|
||||
list: [],
|
||||
allList: [],
|
||||
flag: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
methods: {
|
||||
getList(moduleId) {
|
||||
this.$instance.post(`/app/appcontentinfo/list-web`,null,{
|
||||
params: {
|
||||
moduleId: moduleId,
|
||||
current: this.current,
|
||||
girdId: this.user.girdId,
|
||||
containContent: true,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.allList = res.data.records
|
||||
let newList = res.data.records.length > 3 ? res.data.records.slice(0,3) : res.data.records
|
||||
let mapList = newList.map(e=> {
|
||||
|
||||
return {
|
||||
...e,
|
||||
images: e?.files.filter(i => (i.postfix == '.jpg' || i.postfix == '.jpeg' || i.postfix == '.png')),
|
||||
videos: e?.files.filter(i => (i.postfix == '.mp4' || i.postfix == '.MP4')),
|
||||
}
|
||||
})
|
||||
this.list = mapList.map(v=> {
|
||||
return {
|
||||
...v,
|
||||
images: v.images.length > 3? v.images.slice(0, 3) : v.images,
|
||||
videos: v.videos.length > 3? v.videos.slice(0, 3) : v.videos,
|
||||
upStatus: 0
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleBannerClick() {
|
||||
|
||||
},
|
||||
// 点赞
|
||||
upCount(id,index) {
|
||||
if (this.flag) return
|
||||
|
||||
this.flag = true
|
||||
this.$instance.post(`/app/appcontentinfo/supportById?id=${id}`).then(res=> {
|
||||
if(res?.code==0) {
|
||||
this.flag = false
|
||||
this.list[index].upStatus = 1
|
||||
this.$u.toast(`点赞成功`)
|
||||
}
|
||||
}).finally(() => this.flag = false)
|
||||
},
|
||||
toPages(url,status) {
|
||||
if(!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo')
|
||||
}).catch(() => {
|
||||
})
|
||||
} else {
|
||||
if(!status) {
|
||||
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() {
|
||||
this.getStatus()
|
||||
this.getModule()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppNewFarmerBank {
|
||||
padding-bottom: 20px;
|
||||
box-sizing: border-box;
|
||||
.swiper-content {
|
||||
width: 100%;
|
||||
height: 332px;
|
||||
padding: 32px 32px 0;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.welcome {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
.signin {
|
||||
width: 104px;
|
||||
height: 52px;
|
||||
line-height: 52px;
|
||||
border: 2px solid #2D7DFF;
|
||||
border-radius: 40px;
|
||||
color: #2D7DFF;
|
||||
text-align: center;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.welcome-user {
|
||||
width: calc(100% - 60px);
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
font-family: "PingFang SC";
|
||||
.name {
|
||||
color: #2D7DFF;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-list {
|
||||
background: #FFF;
|
||||
padding: 0 32px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.jfsq {
|
||||
background: url('https://cdn.cunwuyun.cn/fengdu/img-jifenshenqing.png') no-repeat ;
|
||||
color: #DF863E;
|
||||
}
|
||||
.jsrw {
|
||||
background: url('https://cdn.cunwuyun.cn/fengdu/img-jifenrenwu.png') no-repeat;
|
||||
color: #2D7DFF;
|
||||
}
|
||||
.jfph {
|
||||
background: url('https://cdn.cunwuyun.cn/fengdu/img-jifenpaihang.png') no-repeat;
|
||||
color: #338A77;
|
||||
}
|
||||
.jfsc {
|
||||
background: url('https://cdn.cunwuyun.cn/fengdu/img-jifenshangcheng.png') no-repeat;
|
||||
color: #D9606E;
|
||||
}
|
||||
.jfgs {
|
||||
background: url('https://cdn.cunwuyun.cn/fengdu/img-jifengongshi.png') no-repeat;
|
||||
color: #484899;
|
||||
}
|
||||
.wdjf {
|
||||
background: url('https://cdn.cunwuyun.cn/fengdu/img-wodejifen.png') no-repeat;
|
||||
color: #DA9A07;
|
||||
}
|
||||
& > div:nth-child(2n+1) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
div {
|
||||
background-size: 100% 100%;
|
||||
width: 328px;
|
||||
height: 144px;
|
||||
margin-bottom: 32px;
|
||||
padding: 28px 32px;
|
||||
box-sizing: border-box;
|
||||
p {
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
}
|
||||
h4 {
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.handpick {
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
margin: 32px 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h1 {
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.more {
|
||||
width: 200px;
|
||||
color: #687DA6;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
.card {
|
||||
margin-bottom: 24px;
|
||||
padding: 32px 24px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
border-radius: 12px;
|
||||
.title-info {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
letter-spacing: 0;
|
||||
line-height: 40px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.type-info {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 34px;
|
||||
color: #687DA6;
|
||||
line-height: 40px;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
line-height: 40px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 28px;
|
||||
.left {
|
||||
width: calc(100% - 100px);
|
||||
p {
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
span {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #687DA6;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-info {
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.imgs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
background: #FFF;
|
||||
|
||||
image,
|
||||
video {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin: 0 12px 0 0;
|
||||
}
|
||||
image:nth-child(3n + 0),
|
||||
video:nth-child(3n + 0) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
199
src/project/lianhua/AppNewFarmerBank/handpick.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="handpick">
|
||||
<div class="list" v-for="(item,index) in list" :key="index" @click="$linkTo(`./pickDetail?id=${item.id}`)">
|
||||
<div class="title-info" v-if="item.girdName">
|
||||
{{item.girdName}}
|
||||
</div>
|
||||
<div class="top">
|
||||
<div class="left" >
|
||||
<div class="type-info">{{item.createUserName}}<span>{{item.title}}</span></div>
|
||||
</div>
|
||||
<div class="right" @click.stop="upCount(item.id, index)">
|
||||
<img :src="item.upStatus == 0 ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png'" alt="">
|
||||
<span>{{ item.upCount || 0 }}</span><span v-if="item.upCount > 99">+</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="content-info">{{item.content}}</p>
|
||||
<div class="imgs" v-if="item.images.length">
|
||||
<image v-for="(img, i) in item.images" :key="i" class="banner" :src="img.url"/>
|
||||
</div>
|
||||
<div class="imgs" v-if="!item.images.length && item.videos.length">
|
||||
<image v-for="(video, i) in item.videos" :key="i" class="banner" :src="video.facePicture.toString()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "handpick",
|
||||
appName: "精选动态",
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
flag: false,
|
||||
current: 1,
|
||||
moduleId: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getModule() {
|
||||
this.$instance.post(`/app/appintegraluserapply/queryModuleByName`).then(res => {
|
||||
if (res?.data) {
|
||||
this.moduleId = res.data
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appcontentinfo/list-web`, null, {
|
||||
params: {
|
||||
moduleId: this.moduleId,
|
||||
current: this.current,
|
||||
girdId: this.user.girdId,
|
||||
containContent: true,
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.allList = res.data.records
|
||||
let newList = this.current==1? res.data.records : [...this.list, ...res.data.records]
|
||||
let mapList = newList.map(e => {
|
||||
return {
|
||||
...e,
|
||||
images: e?.files.filter(i => (i.postfix == '.jpg' || i.postfix == '.jpeg' || i.postfix == '.png')),
|
||||
videos: e?.files.filter(i => (i.postfix == '.mp4' || i.postfix == '.MP4')),
|
||||
}
|
||||
})
|
||||
this.list = mapList.map(v => {
|
||||
return {
|
||||
...v,
|
||||
images: v.images.length > 3 ? v.images.slice(0, 3) : v.images,
|
||||
videos: v.videos.length > 3 ? v.videos.slice(0, 3) : v.videos,
|
||||
upStatus: 0
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点赞
|
||||
upCount(id,index) {
|
||||
if (this.flag) return
|
||||
|
||||
this.flag = true
|
||||
this.$instance.post(`/app/appcontentinfo/supportById?id=${id}`).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.flag = false
|
||||
this.list[index].upStatus = 1
|
||||
this.$u.toast(`点赞成功`)
|
||||
}
|
||||
}).finally(() => this.flag = false)
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.getModule()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.handpick {
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
.list {
|
||||
padding: 32px 24px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 24px;
|
||||
.title-info {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
letter-spacing: 0;
|
||||
line-height: 40px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.type-info {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 34px;
|
||||
color: #687DA6;
|
||||
line-height: 40px;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
line-height: 40px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 28px;
|
||||
.left {
|
||||
width: calc(100% - 100px);
|
||||
p {
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
span {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #687DA6;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-info {
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.imgs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
background: #FFF;
|
||||
|
||||
image,
|
||||
video {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin: 0 12px 0 0;
|
||||
}
|
||||
image:nth-child(3n + 0),
|
||||
video:nth-child(3n + 0) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppNewFarmerBank/img/xz.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/project/lianhua/AppNewFarmerBank/img/xzh.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/project/lianhua/AppNewFarmerBank/integral.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
254
src/project/lianhua/AppNewFarmerBank/integralAdd.vue
Normal file
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<div class="integralAdd">
|
||||
<div class="item">
|
||||
<div class="left">事件类型</div>
|
||||
<!-- <AiSelect class="right" :list="dictList" v-model="form.applyItemId"></AiSelect> -->
|
||||
<div class="right" @click="toSelectType">
|
||||
<span v-if="form.applyItemId">{{ form.applyItemName }}</span>
|
||||
<i v-else>请选择</i>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<p>详情描述</p>
|
||||
<textarea v-model="form.content" :maxlength="300" placeholder="请输入详细描述..."></textarea>
|
||||
<div class="tips">{{ form.content.length }}/300</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<p>上传图片</p>
|
||||
<div class="upload">
|
||||
<AiUploader :def.sync="form.images" placeholder="上传图片" type="image" :limit="9" multiple></AiUploader>
|
||||
</div>
|
||||
<div class="tips left">可上传图片,最多上传9张。</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<p>上传视频</p>
|
||||
<div class="upload">
|
||||
<AiUploader :def.sync="form.videos" placeholder="上传视频" type="video" :limit="9" multiple :size="30 * 1024 * 1024"></AiUploader>
|
||||
</div>
|
||||
<div class="tips left">可上传视频,最大30M。</div>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<div class="left">所属网格</div>
|
||||
<AiPagePicker type="gird" v-model="form.girdId" :params="{ formType: 2 }" @select="handleSelectGrid" nodeKey="id">
|
||||
<AiMore v-model="form.girdName"/>
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
|
||||
<div class="btn-wrapper">
|
||||
<div class="btn" hover-class="text-hover" @click="submit">提交申请</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapActions, mapState} from "vuex";
|
||||
export default {
|
||||
name: "integralAdd",
|
||||
appName: '积分申请',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
applyItemId: '',
|
||||
applyIntegral: '',
|
||||
applyItemName: '',
|
||||
content: '',
|
||||
files: [],
|
||||
images: [],
|
||||
videos: [],
|
||||
girdId: '',
|
||||
girdName: '',
|
||||
},
|
||||
list: [],
|
||||
dictList: [],
|
||||
flag: false,
|
||||
id: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(o) {
|
||||
if(o.id) {
|
||||
this.id = o.id
|
||||
this.getDetail()
|
||||
}
|
||||
this.$dict.load(['clapEventStatus'])
|
||||
this.getAuth()
|
||||
this.form.girdId = this.user.girdId
|
||||
this.form.girdName = this.user.girdName
|
||||
uni.$on('applyTypeSelect', (res) => {
|
||||
this.form.applyItemId = res[0].id
|
||||
this.form.applyItemName = res[0].ruleName
|
||||
this.form.applyIntegral = res[0].integral
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
'form.applyItemId'(v) {
|
||||
if(v) {
|
||||
this.form.applyItemName = this.list.filter(e=> (e.id==v))[0].ruleName
|
||||
this.form.applyIntegral = this.list.filter(e => (e.id == v))[0].integral
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getUserInfo']),
|
||||
submit() {
|
||||
if(this.flag) return
|
||||
|
||||
if (!this.form.applyItemId) {
|
||||
return this.$u.toast('请选择事件类型')
|
||||
}
|
||||
|
||||
if (!this.form.content) {
|
||||
return this.$u.toast('请输入详细描述')
|
||||
}
|
||||
|
||||
if ((this.form.images.length + this.form.videos.length) > 9) {
|
||||
return this.$u.toast('图片和视频不得超过9个')
|
||||
} else {
|
||||
this.form.files = [...this.form.images,...this.form.videos]
|
||||
}
|
||||
|
||||
if (!this.form.girdId) {
|
||||
return this.$u.toast('请选择所属网格')
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
this.$instance.post(`/app/appintegraluserapply/addOrUpdate`,{
|
||||
...this.form
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('edit')
|
||||
setTimeout(()=> {
|
||||
uni.navigateBack()
|
||||
},500)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 事件类型
|
||||
getType() {
|
||||
this.$instance.post(`/app/appintegralrule/listByFdAndGirdInfo`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.list = res.data
|
||||
this.dictList = res.data.map(v => {
|
||||
return {
|
||||
value: v.id,
|
||||
label: v.ruleName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelectGrid(v) {
|
||||
this.form.girdName = v.girdName
|
||||
this.form.girdId = v.girdId
|
||||
},
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegraluserapply/queryDetailById?id=${this.id}`).then(res => {
|
||||
if (res?.data) {
|
||||
this.form = res.data
|
||||
this.form.images = res.data.files.filter(e => (['jpeg', 'jpg', 'png'].includes(e.postfix.split('.')[1])))
|
||||
this.form.videos = res.data.files.filter(e => (['mp4', 'MOV'].includes(e.postfix.split('.')[1])))
|
||||
this.form.files = []
|
||||
}
|
||||
})
|
||||
},
|
||||
getAuth() {
|
||||
this.$nextTick(() => {
|
||||
this.getUserInfo('qujing')
|
||||
this.getType()
|
||||
})
|
||||
},
|
||||
toSelectType() {
|
||||
uni.navigateTo({url: `./selectType?applyItemId=${this.form.applyItemId}`})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.integralAdd {
|
||||
padding: 24px 0 120px 0;
|
||||
box-sizing: border-box;
|
||||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #FFF;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 24px;
|
||||
.left {
|
||||
width: 250px;;
|
||||
}
|
||||
.right {
|
||||
width: calc(100% - 200px);
|
||||
text-align: right;
|
||||
font-size: 32px;
|
||||
span {
|
||||
display: inline-block;
|
||||
max-width: 400px;
|
||||
margin-right: 8px;
|
||||
color: #333333;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
i {
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
::v-deep .AiSelect {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.items {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
margin-bottom: 24px;
|
||||
p {
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #EEEEEE;
|
||||
}
|
||||
textarea {
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tips {
|
||||
padding: 12px 32px;
|
||||
box-sizing: border-box;
|
||||
text-align: right;
|
||||
color: #999999;
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
.upload {
|
||||
padding: 24px 32px 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .btn-wrapper {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
::v-deep .btn-wrapper .btn {
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
125
src/project/lianhua/AppNewFarmerBank/integralApply.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="integralApply">
|
||||
<div class="card-list" v-if="list.length">
|
||||
<div class="card" v-for="(item,index) in list" :key="index" @click="$linkTo(`./integralDetail?id=${item.id}`)">
|
||||
<div class="left">
|
||||
<div class="title">{{ item.applyItemName }}</div>
|
||||
<div class="time">{{ item.createTime.slice(0,16) }}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="integral">+{{ item.applyIntegral }}</div>
|
||||
<div class="status" :class="item.status==0? 'status0':item.status==1? 'status1':'status2'">{{ $dict.getLabel('appIntegralApplyEventStatus',item.status) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty :description="`暂无数据`" class="emptyWrap" v-else/>
|
||||
<div class="btn-wrapper">
|
||||
<div class="btn" hover-class="text-hover" @click="toAdd">积分申请</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "integralApply",
|
||||
appName: "积分申请",
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toAdd() {
|
||||
this.$linkTo('./integralAdd')
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegraluserapply/listByAppletUser`,null,{
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.list = this.current==1 ? res.data.records: [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$dict.load('appIntegralApplyEventStatus').then(()=> {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.integralApply {
|
||||
padding: 24px 0 130px 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.card-list {
|
||||
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;
|
||||
}
|
||||
.status1 {
|
||||
color: #5AAD6A;
|
||||
}
|
||||
.status2 {
|
||||
color: #CD413A;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .btn-wrapper {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
::v-deep .btn-wrapper .btn {
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
158
src/project/lianhua/AppNewFarmerBank/integralDetail.vue
Normal file
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<div class="integralDetail">
|
||||
<div class="detail">
|
||||
<div class="title">
|
||||
<h1>{{ info.applyItemName }}</h1>
|
||||
<p :class="info.status==0?'status0':info.status==1?'status1':'status2'">{{ $dict.getLabel('appIntegralApplyEventStatus', info.status) }}</p>
|
||||
</div>
|
||||
<div class="content">{{ info.content }}</div>
|
||||
<div class="imgs" v-if="images.length">
|
||||
<image v-for="(img, i) in images" @click="preview(img.url,images)" :key="i" class="banner" :src="img.url"/>
|
||||
</div>
|
||||
<div class="imgs" v-if="videos.length">
|
||||
<video v-for="(video, ins) in videos" :key="ins" class="file-img" :src="video.url"/>
|
||||
</div>
|
||||
|
||||
<div class="refuse" v-if="info.status == 2">
|
||||
<p><span></span>未通过理由</p>
|
||||
<div class="desc">{{ info.auditDesc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-wrapper" v-if="info.status==2">
|
||||
<div class="btn" hover-class="text-hover" @click="$linkTo(`./integralAdd?id=${info.id}`)">修改</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "integralDetail",
|
||||
appName: "积分申请详情",
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
info: {},
|
||||
images: [],
|
||||
videos: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegraluserapply/queryDetailById?id=${this.id}`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.info = res.data
|
||||
this.images = res.data.files.filter(e=> (['jpeg','jpg','png', 'JPG'].includes(e.postfix.split('.')[1])))
|
||||
this.videos = res.data.files.filter(e => (['mp4', 'MP4', 'MOV'].includes(e.postfix.split('.')[1])))
|
||||
}
|
||||
})
|
||||
},
|
||||
preview(url, imgs) {
|
||||
uni.previewImage({
|
||||
urls: imgs.map((v) => v.url),
|
||||
current: url,
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(o) {
|
||||
this.id = o.id
|
||||
this.getDetail()
|
||||
uni.$on('edit',()=> {
|
||||
this.getDetail()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.integralDetail {
|
||||
padding: 24px 0 120px 0;
|
||||
|
||||
.detail {
|
||||
.title {
|
||||
padding: 32px 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #FFF;
|
||||
h1 {
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
}
|
||||
p {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.status0 {
|
||||
color: #FF9A40;
|
||||
}
|
||||
.status1 {
|
||||
color: #5AAD6A;
|
||||
}
|
||||
.status2 {
|
||||
color: #CD413A;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
background: #FFF;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.imgs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 20px 32px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
|
||||
image,
|
||||
video {
|
||||
width: 226px;
|
||||
height: 226px;
|
||||
margin: 0 4px 4px 0;
|
||||
}
|
||||
image:nth-child(3n + 0),
|
||||
video:nth-child(3n + 0) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.refuse {
|
||||
background: #FFF;
|
||||
padding: 32px 32px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24px;
|
||||
p {
|
||||
margin-bottom: 32px;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #CD413A;
|
||||
border-radius: 50%;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .btn-wrapper {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
::v-deep .btn-wrapper .btn {
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
480
src/project/lianhua/AppNewFarmerBank/integralRank.vue
Normal file
@@ -0,0 +1,480 @@
|
||||
<template>
|
||||
<div class="integralRank" v-if="pageShow">
|
||||
<div class="credit-points">
|
||||
<div class="fixed-top">
|
||||
<div class="header-tab">
|
||||
<div class="tab-item" :class="{ active: tabIndex == index }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item }}
|
||||
<span class="active-line" v-if="tabIndex == index"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rank">
|
||||
<!-- <u-subsection :list="typeList" :current="typeCurrent" active-color="#4181FF" inactive-color="#666666" :bold="false" @change="typeChange"></u-subsection> -->
|
||||
<div class="content-subsection">
|
||||
<div class="type-subsection">
|
||||
<div class="item" :class="index == typeCurrent ? 'item-active' : ''" v-for="(item, index) in typeList" :key="index" @click="typeChange(index)">{{ item }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="faultage"></div>
|
||||
<div class="header-content" v-if="userInfo.length">
|
||||
<div class="item">
|
||||
<span class="item-num">{{ inx + 1 }}</span>
|
||||
<div class="user-img-content" v-if="userInfo[0].avatar_url">
|
||||
<image :src="userInfo[0].avatar_url" alt="" class="user-img mar-b4" />
|
||||
</div>
|
||||
<div class="user-name-bg mar-b4 mar-r24" v-else>{{ formatName(userInfo[0].name) }}</div>
|
||||
<span class="item-name">{{ userInfo[0].name }}</span>
|
||||
<span class="item-point">{{ userInfo[0].integral }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="faultage"></div>
|
||||
<div v-if="list && list.length">
|
||||
<div class="ranking-content">
|
||||
<div class="item" v-if="list.length > 1">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/2.png" alt="" class="top-img">
|
||||
<img :src="list[1].avatar_url" alt="" class="user-img mar-b4" v-if="list[1].avatar_url">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ formatName(list[1].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ list[1].name }}</p>
|
||||
<p class="item-num">{{ list[1].integral }}</p>
|
||||
</div>
|
||||
<div class="item-top item" v-if="list.length > 0">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/1.png" alt="" class="top-img-one">
|
||||
<img :src="list[0].avatar_url" alt="" class="user-img mar-b4" v-if="list[0].avatar_url">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ formatName(list[0].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ list[0].name }}</p>
|
||||
<p class="item-num">{{ list[0].integral }}</p>
|
||||
</div>
|
||||
<div class="item" v-if="list.length > 2">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/3.png" alt="" class="top-img">
|
||||
<img :src="list[2].avatar_url" alt="" class="user-img mar-b4" v-if="list[2].avatar_url">
|
||||
<div class="user-name-bg mar-b4" v-else>{{ formatName(list[2].name) }}</div>
|
||||
<p class="user-name mar-b8">{{ list[2].name }}</p>
|
||||
<p class="item-num">{{ list[2].integral }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ranking-list">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" v-if="index > 2">
|
||||
<span class="item-num">{{ index+1 }}</span>
|
||||
<img :src="item.avatar_url" alt="" class="user-img mar-b4" v-if="item.avatar_url">
|
||||
<div class="user-name-bg mar-b4 mar-r24" v-else>{{ formatName(item.name) }}</div>
|
||||
<span class="item-name">{{ item.name }}</span>
|
||||
<span class="item-point">{{ item.integral }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "integralRank",
|
||||
appName: "积分排行",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// tabList: ['总榜','月榜','周榜'],
|
||||
tabList: ['个人排行', '家庭排行'],
|
||||
tabIndex: 0,
|
||||
current: 1,
|
||||
userInfo: {},
|
||||
inx: 0,
|
||||
pageShow: false,
|
||||
list: [],
|
||||
typeList: ['总榜', '月榜', '周榜'],
|
||||
typeCurrent: 0
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
methods: {
|
||||
tabClick(index) {
|
||||
this.tabIndex = index
|
||||
this.typeCurrent = 0
|
||||
this.getList()
|
||||
},
|
||||
getList() {// 积分排行
|
||||
this.list = {}
|
||||
var url = this.tabIndex == 1 ? `/app/appintegraluser/integralSortFDHouse` : `/app/appintegraluser/integralSortFD` //tabIndex: 1家庭 0个人
|
||||
this.$instance.post(url+`?type=${this.typeCurrent}&size=50&areaId=${this.user.areaId}`).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)
|
||||
this.inx = res.data.findIndex(e=> e.open_id == this.user.openId)
|
||||
this.pageShow = true
|
||||
}
|
||||
})
|
||||
},
|
||||
formatName(name) {
|
||||
if (name == undefined) {
|
||||
return
|
||||
}
|
||||
return name.substr(name.length - 2, name.length > 2 ? (name.length - 1) : name.length)
|
||||
},
|
||||
typeChange(index) {
|
||||
this.typeCurrent = index
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
// if (this.list.length < 50) {
|
||||
// this.current++;
|
||||
// this.getList()
|
||||
// }
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
|
||||
.integralRank {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
background-color: #f3f6f9;
|
||||
|
||||
::v-deep .header-tab {
|
||||
background: #FFF;
|
||||
height: 116px;
|
||||
padding: 34px 0 42px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
.tab-item {
|
||||
color: #222222;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.active {
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.active-line {
|
||||
background: #2D7DFF;
|
||||
top: 82px;
|
||||
}
|
||||
}
|
||||
|
||||
.fixed-top {
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.rank {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
height: calc(100% - 156px);
|
||||
margin-top: 116px;
|
||||
|
||||
.content-subsection {
|
||||
width: 100%;
|
||||
height: 116px;
|
||||
padding: 22px 28px;
|
||||
box-sizing: border-box;
|
||||
background: #FFFF;
|
||||
|
||||
.type-subsection {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 36px;
|
||||
background-color: #f6f7f9;
|
||||
display: flex;
|
||||
.item {
|
||||
flex: 1;
|
||||
line-height: 64px;
|
||||
text-align: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 28px;
|
||||
color: #666;
|
||||
}
|
||||
.item-active {
|
||||
background: #FFF;
|
||||
border-radius: 32px;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.header-content {
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
background: #FFF;
|
||||
padding: 0 64px;
|
||||
box-sizing: border-box;
|
||||
// border: 4px solid #2d7dffff;
|
||||
display: flex;
|
||||
|
||||
.item-num {
|
||||
display: inline-block;
|
||||
width: 68px;
|
||||
height: 112px;
|
||||
line-height: 112px;
|
||||
color: #858594;
|
||||
font-size: 28px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.user-img-content {
|
||||
display: inline-block;
|
||||
width: 92px;
|
||||
height: 92px;
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #2D7DFF;
|
||||
margin: 14px 24px 0 0;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
display: inline-block;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.item-point {
|
||||
display: inline-block;
|
||||
width: calc(100% - 430px);
|
||||
text-align: right;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mar-r24 {
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.faultage {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
background: #f3f5f7;
|
||||
}
|
||||
|
||||
.ranking-content {
|
||||
padding: 94px 30px 0;
|
||||
background: #fff;
|
||||
|
||||
.item {
|
||||
display: inline-block;
|
||||
width: 216px;
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.12);
|
||||
border-radius: 12px;
|
||||
padding: 40px 0 76px 0;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.user-name {
|
||||
font-size: 30px;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.item-num {
|
||||
font-size: 46px;
|
||||
font-weight: 6000;
|
||||
color: #2C51CE;
|
||||
line-height: 54px;
|
||||
}
|
||||
|
||||
.top-img {
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
position: absolute;
|
||||
top: -11px;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-top {
|
||||
margin: -46px 20px 0;
|
||||
vertical-align: top;
|
||||
height: 370px;
|
||||
|
||||
.user-img {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
}
|
||||
|
||||
.user-name-bg {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
border-radius: 50%;
|
||||
background-color: #4E8EEE;
|
||||
font-size: 28px;
|
||||
line-height: 104px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.top-img-one {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: -22px;
|
||||
left: 0;
|
||||
height: 46px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-list {
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
background: #FFF;
|
||||
padding: 0 64px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.item-num {
|
||||
display: inline-block;
|
||||
width: 68px;
|
||||
color: #858594;
|
||||
font-size: 28px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.user-img {
|
||||
margin-right: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
display: inline-block;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.item-point {
|
||||
display: inline-block;
|
||||
width: 210px;
|
||||
text-align: right;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mar-r24 {
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.user-img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.user-name-bg {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background-color: #4E8EEE;
|
||||
font-size: 28px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mar-b4 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mar-b8 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 0 0 0 32px;
|
||||
padding: 30px 30px 94px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 34px 0 32px 0;
|
||||
border-bottom: 2px solid #ddd;
|
||||
display: flex;
|
||||
|
||||
.item-info {
|
||||
width: 500px;
|
||||
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-num {
|
||||
width: calc(100% - 500px);
|
||||
text-align: right;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.color-0 {
|
||||
color: #2C51CE !important;
|
||||
}
|
||||
|
||||
.color-1 {
|
||||
color: #E6736E !important;
|
||||
}
|
||||
|
||||
.fixed-top {
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
216
src/project/lianhua/AppNewFarmerBank/integralTask.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<div class="integralTask">
|
||||
<div class="fix-top">
|
||||
<div class="img-bg">
|
||||
<img src="https://cdn.cunwuyun.cn/fengdu/img-jifenlist.png" alt="">
|
||||
</div>
|
||||
<div class="title">任务大厅</div>
|
||||
</div>
|
||||
<div class="card-list" v-if="list.length">
|
||||
<div class="card" v-for="(item,index) in list" :key="index" @click="$linkTo('./taskDetail?id='+item.id)">
|
||||
<h4>{{ item.title }}</h4>
|
||||
<p>
|
||||
<span>{{ item.detail }}</span>
|
||||
</p>
|
||||
<div class="imgs" v-if="item.files">
|
||||
<image mode="aspectFill" v-for="(e, i) in item.files" :key="i" :src="e.url"/>
|
||||
</div>
|
||||
<div class="time">
|
||||
<div class="goin" v-if="item.intoBegintime && item.intoEndtime">
|
||||
<!-- <img src="https://cdn.sinoecare.com/i/2024/10/24/6719f9727bfd2.png" alt=""> -->
|
||||
<div class="label">{{ item.type == 0 ? '进场时间:' : '报名时间:' }}</div>
|
||||
<div class="value">{{ item.intoBegintime.substring(0, 16)}} 至 {{ item.intoEndtime.substring(0, 16) }}</div>
|
||||
</div>
|
||||
<div class="exit" v-if="item.exitBegintime && item.exitEndtime && item.type == 0">
|
||||
<!-- <img src="https://cdn.sinoecare.com/i/2024/10/24/6719f9727bfd2.png" alt=""> -->
|
||||
<div class="label">离场时间:</div>
|
||||
<div class="value">{{ item.exitBegintime.substring(0, 16) }} 至 {{ item.exitEndtime.substring(0, 16) }}</div>
|
||||
</div>
|
||||
<div class="type">
|
||||
<!-- <img src="https://cdn.sinoecare.com/i/2024/10/24/6719f9718cc70.png" alt=""> -->
|
||||
<div class="label">任务类型:</div>
|
||||
<div class="value">{{ $dict.getLabel('fdIntegralTaskType', item.type) }}</div>
|
||||
</div>
|
||||
<div class="type">
|
||||
<!-- <img src="https://cdn.sinoecare.com/i/2024/10/24/6719f9718cc70.png" alt=""> -->
|
||||
<div class="label">名额:</div>
|
||||
<div class="value">{{ item.quota || 0 }}</div>
|
||||
</div>
|
||||
<div class="type">
|
||||
<!-- <img src="https://cdn.sinoecare.com/i/2024/10/24/6719f9745e808.png" alt=""> -->
|
||||
<div class="label">参与人数:</div>
|
||||
<div class="value">{{ item.memberCount || 0}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty :description="`暂无任务`" class="emptyWrap" v-else/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'integralTask',
|
||||
appName: '积分任务',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
current: 1,
|
||||
files: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$instance.post('/app/appintegraltask/list',null,{
|
||||
params: {
|
||||
current: this.current,
|
||||
status: 1,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
const arr = res.data.records.map(e => {
|
||||
return {
|
||||
...e,
|
||||
files: e.files.length > 3 ? e.files.slice(0, 3) : e.files
|
||||
}
|
||||
})
|
||||
this.$nextTick(()=> {
|
||||
this.list = this.current > 1 ? [...this.list, ...arr] : arr
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '积分任务'
|
||||
});
|
||||
this.$dict.load(['fdIntegralTaskType']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.integralTask {
|
||||
padding-top: 292px;
|
||||
.fix-top {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
.img-bg {
|
||||
width: 100%;
|
||||
height: 216px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
color: #222222;
|
||||
padding: 32px 32px 0;
|
||||
background: #f3f5f7;
|
||||
z-index: 999;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.card-list {
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
.card {
|
||||
background: #FFF;
|
||||
color: #333333;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 24px;
|
||||
h4 {
|
||||
padding: 24px 24px 0;
|
||||
box-sizing: border-box;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
p {
|
||||
padding: 16px 24px;
|
||||
box-sizing: border-box;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
.imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding: 16px 24px;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
padding: 0 24px 24px;
|
||||
box-sizing: border-box;
|
||||
border-top: 2px solid #EEEEEE;
|
||||
& > div {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.goin,
|
||||
.exit,
|
||||
.type {
|
||||
display: flex;
|
||||
img {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
align-self: center;
|
||||
}
|
||||
.label {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
align-self: center;
|
||||
// width: 130px;
|
||||
}
|
||||
.value {
|
||||
color: #333333;
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
width: calc(100% - 160px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppNewFarmerBank/integral_select.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
125
src/project/lianhua/AppNewFarmerBank/pickDetail.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="pickDetail">
|
||||
<div class="container">
|
||||
<div class="title-info" v-if="data.girdName">
|
||||
{{data.girdName}}
|
||||
</div>
|
||||
<div class="type-info">{{data.createUserName}}<span>{{data.title}}</span></div>
|
||||
<div class="content-info">{{ data.content }}</div>
|
||||
<div class="imgs" v-if="images.length">
|
||||
<image v-for="(img, i) in images" @click="preview(img.url, images)" :key="i" class="banner" :src="img.url"/>
|
||||
</div>
|
||||
<div class="imgs" v-if="videos.length">
|
||||
<video v-for="(video, ins) in videos" :key="ins" class="file-img" :src="video.url"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'pickDetail',
|
||||
appName: '精选动态',
|
||||
data() {
|
||||
return {
|
||||
images: [],
|
||||
videos: [],
|
||||
id: '',
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.data = res.data
|
||||
this.images = res.data.files.filter(e => (['jpeg', 'jpg', 'png', 'JPG'].includes(e.postfix.split('.')[1])))
|
||||
this.videos = res.data.files.filter(e => (['mp4','MP4', 'MOV'].includes(e.postfix.split('.')[1])))
|
||||
}
|
||||
})
|
||||
},
|
||||
preview(url, imgs) {
|
||||
uni.previewImage({
|
||||
urls: imgs.map((v) => v.url),
|
||||
current: url,
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
onLoad(o) {
|
||||
this.id = o.id;
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pickDetail {
|
||||
padding-top: 32px;
|
||||
box-sizing: border-box;
|
||||
.container {
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
.title-info {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
letter-spacing: 0;
|
||||
line-height: 40px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.type-info {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 34px;
|
||||
color: #687DA6;
|
||||
line-height: 40px;
|
||||
margin-bottom: 28px;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
line-height: 40px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
.avatar {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.content-info {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
background: #FFF;
|
||||
padding: 0;
|
||||
}
|
||||
.imgs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 24px;
|
||||
background: #FFF;
|
||||
|
||||
image,
|
||||
video {
|
||||
width: 226px;
|
||||
height: 226px;
|
||||
margin: 0 4px 4px 0;
|
||||
}
|
||||
image:nth-child(3n + 0),
|
||||
video:nth-child(3n + 0) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
155
src/project/lianhua/AppNewFarmerBank/selectType.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div class="selectType">
|
||||
<div class="user-list">
|
||||
<template v-if="list.length>0">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="select-img" @click="checkClick(index)">
|
||||
<img :src="item.isCheck ? checkIcon : cirIcon" alt="">
|
||||
</div>
|
||||
<div class="user-info">
|
||||
{{ item.ruleName }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<AiEmpty v-else/>
|
||||
</div>
|
||||
<div class="pad-b118"></div>
|
||||
<div class="footer">
|
||||
<div class="btn" @click="confirm">确定选择</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
appName:"事件类型选择",
|
||||
name: "selectType",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
cirIcon: require('./img/xz.png'),
|
||||
checkIcon: require('./img/xzh.png'),
|
||||
applyItemId: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.applyItemId = option.applyItemId
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralrule/listByFdAndGirdInfo`).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.map((item) => {
|
||||
if(item.id == this.applyItemId) {
|
||||
item.isCheck = true
|
||||
}else {
|
||||
item.isCheck = false
|
||||
}
|
||||
|
||||
})
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
checkClick(index) {
|
||||
this.list.map((item) => {
|
||||
item.isCheck = false
|
||||
})
|
||||
this.list[index].isCheck = true
|
||||
},
|
||||
confirm() {
|
||||
let checkList = []
|
||||
this.list.map((item) => {
|
||||
if (item.isCheck) {
|
||||
checkList.push(item)
|
||||
}
|
||||
})
|
||||
if (!checkList.length) {
|
||||
return this.$u.toast('请先选择事件类型')
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit("applyTypeSelect", checkList)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selectType {
|
||||
::v-deep .AiTopFixed .u-search {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.pad-b118 {
|
||||
padding-bottom: 118px;
|
||||
}
|
||||
|
||||
.user-list {
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
.select-img {
|
||||
display: inline-block;
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin: 12px 36px 12px 30px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: inline-block;
|
||||
padding: 20px 0 20px 0;
|
||||
width: calc(100% - 114px);
|
||||
height: 100%;
|
||||
border-bottom: 1px solid #E4E5E6;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 74px;
|
||||
|
||||
img {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
margin-right: 34px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 118px;
|
||||
background: #F4F8FB;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
background: #1365DD;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #FFF;
|
||||
margin: 20px 34px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
96
src/project/lianhua/AppNewFarmerBank/signIn.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div class="signIn">
|
||||
<div class="card">
|
||||
<div class="imgs">
|
||||
<img src="https://cdn.cunwuyun.cn/fengdu/img-qiandaochenggong.png" alt="">
|
||||
</div>
|
||||
<p class="status">今日已完成签到</p>
|
||||
<h4>积分<span>+{{ data.changeIntegral || 0}}</span></h4>
|
||||
<div class="times">
|
||||
<div>时间</div>
|
||||
<div class="value">{{ data.createTime.slice(0,16) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'signIn',
|
||||
appName: '签到',
|
||||
data() {
|
||||
return {
|
||||
showPage: false,
|
||||
data: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sign() {
|
||||
this.$instance.post(`/app/appwechatsigninfo/sign`,{}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.sign()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.signIn {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
padding-top: 120px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.imgs {
|
||||
margin: 0 auto;
|
||||
width: 238px;
|
||||
height: 238px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.status {
|
||||
margin-top: 72px;
|
||||
text-align: center;
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
}
|
||||
h4 {
|
||||
text-align: center;
|
||||
margin-top: 24px;
|
||||
color: #666666;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
span {
|
||||
font-size: 52rpx;
|
||||
font-weight: 600;
|
||||
color: #5AAD6A;
|
||||
}
|
||||
}
|
||||
.times {
|
||||
width: 70%;
|
||||
border-top: 2px solid #f5f5f5;
|
||||
margin: 70px auto 0;
|
||||
padding-top: 72px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.value {
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
548
src/project/lianhua/AppNewFarmerBank/taskDetail.vue
Normal file
@@ -0,0 +1,548 @@
|
||||
<template>
|
||||
<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 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="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-renwuleixing.png" alt=""> -->
|
||||
<div class="item-info">
|
||||
<label>名额:</label>
|
||||
<div class="value">{{ info.quota || 0 }}</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">{{ info.memberCount || 0 }}</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="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>
|
||||
</div>
|
||||
<AiLogin ref="login" @success="getAuth()"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
var QQMapWX = require('./libs/qqmap-wx-jssdk.js')
|
||||
export default {
|
||||
name: "taskDetail",
|
||||
appName: "任务详情",
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
id: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
address: '',
|
||||
qqmapsdk: null,
|
||||
distance: 100,
|
||||
flag: false,
|
||||
showPages: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
intoIntegral() {
|
||||
const times = new Date().getTime()
|
||||
const inSTimes = new Date(this.info.intoBegintime?.replaceAll('-', '/')).getTime()
|
||||
const inETimes = new Date(this.info.intoEndtime?.replaceAll('-', '/')).getTime()
|
||||
const outSTimes = new Date(this.info.exitBegintime?.replaceAll('-', '/')).getTime()
|
||||
const outETimes = new Date(this.info.exitEndtime?.replaceAll('-', '/')).getTime()
|
||||
|
||||
if (times > inSTimes && times < inETimes) {
|
||||
return this.info.intoIntegral
|
||||
}
|
||||
|
||||
if (times > outSTimes && times < outETimes) {
|
||||
return this.info.exitIntegral
|
||||
}
|
||||
|
||||
return 0
|
||||
},
|
||||
isClock() {
|
||||
const times = new Date().getTime()
|
||||
const inSTimes = new Date(this.info.intoBegintime?.replaceAll('-', '/')).getTime()
|
||||
const inETimes = new Date(this.info.intoEndtime?.replaceAll('-', '/')).getTime()
|
||||
const outSTimes = new Date(this.info.exitBegintime?.replaceAll('-', '/')).getTime()
|
||||
const outETimes = new Date(this.info.exitEndtime?.replaceAll('-', '/')).getTime()
|
||||
// 不符合条件(任务未开始、已经结束..)
|
||||
if (times < inSTimes || times > outETimes || (inETimes < times && times < outSTimes)) {
|
||||
return 0
|
||||
}
|
||||
// 在打卡范围内未打卡
|
||||
if (this.info.clockRange > this.distance && (!this.info.intoClock && (inSTimes < times && times < inETimes)) || !this.info.exitClock && (outSTimes < times && times < outETimes)) {
|
||||
return 1
|
||||
}
|
||||
// 已打卡(打卡距离内 && 打卡时间内)
|
||||
if(this.info.clockRange > this.distance && (this.info.intoClock && (inSTimes < times && times < inETimes)) || (this.info.exitClock && outSTimes < times && times < outETimes)) {
|
||||
return 2
|
||||
}
|
||||
// 没在指定范围
|
||||
if(this.distance > this.info.clockRange) {
|
||||
return 3
|
||||
}
|
||||
// 在打卡范围内,没有积分
|
||||
if (this.info.clockRange > this.distance && (this.info.intoClock && (inSTimes < times && times < inETimes) && this.info.intoIntegral) || (this.info.exitClock && outSTimes < times && times < outETimes) && !this.info.exitIntegral) {
|
||||
return 4
|
||||
}
|
||||
},
|
||||
scope() {
|
||||
const times = new Date().getTime()
|
||||
const inSTimes = new Date(this.info.intoBegintime?.replaceAll('-', '/')).getTime() // 进场开始
|
||||
const inETimes = new Date(this.info.intoEndtime?.replaceAll('-', '/')).getTime() // 进场结束
|
||||
const outSTimes = new Date(this.info.exitBegintime?.replaceAll('-', '/')).getTime() // 离场开始
|
||||
const outETimes = new Date(this.info.exitEndtime?.replaceAll('-', '/')).getTime() // 离场结束
|
||||
|
||||
if (this.info.clockRange > this.distance && (this.info.intoClock && (inSTimes < times && times < inETimes)) || (this.info.exitClock && outSTimes < times && times < outETimes)) {
|
||||
return `无法重复打卡`
|
||||
}
|
||||
|
||||
if (this.info.clockRange > this.distance && (!this.info.intoClock && (times > inSTimes && times < inETimes)) || !this.info.exitClock && (times > outSTimes && times < outETimes)) {
|
||||
return `符合打卡条件`
|
||||
}
|
||||
|
||||
return `未到打卡时间/不在指定位置`
|
||||
},
|
||||
dkqd() {
|
||||
const times = new Date().getTime()
|
||||
const inSTimes = new Date(this.info.intoBegintime?.replaceAll('-', '/')).getTime() // 进场开始
|
||||
const inETimes = new Date(this.info.intoEndtime?.replaceAll('-', '/')).getTime() // 进场结束
|
||||
const outSTimes = new Date(this.info.exitBegintime?.replaceAll('-', '/')).getTime() // 离场开始
|
||||
const outETimes = new Date(this.info.exitEndtime?.replaceAll('-', '/')).getTime() // 离场结束
|
||||
if (this.info.clockRange > this.distance && (this.info.intoClock && (times > inSTimes && times < inETimes)) || (this.info.exitClock && outSTimes < times && times < outETimes)) {
|
||||
return `已打卡`
|
||||
}
|
||||
if (this.info.clockRange > this.distance && (!this.info.intoClock && (times > inSTimes && times < inETimes) && this.info.intoIntegral) || !this.info.exitClock && (times > outSTimes && times < outETimes) && this.info.exitIntegral) {
|
||||
return `打卡签到`
|
||||
}
|
||||
|
||||
if (times > outSTimes && times < outETimes && !this.info.exitIntegral) {
|
||||
return `已打卡`
|
||||
}
|
||||
|
||||
return `打卡签到`
|
||||
},
|
||||
baoming() {
|
||||
const times = new Date().getTime()
|
||||
const inSTimes = new Date(this.info.intoBegintime).getTime() // 报名开始
|
||||
const inETimes = new Date(this.info.intoEndtime).getTime() // 报名结束
|
||||
// 1已报名
|
||||
if (this.info.enrollClock) {
|
||||
return 1
|
||||
}
|
||||
// 2可以报名
|
||||
if (!this.info.enrollClock && times < inETimes && times > inSTimes) {
|
||||
return 2
|
||||
}
|
||||
// 0不符合条件
|
||||
return 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getUserInfo']),
|
||||
toAddress() {
|
||||
wx.openLocation({
|
||||
latitude: this.info.lat,
|
||||
longitude: this.info.lng,
|
||||
scale: 18
|
||||
})
|
||||
},
|
||||
preview(url) {
|
||||
uni.previewImage({
|
||||
urls: this.info.files.map(v => v.url),
|
||||
current: url
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegraltask/queryDetailById?id=${this.id}`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.info = res.data
|
||||
this.$nextTick(() => {
|
||||
this.getLocation()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 打卡积分
|
||||
clockIn() {
|
||||
if(!this.user.areaId) {
|
||||
return this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/mods/AppMine/userInfo')
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
if (!this.latitude) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
content: '您未授权定位,请先授权!'
|
||||
}).then(() => {
|
||||
this.getLocation()
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
if (this.isClock == 0 || this.isClock == 3) {
|
||||
return this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
content: '不满足打卡条件!'
|
||||
}).then(() => {
|
||||
this.getLocation()
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if (this.isClock == 2 || this.isClock == 4) {
|
||||
return this.$u.toast(`已打卡,请勿重复打卡!`)
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
this.daKa()
|
||||
},
|
||||
// 报名积分
|
||||
signUp() {
|
||||
if(this.info.enrollClock) return
|
||||
|
||||
if(this.baoming==0) {
|
||||
return this.$u.toast('不符合报名条件')
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
this.daKa()
|
||||
},
|
||||
daKa() {
|
||||
this.$instance.post(`/app/appintegraltask/clock`, {
|
||||
address: this.address,
|
||||
clockTime: this.$dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
|
||||
lat: this.latitude,
|
||||
lng: this.longitude,
|
||||
openId: this.user.openId,
|
||||
realName: this.user.realName,
|
||||
taskId: this.id,
|
||||
type: this.info.type
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.flag = false
|
||||
if (this.info.type == 1) {
|
||||
this.$u.toast('报名成功!')
|
||||
} else {
|
||||
this.$u.toast('打卡签到成功!')
|
||||
}
|
||||
setTimeout(()=> {
|
||||
this.getDetail()
|
||||
}, 400)
|
||||
}
|
||||
}).catch(err => this.$u.toast(err))
|
||||
},
|
||||
getLocation() {
|
||||
wx.authorize({
|
||||
scope: 'scope.userLocation',
|
||||
success: () => {
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: res => {
|
||||
this.latitude = res.latitude
|
||||
this.longitude = res.longitude
|
||||
this.qqmapsdk.reverseGeocoder({
|
||||
location: `${res.latitude},${res.longitude}`,
|
||||
success: data => {
|
||||
this.address = data.result.formatted_addresses.recommend
|
||||
},
|
||||
fail: function (info) {
|
||||
console.log(info)
|
||||
}
|
||||
})
|
||||
|
||||
this.qqmapsdk.calculateDistance({
|
||||
from: {
|
||||
longitude: res.longitude,
|
||||
latitude: res.latitude
|
||||
},
|
||||
to: [{
|
||||
longitude: this.info.lng,
|
||||
latitude: this.info.lat
|
||||
}],
|
||||
success: res => {
|
||||
this.distance = res.result.elements[0].distance
|
||||
},
|
||||
fail: function (error) {
|
||||
console.error(error)
|
||||
},
|
||||
complete: function (res) {
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: e => {
|
||||
console.log(e)
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
this.$dialog.confirm({
|
||||
content: '您未授权定位,功能将无法使用'
|
||||
}).then(() => {
|
||||
uni.openSetting({
|
||||
success: res => {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
this.$dialog.alert({
|
||||
content: '您未授权定位,功能将无法使用'
|
||||
}).then(() => {
|
||||
})
|
||||
} else {
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getAuth() {
|
||||
this.$nextTick(() => {
|
||||
this.token && this.getUserInfo('qujing')
|
||||
this.$nextTick(() => {
|
||||
this.toAuth()
|
||||
})
|
||||
})
|
||||
},
|
||||
toAuth() {
|
||||
if (!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
this.$linkTo('/pages/AppMine/userInfo')
|
||||
}).catch(() => {
|
||||
})
|
||||
} else {
|
||||
this.getDetail()
|
||||
this.showPages = true
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
this.id = o?.id
|
||||
if (decodeURIComponent(o.scene) != 'undefined') {
|
||||
this.id = decodeURIComponent(o.scene)
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: '任务详情'
|
||||
});
|
||||
this.qqmapsdk = new QQMapWX({
|
||||
key: process.env.NODE_ENV == 'production' ? 'RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S' : '3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY'
|
||||
})
|
||||
this.$dict.load(['fdIntegralTaskType'])
|
||||
},
|
||||
onShow() {
|
||||
if (!this.token) {
|
||||
this.$refs.login.show()
|
||||
} else {
|
||||
this.toAuth()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.taskDetail {
|
||||
padding-bottom: 400px;
|
||||
box-sizing: border-box;
|
||||
.task,
|
||||
.info {
|
||||
margin-top: 24px;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
h4 {
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 32px;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding-top: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.info {
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.items,
|
||||
.item {
|
||||
display: flex;
|
||||
margin-top: 24px;
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
align-self: center;
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
.items-info {
|
||||
width: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.address {
|
||||
width: 60px;
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
i {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #687DA6;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.item-info,
|
||||
.items-info {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
label {
|
||||
color: #666666;
|
||||
}
|
||||
.value {
|
||||
color: #333333;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .btn-wrapper {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
::v-deep .btn-wrapper .btn {
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
.opacity {
|
||||
opacity: 0.6000000238418579 !important;
|
||||
}
|
||||
|
||||
.gray {
|
||||
background: #b5b5bcff !important;
|
||||
}
|
||||
.btn-clock {
|
||||
height: 372px;
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
.btn-circle {
|
||||
width: 226px;
|
||||
height: 226px;
|
||||
background: #2D7DFF;
|
||||
border-radius: 50%;
|
||||
margin: 40px auto 24px;
|
||||
text-align: center;
|
||||
.text,
|
||||
.daka {
|
||||
color: #FFF;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.daka {
|
||||
padding-top: 62px;
|
||||
box-sizing: border-box;
|
||||
font-size: 40px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.opacity {
|
||||
opacity: 0.6000000238418579 !important;
|
||||
}
|
||||
|
||||
.gray {
|
||||
background: #b5b5bcff !important;
|
||||
}
|
||||
.tips {
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div class="AppCommunityInfo" v-if="pageShow">
|
||||
<h2>{{ info.title }}</h2>
|
||||
<div class="info-info">
|
||||
<span>{{ info.areaName }}</span>
|
||||
<span>{{ info.createDate }}</span>
|
||||
</div>
|
||||
<image class="banner" @click="preview(banner)" v-if="banner" mode="widthFix" :src="banner"/>
|
||||
<div class="rich-content">
|
||||
<u-parse :html="info.content"></u-parse>
|
||||
</div>
|
||||
<AiEmpty v-if="!info.title"></AiEmpty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AppCommunityInfo",
|
||||
appName: "社区简介",
|
||||
data() {
|
||||
return {
|
||||
pageShow: false,
|
||||
info: {},
|
||||
banner: ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
if (query.type !== '0') {
|
||||
uni.setNavigationBarTitle({
|
||||
title: query.type == 4 ? '社区公约' : '党员阵地'
|
||||
})
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.getInfo(query.type)
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo(type) {
|
||||
this.$instance.post(`/app/appcountrysidetourism/queryDetailByAreaIdForWX?areaId=${uni.getStorageSync('areaId')}&type=${type}`).then(res => {
|
||||
if (res.code === 0 && res.data) {
|
||||
this.info = res.data
|
||||
this.banner = res.data.thumbUrl ? JSON.parse(res.data.thumbUrl)[0].url : ''
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.pageShow = true
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
preview(url) {
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
current: url
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppCommunityInfo {
|
||||
min-height: 100vh;
|
||||
padding: 0 32px 40px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
|
||||
.banner {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 1.3;
|
||||
padding: 32px 0 16px;
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.info-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
|
||||
span {
|
||||
color: #999999;
|
||||
font-size: 30px;
|
||||
|
||||
&:last-child {
|
||||
margin-left: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep.emptyWrap {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,666 @@
|
||||
<template>
|
||||
<div class="AppPartyEnteringCommunity">
|
||||
<div class="header" :class="[isFixed ? 'header-active' : '']">
|
||||
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
||||
<div class="nav-bar">
|
||||
<h2>进村</h2>
|
||||
</div>
|
||||
</div>
|
||||
<header>
|
||||
<image src="https://cdn.cunwuyun.cn/wechat/biaopin/custom/custom-top-bg.png"/>
|
||||
<div>
|
||||
<AiAreaPicker :selectRoot="false" ref="area" :value="areaId" :name.sync="areaName" :areaId="$areaId"
|
||||
@input="areaSelect">
|
||||
<div class="ai-area__wrapper">
|
||||
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||
<span v-else>请选择</span>
|
||||
<image src="/static/img/area-bottom.png"/>
|
||||
</div>
|
||||
</AiAreaPicker>
|
||||
<div class="welcome">欢迎进入{{ areaName }}</div>
|
||||
<div class="tag" v-if="user.homeArea === areaId">我的家乡</div>
|
||||
<div class="tag1" @click="updateUserInfo" v-if="!user.homeArea && token">设为家乡</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="card">
|
||||
<div class="card-item" hover-class="text-hover" @click="$linkTo('./AppCommunityInfo?type=0')">
|
||||
<image src="https://cdn.cunwuyun.cn/wechat/biaopin/custom/custom-banner-sqjj.png"/>
|
||||
</div>
|
||||
<div class="card-item" hover-class="text-hover" @click="$linkTo('./AppCommunityInfo?type=4')">
|
||||
<image src="https://cdn.cunwuyun.cn/wechat/biaopin/custom/custom-banner-sqgy.png"/>
|
||||
</div>
|
||||
<!-- <div class="card-item" hover-class="text-hover" @click="$linkTo('./AppCommunityInfo?type=5')">
|
||||
<image src="https://cdn.cunwuyun.cn/pingchang/dyzd.png"/>
|
||||
</div>
|
||||
<div class="card-item" hover-class="text-hover"
|
||||
@click="$linkTo('/mods/AppVillagerDiscussion/AppVillagerDiscussion')">
|
||||
<image src="https://cdn.cunwuyun.cn/pingchang/jmys.png"/>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <div class="banner" @click="linkTo('/mods/AppCreditPoints/AppCpSupermarket', 'idNumber')">
|
||||
<image src="/static/img/jf-banner.png" class="banner"/>
|
||||
</div> -->
|
||||
<tempalte v-if="publicList.length">
|
||||
<div class="title-wrap">
|
||||
<span class="title">三务公开</span>
|
||||
<div class="right" hover-class="text-hover"
|
||||
@click="$linkTo(`/mods/AppContent/AppContent?names=三务公开&areaId=${areaId}`)">
|
||||
<span class="title-more">更多专题</span>
|
||||
<u-icon name="arrow-right" size="28" color="#999999"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-news">
|
||||
<div class="news-wrap" v-for="(item,index) in publicList" :key="index"
|
||||
@click="$linkTo('/mods/AppContent/contentDetail?id='+ item.id)">
|
||||
<div class="news-title">{{ item.title }}</div>
|
||||
<div class="news-bottom">
|
||||
<div class="tag">{{ item.categoryName }}</div>
|
||||
<div class="date">{{ item.createTime ? item.createTime.split(' ')[0] : '' }}</div>
|
||||
<div class="view">
|
||||
<em>{{ item.viewCount }}</em>
|
||||
人看过
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tempalte>
|
||||
<div class="title-wrap" v-if="activityList.length">
|
||||
<span class="title">专题活动</span>
|
||||
<div class="right">
|
||||
<span class="title-more" @click="$linkTo('/mods/AppVillageActivity/AppVillageActivity')">更多活动</span>
|
||||
<u-icon name="arrow-right" size="28" color="#999999"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<scroll-view :scroll-x="true" style="width: 100%" class="scroll-wrap" v-if="activityList.length">
|
||||
<div
|
||||
class="scroll-card"
|
||||
@click="$linkTo('/mods/AppVillageActivity/ActivityDetail?id=' + item.id)"
|
||||
hover-class="text-hover"
|
||||
v-for="(item, index) in activityList"
|
||||
:key="index">
|
||||
<image :src="item.url" mode="aspectFill"/>
|
||||
<div class="text">
|
||||
<span>{{ item.title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!activityList.length"></AiEmpty>
|
||||
</scroll-view>
|
||||
<!-- <div class="title-wrap">
|
||||
<span class="title">乡村相册</span>
|
||||
</div>
|
||||
<div class="album-list">
|
||||
<div
|
||||
class="album"
|
||||
v-for="(item, index) in albumList"
|
||||
hover-class="text-hover"
|
||||
:key="index"
|
||||
@click="$linkTo('/mods/AppPhotoAlbum/AppPhotoAlbum?type=' + item.type + '&name=' + item.name + '&url=' + item.coverImg)">
|
||||
<image :src="item.coverImg"/>
|
||||
<div class="total">共{{ item.total }}张</div>
|
||||
<div class="desc">{{ item.name }}</div>
|
||||
</div>
|
||||
<AiEmpty style="width: 100%" v-if="!albumList.length"></AiEmpty>
|
||||
</div> -->
|
||||
<AiLogin ref="login"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "AppPartyEnteringCommunity",
|
||||
appName: "社区",
|
||||
customNavigation: true,
|
||||
data() {
|
||||
return {
|
||||
isFixed: false,
|
||||
statusBarHeight: 20,
|
||||
top: 0,
|
||||
areaName: '',
|
||||
areaId: '',
|
||||
$areaId: '',
|
||||
albumList: [],
|
||||
activityList: [],
|
||||
publicList: [],
|
||||
moduleId: "",
|
||||
isInit: false
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.areaId = this.$mp.query.areaId || this.$areaId
|
||||
this.areaName = this.$mp.query.areaName || this.$areaName
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
||||
this.autoLogin()
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getName()
|
||||
this.getAlbumList()
|
||||
this.getActiveList()
|
||||
})
|
||||
uni.$on('update', () => {
|
||||
this.getAlbumList()
|
||||
})
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.$nextTick(() => {
|
||||
this.token && this.getUserInfo('qujing')
|
||||
})
|
||||
|
||||
if (this.user.homeArea) {
|
||||
if (!this.isInit) {
|
||||
this.areaId = this.user.homeArea
|
||||
this.areaName = this.user.homeName
|
||||
uni.setStorageSync('areaId', this.user.homeArea)
|
||||
uni.setStorageSync('areaName', this.user.homeName)
|
||||
this.isInit = true
|
||||
}
|
||||
} else if (!this.isInit && !this.user.homeArea) {
|
||||
setTimeout(() => {
|
||||
this.$dialog.alert({
|
||||
content: '请选择您的家乡'
|
||||
}).then(() => {
|
||||
this.$refs.area?.handleJump()
|
||||
this.isInit = true
|
||||
})
|
||||
}, 600)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions(['autoLogin', 'getUserInfo']),
|
||||
getName() {
|
||||
this.$instance.post("/app/appcontentmoduleinfo/listByNames", null, {
|
||||
params: {names: "三务公开"}
|
||||
}).then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.moduleId = res.data[0]["id"];
|
||||
this.getPublicList();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
updateUserInfo() {
|
||||
if (this.areaId.endsWith('000')) {
|
||||
this.$dialog.alert({
|
||||
content: '请选择村'
|
||||
}).then(() => {
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.$instance.post("/app/appwechatuser/updateById", {
|
||||
id: this.user.id,
|
||||
homeArea: this.areaId,
|
||||
homeName: this.areaName
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.getUserInfo('qujing')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getPublicList() {
|
||||
this.$instance.post("/app/appcontentinfo/list", null, {
|
||||
params: {moduleId: this.moduleId, size: 3, areaId: this.areaId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.publicList = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
linkTo(url, type) {
|
||||
if (type) {
|
||||
if (this.token) {
|
||||
if (type === 'idNumber') {
|
||||
if (!this.user.residentId) {
|
||||
this.$linkTo('/mods/AppAuth/AppAuth')
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$refs.login.show()
|
||||
}
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
},
|
||||
|
||||
areaSelect(v) {
|
||||
this.areaId = v
|
||||
this.isMore = false
|
||||
this.current = 0
|
||||
this.newsList = []
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getActiveList()
|
||||
this.getAlbumList()
|
||||
this.getPublicList()
|
||||
uni.setStorageSync('areaId', this.areaId)
|
||||
uni.setStorageSync('areaName', this.areaName)
|
||||
})
|
||||
},
|
||||
|
||||
getAlbumList() {
|
||||
this.$instance.post(`/app/appvillagepicturealbum/queryAlbumMenu?areaId=${this.areaId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.albumList = res.data.map(v => {
|
||||
return {
|
||||
...v,
|
||||
coverImg: `${this.$cdn}/dvcp/album/album${v.type}.png`
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getActiveList() {
|
||||
this.$instance.post(`/app/appvillageactivityinfo/listUp`, null, {
|
||||
params: {
|
||||
current: 1,
|
||||
size: 6,
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.activityList = res.data.records.map(v => {
|
||||
return {
|
||||
...v,
|
||||
url: v.url ? JSON.parse(v.url)[0].url : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用数字党建平昌~',
|
||||
path: `/pages/AppPartyEnteringCommunity/AppPartyEnteringCommunity`
|
||||
}
|
||||
},
|
||||
|
||||
onPageScroll(params) {
|
||||
this.isFixed = params.scrollTop > 60;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppPartyEnteringCommunity {
|
||||
min-height: 100%;
|
||||
background: #F3F6F9;
|
||||
|
||||
::v-deep .emptyImg {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&.header-active {
|
||||
z-index: 1111;
|
||||
opacity: 1;
|
||||
background: #4181FF;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
position: relative;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
color: #fff;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
& > header {
|
||||
position: relative;
|
||||
height: 480px;
|
||||
box-sizing: border-box;
|
||||
padding-left: 32px;
|
||||
|
||||
& > div {
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
}
|
||||
|
||||
.ai-area__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 100px;
|
||||
|
||||
span {
|
||||
margin-right: 16px;
|
||||
color: #FFFFFF;
|
||||
font-size: 44px;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
& > image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 480px;
|
||||
}
|
||||
|
||||
.welcome {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
line-height: 40px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
width: 120px;
|
||||
height: 44px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
color: #c0cae0;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.tag1 {
|
||||
width: 120px;
|
||||
height: 44px;
|
||||
border: 1px solid #c0cae0;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
color: #c0cae0;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
left: 32px;
|
||||
z-index: 1;
|
||||
background: #FFFFFF;
|
||||
border-radius: 32px;
|
||||
margin-top: -132px;
|
||||
box-sizing: border-box;
|
||||
padding: 28px 24px 0 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
width: 686px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.card-item {
|
||||
width: 308px;
|
||||
height: 144px;
|
||||
margin-bottom: 28px;
|
||||
|
||||
image {
|
||||
width: 308px;
|
||||
height: 144px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.banner {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
height: 200px;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F3F6F9 100%);
|
||||
|
||||
image {
|
||||
display: block;
|
||||
width: 692px;
|
||||
height: 200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 32px 32px 24px;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #222;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.right {
|
||||
|
||||
.title-more {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
color: #687DA6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.album-list {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
|
||||
.album {
|
||||
position: relative;
|
||||
width: 218px;
|
||||
height: 240px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.total {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
z-index: 2;
|
||||
width: 74px;
|
||||
height: 40px;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
border-radius: 8px;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.desc {
|
||||
position: absolute;
|
||||
bottom: 16px;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 12px;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-news {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
|
||||
.news-wrap {
|
||||
height: 186px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
box-sizing: border-box;
|
||||
padding: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.news-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tag {
|
||||
width: 144px;
|
||||
height: 48px;
|
||||
background: #EEEEEE;
|
||||
border-radius: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.view {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > em {
|
||||
color: #4181FF;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-wrap {
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
|
||||
.scroll-card {
|
||||
display: inline-block;
|
||||
width: 400px;
|
||||
height: 332px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
margin-right: 32px;
|
||||
font-size: 0;
|
||||
|
||||
& > image {
|
||||
width: 400px;
|
||||
height: 240px;
|
||||
border-radius: 16px 16px 0 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
height: calc(100% - 240px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
|
||||
& > span {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .AiArea {
|
||||
padding-top: 64px;
|
||||
height: 88px;
|
||||
|
||||
._img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.area-name {
|
||||
font-size: 44px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppPartyEnteringCommunity/custom.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
119
src/project/lianhua/AppProgressNew/AppProgressNew.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div class="service">
|
||||
<image src="https://cdn.sinoecare.com/i/2024/11/28/674830fb48664.png" class="headerBanner" mode="widthFix"/>
|
||||
<div class="service-list" v-if="list.length">
|
||||
<div class="service-item" hover-class="bg-hover" @click="toDetail('./detail?id=' + item.id)" v-for="(item, index) in list" :key="index">
|
||||
<div class="service-item__wrapper">
|
||||
<h2>{{ item.processName }}</h2>
|
||||
<i class="iconfont"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
||||
|
||||
<!-- <u-loadmore :status="loadingStatus" :margin-top="30" :margin-bottom="30" color="#999" font-size="26" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppProgressNew',
|
||||
appName: '办事指南',
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
title: '',
|
||||
subTitle: '',
|
||||
current: 1,
|
||||
list: [],
|
||||
pages: 2
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.id = query.id
|
||||
this.getList()
|
||||
uni.setNavigationBarTitle({
|
||||
title: query.title,
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
if (this.current > this.pages) return
|
||||
this.$instance.post(`/app/approval-process-def/list-xcx?processType=2`, null, {
|
||||
params: {
|
||||
size: 20,
|
||||
current: this.current
|
||||
},
|
||||
withoutToken: true,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
this.pages = res.data.pages
|
||||
this.list = list
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail(url) {
|
||||
this.$linkTo(url)
|
||||
},
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.service {
|
||||
padding-bottom: 40px;
|
||||
|
||||
.headerBanner {
|
||||
width: 100vw;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.service-list {
|
||||
background-color: #fff;
|
||||
|
||||
.service-item {
|
||||
height: 116px;
|
||||
padding: 0 32px;
|
||||
|
||||
&:last-child {
|
||||
.service-item__wrapper {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.service-item__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 116px;
|
||||
border-bottom: 1px solid #d8dde6;
|
||||
|
||||
h2 {
|
||||
color: #333333;
|
||||
font-size: 32px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
i {
|
||||
position: relative;
|
||||
right: -4px;
|
||||
font-size: 36px;
|
||||
color: #c9c9cd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
62
src/project/lianhua/AppProgressNew/detail.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="Page" v-if="showPage">
|
||||
<div class="processNames">{{ detail.processName }}</div>
|
||||
<div class="types">{{ detail.classificationName }}</div>
|
||||
<u-parse :html="detail.needToKnow"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'detail',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
showPage: false,
|
||||
id: '',
|
||||
detail: {},
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.getDetail()
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/approval-process-def/info-id?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.detail = res.data
|
||||
this.showPage = true
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.Page {
|
||||
padding: 0 32px 0 32px;
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
.processNames {
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
padding-top: 32px;
|
||||
}
|
||||
.types {
|
||||
padding-top: 16px;
|
||||
font-size: 30px;
|
||||
color: #999999;
|
||||
}
|
||||
.conts {
|
||||
padding: 64px 0 48px 0;
|
||||
font-size: 36px;
|
||||
line-height: 64px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
377
src/project/lianhua/AppRedemptionPoints/AppRedemptionPoints.vue
Normal file
@@ -0,0 +1,377 @@
|
||||
<template>
|
||||
<div class="AppRedemptionPoints">
|
||||
<div class="fixed-top">
|
||||
<div class="header">
|
||||
<div class="num">
|
||||
<p>积分余额</p>
|
||||
<h3>{{total}}</h3>
|
||||
</div>
|
||||
<div class="btn" @click="toMyOrder">我的订单</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="76" font-size="28" bg-color="#fff" inactive-color="#8891A1"
|
||||
active-color="#1D2229 " :bar-style="barStyle" @change="changeTab" ></u-tabs>
|
||||
<div class="type-select">
|
||||
<div :class="currentType == index ? 'item active' : 'item'" v-for="(item, index) in typeList" :key="index" @click="typeClick(index)">
|
||||
{{item}}
|
||||
<span v-if="index == 1" class="down-icon">⏷</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="point-select" v-if="currentType == 1">
|
||||
<u-tabs :list="pointTypeList" :is-scroll="true" :current="currentPoint" height="80" font-size="24" bg-color="#fff" inactive-color="#666666"
|
||||
active-color="#4181FF" bar-width="0" :bold="false" @change="pointClick" ></u-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="left-list" v-if="leftList.length">
|
||||
<div class="list-info" v-for="(item, index) in leftList" :key="index">
|
||||
<div class="item" @click="toProductDetail(item)">
|
||||
<img :src="item.picUrl" alt="">
|
||||
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGTypeText', item.typeText) }}</div>
|
||||
<div class="content">
|
||||
<p class="text">{{item.title}}</p>
|
||||
<div class="item-money">
|
||||
<h3>{{item.integralPrice}}积分</h3>
|
||||
<p v-if="item.type == 1">+¥{{item.payMoney}}</p>
|
||||
<span v-if="item.type == 1">兑换后再付</span>
|
||||
</div>
|
||||
<div v-if="item.shopStatus == 1">
|
||||
<div class="btn" :class="total >= item.integralPrice ? 'btn1' : 'btn0'" @click.stop="toOrder(item)" v-if="item.stock > 0">{{total >= item.integralPrice ? '去兑换' : '积分不足'}}</div>
|
||||
<div class="btn btn0" v-else>商品缺货</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="btn btn0">店铺停用</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-list" v-if="rightList.length">
|
||||
<div class="list-info" v-for="(item, index) in rightList" :key="index">
|
||||
<div class="item" @click="toProductDetail(item)">
|
||||
<img :src="item.picUrl" alt="">
|
||||
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGTypeText', item.typeText) }}</div>
|
||||
<div class="content">
|
||||
<p class="text">{{item.title}}</p>
|
||||
<div class="item-money">
|
||||
<h3>{{item.integralPrice}}积分</h3>
|
||||
<p v-if="item.type == 1">+¥{{item.payMoney}}</p>
|
||||
<span v-if="item.type == 1">兑换后再付</span>
|
||||
</div>
|
||||
<div v-if="item.shopStatus == 1">
|
||||
<div class="btn" :class="total >= item.integralPrice ? 'btn1' : 'btn0'" @click.stop="toOrder(item)" v-if="item.stock > 0">{{total >= item.integralPrice ? '去兑换' : '积分不足'}}</div>
|
||||
<div class="btn btn0" v-else>商品缺货</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="btn btn0">店铺停用</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!goodsList.length"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'AppRedemptionPoints',
|
||||
appName: '积分兑换',
|
||||
data() {
|
||||
return {
|
||||
tabList: [{name: '全部'}, {name: '积分兑换'}, {name: '低价商品'}],
|
||||
currentTabs: 0,
|
||||
barStyle: {
|
||||
'width': '20px',
|
||||
'height': '3px',
|
||||
'border-radius': '2px',
|
||||
'bottom': '-3px',
|
||||
'background': '#2D7DFF'
|
||||
},
|
||||
typeList: ['最新上架', '积分', '我可兑换的'],
|
||||
currentType: 0,
|
||||
pointTypeList: [{name: '全部'}, {name: '50分以下'}, {name: '100分以下'}, {name: '200分以下'}, {name: '5000分以下'}],
|
||||
currentPoint: 0,
|
||||
goodsList: [],
|
||||
leftList: [],
|
||||
rightList: [],
|
||||
total: 0,
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.getTotal()
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
uni.$on('updateGoodsList', () => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
this.getTotal()
|
||||
},
|
||||
methods: {
|
||||
getTotal() {
|
||||
this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => {
|
||||
if (res?.data) {
|
||||
this.total = res.data.integral || 0
|
||||
}
|
||||
})
|
||||
},
|
||||
getListInit() {
|
||||
this.goodsList = []
|
||||
this.leftList = []
|
||||
this.rightList = []
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/goodsListXCX`, null, {
|
||||
params: {
|
||||
goodsType: this.currentTabs, //商品类型,0:全部、1:积分兑换、2:京东低价商品,默认0
|
||||
orderType: this.currentType == 0 ? 1 : 0, //排序类型,0:积分升序、1:上架时间倒序,默认0
|
||||
filterIntegral: this.currentType == 2 ? true : false, //过滤我可兑换的,默认false
|
||||
integralRange: this.currentType == 1 ? this.currentPoint : '', //积分区间类型,0:全部、1:50分以下、2:100分以下、3:200分以下、4:5000分以下默认0
|
||||
current: this.current
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsList = this.current == 1 ? res.data.records : [...this.goodsList, ...res.data.records]
|
||||
res.data.records.map((item, index) => {
|
||||
item.typeText = item.type == 0 ? 0 : 1
|
||||
if(index%2 ==0) {
|
||||
this.leftList.push(item)
|
||||
}else {
|
||||
this.rightList.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTab(index) {
|
||||
this.currentTabs = index
|
||||
this.getListInit()
|
||||
},
|
||||
typeClick(index) {
|
||||
this.currentType = index
|
||||
this.getListInit()
|
||||
},
|
||||
pointClick(index) {
|
||||
this.currentPoint = index
|
||||
this.getListInit()
|
||||
},
|
||||
toProductDetail(item) {
|
||||
uni.navigateTo({url: `./productDetails?shopGoodsId=${item.shopGoodsId}&total=${this.total}`})
|
||||
},
|
||||
toMyOrder() {
|
||||
uni.navigateTo({url: './myOrderList'})
|
||||
},
|
||||
toOrder(item) {
|
||||
if(this.total >= item.integralPrice && item.stock > 0) {
|
||||
uni.navigateTo({url: `./placeOrder?shopGoodsId=${item.shopGoodsId}&total=${this.total}&backLevel=3`})
|
||||
}
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppRedemptionPoints {
|
||||
.fixed-top {
|
||||
background-color: #f3f6f9;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 32px 24px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
.num {
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 66px;
|
||||
color: #FF6900;
|
||||
line-height: 92px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 168px;
|
||||
height: 64px;
|
||||
border: 1px solid #4181FF;
|
||||
line-height: 62px;
|
||||
border-radius: 44px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 26px;
|
||||
color: #4181FF;
|
||||
margin-top: 28px;
|
||||
}
|
||||
}
|
||||
.search {
|
||||
background-color: #fff;
|
||||
.type-select {
|
||||
display: flex;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
line-height: 84px;
|
||||
.item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #8891A1;
|
||||
.down-icon {
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
.active {
|
||||
color: #4181FF;
|
||||
.down-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
padding: 396px 0 24px 24px;
|
||||
background-color: #f3f6f9;
|
||||
overflow: hidden;
|
||||
.left-list,
|
||||
.right-list {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
.list-info {
|
||||
width: 100%;
|
||||
}
|
||||
.item {
|
||||
width: calc(100% - 24px);
|
||||
background-color: #fff;
|
||||
border-radius: 20px;
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 340px;
|
||||
border-top-left-radius: 20px;
|
||||
border-top-right-radius: 20px;
|
||||
}
|
||||
.type {
|
||||
padding: 8px 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 20px;
|
||||
line-height: 28px;
|
||||
color: #FFF;
|
||||
border-top-right-radius: 20px;
|
||||
border-bottom-left-radius: 20px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.content {
|
||||
padding: 16px 16px 24px;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
.text {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 26px;
|
||||
color: #222;
|
||||
line-height: 38px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.item-money {
|
||||
width: calc(100% - 160px);
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #FF6900;
|
||||
line-height: 48px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
font-size: 26px;
|
||||
color: #4181FF;
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 20px;
|
||||
color: #4181FF;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
padding: 14px 32px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 22px;
|
||||
line-height: 28px;
|
||||
border-radius: 44px;
|
||||
position: absolute;
|
||||
bottom: 24px;
|
||||
right: 16px;
|
||||
}
|
||||
.btn1 {
|
||||
background-color: #2D7DFF;
|
||||
color: #FFF;
|
||||
}
|
||||
.btn0 {
|
||||
background-color: #E2E2E2;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item:nth-of-type(2n-1) {
|
||||
margin-right: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/lianhua/AppRedemptionPoints/img/success.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
20
src/project/lianhua/AppRedemptionPoints/jdH5.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="jdH5">
|
||||
<web-view :src="goodsJdUrl"></web-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'jdH5',
|
||||
data() {
|
||||
return {
|
||||
goodsJdUrl: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.goodsJdUrl = option.goodsJdUrl
|
||||
},
|
||||
}
|
||||
</script>
|
||||
315
src/project/lianhua/AppRedemptionPoints/myOrderList.vue
Normal file
@@ -0,0 +1,315 @@
|
||||
<template>
|
||||
<div class="myOrderList">
|
||||
<div class="fixed-top">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="90" font-size="28" bg-color="#fff" inactive-color="#8891A1"
|
||||
active-color="#1D2229 " :bar-style="barStyle" @change="changeTab" ></u-tabs>
|
||||
</div>
|
||||
<div class="list-content" v-if="list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="time-flex">
|
||||
<p>{{item.createTime.substring(0, 16)}}</p>
|
||||
<div :class="`status`+item.status">{{ $dict.getLabel('integralSGOStatus', item.status) }}</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<img :src="item.goodsPicUrl" alt="">
|
||||
<div class="type" :class="`type`+item.goodsTypeText">{{ $dict.getLabel('integralSGTypeText', item.goodsTypeText) }}</div>
|
||||
<div class="flex-right">
|
||||
<p>{{item.goodsTitle}}</p>
|
||||
<div class="num-flex">
|
||||
<h3>{{item.usedIntegral}}积分<span v-if="item.goodsType == 2">+{{item.payMoney}}元</span></h3>
|
||||
<div>x {{item.quantity}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="tips" v-if="item.goodsType == 2"><span>兑换成功后,点击「去购买」前往京东低价购买</span></p>
|
||||
<p class="tips" v-else>积分兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
||||
<p class="remark" v-if="item.remarks">备注:{{item.remarks}}</p>
|
||||
<div class="flex-btn" v-if="item.goodsType == 2 && item.status != 2">
|
||||
<p></p>
|
||||
<div class="btn confirm" @click="openJd(item)">去购买</div>
|
||||
</div>
|
||||
<div class="flex-btn" v-if="item.goodsType != 2">
|
||||
<p>核销码:<span>{{item.verificationCode}}</span></p>
|
||||
<div class="btn" v-if="item.status == 0" @click="cancel(item)">取消订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else></AiEmpty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'myOrderList',
|
||||
appName: '我的订单',
|
||||
data() {
|
||||
return {
|
||||
tabList: [{name: '全部'}, {name: '待核销'}, {name: '已完成'}, {name: '已取消'}],
|
||||
currentTabs: 0,
|
||||
barStyle: {
|
||||
'width': '20px',
|
||||
'height': '3px',
|
||||
'border-radius': '2px',
|
||||
'bottom': '3px',
|
||||
'background': '#2D7DFF'
|
||||
},
|
||||
list: [],
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.$dict.load(['integralSGOStatus', 'integralSGTypeText']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeTab(index) {
|
||||
this.currentTabs = index
|
||||
this.getListInit()
|
||||
},
|
||||
getListInit() {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/listForXCX`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
status: this.currentTabs == 0 ? '' : this.currentTabs - 1,
|
||||
createUserId: this.user.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
res.data.records.map((item) => {
|
||||
item.goodsTypeText = item.goodsType == 0 ? 0 : 1
|
||||
})
|
||||
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
},
|
||||
openJd(item) {
|
||||
if(item.goodsType == 1) {
|
||||
uni.navigateTo({url: `./jdH5?goodsJdUrl=${item.goodsJdUrl}`})
|
||||
}else {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: item.goodsJdAppid,
|
||||
path: item.goodsJdUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
cancel(item) {
|
||||
uni.showModal({
|
||||
title: '确认取消此订单?',
|
||||
content: '取消订单后,积分将退回至积分余额',
|
||||
confirmColor: "#2D7DFF",
|
||||
cancelColor: "#2D7DFF",
|
||||
cancelText: "我在想想",
|
||||
confirmText: "确认取消",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.cancelOrder(item)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelOrder(item) {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/cancelForXCX?id=${item.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.getListInit()
|
||||
uni.$emit('updateGoodsList')
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current = this.current + 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.myOrderList {
|
||||
min-height: 100%;
|
||||
.fixed-top {
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
.list-content {
|
||||
padding: 112px 24px 24px;
|
||||
background-color: #F3F6F9;
|
||||
.item {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 32px;
|
||||
.time-flex {
|
||||
padding: 0 32px;
|
||||
line-height: 64px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ddd;
|
||||
div {
|
||||
color: #2D7DFF;
|
||||
}
|
||||
.status2 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.flex {
|
||||
padding: 32px 32px 0;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
img {
|
||||
width: 166px;
|
||||
height: 166px;
|
||||
border-radius: 16px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.type {
|
||||
position: absolute;
|
||||
left: 32px;
|
||||
bottom: 0;
|
||||
border-bottom-left-radius: 16px;
|
||||
border-bottom-right-radius: 16px;
|
||||
width: 166px;
|
||||
text-align: center;
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 18px;
|
||||
color: #FFF;
|
||||
p {
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.flex-right {
|
||||
width: calc(100% - 186px);
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #222;
|
||||
line-height: 34px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.num-flex {
|
||||
display: flex;
|
||||
h3 {
|
||||
width: calc(100% - 100px);
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #FF6900;
|
||||
line-height: 48px;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 34px;
|
||||
color: #4181FF;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
div {
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #222;
|
||||
line-height: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.tips {
|
||||
display: inline-block;
|
||||
padding: 12px;
|
||||
line-height: 36px;
|
||||
background: #F5FCF5;
|
||||
border-radius: 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #3BBC37;
|
||||
margin: 0 32px 16px 32px;
|
||||
span {
|
||||
display: inline-block;
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.remark {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
line-height: 34px;
|
||||
word-break: break-all;
|
||||
margin: 0 32px 24px 32px;
|
||||
}
|
||||
.flex-btn {
|
||||
padding: 0 32px 32px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
p {
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 28px;
|
||||
color: #2D7DFF;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 136px;
|
||||
text-align: center;
|
||||
line-height: 54px;
|
||||
border: 1px solid #CCC;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 22px;
|
||||
color: #666;
|
||||
}
|
||||
.confirm {
|
||||
border: 1px solid #2D7DFF;
|
||||
background-color: #2D7DFF;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
291
src/project/lianhua/AppRedemptionPoints/placeOrder.vue
Normal file
@@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<div class="placeOrder">
|
||||
<div class="header-info">
|
||||
<div class="flex">
|
||||
<img :src="goodsInfo.picUrl" alt="">
|
||||
<div class="type" :class="`type`+goodsInfo.typeText">{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}</div>
|
||||
<div class="flex-right">
|
||||
<p>{{goodsInfo.title}}</p>
|
||||
<div>
|
||||
<u-number-box v-model="goodsNum" @change="valChange" input-height="44" size="24" :min="1" :max="goodsInfo.stock"></u-number-box>
|
||||
</div>
|
||||
<h3>{{goodsInfo.integralPrice}}积分<span v-if="goodsInfo.type == 2">+¥{{goodsInfo.payMoney}}.00</span></h3>
|
||||
</div>
|
||||
</div>
|
||||
<p class="tips" v-if="goodsInfo.type == 2">兑换成功后,点击「去购买」前往京东低价购买</p>
|
||||
<p class="tips" v-else>积分兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item-flex" @click="show=true">
|
||||
<div class="label">订单备注</div>
|
||||
<div class="value" :class="value ? '' : 'color-999'">{{value || '无备注'}}<u-icon name="arrow-right" color="#bbb" size="24"></u-icon></div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">积分余额</div>
|
||||
<div class="value color-FF6900">{{total}}积分</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">支付积分</div>
|
||||
<div class="value">减{{(goodsNum*goodsInfo.integralPrice).toFixed(2)}}积分</div>
|
||||
</div>
|
||||
<div class="item-flex" v-if="goodsInfo.type == 2">
|
||||
<div class="label">京东支付</div>
|
||||
<div class="value color-999">¥{{(goodsNum*goodsInfo.payMoney).toFixed(2)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<u-popup v-model="show" mode="bottom">
|
||||
<div class="textarea">
|
||||
<u-input v-model="value" type="textarea" :height="120" :auto-height="true" placeholder="请输入备注" :clearable="false" maxlength="1000" />
|
||||
<p>字数{{value.length}}/1000</p>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<span @click="value=''">清空内容</span>
|
||||
<span class="confirm" @click="confirm">保存</span>
|
||||
</div>
|
||||
</u-popup>
|
||||
<div class="bottom-btn" @click="confirmOrder()">
|
||||
<div>提交订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'placeOrder',
|
||||
appName: '提交订单',
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
show: false,
|
||||
total: 0,
|
||||
goodsInfo: {},
|
||||
goodsNum: 1,
|
||||
backLevel: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.total = option.total
|
||||
this.backLevel = option.backLevel
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
this.goodsInfo.typeText = this.goodsInfo.type == 0 ? 0 : 1
|
||||
}
|
||||
})
|
||||
},
|
||||
valChange(e) {
|
||||
this.goodsNum = e.value
|
||||
},
|
||||
confirm() {
|
||||
this.show = false
|
||||
},
|
||||
confirmOrder() {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/add`, {
|
||||
shopId: this.goodsInfo.shopId,
|
||||
goodsId: this.goodsInfo.id,
|
||||
remarks: this.value,
|
||||
quantity: this.goodsNum
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
uni.$emit('updateGoodsList')
|
||||
this.toSuccess()
|
||||
}
|
||||
})
|
||||
},
|
||||
toSuccess() {
|
||||
var integralPrice = this.goodsNum*this.goodsInfo.integralPrice
|
||||
uni.navigateTo({url: `./successOrder?integralPrice=${integralPrice}&backLevel=${this.backLevel}&shopGoodsId=${this.goodsInfo.shopGoodsId}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.placeOrder {
|
||||
.header-info {
|
||||
padding: 48px 32px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
.flex {
|
||||
margin-bottom: 32px;
|
||||
display: flex;
|
||||
position: relative;
|
||||
img {
|
||||
width: 166px;
|
||||
height: 166px;
|
||||
border-radius: 16px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.type {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-bottom-left-radius: 16px;
|
||||
border-bottom-right-radius: 16px;
|
||||
width: 166px;
|
||||
text-align: center;
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 18px;
|
||||
color: #FFF;
|
||||
p {
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.flex-right {
|
||||
width: calc(100% - 186px);
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #222;
|
||||
line-height: 34px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
div {
|
||||
text-align: right;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #FF6900;
|
||||
line-height: 48px;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 34px;
|
||||
color: #4181FF;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.tips {
|
||||
display: inline-block;
|
||||
padding: 12px;
|
||||
line-height: 36px;
|
||||
background: #F5FCF5;
|
||||
border-radius: 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #3BBC37;
|
||||
span {
|
||||
display: inline-block;
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
padding: 0 32px;
|
||||
background-color: #fff;
|
||||
.item-flex {
|
||||
display: flex;
|
||||
padding: 30px 0;
|
||||
font-size: 26px;
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
.label {
|
||||
color: #222;
|
||||
width: 120px;
|
||||
}
|
||||
.value {
|
||||
width: calc(100% - 120px);
|
||||
text-align: right;
|
||||
color: #222;
|
||||
}
|
||||
.color-FF6900 {
|
||||
color: #FF6900;
|
||||
}
|
||||
.color-999 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.textarea {
|
||||
margin: 32px 32px 24px;
|
||||
width: calc(100% - 64px);
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
background: #f7f7f7;
|
||||
border-radius: 8px;
|
||||
p {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 36px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
padding: 0 32px 24px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
span {
|
||||
display: inline-block;
|
||||
line-height: 64px;
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
}
|
||||
.confirm {
|
||||
width: 144px;
|
||||
text-align: center;
|
||||
background: #1365dd;
|
||||
border-radius: 32px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.bottom-btn {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding: 20px 32px;
|
||||
box-sizing: border-box;
|
||||
div {
|
||||
width: 100%;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
text-align: center;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
background: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
165
src/project/lianhua/AppRedemptionPoints/pointsPublicity.vue
Normal file
@@ -0,0 +1,165 @@
|
||||
<template>
|
||||
<div class="pointsPublicity">
|
||||
<div class="header">
|
||||
<img :src="`${cdn}/publicity-header.png`" alt="">
|
||||
<div class="title">{{user.girdName}}积分公示</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<span class="blue-tips"></span>
|
||||
<p class="title">{{item.classOne}}</p>
|
||||
<div class="item-info">
|
||||
<p class="mini-title">{{item.classTwo}}</p>
|
||||
<div class="text-flex">
|
||||
<p>{{item.classThree}}</p>
|
||||
<div>
|
||||
<img :src="`${cdn}/star-icon.png`" alt="">+{{item.integral}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapActions, mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'pointsPublicity',
|
||||
appName: '积分公示',
|
||||
data() {
|
||||
return {
|
||||
cdn: "https://cdn.cunwuyun.cn/fengdu",
|
||||
list: [],
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.getAuth()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getUserInfo']),
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralpublicityinfo/list?current=${this.current}&girdId=${this.user.girdId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
},
|
||||
getAuth() {
|
||||
this.$nextTick(() => {
|
||||
this.getUserInfo('qujing')
|
||||
this.getList()
|
||||
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body{
|
||||
background-color: #fff;
|
||||
}
|
||||
.pointsPublicity {
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
background-color: #f3f6f9;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 216px;
|
||||
}
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #222;
|
||||
line-height: 40px;
|
||||
padding: 38px 32px;
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
padding: 332px 32px 32px;
|
||||
.item {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
box-shadow: inset 0 0 0 0 #EEEEEE;
|
||||
padding: 32px 32px 0;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
.blue-tips {
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
left: 0;
|
||||
width: 8px;
|
||||
height: 36px;
|
||||
background: #2D7DFF;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.item-info {
|
||||
width: 100%;
|
||||
padding: 32px 0;
|
||||
border-top: 1px solid #eee;
|
||||
.mini-title {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.text-flex {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
p {
|
||||
width: calc(100% - 160px);
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
word-break: break-all;
|
||||
}
|
||||
div {
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
font-family: DINAlternate-Bold;
|
||||
font-weight: 700;
|
||||
font-size: 30px;
|
||||
color: #FF7109;
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-right: 8px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-info:nth-of-type(2) {
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
185
src/project/lianhua/AppRedemptionPoints/productDetails.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<div class="productDetails" v-if="goodsInfo.picUrl">
|
||||
<img :src="goodsInfo.picUrl" alt="">
|
||||
<div class="type" :class="`type`+goodsInfo.typeText">{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}</div>
|
||||
<div class="product-info">
|
||||
<p>{{goodsInfo.title}}</p>
|
||||
<h3>{{goodsInfo.integralPrice}}积分<span v-if="goodsInfo.type == 2">+¥{{goodsInfo.payMoney}}<span v-if="goodsInfo.type == 2">(兑换后再付)</span></span></h3>
|
||||
<div>零售单价¥{{goodsInfo.retailPrice}}</div>
|
||||
<span class="tips" v-if="goodsInfo.type == 2">兑换成功后,点击「去购买」前往京东低价购买</span>
|
||||
<span class="tips" v-else>积分兑换商品,可到固定的兑换点进行「核销兑换」</span>
|
||||
</div>
|
||||
<div class="product-content">
|
||||
<p>商品描述:</p>
|
||||
<p v-html="goodsInfo.description"></p>
|
||||
</div>
|
||||
<div class="btn" @click="toOrder()" v-if="goodsInfo.shopStatus == 1">
|
||||
<div :class="total >= goodsInfo.integralPrice ? 'status1' : 'status0'" v-if="goodsInfo.stock > 0">{{total >= goodsInfo.integralPrice ? '立即兑换' : '积分不足'}}</div>
|
||||
<div class="status0" v-else>商品缺货</div>
|
||||
</div>
|
||||
<div class="btn" v-else>
|
||||
<div class="status0">店铺停用</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'productDetails',
|
||||
appName: '兑换商品',
|
||||
data() {
|
||||
return {
|
||||
shopGoodsId: '',
|
||||
goodsInfo: {},
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.total = option.total
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
this.goodsInfo.typeText = this.goodsInfo.type == 0 ? 0 : 1
|
||||
}
|
||||
})
|
||||
},
|
||||
toOrder() {
|
||||
if(this.total >= this.goodsInfo.integralPrice && this.goodsInfo.stock > 0 && this.goodsInfo.status == 1) {
|
||||
uni.navigateTo({url: `./placeOrder?shopGoodsId=${this.goodsInfo.shopGoodsId}&total=${this.total}&backLevel=4`})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.productDetails {
|
||||
background-color: #f3f6f9;
|
||||
position: relative;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 750px;
|
||||
}
|
||||
.type {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 30px;
|
||||
color: #FFF;
|
||||
padding: 16px 16px 16px 36px;
|
||||
border-bottom-left-radius: 40px;
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.product-info {
|
||||
padding: 32px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 48px;
|
||||
color: #222;
|
||||
letter-spacing: 0;
|
||||
line-height: 76px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 44px;
|
||||
color: #FF6900;
|
||||
margin-bottom: 8px;
|
||||
span {
|
||||
font-size: 44px;
|
||||
color: #4181FF;
|
||||
margin-left: 8px;
|
||||
span {
|
||||
font-weight: 400;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
div {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
margin-bottom: 24px;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.tips {
|
||||
display: inline-block;
|
||||
padding: 12px;
|
||||
line-height: 36px;
|
||||
background: #F5FCF5;
|
||||
border-radius: 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #3BBC37;
|
||||
}
|
||||
}
|
||||
.product-content {
|
||||
padding: 34px 64px 162px;
|
||||
background-color: #fff;
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
color: #666;
|
||||
line-height: 60px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding: 20px 32px;
|
||||
box-sizing: border-box;
|
||||
div {
|
||||
width: 100%;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
text-align: center;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
}
|
||||
.status1 {
|
||||
color: #FFF;
|
||||
background: #4181FF;
|
||||
}
|
||||
.status0 {
|
||||
color: #666;
|
||||
background: #E2E2E2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
145
src/project/lianhua/AppRedemptionPoints/successOrder.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="successOrder">
|
||||
<img src="./img/success.png" alt="">
|
||||
|
||||
|
||||
<div v-if="goodsInfo.type == 0">
|
||||
<h3>提交成功</h3>
|
||||
<p>提交「积分兑换」订单成功,扣减 <span>{{integralPrice}}积分</span></p>
|
||||
<div class="btn-flex">
|
||||
<div @click="back">返回</div>
|
||||
<div @click="toOrderList">查看订单</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h3>兑换成功</h3>
|
||||
<p>提交「京东低价商品」订单成功,扣减 <span>{{integralPrice}}积分</span><br/>
|
||||
可点击下方按钮前往京东商城进行低价购买
|
||||
</p>
|
||||
<div class="btn" @click="openJd">去购买</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'successOrder',
|
||||
appName: '提交订单',
|
||||
data() {
|
||||
return {
|
||||
integralPrice: 0,
|
||||
backLevel: 1,
|
||||
shopGoodsId: '',
|
||||
goodsInfo: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option)
|
||||
this.integralPrice = option.integralPrice
|
||||
this.backLevel = option.backLevel
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
openJd() {
|
||||
if(this.goodsInfo.type == 1) {
|
||||
uni.navigateTo({url: `./jdH5?goodsJdUrl=${this.goodsInfo.jdUrl}`})
|
||||
}else {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: this.goodsInfo.jdAppid,
|
||||
path: this.goodsInfo.jdUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack({delta: Number(this.backLevel)})
|
||||
},
|
||||
toOrderList() {
|
||||
uni.redirectTo({
|
||||
url: './myOrderList'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body{
|
||||
background-color: #fff;
|
||||
}
|
||||
.successOrder {
|
||||
padding: 0 60px;
|
||||
text-align: center;
|
||||
img {
|
||||
width: 240px;
|
||||
height: 232px;
|
||||
margin: 168px auto 32px auto;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 40px;
|
||||
color: #333;
|
||||
line-height: 56px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
p {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
margin-bottom: 80px;
|
||||
span {
|
||||
color: #FF6900;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 410px;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
background: #2D7DFF;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.btn-flex {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
margin: 0 auto;
|
||||
div {
|
||||
display: inline-block;
|
||||
width: 272px;
|
||||
text-align: center;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
border-radius: 44px;
|
||||
color: #FFF;
|
||||
background-color: #2D7DFF;
|
||||
}
|
||||
div:nth-of-type(1) {
|
||||
background-color: #E5EFFF;
|
||||
color: #2D7DFF;
|
||||
margin-right: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||