Commit 265199e6 by 严立

LL - 俱乐部静态

parent 17e45fbe
......@@ -62,7 +62,9 @@
"usingComponents": {
"m-button-bottom": "./component/m-button-bottom/m-button-bottom",
"m-dialog": "./component/m-dialog/m-dialog",
"m-input": "./component/m-input/m-input",
"m-nav": "./component/m-nav/m-nav",
"m-textarea": "./component/m-textarea/m-textarea",
"m-tab": "./component/m-tab/m-tab",
"m-toast": "./component/m-toast/m-toast",
......
......@@ -8,6 +8,11 @@ Component({
type: String,
value: '申请加入',
},
isDisable: {
type: Boolean,
value: true
},
},
data: {
......
<view class="m-button-bottom">
<view class="m-button-bottom-content">
<button class="row cc ac" bindtap="onButton">{{text}}</button>
<button class="row cc ac {{isDisable ? 'm-button-bottom-able' : 'm-button-bottom-disable'}}" bindtap="{{isDisable ? onButton : ''}}">{{text}}</button>
</view>
<view class="m-button-bottom-occupy"></view>
</view>
\ No newline at end of file
......@@ -16,7 +16,6 @@
width: 670rpx;
height: 96rpx;
border-radius: 4px;
background: #86C5E1;
font-size: 30rpx;
font-weight: 500;
......@@ -24,6 +23,14 @@
color: #FFFFFF;
}
.m-button-bottom-able {
background: #86C5E1;
}
.m-button-bottom-disable {
background: #C8E1EC;
}
.m-button-bottom-occupy {
width: 750rpx;
height: 156rpx;
......
......@@ -3,6 +3,9 @@ Component({
styleIsolation: 'apply-shared'
},
properties: {
className: { type: String, value: '' },
placeholder: { type: String, value: '' },
value: {
type: String,
value: ''
......
<view class="z-input">
<view class="container-text row ac" hidden="{{!winText}}" bindtap="setInputShow">
<text>{{value}}</text>
<view class="container-text row ac {{className}}" hidden="{{!winText}}" bindtap="setInputShow">
<text class="container-text-value" hidden="{{value === '' ? true : false}}">{{value}}</text>
<text class="container-text-placeholder" hidden="{{value === '' ? false : true}}">{{placeholder}}</text>
</view>
<view class="container-input row ac" hidden="{{!winInput}}">
<view class="container-input row ac {{className}}" hidden="{{!winInput}}">
<input
class="row ac"
value="{{value}}"
placeholder="{{placeholder}}"
placeholder-class="container-text-placeholder"
focus="{{inputFocus}}"
bindinput="onInput"
bindfocus="onInputFocus"
......
......@@ -2,15 +2,18 @@
position: relative;
}
.container-text-value {
color: #000000;
}
.container-text-placeholder {
color: #C2C7CF;
}
.container-text {
width: 400rpx;
height: 80rpx;
border: 1px green solid;
color: green;
}
.container-input {
width: 400rpx;
height: 80rpx;
border: 1px red solid;
color: red;
}
\ No newline at end of file
......@@ -294,7 +294,9 @@ Component({
computeNavHeight: function () {
// 导航栏没有 logo 的场景,使用系统高度。
if (this.data.currentStyle.logo === '') {
console.log()
wx.setStorageSync('navHeight', this.data.currentStyle.statusHeight + this.data.currentStyle.titleHeight)
this.triggerEvent('navChangeHeight', { navHeight: wx.getStorageSync('navHeight') })
return
}
......@@ -317,6 +319,8 @@ Component({
} else {
wx.setStorageSync('navHeight', funcLogoFillTop + funcLogoFillHeight)
}
this.triggerEvent('navChangeHeight', { navHeight: wx.getStorageSync('navHeight') })
},
/**
......
......@@ -50,6 +50,8 @@ Component({
methods: {
setItemElement: function () {
if (this.data.item.length === 0) return
// 获取购物车高度
let funcQuery = this.createSelectorQuery()
funcQuery.selectAll('.m-item').boundingClientRect()
......
.m-tab {
z-index: 4;
width: 750rpx;
height: 72rpx;
height: 74rpx;
padding: 0 0 0 40rpx;
border-bottom: 1px #E2E7EF solid;
background: #FFFFFF;
......@@ -41,5 +41,5 @@
}
.m-tab-occupy {
height: 72rpx;
height: 74rpx;
}
\ No newline at end of file
Component({
options: {
styleIsolation: 'apply-shared'
},
properties: {
className: { type: String, value: '' },
placeholder: { type: String, value: '' },
value: { type: String, value: '' },
inputMax: { type: Number, value: 140 }
},
data: {
inputFocus: false,
inputQuantity: 0,
winText: true,
winInput: false,
},
methods: {
onInput: function (event) {
this.setData({
value: event.detail.value,
inputQuantity: event.detail.value.length
})
console.log(this.data.inputQuantity)
},
onInputFocus: function() {
console.log('onInputFocus')
},
onInputBlur: function() {
this.setInputHidden()
},
onInputConfirm: function() {
this.setInputHidden()
},
setInputShow: function() {
this.setData({
winText: false,
winInput: true,
})
let funcTimer = setTimeout(() => {
this.setData({
inputFocus: true,
})
}, 20)
},
setInputHidden: function() {
this.setData({
inputFocus: false,
winText: true,
winInput: false,
})
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="m-textarea">
<view class="m-textarea-text {{className}}" hidden="{{!winText}}" bindtap="setInputShow">
<text class="m-textarea-text-value" wx:if="{{value === '' ? false : true}}">{{value}}</text>
<text class="m-textarea-text-placeholder" wx:if="{{value === '' ? true : false}}">{{placeholder}}</text>
</view>
<view class="m-textarea-input {{className}}" hidden="{{!winInput}}">
<textarea
value="{{value}}"
placeholder="{{placeholder}}"
placeholder-class="m-textarea-text-placeholder"
maxlength="{{inputMax}}"
focus="{{inputFocus}}"
bindinput="onInput"
bindfocus="onInputFocus"
bindblur="onInputBlur"
bindconfirm="onInputConfirm"
></textarea>
</view>
<view class="m-textarea-quantity">
<text>{{inputQuantity + '/' + inputMax}}</text>
</view>
</view>
\ No newline at end of file
.m-textarea {
position: relative;
}
.m-textarea-text-value {
color: #000000;
}
.m-textarea-text-placeholder {
display: inline-block;
font-size: 30rpx;
font-weight: 400;
line-height: 36rpx;
color: #C2C7CF;
}
/* 输入计数 */
.m-textarea-quantity {
position: absolute;
bottom: 16rpx;
right: 24rpx;
}
.m-textarea-quantity > text {
height: 32rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #C2C7CF;
}
\ No newline at end of file

318 Bytes | W: | H:

2.23 KB | W: | H:

image/icon/arrow-t-2.png
image/icon/arrow-t-2.png
image/icon/arrow-t-2.png
image/icon/arrow-t-2.png
  • 2-up
  • Swipe
  • Onion skin
// pages/club/create/create.js
let App = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
isButtonBottom: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
<!--pages/club/create/create.wxml-->
<text>pages/club/create/create.wxml</text>
<m-nav titleText="申请加入俱乐部"></m-nav>
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src=""></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
</view>
</view>
<view class="club-enter">
<view class="form-item col">
<text>俱乐部名称</text>
<m-input className="form-item-input row ac" placeholder="请输入俱乐部名称"></m-input>
<text>错误提示</text>
</view>
<view class="form-item col">
<text>俱乐部简要说明</text>
<m-textarea className="form-item-textarea" placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等" inputMax="{{200}}"></m-textarea>
<text>错误提示</text>
</view>
<view class="form-item col">
<text>姓名</text>
<m-input className="form-item-input row ac" placeholder="请输入姓名"></m-input>
<text>错误提示</text>
</view>
<view class="form-item col">
<text>手机号</text>
<m-input className="form-item-input row ac" placeholder="请输入手机号"></m-input>
<text>错误提示</text>
</view>
<view class="form-item col">
<text>微信号</text>
<m-input className="form-item-input row ac" placeholder="请输入微信号"></m-input>
<text>错误提示</text>
</view>
</view>
<view class="club-enter-tip row cb">
<image src="{{imageBase + 'icon/warning-4.png'}}"></image>
<text>申请提交后,审核人员将主动与您联系(预计5个工作日),并协助后续资料整理。</text>
</view>
</view>
<m-button-bottom text="提交申请" isDisable="{{isButtonBottom}}"></m-button-bottom>
\ No newline at end of file
/* pages/club/create/create.wxss */
\ No newline at end of file
/* 俱乐部名称 */
.club-info {
width: 750rpx;
margin-top: 76rpx;
}
.club-info-logo {
width: 168rpx;
height: 168rpx;
background: #999;
}
.club-info-name > text:nth-child(1) {
height: 44rpx;
margin-top: 32rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 800;
line-height: 44rpx;
color: #15191f;
}
.club-info-name > text:nth-child(2) {
width: 96rpx;
margin-top: 16rpx;
}
.club-info-name > text:nth-child(3) {
height: 40rpx;
margin-top: 16rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 40rpx;
color: #959da9;
}
.club-member {
width: 750rpx;
margin-top: 180rpx;
padding: 0 40rpx;
}
/* 申请表单 */
.club-enter {
width: 750rpx;
margin-top: 88rpx;
padding: 0 40rpx;
}
.form-item > text:nth-child(1) {
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500;
line-height: 42rpx;
color: #1E2025;
}
.form-item-input {
height: 80rpx;
margin: 16rpx 0 8rpx 0;
padding: 0 24rpx;
border-radius: 4rpx;
border: 0.5px solid #DBDFE5;
font-size: 30rpx;
font-weight: 400;
line-height: 32rpx;
color: #000000;
}
.form-item-textarea {
width: 670rpx;
height: 320rpx;
padding: 24rpx;
border-radius: 4px;
border: 1px solid #DBDFE5;
background: #FFFFFF;
font-size: 30rpx;
font-weight: 400;
line-height: 44rpx;
color: #C2C7CF;
}
.form-item > text:nth-child(3) {
height: 32rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #D92B3A;
}
/* 加入提示 */
.club-enter-tip {
width: 670rpx;
height: 112rpx;
margin: 74rpx 0 64rpx 0;
padding: 16rpx 32rpx;
border-radius: 4px;
background: #F5EEDF;
}
.club-enter-tip > image {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
.club-enter-tip > text {
width: 562rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 40rpx;
color: #837048;
}
\ No newline at end of file
// pages/club/enter/enter.js
let App = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
isButtonBottom: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
<!--pages/club/enter/enter.wxml-->
<text>pages/club/enter/enter.wxml</text>
<m-nav titleText="申请加入俱乐部"></m-nav>
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src=""></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
</view>
</view>
<view class="club-enter">
<view class="form-item col">
<text>姓名</text>
<m-input class="form-item-input row ac" placeholder="请输入姓名"></m-input>
<text>错误提示</text>
</view>
<view class="form-item col">
<text>手机号</text>
<m-input class="form-item-input row ac" placeholder="请输入手机号"></m-input>
<text>错误提示</text>
</view>
<view class="form-item col">
<text>备注</text>
<m-input class="form-item-input row ac" placeholder="请输入备注信息"></m-input>
<text>错误提示</text>
</view>
</view>
</view>
<m-button-bottom text="确认申请加入" isDisable="{{isButtonBottom}}"></m-button-bottom>
\ No newline at end of file
/* pages/club/enter/enter.wxss */
\ No newline at end of file
/* 俱乐部名称 */
.club-info {
width: 750rpx;
margin-top: 76rpx;
}
.club-info-logo {
width: 168rpx;
height: 168rpx;
background: #999;
}
.club-info-name > text:nth-child(1) {
height: 44rpx;
margin-top: 32rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 800;
line-height: 44rpx;
color: #15191f;
}
.club-info-name > text:nth-child(2) {
width: 96rpx;
margin-top: 16rpx;
}
.club-info-name > text:nth-child(3) {
height: 40rpx;
margin-top: 16rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 40rpx;
color: #959da9;
}
.club-member {
width: 750rpx;
margin-top: 180rpx;
padding: 0 40rpx;
}
/* 申请表单 */
.club-enter {
width: 750rpx;
margin-top: 88rpx;
padding: 0 40rpx;
}
.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;
}
.form-item-input {
height: 80rpx;
margin: 16rpx 0 8rpx 0;
padding: 0 24rpx;
border-radius: 4rpx;
border: 0.5px solid #DBDFE5;
font-size: 30rpx;
font-weight: 400;
line-height: 32rpx;
color: #000000;
}
.form-item > text:nth-child(3) {
height: 32rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #D92B3A;
}
// pages/club/member/member.js
let App = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
winPowerInfo: false,
winAdminInfo: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onPowerInfo: function () {
this.setData({
winPowerInfo: false
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onAdminInfo: function () {
this.setData({
winAdminInfo: false
})
},
/**
* 页面上拉触底事件的处理函数
* 页面滚动事件
* @function
* @param {object} - funcEvent
* @returns
*/
onReachBottom: function () {
onPageScroll: function (funcEvent) {
App.pageScroll(funcEvent, this)
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
<!--pages/club/member/member.wxml-->
<text>pages/club/member/member.wxml</text>
<m-nav titleText="俱乐部信息"></m-nav>
<!-- 权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfo}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>仅俱乐部会员或俱乐部申请者可查看管理员微信信息。您可在提交加入俱乐部申请后点击查看。</text>
<button class="row cc ac" bindtap="onPowerInfo">我知道了</button>
</view>
</view>
<!-- 管理员微信弹窗 -->
<view class="member-admin row cc ac" wx:if="{{winAdminInfo}}">>
<view class="member-admin-info col cc ac">
<text>管理员微信</text>
<image src=""></image>
<text>【长按保存二维码】</text>
<button class="row cc ac" bindtap="onAdminInfo">我知道了</button>
</view>
</view>
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src=""></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
<text class="owner-mark">业主专享</text>
<text>1877 成员</text>
</view>
</view>
<view class="club-member">
<view class="club-member-title col">
<text>管理员</text>
<text>可添加管理员微信,及时获取活动信息</text>
</view>
<view class="club-member-list">
<block wx:for="{{3}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="club-member-item row cb ac">
<view class="club-member-item-info row ac">
<image src=""></image>
<text>尹燃</text>
</view>
<view class="club-member-operation row ce ac">
<button class="row cc ac">添加微信</button>
</view>
</view>
</block>
</view>
</view>
</view>
\ No newline at end of file
/* pages/club/member/member.wxss */
\ No newline at end of file
/* 权限提醒 */
.member-power {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
}
.member-power-info {
width: 606rpx;
height: 538rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
border-radius: 4px;
background: #FFFFFF;
}
.member-power-info > text:nth-child(1) {
height: 72rpx;
font-size: 50rpx;
font-weight: 800;
line-height: 72rpx;
color: #15191F;
}
.member-power-info > text:nth-child(2) {
width: 526rpx;
height: 138rpx;
margin-top: 48rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 46rpx;
color: #656E7B;
}
.member-power-info > button {
width: 526rpx;
height: 80rpx;
margin-top: 96rpx;
border-radius: 4px;
border: 1px solid #15191F;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #15191F;
}
/* 管理员微信弹窗 */
.member-admin {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
}
.member-admin-info {
width: 606rpx;
height: 726rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
border-radius: 4px;
background: #FFFFFF;
}
.member-admin-info > text:nth-child(1) {
height: 72rpx;
font-size: 50rpx;
font-weight: 800;
line-height: 72rpx;
color: #15191F;
}
.member-admin-info > iamge {
width: 148rpx;
height: 148rpx;
margin-top: 48rpx;
background: #999999;
}
.member-admin-info > text:nth-child(2) {
height: 46rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 46rpx;
color: #15191F;
}
.member-admin-info > button {
width: 526rpx;
height: 80rpx;
margin-top: 48rpx;
border-radius: 4px;
border: 1px solid #15191F;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #15191F;
}
/* 俱乐部名称 */
.club-info {
width: 750rpx;
margin-top: 76rpx;
}
.club-info-logo {
width: 168rpx;
height: 168rpx;
background: #999;
}
.club-info-name > text:nth-child(1) {
height: 44rpx;
margin-top: 32rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 800;
line-height: 44rpx;
color: #15191f;
}
.club-info-name > text:nth-child(2) {
width: 96rpx;
margin-top: 16rpx;
}
.club-info-name > text:nth-child(3) {
height: 40rpx;
margin-top: 16rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 40rpx;
color: #959da9;
}
.club-member {
width: 750rpx;
margin-top: 180rpx;
padding: 0 40rpx;
}
/* 成员标题 */
.club-member-title > text:nth-child(1) {
width: 670rpx;
height: 44rpx;
font-size: 30rpx;
font-weight: 500;
line-height: 44rpx;
color: #15191f;
}
.club-member-title > text:nth-child(2) {
height: 44rpx;
margin-top: 4rpx;
font-size: 26rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 44rpx;
color: #959da9;
}
/* 成员列表 */
.club-member-list {
margin-top: 12rpx;
}
.club-member-item {
margin-top: 32rpx;
}
.club-member-item-info > image {
width: 72rpx;
height: 72rpx;
border-radius: 4px;
background: #999;
}
.club-member-item-info > text {
height: 42rpx;
margin-left: 32rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 42rpx;
color: #15191f;
}
.club-member-operation {
flex-grow: 1;
}
.club-member-operation > button {
width: 120rpx;
height: 52rpx;
border-radius: 4rpx;
border: 1px solid #86c5e1;
font-size: 22rpx;
font-weight: 500;
line-height: 32rpx;
color: #5cb5dd;
}
......@@ -194,7 +194,7 @@ Page({
queryCommodity: function () {
App.ui.showToast({
iconType: 'loading',
title: '加载中...',
title: '加载中',
duration: 30000
})
......
......@@ -22,8 +22,8 @@
<view class="commodity-item row" data-item="{{itemCommodity}}" bind:tap="onCommodityDetail">
<view class="item-img">
<!-- 暂时屏蔽图片下载 -->
<!-- <image src="{{itemCommodity.cover}}" mode="aspectFill"></image> -->
<image src="" mode="aspectFill"></image>
<image src="{{itemCommodity.cover}}" mode="aspectFill"></image>
<!-- <image src="" mode="aspectFill"></image> -->
</view>
<view class="item-info">
<view class="item-info-title">{{itemCommodity.name}}</view>
......
......@@ -32,7 +32,7 @@ page {
.menu-list {
width: 590rpx;
height: 100vh;
padding: 0 28rpx 0rpx 32rpx;
padding: 0 28rpx 200rpx 32rpx;
overflow-y: scroll;
background: #FFFFFF;
}
......
......@@ -12,7 +12,7 @@ Page({
mapCss: '',
arrowCss: '',
cssPoint: 'font-size: ' + 24 * wx.getStorageSync('unitProportion') + 'px;',
cssPoint: 'font-size: ' + 24 * wx.getStorageSync('unitProportion') + 'px; line-height: ' + 24 * wx.getStorageSync('unitProportion') + 'px;',
pointDetail: './image/card/01.png',
winPointDetail: false,
pointInfo: iPoint,
......
......@@ -19,6 +19,7 @@
.point-info {
position: absolute;
/* overflow: hidden; */
}
.point-info-arrow {
......@@ -27,6 +28,13 @@
bottom: -8px;
}
.point-info button {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.icon-active {
border: 2px #133f54 solid;
border-radius: 50%;
......@@ -39,7 +47,7 @@
}
.icon-inactive {
z-index: 9;
z-index: 3;
border: 2px #FFFFFF solid;
border-radius: 50%;
box-shadow: 0px 1px 2px 0px rgba(50,128,182,0.24);
......@@ -50,20 +58,9 @@
color: #000000;
}
.point-info {
overflow: hidden;
}
.point-info button {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
/* 景点详情卡片 */
.point-detail {
z-index: 1900;
z-index: 3;
position: fixed;
bottom: 40rpx;
}
......
......@@ -5,48 +5,51 @@ Page({
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
userInfo: {
'openId': '',
'name': '',
'phone': '',
'avatar': '',
'address': '',
'birthday': '',
'sex': '',
'userType': 0
},
// 是否有券码核销权限
isCouponPermissions: false,
// 我的订单分类 tab
orderCategory: [
{
icon: './image/order-1.png',
name: '门票',
quantity: 0,
type: 3,
type: '3',
}, {
icon: './image/order-2.png',
name: '餐饮',
quantity: 0,
type: 5,
type: '5',
}, {
icon: './image/order-3.png',
name: '影票',
quantity: 0,
type: -2,
type: '-2',
}, {
icon: './image/order-4.png',
name: 'SPA',
quantity: 0,
type: 2,
type: '2',
}, {
icon: './image/order-5.png',
name: '文创',
quantity: 0,
type: 4,
type: '4',
}
],
isCouponPermissions: false,
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
userInfo: {
'openId': '',
'name': '',
'phone': '',
'avatar': '',
'address': '',
'birthday': '',
'sex': '',
'userType': 0
},
orderList: [],
isOrderMore: false,
mobile: '',
nickName: '',
......@@ -81,7 +84,7 @@ Page({
isYearCard: true,
isMonthCard: false,
authInfo: null,
goodTypeCountData: {},
enrollSubscribeData: {},
isLoadingOrder: true,
},
......@@ -95,6 +98,7 @@ Page({
this.setData({ appStatus: App.globalData.appStatus })
this.setUserInfo()
this.queryCouponPermissions()
this.queryOrderCategory()
},
/**
......@@ -131,18 +135,119 @@ Page({
statusText: funcStatusText,
userInfo: funcUserInfo
})
App.login({
timeout: 0,
success: (result) => {
this.getMyActivityList()
this.getCardList()
this.getWillUseOrders()
this.queryOrder()
this.getIntegral()
this.getCountByGoodType()
this.getCountEnrollSubscribe()
}
},
/**
* 查询用户核销权限
* @function
* @param
* @returns
*/
queryCouponPermissions: function () {
App.request({
url: 'v1/login/getPermissions',
params: {
'permission': ''
}
}).then((response) => {
let funcData = response.data
this.setData({
isCouponPermissions: funcData.permissions.length > 0 ? true : false,
authInfo: { officeName: funcData.officeName, roleName: funcData.roleNames }
})
}).catch((response) => {})
},
/**
* 查询我的订单分类统计数量
* -2 - 电影,2 - SPA,3 - 门票,4 - 文创,5 - 餐饮
* @function
* @param
* @returns
*/
queryOrderCategory: function () {
App.request({
url: 'v1/order/getCountByGoodType',
params: {
goodType: '',
status: 2, // 2 - 待使用
pageNo: 1,
pageSize: -1
}
}).then((response) => {
let funcData = response.data
let funcOrderCategory = this.data.orderCategory
for (let i = 0, l = funcOrderCategory.length; i < l; i++) {
funcOrderCategory[i].quantity = funcData[funcOrderCategory[i].type]
if (funcOrderCategory[i].quantity > 99) funcOrderCategory[i].quantity = '...'
}
this.setData({
orderCategory: funcOrderCategory
})
}).catch((response) => {})
},
/**
* 查询我的订单
* @function
* @param
* @returns
*/
queryOrder: function () {
this.setData({
isLoadingOrder: true
})
App.request({
url: 'v1/order/getOrderList',
params: {
goodType: '', //数据字典(good_type) 商品分类(全部为"")
status: 2, //状态(-1已取消0未付款1未发货2待使用3已使用4已过期)
pageNo: 1,
pageSize: -1
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let fcunItem = {
'orderId': funcData[i].orderId,
'orderStatus': funcData[i].status,
'orderDetail': [],
'shopName': funcData[i].officeName,
'shopLogo': 'shop/logo-1.png',
'payAmount': funcData[i].totalMoney,
'timeExpire': funcData[i].expireTime,
'commodityType': '-2'
}
let funcOrderDetail = funcData[i].smOrderDetails
for (let ii = 0, ll = funcOrderDetail.length; ii < ll; ii++) {
let funcDetailItem = {
'cover': funcOrderDetail[ii].imgUrl,
'priceUnit': funcOrderDetail[ii].unitPrice,
'quantity': funcOrderDetail[ii].number,
'name': funcOrderDetail[ii].name,
'priceTotal': funcOrderDetail[ii].totalPrices
}
fcunItem.orderDetail.push(funcDetailItem)
}
funcList.push(fcunItem)
}
this.setData({
orderList: funcList
})
console.log(funcList)
}).catch((response) => {})
},
// 去活动预约列表
......@@ -193,29 +298,6 @@ Page({
})
},
/**
* 查询用户核销权限
* @function
* @param
* @returns
*/
queryCouponPermissions: function () {
App.request({
url: 'v1/login/getPermissions',
params: {
'permission': ''
}
}).then((response) => {
let funcData = response.data
this.setData({
isCouponPermissions: funcData.permissions.length > 0 ? true : false,
authInfo: { officeName: funcData.officeName, roleName: funcData.roleNames }
})
}).catch((response) => {
console.log('resolve', response)
})
},
// 获取积分
getIntegral() {
let that = this
......@@ -233,53 +315,6 @@ Page({
})
},
//获取待使用订单
getWillUseOrders() {
let that = this
this.setData({
isLoadingOrder: true
})
App.wxRequest({
url: '/api/v1/order/getOrderList',
data: {
goodType: "", //数据字典(good_type) 商品分类(全部为"")
status: 2, //状态(-1已取消0未付款1未发货2待使用3已使用4已过期)
pageNo: 1,
pageSize: -1
},
success: function (res) {
// console.log('that.shopConfig', that.data.shopConfig);
let list = res.data.map(item => {
let shopFilter = that.data.shopConfig.filter(k => {
return k.name.toLowerCase() == item.officeName.toLowerCase() || item.officeName.toLowerCase().indexOf(k.name.toLowerCase()) != -1
})
item.logo = shopFilter.length > 0 ? shopFilter[0].logo : ''
if (item.smOrderDetails.length > 3) {
item.smOrderDetailsSlice3 = item.smOrderDetails.slice(0, 3)
}
item.expireTimeEnd = item.expireTime.length>30?item.expireTime.substr(19):item.expireTime
item.expireTimeEnd = item.expireTimeEnd.replace(/-/g, '.')
return item
})
let listBackUp = JSON.parse(JSON.stringify(list)) //备份数据
let orderList = `myOrder.artOrder.orderList`
// 初始化取一个
if (list.length > 0) {
list.length = 1
}
that.setData({
[orderList]: list,
orderListBackup: listBackUp,
isLoadingOrder: false
})
}
})
},
//获取卡数据
getCardList() {
let that = this
......@@ -329,24 +364,6 @@ Page({
}
})
},
//获取分类统计
getCountByGoodType() {
let that = this
App.wxRequest({
url: '/api/v1/order/getCountByGoodType',
data: {
status: "", //0已过期1待使用2已使用(""全部)
pageNo: 1,
pageSize: -1
},
success: function (res) {
let data = res.data ? res.data : {}
that.setData({
goodTypeCountData: data
})
}
})
},
//获取活动预约统计
getCountEnrollSubscribe() {
let that = this
......@@ -540,7 +557,6 @@ Page({
}
},
handleToCard: function () {
console.log('onOrder')
wx.navigateTo({
url: '/pages/mine/card/card'
})
......
......@@ -106,11 +106,11 @@
<!-- 分类 tab -->
<view class="card-category row cb ac">
<block wx:for="{{orderCategory}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="card-item col cc ac" data-type="{{item.type}}" bindtap="goOrderByclass">
<view class="card-item-quantity row cc ac" hidden="{{item.quantity === 0 ? false : true}}">
<text>{{item.quantity < 99 ? item.quantity : '···'}}</text>
<view class="card-category-item column cc ac" data-type="{{item.type}}" bindtap="goOrderByclass">
<view class="card-item-quantity row cc ac" wx:if="{{item.quantity === 0 ? false : true}}">
<text>{{item.quantity}}</text>
</view>
<view class="card-item-icon row cc ac">
<view class="card-category-item-icon row cc ac">
<image src="{{item.icon}}"></image>
</view>
<text>{{item.name}}</text>
......@@ -118,76 +118,31 @@
</block>
</view>
<!-- 订单展示 -->
<!-- 订单卡片展示 -->
<view class="card-list">
</view>
<view class="more-wrapper" wx:if="{{myOrder}}}">
<!-- 订单卡片 -->
<!-- 年卡 -->
<view class="pass-wrapper" wx:if="{{myOrder.passOrder&&myOrder.passOrder.length>0}}" bindtap="handleToCard">
<image wx:if="{{ myOrder.passOrder[0].cardType==1}}" class="card-bg year-bg" src="{{resourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{myOrder.passOrder[0].cardType==2}}" class="card-bg month-bg" src="{{resourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:else class="card-bg month-bg" src="{{resourcesBase +'pay/order-input/card-3.png'}}">
</image>
<view class="pass-bg-one {{myOrder.passOrder[0].cardType==1 ? '' : 'bg-one-month'}}" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-bg-two {{myOrder.passOrder[0].cardType==1 ? '' : 'bg-two-month'}}" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-logo-wrapper row align-c">
<view class="logo-box">
<image mode="aspectFit" src="{{resourcesBase+ myOrder.passOrder[0].logo}}"></image>
</view>
<text>{{myOrder.passOrder[0].officeName}}</text>
</view>
<view class="pass-title">
<text>{{myOrder.passOrder[0].name}}</text>
</view>
<view class="pass-time">
<text>有效期至{{myOrder.passOrder[0].expireTime}}</text>
<block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 电影样式 -->
<view class="card-list-item">
<view class="row ac">
<image src="{{resourcesBase + item.shopLogo}}"></image>
<text>{{item.shopName}}</text>
</view>
<view class="pass-name">
<text>{{myOrder.passOrder[0].privateName}}</text>
<view class="row ac">
<image src="{{item.orderDetai[0].cover}}"></image>
<text>{{item.orderDetai[0].name}}</text>
</view>
<view class="pass-idNum">
<text>{{myOrder.passOrder[0].privateIdNum}}</text>
<view class="row cb ac">
<text>有效期至</text>
<text>共1张门票</text>
</view>
</view>
<!-- 商品 -->
<block wx:if="myOrder.artOrder.orderList.length > 0">
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="{{index}}" wx:key="index" data-item="{{item}}" bindtap="onOrderDetail">
<view class="goods-logo-wrapper row align-c">
<view class="logo-box">
<image mode="aspectFit" src="{{resourcesBase+ item.logo}}"></image>
</view>
<text>{{item.officeName}}</text>
</view>
<view class="goods-content row align-c">
<block wx:if="{{item.smOrderDetails.length>3}}">
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetailsSlice3}}" wx:for-item="k" wx:key="{{index}}" wx:key="index">
</image>
</block>
<block wx:else>
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="{{index}}" wx:key="index">
</image>
</block>
<text wx:if="{{item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].name}}</text>
</view>
<view class="goods-footer row align-c con-b">
<text>{{item.expireTimeEnd === '' ? '' : '有效期' + item.expireTimeEnd}}</text>
<text>共{{item.smOrderDetails.length}}件</text>
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onMoreOrder" wx:if="{{!isLoadingOrder&&orderListBackup.length>1}}">
<text wx:if="{{!isMoreOrder}}">展开更多</text>
<text wx:else>收起</text>
<image wx:if="{{!isMoreOrder}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</block>
<!-- 展开更多 -->
<view class="order-more row cc ac">
<text>{{isOrderMore ? '收起' : '展开更多'}}</text>
<image class="arrow-more" src="{{isOrderMore ? imageBase + 'icon/arrow-t-2.png' : imageBase + 'icon/arrow-b-2.png'}}"></image>
</view>
</view>
......
......@@ -220,12 +220,13 @@ page {
color: #15191F;
}
/* 我的订单分类 */
.card-category {
margin-top: 56rpx;
padding: 0 6rpx;
}
.card-item {
.card-category-item {
position: relative;
}
......@@ -233,9 +234,11 @@ page {
position: absolute;
top: -10rpx;
right: 0;
width: 32rpx;
min-width: 32rpx;
max-width: 48rpx;
padding: 0 14rpx;
height: 32rpx;
border-radius: 50%;
border-radius: 16rpx;
background: #E66060;
font-size: 22rpx;
......@@ -243,7 +246,7 @@ page {
color: #FFFFFF;
}
.card-item > text {
.card-category-item > text {
height: 32rpx;
margin-top: 16rpx;
font-size: 22rpx;
......@@ -252,18 +255,42 @@ page {
color: #161A1F;
}
.card-item-icon {
.card-category-item-icon {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #F5F6F8;
}
.card-item-icon > image {
.card-category-item-icon > image {
width: 48rpx;
height: 48rpx;
}
/* 卡片列表样式 */
.card-list-item {
width: 606rpx;
height: 328rpx;
margin-top: 24rpx;
border-radius: 4px;
background: #F5F6F8;
border: 1px red solid;
}
/* 更多,收起 */
.order-more {
width: 606rpx;
margin-top: 32rpx;
}
.order-more > text {
height: 36rpx;
margin-right: 8rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #15191F;
}
.menu {
......
let App = getApp()
Page({
data: {
isDoing: false,
......@@ -226,6 +225,7 @@ Page({
* @returns
*/
queryOrderDetail: function () {
console.log('queryOrderDetail')
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
data: {
......@@ -233,6 +233,8 @@ Page({
},
success: (response) => {
let funcResponse = response.data
console.log('funcResponse.paymentTime', funcResponse.paymentTime)
let funcOrderInfo = {
'id': this.data.orderInfo.id,
'score': funcResponse.integral, // 积分
......@@ -253,12 +255,15 @@ Page({
'particulars': funcResponse.particulars
}
// 电影
if (funcOrderInfo.expireTime !== '' && Number(funcOrderInfo.commodityType) === -2) {
let funcDate = funcOrderInfo.expireTime.match(/[0-9]+-[0-9]+-[0-9]+/)[0]
let funcDate = funcOrderInfo.expireTime.match(/[0-9]+\.[0-9]+\.[0-9]+/)[0]
let funcTime = funcOrderInfo.expireTime.match(/[0-9]+:[0-9]+/g)
funcOrderInfo.expireTime = App.modular.miment(funcDate).format('MM月DD日 ') + funcTime[0] + ' - ' + funcTime[1]
// miment npm 包在 ios 下必须传 yyyy-mm-dd hh:mm:ss 格式,否则无法转换。
funcDate = funcDate.replace(/\./g, '-')
funcOrderInfo.expireTime = App.modular.miment(funcDate).format('MM月DD日') + ' ' + funcTime[0] + ' - ' + funcTime[1]
}
// 设置印章
......
<m-toast></m-toast>
<m-dialog></m-dialog>
<m-nav titleText="订单详情" bind:navBack="navBack"></m-nav>
<m-nav titleText="订单详情" styleIndex="{{1}}" bind:navBack="navBack"></m-nav>
<view class="container">
<!-- 订单状态 -->
<view class="state row con-c">
......
......@@ -298,7 +298,7 @@
<!-- winActivityResult -->
<view class="entry-complete row con-c align-c" wx:if="{{winActivityResult}}">
<view class="entry-complete-tip">
<image src="{{resourcesBase + 'commodity/room-appointment/activity-tip.png'}}" bind:tap="onEntryComplete"></image>
<image src="{{resourcesBase + 'play/complete-tip.png'}}" bind:tap="onEntryComplete"></image>
</view>
</view>
......
......@@ -3,8 +3,9 @@ Page({
data: {
imageBase: App.globalData.appImageBase,
tabItem: [{ text: '全部', value: 0}],
tabTop: wx.getStorageSync('navHeight'),
tabItem: [],
tabTop: 0,
tabClass: '',
pageIndex: 1,
......@@ -25,10 +26,34 @@ Page({
})
}
this.queryTab()
this.queryActivityLately()
this.queryActivityExpire()
},
queryTab: function () {
App.request({
url: 'v1/common/getSmTags',
params: {
'types': 2,
}
}).then((response) => {
console.log(response)
let funcData = response.data
let funcList = [{ text: '全部', value: 0 }]
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'text': funcData[i].name,
'value': funcData[i].tagId,
}
funcList.push(funcItem)
}
this.setData({
tabItem: funcList
})
}).catch((response) => { })
},
queryActivityLately: function () {
App.request({
url: 'v1/activity/getList',
......@@ -36,6 +61,7 @@ Page({
'listType': 1,
'pageSize': 99,
'pageNo': 1,
'tagId': this.data.tabClass,
}
}).then((response) => {
let funcData = response.data.list
......@@ -74,6 +100,7 @@ Page({
'listType': 0,
'pageSize': 10,
'pageNo': this.data.pageIndex,
'tagId': this.data.tabClass,
}
}).then((response) => {
let funcData = response.data.list
......@@ -180,6 +207,25 @@ Page({
}
},
eventTabChange: function (funcEvent) {
let funcItem = funcEvent.detail
this.setData({
tabClass: funcItem.value,
pageIndex: 1,
other: [],
selectedOther: [],
})
this.queryActivityLately()
this.queryActivityExpire()
console.log(funcEvent)
},
eventNavChangeHeight: function (event) {
this.setData({
tabTop: event.detail.navHeight,
})
},
//开启下拉刷新
onReachBottom: function () {
console.log('onPullDownRefresh')
......
{
"usingComponents": {},
"enablePullDownRefresh": true
"usingComponents": {}
}
\ No newline at end of file
<m-nav titleText="主题活动" scrollHeight="{{navScroll}}" styleIndex="{{1}}"></m-nav>
<m-tab item="{{tabItem}}" isFixed="{{true}}" fixedTop="{{tabTop}}"></m-tab>
<m-nav titleText="主题活动" scrollHeight="{{navScroll}}" styleIndex="{{1}}" bindnavChangeHeight="eventNavChangeHeight"></m-nav>
<m-tab item="{{tabItem}}" isFixed="{{true}}" fixedTop="{{tabTop}}" bindtabChange="eventTabChange"></m-tab>
<view class="container">
<!-- 近期活动 -->
......
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