Authored by 李奇

配置问价集中、上报事件添加

//export const API_HOST = 'https://api.yoho.cn';
//export const SERVICE_HOST = 'https://api.yoho.cn';
export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3';
export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile';
// 线上环境
export const API_HOST = 'https://api.yoho.cn';
export const SERVICE_HOST = 'https://api.yoho.cn';
export const ACTIVITY_HOST = 'https://action.yoho.cn';
// export const ACTIVITY_HOST = 'http://192.168.102.49:6006';
// export const ACTIVITY_HOST = 'http://172.16.10.53:6006'
export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com';
//export const ACTIVITY_HOST = 'https://action.yoho.cn';
// 测试环境
// export const API_HOST = 'http://api-test3.dev.yohocorp.com';
// export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
// export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com';
// export const API_HOST = 'http://dev-api.yohops.com:9999';
// export const SERVICE_HOST = 'http://dev-api.yohops.com:9999/';
... ... @@ -14,8 +14,6 @@ export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yo
// export const API_HOST = 'http://api-test1.yohops.com:9999';
// export const SERVICE_HOST = 'http://api-test1.yohops.com:9999/';
export const API_HOST = 'http://api-test3.dev.yohocorp.com';
export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
// export const API_HOST = 'http://api-test2.dev.yohocorp.com';
// export const SERVICE_HOST = 'http://api-test2.dev.yohocorp.com';
... ... @@ -24,6 +22,9 @@ export const ACTIVITY_HOST = 'http://yoho-activity-platform.test3.ingress.dev.yo
// export const API_HOST = 'https://apigray.yoho.cn';
// export const SERVICE_HOST = 'https://apigray.yoho.cn';
export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3';
export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile';
export const MINI_APP_TYPE = 29;
export const MINI_QR_TYPE = 16;
export const PAYMENT_CODE = '45';
... ...
... ... @@ -13,7 +13,8 @@ Component({
properties: {
item: {
type: Object
}
},
tabIdx: String
},
/**
... ... @@ -49,6 +50,7 @@ Component({
});
} else {
router.go('detail', {
tabIdx: +this.data.tabIdx + 1,
actPrizeId: this.properties.item.act_prize_id
});
}
... ...
... ... @@ -4,11 +4,13 @@ Component({
properties: {
product: {
type: Object
}
},
tabIdx: String
},
methods: {
onClick() {
router.go('detail', {
tabIdx: +this.data.tabIdx + 1,
actPrizeId: this.properties.product.id
});
}
... ...
... ... @@ -5,12 +5,14 @@ Component({
properties: {
product: {
type: Object
}
},
tabIdx: String
},
methods: {
goDetail() {
router.go('detail', {
tabIdx: +this.data.tabIdx + 1,
actPrizeId: this.properties.product.id
});
}
... ...
<view class="product-item" bindtap="goDetail">
<product-item-header product="{{product}}"></product-item-header>
<product-item-status product="{{product}}"></product-item-status>
<product-item-status product="{{product}}" tab-idx="{{tabIdx}}"></product-item-status>
</view>
\ No newline at end of file
... ...
... ... @@ -22,6 +22,7 @@ import {jumpByUrl} from '../../libs/urlRoute';
import {
yasReport,
YB_PAGE_OPEN_L,
YB_LUCK_DT_GDS_C,
YB_LUCK_DT_JOIN_C
} from '../../libs/yas';
... ... @@ -60,6 +61,7 @@ Page(Object.assign({
* 页面的初始数据
*/
data: {
tabIdx: '',
show: false,
showAuth: false,
actPrizeId: '',
... ... @@ -121,6 +123,10 @@ Page(Object.assign({
if (options.shareUid) {
data.shareUid = options.shareUid;
}
if (options.tabIdx) {
data.tabIdx = options.tabIdx;
}
if (options.actPrizeId) {
data.actPrizeId = options.actPrizeId;
... ... @@ -220,17 +226,10 @@ Page(Object.assign({
},
goToGroupMiniApp(e) {
console.log(e);
console.log(e.detail);
yasReport(YB_LUCK_DT_GDS_C, {ACTIVITY_ID: this.data.actPrizeId, PRD_SKN: e.detail.product_skn, TAB_ID: this.data.tabIdx});
wx.navigateToMiniProgram({
appId: 'wx207f18be42db9028',
path: `pages/group/detail?productSkn=${e.detail.product_skn}&activityId=${e.detail.activity_id}&page_param=${e.detail.activity_id}`,
success(res) {
},
fail(error) {
}
path: `pages/group/detail?productSkn=${e.detail.product_skn}&activityId=${e.detail.activity_id}&page_param=${e.detail.activity_id}`
})
},
... ... @@ -546,7 +545,7 @@ Page(Object.assign({
router.go('index');
},
reportSuccess({detail}) {
yasReport(YB_LUCK_DT_JOIN_C, {MAIN_SKN: detail})
yasReport(YB_LUCK_DT_JOIN_C, {ACTIVITY_ID: detail})
},
getUserInfo: function (e) {
... ...
<!--page/subPackage/pages/zeroSell/detail.wxml-->
<block wx:if="{{show}}">
<view class="header {{shareFlag || 'mt-header'}}" >
... ... @@ -38,7 +37,7 @@
<more wx:if="{{recommends.length > 0}}">
<block wx:for="{{recommends}}">
<view class="product-item">
<product-item product="{{item}}"></product-item>
<product-item product="{{item}}" tab-idx="{{tabIdx - 1}}"></product-item>
</view>
</block>
</more>
... ...
... ... @@ -106,9 +106,7 @@ Page(Object.assign({
this._init();
}
new app.WeToast();
console.log(options.reload);
if(options && (Number(options.reload) !== 0)) {
console.log('执行了');
this._getResouceCode()
}
this._getBottomBanner();
... ... @@ -287,7 +285,6 @@ Page(Object.assign({
let oldData = my_zero_list[type].data;
let key = `my_zero_list[${type}].data`;
let keyPage = `my_zero_list[${type}].page`;
console.log('执行了');
this.service.getMyList({type, page}).then(res => {
let data = []
if (res && res.code === 200) {
... ... @@ -315,7 +312,6 @@ Page(Object.assign({
let oldData = my_zero_list[type].data;
let key = `my_zero_list[${type}].data`;
let keyPage = `my_zero_list[${type}].page`;
console.log('执行了');
this.service.getMyList({ type, page }).then(res => {
let data = []
if (res && res.code === 200) {
... ...
... ... @@ -5,7 +5,7 @@
<image class="topgif" src="./images/yoluck.gif"/>
<view class="productList">
<block wx:for="{{list[0].products}}" wx:key="{{item.id}}">
<product-item product="{{item}}" class="product"></product-item>
<product-item product="{{item}}" class="product" tab-idx="{{tabIndex}}"></product-item>
</block>
</view>
</tabs-pane>
... ... @@ -13,7 +13,7 @@
<tabs-pane name="即将开始">
<view class="productList">
<block wx:for="{{list[1].products}}" wx:key="{{item.id}}">
<product-item product="{{item}}" class="product"></product-item>
<product-item product="{{item}}" class="product" tab-idx="{{tabIndex}}"></product-item>
</block>
</view>
</tabs-pane>
... ... @@ -21,7 +21,7 @@
<tabs-pane name="已结束">
<view class="productList">
<block wx:for="{{list[2].products}}" wx:key="{{item.id}}">
<product-item product="{{item}}" class="product"></product-item>
<product-item product="{{item}}" class="product" tab-idx="{{tabIndex}}"></product-item>
</block>
</view>
</tabs-pane>
... ... @@ -38,7 +38,7 @@
</block>
<block wx:else>
<block wx:for="{{my_zero_list[0].data}}">
<prize-item item="{{item}}" bindshare="share"></prize-item>
<prize-item item="{{item}}" bindshare="share" tab-idx="{{tabIndex}}"></prize-item>
</block>
</block>
<view class="title-view">
... ... @@ -51,7 +51,7 @@
</block>
<block wx:else>
<block wx:for="{{my_zero_list[1].data}}">
<prize-item item="{{item}}" bindshare="share"></prize-item>
<prize-item item="{{item}}" bindshare="share" tab-idx="{{tabIndex}}"></prize-item>
</block>
</block>
</block>
... ...
... ... @@ -10,13 +10,10 @@ class Service {
_get(path, data) {
let method = path ? this.url + path : API_HOST;
console.log(`request => ${data.method || method} =>`, data);
return GET(method, data).then(result => {
if (result.code !== 200) {
console.error(`response => ${data.method || method} =>`, result);
} else {
console.log(`response => ${data.method || method} =>`, result);
}
return result
});
... ... @@ -25,13 +22,10 @@ class Service {
_post(path, data) {
let method = path ? this.url + path : API_HOST;
console.log(`request => ${data.method || method} =>`, data);
return POST(method, data).then(result => {
if (result.code !== 200) {
console.error(`response => ${data.method || method} =>`, result);
} else {
console.log(`response => ${data.method || method} =>`, result);
}
return result;
});
... ...