|
@@ -38,13 +38,13 @@
|
|
|
请点击登录
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- <view class="user-name">{{userInfo.userNameCN}}</view>
|
|
|
+ <view class="user-name">{{userInfo.userNameCN || '游客'}}</view>
|
|
|
<view>{{userInfo.orgName}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <text v-if="userInfo&&userInfo.identifyType=='VISITOR'" class="user-rz">
|
|
|
+ <text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
|
|
|
{{storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
|
|
|
</text>
|
|
|
<u-icon name="arrow-right"></u-icon>
|
|
@@ -64,7 +64,7 @@
|
|
|
<view class="list-box">
|
|
|
<!-- 扫描记录 -->
|
|
|
<u-cell-group :border="false">
|
|
|
- <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" :value="userInfo&&userInfo.identifyType=='VISITOR'?'':'全部'">
|
|
|
+ <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" :value="userInfo&&userInfo.sysUserFlag == '0'?'':'全部'">
|
|
|
<u-icon slot="icon" size="38" color="#066cff" style="margin-right: 0.3em;" name="order"></u-icon>
|
|
|
</u-cell-item>
|
|
|
</u-cell-group>
|
|
@@ -74,7 +74,7 @@
|
|
|
:key="item.id"
|
|
|
:title="item.vinCode"
|
|
|
:title-style="{fontSize:'1em'}"
|
|
|
- :label="userInfo&&userInfo.identifyType=='VISITOR' ? '' : (item.brandName +' '+item.modelName)">
|
|
|
+ :label="userInfo&&userInfo.sysUserFlag == '0' ? '' : (item.brandName +' '+item.modelName)">
|
|
|
<text slot="icon"></text>
|
|
|
</u-cell-item>
|
|
|
<view style="padding: 20upx;">
|
|
@@ -130,10 +130,6 @@
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
|
- // 检测是否登录
|
|
|
- this.$store.dispatch('checkLogin',()=>{
|
|
|
- this.pageInit()
|
|
|
- })
|
|
|
this.getScrollLog()
|
|
|
|
|
|
// 获取导航栏高度
|
|
@@ -146,10 +142,15 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- // 获取数据字典
|
|
|
- this.getListLookUp();
|
|
|
- // 获取支付,收款方式
|
|
|
- this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
|
|
|
+ // 检测是否登录
|
|
|
+ this.$store.dispatch('checkLogin',()=>{
|
|
|
+ // 获取数据字典
|
|
|
+ this.getListLookUp();
|
|
|
+ // 获取支付,收款方式
|
|
|
+ this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
|
|
|
+ // 初始化页面
|
|
|
+ this.pageInit()
|
|
|
+ })
|
|
|
// 刷新首页数据
|
|
|
uni.$on("refashHome",()=>{
|
|
|
this.pageInit()
|
|
@@ -167,19 +168,26 @@
|
|
|
},
|
|
|
onShareAppMessage() {},
|
|
|
onShow() {
|
|
|
- // 查询门店认证信息
|
|
|
- this.findLastApply()
|
|
|
+ if(this.hasLogin){
|
|
|
+ // 查询门店认证信息
|
|
|
+ this.findLastApply()
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
pageInit(){
|
|
|
if(this.hasLogin){
|
|
|
this.avatarUrl = this.userInfo.avatarUrl
|
|
|
- // 查询是否有数字货架
|
|
|
- this.getStoreShelf()
|
|
|
+ // 非游客
|
|
|
+ if(this.userInfo.sysUserFlag == '1'){
|
|
|
+ // 查询是否有数字货架
|
|
|
+ this.getStoreShelf()
|
|
|
+ }
|
|
|
// 获取扫描记录
|
|
|
this.getVinLog()
|
|
|
// 获取扫描次数
|
|
|
this.$store.dispatch("getScanNums")
|
|
|
+ // 查询门店认证信息
|
|
|
+ this.findLastApply()
|
|
|
}else{
|
|
|
uni.removeStorageSync('token')
|
|
|
}
|
|
@@ -203,8 +211,8 @@
|
|
|
},
|
|
|
// 获取最新申请门店
|
|
|
findLastApply(){
|
|
|
- // const mobile = this.userInfo.mobile
|
|
|
- this.$store.dispatch('getSotreAuth','11223564569')
|
|
|
+ const mobile = this.userInfo.mobile
|
|
|
+ this.$store.dispatch('getSotreAuth',mobile)
|
|
|
},
|
|
|
// 知道审核不通过
|
|
|
toKnow(){
|
|
@@ -242,6 +250,7 @@
|
|
|
// 获取上方滚动扫描记录
|
|
|
getScrollLog(){
|
|
|
scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
|
|
|
+ console.log(res)
|
|
|
this.list = res.data.list || []
|
|
|
})
|
|
|
},
|
|
@@ -250,7 +259,7 @@
|
|
|
this.vinList = []
|
|
|
this.status = "loading"
|
|
|
// VISITOR:游客,EMPLOYEE:雇员
|
|
|
- getScanVinLogList({pageNo:1,pageSize:5,identifyType: this.userInfo.identifyType}).then(res => {
|
|
|
+ getScanVinLogList({ pageNo:1, pageSize:5, identifyType: this.userInfo.identifyType }).then(res => {
|
|
|
this.vinList = res.data.list || []
|
|
|
this.vinList = this.vinList.filter(item => item.vinCode)
|
|
|
this.status = 'nomore'
|
|
@@ -284,7 +293,7 @@
|
|
|
// 去扫描
|
|
|
openCamera(){
|
|
|
if(this.hasLogin){
|
|
|
- if(this.userInfo.identifyType=='VISITOR'){
|
|
|
+ if(this.userInfo.sysUserFlag == '0'){
|
|
|
if(this.vuex_vinScanNums < 10){
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/scan-frame/scan-frame"
|
|
@@ -316,7 +325,7 @@
|
|
|
},
|
|
|
// 查看扫描记录
|
|
|
toAllRecord(){
|
|
|
- if(this.userInfo.identifyType == 'EMPLOYEE'){
|
|
|
+ if(this.userInfo.sysUserFlag == '1'){
|
|
|
uni.navigateTo({
|
|
|
url: this.hasLogin ? "/pages/vinRecord/vinRecord" : '/pages/login/login'
|
|
|
})
|
|
@@ -326,11 +335,11 @@
|
|
|
if(this.hasLogin){
|
|
|
// 用户详细信息 或 门店认证
|
|
|
uni.navigateTo({
|
|
|
- url: this.userInfo.identifyType=='EMPLOYEE' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
|
|
|
+ url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
|
|
|
})
|
|
|
}else{
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/storeManage/storeAuth'
|
|
|
+ url: '/pages/login/login'
|
|
|
})
|
|
|
}
|
|
|
},
|