Commit e2a4ad0e authored by 李苏's avatar 李苏 💬

去除报错,改bug

parent f3f1ae77
<template>
<view class="uni-collapse">
<slot />
</view>
</template>
<script>
export default {
name: 'UniCollapse',
props: {
accordion: {
// 是否开启手风琴效果
type: [Boolean, String],
default: false
}
},
data() {
return {}
},
provide() {
return {
collapse: this
}
},
created() {
this.childrens = []
},
methods: {
onChange() {
let activeItem = []
this.childrens.forEach((vm, index) => {
if (vm.isOpen) {
activeItem.push(vm.nameSync)
}
})
this.$emit('change', activeItem)
}
}
}
</script>
<style lang="scss" scoped>
@import '@/uni.scss';
.uni-collapse {
/* #ifndef APP-NVUE */
width: 100%;
display: flex;
/* #endif */
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
flex-direction: column;
background-color: $uni-bg-color;
}
</style>
...@@ -9,9 +9,8 @@ import {RouterMount} from './plugin/uni-simple-router/index.js' ...@@ -9,9 +9,8 @@ import {RouterMount} from './plugin/uni-simple-router/index.js'
console.log("main") console.log("main")
// 注册缓存器 // 注册缓存器
Vue.use(MinCache,{timeout: 6}) Vue.use(MinCache,{timeout: 6})
//判定isCloud
Vue.prototype.isCloud=true;
// store // store
Vue.prototype.isCloud=true
Vue.prototype.$store=store; Vue.prototype.$store=store;
// tip // tip
Vue.prototype.$tip=tip; Vue.prototype.$tip=tip;
......
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
}, },
"icons" : { "icons" : {
"android" : { "android" : {
"hdpi" : "C:/Users/84272/Desktop/logo.png", "hdpi" : "",
"xhdpi" : "unpackage/res/icons/96x96.png", "xhdpi" : "",
"xxhdpi" : "unpackage/res/icons/144x144.png", "xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png" "xxxhdpi" : "unpackage/res/icons/192x192.png"
}, },
......
{ {
"pages": [ "pages": [
// 云erp // 云erp
{ {
"path": "pages/login/cusmerLogin", "path": "pages/login/cusmerLogin",
...@@ -9,8 +10,7 @@ ...@@ -9,8 +10,7 @@
"path": "pages/login/login", "path": "pages/login/login",
"style": {} "style": {}
}, },
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
......
...@@ -140,7 +140,6 @@ ...@@ -140,7 +140,6 @@
immediate: true, immediate: true,
handler:function(val,oldVal){ handler:function(val,oldVal){
this.initMenu() this.initMenu()
console.log("立即执行")
this.apiqx() this.apiqx()
}, },
}, },
...@@ -235,11 +234,6 @@ ...@@ -235,11 +234,6 @@
isShow(){ isShow(){
this.show=true this.show=true
}, },
isNotshow(){
setTimeout(()=>{
this.show=false
},10)
},
initMenu(){ initMenu(){
console.log("-----------home------------") console.log("-----------home------------")
this.onSocketOpen() this.onSocketOpen()
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
</template> </template>
<script> <script>
import Vue from 'vue'
import md5 from '../../common/util/md5.js' import md5 from '../../common/util/md5.js'
import { ACCESS_TOKEN,USER_NAME,USER_INFO } from "@/common/util/constants" import { ACCESS_TOKEN,USER_NAME,USER_INFO } from "@/common/util/constants"
import { mapActions } from "vuex" import { mapActions } from "vuex"
...@@ -112,7 +113,6 @@ ...@@ -112,7 +113,6 @@
}, },
onLoad:function(da){ onLoad:function(da){
this.isCloud=true
if(da&&da.query){ if(da&&da.query){
let infor=JSON.parse(da.query).infor let infor=JSON.parse(da.query).infor
this.userName=infor.userName this.userName=infor.userName
...@@ -166,10 +166,12 @@ ...@@ -166,10 +166,12 @@
}, },
methods: { methods: {
...mapActions([ "mLogin","PhoneLogin","ThirdLogin" ]), ...mapActions([ "mLogin","PhoneLogin","ThirdLogin" ]),
// test
// 二次登录 // 二次登录
loginT(){ loginT(){
let _this =this; let _this =this;
http.config.baseUrl = "http://localhost:9090/erp"; http.config.baseUrl = "http://192.168.30.16:9090/erp";
this.$http.post(this.loginurl,{}).then((resp) => { this.$http.post(this.loginurl,{}).then((resp) => {
if(resp.data.success){ if(resp.data.success){
console.log("success") console.log("success")
...@@ -209,21 +211,22 @@ ...@@ -209,21 +211,22 @@
console.log("用户名获取成功") console.log("用户名获取成功")
} }
}); });
this.$router.go(0)
//ACCESS_TOKEN //ACCESS_TOKEN
this.$tip.success('登录成功!') this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'index'}) this.$Router.replaceAll({name:'index'})
// #ifdef APP-PLUS // #ifdef APP-PLUS
// this.saveClientId() // this.saveClientId()
// #endif // #endif
// #ifndef APP-PLUS // #ifndef APP-PLUS
this.$tip.success('登录成功!') this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'index'})
// #endif // #endif
}else{ }else{
this.$tip.alert(resp.data.message||"登录失败"); this.$tip.alert(resp.data.message||"登录失败");
} }
}) })
}, },
changErp(){ changErp(){
this.$Router.replaceAll({name:'login'}) this.$Router.replaceAll({name:'login'})
...@@ -241,7 +244,7 @@ ...@@ -241,7 +244,7 @@
onLogin: function (){ onLogin: function (){
// http.config.baseUrl='http://'+this.fwq+'/'+this.dkh // http.config.baseUrl='http://'+this.fwq+'/'+this.dkh
let _this=this; let _this=this;
http.config.baseUrl = "http://localhost:9080/" http.config.baseUrl = "http://192.168.30.16:9080/"
if(!this.userName || this.userName.length==0){ if(!this.userName || this.userName.length==0){
this.$tip.toast('请填写用户名'); this.$tip.toast('请填写用户名');
return; return;
...@@ -258,7 +261,8 @@ ...@@ -258,7 +261,8 @@
let params={ let params={
userid: loginParams.username, userid: loginParams.username,
password: loginParams.encodePWD, password: loginParams.encodePWD,
newPassword:md5(this.password) newPassword:md5(this.password),
appbz:true
} }
this.loading=true; this.loading=true;
setTimeout(()=>{ setTimeout(()=>{
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
</template> </template>
<script> <script>
import Vue from 'vue'
import md5 from '../../common/util/md5.js' import md5 from '../../common/util/md5.js'
import { ACCESS_TOKEN,USER_NAME,USER_INFO } from "@/common/util/constants" import { ACCESS_TOKEN,USER_NAME,USER_INFO } from "@/common/util/constants"
import { mapActions } from "vuex" import { mapActions } from "vuex"
...@@ -120,7 +121,8 @@ ...@@ -120,7 +121,8 @@
}, },
onLoad:function(da){ onLoad:function(da){
this.isCloud=false Vue.prototype.isCloud=false
console.log(this.isCloud)
if(da&&da.query){ if(da&&da.query){
let infor=JSON.parse(da.query).infor let infor=JSON.parse(da.query).infor
this.userName=infor.userName this.userName=infor.userName
...@@ -257,6 +259,7 @@ ...@@ -257,6 +259,7 @@
console.log("用户名获取成功") console.log("用户名获取成功")
} }
}); });
//ACCESS_TOKEN //ACCESS_TOKEN
this.$tip.success('登录成功!') this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'index'}) this.$Router.replaceAll({name:'index'})
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<text class="text-grey">设置</text> <text class="text-grey">设置</text>
</view> </view>
</navigator> </navigator>
<navigator style="" class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]" :url="isCloud?'/pages/login/login':'/pages/login/cusmerLogin'" hover-class="none"> <navigator style="" class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]" :url="isCloud?'/pages/login/cusmerLogin':'/pages/login/login'" hover-class="none">
<view class="content" @click="clearToken()"> <view class="content" @click="clearToken()">
<text class="cuIcon-exit text-cyan"></text> <text class="cuIcon-exit text-cyan"></text>
<text class="text-grey">退出</text> <text class="text-grey">退出</text>
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
cur: { cur: {
immediate: true, immediate: true,
handler() { handler() {
console.log(this.isCloud)
let that=this let that=this
uni.getStorage({ uni.getStorage({
key:'userName', key:'userName',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment