This commit is contained in:
曹辉 2022-10-13 16:02:25 +08:00
parent 4d70c810cc
commit a56f8ebb84
20 changed files with 677 additions and 55 deletions

View File

@ -12,6 +12,7 @@
}
</script>
<style>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
</style>

View File

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

9
api/register/index.js Normal file
View File

@ -0,0 +1,9 @@
import request from "../request.js"
export function appRegister(data) {
return request({
url: `/nurseApp/login/appRegister`,
method: 'POST',
data
})
}

View File

@ -2,6 +2,8 @@ import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import uView from "uview-ui";
Vue.use(uView);
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({

View File

@ -1,6 +1,36 @@
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/CommodityDetails/CommodityDetails",
"style": {
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
},{
"path": "pages/register/register",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/Personal/Personal",
"style": {
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
// "enablePullDownRefresh": false
}
}, {
"path": "pages/shopping/shopping",
"style": {
"navigationBarTitleText": "医路优品",
@ -28,28 +58,14 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
// "enablePullDownRefresh": false
}
}, {
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
"navigationBarTitleText": "泉医到家",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/Personal/Personal",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

View File

@ -0,0 +1,370 @@
<template>
<view class="app">
<uni-swiper-dot :info="info" :current="current" field="content" :mode="mode" @clickItem='clickItem'
style='background-color: #fff;height:750rpx'>
<swiper class="swiper-box" @change="change" :current="swiperDotIndex" style="height:100%">
<!-- <swiper-item v-for="(item ,index) in info" :key="index">
</swiper-item> -->
<swiper-item>
<image style='width:100%;height:750rpx' src="../../static/spjtcs.png" mode=""></image>
</swiper-item>
<swiper-item>
<image style='width:100%;height:750rpx' src="../../static/spjtcs.png" mode=""></image>
</swiper-item>
<swiper-item>
<image style='width:100%;height:750rpx' src="../../static/spjtcs.png" mode=""></image>
</swiper-item>
</swiper>
</uni-swiper-dot>
<view class="Commodity common">
<view class="name">
酒精棉片
</view>
<view class="number">
200
</view>
<view class="price">
36.0
</view>
</view>
<view class="choice common">
<view class="selected">
已选
</view>
<view class="content">
酒精棉片 8×1
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="Discount common">
<view class="selected">
优惠
</view>
<view class="content">
购买最多可获得3积分
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="service common">
<view class="selected">
服务
</view>
<view class="content">
· 7天无理由退货
</view>
<view class="content" style="display: block;">
· 仅工作日发货
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="picture">
<view class="selected">
图文服务
</view>
<image src="../../static/tpcs.png" mode=""></image>
</view>
<view class="Purchasecolumn">
<view class="buy" @tap="buyshow=true">
立即购买
</view>
</view>
<u-mask :show="buyshow" @click="buyshow = false" class='mask'>
<view class="PurchasePage" @click.stop=''>
<image class="close" src="../../static/gb.png" mode="" @tap='buyshow=false'></image>
<view class="topcontent">
<view class="image">
<image src="../../static/tpcs.png" mode=""></image>
</view>
<view class="title">
<span>酒精棉片</span> <span style='margin-left: 30rpx;'>200</span>
</view>
<view class="price">
36.0
</view>
</view>
<view class="centercontent topcontent">
<view class="header">
型号
</view>
<view class="Productmodel">
酒精棉片 8
</view>
</view>
<view class="bottomcontent topcontent">
<view class="header">
数量
</view>
<view class="number">
<u-number-box :min="1" :max="999"></u-number-box>
</view>
</view>
<view class="buy">
立即购买
</view>
</view>
</u-mask>
</view>
</template>
<script>
export default {
data() {
return {
buyshow: false, //
//
info: [{
content: '内容 A'
}, {
content: '内容 B'
}, {
content: '内容 C'
}],
current: 0, //
mode: 'dot', //
swiperDotIndex: 0, //
number: 1, //
};
},
methods: {
//
change(e) {
this.current = e.detail.current;
},
//
clickItem(e) {
this.swiperDotIndex = e
},
}
}
</script>
<style lang="scss">
.app {
background-color: #F4F5F7;
width: 100%;
position: relative;
color: #000000;
.mask {
width: 100%;
height: 100%;
position: fixed;
top: 0;
background-color: #000000;
background: rgba(0, 0, 0, 0.6);
.PurchasePage {
position: fixed;
top: 40%;
width: 100%;
height: 60%;
background: #FFFFFF;
border-radius: 30rpx 30rpx 0px 0px;
font-size: 36rpx;
.close {
width: 31rpx;
height: 31rpx;
position: absolute;
top: 5%;
right: 5%;
}
.topcontent {
width: 90%;
margin: 0 auto;
padding-bottom: 24rpx;
border-bottom: 1rpx solid #D8D4D4;
.price {
color: #D43953;
position: absolute;
top: 23%;
left: 40%;
}
.title {
position: absolute;
top: 13%;
left: 40%;
font-weight: 600;
}
.image {
width: 215rpx;
height: 215rpx;
background: rgba(150, 147, 148, 0.21);
margin: 60rpx 0 0 0;
image {
width: 201rpx;
height: 201rpx;
margin: 7rpx 0 0 7rpx;
}
}
}
.buy {
width: 60%;
height: 71rpx;
background: #4C7BC9;
color: #FFFFFF;
text-align: center;
line-height: 71rpx;
border-radius: 26rpx;
margin: 40rpx 0 0 20%;
}
.bottomcontent {
margin-top: 34rpx;
padding-bottom: 35rpx;
.header {
display: inline-block;
vertical-align: middle;
}
.number {
display: inline-block;
position: absolute;
right: 10%;
}
}
.centercontent {
margin-top: 34rpx;
padding-bottom: 35rpx;
.Productmodel {
width: 344rpx;
height: 80rpx;
background: #ECF1FA;
border: 1rpx solid #4C7BC9;
line-height: 80rpx;
border-radius: 25rpx;
color: #4C7BC9;
text-align: center;
margin-top: 27rpx;
}
}
}
}
.Purchasecolumn {
width: 100%;
height: 110rpx;
background: #FFFFFF;
position: fixed;
bottom: 0;
.buy {
width: 263rpx;
height: 80rpx;
background: #4C7BC9;
border-radius: 25rpx;
font-size: 38rpx;
color: #FFFFFF;
line-height: 80rpx;
text-align: center;
position: absolute;
right: 5%;
top: 15rpx;
}
}
.common {
padding-left: 5%;
}
.choice,
.Discount,
.service {
height: 80rpx;
background: #FFFFFF;
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
font-size: 34rpx;
line-height: 80rpx;
margin-bottom: 15rpx;
position: relative;
image {
width: 17rpx;
height: 26rpx;
position: absolute;
right: 5%;
top: 50%;
transform: translateY(-50%);
}
.content {
display: inline-block;
position: absolute;
left: 25%;
}
.selected {
color: #969394;
display: inline-block;
}
}
.picture {
background: #FFFFFF;
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
position: relative;
padding-bottom: 110rpx;
.selected {
padding: 20rpx 0 0 5%;
color: #969394;
display: inline-block;
}
image {
margin-top: 20rpx;
height: 850rpx;
width: 100%;
}
}
.service {
height: 130rpx;
line-height: 65rpx;
.content {
display: inline-block;
position: absolute;
left: 25%;
}
.selected {
color: #969394;
display: inline-block;
}
}
.Commodity {
height: 160rpx;
background: #FFFFFF;
margin: 15rpx 0 15rpx 0;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
font-size: 36rpx;
line-height: 75rpx;
.name,
.number {
display: inline-block;
}
.price {
color: #D43953;
}
.number {
padding-left: 30rpx;
}
}
}
</style>

View File

@ -1,19 +1,86 @@
<template>
<view>
3
<view class="app">
<view class="cards">
<view class="item" style="background-color: #9E4DD0;">
<image src="../../static/user.png" mode=""></image>
<view class="title">
个人信息
</view>
</view>
<view class=" item" style="background-color: #E1AE3C ;">
<image src="../../static/dingdan.png" mode=""></image>
<view class="title">
我的订单
</view>
</view>
<view class="item" style="background-color: #00C176 ;">
<image src="../../static/home.png" mode=""></image>
<view class="title" style="font-size: 42rpx;">
我的家庭
</view>
</view>
<view class="item">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
return {};
},
methods: {},
}
</script>
<style lang="scss">
.app {
background-color: #F4F5F7;
width: 100%;
height: 100vh;
position: relative;
.cards {
width: 94%;
box-shadow: 0px 0px 30rpx 0px rgba(108, 99, 255, 0.16);
background-color: #fff;
position: absolute;
top: 3%;
left: 3%;
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
padding: 40rpx 0 200rpx 0;
border-radius: 25rpx;
.item {
width: 43%;
height: 295rpx;
margin-bottom: 40rpx;
border-radius: 25rpx;
position: relative;
.title {
width: 80%;
text-align: center;
font-size: 46rpx;
color: #FCFCFC;
position: absolute;
top: 60%;
left: 50%;
transform: translateX(-50%);
}
image {
width: 100rpx;
height: 100rpx;
position: absolute;
top: 20%;
left: 50%;
transform: translateX(-50%);
}
}
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<view class="app">
<view class="productlist">
<view class="item">
<view class="item" @tap='goCommodityDetails'>
<image src="../../static/shoppingcs.png" mode=""></image>
<view class="title">
燕麦麸皮 1
@ -45,19 +45,26 @@
export default {
data() {
return {
title: '',
title: '医路优品', //
};
},
onReady() {
//
uni.setNavigationBarTitle({
title: this.title,
});
},
onLoad(options) {
//
this.title = options.title
},
methods: {
//
goCommodityDetails() {
uni.navigateTo({
url: '/pages/CommodityDetails/CommodityDetails'
})
},
},
}
</script>

View File

@ -3,7 +3,6 @@
<view class="cards">
<view class="nursing item">
<image src="../../static/jjhl.png" mode=""></image>
<img src="" alt="">
<view class="title">
护理站
</view>

View File

@ -4,10 +4,11 @@
账号登录
</view>
<view class="loginphone">
<input class="phone" type="text" placeholder="手机号码" maxlength="11" v-model="phone" />
<input class="phone" type="text" placeholder="手机号码" maxlength="11" v-model="userdata.phone" />
</view>
<view class="logincode loginphone" style="top: 40%;" v-if='switchs'>
<input class="code phone" type="text" placeholder="密码" maxlength="10" />
<u-input class='code phone' placeholder="密码" maxlength="10" v-model="userdata.password" type="password"
border="true" password-icon="true" />
</view>
<view class="logincode loginphone" style="top: 40%;" v-else>
<input class="code phone" type="text" placeholder="验证码" maxlength="6" />
@ -18,8 +19,11 @@
<view class="loginbtn">
登录
</view>
<view class="switch" @tap='tapswitch'>
切换密码登录
<view class="switch" @tap='switchs=!switchs'>
{{switchs?'切换手机验证码登录':'切换密码登录'}}
</view>
<view class="switch" @tap='goregister' style="left:55%" v-if="switchs">
没有账号,请先注册
</view>
</view>
</template>
@ -27,22 +31,28 @@
export default {
data() {
return {
phone: "",
getCodeText: '获取验证码',
userdata: {
phone: '13645678913',
password: '123456'
},
getCodeText: '获取验证码', //
getCodeBtnColor: "#4C7BC9", //color
getCodeisWaiting: false, //
switchs: false, //
};
},
//
onLoad(options) {
this.switchs = options.switchs
},
methods: {
tapswitch() {
console.log()
if (this.switchs) {
this.switchs = false
} else if (this.switchs == false) {
this.switchs = true
}
//
goregister() {
uni.navigateTo({
url: '/pages/register/register'
})
},
//
getCode() {
uni.hideKeyboard() //
if (this.getCodeisWaiting) { //
@ -69,7 +79,7 @@
this.setTimer(); //
}, 1000)
},
//setTimer 使SetTimer
// setTimer 使SetTimer
setTimer() {
let holdTime = 60; //
this.getCodeText = "重新获取(60)"
@ -185,7 +195,6 @@
font-weight: 400;
.switch {
width: 80%;
text-align: center;
height: 100rpx;
color: #46ABD7;
@ -216,6 +225,11 @@
left: 10%;
top: 23%;
input {
font-size: 45rpx;
color: #000000;
}
::v-deep .uni-input-placeholder {
padding-left: 40rpx;
font-size: 41rpx;
@ -244,12 +258,14 @@
top: 0%;
}
::v-deep .uni-input-placeholder {
padding-left: 40rpx;
color: #C3C1C1;
font-size: 41rpx;
::v-deep .u-input__input {
padding-left: 20rpx;
color: #000000;
font-size: 42rpx;
font-weight: 400;
height: 100%;
}
}
.title {

136
pages/register/register.vue Normal file
View File

@ -0,0 +1,136 @@
<template>
<view class="app">
<view class="title">
注册账号
</view>
<view class="loginphone">
<input class="phone" type="text" placeholder="手机号码" maxlength="11" v-model="userdata.phone" />
</view>
<view class="logincode loginphone" style="top: 40%;">
<u-input class='code phone' placeholder="密码" maxlength="10" v-model="userdata.password" type="password"
border="true" password-icon="true" />
</view>
<view class="loginbtn" @tap='register'>
立即注册
</view>
<view class="switch" style="left:55%" @tap='gologin'>
已有账号,去登录
</view>
</view>
</template>
<script>
import {
appRegister
} from '../../api/register/index.js'
export default {
data() {
return {
userdata: {
phone: '13645678913',
password: '123456'
}
};
},
methods: {
//
register() {
appRegister(this.userdata).then(res => {
console.log(res)
})
},
//
gologin() {
uni.navigateTo({
url: `/pages/login/login?switchs=${true}`
})
},
},
}
</script>
<style lang="scss">
.app {
background-color: #F4F5F7;
position: relative;
height: 100vh;
width: 100%;
font-family: DengXian;
color: #C3C1C1;
font-weight: 400;
.switch {
text-align: center;
line-height: 60rpx;
color: #46ABD7;
position: absolute;
top: 66%;
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%;
input {
font-size: 40rpx;
color: #000000;
}
::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%;
::v-deep .u-input__input {
padding-left: 20rpx;
color: #000000;
font-size: 41rpx;
font-weight: 400;
height: 100%;
}
}
.title {
height: 50rpx;
font-size: 52rpx;
font-weight: bold;
color: #000000;
line-height: 44rpx;
position: absolute;
top: 13%;
left: 13%;
}
}
</style>

View File

@ -2,14 +2,13 @@
<view class="app">
<view class="cards">
<view class="item" style="background-color: #00C176;" @tap='goProductList(1)'>
<image src="../../static/sp.png" mode=""></image>
<image src="../../static/sp.png" mode=""></image>
<view class="title">
特医食品
</view>
</view>
<view class=" item" style="background-color: #D43953;">
<image src="../../static/yyss.png" mode=""></image>
<img src="" alt="">
<view class="title">
营养膳食
</view>
@ -33,8 +32,7 @@
<script>
export default {
data() {
return {
};
return {};
},
methods: {
//
@ -73,18 +71,18 @@
.item {
width: 43%;
height: 310rpx;
height: 300rpx;
margin-bottom: 40rpx;
border-radius: 25rpx;
position: relative;
.title {
width: 80%;
width: 70%;
text-align: center;
font-size: 46rpx;
color: #FCFCFC;
position: absolute;
top: 55%;
top: 58%;
left: 50%;
transform: translateX(-50%);
}

BIN
static/dingdan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/gb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/jiantou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/spjtcs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

BIN
static/tpcs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

BIN
static/user.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -74,3 +74,4 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;
@import 'uview-ui/theme.scss';