Showing
6 changed files
with
11 additions
and
31 deletions
config.js
deleted
100644 → 0
1 | -/* eslint-disable */ | ||
2 | -export default { | ||
3 | - "domains": { | ||
4 | - "api": "https://api.yoho.cn", | ||
5 | - // "api": 'http://api-test2.dev.yohocorp.com', | ||
6 | - "service": "https://api.yoho.cn", | ||
7 | - "yas": "https://analysis.yohobuy.com/yas_mobile", | ||
8 | - "report": "https://app.yoho.cn/collect/v3" | ||
9 | - }, | ||
10 | - "appid": "wx7678b61d1e6702fe", | ||
11 | - "payment_code": "45", | ||
12 | - "private_key": "b43890b0a296ff3c7b8c260ca763980b", | ||
13 | - "jump": { | ||
14 | - "brand": "go.brand", | ||
15 | - "detail": "go.detail", | ||
16 | - "productpool": "go.poollist" | ||
17 | - }, | ||
18 | - "mini_app_type": "29", | ||
19 | - "client_type": "miniapp", | ||
20 | - "business_line": "minappLuck", | ||
21 | - "os_version": "yohobuy:h5", | ||
22 | - "app_version": "2.8.3", | ||
23 | - "app_build": "1032", | ||
24 | - "mini_qr_type": 16 | ||
25 | -} |
@@ -5,12 +5,12 @@ | @@ -5,12 +5,12 @@ | ||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | import { GET } from '../../../libs/request'; | 7 | import { GET } from '../../../libs/request'; |
8 | -import config from '../../../config.js'; | 8 | +import {API_HOST} from '../../../libs/config.js'; |
9 | import regeneratorRuntime from '../../libs/regenerator-runtime/index.js'; | 9 | import regeneratorRuntime from '../../libs/regenerator-runtime/index.js'; |
10 | 10 | ||
11 | export default class BaseService { | 11 | export default class BaseService { |
12 | constructor() { | 12 | constructor() { |
13 | - this.url = config.domains.service; | 13 | + this.url = API_HOST; |
14 | } | 14 | } |
15 | 15 | ||
16 | async GET(params, options) { | 16 | async GET(params, options) { |
1 | import BaseService from './base-service.js'; | 1 | import BaseService from './base-service.js'; |
2 | -import config from '../../../config.js'; | 2 | +import {MINI_APP_TYPE} from '../../../libs/config.js'; |
3 | import regeneratorRuntime from '../../libs/regenerator-runtime/index.js'; | 3 | import regeneratorRuntime from '../../libs/regenerator-runtime/index.js'; |
4 | 4 | ||
5 | const WECHAT_SMALLPROGRAM_ONLOGIN = 'wechat.smallProgram.onLogin'; | 5 | const WECHAT_SMALLPROGRAM_ONLOGIN = 'wechat.smallProgram.onLogin'; |
@@ -16,7 +16,7 @@ export default class LoginService extends BaseService { | @@ -16,7 +16,7 @@ export default class LoginService extends BaseService { | ||
16 | return await this.GET({ | 16 | return await this.GET({ |
17 | method: WECHAT_SMALLPROGRAM_ONLOGIN, | 17 | method: WECHAT_SMALLPROGRAM_ONLOGIN, |
18 | jsCode: code, | 18 | jsCode: code, |
19 | - miniapp_type: config.mini_app_type | 19 | + miniapp_type: MINI_APP_TYPE |
20 | }, { | 20 | }, { |
21 | path: WechatPath | 21 | path: WechatPath |
22 | }) | 22 | }) |
@@ -70,7 +70,7 @@ Component({ | @@ -70,7 +70,7 @@ Component({ | ||
70 | show: true, | 70 | show: true, |
71 | code: result.data.prizeCode | 71 | code: result.data.prizeCode |
72 | }); | 72 | }); |
73 | - | 73 | + this.triggerEvent('gaincodesuccess', this.properties.actPrizeId); |
74 | } else { | 74 | } else { |
75 | this.setData({ | 75 | this.setData({ |
76 | error: true, | 76 | error: true, |
@@ -21,7 +21,8 @@ import {formatImageUrl} from '../../utils/util' | @@ -21,7 +21,8 @@ import {formatImageUrl} from '../../utils/util' | ||
21 | import {jumpByUrl} from '../../libs/urlRoute'; | 21 | import {jumpByUrl} from '../../libs/urlRoute'; |
22 | import { | 22 | import { |
23 | yasReport, | 23 | yasReport, |
24 | - YB_PAGE_OPEN_L | 24 | + YB_PAGE_OPEN_L, |
25 | + YB_LUCK_DT_JOIN_C | ||
25 | } from '../../libs/yas'; | 26 | } from '../../libs/yas'; |
26 | 27 | ||
27 | const ACTIVITY = { | 28 | const ACTIVITY = { |
@@ -544,6 +545,9 @@ Page(Object.assign({ | @@ -544,6 +545,9 @@ Page(Object.assign({ | ||
544 | goList() { | 545 | goList() { |
545 | router.go('index'); | 546 | router.go('index'); |
546 | }, | 547 | }, |
548 | + reportSuccess({detail}) { | ||
549 | + yasReport(YB_LUCK_DT_JOIN_C, {MAIN_SKN: detail}) | ||
550 | + }, | ||
547 | 551 | ||
548 | getUserInfo: function (e) { | 552 | getUserInfo: function (e) { |
549 | var that = this; | 553 | var that = this; |
@@ -52,6 +52,7 @@ | @@ -52,6 +52,7 @@ | ||
52 | <view class="action-bar"> | 52 | <view class="action-bar"> |
53 | <action-bar wx:if="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}" | 53 | <action-bar wx:if="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}" |
54 | act-prize-id="{{actPrizeId}}" bindgetcode="changeActionStatus" bindshare="share" | 54 | act-prize-id="{{actPrizeId}}" bindgetcode="changeActionStatus" bindshare="share" |
55 | + bindgaincodesuccess="reportSuccess" | ||
55 | ></action-bar> | 56 | ></action-bar> |
56 | 57 | ||
57 | <block wx:else> | 58 | <block wx:else> |
-
Please register or login to post a comment