555e973a7L69">69
"pathName": "pages/index/index",
- "query": "q=http://kodo.tamron.cn/v/0+21+KUjsUKURRRRRRUK6KxxK",
+ "query": "room_id=17",
"scene": 1011
},
{
@@ -1,7 +1,7 @@ |
||
| 1 | 1 |
//color |
| 2 | 2 |
@color-bg: #efefef; |
| 3 | 3 |
@color-dark-bg: #3e3e3e; |
| 4 |
-@color-black: #000; |
|
| 4 |
+@color-black: #111; |
|
| 5 | 5 |
@color-white: #fff; |
| 6 | 6 |
@color-brand: #09bb07; |
| 7 | 7 |
@color-other1: #d2b167; |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 |
width: 100%; |
| 39 | 39 |
height: 160rpx; |
| 40 | 40 |
background-color: #fff; |
| 41 |
- box-shadow: 0 -5px 9px 2px rgba(0, 0, 0, 0.1); |
|
| 41 |
+ box-shadow: 0 -5px 9px 2px rgba(17, 17, 17, 0.1); |
|
| 42 | 42 |
} |
| 43 | 43 |
.btn-footer1 button {
|
| 44 | 44 |
height: 100rpx; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 |
width: 100%; |
| 56 | 56 |
height: 160rpx; |
| 57 | 57 |
background-color: #fff; |
| 58 |
- box-shadow: 0 -5px 9px 2px rgba(0, 0, 0, 0.1); |
|
| 58 |
+ box-shadow: 0 -5px 9px 2px rgba(17, 17, 17, 0.1); |
|
| 59 | 59 |
} |
| 60 | 60 |
.btn-footer2 button {
|
| 61 | 61 |
height: 100rpx; |
@@ -13,32 +13,8 @@ Page({
|
||
| 13 | 13 |
isHightlight: false |
| 14 | 14 |
}, |
| 15 | 15 |
|
| 16 |
- onLoad(options) {
|
|
| 17 |
- if (options.goods) {
|
|
| 18 |
- const goods = JSON.parse(options.goods) |
|
| 19 |
- let desc = this.data.desc1 |
|
| 20 |
- if (goods.only_for_member) {
|
|
| 21 |
- desc = this.data.desc3 |
|
| 22 |
- } else if (goods.good_type === 0) {
|
|
| 23 |
- desc = this.data.desc2 |
|
| 24 |
- } |
|
| 25 |
- this.setData({
|
|
| 26 |
- isVirtual: goods.good_type === 1, |
|
| 27 |
- desc |
|
| 28 |
- }) |
|
| 29 |
- } else {
|
|
| 30 |
- const eventChannel = this.getOpenerEventChannel() |
|
| 31 |
- const that = this |
|
| 32 |
- eventChannel.on('acceptDataFromOpenerPage', data => {
|
|
| 33 |
- that.setData({
|
|
| 34 |
- title: data.title, |
|
| 35 |
- desc: data.desc, |
|
| 36 |
- action: 'navigateToMine', |
|
| 37 |
- btnTitle: data.btnTitle, |
|
| 38 |
- isHightlight: data.isHightlight |
|
| 39 |
- }) |
|
| 40 |
- }) |
|
| 41 |
- } |
|
| 16 |
+ onLoad() {
|
|
| 17 |
+ wx.hideHomeButton() |
|
| 42 | 18 |
}, |
| 43 | 19 |
|
| 44 | 20 |
navigateToMine() {
|
@@ -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> --> |
@@ -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; |
@@ -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 |
} |
@@ -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 |
} |