Commit 0e13bace authored by 郭欢's avatar 郭欢

'修改,'

parent dace08b0
File added
...@@ -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 {
......
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
} }
.bz-title{ .bz-title{
margin-bottom: 0.2rem; margin-bottom: 0.2rem;
color: #ff0000;
} }
.one { .one {
color: #727272; color: #727272;
......
...@@ -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
......
...@@ -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
...@@ -81,19 +91,19 @@ export default { ...@@ -81,19 +91,19 @@ export default {
goLogin () { goLogin () {
if (this.checkData()) return true if (this.checkData()) return true
const curParams = { const curParams = {
tel: this.tel, tel: this.tel,
code: this.code code: this.code
} }
this.$http.post(this.$myApi.BINDLOGIN, curParams) this.$http.post(this.$myApi.BINDLOGIN, curParams)
.then(res => { .then(res => {
const httpUrl = window.localStorage.getItem('httpUrl') const httpUrl = window.localStorage.getItem('httpUrl')
const h5Url = window.localStorage.getItem('h5Url') const h5Url = window.localStorage.getItem('h5Url')
const wxLogin = window.localStorage.getItem('wxLogin') const wxLogin = window.localStorage.getItem('wxLogin')
const t = res.role == 3 ? h5Url : `${h5Url}/admin_home` // 测试h5线上地址 const t = res.role == 3 ? h5Url : `${h5Url}/admin_home` // 测试h5线上地址
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.
<template> <template>
<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
<div class="eva_detail">详细评价</div> readonly
<div class="flex-h star-item"> void-icon="star"
<div class="left_title">速度</div> v-model="totalStar"
<van-rate readonly void-icon="star" v-model="speedStar" void-color="#eee" color="#FFA300" /> void-color="#eee"
</div> color="#FFA300"
<div class="flex-h star-item"> />
<div class="left_title">质量</div> <div class="eva_detail">详细评价</div>
<van-rate readonly void-icon="star" v-model="qualityStar" void-color="#eee" color="#FFA300" /> <div class="flex-h star-item">
</div> <div class="left_title">速度</div>
<div class="flex-h star-item"> <van-rate
<div class="left_title">态度</div> readonly
<van-rate readonly void-icon="star" v-model="attitudeStar" void-color="#eee" color="#FFA300" /> void-icon="star"
</div> v-model="speedStar"
<div class="line"></div> void-color="#eee"
<div class="comments"> color="#FFA300"
<div class="title">评价内容</div> />
<div class="content">{{comment.content}}</div> </div>
</div> <div class="flex-h star-item">
<div class="left_title">质量</div>
<van-rate
readonly
void-icon="star"
v-model="qualityStar"
void-color="#eee"
color="#FFA300"
/>
</div>
<div class="flex-h star-item">
<div class="left_title">态度</div>
<van-rate
readonly
void-icon="star"
v-model="attitudeStar"
void-color="#eee"
color="#FFA300"
/>
</div>
<div class="line"></div>
<div class="comments">
<div class="title">评价内容</div>
<div class="content">{{ comment.content }}</div>
</div>
</div>
</div> </div>
</div>
</template> </template>
<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>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template> <template>
<div class="cont" v-if="user"> <div class="cont" v-if="user">
<div class="top"></div> <div class="top"></div>
<div class="info-item"> <div class="info-item">
<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>
<!-- tabbar -->
<my-tabbar curname="my"></my-tabbar>
</div> </div>
<!-- tabbar -->
<my-tabbar curname="my"></my-tabbar>
</div>
</template> </template>
<script> <script>
...@@ -30,14 +30,14 @@ export default { ...@@ -30,14 +30,14 @@ export default {
user: '' user: ''
} }
}, },
created () { // created () {
this.getUserInfo() // 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,79 +46,90 @@ export default { ...@@ -46,79 +46,90 @@ 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>
<style lang="scss" scoped> <style lang="scss" scoped>
.cont { .cont {
min-height: 100vh; min-height: 100vh;
background: #f7f7f7; background: #f7f7f7;
} }
.top { .top {
width: 100%; width: 100%;
height: 2.82rem; height: 2.82rem;
background: #0054ff; background: #0054ff;
position: relative; position: relative;
} }
.info-item { .info-item {
width: 7.5rem; width: 7.5rem;
height: 8.05rem; height: 8.05rem;
background: #ffffff; background: #ffffff;
border-radius: 0.28rem 0.28rem 0rem 0rem; border-radius: 0.28rem 0.28rem 0rem 0rem;
position: absolute; position: absolute;
top: 2.5rem; top: 2.5rem;
left: 0; left: 0;
text-align: center; text-align: center;
} }
.photo { .photo {
width: 1.7rem; width: 1.7rem;
height: 1.7rem; height: 1.7rem;
border-radius: 50%; border-radius: 50%;
background: #f1f1f1; background: #f1f1f1;
position: absolute; position: absolute;
top: -1rem; top: -1rem;
left: 2.9rem; left: 2.9rem;
} }
.btn { .btn {
width: 1.38rem; width: 1.38rem;
height: 0.48rem; height: 0.48rem;
background: #0054ff; background: #0054ff;
border-radius: 0.24rem; border-radius: 0.24rem;
color: #fff; color: #fff;
text-align: center; text-align: center;
line-height: 0.48rem; line-height: 0.48rem;
margin: 1.13rem auto 0.59rem; margin: 1.13rem auto 0.59rem;
} }
.name { .name {
color: #000000; color: #000000;
font-size: 0.38rem; font-size: 0.38rem;
margin-bottom: 0.27rem; margin-bottom: 0.27rem;
font-weight: bold; font-weight: bold;
} }
.group { .group {
color: #000000; color: #000000;
font-size: 0.3rem; font-size: 0.3rem;
margin-bottom: 0.48rem; margin-bottom: 0.48rem;
} }
.tel { .tel {
width: 2rem; width: 2rem;
height: 0.28rem; height: 0.28rem;
margin: 0 auto; margin: 0 auto;
} }
.tel .telNumber { .tel .telNumber {
color: #000000; color: #000000;
font-size: 0.3rem; font-size: 0.3rem;
margin-right: 0.2rem; margin-right: 0.2rem;
} }
.tel img { .tel img {
width: 0.28rem; width: 0.28rem;
height: 0.28rem; height: 0.28rem;
} }
</style> </style>
<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 class="tel">
<input
v-model.trim="tel"
maxlength="11"
type="tel"
placeholder="请输入新的手机号"
/>
</div>
<div class="code flex-h">
<van-field
class="code_field"
v-model.trim="code"
type="text"
placeholder="请输入验证码"
maxlength="6"
/>
<div class="getCode" @click="getCode">{{ buttonText }}</div>
</div>
<div class="submit-btn" @click="submit">提交</div>
</div> </div>
<div class="tel">
<input v-model.trim="tel" maxlength="11" type="tel" placeholder="请输入新的手机号" />
</div>
<div class="code flex-h">
<van-field class="code_field" v-model.trim="code" type="text" placeholder="请输入验证码" maxlength="6" />
<div class="getCode" @click="getCode">{{buttonText}}</div>
</div>
<div class="submit-btn" @click="submit">提交</div>
</div>
</template> </template>
<script> <script>
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
...@@ -51,14 +67,14 @@ export default { ...@@ -51,14 +67,14 @@ export default {
this.$toast('请正确输入新手机号码') this.$toast('请正确输入新手机号码')
return false return false
} }
return true return true
}, },
getCode () { getCode () {
if (this.isSending) return if (this.isSending) return
if(!this.checkCon()){ if (!this.checkCon()) {
return return
} }
const curParams = { const curParams = {
tel: this.tel, tel: this.tel,
old_tel: this.old_tel, old_tel: this.old_tel,
is_edit: 1 is_edit: 1
...@@ -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
...@@ -83,9 +99,9 @@ export default { ...@@ -83,9 +99,9 @@ export default {
}, 1000) }, 1000)
}, },
submit () { submit () {
if (!this.checkData()) return if (!this.checkData()) return
const curParams = { const curParams = {
tel: this.tel, tel: this.tel,
code: this.code code: this.code
} }
this.$http.post(this.$myApi.USER_EDIT, curParams) this.$http.post(this.$myApi.USER_EDIT, curParams)
...@@ -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