Commit 976728d8 by 严立

LL - toast,dialog组件更新完成

parent d7a67b44
Showing with 213 additions and 1720 deletions
......@@ -14,7 +14,6 @@
"pages/play/service-detail/service-detail",
"pages/play/activity/activity",
"pages/play/activity-detail/activity-detail",
"pages/play/activity-entry/activity-entry",
"pages/play/movie/movie",
"pages/play/movie-detail/movie-detail",
"pages/play/point-detail/point-detail",
......@@ -25,7 +24,6 @@
"pages/commodity/project/project",
"pages/commodity/project-detail/project-detail",
"pages/commodity/menu-food/menu-food",
"pages/commodity/room/room",
"pages/commodity/room-appointment/room-appointment",
"pages/campsite/home/home",
......@@ -39,7 +37,6 @@
"pages/mine/appointment/appointment",
"pages/mine/appointment-ticket/appointment-ticket",
"pages/mine/appointment-detail/appointment-detail",
"pages/mine/authentication-state/authentication-state",
"pages/mine/authentication-input/authentication-input",
"pages/mine/question/question",
"pages/mine/question-more/question-more",
......@@ -59,35 +56,19 @@
"m-toast": "./component/m-toast/m-toast",
"m-dialog": "./component/m-dialog/m-dialog",
"navigation": "./component/navigation/navigation",
"swiper-point": "./component/swiper-point/swiper-point",
"strategy-item": "./component/strategy-item/strategy-item",
"l-avatar": "./miniprogram_npm/lin-ui/avatar/index",
"l-button": "./miniprogram_npm/lin-ui/button/index",
"l-capsule-bar": "./miniprogram_npm/lin-ui/capsule-bar/index",
"l-card": "./miniprogram_npm/lin-ui/card/index",
"l-checkbox": "./miniprogram_npm/lin-ui/checkbox/index",
"l-checkbox-group": "./miniprogram_npm/lin-ui/checkbox-group/index",
"l-dialog": "./miniprogram_npm/lin-ui/dialog/index",
"l-icon": "./miniprogram_npm/lin-ui/icon/index",
"l-list": "./miniprogram_npm/lin-ui/list/index",
"l-price": "./miniprogram_npm/lin-ui/price/index",
"l-tabs": "./miniprogram_npm/lin-ui/tabs/index",
"l-tabpanel": "./miniprogram_npm/lin-ui/tabpanel/index",
"l-toast": "./miniprogram_npm/lin-ui/toast/index",
"l-water-flow": "./miniprogram_npm/lin-ui/water-flow/index",
"l-input": "./miniprogram_npm/lin-ui/input/index",
"l-mask": "./miniprogram_npm/lin-ui/mask/index",
"l-arc-popup": "./miniprogram_npm/lin-ui/arc-popup/index",
"l-collapse": "./miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item": "./miniprogram_npm/lin-ui/collapse-item/index",
"l-textarea": "./miniprogram_npm/lin-ui/textarea/index",
"l-notice-bar": "./miniprogram_npm/lin-ui/notice-bar/index",
"l-popup": "./miniprogram_npm/lin-ui/popup/index",
"l-image-picker": "./miniprogram_npm/lin-ui/image-picker/index",
"l-rate": "./miniprogram_npm/lin-ui/rate/index"
"l-image-picker": "./miniprogram_npm/lin-ui/image-picker/index"
},
"window": {
"navigationStyle": "custom",
......
......@@ -5,4 +5,9 @@
/* s3组件样式 */
@import './component/theme/reset.wxss';
@import './component/theme/layout.wxss';
@import './component/theme/theme.wxss';
\ No newline at end of file
@import './component/theme/theme.wxss';
.arrow-more {
width: 32rpx;
height: 32rpx;
}
\ No newline at end of file
// components/Blank/Blank.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="blank"></view>
\ No newline at end of file
.blank {
height: 68rpx;
background-color: #fff;
}
\ No newline at end of file
let App = getApp()
Component({
// 组件外部属性
properties: {
background: {
type: String,
value: 'rgba(255, 255, 255, 0)'
},
color: {
type: String,
value: '#000000'
},
titleText: {
type: String,
value: ''
},
titleImg: {
type: String,
value: ''
},
backIcon: {
type: String,
value: ''
},
homeIcon: {
type: String,
value: ''
},
// 标题栏滚动指定位置动态变换颜色属性
// 优先级高于 background 属性
// {
// normal: {
// text: 'rgba(255, 255, 255, 1)',
// background: 'rgba(255, 255, 255, 0)'
// },
// change: {
// text: 'rgba(0, 0, 0, 1)',
// background: 'rgba(255, 255, 255, 1)'
// },
// scroll: '4%',
// }
scrollStyle: {
type: Object,
value: {},
},
// 当前页面滚动高度
// 配合动态变换颜色属性使用
scrollHeight: {
type: Number,
value: 0
},
},
// 组件内部属性
data: {
statusHeight: 0,
titleHeight: 0,
statusCss: '',
titleCss: '',
textCss: '',
iconCss: '',
isScrollChange: false,
},
// 生命周期
lifetimes: {
attached: function () {
this.setNavigationHeight()
this.setNavigationStyle()
},
},
// 属性监听
observers: {
'scrollStyle': function (funcValue) {
if (JSON.stringify(this.data.scrollStyle) === '{}') return
this.setNavigationStyle()
},
'background': function () {
this.setNavigationStyle()
},
'scrollHeight': function () {
this.eventScroll(this.data.scrollHeight)
},
},
// 自定方法
methods: {
/**
* 设置标题栏高度
* @function
* @param
* @returns
*/
setNavigationHeight: function () {
let funcIsIOS = wx.getSystemInfoSync().system.indexOf('iOS') > -1
let funcStatusHeight = wx.getSystemInfoSync().statusBarHeight
let funcTitleHeight = 0
if (funcIsIOS) {
funcTitleHeight = 44
} else {
funcTitleHeight = 48
}
this.setData({
statusHeight: funcStatusHeight,
titleHeight: funcTitleHeight,
})
// 缓存标题栏高度信息
wx.setStorageSync('navigationStatusHeight', this.data.statusHeight)
wx.setStorageSync('navigationCapsuleHeight', this.data.titleHeight)
},
/**
* 设置标题栏样式
* @function
* @param
* @returns
*/
setNavigationStyle: function () {
let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcStatusStyle = {
'height': this.data.statusHeight + 'px',
'background': this.data.background,
'color': this.data.color,
}
let funcTitleStyle = {
'height': this.data.titleHeight + 'px',
'background': this.data.background,
}
if (Object.keys(this.data.scrollStyle).length) {
funcStatusStyle['background'] = this.data.isScrollChange ? this.data.scrollStyle.change.background : this.data.scrollStyle.normal.background
funcTitleStyle['background'] = this.data.isScrollChange ? this.data.scrollStyle.change.background : this.data.scrollStyle.normal.background
this.setData({
color: this.data.isScrollChange ? this.data.scrollStyle.change.color : this.data.scrollStyle.normal.color,
backIcon: this.data.isScrollChange ? this.data.scrollStyle.change.backIcon : this.data.scrollStyle.normal.backIcon
})
}
let funcTextStyle = {
'color': this.data.color,
}
let funcIconStyle = {
'width': 52 * funcUnitProportion + 'px',
'height': 52 * funcUnitProportion + 'px',
'margin-right': 8 * funcUnitProportion + 'px',
}
this.setData({
statusCss: App.cssObjectToCssString(funcStatusStyle),
titleCss: App.cssObjectToCssString(funcTitleStyle),
textCss: App.cssObjectToCssString(funcTextStyle),
iconCss: App.cssObjectToCssString(funcIconStyle),
})
},
/**
* 返回按钮事件
* @function
* @param
* @returns
*/
onBack: function () {
wx.navigateBack({
delta: 1
})
this.triggerEvent('navBack', { back: 1 })
},
/**
* 主页按钮事件
* @function
* @param
* @returns
*/
onHome: function () {
this.triggerEvent('navHome', {});
},
/**
* 滚动事件
* @function
* @param
* @returns
*/
eventScroll: function (funcScrollHeight) {
// 如果没有定义动态变换参数则无视滚动事件
if (Object.keys(this.data.scrollStyle).length === 0) return
let funcChangeHeight = 0
if (/^[0-9.]+%$/.test(this.data.scrollStyle.scroll)) {
console.log('[component navigation] scrollStyle type error')
return
}
if (/^[0-9.]+(px)?$/.test(this.data.scrollStyle.scroll)) {
funcChangeHeight = Number(this.data.scrollStyle.scroll.replace('px', ''))
}
if (/^[0-9.]+rpx$/.test(this.data.scrollStyle.scroll)) {
funcChangeHeight = Number(this.data.scrollStyle.scroll.replace('rpx', '')) * wx.getSystemInfoSync().windowWidth / 750
}
if (funcScrollHeight <= funcChangeHeight) {
this.setData({
color: this.data.scrollStyle.normal.color,
background: this.data.scrollStyle.normal.background,
isScrollChange: false
})
}
if (funcChangeHeight < funcScrollHeight) {
this.setData({
color: this.data.scrollStyle.change.color,
background: this.data.scrollStyle.change.background,
isScrollChange: true
})
}
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="navigation">
<!-- 状态栏 -->
<view class="status" style="{{statusCss}}"></view>
<!-- 标题栏 -->
<view class="navbar" style="{{titleCss}}">
<view class="navbar-operation">
<image class="navbar-operation-back" style="{{iconCss}}" src="{{backIcon}}" bindtap='onBack'></image>
<image class="navbar-operation-home" style="{{iconCss}}" src="{{homeIcon}}" bindtap='onHome'></image>
</view>
<view class="title-text" style="{{titleCss}}" wx:if="{{titleText && !titleImg}}">
<text style="{{textCss}}">{{titleText}}</text>
</view>
<view class="navbar-operation">
</view>
</view>
</view>
\ No newline at end of file
.navbar {
z-index: 9000;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.navbar-operation {
display: flex;
flex-direction: row;
align-items: center;
width: 200rpx;
padding-left: 14rpx;
}
.navbar-operation-back,
.navbar-operation-home {
display: block;
}
.title-text {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.title-text text {
font-size: 17px;
font-weight: 500;
}
\ No newline at end of file
Component({
/**
* 组件的属性列表
*/
properties: {
data: Object
},
/**
* 组件的初始数据
*/
data: {
},
lifetimes: {
attached: function () {
// console.log(this.data.data)
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!-- demo.wxml -->
<view class="component-strategy-item">
<image wx:if="{{data.index === 1}}" class="short" src="{{data.image}}" mode="aspectFill"></image>
<image wx:else src="{{data.image}}" mode="widthFix"></image>
<view class="component-strategy-item-tags row align-c">
<block wx:for="{{data.tags}}" wx:key="index">
<text>{{'# ' + item}}</text>
</block>
</view>
<text class="component-strategy-item-title">{{data.title}}</text>
<text class="component-strategy-item-content">{{data.date}}</text>
</view>
\ No newline at end of file
.component-strategy-item {
display: flex;
flex-direction: column;
margin-top: 16rpx;
border-radius: 4rpx;
overflow: hidden;
background: #ffffff;
}
.component-strategy-item image {
width: 328rpx;
}
.component-strategy-item .short {
width: 328rpx;
height: 354rpx;
}
.component-strategy-item-tags {
margin: 24rpx 24rpx 0;
height: 44rpx;
flex-wrap: wrap;
overflow: hidden;
}
.component-strategy-item-tags text{
margin-right: 16rpx;
padding: 4rpx 12rpx;
color: #fff;
font-size: 18rpx;
line-height: 32rpx;
background-color: #15191F;
border-radius: 4rpx;
}
.component-strategy-item-title {
display: -webkit-box;
margin: 24rpx 24rpx 0;
font-size: 26rpx;
font-weight: bolder;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.component-strategy-item-content {
margin: 12rpx 24rpx 24rpx 24rpx;
font-size: 22rpx;
color: #959DA9;
}
\ No newline at end of file
/* 层级说明
0 - 背景
- - 背景
0 - 视图
1 - 视图
2 - 视图
3 - 视图
......
......@@ -21,21 +21,6 @@ Page({
App.globalData.appResourcesBase + 'campsite/campsite-6.png',
],
detailIndex: 0,
// 导航栏相关属性
navigationStyle: {
normal: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 0)'
},
change: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(246, 218, 218, 1)'
},
scroll: '100rpx',
},
navigationScroll: 0,
},
onLoad: function (options) {
......@@ -141,17 +126,11 @@ Page({
winSide: false
})
}
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
this.setData({
navigationAnimationShow: funcOpacity
})
}
if (funcEvent.scrollTop < this.data.sideHeight && !this.data.winSide) {
this.setData({
winSide: true,
navigationAnimationShow: 0
})
}
},
......
......@@ -4,16 +4,10 @@
<m-nav titleText="营地" scrollHeight="{{navScroll}}" styleIndex="{{9}}" isOccupy="{{false}}"></m-nav>
<view class="container">
<!-- <view class="appointment">
<l-button l-class="appointment-button" bind:lintap="onServic">电话预约</l-button>
</view> -->
<view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
<!-- <button class="appointment-side-phone" bind:tap="onServic">
<image src="{{imageBase + 'phone.png'}}"></image>
</button> -->
</view>
<!-- 头部背景图 -->
......
......@@ -129,17 +129,11 @@ Page({
winSide: false
})
}
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
this.setData({
navigationAnimationShow: funcOpacity
})
}
if (funcEvent.scrollTop < this.data.sideHeight && !this.data.winSide) {
this.setData({
winSide: true,
navigationAnimationShow: 0
})
}
},
......
<m-toast></m-toast>
<m-nav titleText="营地" scrollHeight="{{navScroll}}" styleIndex="{{9}}" isOccupy="{{false}}"></m-nav>
<view class="container">
<!-- <view class="appointment">
<l-button l-class="appointment-button" bind:lintap="onServic">电话预约</l-button>
</view> -->
<view class="appointment-side col con-b align-c" hidden="{{winSide}}">
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
<!-- <button class="appointment-side-phone" bind:tap="onServic">
<image src="{{imageBase + 'phone.png'}}"></image>
</button> -->
</view>
<!-- 头部背景图 -->
......
......@@ -35,7 +35,7 @@ Page({
this.setData({ appStatus: App.globalData.appStatus })
this.setData({
userInfo: wx.getStorageSync('userInfo'),
cssGreeting: wx.getStorageSync('navigationStatusHeight') + wx.getStorageSync('navigationCapsuleHeight') + 20 * wx.getStorageSync('unitProportion'),
cssGreeting: wx.getStorageSync('navStatusHeight') + wx.getStorageSync('navTitleHeight') + 20 * wx.getStorageSync('unitProportion'),
})
this.setGreetingMessage()
this.queryShopCover()
......
......@@ -314,7 +314,7 @@ Page({
let funcSideBarHeight = []
for (let i = 0, l = funcElement.length; i < l; i++) {
// 标题高度需要减去导航栏高度,避免标题被遮挡
funcSideBarHeight.push(funcElement[i].top - wx.getStorageSync('navigationStatusHeight') - wx.getStorageSync('navigationCapsuleHeight'))
funcSideBarHeight.push(funcElement[i].top - wx.getStorageSync('navStatusHeight') - wx.getStorageSync('navTitleHeight'))
}
this.setData({
......
......@@ -4,7 +4,6 @@
<view class="appointment-complete row con-c align-c" wx:if="{{appointmentComplete}}">
<view class="appointment-complete-tip">
<image src="{{resourcesBase + 'commodity/room-appointment/house-tip.png'}}" bindtap="onAppointmentComplete"></image>
<!-- <l-button l-class="button" plain="{{true}}" bind:lintap="onAppointmentComplete">我知道了</l-button> -->
</view>
</view>
......
.navigation {
z-index: 1900;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
}
/* 预约完成 */
.appointment-complete {
z-index: 1900;
......
Page({
data: {
},
onLoad: function (options) {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
/* pages/home/home/home.wxss */
\ No newline at end of file
......@@ -18,8 +18,6 @@ Page({
isIphoneX: '', //判断是否为iphonex
sideBarTopPadding: 0,
allChecked: false,
isFoodCart: true,
isEnough: false,
......@@ -79,7 +77,6 @@ Page({
this.setShopInfo()
this.setData({
shoppingCart: wx.getStorageSync('shoppingCartBuffer'),
sideBarTopPadding: wx.getStorageSync('navigationStatusHeight') + wx.getStorageSync('navigationCapsuleHeight'),
isIphoneX: wx.getSystemInfoSync().model.indexOf("iPhone X")
})
......@@ -195,25 +192,23 @@ Page({
* @returns
*/
onClearn: function () {
wx.lin.showDialog({
App.ui.showDialog({
type: 'confirm',
title: '温馨提示',
content: '确定要清空购物车?',
confirmColor: '#5DB5DD',
cancelColor: '#656E7B',
titleColor: '#15191F',
success: (response) => {
if (response.confirm) {
wx.setStorageSync('shoppingCartBuffer', [])
this.setData({
shoppingCart: []
})
this.selectionTotal()
} else if (response.cancel) {
console.log('用户点击取消')
}
}
cancel: '取消',
confirm: '确定',
success: () => {
wx.setStorageSync('shoppingCartBuffer', [])
this.setData({
shoppingCart: []
})
this.selectionTotal()
},
fail: () => {
console.log('fail')
},
})
},
......
<m-toast></m-toast>
<m-dialog></m-dialog>
<m-nav titleText="购物车"></m-nav>
<view class="container" wx:if="{{shoppingCart.length > 0}}">
......@@ -141,7 +142,4 @@
<view class="empty-btn" bindtap="onToBuy">
<text>去逛逛</text>
</view>
</view>
<!-- 清空弹窗 -->
<l-dialog l-content-class="l-content" l-cancel-class="l-cancel" title-color="#15191F" cancel-color="#656E7B" confirm-color="#5DB5DD"></l-dialog>
\ No newline at end of file
</view>
\ No newline at end of file
{
"navigationBarTextStyle": "black",
"usingComponents": {
"parser": "../../component/parser.min/parser"
}
......
{
"navigationBarTextStyle": "black",
"usingComponents": {
"parser": "../../component/parser.min/parser"
}
......
......@@ -2,9 +2,6 @@
<m-dialog></m-dialog>
<m-nav titleText="智慧导览" isOccupy="{{false}}"></m-nav>
<!-- 畅玩 - 活动列表 -->
<!-- <navigation class="navigation" titleText="智慧导览" backIcon="/image/back.png"></navigation> -->
<scroll-view class="guide" scroll-x scroll-left="{{selectionPoint}}">
<image id="guide-map" src="{{resourcesBase + 'guide/guide.png'}}" style="{{mapCss}}"></image>
<view class="point-map" style="{{mapCss}}" catch:tap="onCancel">
......
......@@ -6,21 +6,6 @@ Page({
resourcesBase: App.globalData.appResourcesBase,
isLogin: false, // 是否登录
// 导航栏相关属性
navigationStyle: {
normal: {
color: '#FFFFFF',
background: 'rgba(255, 255, 255, 0)'
},
change: {
color: '#000000',
background: 'rgba(255, 255, 255, 1)'
},
scroll: '600rpx',
},
navScroll: 0,
// banner 列表数据
banner: [],
bannerIndex: 0,
......
......@@ -24,22 +24,25 @@
<image src="./image/login.png"></image>
</view>
<view class="row con-b align-c">
<view class="notice-bar row con-e" bind:lintap="noticClick">
<view class="notice-bar row con-e" bind:tap="noticClick">
<text>消费积分 业主特权</text>
</view>
<image class="banner-image" src="{{imageBase + 'more-g.png'}}" bindtap="onNotice"></image>
</view>
</view>
<view class="banner-notice row align-c">
<view class="row align-c" bindtap="onNotice">
<image src="./image/inform.png"></image>
<image src="./image/title-news.png"></image>
<view class="notice row ac">
<view class="row ac" bindtap="onNotice">
<image class="notice-icon" src="./image/inform.png"></image>
<image class="notice-title" src="./image/title-news.png"></image>
</view>
<view class="row con-b align-c">
<l-notice-bar show="{{true}}" type="swip" swip-arr="{{noticeTitles}}" speed="2000" l-class="notice-bar" bind:lintap="noticClick"></l-notice-bar>
<view class="border-right"></view>
<image class="banner-image" src="{{imageBase + 'more-g.png'}}" bindtap="onNotice"></image>
<view class="row cb ac">
<swiper vertical="{{true}}">
<swiper-item class="row ac" wx:for="{{noticeTitles}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<text data-item="{{item}}" bindtap="onNoticeDetail">{{item}}</text>
</swiper-item>
</swiper>
<image class="arrow-more" src="{{imageBase + 'more-g.png'}}" bindtap="onNotice"></image>
</view>
</view>
</view>
......
......@@ -51,47 +51,47 @@
height: 150rpx;
}
.banner-notice {
/* 最新动态 */
.notice {
z-index: 3;
position: relative;
top: 620rpx;
left: 40rpx;
width: 670rpx;
height: 108rpx;
padding: 4rpx 32rpx;
background:rgba(255, 255, 255, 1);
box-shadow: 0 16rpx 48rpx 0 rgba(0, 0, 0, .05);
border-radius: 2px;
overflow: hidden;
justify-content: space-between;
}
.login-notice {
margin-bottom: 40rpx;
padding: 0 32rpx;
box-shadow: 0px 16rpx 48rpx 0 rgba(0, 0, 0, .05);
border-radius: 4rpx;
background: #FFFFFF;
}
.banner-notice image:nth-child(1) {
.notice-icon {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
.banner-notice image:nth-child(2) {
.notice-title {
width: 122rpx;
height: 30rpx;
margin-left: 2rpx;
}
.banner-notice text:nth-child(3) {
width: 366rpx;
height: 36rpx;
margin-left: 24rpx;
font-size: 26rpx;
color: #15191F;
line-height: 36rpx;
.notice swiper {
width: 324rpx;
height: 40rpx;
margin: 0 32rpx 0 40rpx;
border-right: 1px #DBDFE5 solid;
}
.banner-notice image:nth-child(3) {
width: 40rpx;
.notice swiper text {
height: 40rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 40rpx;
color: #15191F;
}
.detail {
......
......@@ -32,21 +32,6 @@ Page({
total: 0,
frompage: '',
optionsTab: '',
// 导航栏相关属性
navigationStyle: {
normal: {
backiconType: '/image/icon/arrow-l-2.png',
color: '#FFFFFF',
background: 'rgba(255, 255, 255, 0)'
},
change: {
backiconType: '/image/icon/arrow-l-1.png',
color: '#000000',
background: 'rgba(255, 255, 255, 1)'
},
scroll: '200rpx',
},
},
onLoad: function (options) {
......
<!--pages/login/login.wxml-->
<navigation class="navigation" backIcon="/image/back-w.png" bind:navBack="navBack"></navigation>
<m-nav titleText="" scrollHeight="{{navScroll}}" styleIndex="{{2}}" isOccupy="{{false}}"></m-nav>
<view class="container">
<view style="height:{{height}}px;overflow:hidden;">
<image class="bgClass" src="http://upload.miaomiao-bao.com/97b52202008201410189925.png"></image>
......@@ -22,5 +22,4 @@
</view>
</view>
</view>
</view>
\ No newline at end of file
// pages/ownerCertification/ownerCertification.js
const app = getApp()
let App = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
type: 1, //判断页面显示的类型 1.填写表单 2.认证中 3.认证失败
nameErr: '', // 请输入姓名
......@@ -95,69 +90,10 @@ Page({
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.getAuth()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
// 获取业主认证信息
getAuth() {
let that = this
app.wxRequest({
App.wxRequest({
url: '/api/v1/userAuth/getAuth',
method: 'GET',
success: function(res) {
......@@ -168,8 +104,8 @@ Page({
type = 2;
break;
case 1:
wx.lin.showToast({
image: '/image/success.png',
App.ui.showToast({
iconType: 'success',
title: '已审核通过',
})
setTimeout(() => {
......@@ -209,13 +145,14 @@ Page({
if (phone.length != 11 || room == '' || name == '' || idCard.length != 18) {
return
}
wx.lin.showToast({
icon: 'loading',
App.ui.showToast({
iconType: 'loading',
title: '提交中',
show: true,
duration: 1000 * 60,
duration: 60000
})
app.wxRequest({
App.wxRequest({
url: '/api/v1/userAuth/doAuth',
data: {
mobile: phone,
......@@ -224,24 +161,21 @@ Page({
roomNo: room,
},
success: function(res) {
wx.lin.showToast({
image: '/image/success.png',
App.ui.showToast({
iconType: 'success',
title: '提交成功',
})
that.setData({
type: 2
})
},
fail: function(err) {
wx.lin.showToast({
image: '/image/error.png',
App.ui.showToast({
iconType: 'error',
title: err.msg,
})
}
})
},
onEdit() {
......@@ -253,5 +187,4 @@ Page({
onCompleted() {
wx.navigateBack({})
},
})
\ No newline at end of file
<l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" backIcon="/image/back-w.png"></navigation>
<m-toast></m-toast>
<m-nav titleText="" styleIndex="{{2}}" isOccupy="{{false}}"></m-nav>
<view class="container">
<view class="header">
<image class="banner" src="http://upload.miaomiao-bao.com/968f6202008192116574683.jpg"></image>
......
/* pages/ownerCertification/ownerCertification.wxss */
.banner {
width: 750rpx;
height: 594rpx;
......
// pages/mine/authentication-state/authentication-state.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/mine/authentication-state/authentication-state.wxml-->
<text>pages/mine/authentication-state/authentication-state.wxml</text>
/* pages/mine/authentication-state/authentication-state.wxss */
\ No newline at end of file
{
"navigationBarTextStyle": "black",
"usingComponents": {}
}
\ No newline at end of file
......@@ -191,10 +191,10 @@
}
.status-operation {
width: 110rpx;
min-width: 110rpx;
height: 52rpx;
padding: 0 16rpx;
border-radius: 4rpx;
/* border: 1px solid rgba(72, 53, 34, 1) !important; */
background: linear-gradient(180deg, rgba(255, 243, 227, 1) 0%, rgba(255, 227, 195, 1) 100%);
color: #282836;
font-size: 26rpx;
......
......@@ -2,7 +2,7 @@
<m-dialog></m-dialog>
<!-- 订单分类选择 -->
<view class="navigation-order row con-b align-c">
<view class="order-category row con-b align-c">
<image src="{{imageBase + 'icon/arrow-l-1.png'}}" bindtap="onNavigationBack"></image>
<view class="order-type row con-c align-c" bindtap="onOrderType">
<text>{{orderTypeTitle}}</text>
......
......@@ -10,7 +10,7 @@ page {
background: #fff;
}
.navigation-order {
.order-category {
z-index: 3;
position: fixed;
top: 0;
......@@ -20,7 +20,7 @@ page {
background: #fff;
}
.navigation-order image {
.order-category image {
width: 50rpx;
height: 50rpx;
}
......
const App = getApp()
let App = getApp()
Page({
data: {
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
couponInfo: null,
// {
// type: '套票',
// store: '儿童营地',
// id: '26719921231',
// useTime: '2020-11-06'
// },
goodsList: null,
// [
// {
// id: 0,
// cover: '',
// name: '咖喱蔬菜大虾',
// quantity: '2',
// price: '30.60'
// },
// {
// id: 1,
// cover: '',
// name: '南瓜坚果汤',
// quantity: '3',
// price: '30.60'
// },
// ],
userList: null,
orderInfo: null,
// {
// name: '林有一',
// phone: '15802035122',
// idNum: '350600366462131',
// },
remarks: null, // 备注
couponDetail: null,
},
onLoad: function (options) {
console.log(options)
// if (options.type) options.type = Number(options.type)
// let orderType = options.type
// this.setData({
// orderType
// })
// this.setView()
if (options.couponDetail) {
let data = JSON.parse(options.couponDetail)
let tmpGoodsList = [];
......@@ -86,7 +52,6 @@ Page({
// 确认核销'
submitOperation() {
let that = this
wx.lin.showDialog({
type: "confirm",
title: "",
......@@ -94,7 +59,7 @@ Page({
success: (res) => {
if (res.confirm) {
console.log('用户点击确定')
that.doVolume()
this.doVolume()
} else if (res.cancel) {
console.log('用户点击取消')
}
......@@ -103,39 +68,36 @@ Page({
},
doVolume() {
let that = this
wx.lin.showToast({
icon: 'loading',
App.ui.showToast({
iconType: 'loading',
title: '正在核销',
show: true,
mask: true,
duration: 1000 * 60,
duration: 60000
})
App.wxRequest({
url: '/api/v1/volume/doVolume',
data: {
volumeId: that.data.couponDetail.volumeId,
volumeId: this.data.couponDetail.volumeId,
},
success: function (res) {
success: (res) => {
if (res.data && res.data.code * 1 == 500) {
wx.lin.showToast({
image: '/image/error.png',
title: res.data.msg,
})
} else {
wx.lin.showToast({
image: '/image/success.png',
App.ui.showToast({
iconType: 'success',
title: '核销成功',
})
setTimeout(() => {
wx.navigateBack()
}, 2000);
}
},
fail: function (err) {
wx.lin.showToast({
image: '/image/error.png',
fail: (err) => {
App.ui.showToast({
iconType: 'error',
title: err.msg,
})
}
......
{
"usingComponents": {
"Blank": "../../../component/Blank/Blank"
}
"usingComponents": {}
}
\ No newline at end of file
<navigation class="navigation" titleText="券码核销" background="#ffffff" backIcon="/image/back.png"></navigation>
<l-dialog />
<l-toast l-image-class="toast-image"></l-toast>
<m-dialog></m-dialog>
<m-toast></m-toast>
<m-nav titleText="券码核销"></m-nav>
<view class="container">
<view class="list-wrapper">
<view class="title-wrapper">兑换券信息</view>
......@@ -61,10 +61,10 @@
</view>
</view>
</view>
<view class="footer-wrapper">
<view class="footer-btn row con-b align-e">
<view class="cancel-btn" bindtap="cancelOperation">取消核销</view>
<view class="confirm-btn" bindtap="submitOperation">确认核销</view>
</view>
<Blank></Blank>
</view>
.container {
margin-top: 200rpx;
padding-bottom: 196rpx;
}
.list-wrapper {
width: 750rpx;
}
......@@ -10,21 +10,23 @@
width: 750rpx;
height: 64rpx;
padding: 0 40rpx;
color: #959DA9;
color: #959da9;
font-size: 26rpx;
font-weight: 600;
line-height: 64rpx;
background-color: #F7F8FA;
background-color: #f7f8fa;
}
.info-wrapper {
width: 670rpx;
height: 96rpx;
margin: 0 auto;
color: #15191F;
color: #15191f;
font-size: 30rpx;
line-height: 96rpx;
border-bottom: 0.5px solid #E2E7EF;
border-bottom: 0.5px solid #e2e7ef;
}
.info-wrapper:last-child {
border-bottom: none;
}
......@@ -32,39 +34,46 @@
.goods-list {
padding: 24rpx 40rpx;
}
.goods-item {
height: 188rpx;
}
.goods-img {
width: 140rpx;
height: 140rpx;
background-color: #ccc;
}
.goods-name {
flex: 1;
height: 84rpx;
color: #15191F;
color: #15191f;
font-size: 30rpx;
font-weight: 600;
line-height: 42rpx;
margin: 0 32rpx;
}
.goods-price-num {
width: 100rpx;
height: 84rpx;
}
.goods-num {
flex: 1;
font-size: 30rpx;
font-weight: 600;
text-align: right;
}
.goods-price {
flex: 1;
text-align: right;
color: #959DA9;
color: #959da9;
font-size: 26rpx;
}
.price-symbol {
font-size: 22rpx;
}
......@@ -73,14 +82,17 @@
position: fixed;
left: 0;
bottom: 0rpx;
height: 164rpx;
padding: 32rpx 40rpx;
border-top: 1px solid #e2e7ef;
}
.footer-btn {
width: 750rpx;
height: 128rpx;
padding: 0 40rpx;
width: 670rpx;
height: 96rpx;
background-color: #fff;
border-top: 0.5px solid #E2E7EF;
}
.cancel-btn, .confirm-btn {
width: 318rpx;
height: 96rpx;
......@@ -90,14 +102,16 @@
text-align: center;
border-radius: 4rpx;
}
.cancel-btn {
color: #656E7B;
color: #656e7b;
background-color: #fff;
border: 0.5rpx solid #C2C7CF;
border: 0.5rpx solid #c2c7cf;
}
.confirm-btn {
color: #fff;
background-color: #86C5E1;
background-color: #86c5e1;
}
image {
......
const App = getApp()
let App = getApp()
Page({
data: {
bgUrl: '/pages/mine/home/image/mine.png',
avatarUrl: '/pages/mine/home/image/avatar.png',
name:'姓名',
name: '姓名',
idString: '前台核销',
shop: '艺术花坊',
showDialog: false,
showDialogSmg: '非本店券码,无法使用',
couponCode: '',
},
onLoad: function (options) {
onLoad: function(options) {
let userInfo = wx.getStorageSync('userInfo')
let authInfo = JSON.parse(options.authInfo)
this.setData({
avatarUrl: userInfo.avatar ? userInfo.avatar : '/pages/mine/home/image/avatar.png',
name: userInfo.name,
idString: authInfo.roleName,
shop: authInfo.officeName,
avatarUrl: userInfo.avatar ? userInfo.avatar : '/pages/mine/home/image/avatar.png',
name: userInfo.name,
idString: authInfo.roleName,
shop: authInfo.officeName,
})
},
handleWriteOff() {
......@@ -34,30 +31,29 @@ Page({
handleScanCode() {
let that = this
wx.scanCode({
onlyFromCamera: true,
success: (res) => {
console.log(res)
let result = res.result
that.getVolumeDetails(result)
}
onlyFromCamera: true,
success: (res) => {
console.log(res)
let result = res.result
that.getVolumeDetails(result)
}
})
},
getVolumeDetails(couponCode) {
if (!couponCode || couponCode.length == 0) {
wx.lin.showToast({
image: '/image/error.png',
App.ui.showToast({
iconType: 'error',
title: '请输入券码',
})
return
}
let that = this
wx.lin.showToast({
icon: 'loading',
App.ui.showToast({
iconType: 'loading',
title: '正在识别',
show: true,
mask: true,
duration: 1000 * 60,
duration: 60000
})
App.wxRequest({
url: '/api/v1/volume/getVolumeDetails',
......@@ -65,17 +61,21 @@ Page({
serialNumber: couponCode,
},
success: function(res) {
wx.lin.hideToast()
App.ui.hideToast()
let couponDetail = JSON.stringify(res.data)
wx.navigateTo({
url: '/pages/pay/coupon-detail/coupon-detail?couponDetail='+couponDetail,
url: '/pages/pay/coupon-detail/coupon-detail?couponDetail=' + couponDetail,
})
},
fail: function(err) {
wx.lin.hideToast()
that.setData({
showDialogSmg: err.msg,
showDialog: true
App.ui.hideToast()
App.ui.showDialog({
type: 'tip',
title: err.msg,
cancel: '取消',
confirm: '确定',
success: () => {},
fail: () => {},
})
}
})
......
<navigation class="navigation" titleText="券码核销" backIcon="/image/back.png"></navigation>
<l-toast l-image-class="toast-image"></l-toast>
<m-toast></m-toast>
<m-dialog show="{{showDialog}}" title="{{showDialogSmg}}"></m-dialog>
<m-nav titleText="券码核销"></m-nav>
<view class="container">
<!-- 头像信息 -->
<view class="header col align-c">
......@@ -27,10 +29,6 @@
<view class="coupon-input-wrapper row con-b">
<input placeholder="请输入券码" placeholder-style="color: #C2C7CF" bindinput="bindCouponInput" value="{{couponCode}}"></input>
<view class="coupon-input-btn" bindtap="handleWriteOff">核销</view>
<l-dialog show="{{showDialog}}" l-class="dialog-wrapper" l-title-class="dialog-title" l-confirm-class="dialog-confirm" title="{{showDialogSmg}}">
<!-- <view class="dialog-content">所属门店:原味舒食</view> -->
</l-dialog>
<!-- <l-toast show="{{true}}" l-image-class="toast-image" l-class="toast-bg" image="/image/success.png" title="核销成功" /> -->
</view>
<!-- 扫码核销 -->
......
......@@ -61,32 +61,12 @@
background-color: #86C5E1;
border-radius: 4rpx;
}
.dialog-wrapper {
width: 590rpx !important;
}
.dialog-title {
margin-top: 48rpx !important;
color: #15191F !important;
font-size: 34rpx !important;
font-weight: 600 !important;
}
.dialog-confirm {
height: 94rpx !important;
color: #5DB5DD !important;
font-size: 30rpx !important;
}
.dialog-content {
margin-bottom: 30rpx;
color: #959DA9;
font-size: 30rpx;
}
.toast-bg {
min-width: 262rpx !important;
min-height: 262prx !important;
}
/* .toast-image {
} */
.coupon-scan-wrapper {
width: 668rpx;
......
......@@ -264,23 +264,23 @@ Page({
let that = this;
if (this.data.scoreServeText == 0) {
wx.lin.showToast({
image: '/image/error.png',
title: '请对服务进行评价',
App.ui.showToast({
iconType: 'error',
title: '请对服务进行评价'
})
return
}
if (this.data.scoreProductText == 0) {
wx.lin.showToast({
image: '/image/error.png',
title: '请对产品进行评价',
App.ui.showToast({
iconType: 'error',
title: '请对产品进行评价'
})
return
}
if (this.data.scoreEnvironmentText == 0) {
wx.lin.showToast({
image: '/image/error.png',
title: '请对环境进行评价',
App.ui.showToast({
iconType: 'error',
title: '请对环境进行评价'
})
return
}
......@@ -291,8 +291,11 @@ Page({
formData.productEvaluation = this.data.scoreProductText //产品评价
formData.environmentalEvaluation = this.data.scoreEnvironmentText //环境评价
formData.content = this.data.content
wx.showLoading({
App.ui.showToast({
iconType: 'loading',
title: '处理中',
duration: 60000
})
App.wxRequest({
url: '/api/v1/order/doAppraise',
......@@ -308,9 +311,10 @@ Page({
wx.hideLoading({
success: (res) => {},
})
wx.lin.showToast({
image: '/image/success.png',
title: '评价成功',
App.ui.showToast({
iconType: 'success',
title: '评价成功'
})
setTimeout(() => {
// var pages = getCurrentPages();
......
<navigation class="navigation" titleText="订单评价" background="#ffffff" backIcon="/image/back.png"></navigation>
<m-toast></m-toast>
<m-nav titleText="订单评价"></m-nav>
<view class="container con-s">
<view class="order-wrapper">
......@@ -99,6 +100,4 @@
<text>提交评价</text>
</view>
</view>
</view>
<l-toast l-image-class="toast-image"></l-toast>
\ No newline at end of file
</view>
\ No newline at end of file
.container {
padding-top: 232rpx;
padding-top: 60rpx;
padding-bottom: 260rpx;
background: linear-gradient(180deg, #fff 0%, #f3f4f6 100%);
}
......
......@@ -36,7 +36,7 @@ Page({
shopAppId: options.shopAppId,
fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false,
marginTop: wx.getStorageSync('navigationStatusHeight') + wx.getStorageSync('navigationCapsuleHeight')
marginTop: wx.getStorageSync('navStatusHeight') + wx.getStorageSync('navTitleHeight')
})
this.queryOrderDetail()
},
......
......@@ -191,15 +191,15 @@
<text>报名人数</text>
</view>
<view class="entry-input row con-b align-c">
<l-button l-class="input-button input-cut" special="{{true}}" bind:lintap="onQuantityCut">
<button class="input-button input-cut" special="{{true}}" bind:tap="onQuantityCut">
<image wx:if="{{1 < quantity}}" class="input-icon" src="{{imageBase + 'icon/cut-1.png'}}"></image>
<image wx:if="{{1 === quantity}}" class="input-icon" src="{{imageBase + 'icon/cut-2.png'}}"></image>
</l-button>
</button>
<text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{quantity}}</text>
<l-button l-class="input-button input-add" special="{{true}}" bind:lintap="onQuantityAdd">
<button class="input-button input-add" special="{{true}}" bind:tap="onQuantityAdd">
<image wx:if="{{quantity < quantityMax}}" class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
<image wx:if="{{quantity === quantityMax || quantityMax === 0}}" class="input-icon" src="{{imageBase + 'icon/add-2.png'}}"></image>
</l-button>
</button>
</view>
<view class="quantity-other row con-b align-c">
<view class="quantity-error">
......@@ -218,15 +218,15 @@
<text>{{quantityTitle}}</text>
</view>
<view class="quantity-input row con-b align-c">
<l-button l-class="input-button input-cut" special="{{true}}" bind:lintap="onQuantityCut">
<button class="input-button input-cut" special="{{true}}" bind:tap="onQuantityCut">
<image wx:if="{{1 < quantity}}" class="input-icon" src="{{imageBase + 'icon/cut-1.png'}}"></image>
<image wx:if="{{1 === quantity}}" class="input-icon" src="{{imageBase + 'icon/cut-2.png'}}"></image>
</l-button>
</button>
<text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{quantity}}</text>
<l-button l-class="input-button input-add" special="{{true}}" bind:lintap="onQuantityAdd">
<button class="input-button input-add" special="{{true}}" bind:tap="onQuantityAdd">
<image wx:if="{{quantity < quantityMax}}" class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
<image wx:if="{{quantity === quantityMax || quantityMax === 0}}" class="input-icon" src="{{imageBase + 'icon/add-2.png'}}"></image>
</l-button>
</button>
</view>
<view class="quantity-other row con-b align-c">
<view class="quantity-error">
......
......@@ -483,6 +483,7 @@
align-items: center;
width: 80rpx;
height: 40rpx;
background: rgba(0, 0, 0, 0);
}
.input-cut {
......
......@@ -2,7 +2,7 @@
<view class="container">
<view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" style="{{navigationStyle}}" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image>
......
const App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
// formType: 1,
// entryComplete: false,
formInto: {
name: '',
phone: '',
quantity: 0,
// date: '',
},
activityImage: '',
activityName: '',
activeTime: '',
activityTimes: [{ beginTime: '', endTime: '', date: '' }],// 活动场次
activityIndex: 0,
isShow: false,
listData: [],
errorName: '',
errorPhone: '',
errorSession: '',
errorQuantity: '',
canSubmit: false,
// 接口参数
id: '',
},
onLoad: function (options) {
this.setData({
id: options.id
})
this.getEnrollView()
},
onQuantityCut: function () {
let funcFormInto = this.data.formInto
if (0 < funcFormInto.quantity) {
funcFormInto.quantity = funcFormInto.quantity - 1
}
this.setData({
formInto: funcFormInto
})
this.updateSubmitButtonStatus()
},
onQuantityAdd: function () {
let funcFormInto = this.data.formInto
let activityTime = this.data.activityTimes[this.data.activityIndex]
if (activityTime.date == '') {
this.setData({
errorQuantity: '暂无活动场次',
})
return
}
if (1 == activityTime.enroll * 1) {
this.setData({
errorQuantity: '该场次已报名过,请选择其他场次',
})
} else if (funcFormInto.quantity >= activityTime.residue * 1) {
this.setData({
errorQuantity: '该场次剩余名额' + activityTime.residue + '人',
})
} else if (funcFormInto.quantity >= 5) {
this.setData({
errorQuantity: '每个账号最多预约5人',
})
} else {
funcFormInto.quantity = funcFormInto.quantity + 1
this.setData({
errorQuantity: ''
})
}
this.setData({
formInto: funcFormInto
})
this.updateSubmitButtonStatus()
},
showPicker() {
this.setData({
isShow: true
})
},
sureCallBack: function (event) {
this.setData({
activityIndex: event.detail.choosedIndexArr,
isShow: false
})
// 切换报名场次更新重置报名人数
this.setData({
['formInto.quantity']: 0
})
let activityTime = this.data.activityTimes[this.data.activityIndex]
if (1 == activityTime.enroll * 1) {
this.setData({
errorQuantity: '该场次已报名过,请选择其他场次',
})
} else if (0 == activityTime.residue * 1) {
this.setData({
errorQuantity: '该场次人数已满,请选择其他场次',
})
} else {
this.setData({
errorQuantity: '',
})
}
this.updateSubmitButtonStatus()
},
cancleCallBack() {
this.setData({
isShow: false
})
},
onServic: function () {
wx.makePhoneCall({
phoneNumber: '13316748039'
})
},
onSubmit: function () {
this.doActivityEnroll()
},
onEntryComplete: function () {
this.setData({
entryComplete: false,
})
wx.navigateBack({
delta: 1
})
},
bindNameInput: function (e) {
console.log(e.detail.value)
this.setData({
['formInto.name']: e.detail.value
})
},
bindPhoneInput: function (e) {
this.setData({
['formInto.phone']: e.detail.value
})
},
onInputBlur: function (e) {
let type = e.target.dataset.type
let value = e.detail.value
if (type == 'name') {
if (value === '') {
this.setData({
canSubmit: false,
errorName: '请输入姓名'
})
return false
} else {
this.setData({
errorName: ''
})
}
} else if (type == 'phone') {
if (value === '') {
this.setData({
canSubmit: false,
errorPhone: '请输入手机号码'
})
complete = false
} else if (value.length != 11) {
this.setData({
canSubmit: false,
errorPhone: '请输入11位手机号码'
})
complete = false
} else {
this.setData({
errorPhone: ''
})
}
}
this.updateSubmitButtonStatus()
},
//活动报名页
getEnrollView() {
var that = this
App.wxRequest({
url: '/api/v1/activity/getEnrollView',
data: { id: that.data.id },
success: function (res) {
var response = res.data
if (response.activityTimes.length > 0) {
var activityTimes = []
var pickerList = []
response.activityTimes.forEach(item => {
var obj = item
obj.date = item.beginTime + ' - ' + item.endTime
activityTimes.push(obj)
pickerList.push(obj.date)
})
that.setData({
activityTimes: activityTimes,
listData: [pickerList],
})
}
that.setData({
activityImage: response.cover,
activityName: response.name,
activeTime: response.activeDate + ' ' + response.activeTime,
})
}
})
},
inspectForm: function () {
let complete = true
let formInto = this.data.formInto
if (formInto.name === '') {
this.setData({
errorName: '请输入姓名'
})
complete = false
} else {
this.setData({
errorName: ''
})
}
if (formInto.phone === '') {
this.setData({
errorPhone: '请输入手机号码'
})
complete = false
} else if (formInto.phone.length != 11) {
this.setData({
errorPhone: '请输入11位手机号码'
})
complete = false
} else {
this.setData({
errorPhone: ''
})
}
let activityTime = this.data.activityTimes[this.data.activityIndex]
if (1 == activityTime.enroll * 1) {
this.setData({
errorQuantity: '该场次已报名过,请选择其他场次',
})
complete = false
} else if (0 == activityTime.residue * 1) {
this.setData({
errorQuantity: '该场次人数已满,请选择其他场次',
})
complete = false
} else if (formInto.quantity === 0) {
this.setData({
errorQuantity: '请设置报名人数'
})
complete = false
} else {
this.setData({
errorQuantity: ''
})
}
this.setData({
canSubmit: complete
})
return complete
},
updateSubmitButtonStatus() {
let complete = true
let formInto = this.data.formInto
if (formInto.name === '') {
complete = false
}
if (formInto.phone === '') {
complete = false
} else if (formInto.phone.length != 11) {
complete = false
}
let activityTime = this.data.activityTimes[this.data.activityIndex]
if (1 == activityTime.enroll * 1) {
complete = false
} else if (0 == activityTime.residue * 1) {
complete = false
} else if (formInto.quantity === 0) {
complete = false
}
this.setData({
canSubmit: complete
})
return complete
},
// 活动报名
doActivityEnroll() {
if (!this.inspectForm()) {
return
}
var activityTime = this.data.activityTimes[this.data.activityIndex]
let formInto = this.data.formInto
wx.lin.showToast({
icon: 'loading',
title: '提交中',
show: true,
mask: true,
duration: 1000 * 60,
})
var that = this
App.wxRequest({
url: '/api/v1/activity/doActivityEnroll',
data: {
activityId: that.data.id,
activityTimesId: activityTime.id,
enrollNum: formInto.quantity,
name: formInto.name,
mobile: formInto.phone,
},
success: function (res) {
that.setData({
entryComplete: true,
})
wx.lin.hideToast()
},
fail: function (err) {
wx.lin.showToast({
image: '/image/error.png',
title: err.msg,
})
}
})
},
})
\ No newline at end of file
{
"navigationBarTextStyle": "black",
"usingComponents": {
"picker": "../../../component/picker/picker"
}
}
\ No newline at end of file
<l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="活动报名" backIcon="/image/back.png"></navigation>
<view class="entry-complete row con-c align-c" wx:if="{{entryComplete}}">
<view class="entry-complete-tip">
<image src="./image/tip.png"></image>
<l-button l-class="button" plain="{{true}}" bind:lintap="onEntryComplete">我知道了</l-button>
</view>
</view>
<!-- 入园预约 -->
<view class="container">
<view class="form-title row con-s align-c">
<text>报名活动</text>
</view>
<view class="entry-tip row align-c">
<view class="row align-c">
<image src="{{activityImage}}"></image>
</view>
<view class="col">
<text class="entry-tip-title">{{activityName}}</text>
<text class="entry-tip-date">{{activeTime}}</text>
</view>
</view>
<view class="form-title row con-s align-c">
<text>报名信息</text>
</view>
<view class="form">
<view class="row align-c">
<view class="input-label row con-b align-c">
<text space="ensp">姓 名</text>
</view>
<view class="input-wrap row align-c">
<input maxlength="16" class="weui-input" placeholder-class="input-tip" placeholder="请输入名字" data-type="name" bindblur="onInputBlur" bindinput="bindNameInput"></input>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorName ? false : true}}">{{errorName}}</text>
</view>
<view class="row align-c">
<view class="input-label row align-c">
<text space="ensp">手 机 号</text>
</view>
<view class="input-wrap row align-c">
<input maxlength="11" type="number" class="weui-input" placeholder-class="input-tip" placeholder="请输入手机号" data-type="phone" bindblur="onInputBlur" bindinput="bindPhoneInput"></input>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorPhone ? false : true}}">{{errorPhone}}</text>
</view>
<view class="row align-c">
<view class="input-label row align-c">
<text space="ensp">报名时间</text>
</view>
<view class="input-wrap row con-b align-c" style="padding: 0 0 0 24rpx">
<!-- <picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" bindchange="onSelectionDate">
<view class="picker">{{formInto.date}}</view>
</picker> -->
<!-- <picker class="input-picker" mode="selector" range-key="{{'date'}}" range="{{activityTimes}}" bindchange="onSelectionDate">
<text class="picker">{{activityTimes[activityIndex].beginTime}}</text>
</picker>
<image class="input-icon" src="../../image/more.png"></image> -->
<view class="input-picker" bindtap="showPicker">
<text class="picker">{{activityTimes[activityIndex].beginTime}}</text>
</view>
<image class="input-icon" src="../../image/more.png" bindtap="showPicker"></image>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorSession ? false : true}}">{{errorSession}}</text>
</view>
<picker
isShowPicker="{{isShow}}"
bindsure="sureCallBack"
bindcancle="cancleCallBack"
scrollType="normal"
listData="{{listData}}"
indicatorStyle="height:47rpx"
titleText=""
sureStyle="color:#26AB28"
cancelStyle="color:#888888"
chooseItemTextStyle="font-size: 24rpx;"
></picker>
<view class="row align-c">
<view class="input-label row align-c">
<text space="ensp">报名人数</text>
</view>
<view class="input-wrap row con-b align-c" style="padding: 0">
<l-button special="{{true}}" bind:lintap="onQuantityCut">
<image class="input-icon" src="{{imageBase + 'icon/cut-1.png'}}"></image>
</l-button>
<text>{{formInto.quantity}}</text>
<l-button special="{{true}}" bind:lintap="onQuantityAdd">
<image class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
</l-button>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorQuantity ? false : true}}">{{errorQuantity}}</text>
</view>
</view>
<view class="entry-operation">
<button class="{{canSubmit ? 'button' : 'button-disable'}} button row con-c align-c" bindtap="onSubmit">确认报名</button>
</view>
</view>
\ No newline at end of file
.navigation {
z-index: 1900;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
}
.container {
margin-top: 100rpx;
}
/* 预约完成 */
.entry-complete {
z-index: 1900;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.65);
}
.entry-complete-tip {
position: relative;
width: 606rpx;
height: 840rpx;
}
.entry-complete-tip image {
width: 606rpx;
height: 840rpx;
}
.entry-complete .button {
position: absolute;
bottom: 64rpx;
left: 88rpx;
width: 432rpx;
height: 80rpx;
border: 1px #15191f solid;
border-radius: 2px;
color: #15191f;
background: #fefcf9;
}
/* 预约提示 */
.entry-tip {
position: relative;
width: 670rpx;
height: 216rpx;
margin-top: 56rpx;
padding: 40rpx 32rpx;
border-radius: 2px;
background: #F5F6F8;
}
.entry-tip image {
width: 140rpx;
height: 136rpx;
margin-right: 32rpx;
}
.entry-tip-title {
width: 434rpx;
/* height: 42rpx; */
font-size: 30rpx;
font-weight: bold;
color: #15191F;
line-height: 42rpx;
display: -webkit-box;
overflow: hidden;
white-space: normal;
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp:2;
-webkit-box-orient: vertical;
}
.entry-tip-date {
width: 434rpx;
height: 36rpx;
margin-top: 16rpx;
font-size: 26rpx;
color: #656E7B;
line-height: 36rpx;
}
.ornament-wave {
position: absolute;
bottom: 0;
left: 0;
width: 750rpx;
height: 50rpx;
}
/* 表单 */
.form-title {
width: 750rpx;
margin-top: 80rpx;
padding: 0 40rpx;
font-size: 30rpx;
color: #959DA9;
}
.input-label {
width: 160rpx;
height: 80rpx;
line-height: 42rpx;
color: #1E2025;
}
.input-wrap {
width: 510rpx;
height: 80rpx;
margin: 20rpx 0;
padding: 0 24rpx;
border: 1px #DBDFE5 solid;
border-radius: 2px;
}
.input-tip {
font-size: 30rpx;
color: #C2C7CF;
line-height: 32rpx;
}
.input-icon {
width: 80rpx;
height: 80rpx;
padding: 22rpx;
}
.input-picker {
flex-grow: 1;
font-size: 30rpx;
}
.form-error {
width: 510rpx;
height: 32rpx;
margin-bottom: 8rpx;
margin-left: 160rpx;
font-size: 22rpx;
font-weight: 400;
color: #D92B3A;
line-height: 32rpx;
}
.quota {
position: relative;
top: -20rpx;
right: 0;
}
.quota text:nth-child(1) {
font-size: 30rpx;
color: #1E2025;
}
.quota text:nth-child(2) {
font-size: 30rpx;
color: #86C5E1;
}
/* 操作按钮 */
.entry-operation {
width: 750rpx;
padding: 30rpx 40rpx;
background: #ffffff;
}
.entry-operation .button {
width: 670rpx;
height: 96rpx;
margin-bottom: 40rpx;
background: #86C5E1;
border-radius: 2px;
font-size: 30rpx;
font-weight: 500;
color: #ffffff;
line-height: 42rpx;
}
.entry-operation .button-disable {
width: 670rpx;
height: 96rpx;
margin-bottom: 40rpx;
background: #C8E1EC;
border: 1px solid #C8E1EC;
border-radius: 2px;
font-size: 30rpx;
font-weight: 500;
color: #ffffff;
line-height: 42rpx;
}
\ No newline at end of file
{
"navigationBarTextStyle": "black",
"usingComponents": {}
}
\ No newline at end of file
......@@ -9,10 +9,6 @@ Page({
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
navigationLogoTop: 0,
navigationLogoMarginTop: 0,
strategy: [],
strategyList: [],
strategyOriginList: [],
......@@ -36,10 +32,6 @@ Page({
touristRouteList: [],
},
onLoad: function (options) {
this.setNavigationLogo()
},
onShow: function () {
this.setData({ appStatus: App.globalData.appStatus })
this.queryActivity()
......@@ -54,23 +46,6 @@ Page({
},
/**
* 设置标题高度
* @function
* @param
* @returns
*/
setNavigationLogo: function () {
let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcLogoTop = App.modular.utils.navigationElementCenterMarginTop(50)
let funcLogoMinorTop = funcLogoTop + 50 * funcUnitProportion + 20 * funcUnitProportion
this.setData({
navigationLogoTop: funcLogoTop,
navigationLogoMarginTop: funcLogoMinorTop,
})
},
/**
* 查询主题活动
* @function
* @param
......
{
"navigationBarTextStyle": "black",
"usingComponents": {}
}
\ No newline at end of file
let App = getApp()
Page({
data: {
appStatus: App.globalData.appStatus,
......@@ -77,7 +76,6 @@ Page({
case 2:
// this.queryMovie()
this.setData({
navigationStyle: this.data.navigationStyleBlack,
cssDetail: 'padding-bottom: 0;',
})
break
......@@ -726,17 +724,11 @@ Page({
winSide: false
})
}
let funcOpacity = (funcEvent.scrollTop - this.data.sideHeight) / 40
this.setData({
navigationAnimationShow: funcOpacity
})
}
if (funcEvent.scrollTop < this.data.sideHeight && !this.data.winSide) {
this.setData({
winSide: true,
navigationAnimationShow: 0
})
}
},
......@@ -789,21 +781,26 @@ Page({
wx.saveImageToPhotosAlbum({
filePath: result.tempFilePath,
success: (result) => {
App.ui.showToast({
iconType: 'success',
title: '图片已保存'
})
this.setData({
showPopup: false,
winToastSuccess: true
})
},
fail: (error) => {
this.setData({
winToastFail: true
App.ui.showToast({
iconType: 'error',
title: '图片保存失败'
})
}
})
},
fail: (error) => {
this.setData({
winToastFail: true
App.ui.showToast({
iconType: 'error',
title: '图片保存失败'
})
}
})
......
<m-toast></m-toast>
<m-nav titleText="{{info.title}}" scrollHeight="{{navScroll}}" changeHeight="50rpx" styleIndex="{{option.id !== '2' ? 2 : 6}}" isOccupy="{{false}}"></m-nav>
<view class="container" wx:if="{{option.id !== '2'}}">
<view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" style="{{navigationStyle}}" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image>
......@@ -36,10 +37,6 @@
</view>
</view>
</view>
<!-- 下载图片反馈 -->
<l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastSuccess}}" image="../../../image/icon/success-3.png" title="图片已保存" duration="3000"></l-toast>
<!-- 下载图片反馈 -->
<l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastFail}}" image="../../../image/icon/war-3.png" title="图片保存失败" duration="3000"></l-toast>
<!-- 开放时间信息 -->
<view class="commodity-other {{option.id === '6' || option.id === '4' ? 'food-border' : ''}} row align-c">
<image src="./image/time.png"></image>
......@@ -277,7 +274,7 @@
<!-- 星空影院 -->
<view class="container movie" wx:if="{{option.id === '2'}}">
<view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" style="{{navigationStyle}}" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="2000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image>
......@@ -311,10 +308,6 @@
</view>
</view>
</view>
<!-- 下载图片反馈 -->
<l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastSuccess}}" image="../../../image/icon/success-3.png" title="图片已保存" duration="3000"></l-toast>
<!-- 下载图片反馈 -->
<l-toast l-class="toast" l-image-class="toast-icon" show="{{winToastFail}}" image="../../../image/icon/war-3.png" title="图片保存失败" duration="3000"></l-toast>
<!-- 开放时间信息 -->
<view class="commodity-other movie-border row align-c">
<image src="./image/time.png"></image>
......
<navigation class="navigation" titleText="服务详情" color="#ffffff" backIcon="/image/back-w.png"></navigation>
<m-nav titleText="服务详情" scrollHeight="{{navScroll}}" styleIndex="{{2}}" isOccupy="{{false}}"></m-nav>
<view class="container">
<view class="banner">
......
.navigation {
z-index: 2000;
}
.container {
padding-bottom: 196rpx;
}
.banner {
z-index: 9;
position: relative;
width: 750rpx;
height: 814rpx;
......
.navigation {
z-index: 1900;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
}
.banner {
position: relative;
width: 750rpx;
......
let output = {
navigationElementCenterMarginTop: function (funcElementHeight) {
let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcStatusHeight = wx.getStorageSync('navigationStatusHeight')
let funcCapsuleHeight = wx.getStorageSync('navigationCapsuleHeight')
// 计算元素 px 高度
let funcElementHeightPx = funcElementHeight * funcUnitProportion
// 元素高度小于胶囊高度
if (funcCapsuleHeight < funcElementHeightPx) {
return funcStatusHeight + funcCapsuleHeight - funcElementHeightPx
}
// 元素高度大于胶囊高度
if (funcElementHeightPx < funcCapsuleHeight) {
return (funcCapsuleHeight - funcElementHeightPx) / 2 + funcStatusHeight - 4 * funcUnitProportion
}
},
/**
* 金额格式化函数
* @function
......
/* SAMCSS-layout */
.navigation {
position: fixed;
top: 0;
left: 0;
width: 750rpx;
z-index: 9;
}
.container {
display: flex;
flex-direction: column;
......
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