新增
3
App.vue
@ -12,6 +12,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
|
@import "uview-ui/index.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
var baseurl = "http://192.168.16.62:8080";
|
var baseurl = "http://192.168.16.94:8080";
|
||||||
export default baseurl
|
export default baseurl
|
||||||
|
|||||||
9
api/register/index.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function appRegister(data) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/login/appRegister`,
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
2
main.js
@ -2,6 +2,8 @@ import App from './App'
|
|||||||
|
|
||||||
// #ifndef VUE3
|
// #ifndef VUE3
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
import uView from "uview-ui";
|
||||||
|
Vue.use(uView);
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
|
|||||||
50
pages.json
@ -1,6 +1,36 @@
|
|||||||
{
|
{
|
||||||
|
"easycom": {
|
||||||
|
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||||
|
},
|
||||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
"pages": [ //pages数组中第一项表示应用启动页,参考:https://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",
|
"path": "pages/shopping/shopping",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "医路优品",
|
"navigationBarTitleText": "医路优品",
|
||||||
@ -28,28 +58,14 @@
|
|||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#ffffff"
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/login/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
// "enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "uni-app"
|
"navigationBarTitleText": "泉医到家",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/Personal/Personal",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
370
pages/CommodityDetails/CommodityDetails.vue
Normal 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>
|
||||||
@ -1,19 +1,86 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="app">
|
||||||
3
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
|
},
|
||||||
};
|
methods: {},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<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>
|
</style>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<view class="app">
|
||||||
<view class="productlist">
|
<view class="productlist">
|
||||||
<view class="item">
|
<view class="item" @tap='goCommodityDetails'>
|
||||||
<image src="../../static/shoppingcs.png" mode=""></image>
|
<image src="../../static/shoppingcs.png" mode=""></image>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
燕麦麸皮 1盒
|
燕麦麸皮 1盒
|
||||||
@ -45,19 +45,26 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '医路优品', //导航栏标题
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
//更改导航栏文字
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: this.title,
|
title: this.title,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
//获取传值
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//跳转详情页
|
||||||
|
goCommodityDetails() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/CommodityDetails/CommodityDetails'
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
<view class="cards">
|
<view class="cards">
|
||||||
<view class="nursing item">
|
<view class="nursing item">
|
||||||
<image src="../../static/jjhl.png" mode=""></image>
|
<image src="../../static/jjhl.png" mode=""></image>
|
||||||
<img src="" alt="">
|
|
||||||
<view class="title">
|
<view class="title">
|
||||||
护理站
|
护理站
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -4,10 +4,11 @@
|
|||||||
账号登录
|
账号登录
|
||||||
</view>
|
</view>
|
||||||
<view class="loginphone">
|
<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>
|
||||||
<view class="logincode loginphone" style="top: 40%;" v-if='switchs'>
|
<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>
|
||||||
<view class="logincode loginphone" style="top: 40%;" v-else>
|
<view class="logincode loginphone" style="top: 40%;" v-else>
|
||||||
<input class="code phone" type="text" placeholder="验证码" maxlength="6" />
|
<input class="code phone" type="text" placeholder="验证码" maxlength="6" />
|
||||||
@ -18,8 +19,11 @@
|
|||||||
<view class="loginbtn">
|
<view class="loginbtn">
|
||||||
登录
|
登录
|
||||||
</view>
|
</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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -27,22 +31,28 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
phone: "",
|
userdata: {
|
||||||
getCodeText: '获取验证码',
|
phone: '13645678913',
|
||||||
|
password: '123456'
|
||||||
|
},
|
||||||
|
getCodeText: '获取验证码', //获取验证码的文字
|
||||||
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
||||||
getCodeisWaiting: false, //判断是否在倒计时中
|
getCodeisWaiting: false, //判断是否在倒计时中
|
||||||
switchs: false, //切换验证码 密码登录
|
switchs: false, //切换验证码 密码登录
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
//获取到传值
|
||||||
|
onLoad(options) {
|
||||||
|
this.switchs = options.switchs
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tapswitch() {
|
//跳转注册页
|
||||||
console.log()
|
goregister() {
|
||||||
if (this.switchs) {
|
uni.navigateTo({
|
||||||
this.switchs = false
|
url: '/pages/register/register'
|
||||||
} else if (this.switchs == false) {
|
})
|
||||||
this.switchs = true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
//点击获取验证码
|
||||||
getCode() {
|
getCode() {
|
||||||
uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
||||||
if (this.getCodeisWaiting) { //是否在倒计时中
|
if (this.getCodeisWaiting) { //是否在倒计时中
|
||||||
@ -69,7 +79,7 @@
|
|||||||
this.setTimer(); //调用定时器方法
|
this.setTimer(); //调用定时器方法
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
//setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
|
//获取验证码的倒计时 setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
|
||||||
setTimer() {
|
setTimer() {
|
||||||
let holdTime = 60; //定义变量并赋值
|
let holdTime = 60; //定义变量并赋值
|
||||||
this.getCodeText = "重新获取(60)"
|
this.getCodeText = "重新获取(60)"
|
||||||
@ -185,7 +195,6 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
||||||
.switch {
|
.switch {
|
||||||
width: 80%;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
color: #46ABD7;
|
color: #46ABD7;
|
||||||
@ -216,6 +225,11 @@
|
|||||||
left: 10%;
|
left: 10%;
|
||||||
top: 23%;
|
top: 23%;
|
||||||
|
|
||||||
|
input {
|
||||||
|
font-size: 45rpx;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .uni-input-placeholder {
|
::v-deep .uni-input-placeholder {
|
||||||
padding-left: 40rpx;
|
padding-left: 40rpx;
|
||||||
font-size: 41rpx;
|
font-size: 41rpx;
|
||||||
@ -244,12 +258,14 @@
|
|||||||
top: 0%;
|
top: 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-input-placeholder {
|
::v-deep .u-input__input {
|
||||||
padding-left: 40rpx;
|
padding-left: 20rpx;
|
||||||
color: #C3C1C1;
|
color: #000000;
|
||||||
font-size: 41rpx;
|
font-size: 42rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
136
pages/register/register.vue
Normal 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>
|
||||||
@ -2,14 +2,13 @@
|
|||||||
<view class="app">
|
<view class="app">
|
||||||
<view class="cards">
|
<view class="cards">
|
||||||
<view class="item" style="background-color: #00C176;" @tap='goProductList(1)'>
|
<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 class="title">
|
||||||
特医食品
|
特医食品
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class=" item" style="background-color: #D43953;">
|
<view class=" item" style="background-color: #D43953;">
|
||||||
<image src="../../static/yyss.png" mode=""></image>
|
<image src="../../static/yyss.png" mode=""></image>
|
||||||
<img src="" alt="">
|
|
||||||
<view class="title">
|
<view class="title">
|
||||||
营养膳食
|
营养膳食
|
||||||
</view>
|
</view>
|
||||||
@ -33,8 +32,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//跳转到商品列表页面
|
//跳转到商品列表页面
|
||||||
@ -73,18 +71,18 @@
|
|||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 43%;
|
width: 43%;
|
||||||
height: 310rpx;
|
height: 300rpx;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
border-radius: 25rpx;
|
border-radius: 25rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
width: 80%;
|
width: 70%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 46rpx;
|
font-size: 46rpx;
|
||||||
color: #FCFCFC;
|
color: #FCFCFC;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 55%;
|
top: 58%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
static/dingdan.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
static/gb.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/home.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
static/jiantou.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/spjtcs.png
Normal file
|
After Width: | Height: | Size: 314 KiB |
BIN
static/tpcs.png
Normal file
|
After Width: | Height: | Size: 437 KiB |
BIN
static/user.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
1
uni.scss
@ -74,3 +74,4 @@ $uni-color-subtitle: #555555; // 二级标题颜色
|
|||||||
$uni-font-size-subtitle:26px;
|
$uni-font-size-subtitle:26px;
|
||||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||||
$uni-font-size-paragraph:15px;
|
$uni-font-size-paragraph:15px;
|
||||||
|
@import 'uview-ui/theme.scss';
|
||||||