开始做设备
|
|
@ -2,7 +2,7 @@
|
|||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
133
App.vue
|
|
@ -1,13 +1,140 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLaunch: function() {
|
||||
// console.log('App Launch')
|
||||
this.checkForUpdates()
|
||||
console.log('App Launch')
|
||||
},
|
||||
onShow: function() {
|
||||
// console.log('App Show')
|
||||
console.log('App Show')
|
||||
},
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"prompt" : "template"
|
||||
}
|
||||
|
|
@ -639,22 +639,24 @@
|
|||
border-radius: 10px;
|
||||
margin: 0 15px 10px;
|
||||
font-size: 14px;
|
||||
padding: 25px 10px;
|
||||
padding: 25px 10px 15px;
|
||||
color: #fff;
|
||||
|
||||
.status {
|
||||
float: right;
|
||||
margin-bottom: 25px;
|
||||
|
||||
text {
|
||||
width: auto;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
border-radius: 15px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 10px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"selectllist": [{
|
||||
"id": "1",
|
||||
"key": "Weight",
|
||||
"key": "2",
|
||||
"disabled": true,
|
||||
"size": "big",
|
||||
"name": "身体数据",
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
}, {
|
||||
"id": "2",
|
||||
"size": "big",
|
||||
"key": "Skip",
|
||||
"key": "6",
|
||||
"disabled": true,
|
||||
"unit": "个",
|
||||
"name": "跳绳数据",
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
}, {
|
||||
"id": "3",
|
||||
"disabled": true,
|
||||
"key": "Lung",
|
||||
"key": "8",
|
||||
"size": "small",
|
||||
"name": "肺活量",
|
||||
"unit": "ml",
|
||||
|
|
@ -115,6 +115,7 @@
|
|||
"month": 0,
|
||||
"id": "08dbd378-27d1-42d2-87fc-dca513adb60f",
|
||||
"height": 178.00,
|
||||
"type": "false",
|
||||
"fat_r": 0.00,
|
||||
"muscle": 0.00,
|
||||
"water": 0.00,
|
||||
|
|
@ -140,6 +141,7 @@
|
|||
}, {
|
||||
"createtime": "2023-10-23 11:28:30.0000000",
|
||||
"month": 0,
|
||||
"type": "false",
|
||||
"id": "08dbd378-20a5-4991-84f4-a9702018f416",
|
||||
"height": 178.00,
|
||||
"fat_r": 0.00,
|
||||
|
|
@ -172,6 +174,7 @@
|
|||
"fat_r": 0.00,
|
||||
"muscle": 0.00,
|
||||
"water": 0.00,
|
||||
"type": "false",
|
||||
"bone": 0.00,
|
||||
"kcal": 0.00,
|
||||
"fat_w": 0.00,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
<view class="info">
|
||||
<view>{{item.gender==1?'男':'女'}}</view>
|
||||
<view>{{item.birthday}}</view>
|
||||
<view>{{item.age}}岁</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
toggle(val) {
|
||||
let that = this
|
||||
uni.setStorageSync('userid', val.id)
|
||||
uni.setStorageSync('gender', val.gender)
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
aud_id: val.id
|
||||
});
|
||||
|
|
@ -64,9 +65,11 @@
|
|||
},
|
||||
//添加
|
||||
addInfo() {
|
||||
let that = this
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/userInfo"
|
||||
url: "/pages/me/userInfo"
|
||||
})
|
||||
that.$store.commit("changeDrawe", false);
|
||||
},
|
||||
clear() {
|
||||
this.$store.commit("changeDrawe", false);
|
||||
|
|
|
|||
|
|
@ -57,17 +57,17 @@
|
|||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "familayList"]),
|
||||
userList() {
|
||||
return this.familayList
|
||||
}
|
||||
...mapState({
|
||||
user: state => state.user,
|
||||
userList: state => state.familayList
|
||||
})
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
// 添加成员
|
||||
handleAddUser() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/userInfo"
|
||||
url: "/pages/me/userInfo"
|
||||
})
|
||||
},
|
||||
}
|
||||
|
|
@ -84,6 +84,10 @@
|
|||
view {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
last-child {
|
||||
margin-top: 2px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.area {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<view class="editem">
|
||||
<view class="name">个数</view>
|
||||
<view class="right">
|
||||
<input type="digit" v-model="number" placeholder="请输入">个
|
||||
<input type="number" v-model="number" placeholder="请输入">个
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "青测",
|
||||
"appid" : "__UNI__E0E1A21",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionName" : "1.0.5",
|
||||
"versionCode" : 105,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
@ -18,8 +18,7 @@
|
|||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Bluetooth" : {},
|
||||
"Camera" : {}
|
||||
"Bluetooth" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
|
|
@ -41,19 +40,77 @@
|
|||
"<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" ]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
"dSYMs" : false,
|
||||
"idfa" : false,
|
||||
"privacyDescription" : {
|
||||
"NSBluetoothAlwaysUsageDescription" : "连接设备"
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"share" : {},
|
||||
"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" : {},
|
||||
/* 小程序特有相关 */
|
||||
|
|
|
|||
111
pages.json
|
|
@ -11,17 +11,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/userInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "资料",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/card/card",
|
||||
"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",
|
||||
"style": {
|
||||
|
|
@ -216,6 +216,90 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"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": {
|
||||
|
|
@ -240,6 +324,11 @@
|
|||
"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",
|
||||
|
|
|
|||
|
|
@ -4,17 +4,21 @@
|
|||
<!-- 时间选择 -->
|
||||
<view class="boxTime">
|
||||
<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}}
|
||||
<uni-icons class="iconfont icon-arrow-down-bold"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</picker> -->
|
||||
<uni-datetime-picker type="date" :end="startDate" :clear-icon="false"
|
||||
:value="startTime?startTime:startDate" @change="handStartTimeH" :border="false" />
|
||||
<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}}
|
||||
<uni-icons class="iconfont icon-arrow-down-bold"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 曲线图 -->
|
||||
|
|
@ -132,17 +136,17 @@
|
|||
handStartTimeH(e) {
|
||||
let that = this
|
||||
if (that.endTime) {
|
||||
if (Date.parse(e.target.value) > Date.parse(that.endTime)) {
|
||||
if (Date.parse(e) > Date.parse(that.endTime)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (Date.parse(e.target.value) > Date.parse(that.endDate)) {
|
||||
if (Date.parse(e) > Date.parse(that.endDate)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
}
|
||||
that.startTime = e.target.value
|
||||
that.startTime = e
|
||||
let endtime = that.endTime ? that.endTime : that.endDate
|
||||
that.$store.dispatch("GetBodyTrendList", {
|
||||
aud_id: that.user.id,
|
||||
|
|
@ -155,20 +159,20 @@
|
|||
handEndTimeH(e) {
|
||||
let that = this
|
||||
if (that.startTime) {
|
||||
if (Date.parse(e.target.value) < Date.parse(that.startTime)) {
|
||||
if (Date.parse(e) < Date.parse(that.startTime)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (Date.parse(e.target.value) < Date.parse(that.startDate)) {
|
||||
if (Date.parse(e) < Date.parse(that.startDate)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
}
|
||||
that.endTime = e.target.value
|
||||
that.endTime = e
|
||||
let startTime = that.startTime ? that.startTime : that.startDate
|
||||
that.$store.dispatch("GetBodyTrendList", {
|
||||
aud_id: that.user.id,
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
s_time: startTime,
|
||||
e_time: that.endTime
|
||||
})
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
<text class="t-icon-jilu1 t-icon"></text>
|
||||
<view>手动记录</view>
|
||||
</view>
|
||||
<view class="item" @click="$tools.msg('开发中,敬请期待!')">
|
||||
<view class="item" @click="$tools.handleBluetoothClick()">
|
||||
<text class="t-icon-wulianjie t-icon"></text>
|
||||
<view>连接设备</view>
|
||||
</view>
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
data() {
|
||||
return {
|
||||
infoList: [],
|
||||
infoListTop:{}
|
||||
infoListTop: {}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn" @click="handleGradeList()">保存卡片</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -69,6 +71,9 @@
|
|||
that.$store.dispatch('getUserInfo', {
|
||||
aud_id: that.user.id
|
||||
})
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
|
|
@ -77,14 +82,14 @@
|
|||
let that = this
|
||||
that.cardList.user.splice(index, 1)
|
||||
that.cardList.all.push(item)
|
||||
that.handleGradeList()
|
||||
// that.handleGradeList()
|
||||
},
|
||||
// 添加已有的卡片
|
||||
addCard(item, index) {
|
||||
let that = this
|
||||
that.cardList.all.splice(index, 1)
|
||||
that.cardList.user.push(item)
|
||||
that.handleGradeList()
|
||||
// that.handleGradeList()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -148,4 +153,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: auto;
|
||||
margin: 40px 15px 0;
|
||||
background: $btncolor !important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view>
|
||||
<view class="top">
|
||||
<view>性别:{{memInfo.gender=='0'?'未知':memInfo.gender=='1'?'男':'女'}}</view>
|
||||
<view>年龄:{{user.age}}岁</view>
|
||||
<view class="ml-15">年龄:{{user.age}}岁</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -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) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
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>
|
||||
|
|
@ -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) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
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 0:未找到,1:透传,2:广播
|
||||
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>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<view class="common">
|
||||
<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-item :right-options="item.options" @click="swipeClick($event, index)"
|
||||
:disabled='type=="edit"?true:false'>
|
||||
<uni-swipe-action-item :right-options="item.options" @click="swipeClick($event, index)">
|
||||
<view class="time">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
<text>{{item.record_time}}</text>
|
||||
|
|
@ -15,8 +15,7 @@
|
|||
<view v-if="item.v3">{{item.v3}}<text>{{item.v3_name}}</text></view>
|
||||
<view class="check" v-if="type=='edit'" @click.stop>
|
||||
<uni-icons :type="isActive==item.id?'checkbox-filled':'circle'" size="22"
|
||||
:color="isActive==item.id?'#FEC407':'#dfdfdf'"
|
||||
@click="handleEdit(item.id)"></uni-icons>
|
||||
:color="isActive==item.id?'#FEC407':'#dfdfdf'"></uni-icons>
|
||||
</view>
|
||||
<uni-icons type="right" v-if="type!='edit'&&acd_id!=6"></uni-icons>
|
||||
</view>
|
||||
|
|
@ -51,14 +50,15 @@
|
|||
ranklist: [],
|
||||
page: 1,
|
||||
type: "add",
|
||||
lastPage: 1,
|
||||
lastPage: '',
|
||||
isActive: null,
|
||||
acd_id: ""
|
||||
acd_id: "",
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
that.acd_id = options.acd_id
|
||||
that.type = options.type ? options.type : 'add'
|
||||
that.getList()
|
||||
},
|
||||
onReachBottom() {
|
||||
|
|
@ -106,9 +106,11 @@
|
|||
clickItemMethod(item) {
|
||||
let that = this
|
||||
if (that.acd_id == "6") return
|
||||
uni.navigateTo({
|
||||
url: "/pages/history/historyDetail?type=" + that.acd_id + '&id=' + item.id
|
||||
})
|
||||
if (that.type == 'add') {
|
||||
uni.navigateTo({
|
||||
url: "/pages/history/historyDetail?type=" + that.acd_id + '&id=' + item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getList(page) {
|
||||
|
|
@ -134,7 +136,8 @@
|
|||
})
|
||||
},
|
||||
handleEdit(id) {
|
||||
this.isActive = id
|
||||
let that = this
|
||||
that.isActive = that.isActive == id ? null : id
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<view class="content indexCarList">
|
||||
<!-- 头部 -->
|
||||
<headerIndex></headerIndex>
|
||||
<headerIndex :isArea="false"></headerIndex>
|
||||
<!-- 卡片数据 -->
|
||||
<view class="list">
|
||||
<view v-for="(item,index) in user.card_data_list">
|
||||
<!-- 标题 -->
|
||||
<view class="card box">
|
||||
<view class="title border-bottom" @click="handlerReport(item)">
|
||||
<view class="card box" @click="handlerReport(item)">
|
||||
<view class="title border-bottom">
|
||||
<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>
|
||||
</view>
|
||||
|
|
@ -24,10 +24,7 @@
|
|||
</view>
|
||||
<!-- 手动记录 -->
|
||||
<view class="target" @click.stop>
|
||||
<view class="left">
|
||||
<!-- <icon class="iconfont icon-notification"></icon>
|
||||
{{ite.name}}教程 -->
|
||||
</view>
|
||||
<view class="left" @click="$tools.handleBluetoothClick()">蓝牙连接</view>
|
||||
<view class="targetBtn" @click="handlerRecord(item.acd_id)">手动记录</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -83,9 +80,9 @@
|
|||
headerIndex
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
...mapState(["user", "familayList"]),
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
|
||||
|
|
@ -104,7 +101,9 @@
|
|||
this.$i18n.locale = e.code;
|
||||
}
|
||||
})
|
||||
that.handleUserList()
|
||||
if (options && options.type == 1) {
|
||||
that.handleUserList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 成员列表
|
||||
|
|
@ -113,7 +112,7 @@
|
|||
that.$model.getUserList({
|
||||
type: 2
|
||||
}).then(res => {
|
||||
console.log("用户列表", res)
|
||||
console.log("用户列表", res, uni.getStorageSync('userid'))
|
||||
if (res.code != 0) {
|
||||
that.$tools.msg(res.msg)
|
||||
return
|
||||
|
|
@ -121,14 +120,17 @@
|
|||
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
|
||||
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
|
||||
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
|
||||
0].id
|
||||
})
|
||||
}
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
// 设置数据页卡片
|
||||
handleCard() {
|
||||
uni.navigateTo({
|
||||
|
|
@ -138,7 +140,7 @@
|
|||
// 报告页
|
||||
handlerReport(item) {
|
||||
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
|
||||
})
|
||||
},
|
||||
// 手动添加
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="bg"></view>
|
||||
<!-- <view class="bg"></view> -->
|
||||
<view class="login">
|
||||
<view class="editem">
|
||||
<view class="item">
|
||||
|
|
@ -31,17 +31,16 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="xieyi">
|
||||
<!-- <view class="xieyi">
|
||||
<checkbox-group @change="checkboxChange" class="group">
|
||||
<label>
|
||||
<checkbox :value="1" style="transform:scale(0.7)" />{{$t("login.agreement")}}
|
||||
<text @click="handlexieyi" @click.stop>{{$t("login.agreementContnt")}}</text>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="btnlogin" @click="handleTelLogin">确认</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -55,7 +54,7 @@
|
|||
password2: "",
|
||||
disabled: false,
|
||||
second: 60,
|
||||
value: 0,
|
||||
value: 1,
|
||||
type: ""
|
||||
}
|
||||
},
|
||||
|
|
@ -70,7 +69,6 @@
|
|||
handleTelLogin() {
|
||||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
console.log("phoneType", phoneType)
|
||||
if (that.value == 0) {
|
||||
that.$tools.msg("请先确认勾选协议")
|
||||
return
|
||||
|
|
@ -115,22 +113,24 @@
|
|||
}
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
uni.setStorageSync('aan_id', res.data.aan_id)
|
||||
that.$tools.msg("设置成功,进入程序中")
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
url: "/pages/index/index?type=1"
|
||||
})
|
||||
}, 2000)
|
||||
}, 1000)
|
||||
}).catch(err => {})
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg(that.$t("login.phonetip"))
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
return
|
||||
}
|
||||
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("login.phonetipsTwo"))
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="bg"></view>
|
||||
<view class="top">
|
||||
<image src="../../static/logo.png"></image>
|
||||
<text>青测</text>
|
||||
</view>
|
||||
<view class="login box_shadow">
|
||||
<view class="title">{{$t("login.title")}}</view>
|
||||
<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 class="editem">
|
||||
<view class="item">
|
||||
|
|
@ -28,18 +32,18 @@
|
|||
<view class="text">密码</view>
|
||||
<view class="input yanzhengma">
|
||||
<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 class="xieyi">
|
||||
<!-- <view class="xieyi">
|
||||
<checkbox-group @change="checkboxChange" class="group">
|
||||
<label>
|
||||
<checkbox :value="1" style="transform:scale(0.7)" />{{$t("login.agreement")}}
|
||||
<text @click="handlexieyi" @click.stop>{{$t("login.agreementContnt")}}</text>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="btnlogin" @click="handleTelLogin">{{$t("login.btn")}}</view>
|
||||
<view class="btngroup" @click="handlePassword('register')">
|
||||
<text>{{$t("login.register")}}</text>
|
||||
|
|
@ -58,7 +62,7 @@
|
|||
password: "",
|
||||
disabled: false,
|
||||
second: 60,
|
||||
value: 0,
|
||||
value: 1,
|
||||
isCode: true,
|
||||
}
|
||||
},
|
||||
|
|
@ -70,7 +74,6 @@
|
|||
handleTelLogin() {
|
||||
let that = this
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
console.log("phoneType", phoneType)
|
||||
if (that.value == 0) {
|
||||
that.$tools.msg("请先确认勾选协议")
|
||||
return
|
||||
|
|
@ -101,24 +104,26 @@
|
|||
that.$tools.msg(res.msg)
|
||||
return
|
||||
}
|
||||
that.$tools.msg("登录成功,进入程序中")
|
||||
uni.setStorageSync('token', res.data.token)
|
||||
uni.setStorageSync('aan_id', res.data.aan_id)
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
url: "/pages/index/index?type=1"
|
||||
})
|
||||
}, 3000)
|
||||
}, 1000)
|
||||
}).catch(err => {})
|
||||
},
|
||||
// 获取验证码
|
||||
handleCode() {
|
||||
let that = this
|
||||
if (!that.phone) {
|
||||
that.$tools.msg(that.$t("login.phonetip"))
|
||||
let phoneType = that.phone.indexOf("@") !== -1
|
||||
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的手机号")
|
||||
return
|
||||
}
|
||||
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
|
||||
that.$tools.msg(that.$t("login.phonetipsTwo"))
|
||||
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
|
||||
that.$tools.msg("请输入正确的邮箱")
|
||||
return
|
||||
}
|
||||
//
|
||||
|
|
@ -164,10 +169,10 @@
|
|||
.content {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
}
|
||||
|
||||
.bg {
|
||||
|
|
@ -179,16 +184,42 @@
|
|||
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 {
|
||||
width: 75%;
|
||||
width: 86%;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 10px 15px;
|
||||
padding: 10px 0;
|
||||
background-color: #fff;
|
||||
z-index: 99;
|
||||
position: relative;
|
||||
margin-left: calc(10% - 40px);
|
||||
position: absolute;
|
||||
left: 7%;
|
||||
top: 28%;
|
||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||
|
||||
.title {
|
||||
|
|
@ -197,6 +228,7 @@
|
|||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
|
|
@ -210,6 +242,7 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
margin: 0 15px;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
|
|
@ -274,10 +307,10 @@
|
|||
}
|
||||
|
||||
.btngroup {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
display: flex;
|
||||
margin: 0 15px;
|
||||
justify-content: center;
|
||||
|
||||
text {
|
||||
|
|
@ -287,8 +320,8 @@
|
|||
}
|
||||
|
||||
.btnlogin {
|
||||
width: 100%;
|
||||
margin: 15px 0;
|
||||
width: calc(100% - 30px);
|
||||
margin: 15px;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
background: $btncolor;
|
||||
|
|
@ -302,6 +335,7 @@
|
|||
.xieyi {
|
||||
font-size: 12px;
|
||||
color: $textcolor;
|
||||
margin-left: 10px;
|
||||
|
||||
text {
|
||||
border-bottom: 1px solid $textcolor;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
<view class="title2">
|
||||
<text>{{item.gender==1?'男':'女'}}</text>
|
||||
<text>{{item.birthday}}</text>
|
||||
<text>{{item.age}}岁</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
if (res.code != 0) return
|
||||
that.$tools.msg("删除成功!");
|
||||
that.familayList.splice(ind, 1)
|
||||
that.$store.commit('changeFamilay', that.familayList)
|
||||
that.handleUserList()
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
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) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/userInfo?info=" + JSON.stringify(item)
|
||||
url: "/pages/me/userInfo?info=" + JSON.stringify(item)
|
||||
})
|
||||
},
|
||||
//添加
|
||||
handleAddUser() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/userInfo"
|
||||
url: "/pages/me/userInfo"
|
||||
})
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,19 @@
|
|||
<template>
|
||||
<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="list" @click="navTo('/pages/me/manage')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<view class="name">用户管理</view>
|
||||
<view class="name">成员管理</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<uni-icons type="right"></uni-icons>
|
||||
|
|
@ -34,7 +40,7 @@
|
|||
</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="left">
|
||||
<view class="name">重置密码</view>
|
||||
|
|
@ -43,27 +49,60 @@
|
|||
<uni-icons type="right"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="btn mb-15" v-if="token" @click="handleOutLogin">退出登录</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import headerIndex from "@/components/headerIndex.vue"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: ""
|
||||
token: "",
|
||||
user: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
headerIndex
|
||||
},
|
||||
computed: {
|
||||
...mapState(["accountNumber", "familayList"]),
|
||||
nickname() {
|
||||
return this.accountNumber.nickname
|
||||
},
|
||||
userList() {
|
||||
return this.familayList
|
||||
}
|
||||
},
|
||||
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: {
|
||||
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() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
|
|
@ -95,13 +134,42 @@
|
|||
</script>
|
||||
|
||||
<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 {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0 15px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
|
||||
|
||||
|
||||
|
||||
.item {
|
||||
width: auto;
|
||||
|
|
@ -109,6 +177,10 @@
|
|||
line-height: 45px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
margin-top: 15px;
|
||||
background: #fff;
|
||||
padding: 0 10px;
|
||||
border-radius: 10px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
<view class="left">姓名</view>
|
||||
<view class="right">
|
||||
<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 class="lan border-bottom">
|
||||
|
|
@ -22,14 +24,27 @@
|
|||
</picker>
|
||||
</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="left">出生日期</view>
|
||||
<view class="right">
|
||||
<picker class="picker" mode="date" :end="startDate" :value="memInfo.birthday"
|
||||
@change="bindDateChange">
|
||||
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
<uni-datetime-picker type="date" :end="startDate" :clear-icon="false" v-model="memInfo.birthday"
|
||||
@change="maskClick" :border="false" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
|
|
@ -61,7 +76,9 @@
|
|||
birthday: "",
|
||||
gender: 0,
|
||||
nickname: "",
|
||||
grade: ""
|
||||
grade: "",
|
||||
height: "",
|
||||
weight: ""
|
||||
},
|
||||
headimg: "",
|
||||
index: 0,
|
||||
|
|
@ -70,23 +87,18 @@
|
|||
},
|
||||
computed: {
|
||||
...mapState(["user", "familayList"]),
|
||||
userInfo() {
|
||||
return this.user
|
||||
},
|
||||
startDate() {
|
||||
return this.$tools.getDate('start');
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
var agedata = []
|
||||
for (var i = 3; i <= 80; i++) {
|
||||
agedata.push(i);
|
||||
}
|
||||
if (options.info) {
|
||||
this.memInfo = JSON.parse(options.info)
|
||||
this.isEdit = true
|
||||
}
|
||||
let that = this
|
||||
this.handleGradeList()
|
||||
if (options.info) {
|
||||
that.memInfo = JSON.parse(options.info)
|
||||
that.isEdit = true
|
||||
}
|
||||
console.log("1111", this.memInfo)
|
||||
},
|
||||
methods: {
|
||||
handleGradeList() {
|
||||
|
|
@ -98,6 +110,9 @@
|
|||
return
|
||||
}
|
||||
that.gradeList = res.data
|
||||
if (that.isEdit == true) {
|
||||
that.index = res.data.findIndex(ite => ite.id == that.memInfo.grade)
|
||||
}
|
||||
}).catch(err => {})
|
||||
},
|
||||
// 提交
|
||||
|
|
@ -111,6 +126,14 @@
|
|||
that.$tools.msg("请选择性别")
|
||||
return;
|
||||
}
|
||||
if (!that.memInfo.height) {
|
||||
that.$tools.msg("请选择身高")
|
||||
return;
|
||||
}
|
||||
if (!that.memInfo.weight) {
|
||||
that.$tools.msg("请选择体重")
|
||||
return;
|
||||
}
|
||||
if (!that.memInfo.birthday) {
|
||||
that.$tools.msg("请选择出生日期")
|
||||
return;
|
||||
|
|
@ -124,26 +147,52 @@
|
|||
console.log("成功", res)
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg("提交成功");
|
||||
that.$store.dispatch("getFamilyList", {
|
||||
type: 2
|
||||
})
|
||||
// 编辑的当前用户
|
||||
if (that.memInfo.id = uni.getStorageSync('userid')) {
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
aud_id: uni.getStorageSync('userid')
|
||||
})
|
||||
}
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
that.handleUserList(res.data.aud_id)
|
||||
} else {
|
||||
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) {
|
||||
this.memInfo.birthday = e.target.value
|
||||
maskClick(e) {
|
||||
this.memInfo.birthday = e
|
||||
},
|
||||
//确定性别
|
||||
onsexArr(e) {
|
||||
|
|
@ -227,19 +276,19 @@
|
|||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.lan .left {
|
||||
.left {
|
||||
width: 24%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.lan .right {
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
width: 72%;
|
||||
min-height: 38px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
box-sizing: border-box;
|
||||
line-height: 36px;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
|
||||
|
|
@ -250,6 +299,11 @@
|
|||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/deep/input {
|
||||
height: 35px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #333333;
|
||||
font-size: 16px;
|
||||
|
|
@ -1,14 +1,17 @@
|
|||
<template>
|
||||
<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="time">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
{{item.createtime}}
|
||||
{{item.create_time}}
|
||||
</view>
|
||||
<view class="number">
|
||||
75分
|
||||
{{item.score}}
|
||||
<uni-icons type="right"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -16,12 +19,14 @@
|
|||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
</view>
|
||||
<view class="nolist" v-if="!lastPage">
|
||||
<uni-icons class="iconfont icon-zanwu1"></uni-icons>
|
||||
<image src="@/static/none.png"></image>
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerIndex from "@/components/headerIndex.vue";
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
|
|
@ -31,43 +36,33 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
options: [{
|
||||
text: '取消',
|
||||
style: {
|
||||
backgroundColor: '#007aff'
|
||||
}
|
||||
}, {
|
||||
text: '确认',
|
||||
style: {
|
||||
backgroundColor: '#dd524d'
|
||||
}
|
||||
}],
|
||||
list: [
|
||||
"测量时间",
|
||||
"体重",
|
||||
"BMI",
|
||||
"操作",
|
||||
],
|
||||
ranklist: [],
|
||||
page: 1,
|
||||
lastPage: 1,
|
||||
type: null,
|
||||
id: null,
|
||||
ranklist: [],
|
||||
lastPage: "",
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
components: {
|
||||
headerIndex
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
userId() {
|
||||
return this.user.id
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
let list = this.$json.historylist
|
||||
let options = [{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: '#dd524d'
|
||||
}
|
||||
}]
|
||||
list.forEach(item => {
|
||||
item.options = options
|
||||
})
|
||||
this.ranklist = this.ranklist.concat(list)
|
||||
that.page = 1
|
||||
that.getList(1)
|
||||
},
|
||||
watch: {
|
||||
userId() {
|
||||
let that = this
|
||||
that.page = 1
|
||||
that.ranklist = []
|
||||
that.getList(1)
|
||||
console.log("user变了")
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
let that = this
|
||||
|
|
@ -83,57 +78,19 @@
|
|||
this.getList(this.page)
|
||||
},
|
||||
methods: {
|
||||
swipeClick(e, index) {
|
||||
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) {
|
||||
clickItemMethod(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/score/report?id=" + JSON.stringify(item.id)
|
||||
url: "/pages/score/report?id=" + id
|
||||
})
|
||||
},
|
||||
getList(page) {
|
||||
let that = this
|
||||
that.$model.getHistoryList({
|
||||
familyId: that.user.familyid,
|
||||
pageNo: page,
|
||||
pageSize: 10
|
||||
that.$model.getSportshistory({
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
page: page,
|
||||
}).then((res) => {
|
||||
console.log("历史记录", res)
|
||||
if (res.code != 0) return
|
||||
res.data.rows.forEach(item => {
|
||||
item.slide_x = 0
|
||||
})
|
||||
this.ranklist = this.ranklist.concat(res.data.rows)
|
||||
this.lastPage = res.data.totalpage
|
||||
})
|
||||
|
|
|
|||
|
|
@ -4,44 +4,27 @@
|
|||
<view class="box">
|
||||
<view class="title bold">本次估分成绩为</view>
|
||||
<view class="charts">
|
||||
<qiun-data-charts type="arcbar" :opts="opts" :chartData="chartData" />
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" />
|
||||
</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 class="indexCarList">
|
||||
<view v-for="(ite,ind) in selectllist">
|
||||
<!-- 大标签 -->
|
||||
<view class="card box">
|
||||
<view class="title border-bottom" @click="handleHistory(ite.key)">
|
||||
<view class="name"><text>{{ite.name}}</text></view>
|
||||
<view>小计得分:<text class="cblue">85</text></view>
|
||||
<view v-for="(item,index) in selectllist">
|
||||
<view class="titleName bold mt-15 ml-15 size18">{{item.name}}</view>
|
||||
<view class="indexCarList">
|
||||
<view class="card" v-for="(ite,ind) in item.list">
|
||||
<view class="title">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
</view>
|
||||
<!-- 身体数据 -->
|
||||
<view class="item title" v-if="ite.name=='身体数据'">
|
||||
<view>
|
||||
<text>身高</text>
|
||||
<view class="weight"><text>176</text>cm</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 class="item3" v-for="(it,id) in ite.list">
|
||||
<view class="name">{{it.name}}</view>
|
||||
<view class="weight">
|
||||
<view class="input">{{it.value}}{{it.unit}}</view>
|
||||
<view class="cblue bold" >{{it.proportion_value}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -53,47 +36,40 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
opts: {
|
||||
title: {
|
||||
name: "75",
|
||||
fontSize: 35,
|
||||
color: "#4687F9"
|
||||
},
|
||||
},
|
||||
chartData: {
|
||||
series: [{
|
||||
name: "正确率",
|
||||
color: "#4687F9",
|
||||
data: 0.75
|
||||
data: 0
|
||||
}]
|
||||
},
|
||||
rtype: "",
|
||||
score: 0,
|
||||
create_time: "",
|
||||
selectllist: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
qiunDataCharts
|
||||
},
|
||||
onLoad() {
|
||||
this.selectllist = this.$json.selectllist
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
that.getList(options.id)
|
||||
},
|
||||
methods: {
|
||||
// 手动添加
|
||||
handlerRecord(name) {
|
||||
this.rtype = name
|
||||
this.$store.commit('changeRecord', true)
|
||||
},
|
||||
// 选择数据
|
||||
handleHistory(key) {
|
||||
console.log("1111", key)
|
||||
uni.navigateTo({
|
||||
url: "/pages/history/history?type=edit&key=" + key
|
||||
})
|
||||
},
|
||||
navTo(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
getList(id) {
|
||||
let that = this
|
||||
that.$model.getSportshistorydetail({
|
||||
id: Number(id),
|
||||
}).then((res) => {
|
||||
console.log("历史记录详情", res)
|
||||
if (res.code != 0) return
|
||||
that.selectllist = res.data.list
|
||||
that.score = res.data.total_score
|
||||
that.create_time = res.data.create_time
|
||||
that.chartData.series[0].data = res.data.total_score / 50
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -101,12 +77,13 @@
|
|||
<style scoped lang="scss">
|
||||
.content {
|
||||
min-height: 100vh;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin: 0 10px 0;
|
||||
margin: 15px 10px 0;
|
||||
padding: 15px 10px 10px;
|
||||
background-color: #fff;
|
||||
width: calc(100% - 40px);
|
||||
|
|
@ -117,50 +94,75 @@
|
|||
border-radius: 10px;
|
||||
position: relative;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.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 {
|
||||
.name {
|
||||
position: absolute;
|
||||
bottom: 15px;
|
||||
right: 15px;
|
||||
font-size: 22px;
|
||||
color: $btncolor;
|
||||
top: 42%;
|
||||
margin: auto;
|
||||
font-size: 35px;
|
||||
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 {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.gfbtn {
|
||||
width: calc(100% - 40px);
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
height: 130px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -4,145 +4,258 @@
|
|||
<headerIndex></headerIndex>
|
||||
<!-- 估分 -->
|
||||
<view class="box">
|
||||
<view class="charts">
|
||||
<qiun-data-charts type="arcbar" :opts="opts" :chartData="chartData" />
|
||||
<view class="title bold">本次估分成绩为</view>
|
||||
<view class="charts mt-15">
|
||||
<qiun-data-charts type="arcbar" :chartData="chartData" />
|
||||
</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="$store.commit('changeSlider',true)">分数占比</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="indexCarList">
|
||||
<view v-for="(ite,ind) in selectllist">
|
||||
<!-- 大标签 -->
|
||||
<view class="card box">
|
||||
<view class="title border-bottom">
|
||||
<view class="name" @click="handleEdit(ind)">
|
||||
<view class="text">{{ite.name}}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<uni-icons type="plus" size="22" @click="handleHistory(ite.key)"></uni-icons>
|
||||
</view>
|
||||
<view v-for="(item,index) in selectllist">
|
||||
<view class="titleName bold mt-15 ml-15 size18">{{item.name}}</view>
|
||||
<view class="indexCarList">
|
||||
<view class="card" v-for="(ite,ind) in item.list">
|
||||
<view class="title">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="right" v-if="ite.is_choice!=0" @click="handleHistory(ite)">切换项目</view>
|
||||
</view>
|
||||
<!-- 身体数据 -->
|
||||
<view class="item title item1" v-if="ite.name=='身体数据'">
|
||||
<view class="ite">
|
||||
<view class="mb-10">
|
||||
身高(cm)
|
||||
</view>
|
||||
<view class="weight">
|
||||
<text v-if="ite.disabled">{{ite.height?ite.height:0}}</text>
|
||||
<input v-else type="digit" v-model="ite.height" confirm-type="done"
|
||||
@blur="handleBlur($event,ind)" />
|
||||
<view class="item3" v-for="(it,id) in ite.list">
|
||||
<view class="name">{{it.name}}</view>
|
||||
|
||||
<view class="weight" v-if="!it.proportion_value">
|
||||
<view class="input">
|
||||
<!-- 整数类型 -->
|
||||
<input type="number" v-model="it.value" confirm-type="done" placeholder="请输入"
|
||||
v-if="it.type ==1" />
|
||||
<!-- 小数类型 -->
|
||||
<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>
|
||||
<text>{{it.unit}}</text>
|
||||
</view>
|
||||
<view class="ite">
|
||||
<view class="mb-10">
|
||||
体重(kg)
|
||||
</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 v-else class="weight">
|
||||
<view class="input">{{it.value}}{{it.unit}}</view>
|
||||
<view class="cblue bold">{{it.proportion_value}}</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>
|
||||
<!-- 弹框 -->
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uslider from "@/components/slider-fraction.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 {
|
||||
nextTick
|
||||
} from "vue";
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
opts: {
|
||||
title: {
|
||||
name: "75",
|
||||
fontSize: 35,
|
||||
color: "#4687F9"
|
||||
},
|
||||
},
|
||||
chartData: {
|
||||
series: [{
|
||||
name: "正确率",
|
||||
color: "#4687F9",
|
||||
data: 0.75
|
||||
data: 0.8
|
||||
}]
|
||||
},
|
||||
rtype: "",
|
||||
isRefresh: true,
|
||||
sportsList: [],
|
||||
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: {
|
||||
uslider,
|
||||
record,
|
||||
headerIndex,
|
||||
qiunDataCharts
|
||||
},
|
||||
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: {
|
||||
// 手动添加
|
||||
handlerRecord(name) {
|
||||
this.rtype = name
|
||||
this.$store.commit('changeRecord', true)
|
||||
},
|
||||
// 选择数据
|
||||
handleHistory(key) {
|
||||
console.log("1111", key)
|
||||
uni.navigateTo({
|
||||
url: "/pages/history/history?type=edit&key=" + key
|
||||
//
|
||||
getList() {
|
||||
let that = this
|
||||
that.isSports = false
|
||||
that.$model.getSportsListAll({
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
gender: uni.getStorageSync('gender'),
|
||||
parameter_data: '北京'
|
||||
}).then((res) => {
|
||||
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
|
||||
that.selectllist[ind].disabled = true
|
||||
this.$forceUpdate()
|
||||
that.$model.getSportsList({
|
||||
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
|
||||
that.selectllist[ind].disabled = false
|
||||
this.$forceUpdate()
|
||||
if (!that.familayList.length) {
|
||||
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) {
|
||||
uni.navigateTo({
|
||||
|
|
@ -171,86 +284,193 @@
|
|||
align-items: center;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
min-height: 30px;
|
||||
|
||||
.groupBtn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
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 {
|
||||
.name {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
color: $btncolor;
|
||||
top: 45%;
|
||||
margin: auto;
|
||||
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 {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
.btn {
|
||||
width: 40%;
|
||||
float: right;
|
||||
margin-top: 15px;
|
||||
background: $maincolor !important;
|
||||
}
|
||||
|
||||
.edit {
|
||||
top: 20%
|
||||
}
|
||||
|
||||
.close {
|
||||
background: #dfdfdf !important;
|
||||
float: left;
|
||||
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 {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
height: 130px;
|
||||
}
|
||||
|
||||
.gfbtn {
|
||||
width: calc(100% - 40px);
|
||||
margin-top: 20px;
|
||||
margin-left: 20px;
|
||||
color: #fff;
|
||||
padding: 8px 0;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
background: $maincolor;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="content skipping">
|
||||
<!-- -->
|
||||
<view class="skiptop">
|
||||
<!-- <view class="status"><text>设备连接</text></view> -->
|
||||
<view class="status" @click="$tools.handleBluetoothClick()"><text>设备连接</text></view>
|
||||
<view class="item">
|
||||
<view class="item-ite">今日个数<text>{{info?info.today_jump_num:'--'}}</text></view>
|
||||
<view class="item-ite">今日时长<text>{{info?info.today_jump_time:'--'}}</text></view>
|
||||
|
|
@ -10,11 +10,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- <view class="tabbar">
|
||||
<view class="tabbar">
|
||||
<view @click="active=1" :class="[active==1?'active':'']">自由训练</view>
|
||||
<view @click="active=2" :class="[active==2?'active':'']">定时训练</view>
|
||||
<view @click="active=3" :class="[active==3?'active':'']">定数训练</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!--自由训练 -->
|
||||
<view class="box1 box" v-if="active==1">
|
||||
<view class="time">{{info?info.last_record_time:'--'}}</view>
|
||||
|
|
@ -161,7 +161,6 @@
|
|||
<style lang="scss" scoped>
|
||||
.content {
|
||||
width: 100%;
|
||||
padding-top: 15px;
|
||||
min-height: 100vh;
|
||||
background-color: #F5F6FA;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="content">
|
||||
<!-- -->
|
||||
<view class="skiptop">
|
||||
<!-- <view class="status"><text>设备连接</text></view> -->
|
||||
<view class="status" @click="$tools.handleBluetoothClick()"><text>设备连接</text></view>
|
||||
<view class="item">
|
||||
<view class="item-ite">平均吸气肺活量<text>{{info?info.average:'--'}}</text></view>
|
||||
<view class="item-ite">吸气速度<text>--</text></view>
|
||||
|
|
@ -10,29 +10,25 @@
|
|||
</view>
|
||||
</view>
|
||||
<!--自由训练 -->
|
||||
<view class="box1" v-if="info">
|
||||
<view class="time">{{info?info.time:'--'}}</view>
|
||||
<view class="box1">
|
||||
<view class="time">{{info?info.time:''}}</view>
|
||||
<view class="item">
|
||||
<view class="image">
|
||||
<image src="../../static/bae.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="center">
|
||||
<view class="center mt-15">
|
||||
<view class="level"></view>
|
||||
<view class="level level-bg" :style="{'top':Number(100 - info.offset)+'%'}"></view>
|
||||
<view class="level-item">
|
||||
<view class="level level-bg" :style="{'top':info?Number(100 - info.offset)+'%':'100%'}"></view>
|
||||
<view class="level-item" v-if="info">
|
||||
<view class="ite" v-for="(ite,ind) in info.list">{{ite}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="val">
|
||||
<view class="val" v-if="info">
|
||||
<text>{{info.average}}</text>
|
||||
吸气肺活量平均值
|
||||
</view>
|
||||
</view>
|
||||
<view class="nolist" v-else>
|
||||
<image src="@/static/none.png"></image>
|
||||
<text>暂无数据,请手动添加~</text>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="gridList">
|
||||
<view class="data">
|
||||
|
|
@ -82,7 +78,6 @@
|
|||
computed: {
|
||||
...mapState(["MeasureLung"]),
|
||||
info() {
|
||||
console.log("11111",this.MeasureLung)
|
||||
return this.MeasureLung
|
||||
}
|
||||
},
|
||||
|
|
@ -115,39 +110,6 @@
|
|||
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 {
|
||||
color: #fff;
|
||||
margin: 15px;
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 23 KiB |
BIN
static/logo.png
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 106 KiB |
|
|
@ -2,6 +2,20 @@ import model from "../tools/model.js"
|
|||
import tools from '@/tools/tools.js'
|
||||
// Action 包含异步操作(请求API方法)、回调函数提交mutaions更改state数据状态,使之可以异步
|
||||
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({
|
||||
commit
|
||||
|
|
@ -13,6 +27,8 @@ export default {
|
|||
that.$tools.msg(res.msg)
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('userid', res.data.id)
|
||||
uni.setStorageSync('gender', res.data.gender)
|
||||
commit('changeUser', res.data)
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -15,6 +15,14 @@ export default new Vuex.Store({
|
|||
card_data_list: [],
|
||||
target_current: {}
|
||||
},
|
||||
accountNumber: {
|
||||
create_time: "",
|
||||
head_pic: "",
|
||||
last_update_time: "",
|
||||
my_email: "",
|
||||
my_tel: "",
|
||||
nickname: "",
|
||||
},
|
||||
MeasureSkip: null,
|
||||
MeasureResult: null,
|
||||
MeasureLung: null,
|
||||
|
|
@ -31,13 +39,18 @@ export default new Vuex.Store({
|
|||
isFirst: false, //初始体重
|
||||
isRecord: false, //手动记录
|
||||
isSlider: false, //分数占比
|
||||
isConnected: false,
|
||||
isBluetoothTyle: false,
|
||||
|
||||
},
|
||||
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
||||
mutations: {
|
||||
// 账户信息
|
||||
changeAccountNumber(state, newData) {
|
||||
Object.assign(state.accountNumber, newData)
|
||||
},
|
||||
/* 用户信息 */
|
||||
changeUser(state, newData) {
|
||||
uni.setStorageSync('userid', newData.id)
|
||||
Object.assign(state.user, newData)
|
||||
},
|
||||
// 卡片列表
|
||||
|
|
@ -87,12 +100,26 @@ export default new Vuex.Store({
|
|||
},
|
||||
//获取家庭成员
|
||||
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
|
||||
},
|
||||
//趋势
|
||||
changeTrend(state, newData) {
|
||||
state.Trend = newData
|
||||
}
|
||||
},
|
||||
//蓝牙是否开启
|
||||
changeBluetooth(state, newData) {
|
||||
state.isBluetoothTyle = newData
|
||||
},
|
||||
// 蓝牙起否连接
|
||||
changeConnected(state, newData) {
|
||||
state.isConnected = newData
|
||||
},
|
||||
},
|
||||
// 模块化vuex
|
||||
modules: {},
|
||||
|
|
|
|||
|
|
@ -28,6 +28,33 @@ export default {
|
|||
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) { // 成员详情
|
||||
return http.post("/get_user_data_information", param).then(res => {
|
||||
|
|
@ -122,6 +149,37 @@ export default {
|
|||
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) { //历史记录
|
||||
return http.post("/get_all_record_data_page", param).then(res => {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,73 @@ export default {
|
|||
GetDateStr,
|
||||
PrefixZero,
|
||||
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
|
||||
function PrefixZero(num, n) {
|
||||
return (Array(n).join(0) + num).slice(-n);
|
||||
|
|
@ -114,15 +180,15 @@ function getMonth(dates, months) {
|
|||
var date = d.getDate();
|
||||
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
|
||||
month == "12") {
|
||||
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31";
|
||||
return year + "-" + month + "-01" + "~" + year + "-" + month + "-31";
|
||||
} else if (month == "02") {
|
||||
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 {
|
||||
return year + '/' + month + "/01" + "~" + year + "/" + month + "/28";
|
||||
return year + '-' + month + "-01" + "~" + year + "-" + month + "-28";
|
||||
};
|
||||
} 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') {
|
||||
year = year;
|
||||
return `${year}/${month}/${day}`;
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
if (type === 'end') {
|
||||
year = year + 60;
|
||||
return `${year}/${month}/${day}`;
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
if (type === 'year') {
|
||||
year = year;
|
||||
|
|
@ -151,20 +217,20 @@ function getDate(type) {
|
|||
}
|
||||
if (type === 'month') {
|
||||
year = year;
|
||||
return `${year}/${month}`;
|
||||
return `${year}-${month}`;
|
||||
}
|
||||
if (type == "m") {
|
||||
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
|
||||
month == "12") {
|
||||
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31";
|
||||
return year + "-" + month + "-01" + "~" + year + "-" + month + "-31";
|
||||
} else if (month == "02") {
|
||||
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 {
|
||||
return year + "/" + month + "/01" + "~" + year + "/" + month + "/28";
|
||||
return year + "-" + month + "-01" + "~" + year + "-" + month + "-28";
|
||||
};
|
||||
} 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 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
|
||||
return y + "/" + m + "/" + d;
|
||||
return y + "-" + m + "-" + d;
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@ module.exports = {
|
|||
"extra": {
|
||||
"arcbar": {
|
||||
"type": "default",
|
||||
"width": 12,
|
||||
"width": 10,
|
||||
"backgroundColor": "#E9E9E9",
|
||||
"startAngle": 0.75,
|
||||
"endAngle": 0.25,
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ const cfu = {
|
|||
"color": color,
|
||||
"title": {
|
||||
"name": "",
|
||||
"fontSize": 25,
|
||||
"fontSize": 22,
|
||||
"color": "#00FF00"
|
||||
},
|
||||
"subtitle": {
|
||||
|
|
@ -248,7 +248,7 @@ const cfu = {
|
|||
"extra": {
|
||||
"arcbar": {
|
||||
"type": "circle",
|
||||
"width": 12,
|
||||
"width": 10,
|
||||
"backgroundColor": "#E9E9E9",
|
||||
"startAngle": 1.5,
|
||||
"endAngle": 0.25,
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
https://app.liuyingyong.cn/build/download/52962370-2546-11ef-95bf-a5fcc7b741b5
|
||||
|
|
@ -15,3 +15,6 @@ spaceid_qq=
|
|||
[universalLinks_weibo]
|
||||
universalLinks_weibo=
|
||||
spaceid_weibo=
|
||||
|
||||
[appstore]
|
||||
appstore=
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
andrCertfile=D:/软件包/HBuilderX.3.6.4.20220922/HBuilderX/plugins/app-safe-pack/Test.keystore
|
||||
andrCertAlias=android
|
||||
andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw==
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[General]
|
||||
andrCertfile=package.keystore
|
||||
andrCertAlias=__UNI__E0E1A21
|
||||
andrCertPass="CDNxWkNIW3TyAHRusXKAgA=="
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
|
@ -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>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"prompt" : "template"
|
||||
}
|
||||
|
|
@ -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()})([]);
|
||||
|
|
@ -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"}
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
23
unpackage/cache/wgt/__UNI__E0E1A21/uni_modules/qiun-data-charts/static/app-plus/echarts.min.js
vendored
Normal file
BIN
unpackage/cache/wgt/__UNI__E0E1A21/uni_modules/uni-icons/components/uni-icons/uniicons.ttf
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"prompt" : "template"
|
||||
}
|
||||
|
|
@ -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"}
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"prompt" : "template"
|
||||
}
|
||||