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'
console.log("main")
// 注册缓存器
Vue.use(MinCache,{timeout: 6})
//判定isCloud
Vue.prototype.isCloud=true;
// store
Vue.prototype.isCloud=true
Vue.prototype.$store=store;
// tip
Vue.prototype.$tip=tip;
......
......@@ -58,8 +58,8 @@
},
"icons" : {
"android" : {
"hdpi" : "C:/Users/84272/Desktop/logo.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"hdpi" : "",
"xhdpi" : "",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
......
{
"pages": [
// 云erp
{
"path": "pages/login/cusmerLogin",
......@@ -10,7 +11,6 @@
"style": {}
},
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
......
......@@ -140,7 +140,6 @@
immediate: true,
handler:function(val,oldVal){
this.initMenu()
console.log("立即执行")
this.apiqx()
},
},
......@@ -235,11 +234,6 @@
isShow(){
this.show=true
},
isNotshow(){
setTimeout(()=>{
this.show=false
},10)
},
initMenu(){
console.log("-----------home------------")
this.onSocketOpen()
......
......@@ -74,6 +74,7 @@
</template>
<script>
import Vue from 'vue'
import md5 from '../../common/util/md5.js'
import { ACCESS_TOKEN,USER_NAME,USER_INFO } from "@/common/util/constants"
import { mapActions } from "vuex"
......@@ -112,7 +113,6 @@
},
onLoad:function(da){
this.isCloud=true
if(da&&da.query){
let infor=JSON.parse(da.query).infor
this.userName=infor.userName
......@@ -166,10 +166,12 @@
},
methods: {
...mapActions([ "mLogin","PhoneLogin","ThirdLogin" ]),
// test
// 二次登录
loginT(){
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) => {
if(resp.data.success){
console.log("success")
......@@ -209,6 +211,7 @@
console.log("用户名获取成功")
}
});
this.$router.go(0)
//ACCESS_TOKEN
this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'index'})
......@@ -217,13 +220,13 @@
// #endif
// #ifndef APP-PLUS
this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'index'})
// #endif
}else{
this.$tip.alert(resp.data.message||"登录失败");
}
})
},
changErp(){
this.$Router.replaceAll({name:'login'})
......@@ -241,7 +244,7 @@
onLogin: function (){
// http.config.baseUrl='http://'+this.fwq+'/'+this.dkh
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){
this.$tip.toast('请填写用户名');
return;
......@@ -258,7 +261,8 @@
let params={
userid: loginParams.username,
password: loginParams.encodePWD,
newPassword:md5(this.password)
newPassword:md5(this.password),
appbz:true
}
this.loading=true;
setTimeout(()=>{
......
......@@ -84,6 +84,7 @@
</template>
<script>
import Vue from 'vue'
import md5 from '../../common/util/md5.js'
import { ACCESS_TOKEN,USER_NAME,USER_INFO } from "@/common/util/constants"
import { mapActions } from "vuex"
......@@ -120,7 +121,8 @@
},
onLoad:function(da){
this.isCloud=false
Vue.prototype.isCloud=false
console.log(this.isCloud)
if(da&&da.query){
let infor=JSON.parse(da.query).infor
this.userName=infor.userName
......@@ -257,6 +259,7 @@
console.log("用户名获取成功")
}
});
//ACCESS_TOKEN
this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'index'})
......
......@@ -41,7 +41,7 @@
<text class="text-grey">设置</text>
</view>
</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()">
<text class="cuIcon-exit text-cyan"></text>
<text class="text-grey">退出</text>
......@@ -88,6 +88,7 @@
cur: {
immediate: true,
handler() {
console.log(this.isCloud)
let that=this
uni.getStorage({
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