|
@@ -49,7 +49,7 @@
|
|
|
<view class="item phone">
|
|
|
<text>手机号码</text>
|
|
|
<view class="right">
|
|
|
- <text >18792703003</text>
|
|
|
+ <text >{{userPhone}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -81,12 +81,14 @@
|
|
|
|
|
|
<script>
|
|
|
import uniSteps from '@/components/uni-steps/uni-steps.vue'
|
|
|
+ import {getUserInfo} from '@/api/login.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
uniSteps
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ userPhone: '',
|
|
|
stepIndex: 0, // 当前步奏下标
|
|
|
serverIndex: 0, // 选择服务下标
|
|
|
itemList: [ // 服务列表
|
|
@@ -159,6 +161,7 @@
|
|
|
uni.removeStorageSync('stepIndex')
|
|
|
// 注册全局监听事件
|
|
|
uni.$once('read', this.read)
|
|
|
+ this.getUserPhone()
|
|
|
},
|
|
|
onUnload() {
|
|
|
uni.removeStorageSync('stepIndex')
|
|
@@ -169,6 +172,20 @@
|
|
|
console.log(this.stepIndex)
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取用户信息
|
|
|
+ getUserPhone () {
|
|
|
+ getUserInfo().then(res =>{
|
|
|
+ console.log(res,'rrrrrrr')
|
|
|
+ if(res.status == 200) {
|
|
|
+ this.userPhone = res.data.mobile
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.message,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取服务列表
|
|
|
getServerList () {
|
|
|
|