cv
This commit is contained in:
@@ -1,37 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AppDialogue">
|
<div class="AppDialogue">
|
||||||
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false"></u-navbar>
|
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false" height="88"></u-navbar>
|
||||||
<!-- <scroll-view scroll-y="true" class="scroll-Y" @scroll="scroll"> -->
|
<!-- <scroll-view scroll-y="true" class="scroll-Y" @scroll="scroll"> -->
|
||||||
<div class="service-content" v-if="!messageList.length">
|
<div class="top-select">
|
||||||
<div class="text-content">
|
{{typeList[type].dictName || '选择应用'}} <u-icon name="arrow-down" color="#fff" size="28" @click="showType=true"></u-icon>
|
||||||
<div class="text-left">
|
</div>
|
||||||
<div>嘿,你好呀!</div>
|
<div class="service-content" v-if="!messageList.length">
|
||||||
<p>我是您的<span>「Copilot小助理」</span>,</p>
|
<div class="text-content">
|
||||||
<p>有什么问题都可以问我哟~</p>
|
<div class="text-left">
|
||||||
</div>
|
<div>嘿,你好呀!</div>
|
||||||
<img src="https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/service.png" alt="" class="service-img">
|
<p>我是您的<span>「Copilot小助理」</span>,</p>
|
||||||
|
<p>有什么问题都可以问我哟~</p>
|
||||||
</div>
|
</div>
|
||||||
|
<img src="https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/service.png" alt="" class="service-img">
|
||||||
</div>
|
</div>
|
||||||
<div class="list-bg" v-if="messageList.length"></div>
|
</div>
|
||||||
<div class="list-content" v-if="messageList.length">
|
<div class="list-bg" v-if="messageList.length"></div>
|
||||||
<div v-for="(item, index) in messageList" :key="index">
|
<div class="list-content" v-if="messageList.length">
|
||||||
<div class="send-time">{{item.createTime.substring(5, 16)}}</div>
|
<div v-for="(item, index) in messageList" :key="index">
|
||||||
<div :class="item.userType == 1 ? 'item-left' : 'item-right'">
|
<div class="send-time">{{item.createTime.substring(5, 16)}}</div>
|
||||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType == 1">
|
<div :class="item.userType == 1 ? 'item-left' : 'item-right'">
|
||||||
<div class="item" :class="'item'+index">
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType == 1">
|
||||||
<u-icon name="play-right-fill" color="#CCE2FF" size="20" v-if="item.userType != 1" class="u-icon-right"></u-icon>
|
<div class="item" :class="'item'+index">
|
||||||
<u-icon name="play-left-fill" color="#F3F5F7" size="20" v-if="item.userType == 1" class="u-icon-left"></u-icon>
|
<u-icon name="play-right-fill" color="#CCE2FF" size="20" v-if="item.userType != 1" class="u-icon-right"></u-icon>
|
||||||
<div class="voice-div" v-if="item.sdkFileUrl" @click="play(item.sdkFileUrl, index)">
|
<u-icon name="play-left-fill" color="#F3F5F7" size="20" v-if="item.userType == 1" class="u-icon-left"></u-icon>
|
||||||
<span>8”</span>
|
<div class="voice-div" v-if="item.sdkFileUrl" @click="play(item.sdkFileUrl, index)">
|
||||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-d.gif" alt="" v-if="item.isPlay">
|
<span>8”</span>
|
||||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-j.png" alt="" v-else>
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-d.gif" alt="" v-if="item.isPlay">
|
||||||
</div>
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-j.png" alt="" v-else>
|
||||||
<p v-if="!item.sdkFileUrl">{{item.content || ''}}</p>
|
|
||||||
</div>
|
</div>
|
||||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType != 1">
|
<p v-if="!item.sdkFileUrl">{{item.content || ''}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType != 1">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- </scroll-view> -->
|
<!-- </scroll-view> -->
|
||||||
<div class="fixed-bottom">
|
<div class="fixed-bottom">
|
||||||
<div class="type-text" v-if="type == 'text'">
|
<div class="type-text" v-if="type == 'text'">
|
||||||
@@ -59,6 +62,8 @@
|
|||||||
<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="handleAdminLogin" v-if="!token">
|
<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="handleAdminLogin" v-if="!token">
|
||||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/question-icon.png" alt="">登录
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/question-icon.png" alt="">登录
|
||||||
</button>
|
</button>
|
||||||
|
<u-select v-model="showType" :list="typeList" value-name="dictValue"
|
||||||
|
label-name="dictName" @confirm="confirmType"></u-select>
|
||||||
<AiLogin ref="login"/>
|
<AiLogin ref="login"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -95,7 +100,13 @@ export default {
|
|||||||
],
|
],
|
||||||
current: 1,
|
current: 1,
|
||||||
pages: 2,
|
pages: 2,
|
||||||
areaId: ''
|
areaId: '',
|
||||||
|
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||||
|
typeList: [
|
||||||
|
{dictValue: '1', dictName: '文本助理'},
|
||||||
|
{dictValue: '2', dictName: '日常助理'}
|
||||||
|
],
|
||||||
|
type: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -292,6 +303,9 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
confirmType(val) {
|
||||||
|
this.type = val[0].value;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -305,13 +319,30 @@ page {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.top-select {
|
||||||
|
line-height: 64px;
|
||||||
|
background: #026AF2;
|
||||||
|
border-radius: 32px;
|
||||||
|
position: fixed;
|
||||||
|
left: 28px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 24px;
|
||||||
|
font-family: PingFangSC-Medium;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28px;
|
||||||
|
color: #FFF;
|
||||||
|
z-index: 9;
|
||||||
|
u-icon {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.service-content {
|
.service-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 420px;
|
height: 420px;
|
||||||
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
|
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
|
||||||
background-size: 100vw;
|
background-size: 100vw;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
padding-top: 20px;
|
padding-top: 84px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.text-content {
|
.text-content {
|
||||||
margin: 0 0 0 32px;
|
margin: 0 0 0 32px;
|
||||||
|
|||||||
@@ -24,12 +24,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="approve">
|
<div class="approve" @click="$linkTo('./userInfo')">
|
||||||
<img class="icon" src="https://cdn.cunwuyun.cn/wxmp/mine/approve.png" alt="">
|
<img class="icon" src="https://cdn.cunwuyun.cn/wxmp/mine/approve.png" alt="">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<span class="cert" v-if="isApprove" v-text="approveLabel" @click="$linkTo('/mods/AppAuth/AppAuth')"/>
|
<span class="cert" v-if="isApprove" v-text="approveLabel"></span>
|
||||||
<u-icon v-else name="arrow-right" color="#E7F2FF" size="28"
|
<u-icon v-else name="arrow-right" color="#E7F2FF" size="28"
|
||||||
:label="approveLabel" label-color="#E7F2FF" label-pos="left" @click="approve"/>
|
:label="approveLabel" label-color="#E7F2FF" label-pos="left" @click="approve"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-wrap">
|
<div class="list-wrap">
|
||||||
@@ -39,11 +39,17 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<img class="icon" :src="item.icon" alt="">
|
<img class="icon" :src="item.icon" alt="">
|
||||||
</div>
|
</div>
|
||||||
<span class="desc" v-if="!item.share">{{ item.label }}</span>
|
<span class="desc solid" v-if="!item.share">{{ item.label }}</span>
|
||||||
<button open-type="share" v-else>
|
<button open-type="share" v-else>
|
||||||
<span>{{ item.label }}</span>
|
<span>{{ item.label }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<div class="logout" v-if="token">
|
<div class="logout" v-if="token">
|
||||||
@@ -59,31 +65,57 @@ export default {
|
|||||||
name: "AppMine",
|
name: "AppMine",
|
||||||
appName: "我的",
|
appName: "我的",
|
||||||
customNavigation: true,
|
customNavigation: true,
|
||||||
|
navigationBarBackgroundColor: '#ffffff',
|
||||||
|
navigationBarTextStyle: 'black',
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user', 'token']),
|
...mapState(['user', 'token']),
|
||||||
|
isApprove() {
|
||||||
isApprove: v => v.user?.status == 2,
|
return this.user?.status == 2;
|
||||||
|
},
|
||||||
approveLabel() {
|
approveLabel() {
|
||||||
return this.user?.status == 2 ? "已认证" :
|
return this.user?.areaId? "已认证" : "前往认证"
|
||||||
this.user?.status == 1 ? "审核中" :
|
|
||||||
this.user?.status == -1 ? "审核驳回" : "前往认证"
|
|
||||||
},
|
},
|
||||||
listGroup() {
|
listGroup() {
|
||||||
return [
|
return [
|
||||||
// [
|
[
|
||||||
// {
|
// {
|
||||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png",
|
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiaxiang.png",
|
||||||
// label: "我的家庭",
|
// label: "我的家乡",
|
||||||
// path: "./myFamily",
|
// path: "/mods/AppHometown/AppHometown",
|
||||||
// type: 'idNumber'
|
// type: 'token'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiaxiang.png",
|
// icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-wdjt.png",
|
||||||
// label: "我的家乡",
|
// label: "我的家庭",
|
||||||
// path: "/mods/AppHometown/AppHometown",
|
// path: "./myFamily",
|
||||||
// type: 'token'
|
// 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",
|
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejifen.png",
|
||||||
@@ -114,8 +146,7 @@ export default {
|
|||||||
this.$refs.login.show();
|
this.$refs.login.show();
|
||||||
} else if (!this.isApprove) {
|
} else if (!this.isApprove) {
|
||||||
if (this.user.status == 0) {
|
if (this.user.status == 0) {
|
||||||
// this.$linkTo('/mods/AppAuth/AppAuth');
|
this.$linkTo('/mods/AppAuth/AppAuth');
|
||||||
this.$linkTo('./userInfo')
|
|
||||||
} else {
|
} else {
|
||||||
this.$linkTo('/mods/AppAuth/authSuccess')
|
this.$linkTo('/mods/AppAuth/authSuccess')
|
||||||
}
|
}
|
||||||
@@ -129,16 +160,24 @@ export default {
|
|||||||
}
|
}
|
||||||
if (type == 'idNumber') {
|
if (type == 'idNumber') {
|
||||||
if (this.user.status == 0) {
|
if (this.user.status == 0) {
|
||||||
// if (!this.user.phone) {
|
if (!this.user.phone) {
|
||||||
// this.$linkTo('/pages/phone/bingPhoneNumber?from=auth')
|
this.$linkTo('/pages/phone/bingPhoneNumber?from=auth')
|
||||||
// } else {
|
} else {
|
||||||
// this.$linkTo('/mods/AppAuth/AppAuth')
|
this.$linkTo('/mods/AppAuth/AppAuth')
|
||||||
// }
|
}
|
||||||
this.$linkTo('./userInfo')
|
|
||||||
} else {
|
} else {
|
||||||
this.$linkTo(url)
|
this.$linkTo(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (type == 'scan') {
|
||||||
|
this.scan()
|
||||||
|
}
|
||||||
|
if (type == 'share') {
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type == 'null') {
|
||||||
|
this.$u.toast('内容建设中...')
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$refs.login.show()
|
this.$refs.login.show()
|
||||||
}
|
}
|
||||||
@@ -153,7 +192,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getAuth() {
|
getAuth() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.token && this.getUserInfo()
|
this.token && this.getUserInfo('qujing')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onLogout() {
|
onLogout() {
|
||||||
@@ -171,13 +210,24 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
scan() {
|
||||||
|
uni.scanCode({
|
||||||
|
success: (res) => {
|
||||||
|
var info = JSON.parse(res.result)
|
||||||
|
uni.navigateTo({url: `./addFamily?avatarUrl=${info.avatarUrl || ''}&nickName=${info.nickName}&openId=${info.openId}`})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onLoad() {
|
||||||
this.getAuth();
|
this.getAuth();
|
||||||
|
uni.$on('auth',()=> {
|
||||||
|
this.getAuth();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
return {
|
return {
|
||||||
title: '欢迎使用数字巫溪治理服务一体化平台~',
|
title: '欢迎使用数字乡村治理服务一体化平台~',
|
||||||
path: `/pages/AppModules/AppModules`
|
path: `/pages/AppModules/AppModules`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -200,8 +250,8 @@ export default {
|
|||||||
.header-info {
|
.header-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: url("https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-my-nav-bg.png") no-repeat no-repeat;
|
background: url('https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-top-bg.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background: 100% auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 240px 0 0 48px;
|
padding: 240px 0 0 48px;
|
||||||
|
|
||||||
@@ -273,7 +323,7 @@ export default {
|
|||||||
.approve {
|
.approve {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 384px;
|
top: 400px;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 686px;
|
width: 686px;
|
||||||
height: 112px;
|
height: 112px;
|
||||||
@@ -316,7 +366,7 @@ export default {
|
|||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
.desc {
|
.desc {
|
||||||
border-bottom: none !important;
|
// border-bottom: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +392,7 @@ export default {
|
|||||||
color: #666666;
|
color: #666666;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #EEEEEE;
|
box-sizing: border-box;
|
||||||
|
|
||||||
& > span {
|
& > span {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -356,6 +406,11 @@ export default {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.solid {
|
||||||
|
border-bottom: 1px solid #EEE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.no-border {
|
.no-border {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
@@ -367,7 +422,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.logout {
|
.logout {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
@@ -380,7 +434,7 @@ export default {
|
|||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
font-size: 34px;
|
font-size: 34px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #2D7DFF;
|
color: #4181FF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
85
src/project/wuxi/AppMine/addFamily.vue
Normal file
85
src/project/wuxi/AppMine/addFamily.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<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: 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.
|
Before Width: | Height: | Size: 993 B After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,31 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="credit-points">
|
<div class="user-list" v-if="list.length">
|
||||||
<div class="bg-blue"></div>
|
<div class="item">
|
||||||
<div class="header-content">
|
<div class="item-left">
|
||||||
<div class="title">家庭地址</div>
|
<img :src="user.avatarUrl" alt="">
|
||||||
<div class="address">
|
<div class="user-info">
|
||||||
<img src="https://cdn.cunwuyun.cn/img/location-blue.svg" alt="">
|
<h3>{{user.nickName}}</h3>
|
||||||
<p>{{ info.resident.currentAreaName || '' }}{{ info.resident.currentAddress || '' }}</p>
|
<p>{{user.girdName || ''}}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-content">
|
<div class="item" v-for="(item, index) in list" :key="index" v-if="user.openId != item.openId">
|
||||||
<div class="title">家庭成员</div>
|
<div class="item-left">
|
||||||
<div class="item" v-for="(item, index) in info.family" :key="index">
|
<img :src="item.avatarUrl" alt="" v-if="item.avatarUrl">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/1.png" alt="" class="banner-top" v-if="item.sex == 1">
|
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/2.png" alt="" class="banner-top" v-else>
|
|
||||||
<div class="user-img">
|
|
||||||
<img v-if="item.photo" :src="item.photo" alt=""/>
|
|
||||||
<img v-else src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt=""/>
|
|
||||||
</div>
|
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<p>{{ item.name }}</p>
|
<h3>{{item.nickName}}</h3>
|
||||||
<div v-if="item.householdName == 1" class="color-5AAD6A">户主</div>
|
<p>{{item.girdName || ''}}</p>
|
||||||
<div v-else>{{ $dict.getLabel('householdRelation', item.householdRelation) }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="item-right">
|
||||||
|
<div @click="toTransfer(item)">转积分</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-else/>
|
||||||
|
<p class="bottom-text">如果绑定错误,请联系网格员解绑!</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -38,25 +38,25 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {}
|
list: [],
|
||||||
|
userInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.$dict.load('householdRelation').then(() => {
|
this.getList()
|
||||||
this.$nextTick(() => {
|
|
||||||
this.getUser()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUser() {
|
getList() {
|
||||||
this.$instance.post(`/app/appresident/detailForWx?id=${this.user.residentId}`).then(res => {
|
this.$instance.post(`/app/appwechatuserrelation/list`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0 && res.data) {
|
||||||
this.info = res.data
|
this.list = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
toTransfer(row) {
|
||||||
|
uni.navigateTo({url: `./transferIntrgral?openId=${row.openId}&nickName=${row.nickName}&avatarUrl=${row.avatarUrl || ''}`})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@@ -64,117 +64,70 @@ export default {
|
|||||||
|
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
background-color: #f3f6f9;
|
background-color: #f3f6f9;
|
||||||
|
|
||||||
.credit-points {
|
.user-list {
|
||||||
.bg-blue {
|
padding: 32px 32px 0;
|
||||||
width: 100%;
|
height: calc(100% - 180px);
|
||||||
height: 112px;
|
overflow-y: scroll;
|
||||||
background-color: #197DF0;
|
.item {
|
||||||
}
|
padding: 26px;
|
||||||
|
background-color: #fff;
|
||||||
.header-content {
|
display: flex;
|
||||||
width: 690px;
|
margin-bottom: 24px;
|
||||||
background: #FFF;
|
.item-left {
|
||||||
border-radius: 16px;
|
width: calc(100% - 150px);
|
||||||
margin: -80px 0 32px 30px;
|
display: flex;
|
||||||
padding: 0 30px 80px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
|
|
||||||
|
|
||||||
.address {
|
|
||||||
font-size: 32px;
|
|
||||||
color: #666;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 34px;
|
width: 108px;
|
||||||
height: 38px;
|
height: 108px;
|
||||||
margin-right: 14px;
|
border-radius: 54px;
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
|
.user-info {
|
||||||
p {
|
margin-left: 20px;
|
||||||
line-height: 44px;
|
h3 {
|
||||||
width: 580px;
|
line-height: 42px;
|
||||||
word-break: break-all;
|
font-family: PingFangSC-Regular;
|
||||||
float: right;
|
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;
|
||||||
.title {
|
div {
|
||||||
font-size: 32px;
|
width: 126px;
|
||||||
font-weight: 500;
|
height: 56px;
|
||||||
color: #333;
|
line-height: 56px;
|
||||||
line-height: 120px;
|
text-align: center;
|
||||||
}
|
background: #2D7DFF;
|
||||||
|
border-radius: 30px;
|
||||||
.list-content {
|
font-family: PingFangSC-Regular;
|
||||||
width: 690px;
|
font-size: 26px;
|
||||||
background: #FFF;
|
color: #FFF;
|
||||||
border-radius: 16px;
|
margin-top: 26px;
|
||||||
padding: 0 30px 110px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-left: 30px;
|
|
||||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
|
|
||||||
|
|
||||||
.item {
|
|
||||||
width: 630px;
|
|
||||||
height: 192px;
|
|
||||||
background: #FFF;
|
|
||||||
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.08);
|
|
||||||
border-radius: 16px;
|
|
||||||
padding-left: 30px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 32px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.banner-top {
|
|
||||||
width: 100%;
|
|
||||||
height: 72px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-img {
|
|
||||||
width: 104px;
|
|
||||||
height: 104px;
|
|
||||||
margin: -16px 34px 0 0;
|
|
||||||
border-radius: 50%;
|
|
||||||
float: left;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info {
|
|
||||||
margin-top: -16px;
|
|
||||||
width: calc(100% - 138px);
|
|
||||||
float: right;
|
|
||||||
|
|
||||||
p {
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
line-height: 44px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
|
||||||
font-size: 26px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #666;
|
|
||||||
line-height: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.color-5AAD6A {
|
|
||||||
color: #5AAD6A;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bottom-text {
|
||||||
|
line-height: 34px;
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #999;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 92px;
|
||||||
|
left: 180px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
125
src/project/wuxi/AppMine/myHarvestQR.vue
Normal file
125
src/project/wuxi/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>
|
||||||
131
src/project/wuxi/AppMine/transferIntrgral.vue
Normal file
131
src/project/wuxi/AppMine/transferIntrgral.vue
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<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: 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>
|
||||||
@@ -4,11 +4,14 @@
|
|||||||
<div class="item-content mar-b8">
|
<div class="item-content mar-b8">
|
||||||
<div class="item solid">
|
<div class="item solid">
|
||||||
<p class="mar-t22">头像</p>
|
<p class="mar-t22">头像</p>
|
||||||
<button class="user-img-div" v-if="editAvatarUrl" open-type="chooseAvatar" @chooseavatar="handleWeixinSync">
|
<!-- <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="user.avatarUrl && !avatar" :src="user.avatarUrl" class="user-img">
|
||||||
<img v-if="avatar" :src="avatar" alt="" 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">
|
<img v-if="!user.avatarUrl && !avatar" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" class="user-img">
|
||||||
</button>
|
</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>
|
<div class="user-img-div" v-else>
|
||||||
<img v-if="user.avatarUrl && !avatar" :src="user.avatarUrl" class="user-img">
|
<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">
|
<img v-else src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" class="user-img">
|
||||||
@@ -33,8 +36,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item-content mar-b8">
|
<div class="item-content mar-b8">
|
||||||
<div class="item solid">
|
<!-- <div class="item solid">
|
||||||
<p>姓名</p>
|
<p>真实姓名</p>
|
||||||
<div class="item-right" v-if="!editRealName">
|
<div class="item-right" v-if="!editRealName">
|
||||||
<p class="name">{{ user.realName || '' }}</p>
|
<p class="name">{{ user.realName || '' }}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,19 +49,15 @@
|
|||||||
<p class="name">{{ user.idNumber || '' }}</p>
|
<p class="name">{{ user.idNumber || '' }}</p>
|
||||||
</div>
|
</div>
|
||||||
<input class="item-right" v-else type="idNumber" v-model="userIdNumber" maxlength="18" @input="idNumberInput">
|
<input class="item-right" v-else type="idNumber" v-model="userIdNumber" maxlength="18" @input="idNumberInput">
|
||||||
</div>
|
</div> -->
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p>地区</p>
|
<p>所属网格</p>
|
||||||
<div class="item-right" v-if="!editArea">
|
<div class="item-right" v-if="!editGird">
|
||||||
<p class="name">{{ user.areaName || '' }}</p>
|
<p class="name">{{ user.girdName || '' }}</p>
|
||||||
</div>
|
</div>
|
||||||
<AiAreaPicker class="item-right" :areaId="$areaId" v-model="userAreaId" :fullName.sync="userAreaName" v-else>
|
<AiPagePicker type="gird" class="item-right" v-model="userGirdId" :params="{formType:2}" @select="handleSelectGrid" nodeKey="id" v-else>
|
||||||
<div class="ai-area__wrapper">
|
<AiMore v-model="userGirdName" />
|
||||||
<span class="label" v-if="userAreaName">{{ userAreaName }}</span>
|
</AiPagePicker>
|
||||||
<i v-else>请选择</i>
|
|
||||||
<u-icon name="arrow-right" color="#ddd"/>
|
|
||||||
</div>
|
|
||||||
</AiAreaPicker>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -91,17 +90,18 @@ export default {
|
|||||||
editPhone: false,
|
editPhone: false,
|
||||||
editRealName: false,
|
editRealName: false,
|
||||||
editIdNumber: false,
|
editIdNumber: false,
|
||||||
editArea: false,
|
editGird: false,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
userPhone: '',
|
userPhone: '',
|
||||||
userRealName: '',
|
userRealName: '',
|
||||||
userIdNumber: '',
|
userIdNumber: '',
|
||||||
userAreaId: '',
|
userGirdId: '',
|
||||||
userAreaName: '',
|
userGirdName: '',
|
||||||
btnText: false,
|
btnText: false,
|
||||||
isFromTabbar: '',
|
isFromTabbar: '',
|
||||||
path: '',
|
path: '',
|
||||||
|
avatarUrlList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -118,46 +118,53 @@ export default {
|
|||||||
this.userRealName = this.user.realName
|
this.userRealName = this.user.realName
|
||||||
this.editIdNumber = true;
|
this.editIdNumber = true;
|
||||||
this.userIdNumber = this.user.idNumber
|
this.userIdNumber = this.user.idNumber
|
||||||
this.editArea = true
|
this.editGird = true
|
||||||
this.userAreaId = this.user.areaId
|
this.userGirdId = this.user.girdId
|
||||||
this.userAreaName = this.user.areaName
|
this.userGirdName = this.user.girdName
|
||||||
|
this.avatarUrlList = [{'url': this.user.avatarUrl}]
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if(this.flag) return
|
if(this.flag) return
|
||||||
// if(!this.avatar) {
|
if(!this.avatarUrlList.length) {
|
||||||
// return this.$u.toast('请上传头像')
|
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) {
|
if (!this.userName) {
|
||||||
return this.$u.toast('请输入身份证号')
|
return this.$u.toast('请输入用户昵称')
|
||||||
}
|
}
|
||||||
if (!this.$idCardNoUtil.checkIdCardNo(this.userIdNumber)) {
|
if (this.userName == '微信用户') {
|
||||||
return this.$u.toast('请输入正确的身份证号码')
|
return this.$u.toast('请修改用户昵称')
|
||||||
}
|
}
|
||||||
if (!this.userAreaId) {
|
if (!this.userPhone) {
|
||||||
return this.$u.toast('请选择地区')
|
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.flag = true
|
||||||
this.$instance.post(`/app/appwechatuserqujing/idNumberEdit`, {
|
this.$instance.post(`/app/appwechatuserqujing/idNumberAttestation`, {
|
||||||
avatarUrl: this.avatar,
|
// avatarUrl: this.avatar,
|
||||||
|
avatarUrl: this.avatarUrlList[0].url,
|
||||||
nickName: this.userName,
|
nickName: this.userName,
|
||||||
phone: this.userPhone,
|
phone: this.userPhone,
|
||||||
name: this.userRealName,
|
name: this.userName,
|
||||||
idNumber: this.userIdNumber,
|
idNumber: this.userIdNumber,
|
||||||
areaId: this.userAreaId,
|
girdId: this.userGirdId,
|
||||||
areaName: this.userAreaName
|
girdName: this.userGirdName
|
||||||
}).then(res=> {
|
}).then(res=> {
|
||||||
if(res?.code==0) {
|
if(res?.code==0) {
|
||||||
this.$u.toast('提交成功')
|
this.$u.toast('提交成功')
|
||||||
@@ -201,20 +208,20 @@ export default {
|
|||||||
this.upLoad(avatarUrl)
|
this.upLoad(avatarUrl)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectArea(v) {
|
handleSelectGrid(v) {
|
||||||
this.userAreaName = v.areaName
|
this.userGirdName = v.girdName
|
||||||
this.userAreaId = v.id
|
this.userGirdId = v.id
|
||||||
},
|
},
|
||||||
idNumberInput() {
|
idNumberInput() {
|
||||||
if(this.userIdNumber.length == 18 && this.userRealName) {
|
if(this.userIdNumber.length == 18 && this.userRealName) {
|
||||||
if(!this.userAreaId) {
|
if(!this.userGirdId) {
|
||||||
this.$instance.post(`/app/appresidentapplet/queryDetailByIdNumberAndName`,{
|
this.$instance.post(`/app/appresidentapplet/queryDetailByIdNumberAndName`,{
|
||||||
name: this.userRealName,
|
name: this.userRealName,
|
||||||
idNumber: this.userIdNumber
|
idNumber: this.userIdNumber
|
||||||
}).then(res=> {
|
}).then(res=> {
|
||||||
if(res.data && res.data.id) {
|
if(res.data && res.data.id) {
|
||||||
this.userAreaId = res.data.id
|
this.userGirdId = res.data.id
|
||||||
this.userAreaName = res.data.areaName
|
this.userGirdName = res.data.girdName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -377,5 +384,15 @@ export default {
|
|||||||
.btn-edit {
|
.btn-edit {
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep.ai-uploader {
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
.imgList {
|
||||||
|
width: 228px;
|
||||||
|
height: 200px;
|
||||||
|
display: inline-block!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user