会员模块
This commit is contained in:
70
pages/clock/base/base.js
Normal file
70
pages/clock/base/base.js
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
baseState : false, // 建议每日饮水量弹出
|
||||
drinkNeed : '', // 建议每日饮水量
|
||||
recordnum1: 160, // 身高
|
||||
recordnum2: 65, // 体重
|
||||
dateValue : '请选择' // 生日选择
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生日选择
|
||||
*/
|
||||
birthdayChange(e) {
|
||||
this.setData({
|
||||
dateValue: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交信息
|
||||
*/
|
||||
submitBtn() {
|
||||
let birthday = this.data.dateValue,
|
||||
height = this.selectComponent('#ctrlmill1').data.number,
|
||||
weight = this.selectComponent('#ctrlmill2').data.number
|
||||
wx.$api.water.Store({
|
||||
birthday: birthday,
|
||||
height : height,
|
||||
weight : weight
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.setData({
|
||||
drinkNeed: res.data.drink.need,
|
||||
baseState: true
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭弹窗-并跳走
|
||||
*/
|
||||
perfect() {
|
||||
wx.switchTab({
|
||||
url: '/pages/record/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
7
pages/clock/base/base.json
Normal file
7
pages/clock/base/base.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"milliliter": "/components/milliliter/milliliter",
|
||||
"milliliter-input": "/components/milliliter-input/milliliter-input"
|
||||
},
|
||||
"navigationBarTitleText": "完善信息"
|
||||
}
|
||||
39
pages/clock/base/base.wxml
Normal file
39
pages/clock/base/base.wxml
Normal file
@@ -0,0 +1,39 @@
|
||||
<view class="base">
|
||||
<view class="baseTitle">
|
||||
<text>个人信息完善</text>
|
||||
以下信息将帮助我们为您定制个人健康饮水计划
|
||||
</view>
|
||||
<view class="baseWrite">
|
||||
<view class="baseWrite-title">生日<text>*</text></view>
|
||||
<picker class="baseWrite-birthday" bindchange="birthdayChange" mode="date" value="{{dateValue}}" end="2023-12-30">
|
||||
<view class="picker">{{ dateValue }}</view>
|
||||
<image class="baseWrite-birthday-icon" src="/static/icons/userLogin_icon.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="baseWrite">
|
||||
<!-- <view class="baseWrite-title"><view class="baseWrite-title-name">身高<text>*</text></view>{{recordnum1}}(cm)</view> -->
|
||||
<milliliter-input id="ctrlmill1" float="{{false}}" unitName="身高" unitVal="身高" max="{{200}}" val="{{recordnum1}}" value="{{recordnum1}}"></milliliter-input>
|
||||
</view>
|
||||
<view class="baseWrite">
|
||||
<!-- <view class="baseWrite-title"><view class="baseWrite-title-name">体重<text>*</text></view>{{recordnum2}}(kg)</view> -->
|
||||
<milliliter-input id="ctrlmill2" float="{{true}}" unitName="体重" unitVal="体重" max="{{200}}" val="{{recordnum2}}" value="{{recordnum2}}"></milliliter-input>
|
||||
</view>
|
||||
|
||||
<view class="baseBtn" bindtap="submitBtn">提交信息</view>
|
||||
</view>
|
||||
|
||||
<!-- 建议每日饮水量弹出 -->
|
||||
<view class="refertoEject {{baseState ? 'active' : ''}}" catchtouchmove='true'></view>
|
||||
<view class="refertoCont {{baseState ? 'active' : ''}}" catchtouchmove='true'>
|
||||
<view class="refertoCont-text">
|
||||
<view class="refertoCont-title">通知</view>
|
||||
<image class="refertoCont-ls" src="https://api.siyuankunlun.com/storage/images/2023/11/20/9d8b55b1e388c8bbb17a07ceaa332b50.png" mode="widthFix"></image>
|
||||
<view class="refertoCont-tips">
|
||||
<!-- 建议每日饮水量:<text>{{drinkNeed}}</text>ml -->
|
||||
已完善资料,进行舌诊检测
|
||||
</view>
|
||||
<view class="publicPop-btn">
|
||||
<view class="publicPop-btn-go" bindtap="perfect">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
159
pages/clock/base/base.wxss
Normal file
159
pages/clock/base/base.wxss
Normal file
@@ -0,0 +1,159 @@
|
||||
page {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
.baseTitle {
|
||||
margin-bottom: 50rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.baseTitle text {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.baseWrite {
|
||||
background-color: #ffffff;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 0 10rpx rgba(0, 0, 0, .1);
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.baseWrite-title {
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.baseWrite-title-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.baseWrite-title text {
|
||||
color: red;
|
||||
padding-left: 5rpx;
|
||||
}
|
||||
|
||||
.baseWrite-birthday {
|
||||
border: 2rpx solid #e7e7e7;
|
||||
margin-top: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
line-height: 74rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.baseWrite-birthday-icon {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 20rpx;
|
||||
}
|
||||
|
||||
.baseBtn {
|
||||
text-align: center;
|
||||
background-color: #528cff;
|
||||
color: #ffffff;
|
||||
line-height: 100rpx;
|
||||
margin-top: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
box-shadow: 0 0 10rpx rgba(12, 83, 223, .5);
|
||||
}
|
||||
|
||||
|
||||
/* 饮水量弹出 */
|
||||
.refertoEject {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
z-index: 10000;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.refertoEject.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.refertoCont {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 100000;
|
||||
padding: 0 15%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.refertoCont.active {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.refertoCont-text {
|
||||
background-color: #f6f9fb;
|
||||
border-radius: 20rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.refertoCont-ls {
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.refertoCont-title {
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
padding: 40rpx 0;
|
||||
font-size: 34rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.refertoCont-tips {
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
padding: 30rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.refertoCont-tips text {
|
||||
color: #528cff;
|
||||
font-weight: 600;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.publicPop-btn {
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
border-top: 2rpx solid #e6e6e6;
|
||||
padding: 30rpx 50rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.publicPop-btn-go {
|
||||
width: 100%;
|
||||
color: #ffffff;
|
||||
background-color: #528cff;
|
||||
text-align: center;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
border-radius: 90rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user