张延森 4 gadus atpakaļ
vecāks
revīzija
58cdc48457
2 mainītis faili ar 22 papildinājumiem un 17 dzēšanām
  1. 9
    5
      src/components/MainPage/index.vue
  2. 13
    12
      src/components/MainPage/page.scss

+ 9
- 5
src/components/MainPage/index.vue Parādīt failu

@@ -6,10 +6,10 @@
6 6
         <text>授权手机号</text>
7 7
         <text>申请使用您的手机号</text>
8 8
         <view class="flex-h">
9
-          <text @tap="ShowPhoneAuthPopup = false; $emit('UserInfoChange')">拒绝</text>
9
+          <text @tap="ShowPhoneAuthPopup = false; toIndexPage()">拒绝</text>
10 10
           <view class="flex-item"></view>
11
-          <text>允许</text>
12
-          <button open-type="getPhoneNumber" @getphonenumber="GetUserPhone">获取授权</button>
11
+          <text>确定</text>
12
+          <button class="autu-btn" open-type="getPhoneNumber" @getphonenumber="GetUserPhone">获取授权</button>
13 13
         </view>
14 14
       </view>
15 15
     </view>
@@ -18,7 +18,7 @@
18 18
         <text>授权头像</text>
19 19
         <text>申请使用您的头像</text>
20 20
         <view class="flex-h">
21
-          <text @tap="ShowUserIconAuthPopup = false; $emit('UserInfoChange')">拒绝</text>
21
+          <text @tap="ShowUserIconAuthPopup = false; toIndexPage()">拒绝</text>
22 22
           <view class="flex-item"></view>
23 23
           <text>允许</text>
24 24
           <button open-type="getUserInfo" @getuserinfo="GetUserIcon">获取授权</button>
@@ -81,6 +81,11 @@ export default {
81 81
     ...mapUserMutations([
82 82
       'EditUserInfo'
83 83
     ]),
84
+    toIndexPage () {
85
+      Taro.reLaunch({
86
+        url: '/pages/index/index'
87
+      })
88
+    },
84 89
     Init () {
85 90
       const _that = this
86 91
       let CurrentPageRoute = Taro.getCurrentPages()[Taro.getCurrentPages().length - 1].route
@@ -136,7 +141,6 @@ export default {
136 141
       }
137 142
     },
138 143
     GetUserPhone (e) {
139
-      console.log('------------->', e)
140 144
       for (let key in this.WxInfoData) {
141 145
         this.WxInfoData[key] = e.detail[key]
142 146
       }

+ 13
- 12
src/components/MainPage/page.scss Parādīt failu

@@ -37,6 +37,7 @@
37 37
         overflow: hidden;
38 38
         align-items: center;
39 39
         margin-top: 60px;
40
+        text-align: center;
40 41
         > text {
41 42
           width: 200px;
42 43
           font-size: 28px;
@@ -51,18 +52,18 @@
51 52
             background: #ccc;
52 53
           }
53 54
         }
54
-        > button {
55
-          display: block;
56
-          width: 200px;
57
-          position: absolute;
58
-          right: 60px;
59
-          line-height: 80px;
60
-          height: 80px;
61
-          max-height: 80px;
62
-          top: 0;
63
-          z-index: 2;
64
-          opacity: 0;
65
-        }
55
+        // > button {
56
+        //   display: block;
57
+        //   width: 200px;
58
+        //   position: absolute;
59
+        //   right: 60px;
60
+        //   line-height: 80px;
61
+        //   height: 80px;
62
+        //   max-height: 80px;
63
+        //   top: 0;
64
+        //   z-index: 2;
65
+        //   opacity: 0;
66
+        // }
66 67
       }
67 68
     }
68 69
   }