第一次提交

This commit is contained in:
曹辉 2022-10-12 16:54:34 +08:00
commit 2acdb465b9
25 changed files with 777 additions and 0 deletions

17
App.vue Normal file
View File

@ -0,0 +1,17 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>

2
api/baseurl.js Normal file
View File

@ -0,0 +1,2 @@
var baseurl = "http://192.168.16.62:8080";
export default baseurl

44
api/request.js Normal file
View File

@ -0,0 +1,44 @@
import baseurl from './baseurl.js'
var request = function(config) {
return new Promise((resolve, rejected) => {
uni.request({
url: baseurl + config.url,
data: config.data,
method: config.method,
timeout: 5000,
// header: {
// token: uni.getStorageSync('token')
// },
success(res) {
// if (res.data.code == 20002) {
// uni.showModal({
// title: "登录提示",
// content: res.data.message,
// success(res1) {
// if (res1.confirm) {
// uni.navigateTo({
// url: '/pages/user/login/login'
// })
// }
// }
// })
// } else {
// if (res.data.success) {
resolve(res.data)
// } else {
// uni.showToast({
// title: res.data.message,
// icon: "none"
// })
// }
// }
},
fail(err) {
rejected(err)
}
})
})
}
export default request

20
index.html Normal file
View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>

21
main.js Normal file
View File

@ -0,0 +1,21 @@
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

72
manifest.json Normal file
View File

@ -0,0 +1,72 @@
{
"name" : "NurseStationApp",
"appid" : "__UNI__D6F049F",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "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.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.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<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.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<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
},
"vueVersion" : "2"
}

79
pages.json Normal file
View File

@ -0,0 +1,79 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/homepage/homepage",
"style": {
"navigationBarTitleText": "泉医到家",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/startup/startup",
"style": {
"navigationBarTitleText": "泉医到家",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
// "enablePullDownRefresh": false
}
}, {
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
}, {
"path": "pages/Personal/Personal",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/shopping/shopping",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#435950",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/homepage/homepage",
"iconPath": "static/首页@2x.png",
"selectedIconPath": "static/首页 拷贝@2x.png",
"text": "首页"
},
{
"pagePath": "pages/shopping/shopping",
"iconPath": "static/商城11 拷贝@2x.png",
"selectedIconPath": "static/商城11@2x.png",
"text": "商城"
},
{
"pagePath": "pages/Personal/Personal",
"iconPath": "static/个人 拷贝 2@2x.png",
"selectedIconPath": "static/商城11@2x.png",
"text": "个人中心"
}
]
}
}

View File

@ -0,0 +1,19 @@
<template>
<view>
3
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

View File

@ -0,0 +1,38 @@
<template>
<view class="app">
<view class="cards">
<view class="nursing">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
.app {
background-color: #F4F5F7;
width: 100%;
height: 100vh;
position: relative;
.cards {
width: 92%;
height: 920rpx;
box-shadow: 0px 0px 30rpx 0px rgba(108, 99, 255, 0.16);
background-color: #fff;
position: absolute;
top: 3%;
left: 4%;
}
}
</style>

52
pages/index/index.vue Normal file
View File

@ -0,0 +1,52 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>

266
pages/login/login.vue Normal file
View File

@ -0,0 +1,266 @@
<template>
<view class="app">
<view class="title">
账号登录
</view>
<view class="loginphone">
<input class="phone" type="text" placeholder="手机号码" maxlength="11" v-model="phone" />
</view>
<view class="logincode loginphone" style="top: 40%;" v-if='switchs'>
<input class="code phone" type="text" placeholder="密码" maxlength="10" />
</view>
<view class="logincode loginphone" style="top: 40%;" v-else>
<input class="code phone" type="text" placeholder="验证码" maxlength="6" />
<view class="obtaincode get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
{{getCodeText}}
</view>
</view>
<view class="loginbtn">
登录
</view>
<view class="switch" @tap='tapswitch'>
切换密码登录
</view>
</view>
</template>
<script>
export default {
data() {
return {
phone: "",
getCodeText: '获取验证码',
getCodeBtnColor: "#4C7BC9", //color
getCodeisWaiting: false, //
switchs: false, //
};
},
methods: {
tapswitch() {
console.log()
if (this.switchs) {
this.switchs = false
} else if (this.switchs == false) {
this.switchs = true
}
},
getCode() {
uni.hideKeyboard() //
if (this.getCodeisWaiting) { //
return;
}
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phone))) { //
uni.showToast({
title: '请填写正确手机号码',
icon: "none"
});
return false;
}
this.getCodeText = "发送中..." //
this.getCodeisWaiting = true;
this.getCodeBtnColor = "rgba(138,139,133,1)" //
//
//setTimeout(()
setTimeout(() => {
uni.showToast({
title: '验证码已发送',
icon: "none"
}); //
// this.code = '1234'; // 1234
this.setTimer(); //
}, 1000)
},
//setTimer 使SetTimer
setTimer() {
let holdTime = 60; //
this.getCodeText = "重新获取(60)"
//setInterval
//setInterval clearInterval
this.Timer = setInterval(() => {
if (holdTime <= 0) {
this.getCodeisWaiting = false;
this.getCodeBtnColor = "#4C7BC9";
this.getCodeText = "获取验证码"
clearInterval(this.Timer); //
return; //
}
this.getCodeText = "重新获取(" + holdTime + ")"
holdTime--;
}, 1000)
},
doReg() {
// uni.hideKeyboard() //
// //
// if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { //
// uni.showToast({
// title: '',
// icon: "none"
// });
// return false;
// }
// //使
// if (this.code != 1234) {
// uni.showToast({
// title: '',
// icon: "none"
// });
// return false;
// }
// uni.showLoading({
// title: '...'
// })
// //使
// setTimeout(() => {
// uni.getStorage({
// key: 'UserList',
// success: (res) => {
// //md5
// res.data.push({
// username: this.phoneNumber,
// passwd: md5(this.passwd)
// })
// uni.setStorage({
// key: 'UserList',
// data: res.data,
// success: function() {
// uni.hideLoading()
// uni.showToast({
// title: '',
// icon: "success"
// });
// setTimeout(function() {
// uni.navigateBack();
// }, 1000)
// }
// });
// },
// fail: (e) => {
// uni.hideLoading()
// console.log('error');
// //UserList
// uni.setStorage({
// key: 'UserList',
// data: [{
// username: this.phoneNumber,
// passwd: md5(this.passwd)
// }],
// success: function() {
// uni.hideLoading()
// uni.showToast({
// title: '',
// icon: "success"
// });
// setTimeout(function() {
// uni.navigateBack();
// }, 1000)
// },
// fail: function(e) {
// console.log('set error:' + JSON.stringify(e));
// }
// });
// }
// });
// }, 1000)
},
toLogin() {
// uni.hideKeyboard() //
// uni.redirectTo({
// url: 'login'
// }); //
// uni.navigateBack(); //
}
},
}
</script>
<style lang="scss">
.app {
background-color: #F4F5F7;
position: relative;
height: 100vh;
width: 100%;
font-family: DengXian;
color: #C3C1C1;
font-weight: 400;
.switch {
width: 80%;
text-align: center;
height: 100rpx;
color: #46ABD7;
position: absolute;
top: 67%;
left: 10%;
}
.loginbtn {
width: 80%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
background: #4C7BC9;
border-radius: 51rpx;
font-size: 41rpx;
color: #FFFFFF;
position: absolute;
top: 57%;
left: 10%;
}
.loginphone {
background-color: #fff;
width: 80%;
height: 162rpx;
position: absolute;
left: 10%;
top: 23%;
::v-deep .uni-input-placeholder {
padding-left: 40rpx;
font-size: 41rpx;
font-weight: 400;
color: #C3C1C1;
}
.phone {
padding-left: 40rpx;
height: 100%;
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
}
}
.logincode {
position: absolute;
left: 10%;
.obtaincode {
text-align: center;
font-size: 37rpx;
color: #4C7BC9;
line-height: 162rpx;
position: absolute;
left: 65%;
top: 0%;
}
::v-deep .uni-input-placeholder {
padding-left: 40rpx;
color: #C3C1C1;
font-size: 41rpx;
font-weight: 400;
}
}
.title {
height: 50rpx;
font-size: 52rpx;
font-weight: bold;
color: #000000;
line-height: 44rpx;
position: absolute;
top: 13%;
left: 13%;
}
}
</style>

View File

@ -0,0 +1,19 @@
<template>
<view>
2
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

52
pages/startup/startup.vue Normal file
View File

@ -0,0 +1,52 @@
<template>
<view class="app">
<image src="../../static/启动页.png" mode=""></image>
<view class="title">
泉医到家
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
created() {
this.info();
},
methods: {
info() {
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
});
}, 2000);
},
},
}
</script>
<style lang="scss">
image {
width: 80%;
height: 157px;
position: absolute;
left: 10%;
}
.title {
width: 80%;
height: 48rpx;
font-size: 49rpx;
text-align: center;
font-family: DengXian;
font-weight: bold;
color: #000000;
position: absolute;
top: 50%;
left: 10%;
}
</style>

BIN
static/zhuanjia@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/启动页.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/商城11@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/居家护理@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
static/知识@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/跑步 拷贝@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/首页 拷贝@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/首页@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

76
uni.scss Normal file
View File

@ -0,0 +1,76 @@
/**
* 这里是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:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;