This commit is contained in:
ChuShiZ 2024-10-15 23:40:11 +08:00
parent e9eb9005c4
commit 74c7cf99a6
14 changed files with 764 additions and 173 deletions

View File

@ -3,6 +3,14 @@
<!--<VNavigationBar style="position: relative;z-index: 99;" leftTitle="true" backgroundColor="rgba(0,0,0,0)" title-color="#fff" title=" "></VNavigationBar>--> <!--<VNavigationBar style="position: relative;z-index: 99;" leftTitle="true" backgroundColor="rgba(0,0,0,0)" title-color="#fff" title=" "></VNavigationBar>-->
<view class="bodyTopBg"></view> <view class="bodyTopBg"></view>
<view class="body"> <view class="body">
<view class="userInfoBox">
<image style="width: 104rpx;height: 104rpx" :src="userInfo.avatarUrl || defaultAvatar" mode="aspectFill" @error="avatarErr"></image>
<view class="userInfo">
<text class="userName">{{ userInfo.userName }}</text>
<text class="userType">{{ userInfo.userType }}</text>
</view>
<image @click="showUserDetail" style="width: 48rpx;height: 48rpx" src="/static/icons/more.png" mode="aspectFita"></image>
</view>
<view class="body-top-grid"> <view class="body-top-grid">
<view v-for="(item, index) in menuList" :key="index" class="body-top-item" @click="gotoPage(item)"> <view v-for="(item, index) in menuList" :key="index" class="body-top-item" @click="gotoPage(item)">
<view> <view>
@ -44,6 +52,11 @@ export default {
}, },
data() { data() {
return { return {
userInfo: {
avatarUrl: undefined,
userName: '曾廷',
userType: '服务顾问'
},
menuList: [ menuList: [
{ {
title: '新建工单', title: '新建工单',
@ -86,7 +99,8 @@ export default {
appointDate: '2024-10-20 12:00', appointDate: '2024-10-20 12:00',
counselorName: '李相东' counselorName: '李相东'
} }
] ],
defaultAvatar: require('@/static/icons/avatar.png')
} }
}, },
onShow() { onShow() {
@ -97,6 +111,15 @@ export default {
url: menu.path url: menu.path
}) })
}, },
avatarErr(err) {
console.log('err', err)
this.userInfo.avatarUrl = this.defaultAvatar
},
showUserDetail() {
uni.navigateTo({
url: '/pages/my/myInfo'
})
}
} }
} }
</script> </script>
@ -122,7 +145,9 @@ export default {
left: 0; left: 0;
width: 100%; width: 100%;
height: 500rpx; height: 500rpx;
background: rgba(1, 116, 246, 0.2); background-image: url("@/static/bg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
} }
.body { .body {
@ -134,6 +159,34 @@ export default {
padding-bottom: 30rpx; padding-bottom: 30rpx;
} }
.userInfoBox {
margin: 0 32rpx 40rpx;
display: flex;
column-gap: 20rpx;
align-items: center;
.userInfo {
flex: 1;
width: 0;
.userName {
font-weight: bold;
font-size: 36rpx;
color: #333333;
display: block;
margin-bottom: 16rpx;
}
.userType {
font-size: 24rpx;
color: #0174F6;
display: inline-block;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 1rpx solid #0174F6;
padding: 8rpx 16rpx;
}
}
}
.body-top-grid { .body-top-grid {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;

View File

@ -0,0 +1,153 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title="选择人员" title-color="#333"></VNavigationBar>
<view class="body">
<div class="searchBox">
<div class="inputBox">
<input placeholder="请输入人员姓名" type="text">
</div>
<text>搜索</text>
</div>
<div class="userList">
<u-checkbox-group
placement="column"
v-model="checked">
<view v-for="item in list" :key="item.id" class="userItem">
<view class="info">
<text class="name">{{item.name}}</text>
<text class="trade">{{item.gz}}{{item.checked}}</text>
</view>
<u-checkbox v-model="item.checked" :name="item.id" iconSize="24" shape="circle" activeColor="#1890ff"></u-checkbox>
</view>
</u-checkbox-group>
</div>
</view>
<view class="foot">
<view class="submit" @click="submit">确定选择</view>
</view>
</view>
</template>
<script>
import VNavigationBar from '@/components/VNavigationBar.vue'
import {bus} from "@/utils/eventBus";
export default {
components: {
VNavigationBar,
},
data() {
return {
list: [
{name: '杨其华', id: 1, gz: '机修'},
{name: '钣金', id: 2, gz: '机修'},
{name: '周正', id: 3, gz: '喷漆'},
],
checked: []
}
},
onLoad(data) {
},
methods: {
submit() {
console.log('this.checked', this.checked)
const selected = this.list.filter(f => this.checked.includes(f.id))
bus.$emit('choosePeople', selected)
uni.navigateBack()
}
}
}
</script>
<style lang="less" scoped>
.container {
height: 100%;
background-color: #F3F5F7;
display: flex;
flex-direction: column;
.body {
flex: 1;
height: 0;
overflow: auto;
padding: 20rpx 0;
.searchBox {
margin: 0 32rpx;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 30rpx;
display: flex;
align-items: center;
column-gap: 20rpx;
font-weight: 500;
font-size: 28rpx;
color: #0174F6;
.inputBox {
flex: 1;
width: 0;
color: #000;
}
}
.userList {
margin: 20rpx 32rpx 0;
background-color: #fff;
padding: 0 20rpx;
.userItem {
padding: 30rpx 0;
border-bottom: 1rpx solid #DDDDDD;
display: flex;
align-items: center;
justify-content: space-between;
.info {
display: flex;
flex-direction: column;
row-gap: 20rpx;
.name {
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.trade {
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
}
}
.userItem:last-child {
border-bottom: none;
}
}
}
.foot {
background-color: #fff;
padding: 30rpx;
.submit {
margin: 0 auto;
width: 510rpx;
height: 76rpx;
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@ -4,12 +4,14 @@
<VNavigationBar background-color="#fff" title="工单详情" title-color="#333"></VNavigationBar> <VNavigationBar background-color="#fff" title="工单详情" title-color="#333"></VNavigationBar>
<view class="body"> <view class="body">
<view v-if="carInfo" class="card cardInfo carCard"> <view v-if="carInfo" class="card cardInfo carCard">
<view class="orderFlag" :class="{'end': orderInfo.flag == 5}"> <view :class="{'end': orderInfo.flag == 5}" class="orderFlag">
<template> <template>
<image style="width: 48rpx;height: 48rpx" v-if="orderInfo.flag == 5" src="/static/icons/orderEnd.png" mode="aspectFit"></image> <image v-if="orderInfo.flag == 5" mode="aspectFit" src="/static/icons/orderEnd.png"
<image style="width: 48rpx;height: 48rpx" v-else src="/static/icons/orderIng.png" mode="aspectFit"></image> style="width: 48rpx;height: 48rpx"></image>
<image v-else mode="aspectFit" src="/static/icons/orderIng.png"
style="width: 48rpx;height: 48rpx"></image>
<view class="flagBody"> <view class="flagBody">
<text>{{ orderInfo.flag == 5 ? '已完成': '待处理' }}</text> <text>{{ orderInfo.flag == 5 ? '已完成' : '待处理' }}</text>
<text class="flagDesc">当前工单维修项目{{ orderInfo.flag == 5 ? '已全部完成' : '正在进行维修' }}</text> <text class="flagDesc">当前工单维修项目{{ orderInfo.flag == 5 ? '已全部完成' : '正在进行维修' }}</text>
</view> </view>
</template> </template>
@ -110,84 +112,115 @@
<view v-if="selectedProj && selectedProj.length > 0" class="card cardInfo projCard"> <view v-if="selectedProj && selectedProj.length > 0" class="card cardInfo projCard">
<view class="projTitle">维修项目</view> <view class="projTitle">维修项目</view>
<view class="projList"> <view class="projList">
<view v-if="role == 'admin'" v-for="item in selectedProj" :key="item.id" class="projItem"> <template v-if="role == 'admin'">
<view class="projTop"> <view v-for="item in selectedProj" :key="item.id" class="projItem">
<text class="projName">{{ item.projName }}</text> <view class="projTop">
<text class="projAmount">${{ item.amount }}</text> <text class="projName">{{ item.projName }}</text>
</view> <text class="projAmount">${{ item.amount }}</text>
<view class="projBody">
<view class="projDate">
<image mode="aspectFit" src="/static/icons/date.png" style="width: 24rpx;height: 24rpx"></image>
<text class="projDateText">{{ item.date }}</text>
</view> </view>
<view class="projDesc"> <view class="projBody">
{{ item.desc }} <view class="projDate">
</view> <image mode="aspectFit" src="/static/icons/date.png" style="width: 24rpx;height: 24rpx"></image>
<view class="projImg"> <text class="projDateText">{{ item.date }}</text>
<image v-for="(img, imgIndex) in item.imageList" :key="imgIndex" :src="img.filePath" </view>
class="projImgItem"></image> <view v-if="item.hasNoReviewPart" class="noReviewPart" @click="showReviewList(item.id)">
</view> <u-icon color="#E8A321" name="error-circle-fill" size="14"></u-icon>
<view class="projSend"> <text class="messageText">当前项目有待审批的配件申请单</text>
<template v-if="item.isSend"> <u-icon color="#E8A321" name="arrow-right" size="14"></u-icon>
<image mode="aspectFit" src="/static/icons/sendSuccess.png" </view>
style="width: 28rpx;height: 28rpx"></image>
<text style="color: #858BA0">已发送客户</text>
</template>
<template v-else> <template v-else>
<image mode="aspectFit" src="/static/icons/send.png" style="width: 28rpx;height: 28rpx"></image> <view class="projDesc">
<text style="color: #0174F6">发送给客户</text> {{ item.desc }}
</template> </view>
</view> <view class="projImg">
</view> <image v-for="(img, imgIndex) in item.imageList" :key="imgIndex" :src="img.filePath"
</view> class="projImgItem"></image>
<view v-else v-for="item in selectedProj" :key="item.id" class="projEditItem"> </view>
<view class="projEditLine1"> <view class="projSend">
<text>{{ item.projName }}</text> <template v-if="item.isSend">
<text class="projAmount">{{ item.amount }}</text> <image mode="aspectFit" src="/static/icons/sendSuccess.png"
</view> style="width: 28rpx;height: 28rpx"></image>
<view class="projBaseInfo"> <text style="color: #858BA0">已发送客户</text>
<view>规格{{'轿车'}}</view> </template>
<view>售价{{'280'}}</view> <template v-else>
<view>数量{{'1'}}</view> <image mode="aspectFit" src="/static/icons/send.png" style="width: 28rpx;height: 28rpx"></image>
<view>单位{{'辆'}}</view> <text style="color: #0174F6">发送给客户</text>
<view>折扣{{'10'}}</view> </template>
<view>金额{{'280.00'}}</view>
</view>
<view class="projEditFoot">
<view class="block1">
<template v-if="!orderInfo.salesman || !orderInfo.salesman.id">
<image style="width: 28rpx;height: 28rpx" src="/pages-order/static/addIcon.png"></image>
<text class="addText">添加销售人员</text>
</template>
<template v-else>
<view class="editPeople">
<view class="editForm">
<text class="label">销售人员</text>
<text>{{ orderInfo.salesman.name }}</text>
</view>
<image style="width: 28rpx;height: 28rpx" src="/static/icons/edit.png" @click="editPeople('xs', orderInfo.salesman.id)"></image>
</view> </view>
</template> </template>
</view>
<view class="line"></view>
<view class="block2">
<template v-if="!orderInfo.constructor || !orderInfo.constructor.id">
<image style="width: 28rpx;height: 28rpx" src="/pages-order/static/addIcon.png"></image>
<text class="addText">添加施工人员</text>
</template>
</view> </view>
</view> </view>
</view> </template>
<template v-else>
<view v-for="item in selectedProj" :key="item.id" class="projEditItem">
<view class="projEditLine1">
<text>{{ item.projName }}</text>
<text class="projAmount">{{ item.amount }}</text>
</view>
<view class="projBaseInfo">
<view>规格{{ '轿车' }}</view>
<view>售价{{ '280' }}</view>
<view>数量{{ '1' }}</view>
<view>单位{{ '辆' }}</view>
<view>折扣{{ '10' }}</view>
<view>金额{{ '280.00' }}</view>
</view>
<view class="projEditFoot">
<view class="block1">
<template v-if="item.salesman && item.salesman.length > 0">
<view class="editPeople">
<view class="editForm">
<text class="label">销售人员</text>
<text v-if="item.salesman">{{
item.salesman && item.salesman.map(m => m.name).join(',')
}}
</text>
</view>
<image src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
@click="editPeople('xs', item)"></image>
</view>
</template>
<template v-else>
<image src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
<text class="addText" @click="editPeople('xs', item)">添加销售人员</text>
</template>
</view>
<view class="line"></view>
<view class="block2">
<template v-if="item.constructor && item.constructor.length > 0">
<view class="editPeople">
<view class="editForm">
<text class="label">施工人员</text>
<text v-if="item.constructor">{{ item.constructor.map(m => m.name).join(',') }}</text>
</view>
<image src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
@click="editPeople('sg', item)"></image>
</view>
</template>
<template v-else>
<image src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
<text class="addText" @click="editPeople('sg', item)">添加施工人员</text>
</template>
</view>
</view>
</view>
</template>
</view> </view>
</view> </view>
</view> </view>
<view class="foot">
<view class="submit">保存工单</view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import VNavigationBar from '@/components/VNavigationBar.vue' import VNavigationBar from '@/components/VNavigationBar.vue'
import request from "../../utils/request"; import {bus} from "@/utils/eventBus";
export default { export default {
components: { components: {
@ -195,21 +228,10 @@ export default {
}, },
data() { data() {
return { return {
// role: 'admin', role: 'admin',
role: 'yewu', // role: 'yewu',
orderId: '', orderId: '',
orderInfo: { orderInfo: {},
//
salesman: {
name: '魏书豪',
id: '11111'
},
//
constructor: {
name: '',
id: ''
}
},
carInfo: { carInfo: {
licenseNumber: '川A 184AO1', licenseNumber: '川A 184AO1',
carCategory: '一汽奥迪 2024款 A6L', carCategory: '一汽奥迪 2024款 A6L',
@ -240,7 +262,16 @@ export default {
isSend: true, isSend: true,
// //
examinePart: [], examinePart: [],
id: 'projId1' id: 'projId1',
//
salesman: [
{
name: '魏书豪',
id: '11111'
}
],
//
constructor: []
}, },
{ {
projName: '清洗内饰', projName: '清洗内饰',
@ -250,8 +281,23 @@ export default {
imageList: [{filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}], imageList: [{filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}],
isSend: false, isSend: false,
// //
examinePart: [], hasNoReviewPart: false,
id: 'projId1' id: 'projId2',
salesman: [],
constructor: []
},
{
projName: '清洗内饰',
amount: '280',
date: '2024-10-20 12:00',
desc: '车辆已到维修厂,工作人员正准备开始维修',
imageList: [],
isSend: false,
//
hasNoReviewPart: true,
id: 'projId3',
salesman: [],
constructor: []
} }
] ]
}; };
@ -262,8 +308,26 @@ export default {
} }
}, },
methods: { methods: {
editPeople(type, id) { editPeople(type, proj) {
bus.$off('choosePeople')
bus.$on('choosePeople', (data) => {
console.log('choosePeople', data)
console.log('type', type)
if (type === 'xs') {
proj.salesman = data
} else if (type === 'sg') {
proj.constructor = data
}
console.log('proj', proj)
})
uni.navigateTo({
url: `/pages-order/choosePeople/choosePeople?type=${type}`
})
},
showReviewList(projId) {
uni.navigateTo({
url: `/pages-order/reviewList/reviewList?projId=${projId}`
})
} }
} }
} }
@ -391,6 +455,7 @@ export default {
border-top: 8rpx solid #17DBB1; border-top: 8rpx solid #17DBB1;
background-color: #E3FFF9; background-color: #E3FFF9;
} }
.flagBody { .flagBody {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -398,6 +463,7 @@ export default {
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
.flagDesc { .flagDesc {
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
@ -406,6 +472,7 @@ export default {
} }
} }
.carDetail { .carDetail {
background-size: 100% 184rpx; background-size: 100% 184rpx;
padding: 0 30rpx; padding: 0 30rpx;
@ -523,6 +590,25 @@ export default {
} }
} }
.noReviewPart {
padding: 20rpx 36rpx 20rpx 10rpx;
display: flex;
align-items: center;
column-gap: 10rpx;
background: #FFF6E7;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-weight: 500;
font-size: 28rpx;
color: #E8A321;
.messageText {
flex: 1;
width: 0;
}
}
.projSend { .projSend {
display: flex; display: flex;
align-items: center; align-items: center;
@ -563,6 +649,7 @@ export default {
gap: 20rpx; gap: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.projEditFoot { .projEditFoot {
padding: 30rpx 0; padding: 30rpx 0;
border-top: 1px solid #DDDDDD; border-top: 1px solid #DDDDDD;
@ -570,6 +657,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
column-gap: 10rpx; column-gap: 10rpx;
.block1, .block2 { .block1, .block2 {
flex: 1; flex: 1;
width: 0; width: 0;
@ -597,6 +685,7 @@ export default {
row-gap: 10rpx; row-gap: 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
.label { .label {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
@ -604,6 +693,7 @@ export default {
} }
} }
} }
.line { .line {
height: 28rpx; height: 28rpx;
width: 2rpx; width: 2rpx;
@ -651,5 +741,26 @@ export default {
justify-content: center; justify-content: center;
column-gap: 6rpx; column-gap: 6rpx;
} }
.foot {
padding: 30rpx;
background-color: #fff;
.submit {
margin: 0 auto;
width: 510rpx;
height: 76rpx;
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #FFFFFF;
}
}
} }
</style> </style>

View File

@ -0,0 +1,231 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title="选择人员" title-color="#333"></VNavigationBar>
<view class="body">
<div class="userList">
<view v-for="item in list" :key="item.id" class="userItem">
<view class="info">
<text class="name">{{ item.name }}</text>
<text class="num">x{{ item.num }}</text>
</view>
<view class="info2">
<view class="info2-item">
<text class="label">配件分类</text>
<text class="value">{{ item.typeName }}</text>
</view>
<view class="info2-item">
<text class="label">当前库存</text>
<text class="value">{{ item.count }}</text>
</view>
</view>
</view>
</div>
<u-popup bgColor="#fff" :show="show" mode="bottom" round @close="close" @open="open">
<view class="pop">
<view class="popHeader">
<text class="btn1" @click="cancel">取消</text>
<text class="popHeaderText">
填写理由
</text>
<text class="btn2" @click="confirm">确定</text>
</view>
<view class="popContent">
<textarea style="padding: 36rpx 32rpx" placeholder="填写审批未通过理由" v-model="argument"></textarea>
</view>
</view>
</u-popup>
</view>
<view class="foot">
<view class="btn1" @click="noFun">
<image mode="aspectFit" src="/pages-order/static/dh.png" style="width: 32rpx;height: 32rpx"></image>
取消审批
</view>
<view class="line"></view>
<view class="btn2" @click="yesFun">
<image mode="aspectFit" src="/pages-order/static/tg.png" style="width: 32rpx;height: 32rpx"></image>
审批通过
</view>
</view>
</view>
</template>
<script>
import VNavigationBar from '@/components/VNavigationBar.vue'
export default {
components: {
VNavigationBar,
},
data() {
return {
list: [
{name: '7字小钩', id: 1, typeName: '机修', num: 3, count: 35},
{name: '反光贴', id: 2, typeName: '机修', num: 3, count: 35},
{name: '刹车油DOT4', id: 3, typeName: '喷漆', num: 3, count: 35},
],
show: false,
argument: ''
}
},
onLoad(data) {
console.log('data', data)
},
methods: {
close() {
this.show = false
},
open() {},
noFun() {
this.show = true
},
yesFun() {
},
confirm() {
this.show = false
uni.navigateBack()
},
cancel() {
this.show = false
this.argument = ''
}
}
}
</script>
<style lang="less" scoped>
.container {
height: 100%;
background-color: #F3F5F7;
display: flex;
flex-direction: column;
.body {
flex: 1;
height: 0;
overflow: auto;
padding: 20rpx 0;
.userList {
margin: 20rpx 32rpx 0;
background-color: #fff;
padding: 0 20rpx;
.userItem {
padding: 30rpx 0;
border-bottom: 1rpx solid #DDDDDD;
.info {
margin-bottom: 30rpx;
display: flex;
align-items: flex-end;
column-gap: 10rpx;
row-gap: 20rpx;
.name {
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.num {
font-size: 28rpx;
color: #0174F6;
}
}
.info2 {
display: flex;
.info2-item {
display: flex;
flex-direction: column;
flex: 1;
width: 0;
.label {
font-size: 28rpx;
color: #858BA0;
}
.value {
font-size: 28rpx;
color: #333333;
}
}
}
}
.userItem:last-child {
border-bottom: none;
}
}
}
.foot {
background-color: #fff;
padding: 30rpx;
display: flex;
align-items: center;
.btn1, .btn2 {
flex: 1;
width: 0;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
column-gap: 10rpx;
}
.btn1 {
color: #858BA0;
}
.btn2 {
color: #0174F6;
}
.line {
height: 32rpx;
width: 1rpx;
background-color: #ddd;
}
}
.pop {
//background-color: #fff;
height: 60vh;
}
.popHeader {
padding: 40rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #EEEEEE;
.btn2 {
color: #0174F6;
}
.btn1 {
color: #999999;
}
.popHeaderText {
flex: 1;
width: 0;
text-align: center;
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
}
.popContent {
}
}
</style>

BIN
pages-order/static/dh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
pages-order/static/tg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -83,10 +83,24 @@
}, },
{ {
"path": "orderDetail/orderDetail" "path": "orderDetail/orderDetail"
},
{
"path": "choosePeople/choosePeople",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "reviewList/reviewList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
} }
] ]
}, },
{ {
"root": "pages-home", "root": "pages-home",
"pages": [ "pages": [
{ {

View File

@ -1,93 +1,122 @@
<template> <template>
<view class="container"> <view class="container">
<VNavigationBarVue titleColor="#333" backgroundColor="#fff" title="我的资料"></VNavigationBarVue> <VNavigationBarVue backgroundColor="#fff" title="个人信息" titleColor="#333"></VNavigationBarVue>
<view class="body"> <view class="body">
<!-- <view class="formItem">-->
<!-- <text class="formLabel">头像</text>-->
<!-- <image class="avatar" src="../../static/images/avatar.png" mode="aspectFit"></image>-->
<!-- </view>-->
<view class="formItem">
<text class="formLabel">姓名</text>
<text class="formValue">{{ customInfo.cusName }}</text>
<!-- <image class="formBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>-->
</view>
<view class="formItem">
<text class="formLabel">手机号</text>
<text class="formValue">{{ customInfo.phoneNumber }}</text>
<!-- <image class="formBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>-->
</view>
<view class="formItem"> <view class="formItem">
<text class="formLabel">联系地址</text> <image class="formIcon" mode="aspectFit" src="/static/icons/userInfo_1.png"></image>
<text class="formValue">{{ customInfo.address }}</text> <text class="formLabel">头像</text>
<!-- <image class="formBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>--> <view class="formValue">
<image :src="customInfo.avatar || defaultAvatar" class="avatar" mode="aspectFill"
style="width: 64rpx;height: 64rpx"></image>
</view>
<u-icon color="#999" name="arrow-right" size="12"></u-icon>
</view> </view>
</view> <view class="formItem">
</view> <image class="formIcon" mode="aspectFit" src="/static/icons/userInfo_2.png"></image>
<text class="formLabel">账号昵称</text>
<text class="formValue">{{ customInfo.name }}</text>
<u-icon color="#999" name="arrow-right" size="12"></u-icon>
</view>
<view style="padding-bottom: 60rpx;border-bottom: 1px solid #ddd" class="formItem">
<image class="formIcon" mode="aspectFit" src="/static/icons/userInfo_3.png"></image>
<text class="formLabel">绑定电话</text>
<text class="formValue">{{ customInfo.phone }}</text>
<u-icon color="#999" name="arrow-right" size="12"></u-icon>
</view>
<view class="btn">
退出登录
</view>
</view>
</view>
</template> </template>
<script> <script>
import VNavigationBarVue from '../../components/VNavigationBar.vue'; import VNavigationBarVue from '../../components/VNavigationBar.vue';
export default {
components: { export default {
VNavigationBarVue components: {
}, VNavigationBarVue
data() { },
return { data() {
customInfo:{} return {
}; customInfo: {
}, phone: '157****4960',
onShow(data) { name: '千舟寻渡',
// avatar: ''
this.customInfo = JSON.parse(uni.getStorageSync('customerInfo')) },
}, defaultAvatar: require('@/static/icons/avatar.png')
} };
},
onShow(data) {
//
// this.customInfo = uni.getStorageSync('customerInfo') ? JSON.parse(uni.getStorageSync('customerInfo')) : {}
},
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.container { .container {
height: 100%; height: 100%;
background-color: #fff; background: #fff;
.body { .body {
border-top: 1px solid #ddd;
} padding: 20rpx 32rpx;
}
.formItem {
box-sizing: border-box; .formItem {
width: 686rpx; box-sizing: border-box;
margin: 0 auto; padding: 40rpx 0;
padding: 40rpx;
display: flex;
display: flex; align-items: center;
align-items: center; justify-content: space-between;
justify-content: space-between; column-gap: 20rpx;
column-gap: 20rpx; }
border-bottom: 1rpx solid #DDDDDD; .formIcon {
} width: 44rpx;
height: 44rpx;
.formLabel { }
font-size: 32rpx;
color: #333333; .formLabel {
} font-size: 32rpx;
color: #333333;
.formValue { }
flex: 1;
width: 0; .formValue {
text-align: right; flex: 1;
font-size: 32rpx; width: 0;
color: #999999; text-align: right;
} font-size: 32rpx;
color: #999999;
.formBtn { }
width: 24rpx;
height: 24rpx; .formBtn {
} width: 24rpx;
height: 24rpx;
.avatar { }
width: 108rpx;
height: 108rpx; .avatar {
} width: 108rpx;
} height: 108rpx;
</style> }
.btn {
width: 520rpx;
height: 80rpx;
border-radius: 40rpx 40rpx 40rpx 40rpx;
border: 1rpx solid #999999;
margin: 60rpx auto;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #999999;
}
}
</style>

BIN
static/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

BIN
static/icons/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
static/icons/more.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

BIN
static/icons/userInfo_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/icons/userInfo_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/icons/userInfo_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B