lincl 3 лет назад
Родитель
Сommit
2ed42b5e74

+ 12 - 2
mini-pro-web/src/router/index.js

@ -18,6 +18,7 @@ import device from './device'
import machine from './machine'
import {getPublicKey, getHwlyyDecrypt, checkWlyyLogin} from '@/api/login'
import JSEncrypt from "@/utils/jsencrypt";
import { Toast } from 'vant'
Vue.use(VueRouter)
const routes = [
@ -118,7 +119,11 @@ router.beforeEach(async (to, from, next) => {
    }
    new Promise((resolve, reject)=>{
        if(to.query._code){
            return authLogin(to.query._code, to)
            authLogin(to.query._code, to)
                .then(res=>{
                    Toast.clear()
                    resolve()
                })
        } else {
            resolve()
        }
@ -141,6 +146,11 @@ router.beforeEach(async (to, from, next) => {
function authLogin(code, to){
    return new Promise((resolve, reject)=>{
        Toast.loading({
            message: '授权登录中..',
            duration: 0,
            forbidClick: true
        })
        getHwlyyDecrypt({code: decodeURIComponent(code)})
            .then(data=>{
                return new Promise((resolve, reject)=>{
@ -164,7 +174,7 @@ function authLogin(code, to){
            })
            .then(res=>{
                if(res.obj && res.obj.authCode==1){
                    var userInfo  = loginRes.obj.WlyyUserSimple
                    var userInfo  = res.obj.WlyyUserSimple
                    userInfo.token = userInfo.accessToken
                    userInfo.clientType = to.query.clientType//1 来自i健康app 区域互联网
                    store

+ 1 - 0
mini-pro-web/src/views/device/cargoLane/setting.vue

@ -131,6 +131,7 @@ export default{
            }
        },
        onSelectCol(item){
            debugger
            var i = this.selectList.indexOf(item)
            if(i != -1){
                var exist = _.filter(this.selectList, v=>{

+ 1 - 1
mini-pro-web/src/views/device/temperature/index.vue

@ -156,7 +156,7 @@ export default{
            medicineAbinetApi.updateTAndH(json).then(res=>{
                this.$toast.clear()
                if(res.status==200){
                    this.$toast(res.message);
                    this.$toast("设置成功");
                    this.goBack();
                }else{
                    this.$toast(res.message)