Showing
5 changed files
with
45 additions
and
15 deletions
1 | // 线上环境 | 1 | // 线上环境 |
2 | -export const API_HOST = 'https://api.yoho.cn'; | ||
3 | -export const SERVICE_HOST = 'https://api.yoho.cn'; | ||
4 | -export const ACTIVITY_HOST = 'https://action.yoho.cn'; | 2 | +// export const API_HOST = 'https://api.yoho.cn'; |
3 | +// export const SERVICE_HOST = 'https://api.yoho.cn'; | ||
4 | +// export const ACTIVITY_HOST = 'https://action.yoho.cn'; | ||
5 | 5 | ||
6 | // 测试环境 | 6 | // 测试环境 |
7 | -// export const API_HOST = 'http://api-test3.dev.yohocorp.com'; | ||
8 | -// export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com'; | ||
9 | -// export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com'; | ||
10 | - | 7 | +export const API_HOST = 'http://api-test3.dev.yohocorp.com'; |
8 | +export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com'; | ||
9 | +//export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com'; | ||
10 | +export const ACTIVITY_HOST = 'http://192.168.102.49:6006' | ||
11 | // export const API_HOST = 'http://dev-api.yohops.com:9999'; | 11 | // export const API_HOST = 'http://dev-api.yohops.com:9999'; |
12 | // export const SERVICE_HOST = 'http://dev-api.yohops.com:9999/'; | 12 | // export const SERVICE_HOST = 'http://dev-api.yohops.com:9999/'; |
13 | 13 |
@@ -12,8 +12,22 @@ Component({ | @@ -12,8 +12,22 @@ Component({ | ||
12 | text: { | 12 | text: { |
13 | type: String, | 13 | type: String, |
14 | value: "", | 14 | value: "", |
15 | - observer: function(value){ | ||
16 | - this.setData({_text:value}) | 15 | + observer: function (value) { |
16 | + this.setData({_text: value }) | ||
17 | + } | ||
18 | + }, | ||
19 | + copyText: { | ||
20 | + type: String, | ||
21 | + value: '', | ||
22 | + observer: function (value) { | ||
23 | + this.setData({_copyText: value }) | ||
24 | + } | ||
25 | + }, | ||
26 | + type: { | ||
27 | + type: Number, | ||
28 | + value: 0, | ||
29 | + observer: function (value) { | ||
30 | + this.setData({_type: value }) | ||
17 | } | 31 | } |
18 | } | 32 | } |
19 | }, | 33 | }, |
@@ -22,7 +36,9 @@ Component({ | @@ -22,7 +36,9 @@ Component({ | ||
22 | * 组件的初始数据 | 36 | * 组件的初始数据 |
23 | */ | 37 | */ |
24 | data: { | 38 | data: { |
25 | - _text:'', | 39 | + _type: "", |
40 | + _copyText: '', | ||
41 | + _text: '', | ||
26 | _show: false | 42 | _show: false |
27 | }, | 43 | }, |
28 | 44 | ||
@@ -31,6 +47,17 @@ Component({ | @@ -31,6 +47,17 @@ Component({ | ||
31 | */ | 47 | */ |
32 | methods: { | 48 | methods: { |
33 | onConfirm() { | 49 | onConfirm() { |
50 | + if (this.data._copyText) { | ||
51 | + wx.setClipboardData({ | ||
52 | + data: this.data._copyText, | ||
53 | + success() { | ||
54 | + }, | ||
55 | + fail() { | ||
56 | + }, | ||
57 | + complete() { | ||
58 | + } | ||
59 | + }) | ||
60 | + } | ||
34 | this.triggerEvent('ok') | 61 | this.triggerEvent('ok') |
35 | }, | 62 | }, |
36 | 63 |
1 | <zero-alert wx:if="{{_show}}"> | 1 | <zero-alert wx:if="{{_show}}"> |
2 | - <view class="content" wx:if="{{!_text}}"> | 2 | + <view class="content" wx:if="{{!_type == 1}}"> |
3 | <view>微信搜索公众号</view> | 3 | <view>微信搜索公众号</view> |
4 | <view><text style="font-weight: bolder;">“潮流有货”</text>并关注,发送</view> | 4 | <view><text style="font-weight: bolder;">“潮流有货”</text>并关注,发送</view> |
5 | <view>关键词<text style="font-weight: bolder;">“开奖”</text>查询中奖信息</view> | 5 | <view>关键词<text style="font-weight: bolder;">“开奖”</text>查询中奖信息</view> |
@@ -22,7 +22,9 @@ Component({ | @@ -22,7 +22,9 @@ Component({ | ||
22 | */ | 22 | */ |
23 | data: { | 23 | data: { |
24 | show: false, | 24 | show: false, |
25 | - text: '' | 25 | + text: '', |
26 | + copyText: '', | ||
27 | + type: 0 | ||
26 | }, | 28 | }, |
27 | 29 | ||
28 | /** | 30 | /** |
@@ -31,10 +33,11 @@ Component({ | @@ -31,10 +33,11 @@ Component({ | ||
31 | methods: { | 33 | methods: { |
32 | goFellow(e) { | 34 | goFellow(e) { |
33 | let text = JSON.parse(e.target.dataset.text || "{}"); | 35 | let text = JSON.parse(e.target.dataset.text || "{}"); |
34 | - debugger; | ||
35 | this.setData({ | 36 | this.setData({ |
36 | show: true, | 37 | show: true, |
37 | - text:text.miniapp || '' | 38 | + text: text.miniappTip || '', |
39 | + copyText: text.miniappCopy || '', | ||
40 | + type: text.miniappType || 0 | ||
38 | }) | 41 | }) |
39 | }, | 42 | }, |
40 | goShare() { | 43 | goShare() { |
-
Please register or login to post a comment