|
@@ -54,23 +54,23 @@
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+ onBackPress(options) {
|
|
|
+ if (options.from === 'backbutton') {
|
|
|
+ uni.showModal({
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '已经到头了',
|
|
|
+ showCancel: false,
|
|
|
+ success: (res) => { }
|
|
|
+ })
|
|
|
+ // 禁止默认返回
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
- openPage(path) {
|
|
|
- console.log('path',path);
|
|
|
- this.$u.route({
|
|
|
- url: path
|
|
|
- })
|
|
|
- },
|
|
|
- //登录判断
|
|
|
- // login(status){
|
|
|
- // if(!status){
|
|
|
- // console.log('config',this.config);
|
|
|
- // window.location.replace(this.config.loginUrl)
|
|
|
- // }
|
|
|
- // },
|
|
|
+
|
|
|
handleLogin(){
|
|
|
- this.form.deviceNo = '1122334455';
|
|
|
- // this.form.deviceNo = device?.getDeviceInfo()?.deviceId;
|
|
|
+ // this.form.deviceNo = '1122334455';
|
|
|
+ this.form.deviceNo = device?.getDeviceInfo()?.deviceId;
|
|
|
this.$u.api.login(this.form)
|
|
|
.then(res=>{
|
|
|
this.$refs.uToast.show({
|
|
@@ -90,8 +90,10 @@
|
|
|
key:'loginData'
|
|
|
})
|
|
|
};
|
|
|
- this.$u.route('pages/index/index', {});
|
|
|
- console.log('login',res)
|
|
|
+ // this.$u.route('pages/index/index', {});
|
|
|
+ uni.redirectTo({
|
|
|
+ url:'../index/index'
|
|
|
+ });
|
|
|
}).catch(err=>{
|
|
|
if(err.errMsg){
|
|
|
this.$refs.uToast.show({
|