提交 025909f3 编写于 作者: 刘英杰's avatar 刘英杰 提交者: 刘英杰

Initial Commit

上级 6d479e6d
/*
* Eslint config file
* Documentation: https://eslint.org/docs/user-guide/configuring/
* Install the Eslint extension before using this feature.
*/
module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
ecmaFeatures: {
modules: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
// extends: 'eslint:recommended',
rules: {},
}
.DS_Store
node_modules
miniprogram_npm
/dist
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
\ No newline at end of file
// app.js
App({
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
},
globalData: {
windowWidth: wx.getSystemInfoSync().windowWidth,
windowHeight: wx.getSystemInfoSync().windowHeight,
screenWidth:wx.getSystemInfoSync().screenWidth,
screenHeight:wx.getSystemInfoSync().screenHeight,
statusBarHeight:wx.getSystemInfoSync().statusBarHeight,
pageHeight:wx.getSystemInfoSync().screenHeight-wx.getSystemInfoSync().statusBarHeight -48,
menuHeigth:(wx.getMenuButtonBoundingClientRect().top - wx.getSystemInfoSync().statusBarHeight) * 2 + wx.getMenuButtonBoundingClientRect().height,
}
})
{
"pages": [
"pages/index/index",
"pages/login/login",
"pages/showQRcode/showQRcode",
"pages/subscribe/subscribe",
"pages/record/record"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#f1ede8",
"navigationBarTitleText": "琼台博物馆门票预约",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
/**app.wxss**/
page{
height: 100%;
width: 100%;
}
{
"name": "museum-subscribe-master",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"@vant/weapp": "^1.10.20"
}
},
"node_modules/@vant/weapp": {
"version": "1.10.20",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.20.tgz",
"integrity": "sha512-smztfdwNhS9i8+QrEzD293LJCHy6q+WlDcy1dZCrfW09gf5dY5XGMHK3UsPJ+hNahZh0KPQ/jkN0NiXb5v+HjA=="
}
},
"dependencies": {
"@vant/weapp": {
"version": "1.10.20",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.20.tgz",
"integrity": "sha512-smztfdwNhS9i8+QrEzD293LJCHy6q+WlDcy1dZCrfW09gf5dY5XGMHK3UsPJ+hNahZh0KPQ/jkN0NiXb5v+HjA=="
}
}
}
{
"dependencies": {
"@vant/weapp": "^1.10.20"
}
}
// index.js
var http = require('../../utils/http.js')
var WxParse = require('../../plugins/wxParse/wxParse.js');
// 获取应用实例
const app = getApp()
Page({
data: {
menuHeigth:app.globalData.menuHeigth,
statusBarHeight:app.globalData.statusBarHeight,
show: false,
countdown:0,
initInfo:{}
},
//同意入馆须知
agreeGo(){
wx.setStorageSync('isAgreeGo', true)
this.setData({ show: false });
},
//获取博物馆初始化配置
getInitInfo(){
var that = this
http.getData(
'sysconfiguration/api/sysconfig/GetSysconfigurationInfoByWX',
// 请求参数
{},
function (res) {
if (res.code == 1) {
// console.log("res",res)
const initInfo = res.response;
wx.setStorageSync('initInfo', initInfo)
that.setData({
initInfo: initInfo
})
WxParse.wxParse('content', 'html', that.data.initInfo.inform, that, 10);//入馆须知 html转
WxParse.wxParse('jianjie', 'html', that.data.initInfo.introduction, that, 10);//简介 html转
}
},
function (err) {
console.log('请求失败:' + err);
},
false
)
},
//展开入馆须知
onClickShow() {
this.setData({ show: true });
},
//路由跳转
navigateToSubscribe(e) {
// console.log("ttttt",e.currentTarget.dataset.url)
wx.navigateTo({
url: e.currentTarget.dataset.url
})
},
onLoad() {
var that = this;
that.getInitInfo() //请求初始化数据
//第一步,启动时判断是否打开入馆须知
let isAgreeGo = wx.getStorageSync('isAgreeGo') //判断是否同意
if(!isAgreeGo){
//如果没同意过,打开并启动倒计时5秒
this.setData({ show: true,countdown:5 });
let clock = setInterval(() => {
if(that.data.countdown === 0) {
clearInterval(clock);//清除周期
}else {
that.data.countdown--
that.setData({countdown: that.data.countdown})
}
}, 1000);
}
// WxParse.wxParse('content', 'html', that.data.content, that, 10);
// WxParse.wxParse('jianjie', 'html', that.data.jianjie, that, 10);
},
})
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"van-divider": "@vant/weapp/divider/index",
"van-icon": "@vant/weapp/icon/index",
"van-button": "@vant/weapp/button/index"
},
"navigationStyle": "custom",
"navigationBarTitleText": "琼台师范学院博物馆"
}
\ No newline at end of file
<!--index.wxml-->
<import src="../../plugins/wxParse/wxParse.wxml" />
<view class="home-container">
<view class="top">
<image mode="widthFix" src="../../images/home.png" />
<view class="home-logo" style="top:{{statusBarHeight}}px">
<!-- (menu.top - sysInfo.statusBarHeight) * 2 + menu.height -->
<!-- style="height:{{menuHeigth}}px" -->
<image mode="widthFix" src="../../images/logo.png" />
</view>
</view>
<view class="box">
<view class='bg-img'>
<image src="../../images/home-bg.png" />
</view>
<view class="box-content">
<view class="intro">
<view class="intro-title">
琼台书院博物馆
</view>
<view class="intro-content" bindtap="onClickShow">
<!-- <view class="content-p">开放时间:自2023年6月起,周一闭馆整休</view>
<view class="content-p">周二至周日09:00(开馆) - 16:00(停止入馆) - 17:00(闭馆)</view>
<view class="content-p">逢节假日正常开馆。<text class="content-tip" bindtap="onClickShow">入馆须知>></text> </view> -->
<template is="wxParse" data="{{wxParseData:jianjie.nodes}}" />
<!-- <text class="content-tip" bindtap="onClickShow">入馆须知>></text> -->
</view>
</view>
<view class="inner">
<!-- 散客预约 -->
<view class="item" bindtap="navigateToSubscribe" data-url="../subscribe/subscribe?subscribeType=0&title=散客预约">
<view class='item-bg-img'>
<image mode="widthFix" src="../../images/view-bg.png" />
</view>
<view class="item-content">
<view class="item-title">散客预约</view>
<view class="btn-icon">
<image mode="widthFix" src="../../images/arrow.png" />
</view>
</view>
</view>
<!-- 团队预约 -->
<view class="item" bindtap="navigateToSubscribe" data-url="../subscribe/subscribe?subscribeType=1&title=团队预约">
<view class='item-bg-img'>
<image mode="widthFix" src="../../images/view-bg.png" />
</view>
<view class="item-content">
<view class="item-title">团队预约</view>
<view class="btn-icon">
<image mode="widthFix" src="../../images/arrow.png" />
</view>
</view>
</view>
<!-- 公务接待预约 -->
<view class="long-item" bindtap="navigateToSubscribe" data-url="../subscribe/subscribe?subscribeType=2&title=公务接待预约">
<view class='item-bg-img'>
<image mode="widthFix" src="../../images/long-view-bg1.png" />
</view>
<view class="item-content">
<view class="item-title">公务接待预约</view>
<view class="btn-icon">
<image mode="widthFix" src="../../images/arrow.png" />
</view>
</view>
</view>
<!-- 预约记录 -->
<view class="long-item" bindtap="navigateToSubscribe" data-url="../record/record?title=预约记录">
<view class='item-bg-img'>
<image mode="widthFix" src="../../images/long-view-bg2.png" />
</view>
<view class="item-content">
<view class="item-title">预约记录</view>
<view class="btn-icon">
<image mode="widthFix" src="../../images/arrow.png" />
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="shade-box" wx:if="{{show}}" bindtap="onClickHide"> -->
<view class="shade-box" wx:if="{{show}}">
<view class="inTip-dialog">
<view class="inTip-dialog-box" catch:tap="noop">
<view class="inTip-title">
<text class="title-text">入馆须知</text>
<!-- <van-icon class="title-icon" name="cross" bindtap="onClickHide" /> -->
</view>
<van-divider customStyle="margin: 0 20rpx; border-color: #f5efea; font-size: 18px;" />
<view class="inTip-content">
<view class='inTip-bg-img'>
<image src="../../images/home-bg.png" />
</view>
<view class='inTip-container-box'>
<view class="inTip-container">
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
</view>
<view class="inTip-agreement" >
<van-button bind:click="agreeGo" disabled="{{countdown!=0}}" color='#d89a7c' block>我已知悉 <text wx:if="{{countdown!=0}}">{{countdown}}秒</text></van-button>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
@import "../../plugins/wxParse/wxParse.wxss";
::-webkit-scrollbar{
width: 0;
height: 0;
color: transparent;
}
.home-container {
padding: 0;
background-color: #fff !important;
height: 100%;
display: flex;
flex-direction: column;
font-family: '宋体';
}
.top {
width: 100%;
position: relative;
}
.home-logo {
position: absolute;
width: 50%;
/* width: calc((100% - 40rpx) / 2); */
top: 100rpx;
left: 20rpx;
}
.top image {
width: 100%;
}
.box {
flex: 1;
width: 100%;
height: 100%;
box-sizing: border-box;
/* padding: 100rpx 50rpx 20rpx; */
border-top-right-radius: 45rpx;
border-top-left-radius: 45rpx;
margin-top: -80rpx;
position: relative;
background-color: #fff;
}
.bg-img {
height: 100%;
width: 100%;
position: relative;
background-color: #f2efea;
overflow: hidden;
}
.bg-img image {
height: 100%;
width: 100%;
}
.box-content {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
box-sizing: border-box;
border-top-right-radius: 45rpx;
border-top-left-radius: 45rpx;
padding: 80rpx 50rpx 20rpx;
/* background-color: #f2efea; */
}
.intro .intro-title {
color: #574f44;
font-size: 40rpx;
font-weight: 700;
}
.intro-content {
padding-top: 20rpx;
color: #746058;
font-size: 24rpx;
margin-bottom: 40rpx;
line-height: 40rpx;
}
.content-tip {
color: #d89a7c;
}
.box .inner {
width: 100%;
display: flex;
flex-wrap: wrap;
position: relative;
}
.box .inner .item {
width: calc((100% - 40rpx) / 2);
position: relative;
margin-bottom: 30rpx;
min-height: 150rpx;
border-radius: 16rpx;
box-sizing: border-box;
}
.box .inner .long-item {
width: 100%;
position: relative;
margin-bottom: 30rpx;
min-height: 150rpx;
border-radius: 16rpx;
box-sizing: border-box;
}
.box .inner .item:nth-child(4n+1) {
margin-right: 40rpx;
}
.item-bg-img {
position: relative;
width: 100%;
}
.item-bg-img image {
width: 100%;
border-radius: 16rpx;
}
.item-content {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 40rpx;
box-sizing: border-box;
}
.item-title {
font-size: 32rpx;
color: #574F44;
font-weight: 700;
font-family: "宋体";
/* font-weight: bold; */
}
.btn-icon {
width: 16px;
/* height: 36px; */
}
.btn-icon image {
width: 100%;
/* height: 100%; */
}
.shade-box {
position: fixed;
top: 0;
z-index: 999;
height: 100%;
width: 100%;
background-color: rgb(3, 3, 3, 0.5);
display: flex;
justify-content: center;/*水平主轴居中*/
align-items: center;/*垂直交叉轴居中*/
}
.inTip-dialog {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
overflow: hidden;
}
.inTip-dialog-box {
width: 100%;
margin: 0 40rpx;
height: 900rpx;
display: flex;
position: relative;
flex-direction: column;
background-color: #fffcf7;
border-radius: 30rpx;
/* padding: 20rpx; */
box-sizing: border-box;
overflow: hidden;
}
.inTip-title {
text-align: center;
position: relative;
font-size: 38rpx;
color: #574F44;
background-color: #fffbf7;
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
/* width: 100%; */
/* box-sizing: border-box; */
padding: 20rpx;
box-sizing: border-box;
}
.title-icon {
position: absolute;
right: 20rpx;
top: 50%;
transform: translate(0, -50%);
}
.inTip-content {
flex: 1;
position: relative;
overflow: hidden;
/* background-color: #fffcf7; */
}
.inTip-bg-img {
height: 100%;
width: 100%;
position: relative;
overflow: hidden;
/* background-color: #f2efea; */
}
.inTip-bg-img image {
height: 100%;
width: 100%;
overflow: hidden;
}
.inTip-container-box {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
padding: 20rpx;
padding-right: 30rpx;
box-sizing: border-box;
/* overflow: auto; */
z-index: 11;
}
.inTip-container {
height: calc((100% - 124rpx));
/* overflow: auto; */
z-index: 999;
}
.inTip-agreement {
width: 90%;
height: 84rpx;
position: absolute;
/* bottom: 40rpx; */
/* left: 0; */
/* background-color: red; */
left: 50%;
bottom: 40rpx;
transform: translate(-50%, 0);
border-radius: 8rpx;
overflow: hidden;
z-index: 9999;
}
.van-button__text {
/* color: #d5c4b9; */
/* color: #d5c4b9; */
font-size: 32rpx;
}
/* .box .inner .item:nth-child(2n+1) {
margin-right: 40rpx;
} */
/*
.box .inner .item .ix {
font-size: 60rpx;
margin-right: 15rpx;
color: #fff;
background-color: rgba(255, 255, 255, 0.2);
padding: 10rpx;
border-radius: 10rpx;
}
.box .inner .item .title {
font-size: 32rpx;
font-weight: bold;
} */
\ No newline at end of file
// pages/login/login.js
var http = require('../../utils/http.js')
Page({
/**
* 页面的初始数据
*/
data: {
checked: true,
code: "",
codePhone:"无",
codeLogin:"无"
},
getRealtimePhoneNumber(e) {
var that = this
console.log("code: ", e.detail.code)
wx.login({
success(loginRes) {
if (loginRes.code) {
console.log("wx.loginCode", loginRes.code)
that.setData({
codePhone: e.detail.code,
codeLogin: loginRes.code
})
//发起网络请求
http.getData(
'Login/api/Login/GetMiNiprogramToken',
// 请求参数
{
codePhone: e.detail.code,
codeLogin: loginRes.code
},
function (res) {
console.log("res", res)
if (res.code == 1) {
const loginInfo = res.response;
wx.setStorageSync('token', loginInfo.access_token.token_content)
wx.setStorageSync('refreshToken', loginInfo.refresh_token.token_content);
wx.navigateBack({
delta: 1
})
}
},
function (err) {
console.log('请求失败:' + err);
},
false
)
} else {
console.log('登录失败!', loginRes)
wx.showToast({
title: '登录失败,请稍后重试!',
icon: 'none',
duration: 1000
})
}
}
})
},
// getRealtimePhoneNumber(){
// console.log("111111111111111111")
// console.log(e.detail.code)
// },
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"van-button": "@vant/weapp/button/index",
"van-checkbox": "@vant/weapp/checkbox/index"
},
"navigationBarTitleText": "登录"
}
\ No newline at end of file
<!-- <van-button type="primary">登录</van-button> -->
<!-- <button open-type="getRealtimePhoneNumber" bindgetrealtimephonenumber="getRealtimePhoneNumber">11</button> -->
<!-- <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">微信授权手机号登录1</button> -->
<view class="login-container">
<view class="login-box">
<view class="login-logo">
<image mode="widthFix" src="../../images/logo1.png" />
</view>
<view class="login-button"><button open-type="getRealtimePhoneNumber" bindgetrealtimephonenumber="getRealtimePhoneNumber">手机快速验证登录</button></view>
<view class="login-agreement-box">
<van-checkbox value="{{ checked }}" icon-size="32rpx" shape="square" bind:change="onChange" />
<text style="color: #999;">已阅读并同意<text class="tip-text">《隐私权政策》</text><text class="tip-text">《用户协议》</text></text>
</view>
<!-- <text style="margin-top: 50px;" selectable>{{codePhone}}</text>
<text style="margin-top: 50px;" selectable>{{codeLogin}}</text> -->
</view>
</view>
\ No newline at end of file
/* pages/login/login.wxss */
.login-container{
padding: 0;
background-color: #fffbf7 !important;
height: 100%;
width: 100%;
display: flex;
box-sizing: border-box;
padding-bottom: 140rpx;
flex-direction: column;
font-family: '宋体';
position: relative;
overflow: auto;
}
.login-box{
position: absolute;
left: 50%;
top: 20%;
transform: translate(-50%,0);
width: 90%;
display: flex;
flex-direction: column;
align-items: center;
}
.login-logo{
margin-bottom: 40rpx;
width: 60%;
/* left: 50%;
top: 50%;
transform: translate(-50%,-50%); */
}
.login-logo image{
width: 100%;
}
.login-button{
width: 100%;
margin-bottom: 40rpx;
}
.login-button button {
background-color: #d89a7c;
height: 70rpx;
line-height: 70rpx;
font-size: 24rpx;
color: #fff;
border-radius: 40rpx;
}
.login-agreement-box{
width: 100%;
font-size: 24rpx;
display: flex;
align-items: flex-start;
}
.tip-text{
color: #e7c0ac;
}
\ No newline at end of file
// pages/record/record.js
var http = require('../../utils/http.js')
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
windowHeight: app.globalData.pageHeight,
active: 0,//切换tab标签
flag: true,
pageIndex: 1,//页
recordList: [], //预约记录
employ_state: 1,
},
onChange(event) {
console.log(event.detail)
//employ_state 1-待使用 2-已使用 3-预约变更 4-预约过期
let employ_state = 1
if (event.detail.title) {
if (event.detail.title == "待使用") {
employ_state = 1
} else if (event.detail.title == "已使用") {
employ_state = 2
} else if (event.detail.title == "预约变更") {
employ_state = 3
} else if (event.detail.title == "预约过期") {
employ_state = 4
}
}
this.setData({
employ_state: employ_state,
pageIndex: 1,
recordList: [],
})
this.getSubcsribeInfo()
// wx.showToast({
// title: `切换到标签 ${event.detail}`,
// icon: 'none',
// });
},
navigateToSubscribe(e) {
// console.log("ttttt",e.currentTarget.dataset.url)
wx.navigateTo({
url: e.currentTarget.dataset.url
})
},
//获取预约记录
getSubcsribeInfo() {
var that = this
http.getData(
'Background/api/guest/GetAppointmentAllInfo',
// 请求参数
{
employ_state: that.data.employ_state,
page_index: that.data.pageIndex,
page_size: 20,
},
function (res) {
console.log("res", res)
if (res.code == 1) {
var recordList = that.data.recordList.concat(res.response.data)
var flag
var pageIndex = that.data.pageIndex
if (recordList.length < res.response.data_count) {
flag = true
pageIndex = pageIndex + 1;
} else {
flag = false
// console.log("没有更多了")
}
// const initInfo = res.response;
// wx.setStorageSync('initInfo', initInfo)
that.setData({
recordList: recordList,
pageIndex: pageIndex,
flag: flag,
})
}
},
function (err) {
console.log('请求失败:' + err);
},
true
)
},
//加载更多
loadMore() {
if (this.data.flag) {
console.log("加载更多")
this.getSubcsribeInfo();
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// try {
// wx.setNavigationBarTitle({
// title: options.title
// })
// } catch (error) {
// }
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getSubcsribeInfo()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-empty": "@vant/weapp/empty/index"
},
"navigationBarTitleText": "预约记录"
}
\ No newline at end of file
<wxs src="../../wxs/tools.wxs" module="tools" />
<view class="record-container">
<van-tabs active="{{ active }}" color="#d59171" title-active-color="#d59171" bind:change="onChange">
<van-tab title="待使用">
<scroll-view wx:if="{{recordList.length>0}}" scroll-y="true" style="height: {{windowHeight -60}}px;" bindscrolltolower="loadMore">
<!-- 一条表单记录 -->
<view wx:for="{{recordList}}" wx:for-item="recordItem" class="record-item" bindtap="navigateToSubscribe" data-url="../showQRcode/showQRcode?appointmentid={{recordItem.appointmentid}}&title={{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}" >
<!-- 标题 -->
<view class="record-title-box">
{{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}
</view>
<!-- 预约详情 -->
<view class="record-content-box">
<view class="record-content-item">
<view class="info-item-label">参观日期</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.museum_date, 'Y年M月D日')}} <text>{{recordItem.moment==1?'上午':'下午'}}</text></view>
</view>
<view class="record-content-item">
<view class="info-item-label">预约时间</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.createtime, 'Y-M-D h:m:s')}}</view>
</view>
<view class="record-content-item">
<view class="info-item-label">人数</view>
<view class="info-item-value">{{recordItem.num}}人</view>
</view>
</view>
</view>
</scroll-view>
<view wx:else>
<van-empty description="暂无记录" />
</view>
</van-tab>
<van-tab title="已使用">
<scroll-view wx:if="{{recordList.length>0}}" scroll-y="true" style="height: {{windowHeight -60}}px;" bindscrolltolower="loadMore">
<!-- 一条表单记录 -->
<view wx:for="{{recordList}}" wx:for-item="recordItem" class="record-item" data-url="../showQRcode/showQRcode?appointmentid={{recordItem.appointmentid}}&title={{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}" >
<!-- 标题 -->
<view class="record-title-box">
{{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}
</view>
<!-- 预约详情 -->
<view class="record-content-box">
<view class="record-content-item">
<view class="info-item-label">参观日期</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.museum_date, 'Y年M月D日')}} <text>{{recordItem.moment==1?'上午':'下午'}}</text></view>
</view>
<view class="record-content-item">
<view class="info-item-label">预约时间</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.createtime, 'Y-M-D h:m:s')}}</view>
</view>
<view class="record-content-item">
<view class="info-item-label">人数</view>
<view class="info-item-value">{{recordItem.num}}人</view>
</view>
</view>
</view>
</scroll-view>
<view wx:else>
<van-empty description="暂无记录" />
</view>
</van-tab>
<van-tab title="预约过期">
<scroll-view wx:if="{{recordList.length>0}}" scroll-y="true" style="height: {{windowHeight -60}}px;" bindscrolltolower="loadMore">
<!-- 一条表单记录 -->
<view wx:for="{{recordList}}" wx:for-item="recordItem" class="record-item" data-url="../showQRcode/showQRcode?appointmentid={{recordItem.appointmentid}}&title={{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}" >
<!-- 标题 -->
<view class="record-title-box">
{{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}
</view>
<!-- 预约详情 -->
<view class="record-content-box">
<view class="record-content-item">
<view class="info-item-label">参观日期</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.museum_date, 'Y年M月D日')}} <text>{{recordItem.moment==1?'上午':'下午'}}</text></view>
</view>
<view class="record-content-item">
<view class="info-item-label">预约时间</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.createtime, 'Y-M-D h:m:s')}}</view>
</view>
<view class="record-content-item">
<view class="info-item-label">人数</view>
<view class="info-item-value">{{recordItem.num}}人</view>
</view>
</view>
</view>
</scroll-view>
<view wx:else>
<van-empty description="暂无记录" />
</view>
</van-tab>
<van-tab title="预约变更">
<scroll-view wx:if="{{recordList.length>0}}" scroll-y="true" style="height: {{windowHeight -60}}px;" bindscrolltolower="loadMore">
<!-- 一条表单记录 -->
<view wx:for="{{recordList}}" wx:for-item="recordItem" class="record-item" data-url="../showQRcode/showQRcode?appointmentid={{recordItem.appointmentid}}&title={{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}" >
<!-- 标题 -->
<view class="record-title-box">
{{recordItem.type==1?'团队预约':recordItem.type==2?'公务接待预约':'散客预约'}}
</view>
<!-- 预约详情 -->
<view class="record-content-box">
<view class="record-content-item">
<view class="info-item-label">参观日期</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.museum_date, 'Y年M月D日')}} <text>{{recordItem.moment==1?'上午':'下午'}}</text></view>
</view>
<view class="record-content-item">
<view class="info-item-label">预约时间</view>
<view class="info-item-value"> {{tools.formatTimeToDate(recordItem.createtime, 'Y-M-D h:m:s')}}</view>
</view>
<view class="record-content-item">
<view class="info-item-label">人数</view>
<view class="info-item-value">{{recordItem.num}}人</view>
</view>
</view>
</view>
</scroll-view>
<view wx:else>
<van-empty description="暂无记录" />
</view>
</van-tab>
</van-tabs>
</view>
\ No newline at end of file
/* pages/record/record.wxss */
.record-container {
padding: 0;
background-color: #f2eee9 !important;
height: 100%;
width: 100%;
display: flex;
box-sizing: border-box;
padding-bottom: 140rpx;
flex-direction: column;
font-family: '宋体';
overflow: hidden;
}
/* tab-class van-ellipsis */
.record-container .van-tab{
background-color: #f2eee9;
}
.record-item {
/* height: 200px; */
/* width: 100%; */
background-color: #fffbf7;
box-sizing: border-box;
margin: 30rpx 40rpx;
border-radius: 16rpx;
padding: 20rpx 30rpx;
}
.record-item:last-child{
margin-bottom: 50rpx;
}
.record-title-box {
width: 100%;
height: 70rpx;
/* background-color: red; */
font-size: 36rpx;
color: #574f44;
font-weight: 700;
line-height: 70rpx;
border-bottom: 1px solid #f5efea;
}
.record-content-box{
padding-top: 10rpx;
color: #595146;
}
.record-content-item{
display: flex;
justify-content: space-between;
padding: 15rpx 0;
font-size: 28rpx;
}
\ No newline at end of file
// pages/showQRcode/showQRcode.js
var http = require('../../utils/http.js')
Page({
/**
* 页面的初始数据
*/
// 把base64编码转为对应的数据要在前面加上
// data:text/javascript,Javascript代码
// data:text/javascript;base64,base64编码的Javascript代码
// data:image/gif;base64,base64编码的gif图片数据
// data:image/png;base64,base64编码的png图片数据
// data:image/jpeg;base64,base64编码的jpeg图片数据
// data:image/x-icon;base64,base64编码的icon图片数据
data: {
title:"散客预约",
record:{},
imageSrc:"data:image/PNG;base64," + `iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAABgUlEQVR42u3aSw7CMAwFwN7/0rCFXav4OQ5MllVonUFyPs51Bdrro93ps9L/6XvGNViwYJUMciW4BNad9995XoYOCxasUViJoKv6JP68x/1hwYL1k1idA4AFCxasSqz0ghYWLFj/i5UecNV3n8Zz5KkDLFiwthQsdj0/sroDCxastuS6ssGeNlF8xQALFqyxWMcUO4tydPzHsGDBKsFKFz5Xgk5MCGXfhQUL1hasXZc7Og8gyw4sYcGCNRZrF+40RFiwYM3CSm+wOxNz1eIWFixYZ2BN2EivJOBWXFiwYI3C2nXYtqvAEa/0wIIFK4pVldQ739k5mcCCBWsuVmeg8QsdVRMdLFiwtmC9wi292U4UVh9vnmHBgtWG1Zkgq4ogiUX1tavBggWr/H5D5+WLqgO8qu9GZkZYsGCVYyXO7BNFjdGnDrBgwToaK7FATSTysoIFLFiwfgYrvRCFBQvWf2GdspFe+QPKLobAggVrC1brRrRoYFWFkm2VHliwYD2J4Q0jCJp5Y40h4wAAAABJRU5ErkJggg==`
},
//获取记录详情
getRecordInfo(appointmentid) {
var that = this
http.getData(
'Background/api/guest/GetAppointmentInfoByWX',
// 请求参数
{
appointmentid:appointmentid
},
function (res) {
console.log("res", res)
if (res.code == 1) {
that.setData({
record:res.response
})
}
},
function (err) {
console.log('请求失败:' + err);
},
true
)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
try {
if(options){
console.log("options",options)
this.setData({ title: options.title?options.title:"散客预约" });
this.getRecordInfo(options.appointmentid)
}
} catch (error) {
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "待使用"
}
\ No newline at end of file
<wxs src="../../wxs/tools.wxs" module="tools" />
<view class="showQRcode-container">
<view class="showQRcode-card">
<!-- 顶部小线条 -->
<view class="top-line"></view>
<!-- 预约详情 -->
<view class="record-item">
<!-- 标题 -->
<view class="record-title-box">
{{title}}
</view>
<!-- 预约详情 -->
<view class="record-content-box">
<view class="record-content-item">
<view class="info-item-label">参观日期</view>
<view class="info-item-value">{{record.museum_date}} <text>{{record.moment==1?'上午':'下午'}}</text></view>
</view>
<view class="record-content-item">
<view class="info-item-label">预约时间</view>
<view class="info-item-value">{{tools.formatTimeToDate(record.createtime, 'Y-M-D h:m:s')}}</view>
</view>
<view class="record-content-item">
<view class="info-item-label">人数</view>
<view class="info-item-value">{{record.num}}人</view>
</view>
</view>
</view>
<!-- 线条及小半圆缺口 -->
<view class="added-card-footer">
<view class="left-circletop"></view>
<view class="right-circletop"></view>
</view>
<!-- 二维码展示 -->
<view class="qrCode-image-box">
<view class='bg-img'>
<image mode="widthFix" src="../../images/home-bg.png" />
</view>
<view class="qrCode-image">
<view class="image-container">
<image mode="widthFix" src="{{record.qrcode}}" />
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/showQRcode/showQRcode.wxss */
.showQRcode-container {
padding: 0;
background-color: #f2eee9 !important;
height: 100%;
width: 100%;
display: flex;
box-sizing: border-box;
padding-bottom: 140rpx;
flex-direction: column;
font-family: '宋体';
overflow: auto;
}
.showQRcode-card{
/* width: 182px; */
/* width: 100%; */
background-color: #fffbf7;
box-sizing: border-box;
margin: 30rpx 40rpx;
border-radius: 16rpx;
/* padding: 20rpx 30rpx; */
/* height: 244px; */
/* box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); */
opacity: 1;
overflow: hidden;
}
.top-line{
height: 20rpx;
background-color: #d89a7c;
}
.record-item {
/* height: 200px; */
/* width: 100%; */
background-color: #fffbf7;
box-sizing: border-box;
border-radius: 16rpx;
padding: 20rpx 30rpx;
}
.record-title-box {
width: 100%;
height: 70rpx;
/* background-color: red; */
font-size: 36rpx;
color: #574f44;
font-weight: 700;
line-height: 70rpx;
border-bottom: 1px solid #f5efea;
}
.record-content-box{
padding-top: 10rpx;
color: #595146;
}
.record-content-item{
display: flex;
justify-content: space-between;
padding: 15rpx 0;
font-size: 28rpx;
}
.added-card-footer {
position: relative;
width: 100%;
height: 25rpx;
border-top: 1px dashed #eee;
box-sizing: border-box;
}
.left-circletop {
width: 20px;
height: 20px;
border-radius: 20px;
/* border-radius: 10px 0 0 10px; */
position: absolute;
top: -10px;
left: -10px;
background-color: #f2eee9;
/* box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.12) inset; */
/* transform: rotate(180deg); */
}
.right-circletop {
width: 20px;
height: 20px;
border-radius: 20px;
background: #f2eee9;
/* box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.12) inset; */
position: absolute;
top: -10px;
right: -10px;
}
.qrCode-image-box{
background-color: red;
position: relative;
width: 100%;
box-sizing: border-box;
}
.bg-img {
/* height: 100%; */
width: 100%;
position: relative;
background-color: #fffbf7;
/* overflow: hidden; */
/* border: 1px solid red; */
box-sizing: border-box;
}
.bg-img image {
height: 100%;
width: 100%;
}
.qrCode-image{
/* margin: 100rpx 0rpx; */
min-width: 500rpx;
width: 90%;
padding: 100rpx 50rpx;
box-sizing: border-box;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.image-container{
background-color: #f9f3ef;
padding: 40rpx;
border-radius: 16rpx;
}
.image-container image{
width: 100%;
height: 100%;
}
此差异已折叠。
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-button": "@vant/weapp/button/index",
"van-stepper": "@vant/weapp/stepper/index",
"van-calendar": "@vant/weapp/calendar/index",
"van-field": "@vant/weapp/field/index"
},
"navigationBarTitleText": "散客预约"
}
\ No newline at end of file
此差异已折叠。
/* pages/subscribe/subscribe.wxss */
.subscribe-container {
padding: 0;
background-color: #f2eee9 !important;
/* height: 100%; */
width: 100%;
display: flex;
box-sizing: border-box;
padding-bottom: 140rpx;
flex-direction: column;
font-family: '宋体';
overflow: auto;
}
.time-box {
/* height: 200px; */
/* width: 100%; */
background-color: #fffcf7;
box-sizing: border-box;
margin: 20rpx 40rpx;
border-radius: 16rpx;
padding: 30rpx;
padding-top: 20rpx;
}
.time-title {
width: 100%;
height: 70rpx;
/* background-color: red; */
font-size: 36rpx;
color: #574f44;
font-weight: 700;
line-height: 70rpx;
border-bottom: 1px solid #f5efea;
}
.view-time-container {}
.view-time-container-title {
height: 70rpx;
/* background-color: red; */
font-size: 28rpx;
font-weight: 700;
color: #574f44;
line-height: 70rpx;
}
.time-select-list {
display: flex;
}
.time-select-item {
width: 150rpx;
height: 100rpx;
margin-right: 16rpx;
box-sizing: border-box;
position: relative;
border-radius: 8rpx;
padding: 20rpx 10rpx;
background-color: #F4ECE6;
border: 1px solid #D5C4B9;
color: #574F44;
font-size: 24rpx;
}
.item-checked-state {
min-width: 56rpx;
position: absolute;
top: 0;
right: 0;
padding: 8rpx;
font-size: 10px;
color: #d5c4b9;
background-color: #ede2db;
border-bottom-left-radius: 8rpx;
box-sizing: border-box;
text-align: center;
}
.select-checked {
background-color: #d89a7c;
color: #fff;
min-width: 50rpx;
}
.disabled-item {
font-size: 24rpx;
color: #d5c4b9;
background-color: #f9f3ef;
border: 1px solid #d5c4b9;
}
.checked-item {
background-color: #fff;
}
.select-box {
width: 130rpx;
margin-right: 0;
}
.select-checked-content{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
.select-checked-text{
width: 60rpx;
margin-right: 5rpx;
}
.session-item-text {
text-align: center;
line-height: 60rpx;
}
.person-container {
/* height: 200px; */
/* width: 100%; */
background-color: #fffbf7;
box-sizing: border-box;
margin: 0 40rpx;
margin-bottom: 20rpx;
border-radius: 16rpx;
padding: 30rpx;
padding-top: 20rpx;
}
.person-box {
background-color: #fffbf7;
margin-bottom: 10rpx;
}
.person-title {
width: 100%;
height: 70rpx;
line-height: 70rpx;
font-size: 36rpx;
color: #574f44;
font-weight: 700;
}
.person-info-box {
background-color: #f9f3ef;
box-sizing: border-box;
padding: 20rpx;
padding-top: 10rpx;
padding-bottom: 30rpx;
border-radius: 8rpx;
margin-top: 10rpx;
position: relative;
}
.person-info-del{
position: absolute;
top:-25rpx;
right: -20rpx;
/* width: 25px;
height: 25px;
line-height: 25px;
text-align: center;
border-radius: 25px; */
/* background-color: #d89a7c;
color: #fff; */
}
.person-info-del button{
width: 32px !important;
height: 32px !important;
border-radius: 32px !important;
}
.person-info-item {
color: #5e564b;
font-size: 28rpx;
font-family: '宋体';
}
.person-info-item .info-item-label {
padding: 15rpx;
padding-left: 20rpx;
color: #5e564b;
margin: 10rpx 0;
/* background-color: red; */
}
.person-info-item .info-item-value {
background-color: #fffcf7;
padding: 20rpx;
border-radius: 8rpx;
box-sizing: border-box;
margin-bottom: 10rpx;
}
/* 修改vant 的输入框样式 */
.person-info-item .info-item-value-input{
padding: 10rpx 20rpx!important;
color: #5e564b!important;
margin-bottom: 10rpx!important;
}
/* 修改vant 的输入框样式 */
.person-info-item .van-cell--borderless{
padding: 15rpx 20rpx !important;
background-color: #fffcf7;
}
/* 修改vant 的输入框样式 */
.van-field__placeholder{
color: #ece0d6!important;
}
.person-info-item .info-placeholder {
color: #ece0d6;
}
.add-person-button {
margin-top: 40rpx;
height: 84rpx;
border-radius: 40rpx;
border: 1px solid #d5c4b9;
overflow: hidden;
box-sizing: border-box;
}
.add-person-button .van-button__text {
color: #574f44;
font-size: 28rpx;
}
.add-person-button .van-button__icon {
color: #574f44;
}
/* .van-stepper{
background-color: #d89a7c;
} */
.van-stepper .van-stepper__plus,.van-stepper .van-stepper__minus{
background-color: #d89a7c;
color: #fff;
font-weight: 700;
}
.van-stepper .van-stepper__input{
background-color: #fffbf7;
margin: 0 20rpx ;
height: 80rpx;
border-radius: 8rpx;
}
.subscribe-footer {
position: fixed;
bottom: 0;
left: 0;
/* height: 100rpx; */
line-height: 60rpx;
width: 100%;
background-color: #fffcf7;
z-index: 999;
border-top: 1px solid #d5c4b9;
box-sizing: border-box;
padding: 20rpx 40rpx;
/* padding-bottom: 30rpx; */
display: flex;
justify-content: space-between;
}
.subscribe-footer .footer-text {
font-size: 28rpx;
}
.footer-text .person-num {
color: #d89a7d;
font-size: 36rpx;
font-weight: 700;
}
.subscribe-footer .footer-button {
border-radius: 8rpx;
box-sizing: border-box;
/* overflow: hidden; */
}
.subscribe-footer .footer-button .van-button__text {
color: #faf1ee;
font-size: 26rpx;
}
.subscribe-footer .footer-button button {
width: 200rpx;
height: 70rpx;
border-radius: 8rpx;
}
.reason-box {
height: 100px;
background-color: #f9f3ef;
box-sizing: border-box;
/* padding: 20rpx; */
border-radius: 8rpx;
margin-top: 10rpx;
}
.reason-input-placeholder {
color: #e7d7ca;
}
.reason-box .custom-class, .reason-box .van-cell{
/* padding:100rpx */
height: 100%;
background-color: #f9f3ef;
}
.reason-box .input-class{
color: red !important;
}
.reason-box .van-field__body--textarea,
.reason-box .van-field__control--textarea{
height: 100%!important;
}
/* 日历 */
.van-calendar{
background-color: #fffcf7;
}
.van-calendar .van-calendar__header-title{
font-size: 32rpx;
color: #574f44;
font-weight: 700;
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或