From 5514c2e037485210c497dab59862fb94b913e7a3 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Fri, 11 Jun 2021 12:08:36 +0800
Subject: [PATCH] 安卓端初版
---
pages/myself/childen/xinxi.vue | 7 +++++--
pages/loging/loging.vue | 4 +++-
store/mutations.js | 3 ++-
pages/workbench/workbench.vue | 2 +-
store/actions.js | 1 -
5 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/pages/loging/loging.vue b/pages/loging/loging.vue
index 5c07126..9788cd2 100644
--- a/pages/loging/loging.vue
+++ b/pages/loging/loging.vue
@@ -48,11 +48,13 @@
judgeUse() {
var login = WxStorage.get("init") //重复登入
var name = WxStorage.get("name")
+ var userID = WxStorage.get("ids")
// console.log(login);
if (login == "true" && name != '') {
//获取用户信息
var data = {
- userName: name
+ userName: name,
+ userID:userID
}
this.$store.commit('getUse', data)
wx.reLaunch({
diff --git a/pages/myself/childen/xinxi.vue b/pages/myself/childen/xinxi.vue
index 85621ef..7a4177e 100644
--- a/pages/myself/childen/xinxi.vue
+++ b/pages/myself/childen/xinxi.vue
@@ -48,6 +48,7 @@
</template>
<script>
+ import WxStorage from "../../../static/lib/wxStorage.js" //微信Storage
export default{
data(){
return{
@@ -74,9 +75,11 @@
//获取客户信息
getUserInfo(){
var that = this;
- var id = JSON.stringify(this.$store.state.puserID);
+ var id = JSON.stringify(that.$store.state.puserID);
+ var userID = WxStorage.get("ids")
+ console.log(userID)
uni.request({
- url: 'https://web.byisf.com/api/blade-user/details?id='+this.$store.state.puserID,
+ url: 'https://web.byisf.com/api/blade-user/details?id='+userID,
method:'POST',
success: (res) => {
that.user=res.data.data;
diff --git a/pages/workbench/workbench.vue b/pages/workbench/workbench.vue
index b8f08bd..35782a6 100644
--- a/pages/workbench/workbench.vue
+++ b/pages/workbench/workbench.vue
@@ -105,7 +105,7 @@
securityId: id
} : '',
that = this;
- console.log(this.$store.state.puserID)
+ console.log(this.$store.state.puserID,'worke')
wx.request({
url: url,
data: data,
diff --git a/store/actions.js b/store/actions.js
index b0267e4..d3bafbd 100644
--- a/store/actions.js
+++ b/store/actions.js
@@ -51,7 +51,6 @@
// data.userPhon = res.user_id;
store.commit('login', data);
}
- console.log(res)
},
fail: (res) => {
console.log('失去连接 请稍等');
diff --git a/store/mutations.js b/store/mutations.js
index e119ed5..adb6feb 100644
--- a/store/mutations.js
+++ b/store/mutations.js
@@ -12,6 +12,7 @@
//储存用户
WxStorage.set("init", "true");
WxStorage.set("name", data.userName);
+ WxStorage.set("ids", data.userID);
},
loginReset(state) { //重置
state.loging = false;
@@ -20,7 +21,7 @@
},
getUse(state,data){
state.puserName = data.userName;
- // console.log(state.puserName)
+ state.puserID = data.userID;
},
getUserData(state,data){
state.UserData = data;
--
Gitblit v1.9.3