Authored by 肖亚东

文件命名修改

@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 "pages/newsDetail/tags", 6 "pages/newsDetail/tags",
7 "pages/newsDetail/author", 7 "pages/newsDetail/author",
8 "pages/newsDetail/detail", 8 "pages/newsDetail/detail",
9 - "pages/schedule/schedule", 9 + "pages/activity/activity",
10 "pages/community/community", 10 "pages/community/community",
11 "pages/mars/mars", 11 "pages/mars/mars",
12 "pages/brands/brands", 12 "pages/brands/brands",
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 "selectedIconPath": "static/images/home_selected@3x.png" 33 "selectedIconPath": "static/images/home_selected@3x.png"
34 }, 34 },
35 { 35 {
36 - "pagePath": "pages/schedule/schedule", 36 + "pagePath": "pages/activity/activity",
37 "text": "时间表", 37 "text": "时间表",
38 "iconPath": "static/images/schedule@3x.png", 38 "iconPath": "static/images/schedule@3x.png",
39 "selectedIconPath": "static/images/schedule_selected@3x.png" 39 "selectedIconPath": "static/images/schedule_selected@3x.png"
  1 +<view class="activity-item" bindtap="jumpToDetail" data-id="{{data.id}}">
  2 + <view class="activity-info">
  3 + <view class="activity-time">{{data.activityTime}}</view>
  4 + <view class="activity-name">{{data.title}}</view>
  5 + <view class="activity-location">展位号:{{data.place}}</view>
  6 + </view>
  7 + <view wx:if="{{data.need_register === 'Y'}}" class="activity-apply {{data.registered === 'Y' ? 'inactive': ''}}" bindtap="onApplyAction" data-activity-id="123">{{data.registered? '已报名' : '报名'}}</view>
  8 +</view>
1 -.schedule-item { 1 +.activity-item {
2 margin: 0 30rpx 40rpx 30rpx; 2 margin: 0 30rpx 40rpx 30rpx;
3 width: 690rpx; 3 width: 690rpx;
4 height: 208rpx; 4 height: 208rpx;
@@ -9,32 +9,32 @@ @@ -9,32 +9,32 @@
9 border-radius: 2px; 9 border-radius: 2px;
10 } 10 }
11 11
12 -.schedule-info { 12 +.activity-info {
13 width: 70%; 13 width: 70%;
14 height: 100%; 14 height: 100%;
15 margin-left: 30rpx; 15 margin-left: 30rpx;
16 } 16 }
17 17
18 -.schedule-time { 18 +.activity-time {
19 margin-top: 30rpx; 19 margin-top: 30rpx;
20 color: #e0e0e0; 20 color: #e0e0e0;
21 font-size: 24rpx; 21 font-size: 24rpx;
22 } 22 }
23 23
24 -.schedule-name { 24 +.activity-name {
25 margin-top: 10rpx; 25 margin-top: 10rpx;
26 color: #4a4a4a; 26 color: #4a4a4a;
27 font-size: 30rpx; 27 font-size: 30rpx;
28 } 28 }
29 29
30 -.schedule-location { 30 +.activity-location {
31 margin-top: 10rpx; 31 margin-top: 10rpx;
32 color: #e2e2e2; 32 color: #e2e2e2;
33 font-size: 26rpx; 33 font-size: 26rpx;
34 margin-bottom: 30rpx; 34 margin-bottom: 30rpx;
35 } 35 }
36 36
37 -.schedule-item .schedule-apply { 37 +.activity-item .activity-apply {
38 background-color: #4a4a4a; 38 background-color: #4a4a4a;
39 color: white; 39 color: white;
40 font-size: 24rpx; 40 font-size: 24rpx;
@@ -47,6 +47,6 @@ @@ -47,6 +47,6 @@
47 border-radius: 6rpx; 47 border-radius: 6rpx;
48 } 48 }
49 49
50 -.schedule-item .inactive { 50 +.activity-item .inactive {
51 background-color: #e0e0e0; 51 background-color: #e0e0e0;
52 } 52 }
1 -<view class="schedule-item" bindtap="jumpToDetail" data-id="{{data.id}}">  
2 - <view class="schedule-info">  
3 - <view class="schedule-time">{{data.activityTime}}</view>  
4 - <view class="schedule-name">{{data.title}}</view>  
5 - <view class="schedule-location">展位号:{{data.place}}</view>  
6 - </view>  
7 - <view wx:if="{{data.need_register === 'Y'}}" class="schedule-apply {{data.registered === 'Y' ? 'inactive': ''}}" bindtap="onApplyAction" data-activity-id="123">{{data.registered? '已报名' : '报名'}}</view>  
8 -</view>  
1 //****** 线上环境url,提交代码务必检查确认 ****** 1 //****** 线上环境url,提交代码务必检查确认 ******
2 // export const API_HOST = 'https://api.yoho.cn'; 2 // export const API_HOST = 'https://api.yoho.cn';
3 // export const SERVICE_HOST = 'https://api.yoho.cn'; 3 // export const SERVICE_HOST = 'https://api.yoho.cn';
  4 +// export const YOHOBUY_HOST = 'https://m.yohobuy.com';
4 // export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3'; 5 // export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3';
5 // export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile'; 6 // export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile';
6 // export const ACTIVITY_HOST = 'https://action.yoho.cn'; 7 // export const ACTIVITY_HOST = 'https://action.yoho.cn';
@@ -10,6 +11,7 @@ @@ -10,6 +11,7 @@
10 // *********测试3环境********* 11 // *********测试3环境*********
11 export const API_HOST = 'http://api-test3.dev.yohocorp.com'; 12 export const API_HOST = 'http://api-test3.dev.yohocorp.com';
12 export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com'; 13 export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
  14 + export const YOHOBUY_HOST = 'http://m.yohobuy.com';
13 export const ACTIVITY_HOST = 'http://192.168.102.49:6006'; 15 export const ACTIVITY_HOST = 'http://192.168.102.49:6006';
14 export const YOHOOD_HOST = 'http://yohood.test.yoho.cn'; 16 export const YOHOOD_HOST = 'http://yohood.test.yoho.cn';
15 17
@@ -8,11 +8,11 @@ Page({ @@ -8,11 +8,11 @@ Page({
8 data: { 8 data: {
9 days: [],//日期列表 9 days: [],//日期列表
10 list: {},//活动列表,days的数据为key 10 list: {},//活动列表,days的数据为key
11 - curScheduleList: [], //当前选中的日期 11 + curactivityList: [], //当前选中的日期
12 }, 12 },
13 onLoad: function(options) { 13 onLoad: function(options) {
14 //Do some initialize when page load. 14 //Do some initialize when page load.
15 - this.fetchScheduleList() 15 + this.fetchactivityList()
16 16
17 }, 17 },
18 onReady: function() { 18 onReady: function() {
@@ -24,7 +24,7 @@ Page({ @@ -24,7 +24,7 @@ Page({
24 24
25 }, 25 },
26 26
27 - fetchScheduleList() { 27 + fetchactivityList() {
28 let that = this; 28 let that = this;
29 GET(YOHOOD_HOST + '/activity/lists', {}) 29 GET(YOHOOD_HOST + '/activity/lists', {})
30 .then(json => { 30 .then(json => {
@@ -37,16 +37,16 @@ Page({ @@ -37,16 +37,16 @@ Page({
37 let days = data.days; 37 let days = data.days;
38 let list = data.list; 38 let list = data.list;
39 39
40 - let curScheduleList = [] 40 + let curactivityList = []
41 if (days.length > 0) { 41 if (days.length > 0) {
42 let selectDay = days[0]; 42 let selectDay = days[0];
43 - curScheduleList = list[selectDay] 43 + curactivityList = list[selectDay]
44 } 44 }
45 45
46 that.setData({ 46 that.setData({
47 days, 47 days,
48 list, 48 list,
49 - curScheduleList 49 + curactivityList
50 }) 50 })
51 } 51 }
52 }) 52 })
@@ -58,10 +58,10 @@ Page({ @@ -58,10 +58,10 @@ Page({
58 selectTab(e) { 58 selectTab(e) {
59 let select = e.detail.index; 59 let select = e.detail.index;
60 let selectDay = this.data.days[select]; 60 let selectDay = this.data.days[select];
61 - let curScheduleList = this.data.list[selectDay]; 61 + let curactivityList = this.data.list[selectDay];
62 this.setData({ 62 this.setData({
63 select, 63 select,
64 - curScheduleList 64 + curactivityList
65 }) 65 })
66 }, 66 },
67 67
@@ -100,6 +100,6 @@ Page({ @@ -100,6 +100,6 @@ Page({
100 //Do some when page pull down. 100 //Do some when page pull down.
101 wx.stopPullDownRefresh(); 101 wx.stopPullDownRefresh();
102 102
103 - this.fetchScheduleList(); 103 + this.fetchactivityList();
104 } 104 }
105 }) 105 })
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 "navigationBarTitleText": "活动时间表", 2 "navigationBarTitleText": "活动时间表",
3 "enablePullDownRefresh": true, 3 "enablePullDownRefresh": true,
4 "usingComponents": { 4 "usingComponents": {
5 - "schedule-item": "/components/schedule-item/index", 5 + "activity-item": "/components/activity-item/index",
6 "slide-bar": "/components/slide-bar/index", 6 "slide-bar": "/components/slide-bar/index",
7 "map-animation": "/components/map-animation/index" 7 "map-animation": "/components/map-animation/index"
8 } 8 }
@@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
2 2
3 <slide-bar content-array="{{days}}" bind:selectTab="selectTab" select="{{select}}"></slide-bar> 3 <slide-bar content-array="{{days}}" bind:selectTab="selectTab" select="{{select}}"></slide-bar>
4 4
5 - <block wx:for="{{curScheduleList}}" wx:key="index" wx:for-item="schedule">  
6 - <view class="time-title">{{schedule.timeType}}</view>  
7 - <block wx:for="{{schedule.list}}" wx:key="index" wx:for-item="item">  
8 - <schedule-item data="{{item}}" bind:applyAction="applyAction" bind:jumpActivityetail="jumpActivityetail"></schedule-item> 5 + <block wx:for="{{curactivityList}}" wx:key="index" wx:for-item="activity">
  6 + <view class="time-title">{{activity.timeType}}</view>
  7 + <block wx:for="{{activity.list}}" wx:key="index" wx:for-item="item">
  8 + <activity-item data="{{item}}" bind:applyAction="applyAction" bind:jumpActivityetail="jumpActivityetail"></activity-item>
9 <view wx:if="{{index!=array.length-1}}" class="space-view40"></view> 9 <view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
10 </block> 10 </block>
11 </block> 11 </block>
1 -import {API_HOST, SERVICE_HOST} from '../../libs/config'; 1 +import {API_HOST, YOHOBUY_HOST} from '../../libs/config';
2 import {GET, POST} from '../../libs/request'; 2 import {GET, POST} from '../../libs/request';
3 import jumpToMiniapp from '../../router/jump-to-miniapp'; 3 import jumpToMiniapp from '../../router/jump-to-miniapp';
4 import wx from '../../utils/wx'; 4 import wx from '../../utils/wx';
@@ -108,7 +108,7 @@ Page({ @@ -108,7 +108,7 @@ Page({
108 108
109 //点击我的二维码 109 //点击我的二维码
110 tapMyQRCode() { 110 tapMyQRCode() {
111 - let url = '../webview/webview?url=http://m.yohobuy.com/home/user/qrcode&hideShareMenu=true'; 111 + let url = '../webview/webview?url='+ YOHOBUY_HOST + '/home/user/qrcode' + '&hideShareMenu=true';
112 wx.navigateTo({ 112 wx.navigateTo({
113 url, 113 url,
114 }) 114 })
@@ -121,7 +121,7 @@ Page({ @@ -121,7 +121,7 @@ Page({
121 121
122 jumpMoreActivity() { 122 jumpMoreActivity() {
123 wx.switchTab({ 123 wx.switchTab({
124 - url: '/pages/schedule/schedule', 124 + url: '/pages/activity/activity',
125 }) 125 })
126 }, 126 },
127 127
@@ -140,7 +140,7 @@ Page({ @@ -140,7 +140,7 @@ Page({
140 140
141 } else if (actionType == ACTION_TYPE.APPLYACTIVITY) {//去报名 141 } else if (actionType == ACTION_TYPE.APPLYACTIVITY) {//去报名
142 wx.switchTab({ 142 wx.switchTab({
143 - url: '/pages/schedule/schedule', 143 + url: '/pages/activity/activity',
144 }) 144 })
145 } 145 }
146 }, 146 },
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 "section-header" : "/components/user-center/section-header/index", 5 "section-header" : "/components/user-center/section-header/index",
6 "undone-view": "/components/user-center/undone-view/index", 6 "undone-view": "/components/user-center/undone-view/index",
7 "ticket-slide": "/components/user-center/ticket-slide/index", 7 "ticket-slide": "/components/user-center/ticket-slide/index",
8 - "schedule-item": "/components/schedule-item/index", 8 + "activity-item": "/components/activity-item/index",
9 "login-button": "/components/login-button/login-button" 9 "login-button": "/components/login-button/login-button"
10 } 10 }
11 } 11 }
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 <block wx:else> 48 <block wx:else>
49 <scroll-view scroll-y> 49 <scroll-view scroll-y>
50 <block wx:for="{{array}}" wx:key="index"> 50 <block wx:for="{{array}}" wx:key="index">
51 - <schedule-item data="{{item}}"></schedule-item> 51 + <activity-item data="{{item}}"></activity-item>
52 <view wx:if="{{index!=array.length-1}}" class="space-view40"></view> 52 <view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
53 </block> 53 </block>
54 54
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 </view> 59 </view>
60 60
61 <block wx:for="{{array}}" wx:key="index"> 61 <block wx:for="{{array}}" wx:key="index">
62 - <schedule-item data="{{item}}"></schedule-item> 62 + <activity-item data="{{item}}"></activity-item>
63 <view wx:if="{{index!=array.length-1}}" class="space-view40"></view> 63 <view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
64 </block> 64 </block>
65 </scroll-view> 65 </scroll-view>
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 { 54 {
55 "id": -1, 55 "id": -1,
56 "name": "时间表", 56 "name": "时间表",
57 - "pathName": "pages/schedule/schedule", 57 + "pathName": "pages/activity/activity",
58 "query": "", 58 "query": "",
59 "scene": null 59 "scene": null
60 }, 60 },