Compare commits

...

2 Commits

Author SHA1 Message Date
aixianling
0d20009d04 Merge remote-tracking branch 'origin/dev' into dev 2024-11-26 09:56:52 +08:00
aixianling
f83091b0e6 新增首页、打开页面、添加家人页面和个人中心页面 2024-11-26 09:56:27 +08:00
16 changed files with 2494 additions and 0 deletions

View File

@@ -0,0 +1,661 @@
<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:外链, 2tabbar页面
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 {
display: flex;
justify-content: space-between;
padding: 0 32px;
.item-banner {
width: calc(50% - 16px);
height: 160px;
position: relative;
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;
}
}
.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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View 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>

View 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>

View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View 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>

View 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>

View 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>&nbsp;&nbsp;&nbsp;{{ 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}&current=${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>

View 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>

View 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>

View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB