Commit af1fd72c authored by 石盼盼's avatar 石盼盼

接口对接

parent ff9d7ae0
{
"name": "fhxm",
"name": "repair",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
......
{
"name": "fhxm",
"name": "repair",
"version": "0.1.0",
"private": true,
"scripts": {
......
<template>
<div id="app">
<keep-alive>
<keep-alive v-if="$route.meta.keepAlive">
<router-view />
</keep-alive>
<router-view v-else />
<div class="goBack-btn flex-h flex-hc flex-align-center" v-if="!$route.meta.hideBack" >
<i class="iconfont icon-icon_fanhuishouye" @click="gohome"></i>
</div>
......
......@@ -8,10 +8,10 @@ const baseUrl = '/api'
// }
// todo: url
// const httpUrl = 'https://fhxmtest.xueyoubangedu.com' // 测试接口
// const h5Url = 'http://fhxmtest.h5.xueyoubangedu.com' // 测试h5线上地址
const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const h5Url = 'https://repair.zeruiedu.com' // 测试h5线上地址
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
export default {
// url地址
......@@ -21,11 +21,18 @@ export default {
WINDOWHREF_ASK: `${httpUrl}/api/scm/login?callBack=${h5Url}&scopes=snsapi_userinfo&type=1`,
// 登录相关
SENDCODE: baseUrl + '/scm/send', // 发送验证码
BINDLOGIN: baseUrl + '/scm/bind/login', // 绑定后台账号
BINDLOGINTWO: baseUrl + '/scm/bind/login/two', // 绑定后台账号
REFRESHTOKEN: baseUrl + '/scm/change/token', // 更新token
LOGOUT: baseUrl + '/scm/logout', // 更新token
SENDCODE: baseUrl + '/worker/send', // 发送验证码
BINDLOGIN: baseUrl + '/worker/bind/login', // 手机号验证码登录绑定微信
USERINFO: baseUrl + '/worker/user/info', // 获取用户信息
REPAIR_LIST: baseUrl + '/worker/repair/list', // 工人/审核员端报修单列表
ORDER_STATUS: baseUrl + '/worker/repair/order/status', // 获取订单状态
REPAIR_BEGIN: baseUrl + '/worker/repair/begin', // 开始维修接口
REPAIR_ORDER_DETAIL: baseUrl + '/worker/repair/order/detail', // 报修单详情
REPAIR_ORDER: baseUrl + '/worker/material/order', // 发起收费生成耗材单
MATERIAL_REMARK: baseUrl + '/worker/material/remark', // 备注耗材
// BINDLOGINTWO: baseUrl + '/scm/bind/login/two', // 绑定后台账号
// REFRESHTOKEN: baseUrl + '/scm/change/token', // 更新token
// LOGOUT: baseUrl + '/scm/logout', // 更新token
// 首页
WARNGOODS: baseUrl + '/scm/warn_goods/today', // 今日预警
......
......@@ -34,34 +34,35 @@ service.interceptors.request.use(
service.interceptors.response.use(
response => {
const { data, config } = response
return data
// console.log('添加响应拦截器', response)
if (data.code === 400) {
console.log('===== token过期 =====')
const promisefresh = new Promise(function (resolve, reject) {
updateToken(() => {
config.headers.token = window.localStorage.getItem('token')
axios.request(response.config).then(res => {
const curData = res.data
if (curData.code === 200) {
resolve(curData)
} else {
// window.localStorage.removeItem('token')
// window.localStorage.removeItem('status')
resolve(curData)
}
})
}, (err) => {
resolve(err)
window.localStorage.clear()
Toast('身份失效,请重新登录')
window.document.location = selfApi.WINDOWHREF_LOGIN // url-
console.log('错误--------', err)
})
})
return promisefresh
} else {
return data
}
// if (data.code === 400) {
// console.log('===== token过期 =====')
// const promisefresh = new Promise(function (resolve, reject) {
// updateToken(() => {
// config.headers.token = window.localStorage.getItem('token')
// axios.request(response.config).then(res => {
// const curData = res.data
// if (curData.code === 200) {
// resolve(curData)
// } else {
// // window.localStorage.removeItem('token')
// // window.localStorage.removeItem('status')
// resolve(curData)
// }
// })
// }, (err) => {
// resolve(err)
// window.localStorage.clear()
// Toast('身份失效,请重新登录')
// window.document.location = selfApi.WINDOWHREF_LOGIN // url-
// console.log('错误--------', err)
// })
// })
// return promisefresh
// } else {
// return data
// }
},
error => {
let info = {}
......
......@@ -22,7 +22,7 @@ export function updateToken (cb, errcb) {
typeof cb === 'function' && cb()
} else {
console.log('token换取失败-------', curdata)
typeof errcb === 'function' && errcb(curdata)
// typeof errcb === 'function' && errcb(curdata)
}
}
})
......
import axios from './axios'
import { Toast, Dialog } from 'vant'
import {
Toast,
Dialog
} from 'vant'
import router from '../router/index'
import selfApi from '@/api/apiList'
const instance = axios()
export default {
get (url, params, headers, toast = true) {
get(url, params, headers, toast = true) {
const options = {}
options.headers = {
token: window.localStorage.getItem('token'),
type: 1
// token: window.localStorage.getItem('token'),
token: 'sys'
// type: 1
}
if (params) {
......@@ -19,7 +23,10 @@ export default {
}
if (headers) {
options.headers = { ...options.headers, ...headers }
options.headers = {
...options.headers,
...headers
}
}
Toast.allowMultiple()
let tipsToast = ''
......@@ -33,7 +40,11 @@ export default {
}
return new Promise((resolve, reject) => {
instance.get(url, options).then(res => {
const { code, data, message } = res
const {
data,
message
} = res
const code = res.meta.code
// console.log(code, typeof code, '11111111111111')
toast && tipsToast.clear()
if (code === 200) {
......@@ -53,19 +64,23 @@ export default {
})
},
post (url, data, headers, params, toast = true) {
post(url, data, headers, params, toast = true) {
const options = {}
options.headers = {
token: window.localStorage.getItem('token'),
type: 1
// token: window.localStorage.getItem('token'),
token: 'sys'
// type: 1
}
if (params) {
options.params = params
}
if (headers) {
options.headers = { ...options.headers, ...headers }
options.headers = {
...options.headers,
...headers
}
}
Toast.allowMultiple()
let tipsToast = ''
......@@ -79,7 +94,11 @@ export default {
}
return new Promise((resolve, reject) => {
instance.post(url, data, options).then(res => {
const { code, data, message } = res
const {
data,
message
} = res
const code = res.meta.code
toast && tipsToast.clear()
if (code === 200) {
resolve(data)
......@@ -98,15 +117,22 @@ export default {
})
},
put (url, params, headers) {
put(url, params, headers) {
const options = {}
if (headers) {
options.headers = { ...options.headers, ...headers }
options.headers = {
...options.headers,
...headers
}
}
return new Promise((resolve, reject) => {
instance.put(url, params, options).then(res => {
const { code, data, message } = res
const {
code,
data,
message
} = res
if (code === 200) {
resolve(data)
} else if (code !== 400) {
......@@ -119,14 +145,17 @@ export default {
})
},
delete (url, params, headers) {
delete(url, params, headers) {
const options = {}
if (params) {
options.params = params
}
if (headers) {
options.headers = { ...options.headers, ...headers }
options.headers = {
...options.headers,
...headers
}
}
return instance.delete(url, options)
}
......
......@@ -7,7 +7,7 @@ import myApi from './api/apiList'
import myAxios from './api/index'
import Vant from 'vant'
import 'vant/lib/index.css'
// import vConsole from '@/plugins/vconsole.js'
import vConsole from '@/plugins/vconsole.js'
import myCondition from '@/components/common/condition.vue'
import listTips from '@/components/common/listtips.vue'
// Vue.component('chooseDate', chooseDate)
......@@ -15,7 +15,7 @@ import listTips from '@/components/common/listtips.vue'
// import chooseDate from '@/components/common/chooseDate.vue'
Vue.component('myCondition', myCondition)
Vue.component('listTips', listTips)
// Vue.use(vConsole)
Vue.use(vConsole)
Vue.config.productionTip = false
......
......@@ -5,88 +5,94 @@ import Home from '../views/tabbar/Home.vue'
Vue.use(VueRouter)
const routes = [{
path: '/',
name: 'home',
meta: {
title: '首页',
hideBack: true
const routes = [
{
path: '/home',
name: 'home',
meta: {
title: '工单',
hideBack: true,
keepAlive: true
},
component: Home
},
component: Home
},
{
path: '/my',
name: 'my',
meta: {
title: '我的',
hideBack: true
{
path: '/',
redirect: '/login'
},
component: () => import('../views/tabbar/my.vue')
},
{
path: '/mine',
name: 'mine',
meta: {
title: '我的',
hideBack: true
{
path: '/my',
name: 'my',
meta: {
title: '我的',
hideBack: true
},
component: () => import('../views/tabbar/my.vue')
},
component: () => import('../views/tabbar/mine.vue')
},
{
path: '/modifyPhone',
name: 'mesmodifyPhonesage',
meta: {
title: '修改手机号',
hideBack: true
{
path: '/mine',
name: 'mine',
meta: {
title: '我的',
hideBack: true
},
component: () => import('../views/tabbar/mine.vue')
},
component: () => import('../views/tabbar/modifyPhone.vue')
},
// 登录
{
path: '/login',
name: 'login',
meta: {
title: '机构登录',
hideBack: true
{
path: '/modifyPhone',
name: 'mesmodifyPhonesage',
meta: {
title: '修改手机号',
hideBack: true
},
component: () => import('../views/tabbar/modifyPhone.vue')
},
component: () => import('@/views/login/login.vue')
},
{
path: '/againLogin',
name: 'againLogin',
meta: {
title: '机构登录',
hideBack: true
// 登录
{
path: '/login',
name: 'login',
meta: {
title: '登录',
hideBack: true
},
component: () => import('@/views/login/login.vue')
},
component: () => import('@/views/login/againlogin.vue')
},
// 个人中心
{
path: '/charge',
name: 'charge',
meta: {
title: '发起收费',
hideBack: true
{
path: '/againLogin',
name: 'againLogin',
meta: {
title: '登录',
hideBack: true
},
component: () => import('@/views/login/againlogin.vue')
},
component: () => import('@/views/my/charge.vue')
},
{
path: '/relationUsers',
name: 'relationUsers',
meta: {
title: '我的'
// 个人中心
{
path: '/charge',
name: 'charge',
meta: {
title: '发起收费',
hideBack: true
},
component: () => import('@/views/my/charge.vue')
},
component: () => import('@/views/my/relation-users.vue')
},
{
path: '/addRelation',
name: 'addRelation',
meta: {
title: '绑定机构'
{
path: '/relationUsers',
name: 'relationUsers',
meta: {
title: '我的'
},
component: () => import('@/views/my/relation-users.vue')
},
component: () => import('@/views/my/add-relation.vue')
}
{
path: '/addRelation',
name: 'addRelation',
meta: {
title: '绑定机构'
},
component: () => import('@/views/my/add-relation.vue')
}
]
const router = new VueRouter({
......
......@@ -49,6 +49,7 @@ export default {
return false
},
getCode () {
console.log(111);
if (this.isSending) return
if (this.tel.length !== 11) {
this.$toast('请正确输入手机号码')
......@@ -84,8 +85,7 @@ export default {
// const _this = this
this.$http.post(this.$myApi.BINDLOGIN, curParams)
.then(res => {
window.localStorage.removeItem('againLogin')
window.document.location = this.$myApi.WINDOWHREF_ASK // url-
this.$router.replace('/home')
})
.catch(() => {})
},
......
<template>
<div class="cont">
<div class="cont" v-if="order">
<div class="top">
<div class="item flex-h flex-vc">
<div class="title">维修类目:</div>
<div class="title">供水</div>
<div class="title">{{order.repair_type.type_name}}</div>
</div>
<div class="item-title">问题描述:</div>
<div class="item-desc que-desc">重点水房类-水房的阀门关不紧</div>
<div class="item-desc que-desc">{{order.description}}</div>
<div class="item flex-h flex-vc">
<div class="item-title">服务地址:</div>
<div class="item-desc">公寓区-16号楼-东侧水房</div>
<div
class="item-desc"
>{{order.region.region_name}}-{{order.room.room_name}}-{{order.address}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">客户姓名:</div>
<div class="item-desc">张三三</div>
<div class="item-desc">{{order.realname}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div>
<div class="item-desc phone">186787867463</div>
<div class="item-desc phone">{{order.telephone}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">提交时间:</div>
......@@ -25,9 +27,8 @@
</div>
<div class="item flex-h flex-vc">
<div class="item-title">图片详情:</div>
<div class="img flex-h">
<img src="https://img01.yzcdn.cn/vant/cat.jpeg" alt />
<img src="https://img01.yzcdn.cn/vant/cat.jpeg" alt />
<div class="img flex-h" v-for="(child, index) in order.image" :key="index">
<img :src="child.url" alt />
</div>
</div>
</div>
......@@ -116,9 +117,33 @@ export default {
hc_name: '请选择',
hcPicker: false,
hcNum: '',
repair_order_id: '',
order: '',
}
},
},
created(){
console.log('change页面')
this.repair_order_id = this.$route.query.id
console.log(this.$route.query.id,'接收的id');
this.getDetail()
},
// mounted(){
// this.getDetail()
// },
methods:{
getDetail(){
let repair_order_id = this.repair_order_id.toString()
const curParams = {
repair_order_id: this.repair_order_id
}
// const _this = this
this.$http.get(this.$myApi.REPAIR_ORDER_DETAIL, curParams)
.then(res => {
this.order = res.order
console.log(this.order,123456);
})
.catch(() => {})
},
showZl(index){
this.addList[index].zlSelect = true
},
......
......@@ -4,81 +4,91 @@
<div class="point"></div>
<div class="status">工作中</div>
</div>
<div class="menu flex-h flex-hb">
<div class="hc_total">共3个工单</div>
<div class="options" @click="show">
{{currentName}}
<div class="option-box" v-show="xianshi">
<div
class="option-item"
v-for="item in optionList"
:key="item.time_type"
:value="item.name"
@click="changeItem(item.time_type,item.name)"
>{{item.name}}</div>
<van-pull-refresh v-model="isloading" @refresh="onRefresh">
<div class="menu flex-h flex-hb">
<div class="hc_total">{{count}}个工单</div>
<div class="options" @click="show">
{{currentName}}
<div class="option-box" v-show="xianshi">
<div
class="option-item"
v-for="item in optionList"
:key="item.time_type"
:value="item.name"
@click="changeItem(item.time_type,item.name)"
>{{item.name}}</div>
</div>
</div>
</div>
</div>
<div class="order-item">
<div class="title">已派工</div>
<div class="item flex-h flex-vc">
<div class="item-title">预约时间:</div>
<div class="item-desc">2021-6-20 10:00-12:00</div>
</div>
<div class="item-title">问题描述:</div>
<div class="item-desc que-desc">重点水房类-水房的阀门关不紧</div>
<div class="item flex-h flex-vc">
<div class="item-title">服务地址:</div>
<div class="item-desc">公寓区-16号楼-东侧水房</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">客户姓名:</div>
<div class="item-desc">张三三</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div>
<div class="item-desc phone">186787867463</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">提交时间:</div>
<div class="item-desc">2021-06-17 09:28:43</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">图片详情:</div>
<div class="img flex-h">
<img src="https://img01.yzcdn.cn/vant/cat.jpeg" alt />
<img src="https://img01.yzcdn.cn/vant/cat.jpeg" alt />
<div class="order-item" v-for="(item, index) in list" :key="item.id">
<div class="title">{{item.order_status_display }}</div>
<div class="item flex-h flex-vc">
<div class="item-title">预约时间:</div>
<div
class="item-desc"
>{{item.appointment_date}} {{item.appointment_time.start_time}}-{{item.appointment_time.end_time}}</div>
</div>
</div>
<div class="line"></div>
<div class="item flex-h flex-vc">
<div class="item-title">派工对象:</div>
<div class="item-desc">王振海</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div>
<div class="item-desc">13180043554</div>
</div>
<div class="line"></div>
<div class="material">
<div class="item-title">已支付耗材</div>
<div class="ma-item flex-h flex-hb">
<div class="one">洁具</div>
<div class="one">水龙头*1</div>
<div class="one">¥16</div>
<div class="item-title">问题描述:</div>
<div class="item-desc que-desc">{{item.description}}</div>
<div class="item flex-h flex-vc">
<div class="item-title">服务地址:</div>
<div
class="item-desc"
>{{item.region.region_name}}-{{item.room.room_name}}-{{item.address}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">客户姓名:</div>
<div class="item-desc">{{item.realname}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div>
<div class="item-desc phone">{{item.telephone}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">提交时间:</div>
<div class="item-desc">{{item.created_at}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">图片详情:</div>
<div class="img flex-h" v-for="(child, index) in item.image" :key="index">
<img :src="child.url" alt />
</div>
</div>
<div class="line"></div>
<div class="item flex-h flex-vc">
<div class="item-title">派工对象:</div>
<div class="item-desc">{{item.worker.name}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div>
<div class="item-desc">{{item.worker.phone}}</div>
</div>
<div class="material" v-if="item.no_pay_order != null">
<div class="item-title">已支付耗材</div>
<div class="ma-item flex-h flex-hb">
<div class="one">洁具</div>
<div class="one">水龙头*1</div>
<div class="one">¥16</div>
</div>
</div>
<div class="line"></div>
<div class="btn flex-h flex-hr">
<div v-if="item.is_can_remark_material==1" class="btn-item bz-btn" @click="bz_click(item.id)">备注耗材</div>
<div v-if="item.is_can_confirm_complete==1" class="btn-item qr-btn">确认完成</div>
<div v-if="item.is_can_initiate_charge==1" class="btn-item sf-btn" @click="tz_charge(item.id)">发起收费</div>
<div v-if="item.is_can_initiate_transfer_order==1" class="btn-item" @click="zd_click">发起转单</div>
<div
v-if="item.is_can_begin_repair==1"
class="btn-item"
@click="starRepir(item.id,index)"
>开始维修</div>
<div v-if="item.is_can_see_appraisal==1" class="btn-item">查看评价</div>
<div v-if="item.is_can_see_material==1" class="btn-item sf-btn" @click="look_click">查看耗材</div>
</div>
</div>
<div class="line"></div>
<div class="btn flex-h flex-hr">
<div class="btn-item bz-btn" @click="bz_click">备注耗材</div>
<!-- <div class="btn-item qr-btn">确认完成</div> -->
<div class="btn-item sf-btn" @click="tz_charge">发起收费</div>
<div class="btn-item" @click="zd_click">发起转单</div>
<!-- <div class="btn-item">开始维修</div> -->
<!-- <div class="btn-item">查看评价</div> -->
<div class="btn-item sf-btn" @click="look_click">查看耗材</div>
</div>
</div>
<!-- 空数据 -->
<van-empty class="custom-image" description="暂无工单哦~" v-if="!list.length && !more" />
</van-pull-refresh>
<div class="blank"></div>
<!-- 发起转单弹窗 -->
<van-popup v-model="zdShow" close-icon="close">
......@@ -97,7 +107,7 @@
<input class="input" v-model="item.sl" type="text" placeholder="请输入耗材个数" />
</div>
<div class="math-btn flex-h flex-vc flex-hb">
<div class="del-btn" @click="delMeth">-删除</div>
<div v-if="addList.length>1" class="del-btn" @click="delMeth">-删除</div>
<div class="add-btn" @click="addMeth">+新增</div>
</div>
<div class="btnItem flex-h">
......@@ -135,6 +145,8 @@ export default {
},
data(){
return{
count: '',
imgList: [],
addList:[
{
hc:'',
......@@ -142,7 +154,7 @@ export default {
}
],
xianshi: false,
currentName: '今日',
currentName: '本月',
optionList: [{
time_type:'1',
name: '今日'
......@@ -156,14 +168,85 @@ export default {
time_type:'4',
name: '自定义'
}],
activeStatus: '',
zdShow: false,//发起转单弹窗
hcShow: false,//耗材弹窗
lookShow: false,//查看耗材弹窗
activeStatus: 3,
zdShow: false,//发起转单弹窗
hcShow: false,//耗材弹窗
lookShow: false,//查看耗材弹窗
list: [],
isloading: false,
page: 1,
more: true,
locked: false,
limit: 10,
status: {},
}
},
},
created(){
this.getList()
// this.getStatus()
},
methods: {
// 初始化
initData () {
this.list = []
this.page = 1
this.more = true
this.locked = false
this.isloading = false
},
getStatus(){
const curParams = {}
this.$http.get(this.$myApi.ORDER_STATUS)
.then(res => {
console.log(res);
this.status = res
})
.catch(() => {})
},
getList () {
if (this.more && !this.isloading) {
this.isloading = true
const curParams = {
time_type: this.activeStatus,
page: this.page,
limit: this.limit
}
this.$http.get(this.$myApi.REPAIR_LIST, curParams)
.then(data => {
this.list = this.page === 1 ? data.list : this.list.concat(data.list)
this.page = data.page
this.more = data.more
this.locked = false
this.isloading = false,
this.count = data.count
console.log(data,1111);
})
.catch(() => {
this.locked = false
this.isloading = false
})
}
},
onRefresh () {
this.initData()
if (!this.locked) {
this.locked = true
this.getList()
}
},
starRepir(id,index){
console.log(id);
let repair_order_id = id.toString()
const curParams = {
repair_order_id: repair_order_id
}
// const _this = this
this.$http.post(this.$myApi.REPAIR_BEGIN, curParams)
.then(res => {
})
.catch(() => {})
},
addMeth(){
this.addList.push({
hc:'',
......@@ -187,14 +270,15 @@ export default {
}
this.activeStatus = time_type;
this.currentName = name
// setTimeout(() => {
// this.getList()
// }, 0);
setTimeout(() => {
this.initData()
this.getList()
}, 0);
},
//备注耗材弹窗
bz_click(){
bz_click(id){
console.log(id,'nfnsohnfgvdosrgvf');
this.hcShow = true
console.log('111');
},
//转单弹窗
zd_click(){
......@@ -215,16 +299,19 @@ export default {
console.log(111)
},
//备注提交
bz_submit(){
bz_submit(id){
console.log(id,1111);
console.log('六点十分',this.addList);
this.hcShow = false
this.lookShow = false
console.log('111');
},
//发起收费
tz_charge(){
tz_charge(id){
console.log(id,'jaeofne');
this.$router.push({
name: 'charge'
path: '/charge',
query: {id}
})
},
},
......@@ -235,11 +322,12 @@ export default {
.cont {
min-height: 100vh;
background: #fff;
padding: 0.4rem 0.3rem;
padding: 0.4rem 0rem;
}
.top {
height: 0.36rem;
margin-bottom: 0.38rem;
margin-left: 0.3rem;
}
.top .point {
width: 0.1rem;
......@@ -268,9 +356,10 @@ export default {
line-height: 0.58rem;
text-align: center;
position: relative;
margin-right: 0.3rem;
}
.menu .options .option-box {
width: 1.76rem;
width: 1.7rem;
// height: 2rem;
background: #fff;
border: 1px solid #0054ff;
......@@ -287,6 +376,7 @@ export default {
margin-top: 0.4rem;
padding: 0.4rem 0.3rem;
margin-bottom: 0.2rem;
margin-left: 0.3rem;
}
.title {
color: #0054ff;
......@@ -323,8 +413,8 @@ export default {
margin-left: 0.16rem;
margin-right: 0.16rem;
}
.list-item{
margin-bottom: 0.4rem;
.list-item {
margin-bottom: 0.4rem;
}
.line {
width: 6.28rem;
......
<template>
<div class="cont">
<div class="cont" v-if="user">
<div class="top"></div>
<div class="info-item">
<div class="photo">
<img src="@assets/images/my/touxiang.png" alt="">
<img src="@assets/images/my/touxiang.png" alt />
</div>
<div class="btn">工作中</div>
<div class="name">张初一</div>
<div class="group">能源保障组</div>
<div class="name">{{user.name}}</div>
<div class="group">{{user.department.name}}</div>
<div class="tel flex-h">
<div class="telNumber">13180043557</div>
<img src="@assets/images/my/bianji.png" alt="">
<div class="telNumber">{{user.phone}}</div>
<img src="@assets/images/my/bianji.png" alt />
</div>
</div>
<!-- tabbar -->
......@@ -25,6 +25,23 @@ export default {
components: {
myTabbar
},
data(){
return{
user: '',
}
},
created() {
this.getUserInfo()
},
methods: {
getUserInfo () {
this.$http.get(this.$myApi.USERINFO)
.then(res => {
this.user = res
})
.catch(() => {})
},
}
}
</script>
......@@ -69,29 +86,29 @@ export default {
line-height: 0.48rem;
margin: 1.13rem auto 0.59rem;
}
.name{
color: #000000;
font-size: 0.38rem;
margin-bottom: 0.27rem;
font-weight: bold;
.name {
color: #000000;
font-size: 0.38rem;
margin-bottom: 0.27rem;
font-weight: bold;
}
.group{
color: #000000;
font-size: 0.3rem;
margin-bottom: 0.48rem;
.group {
color: #000000;
font-size: 0.3rem;
margin-bottom: 0.48rem;
}
.tel{
width: 2rem;
height: 0.28rem;
margin: 0 auto;
.tel {
width: 2rem;
height: 0.28rem;
margin: 0 auto;
}
.tel .telNumber{
color: #000000;
font-size: 0.3rem;
margin-right: 0.2rem;
.tel .telNumber {
color: #000000;
font-size: 0.3rem;
margin-right: 0.2rem;
}
.tel img{
width: 0.28rem;
height: 0.28rem;
.tel img {
width: 0.28rem;
height: 0.28rem;
}
</style>
\ No newline at end of file
......@@ -61,8 +61,8 @@ module.exports = {
proxy: {
'/api/': {
// todo: url
// target: 'https://fhxmtest.xueyoubangedu.com/api', // 测试
target: 'https://fenghexm.xueyoubangedu.com/api', // 正式
target: 'https://repairtest.zeruiedu.com/api', // 测试
// target: 'https://repair.zeruiedu.com/api', // 正式
autoRewrite: true,
changeOrigin: true,
ws: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment