ss 9 mēneši atpakaļ
revīzija
3f388bdd22

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+unpackage
+.hbuilderx

+ 182 - 0
App.vue

@@ -0,0 +1,182 @@
+<script>
+	export default {
+		globalData: {  
+			serverUrl: 'https://mdyg.sdmingde.cn/api/h5/',
+			uploadServerUrl: 'https://mdyg.sdmingde.cn/api/h5/',
+			appId: 'wx2f0195c58ad8c3ec',
+			redirectUri: 'https://mdyg.sdmingde.cn/wap/visitor/#/pages/index/wechat',
+			storagePre: 'visit_',
+			host: 'https://mdyg.sdmingde.cn/wap/visitor/',
+			userinfo:{}
+		},
+		onLaunch: function() {
+			console.log('App Launch')
+			var app = getApp();
+			let token = uni.getStorageSync(app.globalData.storagePre+'token');
+			if(token){
+				app.globalData.userinfo.token = token;
+				app.globalData.userinfo.userId = uni.getStorageSync(app.globalData.storagePre+'userId');
+			}
+			// app.globalData.userinfo.token = '1914162463525';
+			// app.globalData.userinfo.userId = 1;
+
+		},
+		onShow: function() {
+			console.log('App Show')
+		},
+		onHide: function() {
+			console.log('App Hide')
+		},
+		methods: {
+			getUrlCode (name) {
+				return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null
+			},
+			checkLogin: function(){
+				
+				var app = getApp();
+				var token = app.globalData.userinfo.token;
+				if(!token){
+					let routes = getCurrentPages();
+					let curRoute = routes[routes.length - 1].route //获取当前页面路由
+					let curParam = routes[routes.length - 1].options; //获取路由参数
+					let orgId = curParam.orgId?curParam.orgId:0;
+					let type = curParam.type?curParam.type:0;
+					if(curRoute == 'pages/index/add'&&orgId > 0){
+						uni.reLaunch({ //关闭所有页面,跳转到闪屏页
+							url: '/pages/index/wechat?state=' + orgId + '_' + type
+						})
+					}else{
+						uni.reLaunch({ //关闭所有页面,跳转到闪屏页
+							url: '/pages/index/wechat'
+						})
+					}
+				}
+			},
+			checkCode:function(code){
+			    if(code == -100){
+					uni.showToast({
+						title: '登录超时,请重新登录',
+						icon: 'none',
+						duration: 2000
+					})
+					var app = getApp();
+					uni.removeStorageSync(app.globalData.storagePre+'token');
+					uni.removeStorageSync(app.globalData.storagePre+'userId');
+					setTimeout(function(){
+						uni.reLaunch({ //关闭所有页面,打开到应用内的某个页面
+							url: '/pages/index/wechat'
+						})
+					},2000);
+					return false;
+			    }
+			    return true;
+			},
+			ajax: function(params){
+			    if (!params.type) {
+					var type = 'POST';
+			    }else{
+					var type = params.type;
+			    }
+			    if (!params.apiname) {
+					var apiname = '1';
+			    } else {
+					var apiname = params.apiname;
+			    }
+			    if (!params.data) {
+					var data = [];
+			    }else{
+					var data = params.data;
+			    }
+			    var app = getApp();
+			    var token = app.globalData.userinfo.token;
+				var userId = app.globalData.userinfo.userId;
+		
+			    if (!token || token == undefined) { //未登录
+					uni.showToast({
+						title: '未登录',
+						icon: 'none',
+						duration: 2000
+					});
+					uni.removeStorageSync(app.globalData.storagePre+'token');
+					uni.removeStorageSync(app.globalData.storagePre+'userId');
+					setTimeout(function () {
+						uni.reLaunch({ //关闭所有页面,跳转到闪屏页
+							url: '/pages/index/wechat'
+						})
+					}, 2000);
+			      return false;
+			    }
+			    data['token'] = token;
+				data['userId'] = userId;
+		
+			    uni.showLoading({
+					title: '加载中',
+					mask: true
+			    });
+			    
+			    uni.request({
+					url: params.url,
+					data: data,
+					method: type,
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					success: function (res) {
+						uni.hideLoading();
+						uni.stopPullDownRefresh();
+						var ret = app.checkCode(res.data.code); //检查token是否失效
+						if(ret == false){
+							return false;
+						}
+			
+						if (res.data.code == 0) {
+							if (app.ajaxReadyCallback) { //在onShow中调用数据的,添加在onShow方法内,防止不同页面覆盖
+								res.data['apiname'] = apiname;
+								app.ajaxReadyCallback(res)
+							}
+						} else {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					},
+					fail: function (err) {
+						uni.hideLoading();
+						uni.showToast({
+							title: '请求失败',
+							icon: 'none',
+							duration: 2000
+						})
+					}
+			    })
+			}
+		}
+		
+		
+	}
+</script>
+
+<style>
+	/*每个页面公共css */
+	page{
+		background-color: #F3F3F3;
+	}
+	.no-data{
+		width: 100%;
+		height: auto;
+		margin: 0 auto;
+		margin-top: 20%;
+		text-align: center;
+	}
+	.no-data image{
+		width: 430rpx;
+		height: 316rpx;
+	}
+	.no-data .no-data-text{
+		color: #C5C8D9;
+		font-size: 25rpx;
+	}
+	
+</style>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
common/util/jweixin.js


+ 71 - 0
common/util/wechat.js

@@ -0,0 +1,71 @@
+var jweixin = require('./jweixin.js');
+
+var serverUrl = "https://mdyg.sdmingde.cn/api/h5/";
+
+export default {
+    //判断是否在微信中
+    isWechat: function() {
+        var ua = window.navigator.userAgent.toLowerCase();
+        if (ua.match(/micromessenger/i) == 'micromessenger') {
+            // console.log('是微信客户端')
+            return true;
+        } else {
+            // console.log('不是微信客户端')
+            return false;
+        }
+    },
+    initJssdk:function(callback){
+		var surl = encodeURIComponent(window.location.href.split('#')[0]); // 当前地址
+		uni.request({
+		    url: serverUrl + 'Oauth/jssdk',
+			data: {url:surl},
+			method: 'POST',
+			header: {
+				'content-type': 'application/x-www-form-urlencoded'
+			},
+		    success: function (res) {
+		        console.log(res)
+		        if(res.data.code == 0) {					
+					jweixin.config({
+					    debug: res.data.data.debug,
+					    appId: res.data.data.appid,
+					    timestamp: res.data.data.timestamp,
+					    nonceStr: res.data.data.noncestr,
+					    signature: res.data.data.signature,
+					    jsApiList: res.data.data.jsapilist,
+					});
+					//配置完成后,再执行分享等功能
+					if (callback) {
+					    callback(res.data);
+					}
+		        }
+		    },
+			fail: function (err) {
+				console.log(err);
+			}
+		})
+    },
+    //在需要定位页面调用
+    location: function(callback) {
+        if (!this.isWechat()) {
+            console.log('不是微信客户端')
+            return;
+        }
+
+        this.initJssdk(function(res) {
+            jweixin.ready(function() {
+                console.info('定位ready')
+                jweixin.getLocation({
+                    type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
+                    success: function (res) {
+                        console.log(res);
+                        callback(res)
+                    },
+                    fail:function(res){
+                        console.log(res)
+                    },
+                });
+            });
+        });
+    }
+}

+ 96 - 0
components/uni-icons/icons.js

@@ -0,0 +1,96 @@
+export default {
+	'contact': '\ue100',
+	'person': '\ue101',
+	'personadd': '\ue102',
+	'contact-filled': '\ue130',
+	'person-filled': '\ue131',
+	'personadd-filled': '\ue132',
+	'phone': '\ue200',
+	'email': '\ue201',
+	'chatbubble': '\ue202',
+	'chatboxes': '\ue203',
+	'phone-filled': '\ue230',
+	'email-filled': '\ue231',
+	'chatbubble-filled': '\ue232',
+	'chatboxes-filled': '\ue233',
+	'weibo': '\ue260',
+	'weixin': '\ue261',
+	'pengyouquan': '\ue262',
+	'chat': '\ue263',
+	'qq': '\ue264',
+	'videocam': '\ue300',
+	'camera': '\ue301',
+	'mic': '\ue302',
+	'location': '\ue303',
+	'mic-filled': '\ue332',
+	'speech': '\ue332',
+	'location-filled': '\ue333',
+	'micoff': '\ue360',
+	'image': '\ue363',
+	'map': '\ue364',
+	'compose': '\ue400',
+	'trash': '\ue401',
+	'upload': '\ue402',
+	'download': '\ue403',
+	'close': '\ue404',
+	'redo': '\ue405',
+	'undo': '\ue406',
+	'refresh': '\ue407',
+	'star': '\ue408',
+	'plus': '\ue409',
+	'minus': '\ue410',
+	'circle': '\ue411',
+	'checkbox': '\ue411',
+	'close-filled': '\ue434',
+	'clear': '\ue434',
+	'refresh-filled': '\ue437',
+	'star-filled': '\ue438',
+	'plus-filled': '\ue439',
+	'minus-filled': '\ue440',
+	'circle-filled': '\ue441',
+	'checkbox-filled': '\ue442',
+	'closeempty': '\ue460',
+	'refreshempty': '\ue461',
+	'reload': '\ue462',
+	'starhalf': '\ue463',
+	'spinner': '\ue464',
+	'spinner-cycle': '\ue465',
+	'search': '\ue466',
+	'plusempty': '\ue468',
+	'forward': '\ue470',
+	'back': '\ue471',
+	'left-nav': '\ue471',
+	'checkmarkempty': '\ue472',
+	'home': '\ue500',
+	'navigate': '\ue501',
+	'gear': '\ue502',
+	'paperplane': '\ue503',
+	'info': '\ue504',
+	'help': '\ue505',
+	'locked': '\ue506',
+	'more': '\ue507',
+	'flag': '\ue508',
+	'home-filled': '\ue530',
+	'gear-filled': '\ue532',
+	'info-filled': '\ue534',
+	'help-filled': '\ue535',
+	'more-filled': '\ue537',
+	'settings': '\ue560',
+	'list': '\ue562',
+	'bars': '\ue563',
+	'loop': '\ue565',
+	'paperclip': '\ue567',
+	'eye': '\ue568',
+	'arrowup': '\ue580',
+	'arrowdown': '\ue581',
+	'arrowleft': '\ue582',
+	'arrowright': '\ue583',
+	'arrowthinup': '\ue584',
+	'arrowthindown': '\ue585',
+	'arrowthinleft': '\ue586',
+	'arrowthinright': '\ue587',
+	'pulldown': '\ue588',
+	'closefill': '\ue589',
+	'sound': '\ue590',
+	'scan': '\ue612'
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 57 - 0
components/uni-icons/uni-icons.vue


+ 224 - 0
components/uni-nav-bar/uni-nav-bar.vue

@@ -0,0 +1,224 @@
+<template>
+	<view class="uni-navbar">
+		<view :class="{ 'uni-navbar--fixed': fixed, 'uni-navbar--shadow': shadow, 'uni-navbar--border': border }" :style="{ 'background-color': backgroundColor }"
+		 class="uni-navbar__content">
+			<uni-status-bar v-if="statusBar" />
+			<view :style="{ color: color,backgroundColor: backgroundColor }" class="uni-navbar__header uni-navbar__content_view">
+				<view @tap="onClickLeft" class="uni-navbar__header-btns uni-navbar__header-btns-left uni-navbar__content_view">
+					<view class="uni-navbar__content_view" v-if="leftIcon.length">
+						<uni-icons :color="color" :type="leftIcon" size="24" />
+					</view>
+					<view :class="{ 'uni-navbar-btn-icon-left': !leftIcon.length }" class="uni-navbar-btn-text uni-navbar__content_view"
+					 v-if="leftText.length">
+						<text :style="{ color: color, fontSize: '14px' }">{{ leftText }}</text>
+					</view>
+					<slot name="left" />
+				</view>
+				<view class="uni-navbar__header-container uni-navbar__content_view">
+					<view class="uni-navbar__header-container-inner uni-navbar__content_view" v-if="title.length">
+						<text class="uni-nav-bar-text" :style="{color: color }">{{ title }}</text>
+					</view>
+					<!-- 标题插槽 -->
+					<slot />
+				</view>
+				<view :class="title.length ? 'uni-navbar__header-btns-right' : ''" @tap="onClickRight" class="uni-navbar__header-btns uni-navbar__content_view">
+					<view class="uni-navbar__content_view" v-if="rightIcon.length">
+						<uni-icons :color="color" :type="rightIcon" size="24" />
+					</view>
+					<!-- 优先显示图标 -->
+					<view class="uni-navbar-btn-text uni-navbar__content_view" v-if="rightText.length && !rightIcon.length">
+						<text class="uni-nav-bar-right-text">{{ rightText }}</text>
+					</view>
+					<slot name="right" />
+				</view>
+			</view>
+		</view>
+		<view class="uni-navbar__placeholder" v-if="fixed">
+			<uni-status-bar v-if="statusBar" />
+			<view class="uni-navbar__placeholder-view" />
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniStatusBar from "../uni-status-bar/uni-status-bar.vue";
+	import uniIcons from "../uni-icons/uni-icons.vue";
+
+	export default {
+		name: "UniNavBar",
+		components: {
+			uniStatusBar,
+			uniIcons
+		},
+		props: {
+			title: {
+				type: String,
+				default: ""
+			},
+			leftText: {
+				type: String,
+				default: ""
+			},
+			rightText: {
+				type: String,
+				default: ""
+			},
+			leftIcon: {
+				type: String,
+				default: ""
+			},
+			rightIcon: {
+				type: String,
+				default: ""
+			},
+			fixed: {
+				type: [Boolean, String],
+				default: false
+			},
+			color: {
+				type: String,
+				default: "#000000"
+			},
+			backgroundColor: {
+				type: String,
+				default: "#FFFFFF"
+			},
+			statusBar: {
+				type: [Boolean, String],
+				default: false
+			},
+			shadow: {
+				type: [String, Boolean],
+				default: false
+			},
+			border: {
+				type: [String, Boolean],
+				default: true
+			}
+		},
+        mounted() {
+          if(uni.report && this.title !== '') {
+              uni.report('title', this.title)
+          }
+        },
+		methods: {
+			onClickLeft() {
+				this.$emit("clickLeft");
+			},
+			onClickRight() {
+				this.$emit("clickRight");
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	$nav-height: 44px;
+	.uni-nav-bar-text {
+		/* #ifdef APP-PLUS */
+		font-size: 34rpx;
+		/* #endif */
+		/* #ifndef APP-PLUS */
+		font-size: $uni-font-size-lg;
+		/* #endif */
+	}
+	.uni-nav-bar-right-text {
+		font-size: $uni-font-size-base;
+	}
+
+	.uni-navbar {
+		width: 750rpx;
+	}
+
+	.uni-navbar__content {
+		position: relative;
+		width: 750rpx;
+		background-color: $uni-bg-color;
+		overflow: hidden;
+	}
+
+	.uni-navbar__content_view {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		align-items: center;
+		flex-direction: row;
+		// background-color: #FFFFFF;
+	}
+
+	.uni-navbar__header {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		width: 750rpx;
+		height: $nav-height;
+		line-height: $nav-height;
+		font-size: 16px;
+		// background-color: #ffffff;
+	}
+
+	.uni-navbar__header-btns {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-wrap: nowrap;
+		width: 120rpx;
+		padding: 0 6px;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.uni-navbar__header-btns-left {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		width: 150rpx;
+		justify-content: flex-start;
+	}
+
+	.uni-navbar__header-btns-right {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		width: 150rpx;
+		padding-right: 30rpx;
+		justify-content: flex-end;
+	}
+
+	.uni-navbar__header-container {
+		flex: 1;
+	}
+
+	.uni-navbar__header-container-inner {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		align-items: center;
+		justify-content: center;
+		font-size: $uni-font-size-base;
+	}
+
+
+	.uni-navbar__placeholder-view {
+		height: $nav-height;
+	}
+
+	.uni-navbar--fixed {
+		position: fixed;
+		z-index: 998;
+	}
+
+	.uni-navbar--shadow {
+		/* #ifndef APP-NVUE */
+		box-shadow: 0 1px 6px #ccc;
+		/* #endif */
+	}
+
+	.uni-navbar--border {
+		border-bottom-width: 1rpx;
+		border-bottom-style: solid;
+		border-bottom-color: $uni-border-color;
+	}
+</style>

+ 25 - 0
components/uni-status-bar/uni-status-bar.vue

@@ -0,0 +1,25 @@
+<template>
+	<view :style="{ height: statusBarHeight }" class="uni-status-bar">
+		<slot />
+	</view>
+</template>
+
+<script>
+	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'
+	export default {
+		name: 'UniStatusBar',
+		data() {
+			return {
+				statusBarHeight: statusBarHeight
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-status-bar {
+		width: 750rpx;
+		height: 20px;
+		// height: var(--status-bar-height);
+	}
+</style>

BIN
images/no_data.png


BIN
images/qrcode.png


BIN
images/tongxingma.png


BIN
images/xiangyou.png


BIN
images/yishiyong.png


BIN
images/yiyuyue.png


BIN
images/yuyuebtn.png


+ 16 - 0
main.js

@@ -0,0 +1,16 @@
+import Vue from 'vue'
+import App from './App'
+
+import wechat from './common/util/wechat'
+if(wechat.isWechat()){
+    Vue.prototype.$wechat = wechat;
+}
+
+Vue.config.productionTip = false
+
+App.mpType = 'app'
+
+const app = new Vue({
+    ...App
+})
+app.$mount()

+ 98 - 0
manifest.json

@@ -0,0 +1,98 @@
+{
+    "name" : "访客预约",
+    "appid" : "__UNI__CB76DE7",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "h5" : {
+        "title" : "访客预约",
+        "router" : {
+            "mode" : "hash",
+            "base" : "/wap/visitor/"
+        },
+        "devServer" : {
+            "https" : false,
+            "port" : 80
+        },
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : true
+            }
+        },
+        "sdkConfigs" : {
+            "maps" : {}
+        },
+        "domain" : "http://h5.bosenzhihui.com"
+    }
+}

+ 47 - 0
pages.json

@@ -0,0 +1,47 @@
+{
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/index/index",
+			"style": {
+				"navigationBarTitleText": "访客预约",
+				"enablePullDownRefresh": true,
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/index/wechat",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/index/add",
+			"style": {
+				"navigationBarTitleText": "预约信息",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/index/detail",
+			"style": {
+				"navigationBarTitleText": "通行码",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		}
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "white",
+		"navigationBarTitleText": "访客预约",
+		"navigationBarBackgroundColor": "#089875",
+		"backgroundColor": "#089875"
+	}
+}

+ 391 - 0
pages/index/add.vue

@@ -0,0 +1,391 @@
+<template>
+	<view class="box">
+		<view class="address-box" v-if="defaultOrg == 0 || (defaultOrg > 0 && type == 1)">
+			<view class="address-box-list">
+				<view class="address-box-label">
+					项目名称
+				</view>
+				<view class="address-box-input">
+					<picker v-if="orgs.length > 0" disabled="true" @change="bindPickerChange" :value="orgIndex" :range="orgs" range-key="name">
+						<text class="address-box-input-text">{{orgs[orgIndex].name}}</text>
+						<image class="address-box-input-icon" src="../../images/xiangyou.png"></image>
+					</picker>
+				</view>
+			</view>
+			<view class="address-box-list">
+				<view class="address-box-label">
+					项目服务
+				</view>
+				<view class="address-box-input">
+					<picker v-if="serves.length > 0" @change="bindPickerServeChange" :value="serveIndex" :range="serves" range-key="title">
+						<text class="address-box-input-text">{{serves[serveIndex].title}}</text>
+						<image class="address-box-input-icon" src="../../images/xiangyou.png"></image>
+					</picker>
+				</view>
+			</view>
+			<view class="address-box-list">
+				<view class="address-box-label">
+					预约日期
+				</view>
+				<view class="address-box-input">
+					<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
+						<text class="address-box-input-text">{{date}}</text>
+						<image class="address-box-input-icon" src="../../images/xiangyou.png"></image>
+					</picker>
+				</view>
+			</view>
+			<view class="address-box-list">
+				<view class="address-box-label">
+					预约时间段
+				</view>
+				<view class="address-box-input">
+					<picker v-if="times.length > 0" @change="bindPickerTimeChange" :value="timeIndex" :range="times" range-key="name">
+						<text class="address-box-input-text">{{times[timeIndex].name}}</text>
+						<image class="address-box-input-icon" src="../../images/xiangyou.png"></image>
+					</picker>
+				</view>
+			</view>
+		</view>
+		
+		<view class="address-box">
+			<view class="address-box-list">
+				<view class="address-box-label">
+					预约人姓名
+				</view>
+				<view class="address-box-input">
+					<input v-model="name" placeholder="请输入" type="text">
+				</view>
+			</view>
+			<view class="address-box-list">
+				<view class="address-box-label">
+					手机号码
+				</view>
+				<view class="address-box-input">
+					<input v-model="phone" placeholder="请输入" type="tel">
+				</view>
+			</view>
+		</view>
+		
+		<view class="address-btn" @click="saveBtn">
+			提 交
+		</view>
+		<view class="address-btn2" @click="saveBtn2">
+			我的记录
+		</view>
+	</view>
+</template>
+
+<script>
+	var app = getApp();
+	function getDate(type) {
+		const date = new Date();
+	
+		let year = date.getFullYear();
+		let month = date.getMonth() + 1;
+		let day = date.getDate();
+	
+		if (type === 'start') {
+			year = year - 60;
+		} else if (type === 'end') {
+			year = year + 2;
+		}
+		month = month > 9 ? month : '0' + month;;
+		day = day > 9 ? day : '0' + day;
+	
+		return `${year}-${month}-${day}`;
+	}
+	export default {
+		data() {
+			return {
+				id: 0,
+				defaultOrg: 0,
+				type: 0,
+				orgs: [],
+				orgIndex: 0,
+				serves: [],
+				serveIndex: 0,
+				date: getDate({
+					format: true
+				}),
+				startDate:getDate('start'),
+				endDate:getDate('end'),
+				times: [],
+				timeIndex: 0,
+				name: '',
+				phone: ''
+			}
+		},
+		onLoad(option) {
+			app.checkLogin();
+			
+			this.defaultOrg = option.orgId ? option.orgId : 0;
+			this.type = option.type ? option.type : 0;
+			console.log(this.defaultOrg,this.type);
+			if(!this.defaultOrg){
+				this.getOrgs();
+			}else{
+				if(this.type == 1){ //预约
+					this.getOrgs();
+				}else{//现场登记
+					uni.setNavigationBarTitle({
+					    title: '现场登记'
+					});
+					uni.setStorageSync(app.globalData.storagePre+'orgId', this.defaultOrg);
+				}
+				
+			}
+		},
+		onShow() {
+			var that = this;
+			app.ajaxReadyCallback = res => {  //各个接口统一回调方法
+				var apiname = res.data.apiname;
+				console.log(res);
+				if(apiname == 'org'){
+					that.orgs = res.data.data;
+					if(that.defaultOrg && that.type == 1){
+						if(that.orgs.length > 0){
+							that.orgs.forEach((item,index) => {
+								if(item.id.toString() == that.defaultOrg.toString()){
+									that.orgIndex = index;
+								}
+							})
+						}
+					}else{
+						that.orgIndex = 0;
+					}
+					if(that.orgs.length > 0){
+						that.getService();
+					}
+				} else if(apiname == 'service'){
+					that.serves = res.data.data;
+					that.serveIndex = 0;
+					if(that.serves.length > 0){
+						that.getServiceTime();
+					}
+				} else if(apiname == 'serviceTime'){
+					that.times = [];
+					that.timeIndex = 0;
+					res.data.data.forEach((item) => {
+						that.times.push({
+							id: item.id,
+							name: item.start + '~' + item.end
+						});
+					})
+				} else if(apiname == 'order'){
+					uni.showToast({
+						title: '提交成功',
+						icon: 'none',
+						duration: 2000
+					});
+					setTimeout(function(){
+						uni.navigateTo({
+						    url: '/pages/index/index'
+						});
+					},1000);
+				}
+					
+			}
+		},
+		methods: {
+			getUrlCode (name) {
+				return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null
+			},
+			bindPickerChange: function(e) {
+				console.log('picker发送选择改变,携带值为:' + e.detail.value)
+				this.orgIndex = e.detail.value;
+				this.getService();
+			},
+			bindPickerServeChange: function(e) {
+				console.log('bindPickerServeChange发送选择改变,携带值为:' + e.detail.value)
+				this.serveIndex = e.detail.value;
+				this.getServiceTime();
+			},
+			bindPickerTimeChange: function(e) {
+				console.log('bindPickerTimeChange发送选择改变,携带值为:' + e.detail.value)
+				this.timeIndex = e.detail.value;
+			},
+			bindDateChange: function(e) {
+				console.log('bindDateChange发送选择改变,携带值为:' + e.detail.value)
+				this.date = e.detail.value;
+				this.getServiceTime();
+			},
+			getOrgs(){
+				this.serves = [];
+				this.serveIndex = 0;
+				this.times = [];
+				this.timeIndex = 0;
+				app.ajax({
+					url: app.globalData.serverUrl + 'org/lists',
+					type: 'POST',
+					apiname: 'org'
+				});
+			},
+			getService(){
+				this.times = [];
+				this.timeIndex = 0;
+				const orgId = this.orgs[this.orgIndex].id;
+				app.ajax({
+					url: app.globalData.serverUrl + 'service/list',
+					type: 'POST',
+					apiname: 'service',
+					data: {
+						orgId: orgId
+					}
+				});
+			},
+			getServiceTime(){
+				const serviceId = this.serves[this.serveIndex].id;
+				const orgId = this.orgs[this.orgIndex].id;
+				app.ajax({
+					url: app.globalData.serverUrl + 'service/times',
+					type: 'POST',
+					apiname: 'serviceTime',
+					data: {
+						serviceId: serviceId,
+						day: this.date,
+						orgId: orgId
+					}
+				});
+			},
+			saveBtn(){
+				let serviceTimeId = 0;
+				if(this.times[this.timeIndex]){
+					serviceTimeId = this.times[this.timeIndex].id;
+				}
+				let orgId = 0;
+				if(this.orgs[this.orgIndex]){
+					orgId = this.orgs[this.orgIndex].id;
+				}
+				
+				let param = {
+					type: this.defaultOrg==0?1:2,
+					serviceTimeId: serviceTimeId,
+					name: this.name,
+					phone: this.phone,
+					orgId: orgId
+				}
+				if(this.defaultOrg){
+					param.orgId = this.defaultOrg;
+				}
+				if(!this.name){
+					uni.showToast({
+						title: '请输入姓名',
+						icon: 'none',
+						duration: 2000
+					})
+					return;
+				}
+				if(!this.phone){
+					uni.showToast({
+						title: '请输入手机号',
+						icon: 'none',
+						duration: 2000
+					})
+					return;
+				}
+				
+				app.ajax({
+					url: app.globalData.serverUrl + 'visitorOrder/order',
+					type: 'POST',
+					apiname: 'order',
+					data: param
+				});
+			},
+			saveBtn2(){
+				uni.reLaunch({ //关闭所有页面,跳转到闪屏页
+					url: '/pages/index/index'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.box{
+		padding: 20rpx;
+	}
+	.address-box{
+		
+		// padding: 0 20rpx;
+		margin-bottom: 20rpx;
+	}
+	.address-box-list{
+		height: 100rpx;
+		line-height: 100rpx;
+		border-bottom: 1rpx solid #f2f2f2;
+		padding: 0 20rpx;
+		border-radius: 8rpx;
+		background-color: #FFFFFF;
+	}
+	.address-box-list:last-child{
+		border: 0;
+	}
+	.address-box-label{
+		display: inline-block;
+		width: 200rpx;
+		height: 100%;
+		float: left;
+	}
+	.address-box-input{
+		display: inline-block;
+		width: 460rpx;
+		height: 100%;
+		float: right;
+		text-align: right;
+	}
+	.address-box-input input{
+		height: 80rpx;
+		line-height: 80rpx;
+		margin-top: 10rpx;
+		font-size: 28rpx;
+		vertical-align: middle;
+	}
+	.address-box-input-text{
+		display: inline-block;
+		width: 430rpx;
+		line-height: 100%;
+		vertical-align: middle;
+		color: #949494;
+		padding-right: 18rpx;
+		font-size: 28rpx;
+	}
+	.address-box-input-icon{
+		width: 12rpx;
+		height: 22rpx;
+		vertical-align: middle;
+	}
+	
+	.address-btn{
+		width: 700rpx;
+		height: 70rpx;
+		line-height: 70rpx;
+		color: #FFFFFF;
+		background-color: $theme-color;
+		border-radius: 10rpx;
+		margin: 50rpx auto 20rpx auto;
+		text-align: center;
+	}
+	
+	.address-btn2{
+		width: 700rpx;
+		height: 70rpx;
+		line-height: 70rpx;
+		color: $theme-color;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+		margin: 20rpx auto;
+		text-align: center;
+	}
+	
+	.address-btn-del{
+		width: 700rpx;
+		height: 70rpx;
+		line-height: 70rpx;
+		color: $theme-color;
+		background-color: #FFFFFF;
+		border: 1rpx solid $theme-color;
+		border-radius: 10rpx;
+		margin: 10rpx auto;
+		text-align: center;
+	}
+</style>

+ 99 - 0
pages/index/detail.vue

@@ -0,0 +1,99 @@
+<template>
+	<view class="box">
+		<image class="box-img" src="../../images/tongxingma.png"></image>
+		<view class="box-info">
+			<view class="box-info-title">您的通行码</view>
+			<view class="box-info-img">
+				<image v-if="info" class="box-info-qrcode" :src="info.qrcode"></image>
+			</view>
+			<view class="box-info-desc">请持通行码至保安人员认证通过哦~</view>
+			<view class="box-info-org" v-if="info">{{info.orgName}}</view>
+			<view class="box-info-greet">欢迎您</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	var app = getApp();
+	
+	export default {
+		data() {
+			return {
+				info: null
+			}
+		},
+		onLoad() {
+			var that = this;
+			const eventChannel = this.getOpenerEventChannel()
+			// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
+			eventChannel.on('acceptDataFromOpenerPage', function(data) {
+				that.info = data;
+			})
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page{
+		background-color: $theme-color;
+	}
+	.box{
+		position: relative;
+		width: 100%;
+		height: 100%;
+	}
+	.box-img{
+		display: block;
+		width: 642rpx;
+		height: 974rpx;
+		margin: 0 auto;
+	}
+	.box-info{
+		position: absolute;
+		z-index: 100;
+		width: 750rpx;
+		left: 0;
+		top: 0;
+		bottom: 0;
+		text-align: center;
+	}
+	
+	
+	.box-info-title{
+		font-size: 28rpx;
+		color: $theme-color;
+		font-weight: blod;
+		margin-top: 160rpx;
+	}
+	.box-info-img{
+		width: 324rpx;
+		height: 324rpx;
+		border: 1rpx solid #CCCCCC;
+		margin: 0 auto;
+		border-radius: 40rpx;
+		padding: 19rpx;
+		margin-top: 20rpx;
+		margin-bottom: 10rpx;
+	}
+	.box-info-qrcode{
+		width: 314rpx;
+		height: 314rpx;
+	}
+	.box-info-desc{
+		color: #8C8C8C;
+		font-size: 24rpx;
+	}
+	.box-info-org{
+		color: $theme-color;
+		font-size: 50rpx;
+		margin-top: 60rpx;
+	}
+
+	.box-info-greet{
+		color: $theme-color;
+		font-size: 140rpx;
+	}	
+</style>

+ 194 - 0
pages/index/index.vue

@@ -0,0 +1,194 @@
+<template>
+	<view class="box">
+		<view v-for="(item,index) in list" :key="index" class="box-list" @click="goDetail(item)">
+			<image v-if="item.status == 1" class="box-list-icon" src="../../images/yiyuyue.png"></image>
+			<image v-if="item.status == 2" class="box-list-icon" src="../../images/yishiyong.png"></image>
+			<view class="box-list-left">
+				<view class="box-list-org">{{item.orgName}}</view>
+				<view class="box-list-serve">{{item.title}}</view>
+				<view class="box-list-date">{{item.day}}  {{item.start}}-{{item.end}}</view>
+			</view>
+			<view class="box-list-right">
+				<view v-if="item.status == 0" class="box-btn">待审核</view>
+				<view v-if="item.status == 1" class="box-btn box-btn-use">已预约</view>
+				<view v-if="item.status == 2" class="box-btn">已使用</view>
+				<view v-if="item.status == 3" class="box-btn">已过期</view>
+				<view v-if="item.status == 4" class="box-btn">已拒绝</view>
+			</view>
+		</view>
+		<!-- <view class="box-list">
+			<image class="box-list-icon" src="../../images/yishiyong.png"></image>
+			<view class="box-list-left">
+				<view class="box-list-org">中国银行</view>
+				<view class="box-list-serve">行政楼501人事部</view>
+				<view class="box-list-date">2021-1-26  15:00-16:00</view>
+			</view>
+			<view class="box-list-right">
+				<view class="box-btn">已使用</view>
+			</view>
+		</view> -->
+		
+		<view v-if="list.length == 0" class="no-data">
+			<image src="../../images/no_data.png" mode=""></image>
+			<view class="no-data-text">
+				空空如也~
+			</view>
+		</view>
+		
+		<image src="../../images/yuyuebtn.png" class="yuyue-btn" @click="goAdd"></image>
+	</view>
+</template>
+
+<script>
+	var app = getApp();
+	export default {
+		data() {
+			return {
+				list: [],
+				page: 1,
+				size: 10,
+				flag: 0
+			}
+		},
+		onLoad() {
+			app.checkLogin();
+		},
+		onShow() {
+			var that = this;
+			app.ajaxReadyCallback = res => {  //各个接口统一回调方法
+				var apiname = res.data.apiname;
+				console.log(res);
+				if(apiname == 'order'){
+					that.list = res.data.data;
+					if (that.list.length < that.size) {
+						that.flag = 1;
+					} else {
+						that.page++;
+					}
+				}
+			}
+			
+			this.flag = 0;
+			this.page = 1;
+			this.getOrder();
+		},
+		onPullDownRefresh() {
+			this.flag = 0;
+			this.page = 1;
+			this.getOrder();
+		},
+		onReachBottom() { //上拉加载
+		    this.getOrder();
+		},
+		methods: {
+			goAdd(){
+				uni.navigateTo({
+				    url: '/pages/index/add'
+				});
+			},
+			goDetail(obj){
+				var that = this;
+				uni.navigateTo({
+					url: '/pages/index/detail',
+					success: function(res) {
+						// 通过eventChannel向被打开页面传送数据
+						res.eventChannel.emit('acceptDataFromOpenerPage', obj);
+					}
+				})
+			},
+			getOrder(){
+				if(this.flag == 1){
+					return;
+				}
+				app.ajax({
+					url: app.globalData.serverUrl + 'visitorOrder/list',
+					type: 'POST',
+					apiname: 'order',
+					data: {
+						page: this.page,
+						size: this.size
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page{
+		// background-color: #FFFFFF;
+	}
+	.box{
+		padding: 20rpx;
+	}
+	.box-list{
+		width: 670rpx;
+		height: 120rpx;
+		background-color: #FFFFFF;
+		border-radius: 8rpx;
+		position: relative;
+		padding: 20rpx;
+		margin-bottom: 10rpx;
+	}
+	.box-list-icon{
+		position: absolute;
+		z-index: 10;
+		left: 0;
+		top: 0;
+		display: inline-block;
+		width: 28rpx;
+		height: 28rpx;
+	}
+	.box-list-left{
+		display: inline-block;
+		width: 520rpx;
+		height: 120rpx;
+		float: left;
+	}
+	.box-list-right{
+		display: inline-block;
+		width: 132rpx;
+		height: 120rpx;
+		line-height: 120rpx;
+		float: right;
+	}
+	.box-btn{
+		display: inline-block;
+		width: 132rpx;
+		height: 48rpx;
+		line-height: 48rpx;
+		text-align: center;
+		border-radius: 24rpx;
+		vertical-align: middle;
+		background-color: #DFDFDF;
+		border: 1rpx solid #949494;
+		color: #949494;
+		font-size: 28rpx;
+	}
+	.box-btn.box-btn-use{
+		color: #FFB145;
+		background-color: #FFE5C0;
+		border: 1rpx solid #FFB145;
+	}
+	
+	.box-list-org{
+		color: #333333;
+		font-size: 32rpx;
+		font-weight: 500;
+	}
+	.box-list-serve,.box-list-date{
+		color: #949494;
+		font-size: 28rpx;
+		font-weight: 500;
+	}
+	.yuyue-btn{
+		width: 171rpx;
+		height: 171rpx;
+		display: inline-block;
+		position: fixed;
+		z-index: 1000;
+		right: 32rpx;
+		bottom: 167rpx;
+		border-radius: 50%;
+	}
+</style>

+ 123 - 0
pages/index/wechat.vue

@@ -0,0 +1,123 @@
+<template>
+	<view>
+		<view v-if="msg" class="error-box">
+			{{msg}}
+		</view>
+		<view v-if="msg" class="order-btn" @click="goBack">返回</view>
+	</view>
+</template>
+
+<script>
+	var app = getApp();
+	export default {
+		data() {
+			return {
+				state: 0
+			}
+		},
+		onLoad(option) {
+			this.state = this.getUrlCode('state');
+			let code = this.getUrlCode('code')
+			if(code) {
+				this.getOpenidAndUserinfo(code)
+			}else{
+				this.getCode ();
+			}
+		
+		},
+		methods: {
+			getCode () {
+				if(this.isWechat()) {
+					// 截取地址中的code,如果没有code就去微信授权,如果已经获取到code了就直接把code传给后台获取openId
+					let code = this.getUrlCode('code')
+					if (code === null || code === '') {
+						window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+app.globalData.appId+'&redirect_uri=' + encodeURIComponent(app.globalData.redirectUri) + '&response_type=code&scope=snsapi_userinfo&state='+this.state+'#wechat_redirect'
+						// redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code,这里需要用encodeURIComponent对链接进行处理。
+						// 如果配置参数一一对应,那么此时已经通过回调地址刷新页面后,你就会再地址栏中看到code了。
+						// http://127.0.0.1/pages/views/profile/login/login?code=001BWV4J1lRzz00H4J1J1vRE4J1BWV4q&state=1
+					}
+				}
+			},
+			
+			getUrlCode (name) {
+				return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null
+			},
+			
+			isWechat() {
+				return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
+			},
+			
+			getOpenidAndUserinfo(code) {
+				let that = this;
+			    uni.request({
+			        url: app.globalData.serverUrl + 'Oauth/checkCode',
+					data: {code: code},
+					method: 'GET',
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+			        success: function (res) {
+			            console.log('通过code获取openid和accessToken', res)
+			            if(res.data.code == 0) {
+							var app = getApp();
+			                uni.setStorageSync(app.globalData.storagePre+'token', res.data.data.token);
+			                uni.setStorageSync(app.globalData.storagePre+'userId', res.data.data.userId);
+			                app.globalData.userinfo.token = res.data.data.token;
+			                app.globalData.userinfo.userId = res.data.data.userId;
+							
+							if(that.state){
+								// uni.reLaunch({ //关闭所有页面,跳转到闪屏页
+								// 	url: '/pages/index/add?orgId=' + that.state,
+								// })
+								var arr = that.state.split('_');
+								let orgId = arr[0];
+								let type = arr.length > 1?arr[1]:0;
+								window.location.href = app.globalData.host + '#/pages/index/add?orgId='+orgId+'&type='+type;
+							}else{
+								// uni.reLaunch({ //关闭所有页面,跳转到闪屏页
+								// 	url: '/pages/index/index'
+								// })
+								window.location.href = app.globalData.host;
+							}
+			            }else{
+							that.msg = res.data.message;
+						}
+			        },
+					fail: function (err) {
+						console.log(err);
+						that.msg = '登录失败';
+					}
+			    })
+			},
+			
+			goBack(){
+				uni.reLaunch({ //关闭所有页面,跳转到闪屏页
+					url: '/pages/index/wechat'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.error-box{
+		font-size: 40rpx;
+		color: #333333;
+		text-align: center;
+		margin-top: 180rpx;
+		margin-bottom: 80rpx;
+	}
+	
+	.order-btn{
+		width: 673rpx;
+		height: 72rpx;
+		border-radius: 10rpx;
+		color: #FFFFFF;
+		background-color: $theme-color;
+		line-height: 72rpx;
+		font-size: 38rpx;
+		text-align: center;
+		margin: 0 auto;
+		margin-top: 40rpx;
+	}
+</style>

BIN
static/logo.png


+ 78 - 0
uni.scss

@@ -0,0 +1,78 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:24rpx;
+$uni-font-size-base:28rpx;
+$uni-font-size-lg:32rpx;
+
+/* 图片尺寸 */
+$uni-img-size-sm:40rpx;
+$uni-img-size-base:52rpx;
+$uni-img-size-lg:80rpx;
+
+/* Border Radius */
+$uni-border-radius-sm: 4rpx;
+$uni-border-radius-base: 6rpx;
+$uni-border-radius-lg: 12rpx;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 10px;
+$uni-spacing-row-base: 20rpx;
+$uni-spacing-row-lg: 30rpx;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 8rpx;
+$uni-spacing-col-base: 16rpx;
+$uni-spacing-col-lg: 24rpx;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:40rpx;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:36rpx;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:30rpx;
+
+$theme-color: #023894; // 主题色