xiansin 3 vuotta sitten
vanhempi
commit
feaa768746
3 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 1 0
      core/constant.js
  2. 1 0
      pages/index/index.vue
  3. 7 0
      pages/login/login.vue

+ 1 - 0
core/constant.js

xqd
@@ -1,4 +1,5 @@
 module.exports = {
    USER_TOKEN: 'vuex_user_token',
    USER_DATA: 'vuex_user_data',
+   USER_SCENE: 'vuex_user_scene',
 }

+ 1 - 0
pages/index/index.vue

xqd
@@ -75,6 +75,7 @@
 		onLoad(options){
 			this.scene = options.scene;
 			if(this.scene){
+				this.$u.vuex(this.$const.USER_SCENE,this.scene);
 				this.handleBind()
 			}
 

+ 7 - 0
pages/login/login.vue

xqd xqd
@@ -27,6 +27,8 @@
         },
         methods: {
             login(){
+                console.log('-->data',this.vuex_user_secne)
+                return
                 let _this = this;
                 uni.showLoading({title: '登录中...'})
                 uni.login({
@@ -88,6 +90,11 @@
                 uni.reLaunch({
                     url: this.redirect
                 });
+            },
+            handleBind(){
+                this.$u.api.userBind({scene:this.scene}).then(res => {
+
+                })
             }
         },
         onLoad(options) {