Commit bac94b8b by 严立

LL - bug 修复,UI 校准。

parent 1128c163
Showing with 706 additions and 358 deletions
......@@ -83,6 +83,21 @@ App({
},
/**
* 是否注册,如果没有跳转注册页面
* @function
* @param
* @returns
*/
userIsRegister: function () {
if (!wx.getStorageSync('userInfo').isSignIn) {
wx.navigateTo({ url: '/pages/login/login' })
return false
}
return true
},
/**
* 登录
* @function
* @param
......@@ -131,6 +146,31 @@ App({
},
/**
* 设置令牌
* @function
* @param
* @returns
*/
setNewToken: function (funcSuspendedRequestOption) {
wx.login({
success: (response) => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
this.request({
url: 'v1/login/getSmallSession?code=' + response.code,
method: 'GET',
}).then((response) => {
let funcData = response.data
wx.setStorageSync('token', funcData.token)
wx.setStorageSync('tokenRefresh', funcData.refreshToken)
wx.setStorageSync('sessionKey', funcData.session_key)
this.request(funcSuspendedRequestOption)
}).catch(() => {})
}
})
},
/**
* 刷新令牌
* @function
* @param
......
......@@ -71,6 +71,7 @@
"m-popup": "./component/m-popup/m-popup",
"m-textarea": "./component/m-textarea/m-textarea",
"m-tab": "./component/m-tab/m-tab",
"m-segment": "./component/m-segment/m-segment",
"m-toast": "./component/m-toast/m-toast",
"parser": "./component/parser.min/parser",
"swiper-point": "./component/swiper-point/swiper-point",
......
......@@ -7,12 +7,6 @@
@import './component/theme/layout.wxss';
@import './component/theme/theme.wxss';
.text_overflow_point {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.icon {
width: 32rpx;
height: 32rpx;
......
.m-dialog {
z-index: 7;
z-index: 9;
position: fixed;
top: 0;
left: 0;
......
Component({
options: {
multipleSlots: true,
styleIsolation: 'apply-shared'
},
properties: {
segmentItem: {
type: Array,
value: []
},
segmentIndex: {
type: Number,
value: 0,
},
// tab 整体样式
classSegment: {
type: String,
value: '',
},
// tab 列表样式
classSegmentList: {
type: String,
value: '',
},
// tab 列表项目样式
classSegmentbItem: {
type: String,
value: '',
},
// 点击样式
classActive: {
type: String,
value: '',
},
// 默认样式
classInactive: {
type: String,
value: '',
},
},
data: {
},
/**
* 组件的方法列表
*/
methods: {
onSelectionItem: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
let funcIndex = funcEvent.currentTarget.dataset.index
console.log(funcEvent.currentTarget.dataset)
this.setData({
segmentIndex: funcIndex
})
this.triggerEvent('segmentChange', Object.assign(funcItem, { index: funcIndex }))
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="m-segment {{classSegment}}">
<view class="m-segment-list row cb ac {{classSegmentList}}">
<block wx:for="{{segmentItem}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view
class="m-segment-item row cc ac {{index === segmentIndex ? 'm-segment-item-active' : 'm-segment-item-inactive'}} {{classSegmentbItem}}"
data-item="{{item}}"
data-index="{{index}}"
bindtap="onSelectionItem"
>
<slot name="{{'segmentItem' + index}}"></slot>
</view>
</block>
</view>
</view>
\ No newline at end of file
.m-segment-list {
overflow-x: scroll;
border-bottom: 1px #E2E7EF solid;
}
.m-segment-item {
position: relative;
display: inline-block;
height: 62rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
}
.m-segment-item-active {
border-bottom: 4rpx #15191F solid;
color: #15191F;
}
.m-segment-item-inactive {
border-bottom: 4rpx rgba(0, 0, 0, 0) solid;
color: #959DA9;
}
\ No newline at end of file
.toast {
z-index: 7;
z-index: 9;
position: fixed;
top: 0;
left: 0;
......
......@@ -9,7 +9,7 @@
6 : 导航栏
7 : 遮罩,弹窗,提示,
8 : 遮罩
9 : 遮罩
9 : 遮罩,toast,dialog
*/
.row { display: flex; flex-direction: row; }
......@@ -21,4 +21,9 @@
.ca { justify-content: space-around; }
.as { align-items: flex-start; }
.ac { align-items: center; }
.ae { align-items: flex-end; }
\ No newline at end of file
.ae { align-items: flex-end; }
.overflow_point_1 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.overflow_point_2 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.overflow_point_3 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.overflow_point_4 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
\ No newline at end of file
......@@ -47,12 +47,12 @@
/* 申请表单 */
.club-enter {
width: 750rpx;
margin-top: 88rpx;
margin: 26rpx 0 0 0;
padding: 0 40rpx;
}
.form-item {
margin: 40rpx 0 0 0;
margin: 32rpx 0 0 0;
}
.form-item > text:nth-child(1) {
......
......@@ -146,6 +146,7 @@ Page({
},
onEnter: function () {
if (!App.userIsRegister()) return
if (!this.inspectForm()) return
App.ui.showToast({
iconType: 'loading',
......
......@@ -5,14 +5,14 @@
}
.club-info-logo {
width: 168rpx;
height: 168rpx;
width: 128rpx;
height: 128rpx;
background: #999;
}
.club-info-name > text:nth-child(1) {
height: 44rpx;
margin-top: 32rpx;
margin: 28rpx 0 0 0;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 800;
......@@ -43,14 +43,17 @@
/* 申请表单 */
.club-enter {
width: 750rpx;
margin-top: 88rpx;
margin: 92rpx 0 0 0;
padding: 0 40rpx;
}
.form-item {
margin: 0 0 32rpx 0;
}
.form-item > text:nth-child(1) {
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 42rpx;
color: #1E2025;
......
......@@ -140,6 +140,8 @@ Page({
}).catch((response) => {})
},
/**
* 创建俱乐部
* @function
......@@ -147,6 +149,8 @@ Page({
* @returns
*/
onCreatClub: function () {
if (!App.userIsRegister()) return
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.userType === 0) {
this.setData({
......@@ -176,6 +180,8 @@ Page({
* @returns
*/
onEnterClub: function (funcEvent) {
if (!App.userIsRegister()) return
let funcItem = funcEvent.currentTarget.dataset.item
// 判断俱乐部是否业主专享,以及加入用户是否满足权限。
if (funcItem.isOwner) {
......
......@@ -78,7 +78,7 @@
width: 170rpx;
height: 60rpx;
background: #afb1b5;
border-radius: 4px;
border-radius: 2px;
font-size: 26rpx;
font-weight: 500;
......@@ -156,7 +156,7 @@
.club-info-other > button {
width: 120rpx;
height: 56rpx;
border-radius: 4px;
border-radius: 2px;
background: #86C5E1;
font-size: 22rpx;
......
......@@ -62,7 +62,6 @@ Page({
'clubId': this.data.clubInfo.id,
}
}).then((response) => {
console.log(response)
let funcData = response.data
this.setData({
clubInfo: {
......@@ -96,7 +95,6 @@ Page({
'type': 2
},
}).then((response) => {
console.log(response)
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
......@@ -125,7 +123,7 @@ Page({
clubActivity: funcList
})
console.log(funcList)
console.log(this.data.clubActivity)
}).catch((response) => {})
},
......@@ -147,9 +145,6 @@ Page({
*/
onClubActivityEnter: function (funcEvent) {
let funcEnterClub = wx.getSystemInfoSync('clubEnterId')
console.log(funcEvent)
let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.id,
......
......@@ -9,7 +9,7 @@
<view class="club-info-name column cc ac">
<text class="title">{{clubInfo.name}}</text>
<text class="owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text>
<view class="club-info-member row cc ac" bindtap="onMemberList">
<view class="club_info_member row cc ac" bindtap="onMemberList">
<text>{{clubInfo.member + ' 成员'}}</text>
<image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
......@@ -23,7 +23,7 @@
<!-- 近期活动 -->
<view class="card" wx:if="{{clubActivity.length > 0}}">
<view class="card-title row cb ac">
<view class="card-title row cb ae">
<text class="title">近期活动</text>
<text bindtap="onClubActivityMore">查看全部</text>
</view>
......@@ -60,7 +60,7 @@
<!-- 普通价 -->
<block wx:if="{{item.priceType === 3}}">
<text></text>
<text>{{item.priceDiscountText}}</text>
<text>{{item.priceText}}</text>
<text></text>
</block>
</view>
......
......@@ -7,6 +7,7 @@
}
.banner > image {
display: block;
width: 750rpx;
height: 600rpx;
background: #999999;
......@@ -28,20 +29,21 @@
left: 291rpx;
width: 168rpx;
height: 168rpx;
border-radius: 2px;
background: #999999;
}
.club-info-name > text:nth-child(2) {
width: 96rpx;
margin-top: 16rpx;
margin: 16rpx 0 8rpx 0;
}
.club-info-member {
.club_info_member {
height: 36rpx;
margin-top: 24rpx;
margin-top: 18rpx;
}
.club-info-member > text:nth-child(1) {
.club_info_member > text:nth-child(1) {
margin-right: 8rpx;
font-size: 26rpx;
......@@ -124,7 +126,9 @@
}
.card-item-cover {
display: block;
width: 562rpx;
height: 544rpx;
height: 316rpx;
background: #999999;
}
......@@ -187,7 +191,7 @@
/* 俱乐部详情 */
.club-detail {
width: 750rpx;
margin-top: 80rpx;
margin-top: 74rpx;
}
.club-detail-title {
......
......@@ -5,6 +5,7 @@ Page({
clubList: [], // 用户已经加入俱乐部列表
memberList: [], // 成员列表
adminInfo: {}, // 管理信息
isWritePhotosAlbum: false,
winAdminInfo: false, // 管理信息弹窗空值
winPowerInfo: false, // 权限提示弹窗控制
},
......@@ -23,6 +24,7 @@ Page({
})
this.queryClubInfo()
this.queryClubMember()
this.isWritePhotosAlbum()
},
/**
......@@ -86,31 +88,66 @@ Page({
},
/**
* 检查相册保存状态
* @function
* @param
* @returns
*/
isWritePhotosAlbum: function () {
wx.getSetting({
success: (response) => {
if (response.authSetting['scope.writePhotosAlbum'] || response.authSetting['scope.writePhotosAlbum'] === undefined) {
this.setData({ isWritePhotosAlbum: true })
}
if (response.authSetting['scope.writePhotosAlbum'] === false) {
this.setData({ isWritePhotosAlbum: false })
}
}
})
},
/**
* 获取管理员微信
* @function
* @param
* @returns
*/
onAdminWx: function (funcEvent) {
console.log(funcEvent)
let funcItem = funcEvent.currentTarget.dataset.item
let funcClubList = wx.getStorageSync('clubEnterId')
for (let i = 0, l = funcClubList.length; i < l; i++) {
if (this.data.clubInfo.id === funcClubList[i]) {
this.setData({
adminInfo: {
wx: funcItem.wx
},
winAdminInfo: true
})
return
if (this.data.isWritePhotosAlbum) {
let funcItem = funcEvent.currentTarget.dataset.item
let funcClubList = wx.getStorageSync('clubEnterId')
for (let i = 0, l = funcClubList.length; i < l; i++) {
if (this.data.clubInfo.id === funcClubList[i]) {
this.setData({
adminInfo: {
wx: funcItem.wx
},
winAdminInfo: true
})
return
}
}
// 没有权限
this.setData({
winPowerInfo: true
})
} else {
wx.openSetting({
success: (response) => {
if (response.authSetting['scope.writePhotosAlbum']) {
this.setData({ isWritePhotosAlbum: true })
this.onAdminWx(funcEvent)
} else {
this.setData({ isWritePhotosAlbum: false })
App.ui.showToast({ iconType: 'error', title: '相册授权失败', })
}
console.log(response)
},
fail: (response) => {}
})
}
// 没有权限
this.setData({
winPowerInfo: true
})
},
/**
......@@ -120,34 +157,28 @@ Page({
* @returns
*/
onSaveAdminWx: function () {
console.log('onSaveAdminWx')
wx.downloadFile({
url: this.data.adminInfo.wx,
success: (result) => {
success: (response) => {
wx.saveImageToPhotosAlbum({
filePath: result.tempFilePath,
success: (result) => {
filePath: response.tempFilePath,
success: () => {
this.setData({
winAdminInfo: false
})
App.ui.showToast({
iconType: 'success',
title: '二维码已保存至相册',
})
App.ui.showToast({ iconType: 'success', title: '二维码已保存至相册', })
},
fail: (error) => {
App.ui.showToast({
iconType: 'error',
title: '保存失败',
})
fail: (response) => {
App.ui.showToast({ iconType: 'error', title: '二维码保存失败', })
this.setData({ winAdminInfo: false, })
if (response.errMsg !== 'saveImageToPhotosAlbum:fail cancel') this.setData({ isWritePhotosAlbum: false })
}
})
},
fail: (error) => {
App.ui.showToast({
iconType: 'error',
title: '保存失败',
})
App.ui.showToast({ iconType: 'error', title: '二维码下载失败', })
this.setData({ winAdminInfo: false, })
}
})
},
......@@ -159,9 +190,7 @@ Page({
},
onAdminInfoClose: function () {
this.setData({
winAdminInfo: false
})
this.setData({ winAdminInfo: false, })
},
/**
......
......@@ -4,14 +4,14 @@
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src="{{clubInfo.logo}}"></image>
<view class="club-info-name column cc ac">
<text class="title">{{clubInfo.name}}</text>
<text class="owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text>
<text>{{clubInfo.member + ' 成员'}}</text>
<view class="column cc ac">
<text class="club_info_name title font_bold_34 color_regular">{{clubInfo.name}}</text>
<text class="club_info_type owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text>
<text class="club_info_member font_normal_22 color_secondary">{{clubInfo.member + ' 成员'}}</text>
</view>
</view>
<view class="club-member">
<view class="club_member">
<view class="club-member-title col">
<text>管理员</text>
<text>可添加管理员微信,及时获取活动信息</text>
......@@ -44,7 +44,7 @@
<!-- 管理员微信弹窗 -->
<view class="member-admin row cc ac" hidden="{{!winAdminInfo}}">
<view class="member_admin_info col cc ac">
<view class="member_admin_info col cb ac">
<text>管理员微信</text>
<image src="{{adminInfo.wx}}" bindlongpress="onSaveAdminWx"></image>
<text>【长按保存二维码】</text>
......
......@@ -13,7 +13,7 @@
width: 606rpx;
height: 538rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
border-radius: 4px;
border-radius: 2px;
background: #FFFFFF;
}
......@@ -66,7 +66,7 @@
width: 606rpx;
height: 726rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
border-radius: 4px;
border-radius: 2px;
background: #FFFFFF;
}
......@@ -82,12 +82,13 @@
.member_admin_info > image {
width: 296rpx;
height: 296rpx;
margin-top: 48rpx;
margin: 48rpx 0 0 0;
background: #999999;
}
.member_admin_info > text:nth-child(3) {
height: 46rpx;
margin: 30rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 46rpx;
......@@ -97,7 +98,7 @@
.member_admin_info > button {
width: 526rpx;
height: 80rpx;
margin-top: 48rpx;
margin: 52rpx 0 0 0;
border-radius: 4px;
border: 1px solid #15191F;
......@@ -114,43 +115,37 @@
}
.club-info-logo {
width: 168rpx;
height: 168rpx;
width: 128rpx;
height: 128rpx;
background: #999;
}
.club-info-name > text:nth-child(1) {
.club_info_name {
height: 44rpx;
margin-top: 32rpx;
margin: 30rpx 0 0 0;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 800;
line-height: 44rpx;
color: #15191f;
}
.club-info-name > text:nth-child(2) {
.club_info_type {
width: 96rpx;
margin-top: 16rpx;
margin: 18rpx 0 0 0;
}
.club-info-name > text:nth-child(3) {
.club_info_member {
height: 40rpx;
margin-top: 16rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 40rpx;
color: #959da9;
margin: 28rpx 0 0 0;
}
.club-member {
.club_member {
width: 750rpx;
margin-top: 180rpx;
margin: 174rpx 0 0 0;
padding: 0 40rpx;
}
/* 成员标题 */
.club-member-title > text:nth-child(1) {
width: 670rpx;
height: 44rpx;
......@@ -162,7 +157,7 @@
.club-member-title > text:nth-child(2) {
height: 44rpx;
margin-top: 4rpx;
margin: 6rpx 0 0 0;
font-size: 26rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
......@@ -171,13 +166,13 @@
}
/* 成员列表 */
.club-member-list {
margin-top: 12rpx;
margin: 12rpx 0 0 0;
border: 1px #FFFFFF solid;
}
.club-member-item {
margin-top: 32rpx;
margin: 32rpx 0 0 0;
}
.club-member-item-info > image {
......
......@@ -20,15 +20,13 @@ Page({
shopRecommendB: [], // 顶部第二商店推荐
shopRecommendC: [], // 底部第一商店推荐
shopRecommendD: [], // 底部第二商店推荐
integralMallGoods: [],
banner: [],
},
onLoad: function (option) {
// formPage=order&shopAppId=1&commodityType=5
this.setData({
option: option,
})
this.setData({ option: option, })
},
onShow: function () {
......@@ -40,6 +38,7 @@ Page({
this.setGreetingMessage()
this.queryShopCover()
this.queryRecommend()
this.queryIntegralMallGoods()
},
queryShopCover: function () {
......@@ -277,6 +276,25 @@ Page({
},
/**
* 查询积分商城商品
* @function
* @param
* @returns
*/
queryIntegralMallGoods: function () {
App.request({
url: 'v3/integralGood/getGoodList',
params: {
'pageNo': 1,
'pageSize': -1,
'tagId': '305',
}
}).then((response) => {
}).catch((response) => {})
},
/**
* 缓存用户信息
* @function
* @param {object} - event
......
......@@ -149,6 +149,34 @@
</swiper-item>
</swiper>
</view>
<!-- 商店 -->
<view class="shop">
<view class="shop-name">
<image src="{{resourcesBase + 'commodity/home/shop-title-2.png'}}"></image>
</view>
<view class="shop-title col">
<text>累计消费</text>
<text>兑换特色产品</text>
</view>
<swiper indicator-dots="false">
<!-- 积分商城 -->
<swiper-item>
<view class="shop-banner row con-c">
<image src="{{resourcesBase + 'bgi/bgi-00.png'}}"></image>
<button class="row con-c align-c" data-id="{{3}}" bindtap="onBuyOriginality"></button>
</view>
<view class="shop-menu">
<block wx:for="{{shopRecommendD}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="shop-menu-item col con-c align-c" data-id="{{3}}" data-item="{{item}}" bindtap="onBuyRecommendOriginality">
<image src="{{item.cover}}"></image>
<text>{{item.name}}</text>
</view>
</block>
</view>
</swiper-item>
</swiper>
</view>
</block>
<view class="room-appointment">
......
let App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
banner: [],
bannerIndex: 0,
notice: [],
......
......@@ -10,6 +10,16 @@ Page({
this.queryRecord()
},
onShow: function () {
if (wx.getStorageSync('tempOptions') === 'exchangeRecordSeset') {
wx.removeStorageSync('tempOptions')
this.setData({
pageIndex: 1
})
this.queryRecord()
}
},
/**
* 查询兑换记录
* @function
......@@ -29,7 +39,7 @@ Page({
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].orderId,
'name': funcData[i].smOrderDetails[0].name + '-' + Number(funcData[i].status),
'name': funcData[i].smOrderDetails[0].name,
'cover': funcData[i].smOrderDetails[0].imgUrl,
'price': funcData[i].smOrderDetails[0].unitPrice,
'priceTotal': 0,
......
......@@ -28,11 +28,11 @@
</view>
</view>
<!-- 待收货 -->
<view class="record_item column" wx:if="{{item.state === 2 || item.state === 5}}" data-item="{{item}}" bindtap="onRecordDetail">
<!-- 邮寄独有 - 待收货 -->
<view class="record_item column" wx:if="{{item.state === 5}}" data-item="{{item}}" bindtap="onRecordDetail">
<view class="row cb ac">
<text class="font_normal_26 color_secondary">{{'下单时间:' + item.timeCreate}}</text>
<text class="font_normal_26 color_warning">待收货</text>
<text class="font_normal_26 color_warning">已发货</text>
</view>
<view class="record_item_info row ac">
<view class="record_item_info_cover">
......@@ -51,6 +51,29 @@
</view>
</view>
<!-- 自取独有 - 待使用 -->
<view class="record_item column" wx:if="{{item.state === 2}}" data-item="{{item}}" bindtap="onRecordDetail">
<view class="row cb ac">
<text class="font_normal_26 color_secondary">{{'下单时间:' + item.timeCreate}}</text>
<text class="font_normal_26 color_warning">待使用</text>
</view>
<view class="record_item_info row ac">
<view class="record_item_info_cover">
<image src="{{item.cover}}"></image>
</view>
<view class="record_item_info_name row ac">
<text class="font_bold_30 color_regular">{{item.name}}</text>
</view>
<view class="record_item_info_price column ce ae">
<text class="font_bold_30 color_regular">{{item.price + ' 积分'}}</text>
<text class="font_normal_26 color_secondary">{{'x' + item.quantity}}</text>
</view>
</view>
<view class="record_item_operation row ce ac">
<button class="record_item_operation_confirm row cc ac" data-item="{{item}}" catchtap="onRecordDetail">去使用</button>
</view>
</view>
<!-- 已完成 -->
<view class="record_item column" wx:if="{{item.state === 3}}" data-item="{{item}}" bindtap="onRecordDetail">
<view class="row cb ac">
......
......@@ -94,8 +94,8 @@ Page({
// 券码信息
let funcCouponInfo = {
'shopName': funcData.officeName,
'shopTime': funcData.businessTime,
'shopName': funcData.useOffice.officeName,
'shopTime': funcData.useOffice.businessTime,
'userName': funcData.name,
'userPhone': funcData.mobilePhone,
}
......@@ -260,6 +260,7 @@ Page({
iconType: 'success',
title: '收货成功',
})
wx.setStorageSync('tempOptions', 'exchangeRecordSeset')
this.queryExchangeDetail()
}).catch((response) => {})
},
......@@ -299,6 +300,7 @@ Page({
iconType: 'success',
title: '删除成功',
})
wx.setStorageSync('tempOptions', 'exchangeRecordSeset')
wx.navigateBack()
}).catch((response) => {})
},
......
......@@ -162,7 +162,10 @@
<text class="font_normal_22 color_secondary">{{'下单时间: ' + otherInfo.timeCreate}}</text>
<block wx:if="{{isExpress && (state === 2 || state === 3 || state === 5)}}">
<text class="font_normal_22 color_secondary">{{'发货时间:' + otherInfo.timeExpress}}</text>
<text class="font_normal_22 color_secondary">{{'物流单号:' + otherInfo.expressNumber}}</text>
<view class="row">
<text class="font_normal_22 color_secondary">{{'物流单号:' + otherInfo.expressNumber}}</text>
<text class="font_normal_22 color_primary" space="nbsp" bindtap="onCopyExpressNumber"> 复制</text>
</view>
</block>
</view>
......
......@@ -332,6 +332,14 @@ Page({
}
if (this.data.isExpress) {
if (Object.keys(this.data.addressSelection).length === 0) {
App.ui.showToast({
iconType: 'error',
title: '收货地址不能为空',
})
return
}
funcParams.shippingAddress = { 'id': this.data.addressSelection.id }
}
......@@ -351,12 +359,13 @@ Page({
let funcData = response.data
wx.reLaunch({ url: '/pages/mall/exchange-tip/exchange-tip?id=' + funcData.orderId })
}).catch((response) => {
App.ui.showToast({
iconType: 'error',
title: response.message,
})
})
},
fail: () => {
console.log('fail')
},
fail: () => {},
})
}).catch((response) => {
......
......@@ -6,7 +6,7 @@
.banner {
position: relative;
width: 750rpx;
height: 800rpx;
height: 774rpx;
background: #fff;
}
......@@ -15,19 +15,19 @@
top: 0 !important;
left: 0 !important;
width: 750rpx;
height: 800rpx;
height: 774rpx;
}
.banner-swiper-point {
position: relative;
top: 680rpx;
top: 654rpx;
left: 0;
}
.banner-wave {
z-index: 1;
position: relative;
top: 740rpx;
top: 714rpx;
left: 0;
width: 750rpx;
height: 60rpx;
......@@ -48,7 +48,7 @@
.goods_info_title {
width: 670rpx;
min-height: 76rpx;
margin: 64rpx 0 0 0;
margin: 40rpx 0 0 0;
font-size: 54rpx;
font-weight: 800;
line-height: 76rpx;
......@@ -58,7 +58,7 @@
.goods_info_describe {
width: 670rpx;
min-height: 50rpx;
margin: 32rpx 0 0 0;
margin: 36rpx 0 0 0;
font-size: 30rpx;
font-weight: 300;
line-height: 50rpx;
......@@ -116,7 +116,7 @@
.operation > button {
width: 200rpx;
height: 80rpx;
border-radius: 4px;
border-radius: 2px;
background: #86C5E1;
font-size: 30rpx;
......
......@@ -16,7 +16,7 @@ Page({
{ text: '全部', value: '' },
{ text: '1-100', value: '1-100' },
{ text: '100-500', value: '100-500' },
{ text: '500-5000', value: '500-500' },
{ text: '500-5000', value: '500-5000' },
{ text: '5000-10000', value: '5000-10000' },
],
tabPriceIndex: 0,
......@@ -156,7 +156,7 @@ Page({
url: 'v3/integralGood/getGoodList',
params: {
'pageNo': 1,
'pageSize': 5,
'pageSize': -1,
'tagId': this.data.tabItemCommodity[this.data.tabGoodsIndex].value,
'minIntegral': funcIntegralMin,
'maxIntegral': funcIntegralMax,
......@@ -177,7 +177,7 @@ Page({
this.setData({
goodsAllList: this.data.goodsAllList.concat(funcList)
})
}).catch((response) => { })
}).catch((response) => {})
},
/**
......
......@@ -22,7 +22,7 @@
<view class="commodity_info column cc ac">
<!-- 专场商品列表 -->
<view class="recommend">
<view class="recommend" wx:if="{{recommendList['0'].length > 0}}">
<view class="recommend_card">
<view class="recommend_title">
<text>{{recommendTitle['0']}}</text>
......@@ -32,7 +32,7 @@
<view class="recommend_item" data-item="{{item}}" bindtap="onGoodsDetail">
<view class="recommend_item_info column">
<image src="{{item.cover}}" mode="aspectFill"></image>
<text class="recommend_item_info_name text_overflow_point">{{item.name}}</text>
<text class="recommend_item_info_name overflow_point_1">{{item.name}}</text>
<view class="recommend_item_info_price row ac">
<text>{{item.price}}</text>
<text>积分</text>
......@@ -45,7 +45,7 @@
</view>
<!-- 专场商品列表 -->
<view class="recommend">
<view class="recommend" wx:if="{{recommendList['1'].length > 0}}">
<view class="recommend_card">
<view class="recommend_title">
<text>{{recommendTitle['1']}}</text>
......@@ -55,7 +55,7 @@
<view class="recommend_item" data-item="{{item}}" bindtap="onGoodsDetail">
<view class="recommend_item_info column">
<image src="{{item.cover}}" mode="aspectFill"></image>
<text class="recommend_item_info_name text_overflow_point">{{item.name}}</text>
<text class="recommend_item_info_name overflow_point_1">{{item.name}}</text>
<view class="recommend_item_info_price row ac">
<text>{{item.price}}</text>
<text>积分</text>
......@@ -68,7 +68,7 @@
</view>
<!-- 常规商品列表 -->
<view class="routine">
<view class="routine {{recommendList['0'].length > 0 || recommendList['1'].length > 0 ? 'routine_near_recommend' : ''}}">
<m-tab
item="{{tabItemCommodity}}"
classTab="commodity_tab"
......
......@@ -136,6 +136,11 @@
width: 750rpx;
}
.routine_near_recommend {
position: relative;
top: -22rpx;
}
.commodity_tab {
width: 750rpx;
padding: 0 0 0 40rpx;
......@@ -150,6 +155,7 @@
}
.commodity_tab_item_active {
align-items: flex-start;
height: 64rpx;
border-bottom: 4rpx #15191F solid;
......@@ -160,7 +166,8 @@
}
.commodity_tab_item_inactive {
height: 36rpx;
align-items: flex-start;
height: 64rpx;
border-bottom: 4rpx rgba(0, 0, 0, 0) solid;
font-size: 26rpx;
......
......@@ -17,7 +17,7 @@
>
</m-input>
</view>
<text class="text_error" wx:if="{{addressInfo.errorName}}">请填写收货人</text>
<text class="text_error" wx:if="{{addressInfo.errorName}}">{{addressInfo.errorName}}</text>
</view>
......@@ -35,7 +35,7 @@
>
</m-input>
</view>
<text class="text_error" wx:if="{{addressInfo.errorPhone}}">请填写手机号</text>
<text class="text_error" wx:if="{{addressInfo.errorPhone}}">{{addressInfo.errorPhone}}</text>
</view>
<view class="address_item row ac">
......@@ -61,7 +61,7 @@
>
</m-input>
</view>
<text class="text_error" wx:if="{{addressInfo.errorAddress}}">请填写详细地址</text>
<text class="text_error" wx:if="{{addressInfo.errorAddress}}">{{addressInfo.errorAddress}}</text>
</view>
</view>
......
......@@ -15,15 +15,18 @@ Page({
memberInfo: {
'idMember': '',
'idExamine': '',
'name': '',
'nickname': '',
'avatar': '',
'userType': 0,
'remarks': '',
'name': '',
'phone': '',
'remarks': '',
'date': '',
'refuse': '',
'auditor': '',
'userType': 0,
},
winMember: false,
winMember: true,
},
onLoad: function (options) {
......
......@@ -12,21 +12,21 @@
<view class="member_item column" wx:if="{{tabIndex === 0}}">
<view class="member_info_name row ac">
<image class="member_avatar" src="{{item.avatar}}"></image>
<text class="text_overflow_point">{{item.name}}</text>
<text class="overflow_point_1">{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.userType === 1}}">业主</text>
</view>
<view class="member_info_other column">
<view class="row ac">
<text>手机号</text>
<text class="text_overflow_point">{{item.phone}}</text>
<text class="overflow_point_1">{{item.phone}}</text>
</view>
<view class="row ac">
<text>微信昵称</text>
<text class="text_overflow_point">{{item.nickname}}</text>
<text class="overflow_point_1">{{item.nickname}}</text>
</view>
<view class="row ac">
<text>备注</text>
<text class="text_overflow_point">{{item.remarks}}</text>
<text class="overflow_point_1">{{item.remarks}}</text>
</view>
</view>
<view class="member_info_operation row cb ac">
......@@ -41,10 +41,10 @@
<image class="pass_item_avatar" src="{{item.avatar}}"></image>
<view class="pass_item_info column cc">
<view class="row ac">
<text class="pass_item_info_name text_overflow_point">{{item.name}}</text>
<text class="pass_item_info_name overflow_point_1">{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.userType === 1}}">业主</text>
</view>
<text class="pass_item_info_phone text_overflow_point">{{item.phone}}</text>
<text class="pass_item_info_phone overflow_point_1">{{item.phone}}</text>
</view>
<image class="icon_40" src="{{imageBase + 'icon/warning-5.png'}}" data-item="{{item}}" bindtap="onMemberInfo"></image>
</view>
......@@ -57,10 +57,10 @@
<image class="pass_item_avatar" src="{{item.avatar}}"></image>
<view class="pass_item_info column cc">
<view class="row ac">
<text class="pass_item_info_name text_overflow_point">{{item.name}}</text>
<text class="pass_item_info_name overflow_point_1">{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.userType === 1}}">业主</text>
</view>
<text class="pass_item_info_phone text_overflow_point">{{item.phone}}</text>
<text class="pass_item_info_phone overflow_point_1">{{item.phone}}</text>
</view>
<image class="icon_40" src="{{imageBase + 'icon/warning-5.png'}}" data-item="{{item}}" bindtap="onMemberInfo"></image>
</view>
......@@ -78,24 +78,24 @@
<text class="win_member_info_phone">{{memberInfo.phone}}</text>
<view class="win_member_info_other column">
<view class="row">
<text>微信昵称</text>
<text class="text_overflow_point">{{memberInfo.nickname}}</text>
<text class="font_normal_30 color_secondary">微信昵称</text>
<text class="overflow_point_2 font_normal_30 color_regular">{{memberInfo.nickname}}</text>
</view>
<view class="row">
<text>备注</text>
<text class="text_overflow_point">{{memberInfo.remarks}}</text>
<text class="font_normal_30 color_secondary">备注</text>
<text class="overflow_point_2 font_normal_30 color_regular">{{memberInfo.remarks}}</text>
</view>
<view class="row">
<text>加入时间</text>
<text class="text_overflow_point">{{memberInfo.date}}</text>
<text class="font_normal_30 color_secondary">加入时间</text>
<text class="overflow_point_2 font_normal_30 color_regular">{{memberInfo.date}}</text>
</view>
<view class="row" wx:if="{{memberInfo.state === 2}}">
<text>拒绝原因</text>
<text class="text_overflow_point">{{memberInfo.refuse}}</text>
<text class="font_normal_30 color_secondary">拒绝原因</text>
<text class="overflow_point_2 font_normal_30 color_regular">{{memberInfo.refuse}}</text>
</view>
<view class="row">
<text>审核人</text>
<text class="text_overflow_point">{{memberInfo.auditor}}</text>
<text class="font_normal_30 color_secondary">审核人</text>
<text class="overflow_point_2 font_normal_30 color_regular">{{memberInfo.auditor}}</text>
</view>
</view>
</view>
......
......@@ -160,7 +160,8 @@
.win_member_info {
width: 622rpx;
min-height: 954rpx;
border-radius: 4px;
padding: 0 0 64rpx 0;
border-radius: 4px;
background: #FFFFFF;
}
......@@ -192,30 +193,22 @@
.win_member_info_other {
width: 494rpx;
margin: 96rpx 64rpx 0 64rpx;
margin: 48rpx 64rpx 0 64rpx;
}
.win_member_info_other > view {
height: 90rpx;
max-height: 84rpx;
margin: 48rpx 0 0 0;
}
.win_member_info_other > view > text:nth-child(1) {
width: 120rpx;
height: 42rpx;
margin: 0 68rpx 0 0;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #959DA9;
}
.win_member_info_other > view > text:nth-child(1) {
.win_member_info_other > view > text:nth-child(2) {
max-width: 300rpx;
height: 42rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #15191F;
}
.win_member_close {
......
let App = getApp()
Page({
data: {
tabItem: [
{ text: '我加入的', value: 0 },
{ text: '我管理的', value: 1 },
segmentItem: [
{ text: '我加入的', value: 0, quantity: 0 },
{ text: '我管理的', value: 1, quantity: wx.getStorageSync('clubExamine') },
],
tabIndex: 0,
segmentIndex: 0,
clubList: [],
pageIndex: 1,
pageSize: 5,
......@@ -75,6 +76,7 @@ Page({
}).then((response) => {
let funcData = response.data.list
let funcList = []
let funcExamine = 0
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].clubId,
......@@ -82,13 +84,23 @@ Page({
'name': funcData[i].name,
'member': funcData[i].memberNum,
'memberId': funcData[i].memberId,
'examine': funcData[i].count, // 入会审核数量
'examine': Number(funcData[i].count),
'state': Number(funcData[i].state),
'date': funcData[i].date,
'remark': funcData[i].remarks,
'isOwner': Number(funcData[i].owner) === 0 ? false : true
}
funcList.push(funcItem)
// 统计审核数量
funcExamine = funcExamine + funcItem.examine
wx.setStorageSync('clubExamine', funcExamine)
let funcSegmentItem = this.data.segmentItem
funcSegmentItem[1].quantity = funcExamine
this.setData({
segmentItem: funcSegmentItem
})
}
this.setData({
clubList: this.data.clubList.concat(funcList)
......@@ -410,7 +422,7 @@ Page({
this.setData({
pageIndex: this.data.pageIndex + 1
})
switch (this.data.tabIndex) {
switch (this.data.segmentIndex) {
case 0:
this.queryClubEnter()
break
......@@ -421,15 +433,15 @@ Page({
}
},
eventTabChange: function (funcEvent) {
let funcTabIndex = funcEvent.detail.index
eventSegmentChange: function (funcEvent) {
let funcSegmentIndex = funcEvent.detail.index
this.setData({
clubList: [],
tabIndex: funcTabIndex,
segmentIndex: funcSegmentIndex,
pageIndex: 1,
})
switch (funcTabIndex) {
switch (funcSegmentIndex) {
case 0:
this.queryClubEnter()
break
......
......@@ -2,14 +2,22 @@
<m-dialog></m-dialog>
<m-nav titleText="我的俱乐部" styleIndex="{{1}}"></m-nav>
<m-tab
item="{{tabItem}}"
classTab="tab"
classTabItem="tab_item"
classActive="tab_item_active"
classInactive="tab_item_inactive"
bindtabChange="eventTabChange">
</m-tab>
<m-segment
classSegmentList="segment_list"
classSegmentbItem="segment_item"
segmentItem="{{segmentItem}}"
bind:segmentChange="eventSegmentChange"
>
<block wx:for="{{segmentItem}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view slot="{{'segmentItem' + index}}">
<text>{{item.text}}</text>
<view class="segment_item_quantity row cc ac" wx:if="{{segmentItem[index].quantity > 0}}">
<text class="font_normal_22 color_submit">{{segmentItem[index].quantity}}</text>
</view>
</view>
</block>
</m-segment>
<view class="container">
<view class="club_list {{clubList.length ? 'column' : 'row cc ac'}}">
<block wx:for="{{clubList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
......@@ -23,7 +31,7 @@
</view>
<!-- 我加入的 -->
<view class="club-info-other row cb ae" hidden="{{!(tabIndex === 0)}}" data-item="{{item}}" bindtap="onGetClubAdminInfo">
<view class="club-info-other row cb ae" hidden="{{!(segmentIndex === 0)}}" data-item="{{item}}" bindtap="onGetClubAdminInfo">
<view class="club-info-examine column">
<text>{{item.date + ' 提交申请'}}</text>
<text>{{'审核待通过'}}</text>
......@@ -34,7 +42,7 @@
</view>
<!-- 我管理的 -->
<view class="club-info-other row cb ae" hidden="{{!(tabIndex === 1)}}" data-item="{{item}}" bindtap="onEstablishClubExamineTip">
<view class="club-info-other row cb ae" hidden="{{!(segmentIndex === 1)}}" data-item="{{item}}" bindtap="onEstablishClubExamineTip">
<view class="club-info-examine column">
<text>{{item.date + ' 提交申请'}}</text>
<text>{{'审核待通过'}}</text>
......@@ -56,7 +64,7 @@
</view>
<!-- 我加入的 -->
<view class="club-info-other row cb ae" hidden="{{!(tabIndex === 0)}}" data-item="{{item}}" bindtap="onClubInfo">
<view class="club-info-other row cb ae" hidden="{{!(segmentIndex === 0)}}" data-item="{{item}}" bindtap="onClubInfo">
<view class="club_info_member column">
<text>{{item.member + ' 成员'}}</text>
<text>{{item.date + ' 加入'}}</text>
......@@ -65,13 +73,13 @@
</view>
<!-- 我管理的 -->
<view class="club-info-other row cb ae" hidden="{{!(tabIndex === 1)}}" data-item="{{item}}" bindtap="onClubInfo">
<view class="club-info-other row cb ae" hidden="{{!(segmentIndex === 1)}}" data-item="{{item}}" bindtap="onClubInfo">
<view class="club_info_member column">
<text>{{item.member + ' 成员'}}</text>
<text>{{item.date + ' 创建'}}</text>
</view>
<view class="club_operation row cb ae">
<block wx:if="{{item.examine > 0}}" >
<block wx:if="{{item.examine > 0}}">
<view class="club_operation_examine row cc ac">
<text>{{item.examine}}</text>
</view>
......@@ -92,7 +100,7 @@
</view>
<!-- 我加入的 -->
<view class="club-info-other row cb ae" hidden="{{!(tabIndex === 0)}}" data-item="{{item}}" bindtap="onFailedAuditTip">
<view class="club-info-other row cb ae" hidden="{{!(segmentIndex === 0)}}" data-item="{{item}}" bindtap="onFailedAuditTip">
<view class="club-info-examine column">
<text>{{item.date + ' 提交申请'}}</text>
<text>{{'审核未通过'}}</text>
......@@ -103,7 +111,7 @@
</view>
<!-- 我管理的 -->
<view class="club-info-other row cb ae" hidden="{{!(tabIndex === 1)}}" data-item="{{item}}" bindtap="onFailedAuditTip">
<view class="club-info-other row cb ae" hidden="{{!(segmentIndex === 1)}}" data-item="{{item}}" bindtap="onFailedAuditTip">
<view class="club-info-examine column">
<text>{{item.date + ' 提交申请'}}</text>
<text>{{'审核未通过'}}</text>
......@@ -118,11 +126,11 @@
<block wx:if="{{clubList.length === 0}}">
<view class="club_list_nothing_tip">
<block wx:if="{{tabIndex === 0}}">
<block wx:if="{{segmentIndex === 0}}">
<text>暂无已加入俱乐部</text>
<button class="row cc ac" bindtap="onClubHome">发现更多</button>
</block>
<block wx:if="{{tabIndex === 1}}">
<block wx:if="{{segmentIndex === 1}}">
<text>暂无管理的俱乐部</text>
<button class="row cc ac" bindtap="onClubHome">创建俱乐部</button>
</block>
......
.tab {
margin-top: 60rpx;
border-bottom: 1px #E2E7EF solid;
}
.tab_item {
display: inline-block;
.segment_list {
width: 750rpx;
margin: 40rpx 0 0 0;
}
.tab_item_active {
.segment_item {
width: 104rpx;
height: 50px;
margin: 0 136rpx;
border-bottom: 4rpx #000000 solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36px;
color: #15191F;
margin: 0 auto;
}
.tab_item_inactive {
width: 104rpx;
height: 50rpx;
margin: 0 136rpx;
border-bottom: 4rpx rgba(0, 0, 0, 0) solid;
font-size: 26rpx;
font-weight: 800;
line-height: 36px;
color: #959DA9;
.segment_item_quantity {
position: absolute;
top: 0;
left: 114rpx;
min-width: 32rpx;
height: 32rpx;
padding: 0 10rpx;
border-radius: 16rpx;
background: #E66060;
}
/* 俱乐部列表 */
......
......@@ -496,7 +496,7 @@ Page({
* @returns
*/
onIntegralDetail: function () {
wx.navigateTo({ url: '/pages/mall/home/home' })
wx.getStorageSync('userInfo').isSignIn ? wx.navigateTo({ url: '/pages/mall/home/home' }) : wx.navigateTo({ url: '/pages/login/login' })
},
/**
......@@ -692,6 +692,7 @@ Page({
},
onToClub: function () {
if (!App.userIsRegister()) return
wx.navigateTo({ url: '/pages/mine/club/club' })
},
......
......@@ -140,7 +140,7 @@
<text>{{membershipCard[0].shopName}}</text>
</view>
<view class="card-membership-info-date column">
<text class="text_overflow_point">{{membershipCard[0].cardName}}</text>
<text class="overflow_point_1">{{membershipCard[0].cardName}}</text>
<text>{{membershipCard[0].timeExpire}}</text>
</view>
<view class="card-membership-info-user column">
......
.user_info {
width: 750rpx;
margin: 8rpx 0 0 0;
padding: 0 40rpx;
}
......@@ -20,7 +21,7 @@
.info_item {
width: 670rpx;
min-height: 94rpx;
padding: 28rpx 0;
padding: 28rpx 0 24rpx 0;
border-bottom: 1px #E2E7EF solid;
}
......
......@@ -99,6 +99,8 @@ Page({
},
// 活动报名
onReport: function () {
if (!App.userIsRegister()) return
if (this.data.activeState !== 2) {
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=6'
......
let App = getApp()
Page({
// 此处属性是页面全局属性,通常用于记录不进行渲染的逻辑数据,避免过多 setData 操作。
option: {},
data: {
appStatus: App.globalData.appStatus,
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
recentActivitiesList: [],
clubList: [],
......@@ -14,19 +9,19 @@ Page({
strategyList: [],
strategyOriginList: [],
//接口参数
pageNo: 1,
pageSize: 10,
loading: false,
moreData: true,
activityList: [],
swiperRecentCurrent: 0,
movieList: [],
swiperMovieCurrent: 0,
touristRouteList: [],
touristRoutePageNo: 1,
touristRoutePageSize: 10,
},
onShow: function () {
......@@ -50,32 +45,41 @@ Page({
* @returns
*/
queryActivity: function () {
App.wxRequest({
App.request({
url: 'v1/activity/getList',
data: {
listType: 1,
pageSize: 10,
pageNo: 1,
tagId: '101',
},
success: (res) => {
var tmpArr = [];
res.data.list.forEach(item => {
var tmpItem = {
id: item.id,
cover: item.playImg,
title: item.name,
date: item.activeDate + ' ' + item.activeTime,//'6月30日-7月12日 10:00-12:00',
describe: item.summary,
beginDate: item.activeDate.split('-')[0],
}
tmpArr.push(tmpItem)
})
this.setData({
activityList: tmpArr
})
params: {
'tagId': '101',
'listType': 1,
'pageNo': 1,
'pageSize': 10,
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].id,
'name': funcData[i].name,
'cover': funcData[i].cover,
'banner': funcData[i].playImg,
'describe': funcData[i].summary,
'timeDateMM': [funcData[i].activeDate.match(/[0-9]+/g)[0], funcData[i].activeDate.match(/[0-9]+/g)[2]],
'timeDateDD': [funcData[i].activeDate.match(/[0-9]+/g)[1], funcData[i].activeDate.match(/[0-9]+/g)[3]],
'timePeriod': funcData[i].activeTime.replace(/-/, ' - '),
'ownerPrice': funcData[i].ownerPrice,
'visitorPrice': funcData[i].visitorPrice,
'tagId': funcData[i].tagIds,
'shopId': funcData[i].officeId,
}
funcList.push(funcItem)
funcList.push(funcItem)
}
this.setData({
recentActivitiesList: funcList
})
console.log(this.data.recentActivitiesList)
}).catch((response) => {
})
},
......@@ -220,13 +224,6 @@ Page({
})
},
// 近期活动swiper
swiperRecentChange: function (e) {
let swiperRecentCurrent = e.detail.current
this.setData({
swiperRecentCurrent
})
},
// 热门电影swiper
swiperMovieChange: function (e) {
let swiperMovieCurrent = e.detail.current
......@@ -269,8 +266,8 @@ Page({
App.wxRequest({
url: 'v1/strategy/getList',
data: {
'pageSize': this.data.pageSize + '',
'pageNo': this.data.pageNo + ''
'pageNo': this.data.touristRoutePageNo,
'pageSize': this.data.touristRoutePageSize,
},
success: (response) => {
let funcResponse = response.data
......
......@@ -18,79 +18,99 @@
</block>
<!-- 近期活动 -->
<view class="title row con-b align-c">
<view class="title row cb ac">
<image src="./image/title-activity.png"></image>
<text bindtap="onAllRecent" bindtap="onAllActivity">查看全部</text>
<text bindtap="onAllActivity">查看全部</text>
</view>
<swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperRecentChange" wx:if="{{activityList.length > 0}}">
<block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="activity-item" data-item="{{item}}" bindtap="onActivityDetail">
<image mode="aspectFill" class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image>
</swiper-item>
<view class="recent_activities_list row" wx:if="{{recentActivitiesList.length > 0}}" bindchange="swiperRecentChange">
<block wx:for="{{recentActivitiesList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="recent_activities_item" data-item="{{item}}" bindtap="onActivityDetail">
<view class="recent_activities_item_wrap column">
<view class="recent_activities_item_date row ac">
<text class="font_normal_42 color_regular">{{item.timeDateMM[0]}}</text>
<text class="font_normal_50 color_regular">/</text>
<text class="font_normal_42 color_regular">{{item.timeDateDD[0]}}</text>
</view>
<view class="recent_activities_item_date row ac">
<text class="font_normal_42 color_regular">{{item.timeDateMM[1]}}</text>
<text class="font_normal_50 color_regular">/</text>
<text class="font_normal_42 color_regular">{{item.timeDateDD[1]}}</text>
</view>
<view class="recent_activities_item_line"></view>
<text class="recent_activities_item_time font_bold_30 color_regular">{{item.timePeriod}}</text>
<view class="recent_activities_item_name row ac">
<text class="font_bold_54 color_regular overflow_point_2">{{item.name}}</text>
</view>
</view>
<image class="recent_activities_item_cover" mode="aspectFill" src="{{item.cover}}"></image>
</view>
</block>
</swiper>
<block wx:if="{{activityList.length === 0}}">
<view class="item-nothing col con-c align-c">
<view class="recent_activities_item"></view>
</view>
<block wx:if="{{recentActivitiesList.length === 0}}">
<view class="item-nothing col con-c ac">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>近期暂无活动安排</text>
</view>
</block>
<!-- 热映影片 -->
<view class="title row con-b align-c">
<image src="./image/title-movie.png"></image>
<text bindtap="onAllMovie">查看全部</text>
</view>
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange" wx:if="{{movieList.length > 0}}">
<block wx:for="{{movieList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="movie-item col con-e">
<view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}">
<view class="movie-cover">
<image mode="aspectFill" src="{{item.cover}}"></image>
</view>
<view class="movie-info-wrapper">
<view class="row align-c">
<view class="movie-name">
<text>{{item.movieName}}</text>
</view>
<view class="movie-tags row">
<text wx:if="{{item.tags}}">{{item.tags[0]}}</text>
</view>
<view class="hot_movie">
<view class="row cb ac">
<image class="hot_movie_title" src="./image/title-movie.png"></image>
<text class="font_normal_26 color_secondary" bindtap="onAllMovie">查看全部</text>
</view>
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange" wx:if="{{movieList.length > 0}}">
<block wx:for="{{movieList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="movie-item col con-e">
<view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}">
<view class="movie-cover">
<image mode="aspectFill" src="{{item.cover}}"></image>
</view>
<view class="movie-info row">
<view class="movie-info-left">
<text>类型</text>
<view class="movie-info-wrapper">
<view class="row ac">
<view class="movie-name">
<text>{{item.movieName}}</text>
</view>
<view class="movie-tags row">
<text wx:if="{{item.tags}}">{{item.tags[0]}}</text>
</view>
</view>
<view class="movie-info-right">
<text>{{item.movieType}}</text>
<view class="movie-info row">
<view class="movie-info-left">
<text>类型</text>
</view>
<view class="movie-info-right">
<text>{{item.movieType}}</text>
</view>
</view>
</view>
<view class="movie-info row">
<view class="movie-info-left">
<text>导演</text>
<view class="movie-info row">
<view class="movie-info-left">
<text>导演</text>
</view>
<view class="movie-info-right">
<text>{{item.movieDirector}}</text>
</view>
</view>
<view class="movie-info-right">
<text>{{item.movieDirector}}</text>
<view class="movie-btn">
<text>报名观影</text>
</view>
</view>
<view class="movie-btn">
<text>报名观影</text>
</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
</swiper-item>
</block>
</swiper>
<block wx:if="{{movieList.length === 0}}">
<view class="item-nothing col con-c align-c">
<image class="nothing-movie" src="{{resourcesBase + 'play/nothing-movie.png'}}"></image>
<text>暂无影片,请期待后续排片</text>
</view>
</block>
<block wx:if="{{movieList.length === 0}}">
<view class="item-nothing col con-c ac">
<image class="nothing-movie" src="{{resourcesBase + 'play/nothing-movie.png'}}"></image>
<text>暂无影片,请期待后续排片</text>
</view>
</block>
</view>
<!-- 俱乐部 -->
<view class="title row con-b align-c">
<view class="title row cb ac">
<image src="./image/title-club.png"></image>
<text bindtap="onAllRecent" bindtap="onToClubList">查看全部</text>
</view>
......@@ -106,7 +126,7 @@
</block>
</view>
<block wx:if="{{clubList.length === 0}}">
<view class="item-nothing col con-c align-c">
<view class="item-nothing col con-c ac">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>暂无俱乐部信息</text>
</view>
......@@ -115,18 +135,18 @@
<!-- 游客攻略 -->
<view class="route">
<block wx:if="{{touristRouteList.length > 0}}">
<view class="title row align-c">
<view class="title row ac">
<image src="./image/title-route.png"></image>
</view>
<view class="route-list row con-b">
<view class="route-list row cb">
<!-- 左侧列表 -->
<view class="route-list-left">
<block wx:for="{{touristRouteList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 0}}" data-item="{{item}}" bindtap="onTouristRouteDetail">
<view class="row con-c align-c">
<view class="row con-c ac">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row align-c">
<view class="route-item-tags row ac">
<block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
<text>{{'# ' + itemTags}}</text>
</block>
......@@ -141,10 +161,10 @@
<view class="route-list-right">
<block wx:for="{{touristRouteList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 1}}" data-item="{{item}}" bindtap="onTouristRouteDetail">
<view class="row con-c align-c">
<view class="row con-c ac">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row align-c">
<view class="route-item-tags row ac">
<block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
<text>{{'# ' + itemTags}}</text>
</block>
......
......@@ -75,28 +75,58 @@
}
/* 近期活动 */
.activity-swiper {
.recent_activities_list {
width: 750rpx;
height: 721rpx;
margin-top: 80rpx;
padding-bottom: 50rpx;
margin: 80rpx 0 0 0;
padding: 0 0 0 40rpx;
overflow-x: scroll;
}
.activity-item {
width: 712rpx;
.recent_activities_item {
display: inline-block;
position: relative;
width: 648rpx;
height: 720rpx;
margin: 0 24rpx 0 0;
padding: 48rpx 0 0 0;
}
.recent_activities_item:last-child {
min-width: 2px;
}
.activity-item image {
.recent_activities_item_wrap {
width: 648rpx;
height: 720rpx;
height: 672rpx;
padding: 50rpx 0 0 50rpx;
border-radius: 2px;
background: #EEF3F9;
}
.activity-item-left {
margin-left: 40rpx;
.recent_activities_item_date {
margin: 0 0 12rpx 0;
}
.activity-item-center {
margin-left: 51rpx;
.recent_activities_item_line {
width: 1px;
height: 128rpx;
margin: 8rpx 0 22rpx 10rpx;
background: #000000;
}
.recent_activities_item_name {
width: 560rpx;
height: 168rpx;
margin: 60rpx 0 0 0;
}
.recent_activities_item_cover {
position: absolute;
top: 0;
left: 260rpx;
width: 340rpx;
height: 464rpx;
border-radius: 2px;
}
.item-nothing {
......@@ -125,6 +155,15 @@
}
/* 热映影片 */
.hot_movie {
margin: 90rpx 0 0 0;
}
.hot_movie_title {
width: 184rpx;
height: 44rpx;
}
.movie-swiper {
width: 750rpx;
height: 366rpx;
......
......@@ -28,6 +28,7 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
......
......@@ -80,5 +80,5 @@ let funcItem = {
}
// 审核失败 - FailedAudit
// 审核成功 - SuccessAudits
// 审核成功 - SuccessAudit
// 数据检查 - inspection
\ No newline at end of file
......@@ -36,14 +36,7 @@ let Output = {
* @param {object} funResult - 响应回来的数据
* @returns {object || undefined}
*/
response: function (funcOption, funcResponse) {
// console.log('■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■')
// console.log('api: ', funcOption.url)
// console.log('params: ', funcOption.params)
// console.log('status: ', funcResponse.statusCode)
// console.log('data: ', funcResponse.data ? funcResponse.data : funcResponse)
// console.log('■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■')
response: function (funcOption, funcResponse) {
// 请求错误处理
if (funcResponse.errMsg === 'request:fail ') {
console.log('request:fail - 1')
......@@ -59,7 +52,7 @@ let Output = {
// 请求正常
// 此处可以根据后台返回数据,格式化返回数据。
if (funcResponse.statusCode === 200) {
switch (funcResponse.data.code) {
switch (Number(funcResponse.data.code)) {
case 101:
break
......@@ -75,6 +68,10 @@ let Output = {
}
break
case 402:
getApp().setNewToken(funcOption)
break
case 500:
return {
success: false,
......@@ -87,7 +84,6 @@ let Output = {
break
}
}
return true
},
}
......
......@@ -16,7 +16,12 @@ let output = {
funcAmountValue = '0' + funcAmountValue
break
}
return funcAmountValue.toString().replace(/([0-9]{2})$/, '.$1')
if (funcAmountValue === '000') {
return '免费'
} else {
return funcAmountValue.toString().replace(/([0-9]{2})$/, '.$1')
}
},
// 项目通用函数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment