Commit 48cf7b31 authored by 郭欢's avatar 郭欢

Merge branch 'gh_test' into 'master'

Gh test

See merge request !42
parents ca7a15af 0d033b16
...@@ -29,5 +29,26 @@ ...@@ -29,5 +29,26 @@
} }
window.onresize = resizeRoot; window.onresize = resizeRoot;
})(window); })(window);
// 强制禁止用户修改微信客户端的字体大小
(function() {
function handleFontSize() {
// 设置网页字体为默认大小
WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
// 重写设置网页字体大小的事件
WeixinJSBridge.on('menu:setfont', function() {
WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
});
}
if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
handleFontSize();
} else {
if (document.addEventListener) {
document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", handleFontSize);
document.attachEvent("onWeixinJSBridgeReady", handleFontSize); }
}
})();
</script> </script>
</html> </html>
\ No newline at end of file
<template> <template>
<div id="app"> <div id="app">
<keep-alive v-if="$route.meta.keepAlive"> <keep-alive >
<router-view /> <router-view v-if="$route.meta.keepAlive" />
</keep-alive> </keep-alive>
<router-view v-else /> <router-view v-if="!$route.meta.keepAlive" />
<div class="goBack-btn flex-h flex-hc flex-align-center" v-if="!$route.meta.hideBack" > <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> <i class="iconfont icon-icon_fanhuishouye" @click="gohome"></i>
</div> </div>
......
...@@ -10,8 +10,8 @@ const baseUrl = '/api' ...@@ -10,8 +10,8 @@ const baseUrl = '/api'
// todo: url // todo: url
// const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口 // const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const httpUrl = 'https://repair.zeruiedu.com' // 正式接口 const httpUrl = 'https://repair.zeruiedu.com' // 正式接口
const h5Url = 'http://localhost:8080' // 测试h5线上地址 // const h5Url = 'http://localhost:8080' // 测试h5线上地址
// const h5Url = 'http://repair.h5.zeruiedu.com' // 测试h5线上地址 const h5Url = 'http://repair.h5.zeruiedu.com' // 测试h5线上地址
window.localStorage.setItem('httpUrl', httpUrl) window.localStorage.setItem('httpUrl', httpUrl)
window.localStorage.setItem('h5Url', h5Url) window.localStorage.setItem('h5Url', h5Url)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口 // const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
......
...@@ -53,7 +53,7 @@ service.interceptors.response.use( ...@@ -53,7 +53,7 @@ service.interceptors.response.use(
}, (err) => { }, (err) => {
resolve(err) resolve(err)
window.localStorage.clear() window.localStorage.clear()
Toast('身份失效,请重新登录') Toast('身份失效,请重新登录11111')
window.document.location = selfApi.WINDOWHREF_LOGIN // url- window.document.location = selfApi.WINDOWHREF_LOGIN // url-
console.log('错误--------', err) console.log('错误--------', err)
}) })
......
var wx = require('weixin-js-sdk')
import axios from 'axios' import axios from 'axios'
import apiList from './apiList' import apiList from './apiList'
import myAxios from './index' import myAxios from './index'
import { import {
Toast Toast
} from 'vant' } from 'vant'
var wx = require('weixin-js-sdk')
// 微信分享方法 // 微信分享方法
const share = (param) => { const share = (param) => {
Toast.loading({ Toast.loading({
message: "加载中...", message: '加载中...',
duration: 1000, //持续展示 toast duration: 1000 // 持续展示 toast
}) })
const successCall = (res) => { const successCall = (res) => {
console.log('res', res) console.log('res', res)
Toast.clear() Toast.clear()
let result = res.conf const result = res.conf
// let result = res.data // let result = res.data
// let { // let {
// wxConfig, // wxConfig,
...@@ -68,7 +68,7 @@ const share = (param) => { ...@@ -68,7 +68,7 @@ const share = (param) => {
menuList: hideMenuItems menuList: hideMenuItems
}) })
wx.showMenuItems({ wx.showMenuItems({
menuList: ["menuItem:share:appMessage", "menuItem:share:timeline"] // 要显示的菜单项,所有menu项见附录3 menuList: ['menuItem:share:appMessage', 'menuItem:share:timeline'] // 要显示的菜单项,所有menu项见附录3
}) })
}) })
} }
...@@ -81,7 +81,7 @@ const share = (param) => { ...@@ -81,7 +81,7 @@ const share = (param) => {
successCall(res) successCall(res)
Toast.clear() Toast.clear()
}) })
.catch(() => {}) .catch(() => { })
} }
export { export {
......
// export const SELFSHOP = 'self_shop' export const REFRESH_LIST = 'REFRESH_LIST'
/** /**
* 设置缓存 getLocalStorage * 设置缓存 getLocalStorage
......
@charset "UTF-8"; @charset "UTF-8";
/* iOS禁止微信调整字体大小 */
body {
-webkit-text-size-adjust: 100% !important;
text-size-adjust: 100% !important;
-moz-text-size-adjust: 100% !important;
}
html, body, div, span, applet, object, iframe, h1, h2, h3, html, body, div, span, applet, object, iframe, h1, h2, h3,
h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address,
big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
width: 1.5rem; width: 1.5rem;
height: 100%; height: 100%;
text-align: center; text-align: center;
font-size: 0.26rem; font-size: 0.3rem;
color: #333333; color: #333333;
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
} }
.tabbar-item img { .tabbar-item img {
width: 0.44rem; width: 0.56rem;
height: 0.44rem; height: 0.56rem;
margin: 0 auto; margin: 0 auto;
} }
\ No newline at end of file
...@@ -197,3 +197,7 @@ $text-gray: #989794; ...@@ -197,3 +197,7 @@ $text-gray: #989794;
.self-cont-sticky .van-sticky.van-sticky--fixed { .self-cont-sticky .van-sticky.van-sticky--fixed {
width: 1rem !important; width: 1rem !important;
} }
.specile-text {
color: #ff0000 !important;
}
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
} }
.title-cont { .title-cont {
font-size: .32rem; font-size: 0.4rem;
} }
} }
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
.top .status { .top .status {
color: #0054ff; color: #0054ff;
font-size: 0.36rem; font-size: 0.38rem;
font-weight: bold; font-weight: bold;
} }
.menu .hc_total { .menu .hc_total {
color: #727272; color: #727272;
font-size: 0.28rem; font-size: 0.32rem;
} }
.menu .options { .menu .options {
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
border: 1px solid #0054ff; border: 1px solid #0054ff;
border-radius: 0.12rem; border-radius: 0.12rem;
color: #0054ff; color: #0054ff;
font-size: 0.28rem; font-size: 0.34rem;
line-height: 0.58rem; line-height: 0.58rem;
text-align: center; text-align: center;
position: relative; position: relative;
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
text-align: center; text-align: center;
line-height: 0.58rem; line-height: 0.58rem;
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.32rem;
} }
.date .end { .date .end {
width: 3.08rem; width: 3.08rem;
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
text-align: center; text-align: center;
line-height: 0.58rem; line-height: 0.58rem;
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.32rem;
} }
.date .blue{ .date .blue{
width: 0.31rem; width: 0.31rem;
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
text-align: center; text-align: center;
line-height: 0.7rem; line-height: 0.7rem;
color: #000000; color: #000000;
font-size: 0.24rem; font-size: 0.32rem;
// margin-right: 0.2rem; // margin-right: 0.2rem;
} }
.allBtn .sureBtn { .allBtn .sureBtn {
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
text-align: center; text-align: center;
line-height: 0.7rem; line-height: 0.7rem;
color: #fff; color: #fff;
font-size: 0.24rem; font-size: 0.32rem;
margin-left: 0.2rem; margin-left: 0.2rem;
} }
.cancel_cont{ .cancel_cont{
...@@ -141,12 +141,12 @@ ...@@ -141,12 +141,12 @@
border-radius: 0.12rem; border-radius: 0.12rem;
margin: 0.4rem auto 0.2rem; margin: 0.4rem auto 0.2rem;
padding: 0.4rem 0.3rem; padding: 0.4rem 0.3rem;
font-size: 0.3rem; font-size: 0.4rem;
} }
.title { .title {
color: #0054ff; color: #0054ff;
font-size: 0.32rem; // font-size: 0.4rem;
font-weight: bold; font-weight: bold;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
} }
.btn { .btn {
margin-top: 0.2rem; margin-top: 0.5rem;
} }
.btn-item { .btn-item {
...@@ -236,8 +236,9 @@ ...@@ -236,8 +236,9 @@
text-align: center; text-align: center;
line-height: 0.7rem; line-height: 0.7rem;
color: #fff; color: #fff;
font-size: 0.27rem; font-size: 0.34rem;
margin-left: 0.2rem; margin-left: 0.2rem;
margin-bottom: .1rem;
} }
.sf-btn { .sf-btn {
...@@ -263,7 +264,7 @@ ...@@ -263,7 +264,7 @@
.pop_title { .pop_title {
color: #000000; color: #000000;
font-size: 0.36rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
margin-bottom: 0.4rem; margin-bottom: 0.4rem;
} }
...@@ -362,7 +363,7 @@ ...@@ -362,7 +363,7 @@
} }
.tc-box .tc-title{ .tc-box .tc-title{
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.32rem;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
...@@ -376,7 +377,7 @@ ...@@ -376,7 +377,7 @@
background: #f2f2f2; background: #f2f2f2;
line-height: 0.56rem; line-height: 0.56rem;
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.32rem;
padding-left: 0.3rem; padding-left: 0.3rem;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
} }
...@@ -392,7 +393,7 @@ ...@@ -392,7 +393,7 @@
} }
.tc-box .workers .gr-item .gr-name{ .tc-box .workers .gr-item .gr-name{
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.32rem;
} }
.tc-box .workers .k-img { .tc-box .workers .k-img {
width: 0.42rem; width: 0.42rem;
...@@ -437,5 +438,13 @@ ...@@ -437,5 +438,13 @@
.none{ .none{
margin-left: 0.3rem; margin-left: 0.3rem;
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.32rem;
}
/deep/ .van-ellipsis {
font-size: 0.4rem !important;
}
/deep/ .van-picker__confirm, /deep/ .van-picker__cancel {
font-size: 0.4rem !important;
} }
\ No newline at end of file
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
} }
.top .status { .top .status {
color: #0054ff; color: #0054ff;
font-size: 0.36rem; font-size: 0.38rem;
font-weight: bold; font-weight: bold;
} }
.menu .hc_total { .menu .hc_total {
color: #727272; color: #727272;
font-size: 0.28rem; font-size: 0.4rem;
} }
.menu .options { .menu .options {
width: 1.76rem; width: 1.76rem;
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
border: 1px solid #0054ff; border: 1px solid #0054ff;
border-radius: 0.12rem; border-radius: 0.12rem;
color: #0054ff; color: #0054ff;
font-size: 0.28rem; font-size: 0.34rem;
line-height: 0.58rem; line-height: 0.58rem;
text-align: center; text-align: center;
position: relative; position: relative;
...@@ -57,11 +57,11 @@ ...@@ -57,11 +57,11 @@
border-radius: 0.12rem; border-radius: 0.12rem;
margin: 0.4rem auto 0.2rem; margin: 0.4rem auto 0.2rem;
padding: 0.4rem 0.3rem; padding: 0.4rem 0.3rem;
font-size: 0.3rem; font-size: 0.4rem;
} }
.title { .title {
color: #0054ff; color: #0054ff;
font-size: 0.32rem; // font-size: 0.4rem;
font-weight: bold; font-weight: bold;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
margin-right: 0.3rem; margin-right: 0.3rem;
} }
.btn{ .btn{
margin-top: 0.2rem; margin-top: 0.5rem;
} }
.btn-item { .btn-item {
width: 1.8rem; width: 1.8rem;
...@@ -168,8 +168,9 @@ ...@@ -168,8 +168,9 @@
text-align: center; text-align: center;
line-height: 0.7rem; line-height: 0.7rem;
color: #fff; color: #fff;
font-size: 0.27rem; font-size: 0.34rem;
margin-left: 0.2rem; margin-left: 0.2rem;
margin-bottom: .1rem;
} }
.sf-btn { .sf-btn {
background: #ffffff; background: #ffffff;
...@@ -200,7 +201,7 @@ ...@@ -200,7 +201,7 @@
// } // }
.pop_title { .pop_title {
color: #000000; color: #000000;
font-size: 0.36rem; font-size: 0.4rem;
font-weight: bold; font-weight: bold;
margin-bottom: 0.4rem; margin-bottom: 0.4rem;
} }
...@@ -213,7 +214,7 @@ ...@@ -213,7 +214,7 @@
} }
.van-popup textarea::-webkit-input-placeholder { .van-popup textarea::-webkit-input-placeholder {
color: #c8c8c8; color: #c8c8c8;
font-size: 0.26rem; font-size: 0.34rem;
} }
.btnItem { .btnItem {
margin-top: 0.4rem; margin-top: 0.4rem;
...@@ -279,7 +280,7 @@ ...@@ -279,7 +280,7 @@
color: #000000; color: #000000;
font-size: 0.26rem; font-size: 0.26rem;
margin-left: 0.3rem; margin-left: 0.3rem;
margin-top: 0.4rem; // margin-top: 0.4rem;
} }
.sure-btn { .sure-btn {
width: 3.12rem; width: 3.12rem;
...@@ -308,7 +309,7 @@ ...@@ -308,7 +309,7 @@
text-align: center; text-align: center;
line-height: 0.58rem; line-height: 0.58rem;
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.34rem;
} }
.date .end { .date .end {
...@@ -320,7 +321,7 @@ ...@@ -320,7 +321,7 @@
text-align: center; text-align: center;
line-height: 0.58rem; line-height: 0.58rem;
color: #000000; color: #000000;
font-size: 0.28rem; font-size: 0.34rem;
} }
.date .blue { .date .blue {
...@@ -328,3 +329,11 @@ ...@@ -328,3 +329,11 @@
height: 0.03rem; height: 0.03rem;
background: #0054FF; background: #0054FF;
} }
/deep/ .van-ellipsis {
font-size: 0.4rem !important;
}
/deep/ .van-picker__confirm, /deep/ .van-picker__cancel {
font-size: 0.4rem !important;
}
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
} }
input::-webkit-input-placeholder{ input::-webkit-input-placeholder{
color: #C8C8C8; color: #C8C8C8;
font-size: 0.28rem; font-size: 0.32rem;
} }
.code{ .code{
position: relative; position: relative;
......
...@@ -7,11 +7,11 @@ import myApi from './api/apiList' ...@@ -7,11 +7,11 @@ import myApi from './api/apiList'
import myAxios from './api/index' import myAxios from './api/index'
import Vant from 'vant' import Vant from 'vant'
import 'vant/lib/index.css' import 'vant/lib/index.css'
import vConsole from '@/plugins/vconsole.js' // import vConsole from '@/plugins/vconsole.js'
import listTips from '@/components/common/listtips.vue' import listTips from '@/components/common/listtips.vue'
Vue.component('listTips', listTips) Vue.component('listTips', listTips)
Vue.use(vConsole) // Vue.use(vConsole)
Vue.config.productionTip = false Vue.config.productionTip = false
......
...@@ -29,7 +29,8 @@ const routes = [{ ...@@ -29,7 +29,8 @@ const routes = [{
name: 'mine', name: 'mine',
meta: { meta: {
title: '我的', title: '我的',
hideBack: true hideBack: true,
keepAlive: true
}, },
component: () => import('../views/tabbar/mine.vue') component: () => import('../views/tabbar/mine.vue')
}, },
...@@ -66,7 +67,8 @@ const routes = [{ ...@@ -66,7 +67,8 @@ const routes = [{
name: 'order_detail', name: 'order_detail',
meta: { meta: {
title: '工单详情', title: '工单详情',
hideBack: true hideBack: true,
keepAlive: true
}, },
component: () => import('@/views/my/order_detail.vue') component: () => import('@/views/my/order_detail.vue')
}, },
...@@ -94,7 +96,7 @@ const router = new VueRouter({ ...@@ -94,7 +96,7 @@ const router = new VueRouter({
mode: 'history', mode: 'history',
base: process.env.BASE_URL, base: process.env.BASE_URL,
routes, routes,
scrollBehavior(to, from, savePosition) { scrollBehavior (to, from, savePosition) {
if (savePosition) { if (savePosition) {
return savePosition return savePosition
} else { } else {
......
...@@ -7,12 +7,22 @@ ...@@ -7,12 +7,22 @@
<div> <div>
<div class="filed-list"> <div class="filed-list">
<img class="icon-img" src="@assets/images/login/shouji.png" /> <img class="icon-img" src="@assets/images/login/shouji.png" />
<van-field v-model.trim="tel" type="tel" placeholder="请输入手机号" maxlength="11" /> <van-field
v-model.trim="tel"
type="tel"
placeholder="请输入手机号"
maxlength="11"
/>
</div> </div>
<div class="filed-list code-cont"> <div class="filed-list code-cont">
<img class="icon-img" src="@assets/images/login/yzm.png" /> <img class="icon-img" src="@assets/images/login/yzm.png" />
<van-field v-model.trim="code" type="text" placeholder="请输入验证码" maxlength="6" /> <van-field
<div class="code-btn" @click="getCode">{{buttonText}}</div> v-model.trim="code"
type="text"
placeholder="请输入验证码"
maxlength="6"
/>
<div class="code-btn" @click="getCode">{{ buttonText }}</div>
</div> </div>
</div> </div>
<div class="login-btn" @click="goLogin">立即登录</div> <div class="login-btn" @click="goLogin">立即登录</div>
...@@ -64,7 +74,7 @@ export default { ...@@ -64,7 +74,7 @@ export default {
this.isSending = true this.isSending = true
this.countDown() this.countDown()
}) })
.catch(() => {}) .catch(() => { })
}, },
countDown () { countDown () {
let seconds = 60 let seconds = 60
...@@ -93,7 +103,7 @@ export default { ...@@ -93,7 +103,7 @@ export default {
let url = `${httpUrl}${wxLogin}?callBack=${t}&scopes=snsapi_userinfo&type=1` let url = `${httpUrl}${wxLogin}?callBack=${t}&scopes=snsapi_userinfo&type=1`
window.document.location = url // url- window.document.location = url // url-
}) })
.catch(() => {}) .catch(() => { })
}, },
fetchData (to, from) { fetchData (to, from) {
this.tel = '' // 手机号 this.tel = '' // 手机号
...@@ -118,5 +128,5 @@ export default { ...@@ -118,5 +128,5 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@assets/styles/login/login.scss"; @import '@assets/styles/login/login.scss';
</style> </style>
This diff is collapsed.
This diff is collapsed.
...@@ -2,24 +2,48 @@ ...@@ -2,24 +2,48 @@
<div class="cont"> <div class="cont">
<div class="evaluate-cont"> <div class="evaluate-cont">
<div class="title">整体评价</div> <div class="title">整体评价</div>
<van-rate readonly void-icon="star" v-model="totalStar" void-color="#eee" color="#FFA300" /> <van-rate
readonly
void-icon="star"
v-model="totalStar"
void-color="#eee"
color="#FFA300"
/>
<div class="eva_detail">详细评价</div> <div class="eva_detail">详细评价</div>
<div class="flex-h star-item"> <div class="flex-h star-item">
<div class="left_title">速度</div> <div class="left_title">速度</div>
<van-rate readonly void-icon="star" v-model="speedStar" void-color="#eee" color="#FFA300" /> <van-rate
readonly
void-icon="star"
v-model="speedStar"
void-color="#eee"
color="#FFA300"
/>
</div> </div>
<div class="flex-h star-item"> <div class="flex-h star-item">
<div class="left_title">质量</div> <div class="left_title">质量</div>
<van-rate readonly void-icon="star" v-model="qualityStar" void-color="#eee" color="#FFA300" /> <van-rate
readonly
void-icon="star"
v-model="qualityStar"
void-color="#eee"
color="#FFA300"
/>
</div> </div>
<div class="flex-h star-item"> <div class="flex-h star-item">
<div class="left_title">态度</div> <div class="left_title">态度</div>
<van-rate readonly void-icon="star" v-model="attitudeStar" void-color="#eee" color="#FFA300" /> <van-rate
readonly
void-icon="star"
v-model="attitudeStar"
void-color="#eee"
color="#FFA300"
/>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="comments"> <div class="comments">
<div class="title">评价内容</div> <div class="title">评价内容</div>
<div class="content">{{comment.content}}</div> <div class="content">{{ comment.content }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -27,18 +51,18 @@ ...@@ -27,18 +51,18 @@
<script> <script>
export default { export default {
data(){ data () {
return{ return {
totalStar: 0, totalStar: 0,
speedStar: 0, speedStar: 0,
qualityStar: 0, qualityStar: 0,
attitudeStar:0, attitudeStar: 0,
repair_order_id: '', repair_order_id: '',
comment: '', comment: ''
} }
}, },
created () { created () {
console.log('接收的id啊',this.$route.query.id); console.log('接收的id啊', this.$route.query.id)
this.repair_order_id = this.$route.query.id this.repair_order_id = this.$route.query.id
this.look_comment() this.look_comment()
// this.getStatus() // this.getStatus()
...@@ -58,12 +82,12 @@ export default { ...@@ -58,12 +82,12 @@ export default {
this.attitudeStar = Number(data.attitude_stars) this.attitudeStar = Number(data.attitude_stars)
this.totalStar = Number(data.stars) this.totalStar = Number(data.stars)
}) })
.catch(() => {}) .catch(() => { })
}, }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@assets/styles/my/lookEvaluate.scss"; @import '@assets/styles/my/lookEvaluate.scss';
</style> </style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<div class="photo"> <div class="photo">
<img src="@assets/images/my/touxiang.png" alt /> <img src="@assets/images/my/touxiang.png" alt />
</div> </div>
<div class="btn">{{user.online_status_display}}</div> <div class="btn">{{ user.online_status_display }}</div>
<div class="name">{{user.name}}</div> <div class="name">{{ user.name }}</div>
<div class="group">{{user.department.name}}</div> <div class="group">{{ user.department.name }}</div>
<div class="tel flex-h" @click="goPhone"> <div class="tel flex-h" @click="goPhone">
<div class="telNumber">{{telToHide(user.phone)}}</div> <div class="telNumber">{{ telToHide(user.phone) }}</div>
<img src="@assets/images/my/bianji.png" alt /> <img src="@assets/images/my/bianji.png" alt />
</div> </div>
</div> </div>
...@@ -30,14 +30,11 @@ export default { ...@@ -30,14 +30,11 @@ export default {
user: '' user: ''
} }
}, },
created () {
this.getUserInfo()
},
methods: { methods: {
goPhone(){ goPhone () {
this.$router.push({ this.$router.push({
path: '/modifyPhone', path: '/modifyPhone',
query:{phone:this.user.phone} query: { phone: this.user.phone }
}) })
}, },
getUserInfo () { getUserInfo () {
...@@ -46,12 +43,23 @@ export default { ...@@ -46,12 +43,23 @@ export default {
.then((res) => { .then((res) => {
this.user = res this.user = res
}) })
.catch(() => {}) .catch(() => { })
}, },
telToHide (tel) { telToHide (tel) {
var phone = tel.substr(0, 3) + '****' + tel.substring(7, 11); var phone = tel.substr(0, 3) + '****' + tel.substring(7, 11)
return phone; return phone
},
fetchData (to, from) {
this.getUserInfo()
} }
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.fetchData(to, from, next)
})
},
beforeRouteLeave (to, from, next) {
next()
} }
} }
</script> </script>
......
<template> <template>
<div class="cont"> <div class="cont">
<div class="tel"> <div class="tel">
<input v-model.trim="old_tel" maxlength="11" type="tel" placeholder="请输入原手机号" /> <input
v-model.trim="old_tel"
maxlength="11"
type="tel"
placeholder="请输入原手机号"
/>
</div> </div>
<div class="tel"> <div class="tel">
<input v-model.trim="tel" maxlength="11" type="tel" placeholder="请输入新的手机号" /> <input
v-model.trim="tel"
maxlength="11"
type="tel"
placeholder="请输入新的手机号"
/>
</div> </div>
<div class="code flex-h"> <div class="code flex-h">
<van-field class="code_field" v-model.trim="code" type="text" placeholder="请输入验证码" maxlength="6" /> <van-field
<div class="getCode" @click="getCode">{{buttonText}}</div> class="code_field"
v-model.trim="code"
type="text"
placeholder="请输入验证码"
maxlength="6"
/>
<div class="getCode" @click="getCode">{{ buttonText }}</div>
</div> </div>
<div class="submit-btn" @click="submit">提交</div> <div class="submit-btn" @click="submit">提交</div>
</div> </div>
...@@ -18,7 +34,7 @@ ...@@ -18,7 +34,7 @@
export default { export default {
data () { data () {
return { return {
old_tel: '',//旧手机号 old_tel: '', // 旧手机号
tel: '', // 手机号 tel: '', // 手机号
code: '', // 验证码 code: '', // 验证码
buttonText: '获取验证码', buttonText: '获取验证码',
...@@ -29,7 +45,7 @@ export default { ...@@ -29,7 +45,7 @@ export default {
}, },
methods: { methods: {
checkData () { checkData () {
if(!this.checkCon()){ if (!this.checkCon()) {
return return
} }
if (this.code.length !== 6) { if (this.code.length !== 6) {
...@@ -38,7 +54,7 @@ export default { ...@@ -38,7 +54,7 @@ export default {
} }
return true return true
}, },
checkCon(){ checkCon () {
if (this.old_tel != this.$route.query.phone) { if (this.old_tel != this.$route.query.phone) {
this.$toast('请正确输入原手机号码') this.$toast('请正确输入原手机号码')
return false return false
...@@ -55,7 +71,7 @@ export default { ...@@ -55,7 +71,7 @@ export default {
}, },
getCode () { getCode () {
if (this.isSending) return if (this.isSending) return
if(!this.checkCon()){ if (!this.checkCon()) {
return return
} }
const curParams = { const curParams = {
...@@ -68,7 +84,7 @@ export default { ...@@ -68,7 +84,7 @@ export default {
this.isSending = true this.isSending = true
this.countDown() this.countDown()
}) })
.catch(() => {}) .catch(() => { })
}, },
countDown () { countDown () {
let seconds = 60 let seconds = 60
...@@ -93,7 +109,7 @@ export default { ...@@ -93,7 +109,7 @@ export default {
this.$toast('修改成功') this.$toast('修改成功')
this.$router.go(-1) this.$router.go(-1)
}) })
.catch(() => {}) .catch(() => { })
}, },
fetchData (to, from) { fetchData (to, from) {
this.tel = '' // 手机号 this.tel = '' // 手机号
...@@ -119,5 +135,5 @@ export default { ...@@ -119,5 +135,5 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@assets/styles/tabbar/modifyPhone.scss"; @import '@assets/styles/tabbar/modifyPhone.scss';
</style> </style>
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