dengjie commit : 修改部分存在问题
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 认证厂家 -->
|
||||
<view>
|
||||
<view v-if="token">
|
||||
<view class="subtitle">
|
||||
<u--image src="/static/report/hy_icon_cjx.png" width="24rpx" height="24rpx" :lazy-load="true">
|
||||
</u--image>
|
||||
@@ -40,13 +40,24 @@
|
||||
</view>
|
||||
<certifiedCj></certifiedCj>
|
||||
</view>
|
||||
<view style="margin:0 20rpx;">
|
||||
<u-overlay :show="!isLoad">
|
||||
<login @success="reOnLoad()" @fail="failToLoad()"></login>
|
||||
</u-overlay>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import login from 'pages/my/login/login'
|
||||
export default {
|
||||
components: {
|
||||
login
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoad: true,
|
||||
token: '',
|
||||
classifyList: [{
|
||||
src: '/static/report/hy_icon_xw.png',
|
||||
title: '行业新闻'
|
||||
@@ -60,9 +71,11 @@
|
||||
title: '认证厂家'
|
||||
},
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.token = uni.getStorageSync('loginToken')
|
||||
},
|
||||
methods: {
|
||||
//点击一级分类
|
||||
click(listIndex) {
|
||||
@@ -76,12 +89,33 @@
|
||||
url: '../../packageReport/newProductRelease/newProductRelease'
|
||||
})
|
||||
} else if (listIndex == 2) {
|
||||
if (uni.getStorageSync('loginToken')) {
|
||||
uni.navigateTo({
|
||||
url: '../../packageReport/certifiedCj/certifiedCj'
|
||||
})
|
||||
} else {
|
||||
this.isLoad = false
|
||||
}
|
||||
}
|
||||
},
|
||||
reOnLoad() {
|
||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||
this.$toast.warn('登录失败请重试')
|
||||
this.isLoad = false
|
||||
return
|
||||
}
|
||||
this.isLoad = true
|
||||
if (this.isLoad) {
|
||||
uni.navigateTo({
|
||||
url: '../../packageReport/certifiedCj/certifiedCj'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
failToLoad() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/report/report'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user