t"> View File
@@ -1,24 +1,21 @@
1 1
 
2
-<view class="result-view" wx:if="{{isHightlight}}">
2
+<view class="result-view">
3 3
   <view class="logo">
4 4
     <image src="success.svg"></image>
5 5
   </view>
6 6
   <view class="content">
7
-    <text class="title">{{ title }}</text>
8
-    <view class="hint">
7
+    <text class="title">购买成功</text>
8
+    <!-- <view class="hint">
9 9
       <image src="/resources/trumpet.svg"></image>
10
-      <text>{{ desc }}</text>
11
-    </view>
10
+      <text>七天内发货</text>
11
+    </view> -->
12 12
     <view class="official-account">
13 13
       <official-account binderror="officialAccountError"></official-account>
14 14
     </view>
15 15
   </view>
16
-  <view class="action-bottom">
17
-    <view class="goOn" bindtap="{{ action }}">{{ btnTitle }}</view>
18
-  </view>
19 16
 </view>
20 17
 
21
-<view class="result-view" wx:else>
18
+<!-- <view class="result-view" wx:else>
22 19
   <view class="logo">
23 20
     <image src="success.svg"></image>
24 21
   </view>
@@ -30,4 +27,4 @@
30 27
     <view class="goOn" bindtap="{{ action }}">{{ btnTitle }}</view>
31 28
     <view class="detail" bindtap="navigateToVoucher" wx:if="{{ isVirtual }}">去查看</view>
32 29
   </view>
33
-</view>
30
+</view> -->

+ 1 - 1
src/template/resultView/resultView.wxss

@@ -28,7 +28,7 @@
28 28
   margin-top: 24rpx;
29 29
   font-size: 17pt;
30 30
   font-weight: 600;
31
-  color: #000;
31
+  color: #111;
32 32
 }
33 33
 .content .desc {
34 34
   margin-top: 24rpx;

+ 47 - 1
src/utils/network.js

@@ -149,7 +149,53 @@ function post(params, isTip = true) {
149 149
   })
150 150
 }
151 151
 
152
+function liveLogin(data) {
153
+  const params = data
154
+  wx.showLoading({
155
+    title: '加载中...',
156
+    mask: true
157
+  })
158
+  wx.login({
159
+    success(res1) {
160
+      if (res1.code) {
161
+        params.code = res1.code
162
+        wx.request({
163
+          url: urls.LIVE.LOGIN,
164
+          data: params,
165
+          method: 'POST',
166
+          header: {
167
+            'content-type': 'application/x-www-form-urlencoded'
168
+          },
169
+          success(res2) {
170
+            wx.setStorage({
171
+              key: 'userInfo',
172
+              data: res2.data.data
173
+            })
174
+          },
175
+          complete: () => {
176
+            wx.hideLoading()
177
+          }
178
+        })
179
+      } else {
180
+        wx.showToast({
181
+          title: '微信登录异常',
182
+          icon: 'none'
183
+        })
184
+        wx.hideLoading()
185
+      }
186
+    },
187
+    fail() {
188
+      wx.showToast({
189
+        title: '微信登录异常',
190
+        icon: 'none'
191
+      })
192
+      wx.hideLoading()
193
+    }
194
+  })
195
+}
196
+
152 197
 module.exports = {
153 198
   post,
154
-  login
199
+  login,
200
+  liveLogin
155 201
 }

+ 9 - 1
src/utils/urls.js

@@ -7,5 +7,13 @@ module.exports = {
7 7
 
8 8
   PACK: `${config.baseURL}/api/pack`,
9 9
   ORDER_CREATE: `${config.baseURL}/api/pay/wx/order_create`,
10
-  ORDER_CANCEL: `${config.baseURL}/api/pay/wx/order/cancel`
10
+  ORDER_CANCEL: `${config.baseURL}/api/pay/wx/order/cancel`,
11
+
12
+  LIVE: {
13
+    GOODS_DETAIL: `${config.baseURL}/api/live/goods/detail`,
14
+    ORDER_CREATE: `${config.baseURL}/api/live/order/create`,
15
+    ORDER_CANCEL: `${config.baseURL}/api/live/order/cancel`,
16
+    ROOM_ANCHOR: `${config.baseURL}/api/live/room/anchor/detail`,
17
+    LOGIN: `${config.baseURL}/api/mini/live/login`
18
+  }
11 19
 }

adminSystem - Gogs: Go Git Service

Nenhuma Descrição

_extends.js 41B

    module.exports = require("./extends.js");