xiongzhu 3 лет назад
Родитель
Сommit
843eeb56b3
4 измененных файлов с 14 добавлено и 7 удалено
  1. 1 1
      src/main.js
  2. 3 3
      src/views/Home.vue
  3. 3 3
      src/views/Mine.vue
  4. 7 0
      src/views/account/Setting.vue

+ 1 - 1
src/main.js

@@ -205,7 +205,7 @@ if (navigator.userAgent.includes('#cordova#')) {
             StatusBar.overlaysWebView(true);
             if ('1' === window.localStorage.getItem('AppTips')) {
                 try {
-                    window.cordova.plugins.UmengPlugin.initPush(deviceToken => {
+                    window.cordova.plugins.UmengPlugin.init(deviceToken => {
                         console.log('deviceToken=' + deviceToken);
                     });
                 } catch (e) {}

+ 3 - 3
src/views/Home.vue

@@ -323,7 +323,7 @@ export default {
                         window.localStorage.setItem('AppTips', '1');
                         this.showRisk();
                         try {
-                            window.cordova.plugins.UmengPlugin.initPush(deviceToken => {
+                            window.cordova.plugins.UmengPlugin.init(deviceToken => {
                                 console.log('deviceToken=' + deviceToken);
                             });
                         } catch (e) {}
@@ -353,7 +353,7 @@ export default {
                         window.localStorage.setItem('AppTips', '1');
                         this.showRisk();
                         try {
-                            window.cordova.plugins.UmengPlugin.initPush(deviceToken => {
+                            window.cordova.plugins.UmengPlugin.init(deviceToken => {
                                 console.log('deviceToken=' + deviceToken);
                             });
                         } catch (e) {}
@@ -402,7 +402,7 @@ export default {
                             companyId: 1
                         },
                         size: 5,
-                        sort:'id,desc'
+                        sort: 'id,desc'
                     },
                     { body: 'json' }
                 )

+ 3 - 3
src/views/Mine.vue

@@ -331,10 +331,10 @@ export default {
             this.$http.get('/userDetail/get/' + this.userInfo.id).then(res => {
                 this.info = res;
             });
+            this.$http.get('/userDetail/light/' + this.userInfo.id).then(res => {
+                this.light = res;
+            });
         }
-        this.$http.get('/userDetail/light/' + this.userInfo.id).then(res => {
-            this.light = res;
-        });
     },
     methods: {
         getInit(refresh) {

+ 7 - 0
src/views/account/Setting.vue

@@ -361,6 +361,7 @@ export default {
             }
             let data = {
                 userId: this.userInfo.id,
+                ...this.info,
                 home: this.region
             };
             this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
@@ -376,6 +377,7 @@ export default {
             this.currentDate = this.dayjs(this.currentDate).format('YYYY.MM.DD');
             let data = {
                 userId: this.userInfo.id,
+                ...this.info,
                 birthday: this.currentDate
             };
             this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
@@ -390,16 +392,19 @@ export default {
             if (this.title == 'gender') {
                 data = {
                     ...data,
+                    ...this.info,
                     sex: val.name
                 };
             } else if (this.title == 'blood') {
                 data = {
                     ...data,
+                    ...this.info,
                     blood: val.name
                 };
             } else if (this.title == 'constellation') {
                 data = {
                     ...data,
+                    ...this.info,
                     constellation: val.name
                 };
             }
@@ -416,6 +421,7 @@ export default {
             this.updateFile(e, 'avatar', 300).then(img => {
                 let data = {
                     userId: this.userInfo.id,
+                    ...this.info,
                     pic: img
                 };
                 this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {
@@ -436,6 +442,7 @@ export default {
             this.updateFile(e, 'bg', 1200).then(img => {
                 let data = {
                     userId: this.userInfo.id,
+                    ...this.info,
                     bgpic: img
                 };
                 this.$http.post('/userDetail/save', data, { body: 'json' }).then(() => {