This commit is contained in:
liuye
2022-08-11 10:04:21 +08:00
parent a093b4758d
commit af34cdd89a
8 changed files with 311 additions and 19 deletions

View File

@@ -0,0 +1,149 @@
<template>
<div class="feedback">
<div class="suggest">
<div flex class="title"><em v-text="'*'"/>请输入您的宝贵意见</div>
<AiTextarea v-model="content" placeholder="请输入200字以内" :maxlength="200"/>
</div>
<div class="name">
<div flex><em v-text="'*'"/>联系人</div>
<input type="text" placeholder="请输入您的姓名" style="text-align: right;" v-model="name" class="inp">
</div>
<div class="phone">
<div flex><em v-text="'*'"/>联系方式</div>
<input type="number" placeholder="请输入您的联系方式" style="text-align: right;" v-model="phone" class="inp">
</div>
<div class="photo">
<div class="photo-title">图片 <span>最多9张</span></div>
<div class="pad-120">
<AiUploader :limit="9" multiple :def.sync="picture" placeholder="上传图片" action="/admin/file/add2"/>
</div>
</div>
<div style="height: 56px;"></div>
<div class="btn" @click="submit">保存</div>
</div>
</template>
<script>
export default {
name: 'feedback',
data() {
return {
content: '',
picture: [],
name: '',
phone: ''
}
},
methods: {
submit() {
let {phone, content, picture, name} = this
if (!content) {
return this.$u.toast("请输入您的宝贵意见")
}
if (!name) {
return this.$u.toast("请输入您的姓名")
}
if (!phone) {
return this.$u.toast("请输入联系方式")
}
if (!/^\d{11}$/g.test(phone)) {
return this.$u.toast("联系方式格式有误!")
}
this.$http.post("/oms/api/appfeedback/addOrUpdate", {
phone,
opinion: content,
pictureUrl: picture?.map(e=>e.url).toString(),
contacts: name,
sourceHost: location.host
}, {
withoutToken: true
}).then(res => {
if (res?.code == 0) {
this.$u.toast("保存成功!")
setTimeout(() => {
uni.navigateBack({})
}, 1500)
}
})
}
},
onShow() {
document.title = '意见反馈'
},
}
</script>
<style lang="scss" scoped>
.feedback {
padding-bottom: 100px;
em {
display: block;
color: red;
font-style: normal;
height: initial;
}
.suggest {
padding: 15px 30px;
box-sizing: border-box;
background-color: #FFFFFF;
margin-bottom: 8px;
.title {
width: 100%;
height: 100px;
line-height: 100px;
font-size: 32px;
color: #333333;
}
}
.name,
.phone {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #FFFFFF;
margin-bottom: 8px;
padding: 0 30px;
width: 100%;
height: 112px;
line-height: 112px;
font-size: 32px;
box-sizing: border-box;
}
.photo {
background-color: #FFFFFF;
padding: 20px 30px;
.photo-title {
width: 100%;
height: 100px;
line-height: 80px;
color: #333333;
& > span {
color: #999999;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background-color: #1365DD;
color: #FFFFFF;
}
}
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div class="gridMemberPoints">
<img src="./img/my/grid-point.png" alt="" class="right-icon">
</div>
</template>
<script>
export default {
name: "gridMemberPoints",
}
</script>
<style lang="scss" scoped>
.gridMemberPoints {
img {
width: 100%;
}
}
</style>

View File

@@ -0,0 +1,21 @@
<template>
<div class="HelpDocs">
</div>
</template>
<script>
export default {
name: "HelpDocs",
data() {
return {
}
}
}
</script>
<style lang="scss" scoped>
.HelpDocs {
}
</style>

View File

@@ -0,0 +1,73 @@
<template>
<div class="uploadPhoto">
<div class="photo">
<div class="photo-title">图片 <span>最多1张</span></div>
<div class="pad-120">
<AiUploader :limit="1" multiple placeholder="上传图片" :def.sync="picture" action="/admin/file/add-portrait"/>
</div>
</div>
<div style="height: 56px;"></div>
<div class="btn" @click="back">返回</div>
</div>
</template>
<script>
import {mapActions} from "vuex";
export default {
name: 'uploadPhoto',
data() {
return {
picture: []
}
},
methods: {
...mapActions(['getAccount']),
back() {
uni.navigateBack({
success: () => {
this.getAccount()
}
})
}
},
onShow() {
document.title = '头像上传'
},
}
</script>
<style lang="scss" scoped>
.uploadPhoto {
.photo {
background-color: #FFFFFF;
padding: 20px 30px;
.photo-title {
width: 100%;
height: 100px;
line-height: 80px;
color: #333333;
& > span {
color: #999999;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background-color: #1365DD;
color: #FFFFFF;
}
}
</style>

View File

@@ -75,7 +75,7 @@ export default {
{
img: require('../img/app/app-wgyjf-icon.png'),
title: '网格员积分',
linkUrl: '/apps/AppBuilding/AppBuilding'
linkUrl: './GridMemberPoints'
},
]
}

View File

@@ -1,6 +1,8 @@
<template>
<div class="Home">
<u-notice-bar mode="horizontal" :list="list"></u-notice-bar>
<div @click="linkTo('./HelpDocs')">
<u-notice-bar mode="horizontal" :list="list"></u-notice-bar>
</div>
<!-- <div class="tips">
<img src="../img/home/tips-icon.png" alt="">慧政务改版上线了点此查看帮助文档
</div> -->
@@ -12,7 +14,7 @@
</div>
<div class="right">
<p class="name">你好<AiOpenData v-if="user.wxUserId" type="userName" :openid="user.wxUserId"></AiOpenData></p>
<p class="time">您已加入慧政务 <span>15</span></p>
<p class="time">您已加入慧政务 <span>{{ girdInfo['加入天数'] }}</span></p>
</div>
</div>
<div class="app-list">
@@ -25,7 +27,7 @@
<div class="tab-content">
<div class="item" v-for="(item, index) in tabStatistics" :key="index">
<p><span></span>{{ item.title }}</p>
<div>{{ item.num }}</div>
<div>{{ girdInfo[item.key] }}</div>
</div>
</div>
<div class="title">居民活跃指数</div>
@@ -66,23 +68,24 @@ export default {
tabStatistics: [
{
title: '网格数',
num: 15
key: '网格数'
},
{
title: '网格员数',
num: 35
key: '网格员'
},
{
title: '辖区户数',
num: 1550
key: '辖区户数'
},
{
title: '居民群数',
num: 15
key: '居民群'
}
],
echartData: null,
list: ['慧政务改版上线了,点此查看帮助文档!']
list: ['慧政务改版上线了,点此查看帮助文档!'],
girdInfo: {}
}
},
computed: { ...mapState(['user']) },
@@ -111,7 +114,7 @@ export default {
color: '#666',
},
},
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
data: ['4月', '5月', '6月', '7月', '8月',]
},
yAxis: {
axisLine:{ //y轴
@@ -128,9 +131,12 @@ export default {
},
type: 'value'
},
tooltip: {
trigger: 'axis'
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
data: [155, 130, 120, 160, 120, 130, 110],
type: 'line',
areaStyle: {//覆盖区域的渐变色
normal: {
@@ -164,10 +170,19 @@ export default {
this.echartData.setOption(option)
},
linkTo(url) {
console.log(url)
uni.navigateTo({ url })
},
getGirdInfo() {
this.$http.post(`/app/appgirdmemberinfo/girdMemberOrNotStatistic`).then(res => {
if (res.code == 0) {
this.girdInfo = res.data
}
})
}
},
created() {
this.getGirdInfo()
this.$nextTick(() => {
this.chartInit()
})

View File

@@ -10,7 +10,7 @@
</div>
<div class="bottom">{{ user.corpName }}</div>
</div>
<div class="link" v-for="(item, index) in linkList" :key="index">
<div class="link" v-for="(item, index) in linkList" :key="index" @click="linkTo(item.linkUrl)">
<div class="left">
<img :src="item.img" alt="">{{ item.title }}
</div>
@@ -22,7 +22,7 @@
</template>
<script>
import { mapState } from 'vuex'
import { mapActions, mapState } from 'vuex'
export default {
name: "My",
data() {
@@ -30,31 +30,46 @@ export default {
linkList: [
{
title: '头像上传',
img: require('../img/my/my-txsc.png')
img: require('../img/my/my-txsc.png'),
linkUrl: './UploadPhoto'
},
{
title: '意见反馈',
img: require('../img/my/my-yjfk.png')
img: require('../img/my/my-yjfk.png'),
linkUrl: './FeedBack'
},
{
title: '联系我们',
img: require('../img/my/my-lxwm.png')
img: require('../img/my/my-lxwm.png'),
linkUrl: 'contact'
},
{
title: '帮助文档',
img: require('../img/my/my-bzwd.png')
img: require('../img/my/my-bzwd.png'),
linkUrl: './HelpDocs'
}
]
}
},
computed: { ...mapState(['user']) },
methods: {
...mapActions(['wxInvoke', 'injectJWeixin']),
linkTo(url) {
uni.navigateTo({ url })
if(url == 'contact') { //联系我们
this.wxInvoke(["openThirdAppServiceChat", {}, res => {
if (res.err_msg == "openThirdAppServiceChat:fail") {
window.open("https://work.weixin.qq.com/kfid/kfcc23927b18d1ad4f4")
}
}])
}else {
console.log(url)
uni.navigateTo({ url })
}
}
},
created() {
this.injectJWeixin('openThirdAppServiceChat')
},
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB