客户信息及授权
This commit is contained in:
parent
6ad7a2ea20
commit
dccf1d0bde
@ -34,8 +34,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import {getUserInfoRequest} from "@/utils/common.js";
|
import {getToken,getUserInfo} from '@/utils/auth'
|
||||||
import {getToken,setUserInfo,getUserInfo} from '@/utils/auth.js'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
VNavigationBar,
|
VNavigationBar,
|
||||||
@ -75,14 +74,8 @@ export default {
|
|||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
console.log("已登录")
|
//直接取缓存中的用户信息
|
||||||
if(!getUserInfo()){
|
|
||||||
console.log("没有用户信息")
|
|
||||||
this.getUserInfos()
|
|
||||||
}else{
|
|
||||||
this.customInfo = JSON.parse(getUserInfo())
|
this.customInfo = JSON.parse(getUserInfo())
|
||||||
this.getActive()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(data) {
|
onLoad(data) {
|
||||||
@ -118,24 +111,6 @@ export default {
|
|||||||
console.log("index",this.index)
|
console.log("index",this.index)
|
||||||
this.joinKkylAct()
|
this.joinKkylAct()
|
||||||
},
|
},
|
||||||
//获取当前登录用户信息
|
|
||||||
async getUserInfos() {
|
|
||||||
request({
|
|
||||||
url: "/userClient/customer/getUserCustomer",
|
|
||||||
method: 'get',
|
|
||||||
params:{}
|
|
||||||
}).then(res=>{
|
|
||||||
if(!res.data){
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/my/register'
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
setUserInfo(JSON.stringify(res.data))
|
|
||||||
this.customInfo = res.data
|
|
||||||
this.getActive()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//查询营销活动列表
|
//查询营销活动列表
|
||||||
async getActive() {
|
async getActive() {
|
||||||
this.activeList=[]
|
this.activeList=[]
|
||||||
@ -239,7 +214,6 @@ export default {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'支付成功'
|
title:'支付成功'
|
||||||
})
|
})
|
||||||
this.getUserInfos()
|
|
||||||
}
|
}
|
||||||
// 支付成功后的回调函数, res.errMsg = 'requestPayment:ok'
|
// 支付成功后的回调函数, res.errMsg = 'requestPayment:ok'
|
||||||
},
|
},
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<view class="date">{{ item.commentTime }}</view>
|
<view class="date">{{ item.commentTime }}</view>
|
||||||
<view class="message">
|
<view class="message">
|
||||||
<!-- 这家修理厂的喷漆工艺非常不错,特别均匀,师傅也很细心。如果您需要做喷漆或者维修服务,不要错过这里!-->
|
<!-- 这家修理厂的喷漆工艺非常不错,特别均匀,师傅也很细心。如果您需要做喷漆或者维修服务,不要错过这里!-->
|
||||||
{{item.commentDesc}}
|
{{item.commentDesc || "未输入评价内容"}}
|
||||||
</view>
|
</view>
|
||||||
<view class="rate">
|
<view class="rate">
|
||||||
<!-- 设置尺寸大小 -->
|
<!-- 设置尺寸大小 -->
|
||||||
|
@ -124,6 +124,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.cancelReservation()
|
||||||
this.getServer()
|
this.getServer()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
<view class="cardLabel">余额</view>
|
<view class="cardLabel">余额</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="no-data" v-if="customInfo.couponList.length==0">
|
||||||
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
|
</view>
|
||||||
<!-- <view class="cardItemBottom">-->
|
<!-- <view class="cardItemBottom">-->
|
||||||
<!-- <view class="useSm">使用说明</view>-->
|
<!-- <view class="useSm">使用说明</view>-->
|
||||||
<!-- <view class="useBtn">去使用</view>-->
|
<!-- <view class="useBtn">去使用</view>-->
|
||||||
@ -239,5 +242,8 @@
|
|||||||
bottom: 2rpx;
|
bottom: 2rpx;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
}
|
}
|
||||||
|
.no-data{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -67,8 +67,7 @@
|
|||||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import {getUserInfoRequest} from "@/utils/common.js";
|
import {getToken,getUserInfo} from '@/utils/auth'
|
||||||
import {getToken,setUserInfo,getUserInfo} from '@/utils/auth'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
tabBarVue,
|
tabBarVue,
|
||||||
@ -113,23 +112,6 @@
|
|||||||
url: '/pages/my/myEquity'
|
url: '/pages/my/myEquity'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取当前登录用户信息
|
|
||||||
async getServer() {
|
|
||||||
request({
|
|
||||||
url: "/userClient/customer/getUserCustomer",
|
|
||||||
method: 'get',
|
|
||||||
params:{}
|
|
||||||
}).then(res=>{
|
|
||||||
if(!res.data){
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/my/register'
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
setUserInfo(JSON.stringify(res.data))
|
|
||||||
this.customInfo = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
import VNavigationBar from '@/components/VNavigationBar.vue';
|
import VNavigationBar from '@/components/VNavigationBar.vue';
|
||||||
import request from "../../utils/request";
|
import request from "../../utils/request";
|
||||||
import config from "config";
|
import config from "config";
|
||||||
import {getUserInfoRequest} from "@/utils/common";
|
|
||||||
import {getToken,setJSONData} from '@/utils/auth'
|
import {getToken,setJSONData} from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||||
import reservationOrderVue from '../../components/reservationOrder/reservationOrder.vue'
|
import reservationOrderVue from '../../components/reservationOrder/reservationOrder.vue'
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import {getUserInfoRequest} from "@/utils/common.js";
|
import {getToken} from '@/utils/auth.js'
|
||||||
import {getToken,setUserInfo} from '@/utils/auth.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -57,15 +56,10 @@
|
|||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
console.log("已登录")
|
console.log("已登录")
|
||||||
this.getUserInfos()
|
|
||||||
}
|
}
|
||||||
this.getBookingPage()
|
this.getBookingPage()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取当前登录用户信息
|
|
||||||
async getUserInfos() {
|
|
||||||
getUserInfoRequest()
|
|
||||||
},
|
|
||||||
async getBookingPage(){
|
async getBookingPage(){
|
||||||
const res = await request({
|
const res = await request({
|
||||||
url: "/userClient/repair/booking/page",
|
url: "/userClient/repair/booking/page",
|
||||||
|
Loading…
Reference in New Issue
Block a user