master
tangyi 2022-03-31 17:58:34 +08:00
parent d2d47f5355
commit 4e2c174df4
10 changed files with 447 additions and 380 deletions

View File

@ -70,20 +70,20 @@ const request = (method, url, options) => {
methods = 'POST' methods = 'POST'
headers = { headers = {
'Content-Type': 'application/json; charset=UTF-8', 'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || '' 'token':uni.getStorageSync('token') || ''
} }
break; break;
case 'postForm': case 'postForm':
methods = 'POST' methods = 'POST'
headers = { headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || '' 'token':uni.getStorageSync('token') || ''
} }
break; break;
} }
let params = {}; let params = {};
if(options!=undefined) params = options; if(options!=undefined) params = options;
params.token = uni.getStorageSync('token'); // params.token = uni.getStorageSync('token');
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
url: `${hostapi}${url}`, url: `${hostapi}${url}`,
@ -124,7 +124,7 @@ const uploadFile = (url, options) => {
formData: tempData, formData: tempData,
header: { header: {
'Content-Type': 'multipart/form-data;charset=UTF-8', 'Content-Type': 'multipart/form-data;charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || '' 'token':uni.getStorageSync('token') || ''
}, },
success: res => { success: res => {
if (res.statusCode == 200) { if (res.statusCode == 200) {

View File

@ -98,6 +98,19 @@
}, },
data() { data() {
return { return {
data:{
type_id:1,
title:"",
brand:"",
model:"型号",
width:"",
height:"",
contact_name:"",
contact_phone:"",
appointment_time:'',
addres:"",
pictures:"",
},
typeIndex: 0, typeIndex: 0,
typeData: [{ typeData: [{
title: '巡检', title: '巡检',
@ -124,6 +137,7 @@
methods: { methods: {
typeIndexFun(index) { typeIndexFun(index) {
this.typeIndex = index this.typeIndex = index
this.data.type_id=this.typeData
} }
} }
} }

View File

@ -242,6 +242,7 @@
autoplay: true, autoplay: true,
interval: 3000, interval: 3000,
index: 1, index: 1,
projectId:"",
recordState: [{ recordState: [{
title: '维修记录', title: '维修记录',
state: true state: true
@ -257,11 +258,27 @@
] ]
} }
}, },
onLoad(option) {
this.projectId=option.id
this.getData()
},
methods: { methods: {
changeAutoplay(data) { changeAutoplay(data) {
console.log() console.log()
this.index = data.detail.current - 0 + 1 this.index = data.detail.current - 0 + 1
}, },
getData(){
this.$requst.get('/universal/api.project/project_info', {
id: this.projectId,
}).then(res => {
if (res.code == 1) {
console.log(res.data.data)
} else {
}
})
},
recordNav(index) { recordNav(index) {
for (var i = 0; i < this.recordState.length; i++) { for (var i = 0; i < this.recordState.length; i++) {
this.recordState[i].state = false this.recordState[i].state = false

View File

@ -32,16 +32,16 @@
</view> </view>
</view> </view>
<view class="project-list"> <view class="project-list">
<view class="li" @click="projectDetailsFun()" v-for="(item,index) in dataList.data" :key="index"> <view class="li" @click="projectDetailsFun(item.id)" v-for="(item,index) in dataList.data" :key="index">
<view class="message"> <view class="message">
<image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load></image> <image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load></image>
<view class="text disjb fc" style="height: 180rpx;"> <view class="text disjb fc" style="height: 180rpx;">
<view class="clips1 fon24 bold">{{item.title}}</view> <view class="clips1 fon24 bold">{{item.project_name}}</view>
<view class="disjb fc" style="margin-left: -20rpx;height: 80%;"> <view class="disjb fc" style="margin-left: -20rpx;height: 80%;">
<view class="serial-number scal09">项目编号{{item.projectCode}}</view> <view class="serial-number scal09">项目编号{{item.projectCode}}</view>
<view class="specification scal09">规格型号{{item.model}}</view> <view class="specification scal09">规格型号{{item.project_number}}</view>
<view class="specification scal09">产品尺寸{{item.size}}</view> <view class="specification scal09">产品尺寸{{item.size}}</view>
<view class="installation-site scal09">安装位置{{item.installationSite}} <view class="installation-site scal09">安装位置{{item.installation_location}}
</view> </view>
</view> </view>
</view> </view>
@ -55,7 +55,7 @@
</view> </view>
<view class="date scal09">{{item.date}}</view> <view class="date scal09">{{item.date}}</view>
</view> </view>
<view v-if="item.state==1" class="icon iconBera"></view> <view v-if="item.warranty_time==1" class="icon iconBera"></view>
<view v-else class="icon iconBer">质保到期</view> <view v-else class="icon iconBer">质保到期</view>
</view> </view>
</view> </view>
@ -101,98 +101,7 @@
dataList: { dataList: {
list_rows: 10, list_rows: 10,
page: 1, page: 1,
data: [{ data: [
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
},
{
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
},
] ]
} }
} }
@ -204,21 +113,23 @@
methods: { methods: {
getData() { getData() {
this.$requst.post('/universal/api.project/project_list', { this.$requst.get('/universal/api.project/project_list', {
list_rows: this.dataList.list_rows, list_rows: this.dataList.list_rows,
page: this.dataList.page, page: this.dataList.page,
}).then(res => { }).then(res => {
// this.$toolAll.tools.showToast(res.msg); // this.$toolAll.tools.showToast(res.msg);
if (res.code == 0) { console.log(res.data.data)
this.dataList = res.data.data if (res.code == 1) {
this.dataList.data = res.data.data
} else { } else {
} }
}) })
}, },
projectDetailsFun() { projectDetailsFun(id) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/project/details" url: `/pages/project/details?id=${id}`
}) })
}, },
// //

View File

@ -17,9 +17,9 @@
</view> </view>
<view class="fault-type-title padding">故障类型</view> <view class="fault-type-title padding">故障类型</view>
<view class="padding fault-type-content"> <view class="padding fault-type-content">
<view class="li" @click="repairsTypeFun(index)" :class="item.state?'on':''" <view class="li" @click="repairsTypeFun(index)" :class="index==indexType?'on':''"
v-for="(item,index) in faultTypeData"> v-for="(item,index) in faultTypeData">
{{item.title}} {{item.name}}
</view> </view>
</view> </view>
@ -30,7 +30,7 @@
</view> </view>
<image class="sm" src="../../static/iocn/sm.png" mode=""></image> <image class="sm" src="../../static/iocn/sm.png" mode=""></image>
</view> </view>
<input v-model="data.model" class="devicename" placeholder="请填写设备名称和型号" v-else /> <input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号" v-else />
@ -46,20 +46,22 @@
<view class="detailed-address inputCss"> <view class="detailed-address inputCss">
<input type="text" v-model="data.address" value="" placeholder="请输入详细的上门服务地址" placeholder-class="inputCss-input" /> <input type="text" v-model="data.address" value="" placeholder="请输入详细的上门服务地址"
placeholder-class="inputCss-input" />
<image @click="mapFun()" src="../../static/iocn/map.png" class="map" mode="aspectFill"></image> <image @click="mapFun()" src="../../static/iocn/map.png" class="map" mode="aspectFill"></image>
</view> </view>
<input type="text" class="inputCss" v-model="data.name" placeholder="请填写您的姓名" placeholder-class="inputCss-input" <input type="text" class="inputCss" v-model="data.username" placeholder="请填写您的姓名"
value="" /> placeholder-class="inputCss-input" value="" />
<input type="text" class="inputCss" v-model="data.tel" placeholder="请填写联系电话" placeholder-class="inputCss-input" <input type="text" class="inputCss" v-model="data.phone" placeholder="请填写联系电话"
value="" /> placeholder-class="inputCss-input" value="" />
<picker mode="date"> <picker mode="date" @change="dateFun()">
<input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间" placeholder-class="inputCss-input" <picker mode="time" @change="timeFun()">
value="" /> <input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间"
placeholder-class="inputCss-input" value="" />
</picker>
</picker> </picker>
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button> <button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
</view> </view>
@ -74,70 +76,46 @@
data() { data() {
return { return {
single: "2021-04-3", single: "2021-04-3",
data: { data: {
model:"", is_device: 0,
fault_type: "",
device_name: "",
condition: "", condition: "",
project_number:"",
address: "", address: "",
name:"", username: "",
tel:"", phone: "",
date: "" date: ""
}, },
indexType: 0,
navDataState: [{ navDataState: [{
title: "有设备", title: "有设备",
state: false state: false,
is_device: 1
}, },
{ {
title: "无设备", title: "无设备",
state: true state: true,
}, is_device: 0
}
], ],
faultTypeData: [{ faultTypeData: []
title: "供电不足",
state: false
},
{
title: "参数错误",
state: false
},
{
title: "模组故障",
state: false
},
{
title: "网络故障",
state: false
},
{
title: "外力损坏",
state: false
},
{
title: "软件问题",
state: true
},
{
title: "信号故障",
state: false
},
{
title: "其他问题",
state: false
},
]
} }
}, },
onLoad() { onLoad() {
this.getType() this.getType()
}, },
methods: { methods: {
//
getType() { getType() {
// /universal/api.order/fault_type // /universal/api.order/fault_type
this.$requst.post('/universal/api.work_order/fault_type').then(res => { this.$requst.post('/universal/api.work_order/fault_type').then(res => {
// this.$toolAll.tools.showToast(res.msg); // this.$toolAll.tools.showToast(res.msg);
if (res.code == 0) { if (res.code == 1) {
console.log(res)
this.faultTypeData = [...res.data]
} else { } else {
} }
@ -147,6 +125,13 @@
this.single = e; this.single = e;
console.log("-change事件:", e); console.log("-change事件:", e);
}, },
//
dateFun(data){
},
timeFun(){
},
scanCodeFun() { scanCodeFun() {
uni.scanCode({ uni.scanCode({
success: function(res) { success: function(res) {
@ -156,7 +141,45 @@
}); });
}, },
submitButton() { submitButton() {
// if() this.data.fault_type = this.faultTypeData[this.indexType].id
if (this.data.is_device == 0){
if (!this.data.device_name) {
this.$toolAll.tools.showToast("请填写设备名称或型号");
return
}
}else{
if (!this.data.project_number) {
this.$toolAll.tools.showToast("请扫描设备二维码");
return
}
}
if(!this.data.username){
this.$toolAll.tools.showToast("请填写您的姓名");
return
}
var reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11
if(!reg_tel.test(this.data.phone)){
this.$toolAll.tools.showToast("请正确填写您的电话");
return
}
return
this.$requst.post('/universal/api.work_order/repair').then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code == 1) {
} else {
}
})
console.log(this.data)
}, },
mapFun() { mapFun() {
@ -190,12 +213,11 @@
this.navDataState[i].state = false this.navDataState[i].state = false
} }
this.navDataState[index].state = true this.navDataState[index].state = true
console.log(this.navDataState[index].is_device)
this.data.is_device = this.navDataState[index].is_device
}, },
repairsTypeFun(index) { repairsTypeFun(index) {
for (var i = 0; i < this.faultTypeData.length; i++) { this.indexType = index
this.faultTypeData[i].state = false
}
this.faultTypeData[index].state = true
}, },
} }

View File

@ -3,36 +3,51 @@
<status-nav-slot :backgroudColor="backgroudColor"> <status-nav-slot :backgroudColor="backgroudColor">
<!-- <view slot="leftContent"><i class="icon icon-return fon40" :style="{color:newColor}"></i></view> --> <!-- <view slot="leftContent"><i class="icon icon-return fon40" :style="{color:newColor}"></i></view> -->
<view slot="leftContent" style="width: 30rpx;"></view> <view slot="leftContent" style="width: 30rpx;"></view>
<view slot="centerContent"><view :style="{color:newColor}">个人中心</view></view> <view slot="centerContent">
<view :style="{color:newColor}">个人中心</view>
</view>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view> <view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i>
</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view> <view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i>
</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view slot="rightContent" style="width: 30rpx;"></view> <view slot="rightContent" style="width: 30rpx;"></view>
<!-- #endif --> <!-- #endif -->
</status-nav-slot> </status-nav-slot>
<view class="posir" style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;" :style="{paddingTop: newHeight + 'px'}"> <view class="posir"
style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;"
:style="{paddingTop: newHeight + 'px'}">
<!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> --> <!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->
<view class="mar-zy40"> <view class="mar-zy40">
<view style="background: url(../../../static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;"> <view
style="background: url(../../../static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;">
<view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;"> <view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;">
<view class="disac"> <view class="disac">
<image class="flexs mar-y10" src="/static/public/icon-my-headimg.png" mode="aspectFill" style="width: 91rpx;height: 91rpx;" lazy-load></image> <image class="flexs mar-y10" v-if="!userInfo.avatar"
src="/static/public/icon-my-headimg.png" mode="aspectFill"
style="width: 91rpx;height: 91rpx;" lazy-load></image>
<image class="flexs mar-y10" v-else src="/static/public/icon-my-headimg.png"
mode="aspectFill" style="width: 91rpx;height: 91rpx;" lazy-load></image>
<view class="disjb fc" style="height: 91rpx;"> <view class="disjb fc" style="height: 91rpx;">
<view class="fon34 bold">156****0510</view> <view class="fon34 bold">{{tel(userInfo.username)}}</view>
<view class="fon22" style="color: #717171;">未实名认证</view> <view class="fon22" style="color: #717171;">未实名认证</view>
</view> </view>
</view> </view>
<image src="/static/public/icon-my-level.png" mode="aspectFill" style="width: 49rpx;height: 76rpx;" lazy-load></image> <image src="/static/public/icon-my-level.png" mode="aspectFill"
style="width: 49rpx;height: 76rpx;" lazy-load></image>
</view> </view>
<!-- 信用分项目数量未评价 --> <!-- 信用分项目数量未评价 -->
<view class="disja pad-zy40"> <view class="disja pad-zy40">
<view v-for="(item,index) in headList" :key="index" class="disjcac fc"> <view v-for="(item,index) in headList" :key="index" class="disjcac fc">
<view style="height: 50rpx;" class="disjcac"> <view style="height: 50rpx;" class="disjcac">
<image :src="item.imgsrc" :style="{width: [49,49,46][index] + 'rpx',height: [50,50,42][index] + 'rpx'}" mode="widthFix" lazy-load></image> <image :src="item.imgsrc"
:style="{width: [49,49,46][index] + 'rpx',height: [50,50,42][index] + 'rpx'}"
mode="widthFix" lazy-load></image>
</view> </view>
<view class="fon24 col9 mar-sx10">{{item.title}}</view> <view class="fon24 col9 mar-sx10">{{item.title}}</view>
<view class="fon36 bold">{{item.num}}</view> <view class="fon36 bold">{{item.num}}</view>
@ -43,20 +58,23 @@
<view class="disja mar-s20"> <view class="disja mar-s20">
<view v-for="(item,index) in percentageList" :key="index" class="disjcac fc col3"> <view v-for="(item,index) in percentageList" :key="index" class="disjcac fc col3">
<!-- <cmd-progress type="circle" :percent="item.num" :width="60" :stroke-color="['#00a2e9','#e87c00','#0b56ec'][index]" :circleStrokeColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]" :strokeShape="'square'"></cmd-progress> --> <!-- <cmd-progress type="circle" :percent="item.num" :width="60" :stroke-color="['#00a2e9','#e87c00','#0b56ec'][index]" :circleStrokeColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]" :strokeShape="'square'"></cmd-progress> -->
<arprogress :percent="item.num" <arprogress :percent="item.num" :inactiveColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]"
:inactiveColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]" :activeColor="['#00a2e9','#e87c00','#0b56ec'][index]" :borderWidth="7.8" :width="120"
:activeColor="['#00a2e9','#e87c00','#0b56ec'][index]" :duration="500" bgColor="transparent"><text
:borderWidth="7.8" :style="{color: ['#00a2e9','#e87c00','#0b56ec'][index]}">{{item.num}}%</text>
:width="120" </arprogress>
:duration="500"
bgColor="transparent"><text :style="{color: ['#00a2e9','#e87c00','#0b56ec'][index]}">{{item.num}}%</text></arprogress>
<view class="fon24 mar-s20">{{item.title}}</view> <view class="fon24 mar-s20">{{item.title}}</view>
</view> </view>
</view> </view>
<!-- 六宫格 --> <!-- 六宫格 -->
<view class="disjbac fw bacf" style="margin: 30rpx -20rpx 0rpx -20rpx;"> <view class="disjbac fw bacf" style="margin: 30rpx -20rpx 0rpx -20rpx;">
<view @tap="chooseGridEv(index)" class="disjcac fc width50 pad-sx40" v-for="(item,index) in gridList" :key="index" :class="[`${(index%2!=0) ? 'bleft' : ''} ${(index < gridList.length-2) ? 'bbot' : ''}`]" style="box-sizing: border-box;"> <view @tap="chooseGridEv(index)" class="disjcac fc width50 pad-sx40"
<image :src="item.imgsrc" mode="widthFix" lazy-load :style="{width: [52,52,46,50,46,52][index] + 'rpx',height: [48,45,52,52,53,52][index] + 'rpx'}"></image> v-for="(item,index) in gridList" :key="index"
:class="[`${(index%2!=0) ? 'bleft' : ''} ${(index < gridList.length-2) ? 'bbot' : ''}`]"
style="box-sizing: border-box;">
<image :src="item.imgsrc" mode="widthFix" lazy-load
:style="{width: [52,52,46,50,46,52][index] + 'rpx',height: [48,45,52,52,53,52][index] + 'rpx'}">
</image>
<view class="fon26 col3 mar-s20">{{item.title}}</view> <view class="fon26 col3 mar-s20">{{item.title}}</view>
</view> </view>
</view> </view>
@ -77,29 +95,70 @@
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue'; import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
import arprogress from '@/components/ar-circle-progress/index.vue' import arprogress from '@/components/ar-circle-progress/index.vue'
export default { export default {
components:{statusNavSlot,cmdProgress,'foot-tab' :footTabOne,arprogress}, components: {
statusNavSlot,
cmdProgress,
'foot-tab': footTabOne,
arprogress
},
data() { data() {
return { return {
newHeight: uni.getSystemInfoSync().statusBarHeight + 50, newHeight: uni.getSystemInfoSync().statusBarHeight + 50,
backgroudColor: 'rgba(255,255,255,0)', backgroudColor: 'rgba(255,255,255,0)',
newColor: 'rgba(255,255,255,1)', newColor: 'rgba(255,255,255,1)',
headList:[ headList: [{
{imgsrc:'/static/public/icon-my-creditScore.png',title:'信用分',num:0}, imgsrc: '/static/public/icon-my-creditScore.png',
{imgsrc:'/static/public/icon-my-projectNum.png',title:'项目数量',num:0}, title: '信用分',
{imgsrc:'/static/public/icon-my-notEvaluated.png',title:'未评价',num:0}, num: 0
},
{
imgsrc: '/static/public/icon-my-projectNum.png',
title: '项目数量',
num: 0
},
{
imgsrc: '/static/public/icon-my-notEvaluated.png',
title: '未评价',
num: 0
},
], ],
percentageList:[ percentageList: [{
{title:'预约及时率',num:100}, title: '预约及时率',
{title:'上门准时率',num:60}, num: 100
{title:'项目报修率',num:40}, },
{
title: '上门准时率',
num: 60
},
{
title: '项目报修率',
num: 40
},
], ],
gridList:[ gridList: [{
{imgsrc:'/static/public/icon-my-information.png',title:'个人信息'}, imgsrc: '/static/public/icon-my-information.png',
{imgsrc:'/static/public/icon-my-certificates.png',title:'电子证件'}, title: '个人信息'
{imgsrc:'/static/public/icon-my-service.png',title:'服务范围'}, },
{imgsrc:'/static/public/icon-my-evaluate.png',title:'我要评价'}, {
{imgsrc:'/static/public/icon-my-account.png',title:'我的账户'}, imgsrc: '/static/public/icon-my-certificates.png',
{imgsrc:'/static/public/icon-my-set.png',title:'设置'}, title: '电子证件'
},
{
imgsrc: '/static/public/icon-my-service.png',
title: '服务范围'
},
{
imgsrc: '/static/public/icon-my-evaluate.png',
title: '我要评价'
},
{
imgsrc: '/static/public/icon-my-account.png',
title: '我的账户'
},
{
imgsrc: '/static/public/icon-my-set.png',
title: '设置'
},
], ],
userInfo: {} userInfo: {}
} }
@ -144,11 +203,23 @@
} }
}) })
}, },
//
tel(tel) {
const telNum = tel.toString();
const reg = /^(\d{3})\d{4}(\d{4})$/;
return telNum.replace(reg, '$1****$2')
},
//
checkInfo() { checkInfo() {
this.$requst.get('/universal/api.user/user_center').then(res => { this.$requst.get('/universal/api.user/user_center').then(res => {
if (res.code == 1 && res.data.length != 1) { if (res.code == 1 && res.data.length != 1) {
this.userInfo = res.data; this.userInfo = res.data;
this.headList[0].num = this.userInfo.credit
this.headList[1].num = this.userInfo.project_number
this.headList[2].num = this.userInfo.evaluate
this.percentageList[0].num= this.userInfo.reserve_rate-0
this.percentageList[1].num= this.userInfo.visit_rate-0
this.percentageList[2].num= this.userInfo.repair_rate-0
} }
}) })
}, },
@ -177,5 +248,7 @@
</script> </script>
<style> <style>
page {background-color: #f7f7f7;} page {
background-color: #f7f7f7;
}
</style> </style>

View File

@ -241,7 +241,7 @@
}, },
data() { data() {
return { return {
role: 4, // 1 2: 3: 4 role: 1, // 1 2: 3: 4
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50, statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
messageNumber: 16 ,// messageNumber: 16 ,//
noticeList:['2021年11月06日公司团建维修服务暂停一天服务暂停一天服务暂停一天。','51akslfj;dkpiojasdjf;j1ij'],// noticeList:['2021年11月06日公司团建维修服务暂停一天服务暂停一天服务暂停一天。','51akslfj;dkpiojasdjf;j1ij'],//
@ -345,9 +345,10 @@
url:url url:url
}) })
}, },
// //
getIncrementServiceType(){ getIncrementServiceType(){
this.$requst.post('/universal/api.vas/vas_type').then(res=>{ this.$requst.get('/universal/api.vas/vas_type').then(res=>{
if(res.code) { if(res.code) {
} }

View File

@ -47,8 +47,11 @@
this.$requst.get('/universal/api.user/electronic_badge').then(res=>{ this.$requst.get('/universal/api.user/electronic_badge').then(res=>{
if(res.code==1){ if(res.code==1){
this.userId=res.data.id
// uni.navigateBack({delta:1}) this.userName=res.data.name
this.userPhone=res.data.phone
this.userEmail=res.data.email
this.website=res.data.website
} }
}) })

View File

@ -33,7 +33,7 @@
methods: { methods: {
// //
getMessageList(){ getMessageList(){
this.$requst.post('/universal/api.message/message_list').then(res=>{ this.$requst.get('/universal/api.message/message_list').then(res=>{
}) })
} }

View File

@ -101,7 +101,32 @@
flag:true flag:true
} }
}, },
onLoad() {
this.getData()
},
methods: { methods: {
//
getData(){
this.$requst.get('/universal/api.user/user_info').then(res => {
if (res.code == 1 && res.data.length != 1) {
console.log(res.data)
this.nickname=res.data.nickname
this.full_name=res.data.name
if(res.data.sex==0){
this.genderNum=1
}else{
this.genderNum=res.data.sex
}
this.contact_number=res.data.phone
this.e_mail=res.data.email
this.id_card_no=res.data.idcard
}
})
},
// //
sumbmitData(){ sumbmitData(){
if(this.checkEmpty()){ if(this.checkEmpty()){
@ -132,6 +157,7 @@
} }
} }
}, },
// //
checkEmpty(){ checkEmpty(){
let result = false; let result = false;