开始做设备

This commit is contained in:
qiaocl 2024-06-13 18:03:50 +08:00
parent 5861c3f4dd
commit e093806371
125 changed files with 11098 additions and 4813 deletions

View File

@ -2,7 +2,7 @@
"version" : "1.0", "version" : "1.0",
"configurations" : [ "configurations" : [
{ {
"playground" : "standard", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {

133
App.vue
View File

@ -1,13 +1,140 @@
<script> <script>
export default { export default {
data() {
return {}
},
onLaunch: function() { onLaunch: function() {
// console.log('App Launch') this.checkForUpdates()
console.log('App Launch')
}, },
onShow: function() { onShow: function() {
// console.log('App Show') console.log('App Show')
}, },
onHide: function() { onHide: function() {
// console.log('App Hide') console.log('App Hide')
},
methods: {
//
checkForUpdates() {
let that = this
let platform = ""
// apk
uni.getSystemInfo({
success(e) {
platform = e.platform
}
})
plus.runtime.getProperty(plus.runtime.appid, function(info) {
uni.setStorageSync('VERSION', info.version)
let res_version = info.version;
that.$model.getloginversion({}).then(res => {
let downloadUrl = res.data.url
let latestVersion = res.data.version
console.log("版本信息", info)
console.log("res", res)
//
if (latestVersion !== res_version) {
uni.showModal({
title: '发现新版本',
content: '检查到新版本' + res.data.version + ',是否更新?',
success: (modalRes) => {
if (modalRes.confirm) {
if (platform === 'android') {
uni.showLoading({
title: '正在下载,请稍后'
})
uni.setStorageSync('VERSION', res.data.version)
that.downloadNewVersion(downloadUrl, res.code);
} else {
uni.showModal({
title: '发现新版本 ' + res.data.version,
content: '请到App store进行升级',
showCancel: false
})
}
} else {
console.log("用户放弃更新")
if (res.code == 0) {
that.handleUserList()
} else {
uni.reLaunch({
url: "/pages/login/login"
})
}
}
}
});
} else {
console.log("版本号相同")
if (res.code == 0) {
that.handleUserList()
} else {
uni.reLaunch({
url: "/pages/login/login"
})
}
}
})
})
},
//
downloadNewVersion(downloadUrl, code) {
const dtask = uni.downloadFile({
url: downloadUrl,
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
uni.hideLoading();
plus.runtime.install(
downloadRes.tempFilePath, {
force: true
},
function() {
console.log('install success...');
plus.runtime.restart();
},
function(e) {
console.error('install fail...');
});
}
},
fail: () => {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
dtask.onProgressUpdate((res) => {
console.log('下载进度' + res.progress + '%');
});
},
//
handleUserList() {
let that = this
that.$model.getUserList({
type: 2
}).then(res => {
console.log("用户列表", res)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$store.commit('changeFamilay', res.data)
if (res.data.length) {
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
0].id
})
that.$store.dispatch("getCardList", {
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
0].id
})
}
}).catch(err => {})
},
} }
} }
</script> </script>

3
androidPrivacy.json Normal file
View File

@ -0,0 +1,3 @@
{
"prompt" : "template"
}

View File

@ -639,22 +639,24 @@
border-radius: 10px; border-radius: 10px;
margin: 0 15px 10px; margin: 0 15px 10px;
font-size: 14px; font-size: 14px;
padding: 25px 10px; padding: 25px 10px 15px;
color: #fff; color: #fff;
.status { .status {
float: right;
margin-bottom: 25px; margin-bottom: 25px;
text { text {
width: auto; width: auto;
color: #333; color: #333;
background-color: #fff; background-color: #fff;
border-radius: 15px; border-radius: 10px;
padding: 5px 10px; padding: 8px 10px;
} }
} }
.item { .item {
width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -1139,4 +1141,144 @@
} }
} }
// 测量也
.weightPages {
.text {
width: 100%;
text-align: center;
font-size: 16px;
margin-top: 20px;
color: $textcolor;
}
.title {
width: 100%;
text-align: center;
height: 45px;
line-height: 45px;
font-size: 18px;
font-weight: bold;
}
.image {
text-align: center;
image {
width: 200px;
height: 200px;
margin: auto;
margin-top: 20px;
}
}
.tips {
width: auto;
margin-top: 25px;
padding-left: 20px;
line-height: 30px;
font-size: 12px;
color: #999;
text {
display: block;
}
}
.wrapper {
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 99;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.4);
.Blue {
width: 75%;
padding: 15px;
background: #fff;
z-index: 999;
border-radius: 5px;
text-align: center;
line-height: 30px;
.h4 {
font-size: 16px;
font-weight: 700;
margin-bottom: 10px;
}
.Blue-box {
display: flex;
align-items: center;
text-align: left;
height: 40px;
line-height: 40px;
margin-bottom: 15px;
text {
font-size: 18px;
font-weight: 700;
margin: 0 5px;
color: $textcolor;
}
}
input {
width: 85px;
background: #f7f7f7;
padding: 7px 5px;
margin-right: 10px;
border-radius: 5px;
}
}
.Blue-btn {
width: 45%;
background: $textcolor;
border-radius: 5px;
font-size: 14px;
margin-top: 10px;
margin-bottom: 5px;
height: 35px;
line-height: 35px;
float: right;
color: #fff;
}
.Blue-close {
background: #dfdfdf !important;
float: left !important;
color: #333;
}
}
.btnGroup {
width: 100%;
display: flex;
.btnClose,
.baocun {
width: 150px;
background-color: $textcolor;
border: 1px solid #f7f7f7;
color: #fff;
text-align: center;
padding: 7px;
border-radius: 10px;
margin: 15px auto;
}
.btnClose {
background-color: #dfdfdf;
color: #fff;
}
}
}

View File

@ -1,7 +1,7 @@
{ {
"selectllist": [{ "selectllist": [{
"id": "1", "id": "1",
"key": "Weight", "key": "2",
"disabled": true, "disabled": true,
"size": "big", "size": "big",
"name": "身体数据", "name": "身体数据",
@ -23,7 +23,7 @@
}, { }, {
"id": "2", "id": "2",
"size": "big", "size": "big",
"key": "Skip", "key": "6",
"disabled": true, "disabled": true,
"unit": "个", "unit": "个",
"name": "跳绳数据", "name": "跳绳数据",
@ -39,7 +39,7 @@
}, { }, {
"id": "3", "id": "3",
"disabled": true, "disabled": true,
"key": "Lung", "key": "8",
"size": "small", "size": "small",
"name": "肺活量", "name": "肺活量",
"unit": "ml", "unit": "ml",
@ -115,6 +115,7 @@
"month": 0, "month": 0,
"id": "08dbd378-27d1-42d2-87fc-dca513adb60f", "id": "08dbd378-27d1-42d2-87fc-dca513adb60f",
"height": 178.00, "height": 178.00,
"type": "false",
"fat_r": 0.00, "fat_r": 0.00,
"muscle": 0.00, "muscle": 0.00,
"water": 0.00, "water": 0.00,
@ -140,6 +141,7 @@
}, { }, {
"createtime": "2023-10-23 11:28:30.0000000", "createtime": "2023-10-23 11:28:30.0000000",
"month": 0, "month": 0,
"type": "false",
"id": "08dbd378-20a5-4991-84f4-a9702018f416", "id": "08dbd378-20a5-4991-84f4-a9702018f416",
"height": 178.00, "height": 178.00,
"fat_r": 0.00, "fat_r": 0.00,
@ -172,6 +174,7 @@
"fat_r": 0.00, "fat_r": 0.00,
"muscle": 0.00, "muscle": 0.00,
"water": 0.00, "water": 0.00,
"type": "false",
"bone": 0.00, "bone": 0.00,
"kcal": 0.00, "kcal": 0.00,
"fat_w": 0.00, "fat_w": 0.00,

View File

@ -19,7 +19,7 @@
</view> </view>
<view class="info"> <view class="info">
<view>{{item.gender==1?'男':'女'}}</view> <view>{{item.gender==1?'男':'女'}}</view>
<view>{{item.birthday}}</view> <view>{{item.age}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -54,6 +54,7 @@
toggle(val) { toggle(val) {
let that = this let that = this
uni.setStorageSync('userid', val.id) uni.setStorageSync('userid', val.id)
uni.setStorageSync('gender', val.gender)
that.$store.dispatch("getUserInfo", { that.$store.dispatch("getUserInfo", {
aud_id: val.id aud_id: val.id
}); });
@ -64,9 +65,11 @@
}, },
// //
addInfo() { addInfo() {
let that = this
uni.navigateTo({ uni.navigateTo({
url: "/pages/index/userInfo" url: "/pages/me/userInfo"
}) })
that.$store.commit("changeDrawe", false);
}, },
clear() { clear() {
this.$store.commit("changeDrawe", false); this.$store.commit("changeDrawe", false);

View File

@ -57,17 +57,17 @@
return {}; return {};
}, },
computed: { computed: {
...mapState(["user", "familayList"]), ...mapState({
userList() { user: state => state.user,
return this.familayList userList: state => state.familayList
} })
}, },
mounted() {},
methods: { methods: {
// //
handleAddUser() { handleAddUser() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/index/userInfo" url: "/pages/me/userInfo"
}) })
}, },
} }
@ -84,6 +84,10 @@
view { view {
width: 100%; width: 100%;
} }
last-child {
margin-top: 2px !important;
}
} }
.area { .area {

View File

@ -23,7 +23,7 @@
<view class="editem"> <view class="editem">
<view class="name">个数</view> <view class="name">个数</view>
<view class="right"> <view class="right">
<input type="digit" v-model="number" placeholder="请输入"> <input type="number" v-model="number" placeholder="请输入">
</view> </view>
</view> </view>
</view> </view>

View File

@ -2,8 +2,8 @@
"name" : "青测", "name" : "青测",
"appid" : "__UNI__E0E1A21", "appid" : "__UNI__E0E1A21",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.5",
"versionCode" : "100", "versionCode" : 105,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -18,8 +18,7 @@
}, },
/* */ /* */
"modules" : { "modules" : {
"Bluetooth" : {}, "Bluetooth" : {}
"Camera" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -41,19 +40,77 @@
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ],
"abiFilters" : [ "arm64-v8a", "x86" ]
}, },
/* ios */ /* ios */
"ios" : { "ios" : {
"dSYMs" : false "dSYMs" : false,
"idfa" : false,
"privacyDescription" : {
"NSBluetoothAlwaysUsageDescription" : "连接设备"
}
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs" : {
"share" : {}, "share" : {},
"ad" : {} "ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"androidStyle" : "common",
"android" : {
"hdpi" : "static/logo.png",
"xhdpi" : "static/logo.png",
"xxhdpi" : "static/logo.png"
},
"useOriginalMsgbox" : true
} }
} }
}, },
"permissions" : {
"Android" : [
{
"name" : "android.permission.READ_EXTERNAL_STORAGE",
"desc" : "读取外部存储"
},
{
"name" : "android.permission.WRITE_EXTERNAL_STORAGE",
"desc" : "写入外部存储"
}
]
},
/* */ /* */
"quickapp" : {}, "quickapp" : {},
/* */ /* */

View File

@ -11,17 +11,6 @@
} }
} }
}, },
{
"path": "pages/index/userInfo",
"style": {
"navigationBarTitleText": "资料",
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{ {
"path": "pages/card/card", "path": "pages/card/card",
"style": { "style": {
@ -164,6 +153,17 @@
} }
} }
}, },
{
"path": "pages/me/userInfo",
"style": {
"navigationBarTitleText": "资料",
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{ {
"path": "pages/score/score", "path": "pages/score/score",
"style": { "style": {
@ -216,6 +216,90 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/setting/setting",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{
"path": "pages/setting/password",
"style": {
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{
"path": "pages/setting/email",
"style": {
"navigationBarTitleText": "绑定邮箱",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{
"path": "pages/setting/phone",
"style": {
"navigationBarTitleText": "绑定手机号",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{
"path": "pages/devices/devices",
"style": {
"navigationBarTitleText": "蓝牙搜索",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{
"path": "pages/devices/G02",
"style": {
"navigationBarTitleText": "测量",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
},
{
"path": "pages/business/business",
"style": {
"navigationBarTitleText": "设备管理",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
}
}
}
} }
], ],
"globalStyle": { "globalStyle": {
@ -240,6 +324,11 @@
"iconPath": "static/ping.png", "iconPath": "static/ping.png",
"selectedIconPath": "static/ping2.png", "selectedIconPath": "static/ping2.png",
"text": "估分" "text": "估分"
}, {
"pagePath": "pages/business/business",
"iconPath": "static/shou.png",
"selectedIconPath": "static/shou2.png",
"text": "设备"
}, },
{ {
"pagePath": "pages/me/me", "pagePath": "pages/me/me",

View File

@ -4,17 +4,21 @@
<!-- 时间选择 --> <!-- 时间选择 -->
<view class="boxTime"> <view class="boxTime">
<view class="one"> <view class="one">
<picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH"> <!-- <picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH">
<view class="uni-input">{{startTime?startTime:startDate}} <view class="uni-input">{{startTime?startTime:startDate}}
<uni-icons class="iconfont icon-arrow-down-bold"></uni-icons> <uni-icons class="iconfont icon-arrow-down-bold"></uni-icons>
</view> </view>
</picker> </picker> -->
<uni-datetime-picker type="date" :end="startDate" :clear-icon="false"
:value="startTime?startTime:startDate" @change="handStartTimeH" :border="false" />
<view>~</view> <view>~</view>
<picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH"> <uni-datetime-picker type="date" :end="endDate" :clear-icon="false" :value="endTime?endTime:endDate"
@change="handEndTimeH" :border="false" />
<!-- <picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH">
<view class="uni-input"> {{endTime?endTime:endDate}} <view class="uni-input"> {{endTime?endTime:endDate}}
<uni-icons class="iconfont icon-arrow-down-bold"></uni-icons> <uni-icons class="iconfont icon-arrow-down-bold"></uni-icons>
</view> </view>
</picker> </picker> -->
</view> </view>
</view> </view>
<!-- 曲线图 --> <!-- 曲线图 -->
@ -132,17 +136,17 @@
handStartTimeH(e) { handStartTimeH(e) {
let that = this let that = this
if (that.endTime) { if (that.endTime) {
if (Date.parse(e.target.value) > Date.parse(that.endTime)) { if (Date.parse(e) > Date.parse(that.endTime)) {
that.$tools.msg("请选择正确的时间") that.$tools.msg("请选择正确的时间")
return return
} }
} else { } else {
if (Date.parse(e.target.value) > Date.parse(that.endDate)) { if (Date.parse(e) > Date.parse(that.endDate)) {
that.$tools.msg("请选择正确的时间") that.$tools.msg("请选择正确的时间")
return return
} }
} }
that.startTime = e.target.value that.startTime = e
let endtime = that.endTime ? that.endTime : that.endDate let endtime = that.endTime ? that.endTime : that.endDate
that.$store.dispatch("GetBodyTrendList", { that.$store.dispatch("GetBodyTrendList", {
aud_id: that.user.id, aud_id: that.user.id,
@ -155,20 +159,20 @@
handEndTimeH(e) { handEndTimeH(e) {
let that = this let that = this
if (that.startTime) { if (that.startTime) {
if (Date.parse(e.target.value) < Date.parse(that.startTime)) { if (Date.parse(e) < Date.parse(that.startTime)) {
that.$tools.msg("请选择正确的时间") that.$tools.msg("请选择正确的时间")
return return
} }
} else { } else {
if (Date.parse(e.target.value) < Date.parse(that.startDate)) { if (Date.parse(e) < Date.parse(that.startDate)) {
that.$tools.msg("请选择正确的时间") that.$tools.msg("请选择正确的时间")
return return
} }
} }
that.endTime = e.target.value that.endTime = e
let startTime = that.startTime ? that.startTime : that.startDate let startTime = that.startTime ? that.startTime : that.startDate
that.$store.dispatch("GetBodyTrendList", { that.$store.dispatch("GetBodyTrendList", {
aud_id: that.user.id, aud_id: uni.getStorageSync('userid'),
s_time: startTime, s_time: startTime,
e_time: that.endTime e_time: that.endTime
}) })

View File

@ -43,7 +43,7 @@
<text class="t-icon-jilu1 t-icon"></text> <text class="t-icon-jilu1 t-icon"></text>
<view>手动记录</view> <view>手动记录</view>
</view> </view>
<view class="item" @click="$tools.msg('开发中,敬请期待!')"> <view class="item" @click="$tools.handleBluetoothClick()">
<text class="t-icon-wulianjie t-icon"></text> <text class="t-icon-wulianjie t-icon"></text>
<view>连接设备</view> <view>连接设备</view>
</view> </view>
@ -113,7 +113,7 @@
data() { data() {
return { return {
infoList: [], infoList: [],
infoListTop:{} infoListTop: {}
} }
}, },
props: { props: {

View File

@ -33,6 +33,8 @@
</view> </view>
</view> </view>
<view class="btn" @click="handleGradeList()">保存卡片</view>
</view> </view>
</template> </template>
@ -69,6 +71,9 @@
that.$store.dispatch('getUserInfo', { that.$store.dispatch('getUserInfo', {
aud_id: that.user.id aud_id: that.user.id
}) })
uni.switchTab({
url: "/pages/index/index"
})
}).catch(err => {}) }).catch(err => {})
}, },
@ -77,14 +82,14 @@
let that = this let that = this
that.cardList.user.splice(index, 1) that.cardList.user.splice(index, 1)
that.cardList.all.push(item) that.cardList.all.push(item)
that.handleGradeList() // that.handleGradeList()
}, },
// //
addCard(item, index) { addCard(item, index) {
let that = this let that = this
that.cardList.all.splice(index, 1) that.cardList.all.splice(index, 1)
that.cardList.user.push(item) that.cardList.user.push(item)
that.handleGradeList() // that.handleGradeList()
}, },
} }
} }
@ -148,4 +153,10 @@
} }
} }
} }
.btn {
width: auto;
margin: 40px 15px 0;
background: $btncolor !important;
}
</style> </style>

View File

@ -8,7 +8,7 @@
<view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view> <view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view>
<view class="top"> <view class="top">
<view>性别{{memInfo.gender=='0'?'未知':memInfo.gender=='1'?'男':'女'}}</view> <view>性别{{memInfo.gender=='0'?'未知':memInfo.gender=='1'?'男':'女'}}</view>
<view>年龄{{user.age}}</view> <view class="ml-15">年龄{{user.age}}</view>
</view> </view>
</view> </view>
</view> </view>

270
pages/devices/G02.vue Normal file
View File

@ -0,0 +1,270 @@
<template>
<view class="weightPages">
<view class="content ">
<view class="title" v-if="isConnection == 0">连接中请稍后</view>
<view class="title" v-if="isConnection == 1">连接成功开始测量</view>
<view class="title" v-if="isConnection == 2" @click="openBluetoothAdapter">连接失败点击重新连接</view>
<view class="text">{{text}}</view>
<view class="image">
<image src="/static/devices/HC.png" class="image3"></image>
</view>
<view class="tips">
<view>提示</view>
<text>1.请确定设备已开机</text>
<text>2.请确定手机蓝牙及位置信息已打开</text>
</view>
</view>
<!-- 手动记录 -->
<view class="wrapper" v-if="isHeight">
<view class="bg"></view>
<view class="Blue">
<view class="h4">测量结果提示</view>
<view class="Blue-box">
本次测量身高为<text>{{height}}</text>
</view>
<view class="Blue-box">
上次测量体重为<input v-model="weight" type="digit" placeholder="请输入体重" />kg
</view>
<view class="Blue-btn Blue-close" @click="handleBack(1)">取消</view>
<view class="Blue-btn" @click="handleGetMeasure">保存测量结果</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
let myTime;
export default {
data() {
return {
text: "",
weight: "",
height: "",
deviceId: "",
macAddr: "",
unit: "cm",
Unload: false,
stopblue: true,
isHeight: false,
isConnection: 0,
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
info() {
return this.user
}
},
onUnload: function() {
let that = this
if (!that.Unload) {
clearTimeout(myTime)
that.stopBluetoothDevicesDiscovery() //
that.closeBluetoothAdapter()
console.log("页面返回onUnload")
}
},
onLoad() {
let that = this
that.text = ""
that.closeBluetoothAdapter()
that.openBluetoothAdapter()
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
that.isConnection = 2
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
that.isConnection = 2
}
},
stopblue: function() {
let that = this
if (!that.stopblue) {
clearTimeout(myTime);
that.isHeight = true
}
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.text = ""
that.stopblue = true
that.isHeight = false
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true,
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.name.indexOf("WSD") !== -1) {
let value = that.$tools.ab2hex(device.advertisData, "")
let type = value.substring(22, 24)
let num = value.substring(28, 29)
let dw = value.substring(29, 30)
let data = parseInt(value.substring(24, 28), 16)
that.isConnection = 1
if (dw == "1") {
that.unit = "FT"
data = data * 2.54
}
if (num == "1") {
data = data / 10
}
if (num == "2") {
data = data / 100
}
if (num == "3") {
data = data / 1000
}
if (type == "01") {
clearTimeout(myTime);
that.text = "您的身高是:" + data + that.unit
let buffer = device.advertisData.slice(3, 9)
device.mac = new Uint8Array(buffer) // 广maciOSmac
let tempMac = Array.from(device.mac)
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.deviceId
that.macAddr = device.macAddr
that.height = data + that.unit
that.stopblue = false
return
}
return;
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
that.text = ""
that.Unload = true
that.stopblue = true
that.isHeight = false
that.isConnection = 2
that.startBluetoothDeviceDiscovery()
that.closeBluetoothAdapter()
}
}, 30000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
handleGetMeasure() {
let that = this
if (!that.weight) {
this.$tools.msg("请输入体重")
return
}
that.$model.getmeasurefunit({
imp: that.imp,
weight: that.weight,
ecode: that.macAddr,
height: that.height,
familyid: that.info.id
}).then(res => {
that.isHeight = false
if (res.code == 0) {
that.$store.dispatch("getUserInfo", {
familyid: that.info.id
});
that.$tools.msg("测量成功")
} else {
that.$tools.msg("测量失败")
}
that.Unload = true
setTimeout(function() {
that.closeBluetoothAdapter()
uni.switchTab({
url: "/pages/index/index"
})
}, 200)
})
},
//
handleBack(ind) {
let that = this
that.text = ""
that.Unload = true
that.stopBluetoothDevicesDiscovery()
that.closeBluetoothAdapter()
if (ind == 1) {
uni.switchTab({
url: "/pages/index/index"
})
}
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
},
}
</script>
<style scoped lang="scss">
.image3 {
width: 200px !important;
height: 340px !important;
}
</style>

461
pages/devices/devices.vue Normal file
View File

@ -0,0 +1,461 @@
<template>
<view class="container">
<view class="text" @click="openBluetoothAdapter" v-if="issearch">没有搜到想要的点击重新搜索</view>
<view class="point-area">
<view class="point point-10"></view>
<view class="point point-40"></view>
<view class="point point-80"></view>
<view class="point point-100"></view>
<view class="point point-120"></view>
</view>
<view class="list">
<view class="item" v-for="(item,index) in devList" :key="index" @click="handleWeight(item)">
<!-- <image :src="item.img"></image> -->
<text>{{item.macAddr}}</text>
</view>
</view>
<view class="tips" v-if="isdevTip">
<view>提示</view>
<text>1.请确定设备已绑定</text>
<text>2.请确定设备已开机</text>
<text>3.请确定手机蓝牙及位置信息已打开</text>
</view>
</view>
</template>
<script>
let that;
let myTime;
import {
mapState
} from "vuex";
export default {
data() {
return {
Unload: false, //
issearch: false, //
isdevTip: false, //
devicesList: [],
devList: []
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
},
onLoad(options) {
that = this
that.openBluetoothAdapter()
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
onUnload() {
console.log("onUnload")
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
},
watch: {
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.issearch = true
that.isdevTip = true
that.devList = []
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.stopBluetoothDevicesDiscovery()
}
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
uni.openBluetoothAdapter({
success: e => {
console.log("蓝牙初始化成功")
that.issearch = false
that.isdevTip = false
that.devList = []
that.startBluetoothDeviceDiscovery()
},
fail: e => {}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false, //
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (device.name.indexOf("WSD") != -1) {
console.log("G02", device)
clearTimeout(myTime);
let buff = device.advertisData.slice(3, 9)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.handleDevice(device)
return;
}
})
});
that.handleMyTime()
},
handleDevice(device) {
let that = this
const foundDevices = that.devicesList
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
that.deviceId = device.deviceId;
console.log("111", idx, device, )
if (idx === -1) {
that.devicesList.push(device);
// if (device.macAddr != "") {
// that.handleDevType(device.macAddr)
// }
}
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.devList.length) {
that.isdevTip = true
that.devList = []
}
that.issearch = true
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.stopBluetoothDevicesDiscovery() //
}, 30000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
handleDevType(sn) {
that = this
that.$model.getdevdetail({
sn: sn,
}).then(res => {
console.log("排查返回", res)
if (res.code == 0) {
res.data.deviceId = sn
that.devList.push(res.data);
}
})
},
handleWeight(item) {
let that = this
that.Unload = true
// bletype 012广
clearTimeout(myTime);
console.log("跳转测量", item)
// if (item.bletype != 2) {
// that.stopBluetoothDevicesDiscovery()
// }
uni.redirectTo({
url: '/pages/devices/G02'
})
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("蓝牙连接状态", res.connected)
that.$store.commit("changeConnected", res.connected);
})
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
}
}
</script>
<style scoped lang="scss">
.text {
position: absolute;
top: 0px;
width: 100%;
text-align: center;
height: 50px;
line-height: 50px;
font-size: 16px;
color: $textcolor;
font-weight: bold;
}
.tips {
position: absolute;
width: 100%;
bottom: 15px;
line-height: 24px;
view {
font-size: 14px;
color: $textcolor;
font-weight: bold;
margin-left: 15px;
}
text {
font-size: 12px;
width: 100%;
display: block;
margin-left: 20px;
color: #999;
}
}
.list {
position: absolute;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.item {
width: 30%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
position: absolute;
left: 55%;
top: -10px;
image {
width: 45px;
height: 45px;
border-radius: 50%;
background-color: #fff;
}
text {
display: block;
width: 100%;
font-size: 12px;
color: #666;
margin-top: 5px;
text-align: center;
}
}
.item:nth-of-type(2) {
left: calc(55% - 60px);
top: 50px;
}
.item:nth-of-type(3) {
left: calc(50% - 140px);
top: 90px;
}
.item:nth-of-type(4) {
left: calc(61% + 20px);
top: 70px;
}
.item:nth-of-type(5) {
left: 20%;
top: -100px;
}
.item:nth-of-type(6) {
left: calc(20% - 16px);
top: -38px;
}
.item:nth-of-type(7) {
left: 0;
top: 15px;
}
.item:nth-of-type(8) {
left: calc(20% + 75px);
top: -150px;
}
.item:nth-of-type(9) {
left: calc(20% + 96px);
top: -80px;
}
.item:nth-of-type(10) {
left: 37px;
top: -170px;
}
.item:nth-of-type(11) {
left: calc(20% + 75px);
top: 130px;
}
.item:nth-of-type(12) {
left: -10px;
top: -104px;
}
.item:nth-of-type(13) {
left: calc(47% + 75px);
top: -150px;
}
.item:nth-of-type(14) {
left: calc(53% + 75px);
top: -50px;
}
}
.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
//
.container::after {
content: "";
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #fbb780;
position: absolute;
z-index: 9;
}
/* 定义范围*/
.point-area {
text-align: center;
position: relative;
width: 400rpx;
height: 400rpx;
transition: opacity 0.5s ease-out;
}
.point-10,
.point-40,
.point-80,
.point-100,
.point-120 {
width: 100%;
height: 100%;
}
.point-10:after,
.point-40:after,
.point-80:after,
.point-100:after,
.point-120:after {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 50%;
opacity: 0;
border: 1px solid #f7cb6b;
animation-play-state: paused;
-webkit-animation-play-state: paused;
}
.point-10:after {
content: '';
animation: ripple 3000ms linear 0ms infinite;
}
.point-40:after {
content: '';
animation: ripple 3000ms linear 600ms infinite;
}
.point-80:after {
content: '';
animation: ripple 3000ms linear 1200ms infinite;
}
.point-100:after {
content: '';
animation: ripple 3000ms linear 1800ms infinite;
}
.point-120:after {
content: '';
animation: ripple 3000ms linear 2400ms infinite;
}
@keyframes ripple {
0% {
opacity: 0;
transform: scale(0.1);
}
50% {
opacity: 0.8;
transform: scale(1);
}
100% {
opacity: 0.2;
transform: scale(2.2);
}
}
</style>

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="common"> <view class="common">
<view class="history"> <view class="history">
<view class="list" v-for="(item, index) in ranklist" :key="index" @click="clickItemMethod(item)"> <view class="list" v-for="(item, index) in ranklist" :key="index"
@click="type=='edit'?handleEdit(item.id):clickItemMethod(item)">
<uni-swipe-action> <uni-swipe-action>
<uni-swipe-action-item :right-options="item.options" @click="swipeClick($event, index)" <uni-swipe-action-item :right-options="item.options" @click="swipeClick($event, index)">
:disabled='type=="edit"?true:false'>
<view class="time"> <view class="time">
<icon class="t-icon t-icon-shijian-mianxing-0"></icon> <icon class="t-icon t-icon-shijian-mianxing-0"></icon>
<text>{{item.record_time}}</text> <text>{{item.record_time}}</text>
@ -15,8 +15,7 @@
<view v-if="item.v3">{{item.v3}}<text>{{item.v3_name}}</text></view> <view v-if="item.v3">{{item.v3}}<text>{{item.v3_name}}</text></view>
<view class="check" v-if="type=='edit'" @click.stop> <view class="check" v-if="type=='edit'" @click.stop>
<uni-icons :type="isActive==item.id?'checkbox-filled':'circle'" size="22" <uni-icons :type="isActive==item.id?'checkbox-filled':'circle'" size="22"
:color="isActive==item.id?'#FEC407':'#dfdfdf'" :color="isActive==item.id?'#FEC407':'#dfdfdf'"></uni-icons>
@click="handleEdit(item.id)"></uni-icons>
</view> </view>
<uni-icons type="right" v-if="type!='edit'&&acd_id!=6"></uni-icons> <uni-icons type="right" v-if="type!='edit'&&acd_id!=6"></uni-icons>
</view> </view>
@ -51,14 +50,15 @@
ranklist: [], ranklist: [],
page: 1, page: 1,
type: "add", type: "add",
lastPage: 1, lastPage: '',
isActive: null, isActive: null,
acd_id: "" acd_id: "",
} }
}, },
onLoad(options) { onLoad(options) {
let that = this let that = this
that.acd_id = options.acd_id that.acd_id = options.acd_id
that.type = options.type ? options.type : 'add'
that.getList() that.getList()
}, },
onReachBottom() { onReachBottom() {
@ -106,9 +106,11 @@
clickItemMethod(item) { clickItemMethod(item) {
let that = this let that = this
if (that.acd_id == "6") return if (that.acd_id == "6") return
uni.navigateTo({ if (that.type == 'add') {
url: "/pages/history/historyDetail?type=" + that.acd_id + '&id=' + item.id uni.navigateTo({
}) url: "/pages/history/historyDetail?type=" + that.acd_id + '&id=' + item.id
})
}
}, },
getList(page) { getList(page) {
@ -134,7 +136,8 @@
}) })
}, },
handleEdit(id) { handleEdit(id) {
this.isActive = id let that = this
that.isActive = that.isActive == id ? null : id
}, },
} }
} }

View File

@ -1,13 +1,13 @@
<template> <template>
<view class="content indexCarList"> <view class="content indexCarList">
<!-- 头部 --> <!-- 头部 -->
<headerIndex></headerIndex> <headerIndex :isArea="false"></headerIndex>
<!-- 卡片数据 --> <!-- 卡片数据 -->
<view class="list"> <view class="list">
<view v-for="(item,index) in user.card_data_list"> <view v-for="(item,index) in user.card_data_list">
<!-- 标题 --> <!-- 标题 -->
<view class="card box"> <view class="card box" @click="handlerReport(item)">
<view class="title border-bottom" @click="handlerReport(item)"> <view class="title border-bottom">
<view class="name"><text>{{item.card_name}}</text>{{item.record_time}}</view> <view class="name"><text>{{item.card_name}}</text>{{item.record_time}}</view>
<uni-icons type="right" size="20" v-if="item.inside_data[0].value"></uni-icons> <uni-icons type="right" size="20" v-if="item.inside_data[0].value"></uni-icons>
</view> </view>
@ -24,10 +24,7 @@
</view> </view>
<!-- 手动记录 --> <!-- 手动记录 -->
<view class="target" @click.stop> <view class="target" @click.stop>
<view class="left"> <view class="left" @click="$tools.handleBluetoothClick()">蓝牙连接</view>
<!-- <icon class="iconfont icon-notification"></icon>
{{ite.name}}教程 -->
</view>
<view class="targetBtn" @click="handlerRecord(item.acd_id)">手动记录</view> <view class="targetBtn" @click="handlerRecord(item.acd_id)">手动记录</view>
</view> </view>
</view> </view>
@ -83,9 +80,9 @@
headerIndex headerIndex
}, },
computed: { computed: {
...mapState(["user"]), ...mapState(["user", "familayList"]),
}, },
onLoad() { onLoad(options) {
let that = this let that = this
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
this.isAndroid = systemInfo.platform.toLowerCase() === 'android'; this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
@ -104,7 +101,9 @@
this.$i18n.locale = e.code; this.$i18n.locale = e.code;
} }
}) })
that.handleUserList() if (options && options.type == 1) {
that.handleUserList()
}
}, },
methods: { methods: {
// //
@ -113,7 +112,7 @@
that.$model.getUserList({ that.$model.getUserList({
type: 2 type: 2
}).then(res => { }).then(res => {
console.log("用户列表", res) console.log("用户列表", res, uni.getStorageSync('userid'))
if (res.code != 0) { if (res.code != 0) {
that.$tools.msg(res.msg) that.$tools.msg(res.msg)
return return
@ -121,14 +120,17 @@
that.$store.commit('changeFamilay', res.data) that.$store.commit('changeFamilay', res.data)
if (res.data.length) { if (res.data.length) {
that.$store.dispatch('getUserInfo', { that.$store.dispatch('getUserInfo', {
aud_id:uni.getStorageSync('userid')?uni.getStorageSync('userid'): res.data[0].id aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
0].id
}) })
that.$store.dispatch("getCardList", { that.$store.dispatch("getCardList", {
aud_id:uni.getStorageSync('userid')?uni.getStorageSync('userid'): res.data[0].id aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
0].id
}) })
} }
}).catch(err => {}) }).catch(err => {})
}, },
// //
handleCard() { handleCard() {
uni.navigateTo({ uni.navigateTo({
@ -138,7 +140,7 @@
// //
handlerReport(item) { handlerReport(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/" + item.card_key + '/' + item.card_key + "?acd_id=" + item.acd_id url: item.page_url_report + "?acd_id = " + item.acd_id
}) })
}, },
// //

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="bg"></view> <!-- <view class="bg"></view> -->
<view class="login"> <view class="login">
<view class="editem"> <view class="editem">
<view class="item"> <view class="item">
@ -31,17 +31,16 @@
</view> </view>
</view> </view>
</view> </view>
<view class="xieyi"> <!-- <view class="xieyi">
<checkbox-group @change="checkboxChange" class="group"> <checkbox-group @change="checkboxChange" class="group">
<label> <label>
<checkbox :value="1" style="transform:scale(0.7)" />{{$t("login.agreement")}} <checkbox :value="1" style="transform:scale(0.7)" />{{$t("login.agreement")}}
<text @click="handlexieyi" @click.stop>{{$t("login.agreementContnt")}}</text> <text @click="handlexieyi" @click.stop>{{$t("login.agreementContnt")}}</text>
</label> </label>
</checkbox-group> </checkbox-group>
</view> </view> -->
<view class="btnlogin" @click="handleTelLogin">确认</view> <view class="btnlogin" @click="handleTelLogin">确认</view>
</view> </view>
</view> </view>
</template> </template>
@ -55,7 +54,7 @@
password2: "", password2: "",
disabled: false, disabled: false,
second: 60, second: 60,
value: 0, value: 1,
type: "" type: ""
} }
}, },
@ -70,7 +69,6 @@
handleTelLogin() { handleTelLogin() {
let that = this let that = this
let phoneType = that.phone.indexOf("@") !== -1 let phoneType = that.phone.indexOf("@") !== -1
console.log("phoneType", phoneType)
if (that.value == 0) { if (that.value == 0) {
that.$tools.msg("请先确认勾选协议") that.$tools.msg("请先确认勾选协议")
return return
@ -115,22 +113,24 @@
} }
uni.setStorageSync('token', res.data.token) uni.setStorageSync('token', res.data.token)
uni.setStorageSync('aan_id', res.data.aan_id) uni.setStorageSync('aan_id', res.data.aan_id)
that.$tools.msg("设置成功,进入程序中")
setTimeout(function() { setTimeout(function() {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "/pages/index/index?type=1"
}) })
}, 2000) }, 1000)
}).catch(err => {}) }).catch(err => {})
}, },
// //
handleCode() { handleCode() {
let that = this let that = this
if (!that.phone) { let phoneType = that.phone.indexOf("@") !== -1
that.$tools.msg(that.$t("login.phonetip")) if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
return return
} }
if (!(/^1[3456789]\d{9}$/.test(that.phone))) { if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("login.phonetipsTwo")) that.$tools.msg("请输入正确的邮箱")
return return
} }
// //

View File

@ -1,10 +1,14 @@
<template> <template>
<view class="content"> <view class="content">
<view class="bg"></view> <view class="bg"></view>
<view class="top">
<image src="../../static/logo.png"></image>
<text>青测</text>
</view>
<view class="login box_shadow"> <view class="login box_shadow">
<view class="title">{{$t("login.title")}}</view> <view class="title">{{$t("login.title")}}</view>
<view class="toggle cblue" @click="handleToggle"> <view class="toggle cblue" @click="handleToggle">
<uni-icons class="iconfont icon-qiehuan cblue mr-5"></uni-icons> <uni-icons class="iconfont icon-qiehuan1 cblue mr-5"></uni-icons>
</view> </view>
<view class="editem"> <view class="editem">
<view class="item"> <view class="item">
@ -28,18 +32,18 @@
<view class="text">密码</view> <view class="text">密码</view>
<view class="input yanzhengma"> <view class="input yanzhengma">
<input class="uni-input" v-model="password" /> <input class="uni-input" v-model="password" />
<text class="forget code" @click="handlePassword('reset_password')">忘记密码</text> <text class="forget code" @click="handlePassword('forgetPassword')">忘记密码</text>
</view> </view>
</view> </view>
</view> </view>
<view class="xieyi"> <!-- <view class="xieyi">
<checkbox-group @change="checkboxChange" class="group"> <checkbox-group @change="checkboxChange" class="group">
<label> <label>
<checkbox :value="1" style="transform:scale(0.7)" />{{$t("login.agreement")}} <checkbox :value="1" style="transform:scale(0.7)" />{{$t("login.agreement")}}
<text @click="handlexieyi" @click.stop>{{$t("login.agreementContnt")}}</text> <text @click="handlexieyi" @click.stop>{{$t("login.agreementContnt")}}</text>
</label> </label>
</checkbox-group> </checkbox-group>
</view> </view> -->
<view class="btnlogin" @click="handleTelLogin">{{$t("login.btn")}}</view> <view class="btnlogin" @click="handleTelLogin">{{$t("login.btn")}}</view>
<view class="btngroup" @click="handlePassword('register')"> <view class="btngroup" @click="handlePassword('register')">
<text>{{$t("login.register")}}</text> <text>{{$t("login.register")}}</text>
@ -58,7 +62,7 @@
password: "", password: "",
disabled: false, disabled: false,
second: 60, second: 60,
value: 0, value: 1,
isCode: true, isCode: true,
} }
}, },
@ -70,7 +74,6 @@
handleTelLogin() { handleTelLogin() {
let that = this let that = this
let phoneType = that.phone.indexOf("@") !== -1 let phoneType = that.phone.indexOf("@") !== -1
console.log("phoneType", phoneType)
if (that.value == 0) { if (that.value == 0) {
that.$tools.msg("请先确认勾选协议") that.$tools.msg("请先确认勾选协议")
return return
@ -101,24 +104,26 @@
that.$tools.msg(res.msg) that.$tools.msg(res.msg)
return return
} }
that.$tools.msg("登录成功,进入程序中")
uni.setStorageSync('token', res.data.token) uni.setStorageSync('token', res.data.token)
uni.setStorageSync('aan_id', res.data.aan_id) uni.setStorageSync('aan_id', res.data.aan_id)
setTimeout(function() { setTimeout(function() {
uni.reLaunch({ uni.reLaunch({
url: "/pages/index/index" url: "/pages/index/index?type=1"
}) })
}, 3000) }, 1000)
}).catch(err => {}) }).catch(err => {})
}, },
// //
handleCode() { handleCode() {
let that = this let that = this
if (!that.phone) { let phoneType = that.phone.indexOf("@") !== -1
that.$tools.msg(that.$t("login.phonetip")) if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
return return
} }
if (!(/^1[3456789]\d{9}$/.test(that.phone))) { if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("login.phonetipsTwo")) that.$tools.msg("请输入正确的邮箱")
return return
} }
// //
@ -164,10 +169,10 @@
.content { .content {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
display: flex; // display: flex;
flex-direction: column; // flex-direction: column;
align-items: center; // align-items: center;
justify-content: center; // justify-content: center;
} }
.bg { .bg {
@ -179,16 +184,42 @@
background: $maincolor; background: $maincolor;
} }
.top {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
position: relative;
top: 80px;
z-index: 99;
image {
width: 70px;
height: 70px;
margin: auto;
margin-bottom: 10px;
border-radius: 50%;
}
text {
display: block;
width: 100%;
text-align: center;
}
}
.login { .login {
width: 75%; width: 86%;
height: auto; height: auto;
background: #fff; background: #fff;
border-radius: 10px; border-radius: 10px;
padding: 10px 15px; padding: 10px 0;
background-color: #fff; background-color: #fff;
z-index: 99; z-index: 99;
position: relative; position: absolute;
margin-left: calc(10% - 40px); left: 7%;
top: 28%;
box-shadow: 0px 1px 5px 2px #dfe2e1fc; box-shadow: 0px 1px 5px 2px #dfe2e1fc;
.title { .title {
@ -197,6 +228,7 @@
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
margin-bottom: 15px; margin-bottom: 15px;
margin-left: 15px;
} }
.toggle { .toggle {
@ -210,6 +242,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
margin: 0 15px;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
@ -274,10 +307,10 @@
} }
.btngroup { .btngroup {
width: 100%;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
display: flex; display: flex;
margin: 0 15px;
justify-content: center; justify-content: center;
text { text {
@ -287,8 +320,8 @@
} }
.btnlogin { .btnlogin {
width: 100%; width: calc(100% - 30px);
margin: 15px 0; margin: 15px;
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
background: $btncolor; background: $btncolor;
@ -302,6 +335,7 @@
.xieyi { .xieyi {
font-size: 12px; font-size: 12px;
color: $textcolor; color: $textcolor;
margin-left: 10px;
text { text {
border-bottom: 1px solid $textcolor; border-bottom: 1px solid $textcolor;

View File

@ -13,7 +13,7 @@
</view> </view>
<view class="title2"> <view class="title2">
<text>{{item.gender==1?'男':'女'}}</text> <text>{{item.gender==1?'男':'女'}}</text>
<text>{{item.birthday}}</text> <text>{{item.age}}</text>
</view> </view>
</view> </view>
@ -60,7 +60,7 @@
if (res.code != 0) return if (res.code != 0) return
that.$tools.msg("删除成功!"); that.$tools.msg("删除成功!");
that.familayList.splice(ind, 1) that.familayList.splice(ind, 1)
that.$store.commit('changeFamilay', that.familayList) that.handleUserList()
}) })
} else if (res.cancel) { } else if (res.cancel) {
that.$tools.msg("您已取消删除!"); that.$tools.msg("您已取消删除!");
@ -68,16 +68,36 @@
} }
}); });
}, },
handleUserList() {
let that = this
that.$model.getUserList({
type: 2
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$store.commit('changeFamilay', res.data)
if (res.data.length) {
that.$store.dispatch('getUserInfo', {
aud_id: res.data[0].id
})
that.$store.dispatch("getCardList", {
aud_id: res.data[0].id
})
}
}).catch(err => {})
},
// //
editorInfo(item) { editorInfo(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/index/userInfo?info=" + JSON.stringify(item) url: "/pages/me/userInfo?info=" + JSON.stringify(item)
}) })
}, },
// //
handleAddUser() { handleAddUser() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/index/userInfo" url: "/pages/me/userInfo"
}) })
}, },
} }

View File

@ -1,13 +1,19 @@
<template> <template>
<view class="content"> <view class="content">
<!-- 头部 --> <!-- 头部 -->
<headerIndex :isArea="false" :isLeft="false"></headerIndex> <view class="top" @click="navTo('/pages/setting/setting')">
<view class="headimg">
<image :src="user.head_pic" class="image"></image>
<view class="size20 bold">{{user.nickname}}</view>
</view>
<text class="t-icon t-icon-arrow-right-bold"></text>
</view>
<!-- --> <!-- -->
<view class="wxlist borderRadius"> <view class="wxlist borderRadius">
<view class="list" @click="navTo('/pages/me/manage')"> <view class="list" @click="navTo('/pages/me/manage')">
<view class="item border-bottom"> <view class="item border-bottom">
<view class="left"> <view class="left">
<view class="name">用户管理</view> <view class="name">成员管理</view>
</view> </view>
<view class="right"> <view class="right">
<uni-icons type="right"></uni-icons> <uni-icons type="right"></uni-icons>
@ -34,7 +40,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="list" @click="navTo('/pages/login/forgetPassword')"> <!-- <view class="list" @click="navTo('/pages/login/forgetPassword?type=forgetPassword')">
<view class="item border-bottom"> <view class="item border-bottom">
<view class="left"> <view class="left">
<view class="name">重置密码</view> <view class="name">重置密码</view>
@ -43,27 +49,60 @@
<uni-icons type="right"></uni-icons> <uni-icons type="right"></uni-icons>
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
<view class="btn mb-15" v-if="token" @click="handleOutLogin">退出登录</view> <view class="btn mb-15" v-if="token" @click="handleOutLogin">退出登录</view>
</view> </view>
</template> </template>
<script> <script>
import {
mapState
} from "vuex";
import headerIndex from "@/components/headerIndex.vue" import headerIndex from "@/components/headerIndex.vue"
export default { export default {
data() { data() {
return { return {
token: "" token: "",
user: {}
} }
}, },
components: { components: {
headerIndex headerIndex
}, },
computed: {
...mapState(["accountNumber", "familayList"]),
nickname() {
return this.accountNumber.nickname
},
userList() {
return this.familayList
}
},
onLoad() { onLoad() {
this.token = uni.getStorageSync('token') let that = this
that.token = uni.getStorageSync('token')
that.handleAccountNumber()
},
watch: {
nickname() {
this.user = {}
this.user = this.accountNumber
}
}, },
methods: { methods: {
handleAccountNumber() {
let that = this
that.$model.getAccountNumber({}).then(res => {
console.log("账号信息", res)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.user = res.data
that.$store.commit('changeAccountNumber', res.data)
}).catch(err => {})
},
handleOutLogin() { handleOutLogin() {
let that = this let that = this
uni.showModal({ uni.showModal({
@ -95,13 +134,42 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content {
background-color: #F3F4F6;
padding: 15px;
min-height: 100vh;
}
.top {
height: auto;
background: #fff;
border-radius: 10px;
display: flex;
padding: 10px;
align-items: center;
justify-content: space-between;
.headimg {
width: 80%;
display: flex;
align-items: center;
}
image {
width: 60px;
height: 60px;
border-radius: 50%;
margin-right: 10px;
}
}
.wxlist { .wxlist {
height: auto; height: auto;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
margin: 0 15px;
background: #fff;
border-radius: 10px;
.item { .item {
width: auto; width: auto;
@ -109,6 +177,10 @@
line-height: 45px; line-height: 45px;
height: 45px; height: 45px;
display: flex; display: flex;
margin-top: 15px;
background: #fff;
padding: 0 10px;
border-radius: 10px;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;

View File

@ -11,6 +11,8 @@
<view class="left">姓名</view> <view class="left">姓名</view>
<view class="right"> <view class="right">
<input name="name" type="text" v-model="memInfo.nickname" placeholder="请输入姓名" /> <input name="name" type="text" v-model="memInfo.nickname" placeholder="请输入姓名" />
<uni-icons type="clear" color="#999" v-if="memInfo.nickname" @click="memInfo.nickname=''"
size="20"></uni-icons>
</view> </view>
</view> </view>
<view class="lan border-bottom"> <view class="lan border-bottom">
@ -22,14 +24,27 @@
</picker> </picker>
</view> </view>
</view> </view>
<view class="lan border-bottom">
<view class="left">身高</view>
<view class="right">
<input name="name" class="mr-5" type="digit" v-model="memInfo.height" placeholder="请输入身高" />CM
<uni-icons type="clear" color="#999" v-if="memInfo.height" @click="memInfo.height=''"
size="20"></uni-icons>
</view>
</view>
<view class="lan border-bottom">
<view class="left">体重</view>
<view class="right">
<input name="name" type="digit" class="mr-5" v-model="memInfo.weight" placeholder="请输入体重" />KG
<uni-icons type="clear" color="#999" v-if="memInfo.weight" @click="memInfo.weight=''"
size="20"></uni-icons>
</view>
</view>
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left">出生日期</view> <view class="left">出生日期</view>
<view class="right"> <view class="right">
<picker class="picker" mode="date" :end="startDate" :value="memInfo.birthday" <uni-datetime-picker type="date" :end="startDate" :clear-icon="false" v-model="memInfo.birthday"
@change="bindDateChange"> @change="maskClick" :border="false" />
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view> </view>
</view> </view>
<view class="lan border-bottom"> <view class="lan border-bottom">
@ -61,7 +76,9 @@
birthday: "", birthday: "",
gender: 0, gender: 0,
nickname: "", nickname: "",
grade: "" grade: "",
height: "",
weight: ""
}, },
headimg: "", headimg: "",
index: 0, index: 0,
@ -70,23 +87,18 @@
}, },
computed: { computed: {
...mapState(["user", "familayList"]), ...mapState(["user", "familayList"]),
userInfo() {
return this.user
},
startDate() { startDate() {
return this.$tools.getDate('start'); return this.$tools.getDate('start');
} }
}, },
onLoad(options) { onLoad(options) {
var agedata = [] let that = this
for (var i = 3; i <= 80; i++) {
agedata.push(i);
}
if (options.info) {
this.memInfo = JSON.parse(options.info)
this.isEdit = true
}
this.handleGradeList() this.handleGradeList()
if (options.info) {
that.memInfo = JSON.parse(options.info)
that.isEdit = true
}
console.log("1111", this.memInfo)
}, },
methods: { methods: {
handleGradeList() { handleGradeList() {
@ -98,6 +110,9 @@
return return
} }
that.gradeList = res.data that.gradeList = res.data
if (that.isEdit == true) {
that.index = res.data.findIndex(ite => ite.id == that.memInfo.grade)
}
}).catch(err => {}) }).catch(err => {})
}, },
// //
@ -111,6 +126,14 @@
that.$tools.msg("请选择性别") that.$tools.msg("请选择性别")
return; return;
} }
if (!that.memInfo.height) {
that.$tools.msg("请选择身高")
return;
}
if (!that.memInfo.weight) {
that.$tools.msg("请选择体重")
return;
}
if (!that.memInfo.birthday) { if (!that.memInfo.birthday) {
that.$tools.msg("请选择出生日期") that.$tools.msg("请选择出生日期")
return; return;
@ -124,26 +147,52 @@
console.log("成功", res) console.log("成功", res)
if (res.code == 0) { if (res.code == 0) {
that.$tools.msg("提交成功"); that.$tools.msg("提交成功");
that.$store.dispatch("getFamilyList", { that.handleUserList(res.data.aud_id)
type: 2
})
//
if (that.memInfo.id = uni.getStorageSync('userid')) {
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid')
})
}
uni.navigateBack({
delta: 1
});
} else { } else {
that.$tools.msg(res.msg); that.$tools.msg(res.msg);
} }
}); });
}, },
handleUserList(id) {
let that = this
that.$model.getUserList({
type: 2
}).then(res => {
console.log("成员列表", res)
that.$store.commit('changeFamilay', res.data)
//
if (that.isEdit && that.memInfo.id == uni.getStorageSync('userid')) {
console.log("修改用户")
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
}
//
if (!that.isEdit) {
console.log("添加用户")
uni.setStorageSync('userid', id)
uni.setStorageSync('gender', that.memInfo.gender)
that.$store.dispatch('getUserInfo', {
aud_id: id
})
that.$store.dispatch("getCardList", {
aud_id: id
})
uni.redirectTo({
url: "/pages/card/card"
})
} else {
uni.navigateBack({
delta: 1
});
}
}).catch(err => {})
},
// //
bindDateChange(e) { maskClick(e) {
this.memInfo.birthday = e.target.value this.memInfo.birthday = e
}, },
// //
onsexArr(e) { onsexArr(e) {
@ -227,19 +276,19 @@
border-bottom: 1px solid #f7f7f7; border-bottom: 1px solid #f7f7f7;
} }
.lan .left { .left {
width: 24%; width: 24%;
text-align: left; text-align: left;
} }
.lan .right { .right {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
width: 72%; width: 72%;
min-height: 38px; height: 38px;
line-height: 38px;
box-sizing: border-box; box-sizing: border-box;
line-height: 36px;
position: relative; position: relative;
text-align: right; text-align: right;
@ -250,6 +299,11 @@
margin-right: 8px; margin-right: 8px;
} }
/deep/input {
height: 35px;
padding-top: 3px;
}
.iconfont { .iconfont {
color: #333333; color: #333333;
font-size: 16px; font-size: 16px;

View File

@ -1,14 +1,17 @@
<template> <template>
<view class="common"> <view class="common">
<view class="history"> <!-- 头部 -->
<view class="list" v-for="(item, index) in ranklist" :key="index" @click="clickItemMethod(item)"> <headerIndex></headerIndex>
<!-- -->
<view class="history" v-if="ranklist.length">
<view class="list" v-for="(item, index) in ranklist" :key="index" @click="clickItemMethod(item.id)">
<view class="item"> <view class="item">
<view class="time"> <view class="time">
<icon class="t-icon t-icon-shijian-mianxing-0"></icon> <icon class="t-icon t-icon-shijian-mianxing-0"></icon>
{{item.createtime}} {{item.create_time}}
</view> </view>
<view class="number"> <view class="number">
75 {{item.score}}
<uni-icons type="right"></uni-icons> <uni-icons type="right"></uni-icons>
</view> </view>
</view> </view>
@ -16,12 +19,14 @@
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view> <view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
</view> </view>
<view class="nolist" v-if="!lastPage"> <view class="nolist" v-if="!lastPage">
<uni-icons class="iconfont icon-zanwu1"></uni-icons> <image src="@/static/none.png"></image>
<text>暂无数据</text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import headerIndex from "@/components/headerIndex.vue";
import { import {
mapState mapState
} from "vuex"; } from "vuex";
@ -31,43 +36,33 @@
}, },
data() { data() {
return { return {
options: [{
text: '取消',
style: {
backgroundColor: '#007aff'
}
}, {
text: '确认',
style: {
backgroundColor: '#dd524d'
}
}],
list: [
"测量时间",
"体重",
"BMI",
"操作",
],
ranklist: [],
page: 1, page: 1,
lastPage: 1, ranklist: [],
type: null, lastPage: "",
id: null,
} }
}, },
mounted() { components: {
headerIndex
},
computed: {
...mapState(["user"]),
userId() {
return this.user.id
}
},
onLoad() {
let that = this let that = this
let list = this.$json.historylist that.page = 1
let options = [{ that.getList(1)
text: '删除', },
style: { watch: {
backgroundColor: '#dd524d' userId() {
} let that = this
}] that.page = 1
list.forEach(item => { that.ranklist = []
item.options = options that.getList(1)
}) console.log("user变了")
this.ranklist = this.ranklist.concat(list) },
}, },
onReachBottom() { onReachBottom() {
let that = this let that = this
@ -83,57 +78,19 @@
this.getList(this.page) this.getList(this.page)
}, },
methods: { methods: {
swipeClick(e, index) { clickItemMethod(id) {
let that = this
let id = that.ranklist[index].id
uni.showModal({
title: '友情提示',
content: '是否删除当前测量记录?',
success: function(res) {
if (res.confirm) {
that.$model.gethistorydelete({
id: id,
}).then((res) => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.ranklist.splice(index, 1)
that.$store.dispatch("getUserInfo", {
familyid: that.user.familyid,
})
that.$store.dispatch("getResult", {
birthday: that.user.birthday,
familyid: that.user.familyid,
height: that.user.height,
sex: that.user.sex,
})
that.$tools.msg("删除成功")
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
}
},
})
},
clickItemMethod(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/score/report?id=" + JSON.stringify(item.id) url: "/pages/score/report?id=" + id
}) })
}, },
getList(page) { getList(page) {
let that = this let that = this
that.$model.getHistoryList({ that.$model.getSportshistory({
familyId: that.user.familyid, aud_id: uni.getStorageSync('userid'),
pageNo: page, page: page,
pageSize: 10
}).then((res) => { }).then((res) => {
console.log("历史记录", res) console.log("历史记录", res)
if (res.code != 0) return if (res.code != 0) return
res.data.rows.forEach(item => {
item.slide_x = 0
})
this.ranklist = this.ranklist.concat(res.data.rows) this.ranklist = this.ranklist.concat(res.data.rows)
this.lastPage = res.data.totalpage this.lastPage = res.data.totalpage
}) })

View File

@ -4,44 +4,27 @@
<view class="box"> <view class="box">
<view class="title bold">本次估分成绩为</view> <view class="title bold">本次估分成绩为</view>
<view class="charts"> <view class="charts">
<qiun-data-charts type="arcbar" :opts="opts" :chartData="chartData" /> <qiun-data-charts type="arcbar" :chartData="chartData" />
</view> </view>
<view class="time text_c">2024年5月10日14:01:38</view> <view class="name">{{score}}</view>
<view class="time text_c">{{create_time}}</view>
</view> </view>
<!-- --> <!-- -->
<view class="indexCarList"> <view v-for="(item,index) in selectllist">
<view v-for="(ite,ind) in selectllist"> <view class="titleName bold mt-15 ml-15 size18">{{item.name}}</view>
<!-- 大标签 --> <view class="indexCarList">
<view class="card box"> <view class="card" v-for="(ite,ind) in item.list">
<view class="title border-bottom" @click="handleHistory(ite.key)"> <view class="title">
<view class="name"><text>{{ite.name}}</text></view> <view class="name">{{ite.name}}</view>
<view>小计得分<text class="cblue">85</text></view>
</view> </view>
<!-- 身体数据 --> <view class="item3" v-for="(it,id) in ite.list">
<view class="item title" v-if="ite.name=='身体数据'"> <view class="name">{{it.name}}</view>
<view> <view class="weight">
<text>身高</text> <view class="input">{{it.value}}{{it.unit}}</view>
<view class="weight"><text>176</text>cm</view> <view class="cblue bold" >{{it.proportion_value}}</view>
<view class="standardBtn">标准</view>
</view>
<view>
<text>体重</text>
<view class="weight"><text>76</text>kg</view>
<view class="standardBtn">标准</view>
</view>
<view>
<text>BMI</text>
<view class="weight"><text>26</text></view>
<view class="standardBtn">标准</view>
</view>
</view>
<!-- 其他数据 -->
<view class="item title" style="justifyContent:center" v-else>
<view class="item2">
<text class="name">本次数据</text>
<view class="weight"><text>{{ite.cnt?ite.cnt:'-'}}</text>{{ite.unit}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -53,47 +36,40 @@
export default { export default {
data() { data() {
return { return {
opts: {
title: {
name: "75",
fontSize: 35,
color: "#4687F9"
},
},
chartData: { chartData: {
series: [{ series: [{
name: "正确率", name: "正确率",
color: "#4687F9", color: "#4687F9",
data: 0.75 data: 0
}] }]
}, },
rtype: "", score: 0,
create_time: "",
selectllist: []
} }
}, },
components: { components: {
qiunDataCharts qiunDataCharts
}, },
onLoad() { onLoad(options) {
this.selectllist = this.$json.selectllist let that = this
that.getList(options.id)
}, },
methods: { methods: {
// getList(id) {
handlerRecord(name) { let that = this
this.rtype = name that.$model.getSportshistorydetail({
this.$store.commit('changeRecord', true) id: Number(id),
}, }).then((res) => {
// console.log("历史记录详情", res)
handleHistory(key) { if (res.code != 0) return
console.log("1111", key) that.selectllist = res.data.list
uni.navigateTo({ that.score = res.data.total_score
url: "/pages/history/history?type=edit&key=" + key that.create_time = res.data.create_time
}) that.chartData.series[0].data = res.data.total_score / 50
},
navTo(url) {
uni.navigateTo({
url: url
}) })
}, },
} }
} }
</script> </script>
@ -101,12 +77,13 @@
<style scoped lang="scss"> <style scoped lang="scss">
.content { .content {
min-height: 100vh; min-height: 100vh;
padding-top: 15px;
padding-bottom: 15px; padding-bottom: 15px;
background-color: #f7f7f7; background-color: #f7f7f7;
} }
.box { .box {
margin: 0 10px 0; margin: 15px 10px 0;
padding: 15px 10px 10px; padding: 15px 10px 10px;
background-color: #fff; background-color: #fff;
width: calc(100% - 40px); width: calc(100% - 40px);
@ -117,50 +94,75 @@
border-radius: 10px; border-radius: 10px;
position: relative; position: relative;
.name {
}
.btn {
width: auto;
color: #fff;
padding: 2px 10px;
border-radius: 10px;
margin: 0 auto;
background: $maincolor;
}
.zhan {
position: absolute;
right: 10px;
top: 10px;
color: #fff;
padding: 10px;
border-radius: 10px;
background: $maincolor;
}
.item {
padding-bottom: 0 !important;
position: relative;
.iconfont {
position: absolute; position: absolute;
bottom: 15px; top: 42%;
right: 15px; margin: auto;
font-size: 22px; font-size: 35px;
color: $btncolor; color: #4687F9;
}
}
.indexCarList {
width: calc(100% - 40px);
margin: 10px;
padding: 5px 10px;
background-color: #fff;
border-radius: 10px;
.title {
color: #000;
background-color: #f5f5f5 !important;
border-bottom: 1px solid #d9d9d9;
padding-left: 10px;
border-radius: 5px;
height: 35px;
display: flex;
align-items: center;
width: calc(100% - 10px);
.name {
font-weight: bold;
margin-top: 3px;
}
.right {
width: 30%;
color: $textcolor;
font-size: 12px;
text-align: right;
margin-top: 5px;
margin-right: 10px;
}
}
.item3 {
display: flex;
background: #fff;
padding: 0 10px;
height: 50px;
border-bottom: 1px solid #f7f7f7;
.name {
width: 35%;
line-height: 50px;
}
.weight {
width: 65%;
display: flex;
align-items: center;
position: relative;
justify-content: space-between;
}
} }
} }
.charts { .charts {
width: 100%; width: 100%;
height: 150px; height: 130px;
margin: 15px 0; margin: 10px 0;
}
.gfbtn {
width: calc(100% - 40px);
margin-top: 20px;
margin-bottom: 20px;
} }
</style> </style>

View File

@ -4,145 +4,258 @@
<headerIndex></headerIndex> <headerIndex></headerIndex>
<!-- 估分 --> <!-- 估分 -->
<view class="box"> <view class="box">
<view class="charts"> <view class="title bold">本次估分成绩为</view>
<qiun-data-charts type="arcbar" :opts="opts" :chartData="chartData" /> <view class="charts mt-15">
<qiun-data-charts type="arcbar" :chartData="chartData" />
</view> </view>
<view class="groupBtn"> <view class="name">{{score?score:'--'}}</view>
<view class="btn history" @click="navTo('/pages/score/history')">估分历史</view>
<!-- <view class="groupBtn">
<view class="btn" @click="navTo('/pages/score/history')">估分历史</view> <view class="btn" @click="navTo('/pages/score/history')">估分历史</view>
<view class="btn" @click="$store.commit('changeSlider',true)">分数占比</view> <view class="btn" @click="$store.commit('changeSlider',true)">分数占比</view>
</view> </view> -->
</view> </view>
<!-- --> <!-- -->
<view class="indexCarList"> <view v-for="(item,index) in selectllist">
<view v-for="(ite,ind) in selectllist"> <view class="titleName bold mt-15 ml-15 size18">{{item.name}}</view>
<!-- 大标签 --> <view class="indexCarList">
<view class="card box"> <view class="card" v-for="(ite,ind) in item.list">
<view class="title border-bottom"> <view class="title">
<view class="name" @click="handleEdit(ind)"> <view class="name">{{ite.name}}</view>
<view class="text">{{ite.name}}</view> <view class="right" v-if="ite.is_choice!=0" @click="handleHistory(ite)">切换项目</view>
</view>
<view class="right">
<uni-icons type="plus" size="22" @click="handleHistory(ite.key)"></uni-icons>
</view>
</view> </view>
<!-- 身体数据 --> <view class="item3" v-for="(it,id) in ite.list">
<view class="item title item1" v-if="ite.name=='身体数据'"> <view class="name">{{it.name}}</view>
<view class="ite">
<view class="mb-10"> <view class="weight" v-if="!it.proportion_value">
身高(cm) <view class="input">
</view> <!-- 整数类型 -->
<view class="weight"> <input type="number" v-model="it.value" confirm-type="done" placeholder="请输入"
<text v-if="ite.disabled">{{ite.height?ite.height:0}}</text> v-if="it.type ==1" />
<input v-else type="digit" v-model="ite.height" confirm-type="done" <!-- 小数类型 -->
@blur="handleBlur($event,ind)" /> <input type="digit" v-model="it.value" confirm-type="done" placeholder="请输入"
maxlength="4" v-else-if="it.type ==2||it.type ==3" />
<!-- 分秒类型 -->
<picker mode="multiSelector" :range="timeList" @change="bindTimeChange($event,it)"
v-else-if="it.type ==4">
<view>{{it.value?it.value:'请选择'}}</view>
<uni-icons type="down" color="#999" size="20" class="down"></uni-icons>
</picker>
<uni-icons type="clear" color="#999" v-if="it.value &&it.type !=4" @click="it.value=''"
size="20"></uni-icons>
</view> </view>
<text>{{it.unit}}</text>
</view> </view>
<view class="ite"> <view v-else class="weight">
<view class="mb-10"> <view class="input">{{it.value}}{{it.unit}}</view>
体重(kg) <view class="cblue bold">{{it.proportion_value}}</view>
</view>
<view class="weight">
<text v-if="ite.disabled">{{ite.Weight?ite.Weight:0}}</text>
<input v-else type="digit" v-model="ite.Weight" confirm-type="done"
@blur="handleBlur($event,ind)" />
</view>
</view>
<view class="ite">
<view class="mb-10">BMI</view>
<view class="weight">
<text v-if="ite.disabled">{{ite.BMI?ite.BMI:0}}</text>
<input v-else type="digit" v-model="ite.BMI" confirm-type="done"
@blur="handleBlur($event,ind)" />
<uni-icons class="iconfont icon-bianji" color="#FEC407"
@click="handleEdit(ind)"></uni-icons>
</view>
</view>
</view>
<!-- 其他数据 -->
<view class="item title" style="justifyContent:center" v-else>
<view class="item2">
<view class="name">本次数据({{ite.unit}})</view>
<view class="weight">
<text v-if="ite.disabled">{{ite.cnt?ite.cnt:0}}</text>
<input v-else type="digit" v-model="ite.cnt" confirm-type="done"
@blur="handleBlur($event,ind)" placeholder="请输入" />
<uni-icons class="iconfont icon-bianji" color="#FEC407"
@click="handleEdit(ind)"></uni-icons>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="gfbtn btn">开始估分</view> <view class="gfbtn" v-if="isSports" @click="getList()">重新估分</view>
<view class="gfbtn" @click="handlescore()" v-else>开始估分</view>
<!-- 占比 --> <!-- 占比 -->
<record :rtype='rtype'></record>
<uslider></uslider> <uslider></uslider>
<!-- 弹框 -->
<view class="wrapper" v-if="isDrawe">
<view class="bg" @click="onTap"></view>
<view class="edit" @click.stop>
<view class="title">请选择</view>
<view class="item" v-for="(item, index) in List" :key="index" @click="toggle(item)">
<uni-icons :type="isActive.name==item.name?'checkbox-filled':'circle'" size="22"
:color="isActive.name==item.name?'#FEC407':'#dfdfdf'"></uni-icons>
<view class="name">
<view class="overflow">
{{item.name}}
</view>
</view>
</view>
<view class="btn close" @click="onTap">取消</view>
<view class="btn" @click="handleTarget">确定</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import uslider from "@/components/slider-fraction.vue"; import uslider from "@/components/slider-fraction.vue";
import headerIndex from "@/components/headerIndex.vue"; import headerIndex from "@/components/headerIndex.vue";
import record from '@/components/manuallyAdd/record.vue';
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'; import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
import { import {
nextTick mapState
} from "vue"; } from "vuex";
export default { export default {
data() { data() {
return { return {
opts: {
title: {
name: "75",
fontSize: 35,
color: "#4687F9"
},
},
chartData: { chartData: {
series: [{ series: [{
name: "正确率", name: "正确率",
color: "#4687F9", color: "#4687F9",
data: 0.75 data: 0.8
}] }]
}, },
rtype: "", sportsList: [],
isRefresh: true, List: [],
score: 0,
isDrawe: false,
selectllist: [],
isActive: {},
region_list: {},
timeList: [],
timesTndex: [0, 0],
isSports: false,
}
},
computed: {
...mapState(["user", "familayList"]),
userId() {
return this.user.id
} }
}, },
components: { components: {
uslider, uslider,
record,
headerIndex, headerIndex,
qiunDataCharts qiunDataCharts
}, },
onLoad() { onLoad() {
this.selectllist = this.$json.selectllist let that = this
that.score = 0
that.selectllist = []
that.sportsList = []
that.timeList = that.$tools.gethms()
if (that.familayList.length) {
that.getList()
that.handleSportsList()
}
},
onShow() {
let that = this
that.isSports = false
if (!that.familayList.length) {
that.score = 0
that.selectllist = []
that.sportsList = []
that.chartData.series[0].data = 0.8
}
},
watch: {
userId() {
let that = this
that.score = 0
that.selectllist = []
that.sportsList = []
that.getList()
that.handleSportsList()
console.log("user变了", that.sportsList, that.selectllist)
},
}, },
methods: { methods: {
// //
handlerRecord(name) { getList() {
this.rtype = name let that = this
this.$store.commit('changeRecord', true) that.isSports = false
}, that.$model.getSportsListAll({
// aud_id: uni.getStorageSync('userid'),
handleHistory(key) { gender: uni.getStorageSync('gender'),
console.log("1111", key) parameter_data: '北京'
uni.navigateTo({ }).then((res) => {
url: "/pages/history/history?type=edit&key=" + key console.log("项目", res)
if (res.code != 0) return
that.score = 0
that.selectllist = res.data.list
that.chartData.series[0].data = 0.8
}) })
}, },
// //
handleBlur(value, ind) { handleSportsList() {
let that = this let that = this
that.selectllist[ind].disabled = true that.$model.getSportsList({
this.$forceUpdate() aud_id: uni.getStorageSync('userid'),
gender: uni.getStorageSync('gender'),
parameter_data: '北京'
}).then((res) => {
console.log("单地区", res)
if (res.code != 0) return
that.sportsList = res.data.list
})
}, },
// //
handleEdit(ind) { handlescore() {
let that = this let that = this
that.selectllist[ind].disabled = false if (!that.familayList.length) {
this.$forceUpdate() that.$tools.msg("请先添加成员")
return
}
that.selectllist.forEach(item => {
item.list.forEach(ite => {
ite.list.forEach(it => {
console.log("1111", it.value)
it.value = it.value == "" ? "0" : it.value
})
})
})
that.$model.getSportsData({
aud_id: uni.getStorageSync('userid'),
gender: uni.getStorageSync('gender'),
parameter_data: '北京市,province',
result_data: JSON.stringify(that.selectllist),
}).then((res) => {
console.log("开始估分", res)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.isSports = true
that.selectllist = res.data.list
that.score = res.data.total_score
that.chartData.series[0].data = Number(res.data.total_score) / 50
})
},
//
handleHistory(item) {
let that = this
that.List = []
that.region_list = item
console.log("添加项目", that.sportsList, that.List)
that.sportsList.forEach(ite => {
if (ite.key == item.key) {
that.List = ite.list
}
})
that.isDrawe = true
},
bindTimeChange(e, it) {
let that = this
let minute = e.target.value[0]
let second = e.target.value[1]
it.value = that.timeList[0][minute].substring(0, 2) + ':' + that.timeList[1][second].substring(0, 2)
console.log(e.target.value, it)
},
//
toggle(item) {
this.isActive = this.isActive.name == item.name ? {} : item
},
//
handleTarget() {
let that = this
that.selectllist.forEach(item => {
item.list.forEach(it => {
if (it.key == that.region_list.key) {
it.list = []
}
})
})
that.region_list.list.push(that.isActive)
that.isDrawe = false
},
//
onTap() {
this.isActive = {}
this.isDrawe = false
}, },
navTo(url) { navTo(url) {
uni.navigateTo({ uni.navigateTo({
@ -171,86 +284,193 @@
align-items: center; align-items: center;
border-radius: 10px; border-radius: 10px;
position: relative; position: relative;
min-height: 30px;
.groupBtn { .groupBtn {
width: 100%; width: 100%;
} }
}
.btn { .name {
width: auto;
color: #fff;
padding: 2px 10px;
border-radius: 10px;
margin: 0 auto;
background: $maincolor;
}
.item {
padding-bottom: 0 !important;
position: relative;
.weight {
width: 40%;
display: flex;
justify-content: center;
align-items: center;
/deep/input {
width: 100%;
margin-right: 10px;
text-align: center;
font-weight: bold;
font-size: 22px;
border-bottom: 1px solid #dfdfdf;
}
}
.iconfont {
position: absolute; position: absolute;
bottom: 0px; top: 45%;
right: 0px; margin: auto;
color: $btncolor; font-size: 35px;
color: #4687F9;
}
.history {
position: absolute;
top: 0px;
right: 10px;
height: 30px;
line-height: 30px;
float: right;
margin-top: 15px;
font-size: 14px;
padding: 0 10px;
background: $maincolor !important;
} }
} }
.ite {
width: 33% !important;
text-align: center;
.weight {
width: 100% !important; .wrapper {
.edit {
background-color: #fff;
} }
}
.name { .item {
width: 50%; width: 100%;
display: flex; height: 40px;
justify-content: left; line-height: 40px;
align-items: center; display: flex;
border-bottom: 1px solid #f7f7f7;
}
.text { .btn {
font-size: 18px; width: 40%;
font-weight: bold; float: right;
margin-right: 10px; margin-top: 15px;
background: $maincolor !important;
}
.edit {
top: 20%
}
.close {
background: #dfdfdf !important;
float: left;
color: #333; color: #333;
} }
} }
.right {
width: 50%;
text-align: right; .indexCarList {
width: calc(100% - 40px);
margin: 10px;
padding: 10px;
background-color: #fff;
border-radius: 10px;
.title {
color: #000;
background-color: #f5f5f5 !important;
border-bottom: 1px solid #d9d9d9;
padding-left: 10px;
border-radius: 5px;
height: 35px;
display: flex;
align-items: center;
width: calc(100% - 10px);
.name {
font-weight: bold;
margin-top: 3px;
}
.right {
width: 30%;
color: $textcolor;
font-size: 12px;
text-align: right;
margin-top: 5px;
margin-right: 10px;
}
}
.item3 {
display: flex;
background: #fff;
padding: 0 10px;
height: 50px;
border-bottom: 1px solid #f7f7f7;
.name {
width: 35%;
line-height: 50px;
}
.weight {
width: 65%;
display: flex;
align-items: center;
position: relative;
justify-content: space-between;
text {
color: #666;
font-size: 12px;
position: absolute;
right: 0;
bottom: 15px;
}
.input {
width: 80% !important;
display: flex;
align-items: center;
position: relative;
justify-content: space-between;
.uni-icons {
position: absolute;
right: 10px;
bottom: 10px;
}
/deep/input,
/deep/picker {
width: 100%;
font-size: 14px;
height: 35px;
line-height: 33px;
text-align: center;
border: 1px solid #dfdfdf;
border-radius: 5px;
background-color: #f7f7f7;
}
/deep/picker {
position: relative;
.down {
position: absolute;
right: 10px;
top: 1px;
}
}
}
}
.iconfont {
color: $btncolor;
}
}
} }
.charts { .charts {
width: 100%; width: 100%;
height: 150px; height: 130px;
} }
.gfbtn { .gfbtn {
width: calc(100% - 40px); width: calc(100% - 40px);
margin-top: 20px; margin-top: 20px;
margin-left: 20px;
color: #fff;
padding: 8px 0;
border-radius: 10px;
text-align: center;
background: $maincolor;
} }
</style> </style>

209
pages/setting/email.vue Normal file
View File

@ -0,0 +1,209 @@
<template>
<view class="content">
<view class="login">
<view class="editem">
<view class="item">
<view class="text">邮箱</view>
<view class="input">
<input v-model="phone" placeholder="" />
</view>
</view>
<view class="item ">
<view class="text">验证码</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" />
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'S后重发':$t("login.sendcode")}}
</button>
</view>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">确认</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
phone: "",
code: "",
disabled: false,
second: 60,
}
},
methods: {
//
handleTelLogin() {
let that = this
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
return
}
if (!that.code) {
that.$tools.msg("请填写验证码")
return
}
that.$model.getAccountMsg({
data: that.phone,
code: that.code,
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
} else {
that.$tools.msg("设置成功!")
that.$store.commit('changeAccountNumber', {
my_email: that.phone
})
uni.redirectTo({
url: "/pages/setting/setting"
})
}
}).catch(err => {})
},
//
handleCode() {
let that = this
if (!that.phone) {
that.$tools.msg("请输入邮箱")
return
}
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg("请输入正确的邮箱")
return
}
//
that.$model.getSendCode({
data: that.phone,
type: that.type
}).then(res => {
console.log(res)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.disabled = true
let interval = setInterval(() => {
--that.second
}, 1000)
setTimeout(() => {
clearInterval(interval)
that.disabled = false
that.second = 60
}, 60000)
}).catch(err => {})
},
}
}
</script>
<style scoped lang="scss">
.content {
width: 100%;
height: 100vh;
}
.login {
width: calc(100% - 30px);
height: auto;
background: #fff;
border-radius: 10px;
padding: 15px;
background-color: #fff;
z-index: 99;
.title {
text-align: left;
color: #333;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 15px;
}
.editem {
position: relative;
display: flex;
align-items: center;
font-size: 28rpx;
justify-content: space-between;
flex-wrap: wrap;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
.text {
width: 80px;
height: 40px;
line-height: 40px;
font-size: 14px;
}
.input {
width: calc(100% - 100px);
height: 35px;
line-height: 35px;
display: flex;
position: relative;
border: #dfdfdf 1px solid;
border-radius: 5px;
padding: 0 10px;
background-color: #f7f7f7;
}
input {
height: 40px;
line-height: 40px;
position: absolute;
left: 10px;
right: 0px;
z-index: 88;
font-size: 14px;
}
.yanzhengma {
input {
right: 120px;
font-size: 28rpx;
}
}
}
.code {
width: 110px;
background: #dfdfdf;
font-size: 12px;
margin: 0;
line-height: 40px;
border-radius: 5px;
text-align: center;
position: absolute;
right: 0px;
top: 0px;
bottom: 0;
z-index: 99;
}
}
.btnlogin {
width: 100%;
margin: 15px 0;
height: 42px;
line-height: 42px;
background: $btncolor;
font-weight: 700;
border-radius: 15px;
text-align: center;
color: #fff !important;
}
}
</style>

139
pages/setting/password.vue Normal file
View File

@ -0,0 +1,139 @@
<template>
<view class="content">
<view class="login">
<view class="editem">
<view class="item">
<view class="text">密码</view>
<view class="input">
<input class="uni-input" v-model="password" />
</view>
</view>
<view class="item">
<view class="text">确认密码</view>
<view class="input">
<input class="uni-input" v-model="password2" />
</view>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">确认</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
password: "",
password2: "",
}
},
onLoad() {},
methods: {
//
handleTelLogin() {
let that = this
if (!that.password) {
that.$tools.msg("请填写密码")
return
}
if (!that.password2) {
that.$tools.msg("请确认密码")
return
}
if (that.password2 != that.password) {
that.$tools.msg("请确认两次密码填写一致")
return
}
that.$model.getAccountPassword({
password: that.password,
c_password: that.password2,
}).then(res => {
console.log("注册", res)
if (res.code != 0) {
that.$tools.msg(res.msg)
} else {
that.$tools.msg("密码设置成功")
uni.navigateBack()
}
}).catch(err => {})
},
}
}
</script>
<style scoped lang="scss">
.content {
width: 100%;
height: 100vh;
}
.login {
width: calc(100% - 30px);
height: auto;
background: #fff;
border-radius: 10px;
padding: 15px;
background-color: #fff;
z-index: 99;
.editem {
position: relative;
display: flex;
align-items: center;
font-size: 28rpx;
justify-content: space-between;
flex-wrap: wrap;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
.text {
width: 80px;
height: 40px;
line-height: 40px;
font-size: 14px;
}
.input {
width: calc(100% - 100px);
height: 35px;
line-height: 35px;
display: flex;
position: relative;
border: #dfdfdf 1px solid;
border-radius: 5px;
padding: 0 10px;
background-color: #f7f7f7;
}
input {
height: 40px;
line-height: 40px;
position: absolute;
left: 10px;
right: 0px;
z-index: 88;
font-size: 14px;
}
}
}
.btnlogin {
width: 100%;
margin: 15px 0;
height: 42px;
line-height: 42px;
background: $btncolor;
font-weight: 700;
border-radius: 15px;
text-align: center;
color: #fff !important;
}
}
</style>

209
pages/setting/phone.vue Normal file
View File

@ -0,0 +1,209 @@
<template>
<view class="content">
<view class="login">
<view class="editem">
<view class="item">
<view class="text">手机号</view>
<view class="input">
<input v-model="phone" placeholder="" />
</view>
</view>
<view class="item ">
<view class="text">验证码</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" />
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'S后重发':$t("login.sendcode")}}
</button>
</view>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">确认</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
phone: "",
code: "",
disabled: false,
second: 60,
}
},
methods: {
//
handleTelLogin() {
let that = this
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
return
}
if (!that.code) {
that.$tools.msg("请填写验证码")
return
}
that.$model.getAccountMsg({
data: that.phone,
code: that.code,
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
} else {
that.$tools.msg("设置成功!")
that.$store.commit('changeAccountNumber', {
my_tel: that.phone
})
uni.redirectTo({
url: "/pages/setting/setting"
})
}
}).catch(err => {})
},
//
handleCode() {
let that = this
if (!that.phone) {
that.$tools.msg("请输入手机号")
return
}
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号")
return
}
//
that.$model.getSendCode({
data: that.phone,
type: that.type
}).then(res => {
console.log(res)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.disabled = true
let interval = setInterval(() => {
--that.second
}, 1000)
setTimeout(() => {
clearInterval(interval)
that.disabled = false
that.second = 60
}, 60000)
}).catch(err => {})
},
}
}
</script>
<style scoped lang="scss">
.content {
width: 100%;
height: 100vh;
}
.login {
width: calc(100% - 30px);
height: auto;
background: #fff;
border-radius: 10px;
padding: 15px;
background-color: #fff;
z-index: 99;
.title {
text-align: left;
color: #333;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 15px;
}
.editem {
position: relative;
display: flex;
align-items: center;
font-size: 28rpx;
justify-content: space-between;
flex-wrap: wrap;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
.text {
width: 80px;
height: 40px;
line-height: 40px;
font-size: 14px;
}
.input {
width: calc(100% - 100px);
height: 35px;
line-height: 35px;
display: flex;
position: relative;
border: #dfdfdf 1px solid;
border-radius: 5px;
padding: 0 10px;
background-color: #f7f7f7;
}
input {
height: 40px;
line-height: 40px;
position: absolute;
left: 10px;
right: 0px;
z-index: 88;
font-size: 14px;
}
.yanzhengma {
input {
right: 120px;
font-size: 28rpx;
}
}
}
.code {
width: 110px;
background: #dfdfdf;
font-size: 12px;
margin: 0;
line-height: 40px;
border-radius: 5px;
text-align: center;
position: absolute;
right: 0px;
top: 0px;
bottom: 0;
z-index: 99;
}
}
.btnlogin {
width: 100%;
margin: 15px 0;
height: 42px;
line-height: 42px;
background: $btncolor;
font-weight: 700;
border-radius: 15px;
text-align: center;
color: #fff !important;
}
}
</style>

116
pages/setting/setting.vue Normal file
View File

@ -0,0 +1,116 @@
<template>
<view class="content">
<view class="caritem">
<view class="text">头像</view>
<image :src="user.head_pic" class="image"></image>
</view>
<view class="caritem">
<view class="text">昵称</view>
<view class="text_r">
<text v-if="!isEdit">{{user.nickname}}</text>
<input v-else type="text" v-model='nickname' @blur="handleBlur" />
<uni-icons type="compose" color="#FEC407" @click="isEdit=true" class="ml-10"></uni-icons>
</view>
</view>
<view class="caritem" @click="navTo('/pages/setting/phone')">
<view class="text">手机号</view>
<view class="text_r">
<text>{{user.my_tel}}</text>
<uni-icons type="right"></uni-icons>
</view>
</view>
<view class="caritem" @click="navTo('/pages/setting/email')">
<view class="text">邮箱</view>
<view class="text_r">
<text>{{user.my_email}}</text>
<uni-icons type="right"></uni-icons>
</view>
</view>
<view class="caritem" @click="navTo('/pages/setting/password')">
<view class="text">设置密码</view>
<uni-icons type="right"></uni-icons>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
isEdit: false,
headimg: null,
nickname: ""
};
},
computed: {
...mapState(["accountNumber"]),
user() {
return this.accountNumber
}
},
methods: {
//
handleBlur() {
let that = this
return that.$model.getAccountNickname({
nickname: that.nickname,
}).then(res => {
if (res.code != 0) return
that.user.nickname = that.nickname
that.$store.commit('changeAccountNumber', {
nickname: that.nickname
})
that.isEdit = false
})
},
navTo(url) {
uni.navigateTo({
url
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #F3F4F6;
padding: 15px;
min-height: 100vh;
}
.image {
width: 40px;
height: 40px;
border-radius: 50%;
}
.text_r {
width: 70%;
display: flex;
align-items: center;
justify-content: flex-end;
input {
width: 80%;
border-bottom: 1px solid #dfdfdf;
}
}
.caritem {
height: 50px;
line-height: 50px;
background-color: #fff;
border-radius: 10px;
padding: 0 10px;
margin-bottom: 15px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View File

@ -2,7 +2,7 @@
<view class="content skipping"> <view class="content skipping">
<!-- --> <!-- -->
<view class="skiptop"> <view class="skiptop">
<!-- <view class="status"><text>设备连接</text></view> --> <view class="status" @click="$tools.handleBluetoothClick()"><text>设备连接</text></view>
<view class="item"> <view class="item">
<view class="item-ite">今日个数<text>{{info?info.today_jump_num:'--'}}</text></view> <view class="item-ite">今日个数<text>{{info?info.today_jump_num:'--'}}</text></view>
<view class="item-ite">今日时长<text>{{info?info.today_jump_time:'--'}}</text></view> <view class="item-ite">今日时长<text>{{info?info.today_jump_time:'--'}}</text></view>
@ -10,11 +10,11 @@
</view> </view>
</view> </view>
<!-- --> <!-- -->
<!-- <view class="tabbar"> <view class="tabbar">
<view @click="active=1" :class="[active==1?'active':'']">自由训练</view> <view @click="active=1" :class="[active==1?'active':'']">自由训练</view>
<view @click="active=2" :class="[active==2?'active':'']">定时训练</view> <view @click="active=2" :class="[active==2?'active':'']">定时训练</view>
<view @click="active=3" :class="[active==3?'active':'']">定数训练</view> <view @click="active=3" :class="[active==3?'active':'']">定数训练</view>
</view> --> </view>
<!--自由训练 --> <!--自由训练 -->
<view class="box1 box" v-if="active==1"> <view class="box1 box" v-if="active==1">
<view class="time">{{info?info.last_record_time:'--'}}</view> <view class="time">{{info?info.last_record_time:'--'}}</view>
@ -161,7 +161,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
width: 100%; width: 100%;
padding-top: 15px;
min-height: 100vh; min-height: 100vh;
background-color: #F5F6FA; background-color: #F5F6FA;
} }

View File

@ -2,7 +2,7 @@
<view class="content"> <view class="content">
<!-- --> <!-- -->
<view class="skiptop"> <view class="skiptop">
<!-- <view class="status"><text>设备连接</text></view> --> <view class="status" @click="$tools.handleBluetoothClick()"><text>设备连接</text></view>
<view class="item"> <view class="item">
<view class="item-ite">平均吸气肺活量<text>{{info?info.average:'--'}}</text></view> <view class="item-ite">平均吸气肺活量<text>{{info?info.average:'--'}}</text></view>
<view class="item-ite">吸气速度<text>--</text></view> <view class="item-ite">吸气速度<text>--</text></view>
@ -10,29 +10,25 @@
</view> </view>
</view> </view>
<!--自由训练 --> <!--自由训练 -->
<view class="box1" v-if="info"> <view class="box1">
<view class="time">{{info?info.time:'--'}}</view> <view class="time">{{info?info.time:''}}</view>
<view class="item"> <view class="item">
<view class="image"> <view class="image">
<image src="../../static/bae.png" mode="widthFix"></image> <image src="../../static/bae.png" mode="widthFix"></image>
</view> </view>
<view class="center"> <view class="center mt-15">
<view class="level"></view> <view class="level"></view>
<view class="level level-bg" :style="{'top':Number(100 - info.offset)+'%'}"></view> <view class="level level-bg" :style="{'top':info?Number(100 - info.offset)+'%':'100%'}"></view>
<view class="level-item"> <view class="level-item" v-if="info">
<view class="ite" v-for="(ite,ind) in info.list">{{ite}}</view> <view class="ite" v-for="(ite,ind) in info.list">{{ite}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="val"> <view class="val" v-if="info">
<text>{{info.average}}</text> <text>{{info.average}}</text>
吸气肺活量平均值 吸气肺活量平均值
</view> </view>
</view> </view>
<view class="nolist" v-else>
<image src="@/static/none.png"></image>
<text>暂无数据请手动添加~</text>
</view>
<!-- --> <!-- -->
<view class="gridList"> <view class="gridList">
<view class="data"> <view class="data">
@ -82,7 +78,6 @@
computed: { computed: {
...mapState(["MeasureLung"]), ...mapState(["MeasureLung"]),
info() { info() {
console.log("11111",this.MeasureLung)
return this.MeasureLung return this.MeasureLung
} }
}, },
@ -115,39 +110,6 @@
background-color: #000; background-color: #000;
} }
.top {
background: $maincolor;
border-radius: 10px;
margin: 0 15px 10px;
font-size: 14px;
padding: 15px 10px;
color: #fff;
.status {
margin-bottom: 25px;
text {
width: auto;
color: #333;
background-color: #fff;
border-radius: 15px;
padding: 5px 10px;
}
}
.item {
display: flex;
justify-content: space-between;
text {
display: block;
width: 100%;
text-align: center;
margin-top: 15px;
}
}
}
.box1 { .box1 {
color: #fff; color: #fff;
margin: 15px; margin: 15px;

BIN
static/devices/HC.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
static/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -2,6 +2,20 @@ import model from "../tools/model.js"
import tools from '@/tools/tools.js' import tools from '@/tools/tools.js'
// Action 包含异步操作请求API方法、回调函数提交mutaions更改state数据状态使之可以异步 // Action 包含异步操作请求API方法、回调函数提交mutaions更改state数据状态使之可以异步
export default { export default {
// 账户信息
getAccountNumber({
commit
}) {
return model.getAccountNumber({}).then(res => {
console.log("账户信息", res.data)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
commit('changeAccountNumber', res.data)
});
},
// 用户信息 // 用户信息
getUserInfo({ getUserInfo({
commit commit
@ -13,6 +27,8 @@ export default {
that.$tools.msg(res.msg) that.$tools.msg(res.msg)
return return
} }
uni.setStorageSync('userid', res.data.id)
uni.setStorageSync('gender', res.data.gender)
commit('changeUser', res.data) commit('changeUser', res.data)
}); });
}, },

View File

@ -15,6 +15,14 @@ export default new Vuex.Store({
card_data_list: [], card_data_list: [],
target_current: {} target_current: {}
}, },
accountNumber: {
create_time: "",
head_pic: "",
last_update_time: "",
my_email: "",
my_tel: "",
nickname: "",
},
MeasureSkip: null, MeasureSkip: null,
MeasureResult: null, MeasureResult: null,
MeasureLung: null, MeasureLung: null,
@ -31,13 +39,18 @@ export default new Vuex.Store({
isFirst: false, //初始体重 isFirst: false, //初始体重
isRecord: false, //手动记录 isRecord: false, //手动记录
isSlider: false, //分数占比 isSlider: false, //分数占比
isConnected: false,
isBluetoothTyle: false,
}, },
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数) // mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
mutations: { mutations: {
// 账户信息
changeAccountNumber(state, newData) {
Object.assign(state.accountNumber, newData)
},
/* 用户信息 */ /* 用户信息 */
changeUser(state, newData) { changeUser(state, newData) {
uni.setStorageSync('userid', newData.id)
Object.assign(state.user, newData) Object.assign(state.user, newData)
}, },
// 卡片列表 // 卡片列表
@ -87,12 +100,26 @@ export default new Vuex.Store({
}, },
//获取家庭成员 //获取家庭成员
changeFamilay(state, newData) { changeFamilay(state, newData) {
if (newData.length == 0) {
uni.setStorageSync('userid', "")
uni.setStorageSync('gender', 0)
state.user.target_current = {}
state.user.card_data_list = []
}
state.familayList = newData state.familayList = newData
}, },
//趋势 //趋势
changeTrend(state, newData) { changeTrend(state, newData) {
state.Trend = newData state.Trend = newData
} },
//蓝牙是否开启
changeBluetooth(state, newData) {
state.isBluetoothTyle = newData
},
// 蓝牙起否连接
changeConnected(state, newData) {
state.isConnected = newData
},
}, },
// 模块化vuex // 模块化vuex
modules: {}, modules: {},

View File

@ -28,6 +28,33 @@ export default {
return res return res
}) })
}, },
getloginversion(param) { // 版本检测
return http.post("/login_invalid_version", param).then(res => {
return res
})
},
// 账户信息
getAccountNumber(param) { // 获取账号信息
return http.post("/get_my_account_msg", param).then(res => {
return res
})
},
getAccountPassword(param) { // 修改密码
return http.post("/update_my_password", param).then(res => {
return res
})
},
getAccountNickname(param) { // 修改昵称
return http.post("/update_my_nickname", param).then(res => {
return res
})
},
getAccountMsg(param) { // 邮箱/手机号绑定
return http.post("/update_my_account_msg", param).then(res => {
return res
})
},
// 首页 // 首页
getUserInfo(param) { // 成员详情 getUserInfo(param) { // 成员详情
return http.post("/get_user_data_information", param).then(res => { return http.post("/get_user_data_information", param).then(res => {
@ -122,6 +149,37 @@ export default {
return res return res
}) })
}, },
// 估分
getSportshistory(param) { //历史
return http.post("/sportstesting_get_all_list", param).then(res => {
return res
})
},
getSportshistorydetail(param) { //历史详情
return http.post("/sportstesting_get_one_details", param).then(res => {
return res
})
},
getSportsResult(param) { //报告
return http.post("/sportstesting_get_last_data", param).then(res => {
return res
})
},
getSportsListAll(param) { //获取地区所有类型项目列表
return http.post("/sportstesting_get_region_list", param).then(res => {
return res
})
},
getSportsList(param) { //获取地区单个项目列表
return http.post("/sportstesting_get_type_list", param).then(res => {
return res
})
},
getSportsData(param) { //开始估分
return http.post("/sportstesting_set_once_data", param).then(res => {
return res
})
},
// 公共 // 公共
gethistory(param) { //历史记录 gethistory(param) { //历史记录
return http.post("/get_all_record_data_page", param).then(res => { return http.post("/get_all_record_data_page", param).then(res => {

View File

@ -11,7 +11,73 @@ export default {
GetDateStr, GetDateStr,
PrefixZero, PrefixZero,
validatePhoneEmail, validatePhoneEmail,
handleBluetoothClick
} }
function handleBluetoothClick() {
uni.openBluetoothAdapter({
success: e => {
$store.commit("changeBluetooth", true);
uni.navigateTo({
url: "/pages/devices/devices"
})
console.log('初始化蓝牙成功:' + e.errMsg);
},
fail: err => {
console.log('初始化蓝牙失败:' + err.errMsg);
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg ===
"openBluetoothAdapter:fail auth deny" ||
err.errMsg === "openBluetoothAdapter:fail authorize no response"
) {
uni.showModal({
title: "提示",
content: "需要您授权使用手机蓝牙",
showCancel: false,
success(modalSuccess) {
uni.openSetting({
success(settingdata) {
if (settingdata.authSetting["scope.bluetooth"]) {
uni.openBluetoothAdapter({
success: e => {
uni.showToast({
title: "获取权限成功,请继续去测量",
icon: "none"
})
$store.commit("changeBluetooth",
true);
},
fail: err => {
uni.showToast({
title: "请打开手机蓝牙",
icon: "none",
duration: 1000,
})
console.log('初始化蓝牙失败:' + err
.errMsg);
}
});
} else {
uni.showToast({
title: "获取权限失败,将无法使用手机蓝牙进行测量",
icon: "none"
})
}
}
})
}
})
} else {
uni.showToast({
title: "请打开手机蓝牙",
icon: "none",
duration: 1000,
})
}
}
});
}
// 2进制位数不足补0 // 2进制位数不足补0
function PrefixZero(num, n) { function PrefixZero(num, n) {
return (Array(n).join(0) + num).slice(-n); return (Array(n).join(0) + num).slice(-n);
@ -114,15 +180,15 @@ function getMonth(dates, months) {
var date = d.getDate(); var date = d.getDate();
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" || if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
month == "12") { month == "12") {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31"; return year + "-" + month + "-01" + "~" + year + "-" + month + "-31";
} else if (month == "02") { } else if (month == "02") {
if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) { if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) {
return year + '/' + month + "/01" + "~" + year + "/" + month + "/29"; return year + '-' + month + "-01" + "~" + year + "-" + month + "-29";
} else { } else {
return year + '/' + month + "/01" + "~" + year + "/" + month + "/28"; return year + '-' + month + "-01" + "~" + year + "-" + month + "-28";
}; };
} else { } else {
return year + '/' + month + "/01" + "~" + year + "/" + month + "/30"; return year + '-' + month + "-01" + "~" + year + "-" + month + "-30";
}; };
}; };
@ -139,11 +205,11 @@ function getDate(type) {
} }
if (type === 'start') { if (type === 'start') {
year = year; year = year;
return `${year}/${month}/${day}`; return `${year}-${month}-${day}`;
} }
if (type === 'end') { if (type === 'end') {
year = year + 60; year = year + 60;
return `${year}/${month}/${day}`; return `${year}-${month}-${day}`;
} }
if (type === 'year') { if (type === 'year') {
year = year; year = year;
@ -151,20 +217,20 @@ function getDate(type) {
} }
if (type === 'month') { if (type === 'month') {
year = year; year = year;
return `${year}/${month}`; return `${year}-${month}`;
} }
if (type == "m") { if (type == "m") {
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" || if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
month == "12") { month == "12") {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31"; return year + "-" + month + "-01" + "~" + year + "-" + month + "-31";
} else if (month == "02") { } else if (month == "02") {
if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) { if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/29"; return year + "-" + month + "-01" + "~" + year + "-" + month + "-29";
} else { } else {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/28"; return year + "-" + month + "-01" + "~" + year + "-" + month + "-28";
}; };
} else { } else {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/30"; return year + "-" + month + "-01" + "~" + year + "-" + month + "-30";
}; };
} }
} }
@ -175,5 +241,5 @@ function GetDateStr(AddDayCount) {
var y = dd.getFullYear(); var y = dd.getFullYear();
var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1); //获取当前月份的日期不足10补0 var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1); //获取当前月份的日期不足10补0
var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); //获取当前几号不足10补0 var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); //获取当前几号不足10补0
return y + "/" + m + "/" + d; return y + "-" + m + "-" + d;
} }

View File

@ -248,7 +248,7 @@ module.exports = {
"extra": { "extra": {
"arcbar": { "arcbar": {
"type": "default", "type": "default",
"width": 12, "width": 10,
"backgroundColor": "#E9E9E9", "backgroundColor": "#E9E9E9",
"startAngle": 0.75, "startAngle": 0.75,
"endAngle": 0.25, "endAngle": 0.25,

View File

@ -237,7 +237,7 @@ const cfu = {
"color": color, "color": color,
"title": { "title": {
"name": "", "name": "",
"fontSize": 25, "fontSize": 22,
"color": "#00FF00" "color": "#00FF00"
}, },
"subtitle": { "subtitle": {
@ -248,7 +248,7 @@ const cfu = {
"extra": { "extra": {
"arcbar": { "arcbar": {
"type": "circle", "type": "circle",
"width": 12, "width": 10,
"backgroundColor": "#E9E9E9", "backgroundColor": "#E9E9E9",
"startAngle": 1.5, "startAngle": 1.5,
"endAngle": 0.25, "endAngle": 0.25,

Binary file not shown.

1
unpackage/cache/apk/apkurl vendored Normal file
View File

@ -0,0 +1 @@
https://app.liuyingyong.cn/build/download/52962370-2546-11ef-95bf-a5fcc7b741b5

File diff suppressed because one or more lines are too long

View File

@ -15,3 +15,6 @@ spaceid_qq=
[universalLinks_weibo] [universalLinks_weibo]
universalLinks_weibo= universalLinks_weibo=
spaceid_weibo= spaceid_weibo=
[appstore]
appstore=

3
unpackage/cache/certdata vendored Normal file
View File

@ -0,0 +1,3 @@
andrCertfile=D:/软件包/HBuilderX.3.6.4.20220922/HBuilderX/plugins/app-safe-pack/Test.keystore
andrCertAlias=android
andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw==

View File

@ -0,0 +1,4 @@
[General]
andrCertfile=package.keystore
andrCertAlias=__UNI__E0E1A21
andrCertPass="CDNxWkNIW3TyAHRusXKAgA=="

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
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>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

View File

@ -0,0 +1,3 @@
{
"prompt" : "template"
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.0.5","code":105},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"abiFilters":["arm64-v8a","x86"],"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\"/>"],"packagename":"qingce.app","custompermissions":true},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"},"plistcmds":["Add :UIFileSharingEnabled bool true"],"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"debug":true,"syncDebug":true,"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html","adid":"122604250007"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,3 @@
{
"prompt" : "template"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"examTeamApp","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"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\"/>"]},"apple":{"dSYMs":false},"plugins":{"share":{},"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"},"fallbackLocale":"en"} {"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.0.5","code":105},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"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\"/>"],"abiFilters":["arm64-v8a","x86"]},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"}},"plugins":{"share":{},"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,3 @@
{
"prompt" : "template"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More