Authored by 肖亚东

文件命名修改

... ... @@ -6,7 +6,7 @@
"pages/newsDetail/tags",
"pages/newsDetail/author",
"pages/newsDetail/detail",
"pages/schedule/schedule",
"pages/activity/activity",
"pages/community/community",
"pages/mars/mars",
"pages/brands/brands",
... ... @@ -33,7 +33,7 @@
"selectedIconPath": "static/images/home_selected@3x.png"
},
{
"pagePath": "pages/schedule/schedule",
"pagePath": "pages/activity/activity",
"text": "时间表",
"iconPath": "static/images/schedule@3x.png",
"selectedIconPath": "static/images/schedule_selected@3x.png"
... ...
<view class="activity-item" bindtap="jumpToDetail" data-id="{{data.id}}">
<view class="activity-info">
<view class="activity-time">{{data.activityTime}}</view>
<view class="activity-name">{{data.title}}</view>
<view class="activity-location">展位号:{{data.place}}</view>
</view>
<view wx:if="{{data.need_register === 'Y'}}" class="activity-apply {{data.registered === 'Y' ? 'inactive': ''}}" bindtap="onApplyAction" data-activity-id="123">{{data.registered? '已报名' : '报名'}}</view>
</view>
\ No newline at end of file
... ...
.schedule-item {
.activity-item {
margin: 0 30rpx 40rpx 30rpx;
width: 690rpx;
height: 208rpx;
... ... @@ -9,32 +9,32 @@
border-radius: 2px;
}
.schedule-info {
.activity-info {
width: 70%;
height: 100%;
margin-left: 30rpx;
}
.schedule-time {
.activity-time {
margin-top: 30rpx;
color: #e0e0e0;
font-size: 24rpx;
}
.schedule-name {
.activity-name {
margin-top: 10rpx;
color: #4a4a4a;
font-size: 30rpx;
}
.schedule-location {
.activity-location {
margin-top: 10rpx;
color: #e2e2e2;
font-size: 26rpx;
margin-bottom: 30rpx;
}
.schedule-item .schedule-apply {
.activity-item .activity-apply {
background-color: #4a4a4a;
color: white;
font-size: 24rpx;
... ... @@ -47,6 +47,6 @@
border-radius: 6rpx;
}
.schedule-item .inactive {
.activity-item .inactive {
background-color: #e0e0e0;
}
\ No newline at end of file
... ...
<view class="schedule-item" bindtap="jumpToDetail" data-id="{{data.id}}">
<view class="schedule-info">
<view class="schedule-time">{{data.activityTime}}</view>
<view class="schedule-name">{{data.title}}</view>
<view class="schedule-location">展位号:{{data.place}}</view>
</view>
<view wx:if="{{data.need_register === 'Y'}}" class="schedule-apply {{data.registered === 'Y' ? 'inactive': ''}}" bindtap="onApplyAction" data-activity-id="123">{{data.registered? '已报名' : '报名'}}</view>
</view>
\ No newline at end of file
//****** 线上环境url,提交代码务必检查确认 ******
// export const API_HOST = 'https://api.yoho.cn';
// export const SERVICE_HOST = 'https://api.yoho.cn';
// export const YOHOBUY_HOST = 'https://m.yohobuy.com';
// export const APP_REPORT_HOST = 'https://app.yoho.cn/collect/v3';
// export const LOG_EVENT_HOST = 'https://analysis.yohobuy.com/yas_mobile';
// export const ACTIVITY_HOST = 'https://action.yoho.cn';
... ... @@ -10,6 +11,7 @@
// *********测试3环境*********
export const API_HOST = 'http://api-test3.dev.yohocorp.com';
export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
export const YOHOBUY_HOST = 'http://m.yohobuy.com';
export const ACTIVITY_HOST = 'http://192.168.102.49:6006';
export const YOHOOD_HOST = 'http://yohood.test.yoho.cn';
... ...
... ... @@ -8,11 +8,11 @@ Page({
data: {
days: [],//日期列表
list: {},//活动列表,days的数据为key
curScheduleList: [], //当前选中的日期
curactivityList: [], //当前选中的日期
},
onLoad: function(options) {
//Do some initialize when page load.
this.fetchScheduleList()
this.fetchactivityList()
},
onReady: function() {
... ... @@ -24,7 +24,7 @@ Page({
},
fetchScheduleList() {
fetchactivityList() {
let that = this;
GET(YOHOOD_HOST + '/activity/lists', {})
.then(json => {
... ... @@ -37,16 +37,16 @@ Page({
let days = data.days;
let list = data.list;
let curScheduleList = []
let curactivityList = []
if (days.length > 0) {
let selectDay = days[0];
curScheduleList = list[selectDay]
curactivityList = list[selectDay]
}
that.setData({
days,
list,
curScheduleList
curactivityList
})
}
})
... ... @@ -58,10 +58,10 @@ Page({
selectTab(e) {
let select = e.detail.index;
let selectDay = this.data.days[select];
let curScheduleList = this.data.list[selectDay];
let curactivityList = this.data.list[selectDay];
this.setData({
select,
curScheduleList
curactivityList
})
},
... ... @@ -100,6 +100,6 @@ Page({
//Do some when page pull down.
wx.stopPullDownRefresh();
this.fetchScheduleList();
this.fetchactivityList();
}
})
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@
"navigationBarTitleText": "活动时间表",
"enablePullDownRefresh": true,
"usingComponents": {
"schedule-item": "/components/schedule-item/index",
"activity-item": "/components/activity-item/index",
"slide-bar": "/components/slide-bar/index",
"map-animation": "/components/map-animation/index"
}
... ...
... ... @@ -2,10 +2,10 @@
<slide-bar content-array="{{days}}" bind:selectTab="selectTab" select="{{select}}"></slide-bar>
<block wx:for="{{curScheduleList}}" wx:key="index" wx:for-item="schedule">
<view class="time-title">{{schedule.timeType}}</view>
<block wx:for="{{schedule.list}}" wx:key="index" wx:for-item="item">
<schedule-item data="{{item}}" bind:applyAction="applyAction" bind:jumpActivityetail="jumpActivityetail"></schedule-item>
<block wx:for="{{curactivityList}}" wx:key="index" wx:for-item="activity">
<view class="time-title">{{activity.timeType}}</view>
<block wx:for="{{activity.list}}" wx:key="index" wx:for-item="item">
<activity-item data="{{item}}" bind:applyAction="applyAction" bind:jumpActivityetail="jumpActivityetail"></activity-item>
<view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
</block>
</block>
... ...
import {API_HOST, SERVICE_HOST} from '../../libs/config';
import {API_HOST, YOHOBUY_HOST} from '../../libs/config';
import {GET, POST} from '../../libs/request';
import jumpToMiniapp from '../../router/jump-to-miniapp';
import wx from '../../utils/wx';
... ... @@ -108,7 +108,7 @@ Page({
//点击我的二维码
tapMyQRCode() {
let url = '../webview/webview?url=http://m.yohobuy.com/home/user/qrcode&hideShareMenu=true';
let url = '../webview/webview?url='+ YOHOBUY_HOST + '/home/user/qrcode' + '&hideShareMenu=true';
wx.navigateTo({
url,
})
... ... @@ -121,7 +121,7 @@ Page({
jumpMoreActivity() {
wx.switchTab({
url: '/pages/schedule/schedule',
url: '/pages/activity/activity',
})
},
... ... @@ -140,7 +140,7 @@ Page({
} else if (actionType == ACTION_TYPE.APPLYACTIVITY) {//去报名
wx.switchTab({
url: '/pages/schedule/schedule',
url: '/pages/activity/activity',
})
}
},
... ...
... ... @@ -5,7 +5,7 @@
"section-header" : "/components/user-center/section-header/index",
"undone-view": "/components/user-center/undone-view/index",
"ticket-slide": "/components/user-center/ticket-slide/index",
"schedule-item": "/components/schedule-item/index",
"activity-item": "/components/activity-item/index",
"login-button": "/components/login-button/login-button"
}
}
\ No newline at end of file
... ...
... ... @@ -48,7 +48,7 @@
<block wx:else>
<scroll-view scroll-y>
<block wx:for="{{array}}" wx:key="index">
<schedule-item data="{{item}}"></schedule-item>
<activity-item data="{{item}}"></activity-item>
<view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
</block>
... ... @@ -59,7 +59,7 @@
</view>
<block wx:for="{{array}}" wx:key="index">
<schedule-item data="{{item}}"></schedule-item>
<activity-item data="{{item}}"></activity-item>
<view wx:if="{{index!=array.length-1}}" class="space-view40"></view>
</block>
</scroll-view>
... ...
... ... @@ -54,7 +54,7 @@
{
"id": -1,
"name": "时间表",
"pathName": "pages/schedule/schedule",
"pathName": "pages/activity/activity",
"query": "",
"scene": null
},
... ...