|
@@ -19,9 +19,9 @@
|
|
|
<!-- 表单 -->
|
|
|
<view class="list-container">
|
|
|
<view class="list-item">
|
|
|
- <view class="list-item-left phone">
|
|
|
+ <view class="list-item-left phone flex align_center">
|
|
|
<text>联系电话</text>
|
|
|
- <u-image src="/static/billing_icon.png" width="24" height="24" style="margin:0 0 10rpx 10rpx;"></u-image>
|
|
|
+ <u-image src="/static/billing_icon.png" width="24" height="24" style="margin:0 0 16rpx 10rpx;"></u-image>
|
|
|
</view>
|
|
|
<view class="list-item-right flex_1">
|
|
|
<u-input class="flex_1" :custom-style="inputClass" v-model="form.contactMobile" placeholder="请输入车牌号码" placeholder-style="color:'#bbb';font-size:18px"/>
|
|
@@ -110,6 +110,7 @@
|
|
|
import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
|
|
|
import {geRubbishType} from '@/api/index'
|
|
|
import {userInfoSave} from '@/api/data.js'
|
|
|
+ import { checkLogin } from '@/api/login.js'
|
|
|
export default{
|
|
|
components: {uniNavBar},
|
|
|
data(){
|
|
@@ -159,6 +160,16 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ checkLogin().then(res => {
|
|
|
+ this.hasLogin=res.status==200
|
|
|
+ if(this.hasLogin){
|
|
|
+ this.pageInit()
|
|
|
+ }else{
|
|
|
+ this.noDataText="您尚未登录或登录已过期,完成登录后可进行下单操作!"
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
methods:{
|
|
|
pageInit() {
|
|
|
this.geRubbishTypeList()
|
|
@@ -326,6 +337,22 @@
|
|
|
// }
|
|
|
// })
|
|
|
},
|
|
|
+ // 未登录弹窗
|
|
|
+ loginModal(){
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '您尚未登录或登录已过期,请登录后使用',
|
|
|
+ success: (res)=> {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ })
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
onLaunch(){
|