不显示儿童测量
|
|
@ -0,0 +1,473 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="content weightPages">
|
||||
<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="text">{{textH}}</view>
|
||||
<view class="image">
|
||||
<image src="/BLEPages/static/Hd01bt01.gif" v-if="type == 1"></image>
|
||||
<image src="/BLEPages/static/Hd01bt02.gif" v-if="type == 2"></image>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>提示:</text>
|
||||
<text>1.请确定设备是开机状态</text>
|
||||
<text>2.请确定手机蓝牙、位置信息已打开</text>
|
||||
<text>3.ios系统需打开设置—>应用—>微信里的蓝牙权限</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
var myTime;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: "",
|
||||
textH: "",
|
||||
height: "",
|
||||
weight: "",
|
||||
imp: 0,
|
||||
type: 1,
|
||||
uuid1: "",
|
||||
uuid2: "",
|
||||
uuid3: "",
|
||||
macAddr: "",
|
||||
deviceId: "",
|
||||
serviceId: "",
|
||||
type30: false,
|
||||
Unload: false,
|
||||
isConnection: 0, //是否连接成功
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "isConnected", "isBluetoothTyle", "appTheme"]),
|
||||
info() {
|
||||
return this.user
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
let that = this
|
||||
if (!that.Unload) {
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
clearTimeout(myTime);
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
console.log("返回首页")
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
// 导航栏颜色
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: this.appTheme,
|
||||
})
|
||||
//
|
||||
that.text = ""
|
||||
that.textH = ""
|
||||
that.imp = 0
|
||||
if (options && options.deviceId) {
|
||||
that.deviceId = options.deviceId
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
that.openBluetoothAdapter()
|
||||
}
|
||||
|
||||
that.onBLEConnectionStateChange()
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
},
|
||||
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
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 初始化蓝牙
|
||||
openBluetoothAdapter() {
|
||||
let that = this
|
||||
that.type = 1
|
||||
that.text = ""
|
||||
that.textH = ""
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
that.isConnection = 0
|
||||
that.startBluetoothDeviceDiscovery()
|
||||
},
|
||||
fail: e => {
|
||||
that.isConnection = 2
|
||||
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
|
||||
}
|
||||
});
|
||||
},
|
||||
// 开始搜寻附近的蓝牙外围设备
|
||||
startBluetoothDeviceDiscovery() {
|
||||
let that = this
|
||||
uni.startBluetoothDevicesDiscovery({
|
||||
allowDuplicatesKey: false,
|
||||
interval: 500, //上报设备的间隔
|
||||
services: [
|
||||
"FFE0",
|
||||
],
|
||||
success: res => {
|
||||
that.isConnection = 0
|
||||
that.onBluetoothDeviceFound();
|
||||
},
|
||||
fail: res => {
|
||||
that.isConnection = 2
|
||||
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 发现外围设备
|
||||
*/
|
||||
onBluetoothDeviceFound() {
|
||||
var that = this;
|
||||
that.isConnection = 0
|
||||
uni.onBluetoothDeviceFound(res => {
|
||||
res.devices.forEach(device => {
|
||||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.indexOf('AiLink_') != -1 || (device.localName && device.localName
|
||||
.indexOf('AiLink_') != -1)) {
|
||||
clearTimeout(myTime);
|
||||
let buff = device.advertisData.slice(-6)
|
||||
device.mac = new Uint8Array(buff) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
let tempMac = Array.from(device.mac)
|
||||
tempMac.reverse()
|
||||
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
|
||||
if (device.deviceId.indexOf(that.deviceId) != -1 || device.macAddr.indexOf(that
|
||||
.deviceId) != -1) {
|
||||
that.stopBluetoothDevicesDiscovery()
|
||||
that.macAddr = device.macAddr
|
||||
that.deviceId = device.deviceId;
|
||||
that.createBLEConnection()
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
that.handleMyTime()
|
||||
},
|
||||
handleMyTime() {
|
||||
var that = this;
|
||||
myTime = setTimeout(function() {
|
||||
if (!that.macAddr) {
|
||||
clearTimeout(myTime);
|
||||
that.Unload = true
|
||||
that.isConnection = 2
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
}
|
||||
}, 20000);
|
||||
},
|
||||
/**
|
||||
* 停止搜索蓝牙设备
|
||||
*/
|
||||
stopBluetoothDevicesDiscovery() {
|
||||
uni.stopBluetoothDevicesDiscovery({
|
||||
success: e => {
|
||||
console.log("停止搜索蓝牙设备", e)
|
||||
},
|
||||
});
|
||||
},
|
||||
// 监听蓝牙连接状态
|
||||
onBLEConnectionStateChange() {
|
||||
let that = this
|
||||
uni.onBLEConnectionStateChange(function(res) {
|
||||
console.log("监听蓝牙连接状态", res.connected)
|
||||
if (!res.connected) {
|
||||
that.Unload = true
|
||||
that.isConnection = 2
|
||||
clearTimeout(myTime);
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
}
|
||||
that.$store.commit("changeConnected", res.connected);
|
||||
})
|
||||
},
|
||||
// 连接蓝牙
|
||||
createBLEConnection() {
|
||||
let that = this;
|
||||
uni.createBLEConnection({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
that.isConnection = 0
|
||||
that.getBLEDeviceServices();
|
||||
},
|
||||
fail: res => {
|
||||
that.isConnection = 2
|
||||
console.log("设备连接失败,请重新连接", res);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取设备的UUID
|
||||
*/
|
||||
getBLEDeviceServices() {
|
||||
let serviceList = [];
|
||||
let that = this;
|
||||
uni.getBLEDeviceServices({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
console.log("获取设备的UUID成功", res)
|
||||
serviceList = res.services;
|
||||
for (let i = 0; i < serviceList.length; i++) {
|
||||
let service = serviceList[i];
|
||||
if (service.uuid.indexOf("FFE0") != -1) {
|
||||
that.isConnection = 1
|
||||
that.serviceId = service.uuid;
|
||||
that.getBLEDeviceCharacteristics();
|
||||
console.log("设备的FFE0的serviceId: " + that.serviceId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取设备的UUID失败:', res)
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取指定服务的特征值
|
||||
*/
|
||||
getBLEDeviceCharacteristics() {
|
||||
let characteristicsList = [];
|
||||
let that = this;
|
||||
uni.getBLEDeviceCharacteristics({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
success: res => {
|
||||
console.log("服务的特征值成功", res)
|
||||
for (let i = 0; i < res.characteristics.length; i++) {
|
||||
let item = res.characteristics[i];
|
||||
if (item.uuid.indexOf('0000FFE1') != -1) {
|
||||
that.uuid1 = item.uuid //下发数据
|
||||
} else if (item.uuid.indexOf('0000FFE2') != -1) {
|
||||
that.uuid2 = item.uuid //监听数据
|
||||
} else if (item.uuid.indexOf('0000FFE3') != -1) {
|
||||
that.uuid3 = item.uuid //写入设置
|
||||
}
|
||||
}
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.uuid2,
|
||||
state: true,
|
||||
})
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.uuid3,
|
||||
state: true,
|
||||
})
|
||||
// that.sendData()
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
let value = that.$tools.ab2hex(res.value, "");
|
||||
let num = value.substring(18, 19)
|
||||
let dw = value.substring(19, 20)
|
||||
let type = value.substring(8, 10)
|
||||
let typeInfo = value.substring(10, 12)
|
||||
console.log("单位", value, dw)
|
||||
if (type == "10") {
|
||||
let data = parseInt(value.substring(13, 18), 16)
|
||||
let dw1 = "kg"
|
||||
let dw2 = "kg"
|
||||
if (dw == "1") {
|
||||
dw1 = "斤"
|
||||
dw2 = "jin"
|
||||
}
|
||||
if (dw == "4") {
|
||||
dw1 = "st:lb"
|
||||
dw2 = "st"
|
||||
data = 1 * data + 5
|
||||
}
|
||||
if (dw == "6") {
|
||||
dw1 = "lb"
|
||||
dw2 = "lb"
|
||||
}
|
||||
if (num == "1") {
|
||||
data = parseInt(value.substring(13, 18), 16) / 10
|
||||
}
|
||||
if (num == "2") {
|
||||
data = parseInt(value.substring(13, 18), 16) / 100
|
||||
}
|
||||
if (num == "3") {
|
||||
data = parseInt(value.substring(13, 18), 16) / 1000
|
||||
}
|
||||
if (typeInfo == "01") {
|
||||
that.text = "您的实时体重是:" + data + dw1
|
||||
}
|
||||
if (typeInfo == "02") {
|
||||
that.text = "您的体重是:" + data + dw1
|
||||
that.weight = data + dw2
|
||||
console.log("稳定体重:", value, that.weight)
|
||||
}
|
||||
}
|
||||
if (type == "14") {
|
||||
that.height = parseInt(value.substring(10, 14), 16) / 10
|
||||
that.textH = "您的身高是:" + that.height + "cm"
|
||||
that.type = 2
|
||||
console.log("稳定身高:", that.height)
|
||||
}
|
||||
if (type == "11") {
|
||||
if (typeInfo == "03" || typeInfo == "04") {
|
||||
that.imp = parseInt(value.substring(17, 22), 16)
|
||||
}
|
||||
console.log("阻抗:", typeInfo, parseInt(value.substring(17, 22), 16))
|
||||
}
|
||||
if (type == "30") {
|
||||
console.log("测量完成", that.weight, that.imp, that.height)
|
||||
|
||||
if (!that.type30) {
|
||||
if (that.imp == 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: "体脂测量失败,是否保存本次测量结果?",
|
||||
cancelText: "放弃",
|
||||
confirmText: "保存",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.imp = 0
|
||||
that.handleGetMeasure()
|
||||
} else {
|
||||
console.log("放弃保存")
|
||||
that.Unload = true
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.handleGetMeasure()
|
||||
}
|
||||
that.type30 = true
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取特征值失败:', JSON.stringify(res))
|
||||
}
|
||||
})
|
||||
},
|
||||
// 身高体重体脂模式
|
||||
sendData() {
|
||||
let that = this
|
||||
let j = Number(26 + 3 + 6 + 1).toString(16)
|
||||
let str = "A9002603060100" + j.substr(j.length - 2, 2) + "9A"
|
||||
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
|
||||
return parseInt(h, 16)
|
||||
}))
|
||||
uni.writeBLECharacteristicValue({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.uuid1,
|
||||
value: buf.buffer,
|
||||
success: res => {
|
||||
console.log('下发指令成功', res.errMsg)
|
||||
},
|
||||
fail: res => {
|
||||
console.log("下发指令失败", res);
|
||||
},
|
||||
})
|
||||
},
|
||||
// 保存测量结果
|
||||
handleGetMeasure() {
|
||||
let that = this
|
||||
that.$model.getmeasure({
|
||||
weight: that.weight,
|
||||
imp: that.imp,
|
||||
ecode: that.macAddr,
|
||||
height: that.height,
|
||||
familyid: that.info.familyid,
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
familyid: that.info.familyid,
|
||||
});
|
||||
that.$store.dispatch("getResult", {
|
||||
birthday: that.info.birthday,
|
||||
familyid: that.info.familyid,
|
||||
height: that.height,
|
||||
sex: that.info.sex,
|
||||
});
|
||||
that.$tools.msg("测量成功")
|
||||
} else {
|
||||
console.log("测量失败", res.message)
|
||||
that.$tools.msg(res.message)
|
||||
}
|
||||
that.Unload = true
|
||||
setTimeout(function() {
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}, 200)
|
||||
})
|
||||
},
|
||||
handleBack(ind) {
|
||||
let that = this
|
||||
that.text = ""
|
||||
that.textH = ""
|
||||
that.Unload = true
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙模块
|
||||
*/
|
||||
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">
|
||||
</style>
|
||||
|
|
@ -177,8 +177,7 @@
|
|||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.indexOf('ELS') != -1 || (device.localName && device.localName
|
||||
.indexOf('PC') != -1)) {
|
||||
if (device.name.indexOf('ELS') != -1 || (device.localName && device.localName.indexOf('PC') != -1)) {
|
||||
clearTimeout(myTime);
|
||||
let buff = device.advertisData.slice(-6)
|
||||
device.mac = new Uint8Array(buff) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
|
|
|
|||
|
|
@ -165,10 +165,19 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
icon {
|
||||
image,icon {
|
||||
font-size: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
text{
|
||||
width: 100%;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.endtext {
|
||||
|
|
@ -700,7 +709,7 @@
|
|||
.blockC {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
height: 285px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,363 +1,371 @@
|
|||
@font-face {
|
||||
/* @font-face {
|
||||
font-family: 'iconfont'; /* Project id 2887906 */
|
||||
src: url('https://at.alicdn.com/t/font_2887906_wl80j95s0c.woff2?t=1648878564422') format('woff2'),
|
||||
/*src: url('https://at.alicdn.com/t/font_2887906_wl80j95s0c.woff2?t=1648878564422') format('woff2'),
|
||||
url('https://at.alicdn.com/t/font_2887906_wl80j95s0c.woff?t=1648878564422') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_2887906_wl80j95s0c.ttf?t=1648878564422') format('truetype');
|
||||
} */
|
||||
|
||||
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
||||
@font-face {
|
||||
font-family: 'iconfont';
|
||||
/* Project id 4209383 */
|
||||
src: url('https://at.alicdn.com/t/c/font_4209383_trk0ap2c0n.woff2?t=1692064993104') format('woff2'),
|
||||
url('https://at.alicdn.com/t/c/font_4209383_trk0ap2c0n.woff?t=1692064993104') format('woff'),
|
||||
url('https://at.alicdn.com/t/c/font_4209383_trk0ap2c0n.ttf?t=1692064993104') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-biaozhunhua:before {
|
||||
content: "\e60b";
|
||||
content: "\e60b";
|
||||
}
|
||||
|
||||
.icon-shejiguifan:before {
|
||||
content: "\e640";
|
||||
content: "\e640";
|
||||
}
|
||||
|
||||
.icon-tizhongcheng:before {
|
||||
content: "\e63f";
|
||||
content: "\e63f";
|
||||
}
|
||||
|
||||
.icon-baogao1:before {
|
||||
content: "\e620";
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.icon-tizhong1:before {
|
||||
content: "\e616";
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.icon-sharpicons_checklist:before {
|
||||
content: "\e804";
|
||||
content: "\e804";
|
||||
}
|
||||
|
||||
.icon-hengxian:before {
|
||||
content: "\e657";
|
||||
content: "\e657";
|
||||
}
|
||||
|
||||
.icon-lbm:before {
|
||||
content: "\e6b7";
|
||||
content: "\e6b7";
|
||||
}
|
||||
|
||||
.icon-fatlevel:before {
|
||||
content: "\e63d";
|
||||
content: "\e63d";
|
||||
}
|
||||
|
||||
.icon-fat_r:before {
|
||||
content: "\e62d";
|
||||
content: "\e62d";
|
||||
}
|
||||
|
||||
.icon-fat_w:before {
|
||||
content: "\e78e";
|
||||
content: "\e78e";
|
||||
}
|
||||
|
||||
.icon-bone:before {
|
||||
content: "\e610";
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.icon-kcal:before {
|
||||
content: "\e60c";
|
||||
content: "\e60c";
|
||||
}
|
||||
|
||||
.icon-visceral:before {
|
||||
content: "\e60d";
|
||||
content: "\e60d";
|
||||
}
|
||||
|
||||
.icon-muscle:before {
|
||||
content: "\e60e";
|
||||
content: "\e60e";
|
||||
}
|
||||
|
||||
.icon-body:before {
|
||||
content: "\e638";
|
||||
content: "\e638";
|
||||
}
|
||||
|
||||
.icon-water:before {
|
||||
content: "\e651";
|
||||
content: "\e651";
|
||||
}
|
||||
|
||||
.icon-muscleval:before {
|
||||
content: "\e949";
|
||||
content: "\e949";
|
||||
}
|
||||
|
||||
.icon-protein:before {
|
||||
content: "\e94a";
|
||||
content: "\e94a";
|
||||
}
|
||||
|
||||
.icon-proteinval:before {
|
||||
content: "\e60f";
|
||||
content: "\e60f";
|
||||
}
|
||||
|
||||
.icon-bodyage:before {
|
||||
content: "\e6b2";
|
||||
content: "\e6b2";
|
||||
}
|
||||
|
||||
.icon-height1:before {
|
||||
content: "\e6eb";
|
||||
content: "\e6eb";
|
||||
}
|
||||
|
||||
.icon-shang:before {
|
||||
content: "\e68a";
|
||||
content: "\e68a";
|
||||
}
|
||||
|
||||
.icon-xia:before {
|
||||
content: "\e798";
|
||||
content: "\e798";
|
||||
}
|
||||
|
||||
.icon-sfr:before {
|
||||
content: "\e617";
|
||||
content: "\e617";
|
||||
}
|
||||
|
||||
.icon-yisheng3:before {
|
||||
content: "\e6a3";
|
||||
content: "\e6a3";
|
||||
}
|
||||
|
||||
.icon-yisheng_1:before {
|
||||
content: "\e633";
|
||||
content: "\e633";
|
||||
}
|
||||
|
||||
.icon-switch-ON-copy-copy:before {
|
||||
content: "\fc23";
|
||||
content: "\fc23";
|
||||
}
|
||||
|
||||
.icon-switch-ON-copy-copy1:before {
|
||||
content: "\fc25";
|
||||
content: "\fc25";
|
||||
}
|
||||
|
||||
.icon-shuzhuangtu:before {
|
||||
content: "\e604";
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
.icon-jilu:before {
|
||||
content: "\e69e";
|
||||
content: "\e69e";
|
||||
}
|
||||
|
||||
.icon-lishixiao:before {
|
||||
content: "\e8bd";
|
||||
content: "\e8bd";
|
||||
}
|
||||
|
||||
.icon-jiantou_xiangxia:before {
|
||||
content: "\eb0a";
|
||||
content: "\eb0a";
|
||||
}
|
||||
|
||||
.icon-jiantou_xiangshang:before {
|
||||
content: "\eb0b";
|
||||
content: "\eb0b";
|
||||
}
|
||||
|
||||
.icon-tizhong:before {
|
||||
content: "\e682";
|
||||
content: "\e682";
|
||||
}
|
||||
|
||||
.icon-jiaoxuepinggu-01:before {
|
||||
content: "\e63b";
|
||||
content: "\e63b";
|
||||
}
|
||||
|
||||
.icon-qiehuan1:before {
|
||||
content: "\e7d7";
|
||||
content: "\e7d7";
|
||||
}
|
||||
|
||||
.icon-head:before {
|
||||
content: "\e8d1";
|
||||
content: "\e8d1";
|
||||
}
|
||||
|
||||
.icon-quxiao:before {
|
||||
content: "\e664";
|
||||
content: "\e664";
|
||||
}
|
||||
|
||||
.icon-fenxiang:before {
|
||||
content: "\e60a";
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.icon-touxiang:before {
|
||||
content: "\e61f";
|
||||
content: "\e61f";
|
||||
}
|
||||
|
||||
.icon-pingtai:before {
|
||||
content: "\f4ec";
|
||||
content: "\f4ec";
|
||||
}
|
||||
|
||||
.icon-dianhuatianchong:before {
|
||||
content: "\e678";
|
||||
content: "\e678";
|
||||
}
|
||||
|
||||
.icon-xinxi:before {
|
||||
content: "\e648";
|
||||
content: "\e648";
|
||||
}
|
||||
|
||||
.icon-bianji3:before {
|
||||
content: "\e62b";
|
||||
content: "\e62b";
|
||||
}
|
||||
|
||||
.icon-gonglve:before {
|
||||
content: "\f4e4";
|
||||
content: "\f4e4";
|
||||
}
|
||||
|
||||
.icon-shoucang:before {
|
||||
content: "\f4f8";
|
||||
content: "\f4f8";
|
||||
}
|
||||
|
||||
.icon-pinglun:before {
|
||||
content: "\f5b0";
|
||||
content: "\f5b0";
|
||||
}
|
||||
|
||||
.icon-shijian-mianxing-0:before {
|
||||
content: "\e6a2";
|
||||
content: "\e6a2";
|
||||
}
|
||||
|
||||
.icon-hezuo:before {
|
||||
content: "\f4e5";
|
||||
content: "\f4e5";
|
||||
}
|
||||
|
||||
.icon-shouhou:before {
|
||||
content: "\f5dd";
|
||||
content: "\f5dd";
|
||||
}
|
||||
|
||||
.icon-pinglun-08:before {
|
||||
content: "\fc1d";
|
||||
content: "\fc1d";
|
||||
}
|
||||
|
||||
.icon-weixin:before {
|
||||
content: "\e637";
|
||||
content: "\e637";
|
||||
}
|
||||
|
||||
.icon-QQ:before {
|
||||
content: "\e667";
|
||||
content: "\e667";
|
||||
}
|
||||
|
||||
.icon-weight:before {
|
||||
content: "\e62a";
|
||||
content: "\e62a";
|
||||
}
|
||||
|
||||
.icon-height:before {
|
||||
content: "\e609";
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.icon-bmi:before {
|
||||
content: "\e785";
|
||||
content: "\e785";
|
||||
}
|
||||
|
||||
.icon-shoucang1:before {
|
||||
content: "\e603";
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.icon-qiehuan:before {
|
||||
content: "\f4ee";
|
||||
content: "\f4ee";
|
||||
}
|
||||
|
||||
.icon-yazi-copy:before {
|
||||
content: "\f5b6";
|
||||
content: "\f5b6";
|
||||
}
|
||||
|
||||
.icon-hear:before {
|
||||
content: "\e8af";
|
||||
content: "\e8af";
|
||||
}
|
||||
|
||||
.icon-zanwu:before {
|
||||
content: "\e626";
|
||||
content: "\e626";
|
||||
}
|
||||
|
||||
.icon-shuimian:before {
|
||||
content: "\e959";
|
||||
content: "\e959";
|
||||
}
|
||||
|
||||
.icon-wenjian-xinliweiji:before {
|
||||
content: "\e72d";
|
||||
content: "\e72d";
|
||||
}
|
||||
|
||||
.icon-yundong:before {
|
||||
content: "\e810";
|
||||
content: "\e810";
|
||||
}
|
||||
|
||||
.icon-yinshi2:before {
|
||||
content: "\e607";
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-gerendingzhi:before {
|
||||
content: "\e605";
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.icon-top-chengchangquxian:before {
|
||||
content: "\e61e";
|
||||
content: "\e61e";
|
||||
}
|
||||
|
||||
.icon-duibi2:before {
|
||||
content: "\e6b8";
|
||||
content: "\e6b8";
|
||||
}
|
||||
|
||||
.icon-tubiao--copy:before {
|
||||
content: "\ec58";
|
||||
content: "\ec58";
|
||||
}
|
||||
|
||||
.icon-jilu1:before {
|
||||
content: "\e686";
|
||||
content: "\e686";
|
||||
}
|
||||
|
||||
.icon-xiangxia:before {
|
||||
content: "\e601";
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-kongradio:before {
|
||||
content: "\e602";
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.icon-radio:before {
|
||||
content: "\e653";
|
||||
content: "\e653";
|
||||
}
|
||||
|
||||
.icon-arrow-left:before {
|
||||
content: "\e685";
|
||||
content: "\e685";
|
||||
}
|
||||
|
||||
.icon-arrow-down:before {
|
||||
content: "\e687";
|
||||
content: "\e687";
|
||||
}
|
||||
|
||||
.icon-arrow-right:before {
|
||||
content: "\e688";
|
||||
content: "\e688";
|
||||
}
|
||||
|
||||
.icon-tishi:before {
|
||||
content: "\e797";
|
||||
content: "\e797";
|
||||
}
|
||||
|
||||
.icon-yazi:before {
|
||||
content: "\e612";
|
||||
content: "\e612";
|
||||
}
|
||||
|
||||
.icon-shengao:before {
|
||||
content: "\e739";
|
||||
content: "\e739";
|
||||
}
|
||||
|
||||
.icon-liangdu-:before {
|
||||
content: "\e606";
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.icon-aixin:before {
|
||||
content: "\f4cf";
|
||||
content: "\f4cf";
|
||||
}
|
||||
|
||||
.icon-yqfqiehuan:before {
|
||||
content: "\e61b";
|
||||
content: "\e61b";
|
||||
}
|
||||
|
||||
.icon-female:before {
|
||||
content: "\e600";
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-dangao:before {
|
||||
content: "\e608";
|
||||
content: "\e608";
|
||||
}
|
||||
|
||||
.icon-quxian:before {
|
||||
content: "\e629";
|
||||
content: "\e629";
|
||||
}
|
||||
|
||||
.icon-baogao:before {
|
||||
content: "\e630";
|
||||
}
|
||||
|
||||
content: "\e630";
|
||||
}
|
||||
|
|
@ -1,348 +1,353 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<view class="slide-box" v-for="(item, index) in listData" :key="index">
|
||||
<view class="slide-list" @touchstart="touchStart($event, index)" @touchend="touchEnd($event, index)"
|
||||
@touchmove="touchMove($event, index)" @tap="recover(index)"
|
||||
:style="{ transform: 'translate3d(' + item.slide_x + 'px, 0, 0)' }">
|
||||
<view class="now-message-info" hover-class="uni-item--hover" :style="{ width: windowWidth + 'px' }"
|
||||
@click="clickItemMethod(item)">
|
||||
<view class="list">
|
||||
<view class="item" :class="[type!=1?'leftChild':'']">
|
||||
<view class="time">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view>{{item.weight}}<text>体重</text></view>
|
||||
<view>{{item.bmi}}<text>BMI</text></view>
|
||||
<view>{{item.fat_r}}<text>脂肪率</text></view>
|
||||
<icon class="iconfont icon-arrow-right"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group-btn">
|
||||
<view class="btn-div" v-for="(value, key) in button" :key="key" @click="clickMethod(item)"
|
||||
:style="{background: value.background}">
|
||||
{{value.title}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="clear:both"></view>
|
||||
</view>
|
||||
<view class="list-item-border" v-if="border"></view>
|
||||
</view>
|
||||
<!-- <view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view> -->
|
||||
</view>
|
||||
<view class="container">
|
||||
<view class="slide-box" v-for="(item, index) in listData" :key="index">
|
||||
<view class="slide-list" @touchstart="touchStart($event, index)" @touchend="touchEnd($event, index)"
|
||||
@touchmove="touchMove($event, index)" @tap="recover(index)"
|
||||
:style="{ transform: 'translate3d(' + item.slide_x + 'px, 0, 0)' }">
|
||||
<view class="now-message-info" hover-class="uni-item--hover" :style="{ width: windowWidth + 'px' }"
|
||||
@click="clickItemMethod(item)">
|
||||
<view class="list">
|
||||
<view class="item" :class="[type!=1?'leftChild':'']">
|
||||
<view class="time">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view>{{item.weight}}<text>体重</text></view>
|
||||
<view>{{item.bmi}}<text>BMI</text></view>
|
||||
<view>{{item.fat_r}}<text>脂肪率</text></view>
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group-btn">
|
||||
<view class="btn-div" v-for="(value, key) in button" :key="key" @click="clickMethod(item)"
|
||||
:style="{background: value.background}">
|
||||
{{value.title}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="clear:both"></view>
|
||||
</view>
|
||||
<view class="list-item-border" v-if="border"></view>
|
||||
</view>
|
||||
<!-- <view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* m-slide-list 滑动操作列表
|
||||
* @description 滑动操作列表组件
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=209
|
||||
* @property {Array} list 数据源,格式为:[{title: 'xxx', image:'xxx', surname: 'xxx',detail:'xxx', rightDetail: 'xxx', slide_x: 0},{title: 'xxx', image:'xxx', surname: 'xxx',detail:'xxx', rightDetail: 'xxx', slide_x: 0}]
|
||||
* @property {Array} button 按钮数据源,格式为:[{title: 'xxx', background:'xxx'},{title: 'xxx', background:'xxx'}]
|
||||
* @property {Boolean} border 边框
|
||||
*/
|
||||
export default {
|
||||
name: 'mark-slide-list',
|
||||
props: {
|
||||
list: { //数据list
|
||||
type: Array,
|
||||
default () {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
button: { //按钮数据list
|
||||
type: Array,
|
||||
default () {
|
||||
return [{
|
||||
title: '删除',
|
||||
background: '#ff3b32'
|
||||
}];
|
||||
}
|
||||
},
|
||||
border: { //边框
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
windowWidth() {
|
||||
return uni.getSystemInfoSync().windowWidth;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
start_slide_x: 0,
|
||||
btnWidth: 0,
|
||||
startX: 0,
|
||||
LastX: 0,
|
||||
startTime: 0,
|
||||
itemIndex: 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.listData = this.clone(this.list)
|
||||
// this.getList(1)
|
||||
},
|
||||
watch: {
|
||||
list: {
|
||||
handler: function(val, oldval) {
|
||||
this.listData = this.clone(this.list)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clone(data) {
|
||||
const type = typeof data
|
||||
let obj;
|
||||
if (type === 'array') {
|
||||
obj = [];
|
||||
} else if (type === 'object') {
|
||||
obj = {};
|
||||
} else {
|
||||
// 不再具有下一层次
|
||||
return data;
|
||||
}
|
||||
if (type === 'array') {
|
||||
for (let i = 0, len = data.length; i < len; i++) {
|
||||
obj.push(this.clone(data[i]));
|
||||
}
|
||||
} else if (type === 'object') {
|
||||
// 对原型上的方法也拷贝了....
|
||||
for (const key in data) {
|
||||
obj[key] = this.clone(data[key]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
/**
|
||||
* m-slide-list 滑动操作列表
|
||||
* @description 滑动操作列表组件
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=209
|
||||
* @property {Array} list 数据源,格式为:[{title: 'xxx', image:'xxx', surname: 'xxx',detail:'xxx', rightDetail: 'xxx', slide_x: 0},{title: 'xxx', image:'xxx', surname: 'xxx',detail:'xxx', rightDetail: 'xxx', slide_x: 0}]
|
||||
* @property {Array} button 按钮数据源,格式为:[{title: 'xxx', background:'xxx'},{title: 'xxx', background:'xxx'}]
|
||||
* @property {Boolean} border 边框
|
||||
*/
|
||||
export default {
|
||||
name: 'mark-slide-list',
|
||||
props: {
|
||||
list: { //数据list
|
||||
type: Array,
|
||||
default () {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
button: { //按钮数据list
|
||||
type: Array,
|
||||
default () {
|
||||
return [{
|
||||
title: '删除',
|
||||
background: '#ff3b32'
|
||||
}];
|
||||
}
|
||||
},
|
||||
border: { //边框
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
windowWidth() {
|
||||
return uni.getSystemInfoSync().windowWidth;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
start_slide_x: 0,
|
||||
btnWidth: 0,
|
||||
startX: 0,
|
||||
LastX: 0,
|
||||
startTime: 0,
|
||||
itemIndex: 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.listData = this.clone(this.list)
|
||||
// this.getList(1)
|
||||
},
|
||||
watch: {
|
||||
list: {
|
||||
handler: function(val, oldval) {
|
||||
this.listData = this.clone(this.list)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clone(data) {
|
||||
const type = typeof data
|
||||
let obj;
|
||||
if (type === 'array') {
|
||||
obj = [];
|
||||
} else if (type === 'object') {
|
||||
obj = {};
|
||||
} else {
|
||||
// 不再具有下一层次
|
||||
return data;
|
||||
}
|
||||
if (type === 'array') {
|
||||
for (let i = 0, len = data.length; i < len; i++) {
|
||||
obj.push(this.clone(data[i]));
|
||||
}
|
||||
} else if (type === 'object') {
|
||||
// 对原型上的方法也拷贝了....
|
||||
for (const key in data) {
|
||||
obj[key] = this.clone(data[key]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
// 滑动开始
|
||||
touchStart(e, index) {
|
||||
if (this.itemIndex == index) {
|
||||
this.itemIndex = index
|
||||
}
|
||||
//记录手指放上去的时间
|
||||
this.startTime = e.timeStamp;
|
||||
//记录滑块的初始位置
|
||||
this.start_slide_x = this.listData[index].slide_x;
|
||||
// 按钮宽度
|
||||
//#ifdef MP-WEIXIN
|
||||
uni.createSelectorQuery().in(this).selectAll('.group-btn').boundingClientRect(res => {
|
||||
if (res != null) {
|
||||
this.btnWidth = res[index].width * -1;
|
||||
}
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef H5 || APP-PLUS
|
||||
uni.createSelectorQuery()
|
||||
.selectAll('.group-btn')
|
||||
.boundingClientRect()
|
||||
.exec(res => {
|
||||
if (res[0] != null) {
|
||||
this.btnWidth = res[0][index].width * -1;
|
||||
}
|
||||
});
|
||||
//#endif
|
||||
// 记录上一次开始时手指所处位置
|
||||
this.startX = e.touches[0].pageX;
|
||||
// 记录上一次手指位置
|
||||
this.lastX = this.startX;
|
||||
//初始化非当前滑动消息列的位置
|
||||
for (var i in this.listData) {
|
||||
if (index != i) {
|
||||
this.listData[i].slide_x = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 滑动中
|
||||
touchMove(e, index) {
|
||||
const endX = e.touches[0].pageX;
|
||||
const distance = endX - this.lastX;
|
||||
// 预测滑块所处位置
|
||||
const duang = this.listData[index].slide_x + distance;
|
||||
// 如果在可行区域内
|
||||
if (duang <= 0 && duang >= this.btnWidth) {
|
||||
this.listData[index].slide_x = duang;
|
||||
}
|
||||
// 此处手指所处位置将成为下次手指移动时的上一次位置
|
||||
this.lastX = endX;
|
||||
},
|
||||
// 滑动结束
|
||||
touchEnd(e, index) {
|
||||
let distance = 10;
|
||||
const endTime = e.timeStamp;
|
||||
const x_end_distance = this.startX - this.lastX;
|
||||
if (Math.abs(endTime - this.startTime) > 200) {
|
||||
distance = this.btnWidth / -2;
|
||||
}
|
||||
// 判断手指最终位置与手指开始位置的位置差距
|
||||
if (x_end_distance > distance) {
|
||||
this.listData[index].slide_x = this.btnWidth;
|
||||
} else if (x_end_distance < distance * -1) {
|
||||
this.listData[index].slide_x = 0;
|
||||
} else {
|
||||
this.listData[index].slide_x = this.start_slide_x;
|
||||
}
|
||||
},
|
||||
// 点击回复原状
|
||||
recover(index) {
|
||||
this.listData[index].slide_x = 0;
|
||||
},
|
||||
/**
|
||||
* 点击按钮触发事件
|
||||
* @param {Object} item 列表数据
|
||||
* @param {Object} buttonItem 按钮数据
|
||||
* @param {Object} index 列表数据key
|
||||
*/
|
||||
clickMethod(item) {
|
||||
if (this.list.length == 1) {
|
||||
this.$tools.msg("只剩一条记录了,不可以删除!")
|
||||
return
|
||||
}
|
||||
this.$emit("changeDelete", item)
|
||||
},
|
||||
// 详情
|
||||
clickItemMethod(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/info?index=" + JSON.stringify(item)
|
||||
})
|
||||
// this.$emit("click", item)
|
||||
}
|
||||
}
|
||||
};
|
||||
// 滑动开始
|
||||
touchStart(e, index) {
|
||||
if (this.itemIndex == index) {
|
||||
this.itemIndex = index
|
||||
}
|
||||
//记录手指放上去的时间
|
||||
this.startTime = e.timeStamp;
|
||||
//记录滑块的初始位置
|
||||
this.start_slide_x = this.listData[index].slide_x;
|
||||
// 按钮宽度
|
||||
//#ifdef MP-WEIXIN
|
||||
uni.createSelectorQuery().in(this).selectAll('.group-btn').boundingClientRect(res => {
|
||||
if (res != null) {
|
||||
this.btnWidth = res[index].width * -1;
|
||||
}
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef H5 || APP-PLUS
|
||||
uni.createSelectorQuery()
|
||||
.selectAll('.group-btn')
|
||||
.boundingClientRect()
|
||||
.exec(res => {
|
||||
if (res[0] != null) {
|
||||
this.btnWidth = res[0][index].width * -1;
|
||||
}
|
||||
});
|
||||
//#endif
|
||||
// 记录上一次开始时手指所处位置
|
||||
this.startX = e.touches[0].pageX;
|
||||
// 记录上一次手指位置
|
||||
this.lastX = this.startX;
|
||||
//初始化非当前滑动消息列的位置
|
||||
for (var i in this.listData) {
|
||||
if (index != i) {
|
||||
this.listData[i].slide_x = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 滑动中
|
||||
touchMove(e, index) {
|
||||
const endX = e.touches[0].pageX;
|
||||
const distance = endX - this.lastX;
|
||||
// 预测滑块所处位置
|
||||
const duang = this.listData[index].slide_x + distance;
|
||||
// 如果在可行区域内
|
||||
if (duang <= 0 && duang >= this.btnWidth) {
|
||||
this.listData[index].slide_x = duang;
|
||||
}
|
||||
// 此处手指所处位置将成为下次手指移动时的上一次位置
|
||||
this.lastX = endX;
|
||||
},
|
||||
// 滑动结束
|
||||
touchEnd(e, index) {
|
||||
let distance = 10;
|
||||
const endTime = e.timeStamp;
|
||||
const x_end_distance = this.startX - this.lastX;
|
||||
if (Math.abs(endTime - this.startTime) > 200) {
|
||||
distance = this.btnWidth / -2;
|
||||
}
|
||||
// 判断手指最终位置与手指开始位置的位置差距
|
||||
if (x_end_distance > distance) {
|
||||
this.listData[index].slide_x = this.btnWidth;
|
||||
} else if (x_end_distance < distance * -1) {
|
||||
this.listData[index].slide_x = 0;
|
||||
} else {
|
||||
this.listData[index].slide_x = this.start_slide_x;
|
||||
}
|
||||
},
|
||||
// 点击回复原状
|
||||
recover(index) {
|
||||
this.listData[index].slide_x = 0;
|
||||
},
|
||||
/**
|
||||
* 点击按钮触发事件
|
||||
* @param {Object} item 列表数据
|
||||
* @param {Object} buttonItem 按钮数据
|
||||
* @param {Object} index 列表数据key
|
||||
*/
|
||||
clickMethod(item) {
|
||||
if (this.list.length == 1) {
|
||||
this.$tools.msg("只剩一条记录了,不可以删除!")
|
||||
return
|
||||
}
|
||||
this.$emit("changeDelete", item)
|
||||
},
|
||||
// 详情
|
||||
clickItemMethod(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/info?index=" + JSON.stringify(item)
|
||||
})
|
||||
// this.$emit("click", item)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
.slide-box {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
.container {
|
||||
.slide-box {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
.list-item-border {
|
||||
width: 100%;
|
||||
}
|
||||
.list-item-border {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.slide-list {
|
||||
transition: all 100ms;
|
||||
transition-timing-function: ease-out;
|
||||
min-width: 200%;
|
||||
.slide-list {
|
||||
transition: all 100ms;
|
||||
transition-timing-function: ease-out;
|
||||
min-width: 200%;
|
||||
|
||||
.now-message-info {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
clear: both;
|
||||
padding: 0 30rpx;
|
||||
background: #f7f7f7;
|
||||
float: left;
|
||||
.now-message-info {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
clear: both;
|
||||
padding: 0 30rpx;
|
||||
background: #f7f7f7;
|
||||
float: left;
|
||||
|
||||
.icon-image {
|
||||
border-radius: 10rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
float: left;
|
||||
}
|
||||
.icon-image {
|
||||
border-radius: 10rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.icon-circle {
|
||||
background: #3396fb;
|
||||
border-radius: 100%;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
float: left;
|
||||
}
|
||||
.icon-circle {
|
||||
background: #3396fb;
|
||||
border-radius: 100%;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list-right {
|
||||
float: left;
|
||||
margin-left: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
.list-right {
|
||||
float: left;
|
||||
margin-left: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
|
||||
.list-title {
|
||||
width: 350rpx;
|
||||
line-height: 1.5;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10rpx;
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.list-title {
|
||||
width: 350rpx;
|
||||
line-height: 1.5;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10rpx;
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list-detail {
|
||||
width: 350rpx;
|
||||
font-size: 14px;
|
||||
color: #a9a9a9;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.list-detail {
|
||||
width: 350rpx;
|
||||
font-size: 14px;
|
||||
color: #a9a9a9;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.list-right-1 {
|
||||
float: right;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
color: #a9a9a9;
|
||||
}
|
||||
}
|
||||
.list-right-1 {
|
||||
float: right;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
color: #a9a9a9;
|
||||
}
|
||||
}
|
||||
|
||||
.group-btn {
|
||||
float: left;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
min-width: 100rpx;
|
||||
align-items: center;
|
||||
margin-top: 6rpx;
|
||||
.group-btn {
|
||||
float: left;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
min-width: 100rpx;
|
||||
align-items: center;
|
||||
margin-top: 6rpx;
|
||||
|
||||
.btn-div {
|
||||
height: 100rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 0 50rpx;
|
||||
font-size: 34rpx;
|
||||
line-height: 100rpx;
|
||||
border-radius: 5px 0 0 5px;
|
||||
}
|
||||
.btn-div {
|
||||
height: 100rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 0 50rpx;
|
||||
font-size: 34rpx;
|
||||
line-height: 100rpx;
|
||||
border-radius: 5px 0 0 5px;
|
||||
}
|
||||
|
||||
.top {
|
||||
background-color: #c4c7cd;
|
||||
}
|
||||
.top {
|
||||
background-color: #c4c7cd;
|
||||
}
|
||||
|
||||
.removeM {
|
||||
background-color: #ff3b32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.removeM {
|
||||
background-color: #ff3b32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.leftChild {
|
||||
view {
|
||||
width: 18%;
|
||||
}
|
||||
.leftChild {
|
||||
view {
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 32% !important;
|
||||
.time {
|
||||
width: 32% !important;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,441 +1,442 @@
|
|||
<template>
|
||||
<view class="calendar-wrapper">
|
||||
<view class="header">
|
||||
<view class="pre" @click="changeMonth('pre')">
|
||||
<icon class="iconfont icon-arrow-left"></icon>
|
||||
</view>
|
||||
<view>{{y+'年'+formatNum(m)+'月'}}</view>
|
||||
<view class="next" @click="changeMonth('next')">
|
||||
<icon class="iconfont icon-arrow-right"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="week">
|
||||
<view class="week-day" v-for="(item, index) in weekDay" :key="index">{{ item }}</view>
|
||||
</view>
|
||||
<view :class="{ hide: !monthOpen }" class="content0" :style="{ height: height }">
|
||||
<view :style="{ top: positionTop + 'rpx' }" class="days">
|
||||
<view class="item" v-for="(item, index) in dates" :key="index">
|
||||
<view class="day" @click="selectOne(item, $event)" :class="{
|
||||
<view class="calendar-wrapper">
|
||||
<view class="header">
|
||||
<view class="pre" @click="changeMonth('pre')">
|
||||
<image src="../../static/arrow-left.png" class="iconfont"></image>
|
||||
</view>
|
||||
<view>{{y+'年'+formatNum(m)+'月'}}</view>
|
||||
<view class="next" @click="changeMonth('next')">
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="week">
|
||||
<view class="week-day" v-for="(item, index) in weekDay" :key="index">{{ item }}</view>
|
||||
</view>
|
||||
<view :class="{ hide: !monthOpen }" class="content0" :style="{ height: height }">
|
||||
<view :style="{ top: positionTop + 'rpx' }" class="days">
|
||||
<view class="item" v-for="(item, index) in dates" :key="index">
|
||||
<view class="day" @click="selectOne(item, $event)" :class="{
|
||||
choose: choose == `${item.year}-${item.month}-${item.date}`&&item.isCurM,
|
||||
nolm: !item.isCurM,
|
||||
today: isToday(item.year, item.month, item.date),
|
||||
isWorkDay: isWorkDay(item.year, item.month, item.date)
|
||||
}">
|
||||
{{ Number(item.date) }}
|
||||
</view>
|
||||
<view class="markDay" v-if="isMarkDay(item.year, item.month, item.date)&&item.isCurM"></view>
|
||||
<!-- <view class="today-text" v-if="isToday(item.year, item.month, item.date)">今</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image src="https://i.loli.net/2020/07/16/2MmZsucVTlRjSwK.png" mode="scaleToFill" v-if="collapsible"
|
||||
@click="toggle" class="weektoggle" :class="{ down: monthOpen }"></image>
|
||||
</view>
|
||||
{{ Number(item.date) }}
|
||||
</view>
|
||||
<view class="markDay" v-if="isMarkDay(item.year, item.month, item.date)&&item.isCurM"></view>
|
||||
<!-- <view class="today-text" v-if="isToday(item.year, item.month, item.date)">今</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image src="https://i.loli.net/2020/07/16/2MmZsucVTlRjSwK.png" mode="scaleToFill" v-if="collapsible"
|
||||
@click="toggle" class="weektoggle" :class="{ down: monthOpen }"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ren-calendar',
|
||||
props: {
|
||||
// 星期几为第一天(0为星期日)
|
||||
weekstart: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 标记的日期
|
||||
markDays: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
//是否展示月份切换按钮
|
||||
headerBar: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 是否展开
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//是否可收缩
|
||||
collapsible: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//未来日期是否不可点击
|
||||
disabledAfter: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
weektext: ['日', '一', '二', '三', '四', '五', '六'],
|
||||
y: new Date().getFullYear(), // 年
|
||||
m: new Date().getMonth() + 1, // 月
|
||||
dates: [], // 当前月的日期数据
|
||||
positionTop: 0,
|
||||
monthOpen: true,
|
||||
choose: '',
|
||||
month: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.dates = this.monthDay(this.y, this.m);
|
||||
!this.open && this.toggle();
|
||||
},
|
||||
mounted() {
|
||||
this.y = new Date().getFullYear()
|
||||
this.m = new Date().getMonth() + 1
|
||||
this.month = this.$tools.getDate("m")
|
||||
this.choose = this.getToday().date;
|
||||
},
|
||||
computed: {
|
||||
// 顶部星期栏
|
||||
weekDay() {
|
||||
return this.weektext.slice(this.weekstart).concat(this.weektext.slice(0, this.weekstart));
|
||||
},
|
||||
height() {
|
||||
return (this.dates.length / 7) * 80 + 'rpx';
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatNum(num) {
|
||||
let res = Number(num);
|
||||
return res < 10 ? '0' + res : res;
|
||||
},
|
||||
getToday() {
|
||||
let date = new Date();
|
||||
let y = date.getFullYear();
|
||||
let m = date.getMonth();
|
||||
let d = date.getDate();
|
||||
let week = new Date().getDay();
|
||||
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
|
||||
let formatWeek = '星期' + weekText[week];
|
||||
let today = {
|
||||
date: y + '-' + this.formatNum(m + 1) + '-' + this.formatNum(d),
|
||||
week: formatWeek
|
||||
};
|
||||
return today;
|
||||
},
|
||||
// 获取当前月份数据
|
||||
monthDay(y, month) {
|
||||
let dates = [];
|
||||
let m = Number(month);
|
||||
let firstDayOfMonth = new Date(y, m - 1, 1).getDay(); // 当月第一天星期几
|
||||
let lastDateOfMonth = new Date(y, m, 0).getDate(); // 当月最后一天
|
||||
let lastDayOfLastMonth = new Date(y, m - 1, 0).getDate(); // 上一月的最后一天
|
||||
let weekstart = this.weekstart == 7 ? 0 : this.weekstart;
|
||||
let startDay = (() => {
|
||||
// 周初有几天是上个月的
|
||||
if (firstDayOfMonth == weekstart) {
|
||||
return 0;
|
||||
} else if (firstDayOfMonth > weekstart) {
|
||||
return firstDayOfMonth - weekstart;
|
||||
} else {
|
||||
return 7 - weekstart + firstDayOfMonth;
|
||||
}
|
||||
})();
|
||||
let endDay = 7 - ((startDay + lastDateOfMonth) % 7); // 结束还有几天是下个月的
|
||||
if (endDay == 7) {
|
||||
endDay = 0;
|
||||
}
|
||||
for (let i = 1; i <= startDay; i++) {
|
||||
dates.push({
|
||||
date: this.formatNum(lastDayOfLastMonth - startDay + i),
|
||||
day: weekstart + i - 1 || 7,
|
||||
month: m - 1 >= 0 ? this.formatNum(m - 1) : 12,
|
||||
year: m - 1 >= 0 ? y : y - 1
|
||||
});
|
||||
}
|
||||
for (let j = 1; j <= lastDateOfMonth; j++) {
|
||||
dates.push({
|
||||
date: this.formatNum(j),
|
||||
day: (j % 7) + firstDayOfMonth - 1 || 7,
|
||||
month: this.formatNum(m),
|
||||
year: y,
|
||||
isCurM: true //是否当前月份
|
||||
});
|
||||
}
|
||||
for (let k = 1; k <= endDay; k++) {
|
||||
dates.push({
|
||||
date: this.formatNum(k),
|
||||
day: (lastDateOfMonth + startDay + weekstart + k - 1) % 7 || 7,
|
||||
month: m + 1 <= 11 ? this.formatNum(m + 1) : 0,
|
||||
year: m + 1 <= 11 ? y : y + 1
|
||||
});
|
||||
}
|
||||
return dates;
|
||||
},
|
||||
isWorkDay(y, m, d) {
|
||||
//是否工作日
|
||||
let ymd = `${y}/${m}/${d}`;
|
||||
let formatDY = new Date(ymd.replace(/-/g, '/'));
|
||||
let week = formatDY.getDay();
|
||||
if (week == 0 || week == 6) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
isFutureDay(y, m, d) {
|
||||
//是否未来日期
|
||||
let ymd = `${y}/${m}/${d}`;
|
||||
let formatDY = new Date(ymd.replace(/-/g, '/'));
|
||||
let showTime = formatDY.getTime();
|
||||
let curTime = new Date().getTime();
|
||||
if (showTime > curTime) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 标记日期
|
||||
isMarkDay(y, m, d) {
|
||||
let flag = false;
|
||||
for (let i = 0; i < this.markDays.length; i++) {
|
||||
let dy = `${y}-${m}-${d}`;
|
||||
if (this.markDays[i] == dy) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
isToday(y, m, d) {
|
||||
let checkD = y + '-' + m + '-' + d;
|
||||
let today = this.getToday().date;
|
||||
if (checkD == today) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 展开收起
|
||||
toggle() {
|
||||
this.monthOpen = !this.monthOpen;
|
||||
if (this.monthOpen) {
|
||||
this.positionTop = 0;
|
||||
} else {
|
||||
let index = -1;
|
||||
this.dates.forEach((i, x) => {
|
||||
this.isToday(i.year, i.month, i.date) && (index = x);
|
||||
});
|
||||
this.positionTop = -((Math.ceil((index + 1) / 7) || 1) - 1) * 80;
|
||||
}
|
||||
},
|
||||
// 点击回调
|
||||
selectOne(i, event) {
|
||||
let date = `${i.year}-${i.month}-${i.date}`;
|
||||
let selectD = new Date(date).getTime();
|
||||
let curTime = new Date().getTime();
|
||||
let week = new Date(date).getDay();
|
||||
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
|
||||
let formatWeek = '星期' + weekText[week];
|
||||
let response = {
|
||||
date: date,
|
||||
week: formatWeek
|
||||
};
|
||||
if (!i.isCurM) {
|
||||
// console.log('不在当前月范围内');
|
||||
return false;
|
||||
}
|
||||
if (selectD > curTime) {
|
||||
if (this.disabledAfter) {
|
||||
console.log('未来日期不可选');
|
||||
return false;
|
||||
} else {
|
||||
this.choose = date;
|
||||
this.$emit('onDayClick', response);
|
||||
}
|
||||
} else {
|
||||
this.choose = date;
|
||||
this.$emit('onDayClick', response);
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
//改变年月
|
||||
changYearMonth(y, m) {
|
||||
this.dates = this.monthDay(y, m);
|
||||
this.y = y;
|
||||
this.m = m;
|
||||
},
|
||||
changeMonth(type) {
|
||||
let that = this
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
if (type == 'pre') {
|
||||
if (that.m + 1 == 2) {
|
||||
that.m = 12;
|
||||
that.y = that.y - 1;
|
||||
} else {
|
||||
that.m = that.m - 1;
|
||||
}
|
||||
that.month = this.$tools.getMonth(that.month, -1)
|
||||
that.$emit('onMonthClickPre', that.month)
|
||||
} else {
|
||||
if (this.m + 1 == 13) {
|
||||
this.m = 1;
|
||||
this.y = this.y + 1;
|
||||
} else {
|
||||
this.m = this.m + 1;
|
||||
}
|
||||
that.month = this.$tools.getMonth(that.month, +1)
|
||||
that.$emit('onMonthClickPre', that.month)
|
||||
}
|
||||
this.dates = this.monthDay(this.y, this.m);
|
||||
}
|
||||
}
|
||||
};
|
||||
export default {
|
||||
name: 'ren-calendar',
|
||||
props: {
|
||||
// 星期几为第一天(0为星期日)
|
||||
weekstart: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 标记的日期
|
||||
markDays: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
//是否展示月份切换按钮
|
||||
headerBar: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 是否展开
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//是否可收缩
|
||||
collapsible: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//未来日期是否不可点击
|
||||
disabledAfter: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
weektext: ['日', '一', '二', '三', '四', '五', '六'],
|
||||
y: new Date().getFullYear(), // 年
|
||||
m: new Date().getMonth() + 1, // 月
|
||||
dates: [], // 当前月的日期数据
|
||||
positionTop: 0,
|
||||
monthOpen: true,
|
||||
choose: '',
|
||||
month: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.dates = this.monthDay(this.y, this.m);
|
||||
!this.open && this.toggle();
|
||||
},
|
||||
mounted() {
|
||||
this.y = new Date().getFullYear()
|
||||
this.m = new Date().getMonth() + 1
|
||||
this.month = this.$tools.getDate("m")
|
||||
this.choose = this.getToday().date;
|
||||
},
|
||||
computed: {
|
||||
// 顶部星期栏
|
||||
weekDay() {
|
||||
return this.weektext.slice(this.weekstart).concat(this.weektext.slice(0, this.weekstart));
|
||||
},
|
||||
height() {
|
||||
return (this.dates.length / 7) * 80 + 'rpx';
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatNum(num) {
|
||||
let res = Number(num);
|
||||
return res < 10 ? '0' + res : res;
|
||||
},
|
||||
getToday() {
|
||||
let date = new Date();
|
||||
let y = date.getFullYear();
|
||||
let m = date.getMonth();
|
||||
let d = date.getDate();
|
||||
let week = new Date().getDay();
|
||||
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
|
||||
let formatWeek = '星期' + weekText[week];
|
||||
let today = {
|
||||
date: y + '-' + this.formatNum(m + 1) + '-' + this.formatNum(d),
|
||||
week: formatWeek
|
||||
};
|
||||
return today;
|
||||
},
|
||||
// 获取当前月份数据
|
||||
monthDay(y, month) {
|
||||
let dates = [];
|
||||
let m = Number(month);
|
||||
let firstDayOfMonth = new Date(y, m - 1, 1).getDay(); // 当月第一天星期几
|
||||
let lastDateOfMonth = new Date(y, m, 0).getDate(); // 当月最后一天
|
||||
let lastDayOfLastMonth = new Date(y, m - 1, 0).getDate(); // 上一月的最后一天
|
||||
let weekstart = this.weekstart == 7 ? 0 : this.weekstart;
|
||||
let startDay = (() => {
|
||||
// 周初有几天是上个月的
|
||||
if (firstDayOfMonth == weekstart) {
|
||||
return 0;
|
||||
} else if (firstDayOfMonth > weekstart) {
|
||||
return firstDayOfMonth - weekstart;
|
||||
} else {
|
||||
return 7 - weekstart + firstDayOfMonth;
|
||||
}
|
||||
})();
|
||||
let endDay = 7 - ((startDay + lastDateOfMonth) % 7); // 结束还有几天是下个月的
|
||||
if (endDay == 7) {
|
||||
endDay = 0;
|
||||
}
|
||||
for (let i = 1; i <= startDay; i++) {
|
||||
dates.push({
|
||||
date: this.formatNum(lastDayOfLastMonth - startDay + i),
|
||||
day: weekstart + i - 1 || 7,
|
||||
month: m - 1 >= 0 ? this.formatNum(m - 1) : 12,
|
||||
year: m - 1 >= 0 ? y : y - 1
|
||||
});
|
||||
}
|
||||
for (let j = 1; j <= lastDateOfMonth; j++) {
|
||||
dates.push({
|
||||
date: this.formatNum(j),
|
||||
day: (j % 7) + firstDayOfMonth - 1 || 7,
|
||||
month: this.formatNum(m),
|
||||
year: y,
|
||||
isCurM: true //是否当前月份
|
||||
});
|
||||
}
|
||||
for (let k = 1; k <= endDay; k++) {
|
||||
dates.push({
|
||||
date: this.formatNum(k),
|
||||
day: (lastDateOfMonth + startDay + weekstart + k - 1) % 7 || 7,
|
||||
month: m + 1 <= 11 ? this.formatNum(m + 1) : 0,
|
||||
year: m + 1 <= 11 ? y : y + 1
|
||||
});
|
||||
}
|
||||
return dates;
|
||||
},
|
||||
isWorkDay(y, m, d) {
|
||||
//是否工作日
|
||||
let ymd = `${y}/${m}/${d}`;
|
||||
let formatDY = new Date(ymd.replace(/-/g, '/'));
|
||||
let week = formatDY.getDay();
|
||||
if (week == 0 || week == 6) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
isFutureDay(y, m, d) {
|
||||
//是否未来日期
|
||||
let ymd = `${y}/${m}/${d}`;
|
||||
let formatDY = new Date(ymd.replace(/-/g, '/'));
|
||||
let showTime = formatDY.getTime();
|
||||
let curTime = new Date().getTime();
|
||||
if (showTime > curTime) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 标记日期
|
||||
isMarkDay(y, m, d) {
|
||||
let flag = false;
|
||||
for (let i = 0; i < this.markDays.length; i++) {
|
||||
let dy = `${y}-${m}-${d}`;
|
||||
if (this.markDays[i] == dy) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
isToday(y, m, d) {
|
||||
let checkD = y + '-' + m + '-' + d;
|
||||
let today = this.getToday().date;
|
||||
if (checkD == today) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 展开收起
|
||||
toggle() {
|
||||
this.monthOpen = !this.monthOpen;
|
||||
if (this.monthOpen) {
|
||||
this.positionTop = 0;
|
||||
} else {
|
||||
let index = -1;
|
||||
this.dates.forEach((i, x) => {
|
||||
this.isToday(i.year, i.month, i.date) && (index = x);
|
||||
});
|
||||
this.positionTop = -((Math.ceil((index + 1) / 7) || 1) - 1) * 80;
|
||||
}
|
||||
},
|
||||
// 点击回调
|
||||
selectOne(i, event) {
|
||||
let date = `${i.year}-${i.month}-${i.date}`;
|
||||
let selectD = new Date(date).getTime();
|
||||
let curTime = new Date().getTime();
|
||||
let week = new Date(date).getDay();
|
||||
let weekText = ['日', '一', '二', '三', '四', '五', '六'];
|
||||
let formatWeek = '星期' + weekText[week];
|
||||
let response = {
|
||||
date: date,
|
||||
week: formatWeek
|
||||
};
|
||||
if (!i.isCurM) {
|
||||
// console.log('不在当前月范围内');
|
||||
return false;
|
||||
}
|
||||
if (selectD > curTime) {
|
||||
if (this.disabledAfter) {
|
||||
console.log('未来日期不可选');
|
||||
return false;
|
||||
} else {
|
||||
this.choose = date;
|
||||
this.$emit('onDayClick', response);
|
||||
}
|
||||
} else {
|
||||
this.choose = date;
|
||||
this.$emit('onDayClick', response);
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
//改变年月
|
||||
changYearMonth(y, m) {
|
||||
this.dates = this.monthDay(y, m);
|
||||
this.y = y;
|
||||
this.m = m;
|
||||
},
|
||||
changeMonth(type) {
|
||||
let that = this
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
if (type == 'pre') {
|
||||
if (that.m + 1 == 2) {
|
||||
that.m = 12;
|
||||
that.y = that.y - 1;
|
||||
} else {
|
||||
that.m = that.m - 1;
|
||||
}
|
||||
that.month = this.$tools.getMonth(that.month, -1)
|
||||
that.$emit('onMonthClickPre', that.month)
|
||||
} else {
|
||||
if (this.m + 1 == 13) {
|
||||
this.m = 1;
|
||||
this.y = this.y + 1;
|
||||
} else {
|
||||
this.m = this.m + 1;
|
||||
}
|
||||
that.month = this.$tools.getMonth(that.month, +1)
|
||||
that.$emit('onMonthClickPre', that.month)
|
||||
}
|
||||
this.dates = this.monthDay(this.y, this.m);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.calendar-wrapper {
|
||||
color: #bbb7b7;
|
||||
border-radius: 10px;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
background-color: #fff;
|
||||
padding-bottom: 10rpx;
|
||||
.calendar-wrapper {
|
||||
color: #bbb7b7;
|
||||
border-radius: 10px;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
background-color: #fff;
|
||||
padding-bottom: 10rpx;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 88rpx;
|
||||
color: #42464A;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
justify-content: space-around;
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 88rpx;
|
||||
color: #42464A;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
justify-content: space-around;
|
||||
|
||||
.pre,
|
||||
.next {
|
||||
color: $btncolor;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
image {
|
||||
color: $btncolor;
|
||||
font-size: 28rpx;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.week {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-bottom: 1rpx solid rgba(255, 255, 255, 0.2);
|
||||
.week {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-bottom: 1rpx solid rgba(255, 255, 255, 0.2);
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
view {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.content0 {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: height 0.4s ease;
|
||||
.content0 {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: height 0.4s ease;
|
||||
|
||||
.days {
|
||||
transition: top 0.3s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
.days {
|
||||
transition: top 0.3s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
width: calc(100% / 7);
|
||||
.item {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
width: calc(100% / 7);
|
||||
|
||||
.day {
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 60rpx;
|
||||
.day {
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 60rpx;
|
||||
|
||||
&.choose {
|
||||
background-color: $btncolor;
|
||||
color: #fff;
|
||||
}
|
||||
&.choose {
|
||||
background-color: $btncolor;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&.nolm {
|
||||
color: #fff;
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
&.nolm {
|
||||
color: #fff;
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
.isWorkDay {
|
||||
color: #42464a;
|
||||
}
|
||||
.isWorkDay {
|
||||
color: #42464a;
|
||||
}
|
||||
|
||||
.notSigned {
|
||||
font-style: normal;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
background: #fa7268;
|
||||
border-radius: 10rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.notSigned {
|
||||
font-style: normal;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
background: #fa7268;
|
||||
border-radius: 10rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.today {
|
||||
color: #fff;
|
||||
background-color: #a8c0ff;
|
||||
}
|
||||
.today {
|
||||
color: #fff;
|
||||
background-color: #a8c0ff;
|
||||
}
|
||||
|
||||
.workDay {
|
||||
font-style: normal;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
background: #4d7df9;
|
||||
border-radius: 10rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.workDay {
|
||||
font-style: normal;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
background: #4d7df9;
|
||||
border-radius: 10rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.markDay {
|
||||
font-style: normal;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
background: #fa7268;
|
||||
border-radius: 10rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.markDay {
|
||||
font-style: normal;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
background: #fa7268;
|
||||
border-radius: 10rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hide {
|
||||
height: 80rpx !important;
|
||||
}
|
||||
.hide {
|
||||
height: 80rpx !important;
|
||||
}
|
||||
|
||||
.weektoggle {
|
||||
width: 85rpx;
|
||||
height: 32rpx;
|
||||
position: relative;
|
||||
bottom: -42rpx;
|
||||
.weektoggle {
|
||||
width: 85rpx;
|
||||
height: 32rpx;
|
||||
position: relative;
|
||||
bottom: -42rpx;
|
||||
|
||||
&.down {
|
||||
transform: rotate(180deg);
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
&.down {
|
||||
transform: rotate(180deg);
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,134 +1,139 @@
|
|||
<template>
|
||||
<view class="wrapper" v-if="isedit">
|
||||
<view class="bg" @click="onTap">
|
||||
<view class="edit" @click.stop>
|
||||
<view class="title">
|
||||
健康资料
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="editem">
|
||||
<view class="name">性别</view>
|
||||
<view class="radio mr-10" @click="selectsex(1)">
|
||||
<icon class="iconfont radioimg" :class="[info.sex==1?'icon-radio':'icon-kongradio']">
|
||||
</icon>
|
||||
<view class="ml-10">男</view>
|
||||
</view>
|
||||
<view class="radio" @click="selectsex(2)">
|
||||
<icon class="iconfont radioimg" :class="[info.sex==2?'icon-radio':'icon-kongradio']">
|
||||
</icon>
|
||||
<view class="ml-10">女</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="editem">
|
||||
<view class="name">身高</view>
|
||||
<view class="right">
|
||||
<input type="digit" v-model="info.height" placeholder="请输入身高" />cm
|
||||
</view>
|
||||
</view>
|
||||
<view class="editem">
|
||||
<view class="name">出生日期</view>
|
||||
<view class="right">
|
||||
<picker mode="date" :end="endDate" class="f-r" :value="info.birthday" @change="onBirthdayArr">
|
||||
<view class="uni-input">{{info.birthday?info.birthday:"请选择"}}
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
请准确填写信息方便我们给您更精确的报告
|
||||
</view>
|
||||
<view class="btn mt-15" @click="handleCloseClick">保存信息</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper" v-if="isedit">
|
||||
<view class="bg" @click="onTap">
|
||||
<view class="edit" @click.stop>
|
||||
<view class="title">
|
||||
健康资料
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="editem">
|
||||
<view class="name">性别</view>
|
||||
<view class="radio mr-10" @click="selectsex(1)">
|
||||
<image :src="info.sex==1?'../../static/radio.png':'../../static/icon-kongradio.png'"
|
||||
class="iconfont radioimg"></image>
|
||||
<view class="ml-10">男</view>
|
||||
</view>
|
||||
<view class="radio" @click="selectsex(2)">
|
||||
<image :src="info.sex==2?'../../static/radio.png':'../../static/icon-kongradio.png'"
|
||||
class="iconfont radioimg"></image>
|
||||
<view class="ml-10">女</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="editem">
|
||||
<view class="name">身高</view>
|
||||
<view class="right">
|
||||
<input type="digit" v-model="info.height" placeholder="请输入身高" />cm
|
||||
</view>
|
||||
</view>
|
||||
<view class="editem">
|
||||
<view class="name">出生日期</view>
|
||||
<view class="right">
|
||||
<picker mode="date" :end="endDate" class="f-r" :value="info.birthday" @change="onBirthdayArr">
|
||||
<view class="uni-input">{{info.birthday?info.birthday:"请选择"}}
|
||||
<icon class="iconfont icon-arrow-down"></icon>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
请准确填写信息方便我们给您更精确的报告
|
||||
</view>
|
||||
<view class="btn mt-15" @click="handleCloseClick">保存信息</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
height: "",
|
||||
birthday: "",
|
||||
sex: 0,
|
||||
},
|
||||
ageArr: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "isedit"]),
|
||||
userInfo: function() {
|
||||
return this.user
|
||||
},
|
||||
endDate() {
|
||||
return this.$tools.getDate("start")
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
var agedata = []
|
||||
for (var i = 12; i <= 80; i++) {
|
||||
agedata.push(i);
|
||||
}
|
||||
this.ageArr = agedata
|
||||
this.info = this.user
|
||||
},
|
||||
methods: {
|
||||
onTap() {
|
||||
// this.isHeight = false
|
||||
// this.slideheight = this.userInfo.height
|
||||
// this.$store.commit("changeEdit", false);
|
||||
},
|
||||
// 性别切换
|
||||
selectsex(e) {
|
||||
this.info.sex = e
|
||||
},
|
||||
// 出生日期
|
||||
onBirthdayArr(e) {
|
||||
this.info.birthday = e.target.value
|
||||
},
|
||||
// 提交、
|
||||
handleCloseClick() {
|
||||
let that = this
|
||||
if (!that.info.sex) {
|
||||
that.$tools.msg("请选择性别")
|
||||
return
|
||||
}
|
||||
if (!that.info.height) {
|
||||
that.$tools.msg("请选择身高")
|
||||
return
|
||||
}
|
||||
if (!that.info.birthday) {
|
||||
that.$tools.msg("请选择出生日期")
|
||||
return
|
||||
}
|
||||
that.$store.commit("changeEdit", false);
|
||||
that.getResult()
|
||||
},
|
||||
getResult() {
|
||||
let that = this
|
||||
that.$model.getResult({
|
||||
birthday: that.userInfo.birthday,
|
||||
familyid: that.userInfo.familyid,
|
||||
height: that.userInfo.height,
|
||||
sex: that.userInfo.sex,
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
that.$store.commit('changeMeasureResult', res.data)
|
||||
}
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
familyid: that.userInfo.familyid,
|
||||
})
|
||||
that.$store.dispatch("getFamilyList");
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
height: "",
|
||||
birthday: "",
|
||||
sex: 0,
|
||||
},
|
||||
ageArr: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "isedit"]),
|
||||
userInfo: function() {
|
||||
return this.user
|
||||
},
|
||||
endDate() {
|
||||
return this.$tools.getDate("start")
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
var agedata = []
|
||||
for (var i = 12; i <= 80; i++) {
|
||||
agedata.push(i);
|
||||
}
|
||||
this.ageArr = agedata
|
||||
this.info = this.user
|
||||
},
|
||||
methods: {
|
||||
onTap() {
|
||||
// this.isHeight = false
|
||||
// this.slideheight = this.userInfo.height
|
||||
// this.$store.commit("changeEdit", false);
|
||||
},
|
||||
// 性别切换
|
||||
selectsex(e) {
|
||||
this.info.sex = e
|
||||
},
|
||||
// 出生日期
|
||||
onBirthdayArr(e) {
|
||||
this.info.birthday = e.target.value
|
||||
},
|
||||
// 提交、
|
||||
handleCloseClick() {
|
||||
let that = this
|
||||
if (!that.info.sex) {
|
||||
that.$tools.msg("请选择性别")
|
||||
return
|
||||
}
|
||||
if (!that.info.height) {
|
||||
that.$tools.msg("请选择身高")
|
||||
return
|
||||
}
|
||||
if (!that.info.birthday) {
|
||||
that.$tools.msg("请选择出生日期")
|
||||
return
|
||||
}
|
||||
that.$store.commit("changeEdit", false);
|
||||
that.getResult()
|
||||
},
|
||||
getResult() {
|
||||
let that = this
|
||||
that.$model.getResult({
|
||||
birthday: that.userInfo.birthday,
|
||||
familyid: that.userInfo.familyid,
|
||||
height: that.userInfo.height,
|
||||
sex: that.userInfo.sex,
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
that.$store.commit('changeMeasureResult', res.data)
|
||||
}
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
familyid: that.userInfo.familyid,
|
||||
})
|
||||
that.$store.dispatch("getFamilyList");
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
.radioimg{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx80ee50db22dbbb2f",
|
||||
"appid" : "wx856cb5f21789e382",
|
||||
"setting" : {
|
||||
"urlCheck" : true,
|
||||
"minified" : true,
|
||||
|
|
|
|||
|
|
@ -1,332 +1,341 @@
|
|||
<template>
|
||||
<view class="common">
|
||||
<view class="header" v-if="info" :style="{background:appTheme}">
|
||||
<view class="left">
|
||||
<image :src="info.headimg" class="image1" />
|
||||
<view class="left_sm">
|
||||
<view class="name">
|
||||
<view>{{info.name?info.name:""}}</view>
|
||||
<view class="right">
|
||||
<view v-if="info.isself != 1" @click="deldet(Infoid)" class="guanliyuan">删除</view>
|
||||
<view @click="editorInfo()" class="guanliyuan">编辑</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-5">
|
||||
<text>{{info.sex==0?'未知':info.sex==2?'女':'男'}}</text>
|
||||
<text>{{info.height}}cm</text>
|
||||
<text>{{info.mage?info.mage:"0岁"}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="list ">
|
||||
<view class="history" v-if="ranklist.length">
|
||||
<view class="list-item" v-for="(item ,index) in ranklist" :key="index">
|
||||
<view class="item" @click="clickItemMethod(item)">
|
||||
<view class="time">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view>{{item.weight}}<text>体重</text></view>
|
||||
<view>{{item.bmi}}<text>BMI</text></view>
|
||||
<view>{{item.fat_r}}<text>脂肪率</text></view>
|
||||
<icon class="iconfont icon-arrow-right"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="endtext mb-15" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
</view>
|
||||
<view class="nolist" v-else>
|
||||
<icon class="iconfont icon-zanwu"></icon>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="common">
|
||||
<view class="header" v-if="info" :style="{background:appTheme}">
|
||||
<view class="left">
|
||||
<image :src="info.headimg" class="image1" />
|
||||
<view class="left_sm">
|
||||
<view class="name">
|
||||
<view>{{info.name?info.name:""}}</view>
|
||||
<view class="right">
|
||||
<view v-if="info.isself != 1" @click="deldet(Infoid)" class="guanliyuan">删除</view>
|
||||
<view @click="editorInfo()" class="guanliyuan">编辑</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-5">
|
||||
<text>{{info.sex==0?'未知':info.sex==2?'女':'男'}}</text>
|
||||
<text>{{info.height}}cm</text>
|
||||
<text>{{info.mage?info.mage:"0岁"}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="list ">
|
||||
<view class="history" v-if="ranklist.length">
|
||||
<view class="list-item" v-for="(item ,index) in ranklist" :key="index">
|
||||
<view class="item" @click="clickItemMethod(item)">
|
||||
<view class="time">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view>{{item.weight}}<text>体重</text></view>
|
||||
<view>{{item.bmi}}<text>BMI</text></view>
|
||||
<view>{{item.fat_r}}<text>脂肪率</text></view>
|
||||
<image src="../../static/arrow-right.png" class="iconfont2"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="endtext mb-15" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
</view>
|
||||
<view class="nolist" v-else>
|
||||
<!-- <icon class="iconfont icon-zanwu"></icon> -->
|
||||
<image src="../../static/zanwu.png" class="iconfont"></image>
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ranklist: [],
|
||||
info: {},
|
||||
memberText: null,
|
||||
memberType: [],
|
||||
page: 1,
|
||||
lastPage: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "appTheme"])
|
||||
},
|
||||
onLoad(option) {
|
||||
// 导航栏颜色
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: this.appTheme,
|
||||
})
|
||||
//
|
||||
this.page = 1
|
||||
this.ranklist = []
|
||||
console.log("id", option)
|
||||
if (option.id) {
|
||||
this.Infoid = option.id
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.ranklist = []
|
||||
this.gethistory(this.Infoid)
|
||||
this.getHistoryList(this.Infoid)
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log(this.lastPage, this.page)
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.page++
|
||||
this.getHistoryList(this.Infoid)
|
||||
},
|
||||
methods: {
|
||||
// 历史记录
|
||||
getHistoryList(id) {
|
||||
this.$model.getHistoryList({
|
||||
familyId: id,
|
||||
pageNo: this.page,
|
||||
pageSize: 10,
|
||||
}).then((res) => {
|
||||
if (res.code != 0) {
|
||||
return
|
||||
}
|
||||
this.ranklist = this.ranklist.concat(res.data.rows)
|
||||
this.lastPage = res.data.totalpage
|
||||
})
|
||||
},
|
||||
// 信息
|
||||
gethistory(id) {
|
||||
this.$model.getdetail({
|
||||
id: id
|
||||
}).then((res) => {
|
||||
if (res.code != 0) {
|
||||
return
|
||||
}
|
||||
this.info = res.data
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
editorInfo() {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/adduser?familayData=" + JSON.stringify(this.info),
|
||||
})
|
||||
},
|
||||
//删除
|
||||
deldet(id) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '确定删除该成员吗',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdelete({
|
||||
id: id,
|
||||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg("删除成功!");
|
||||
that.getFamilyList()
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消删除!");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getFamilyList() {
|
||||
let that = this
|
||||
that.$model.getFamilyList({}).then(res => {
|
||||
that.$store.commit("changeFamilay", res)
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
familyid: res[0].familyid
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/me/me'
|
||||
});
|
||||
}).catch(e => {})
|
||||
},
|
||||
// 详情
|
||||
clickItemMethod(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/info?index=" + JSON.stringify(item)
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ranklist: [],
|
||||
info: {},
|
||||
memberText: null,
|
||||
memberType: [],
|
||||
page: 1,
|
||||
lastPage: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "appTheme"])
|
||||
},
|
||||
onLoad(option) {
|
||||
// 导航栏颜色
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: this.appTheme,
|
||||
})
|
||||
//
|
||||
this.page = 1
|
||||
this.ranklist = []
|
||||
console.log("id", option)
|
||||
if (option.id) {
|
||||
this.Infoid = option.id
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.ranklist = []
|
||||
this.gethistory(this.Infoid)
|
||||
this.getHistoryList(this.Infoid)
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log(this.lastPage, this.page)
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.page++
|
||||
this.getHistoryList(this.Infoid)
|
||||
},
|
||||
methods: {
|
||||
// 历史记录
|
||||
getHistoryList(id) {
|
||||
this.$model.getHistoryList({
|
||||
familyId: id,
|
||||
pageNo: this.page,
|
||||
pageSize: 10,
|
||||
}).then((res) => {
|
||||
if (res.code != 0) {
|
||||
return
|
||||
}
|
||||
this.ranklist = this.ranklist.concat(res.data.rows)
|
||||
this.lastPage = res.data.totalpage
|
||||
})
|
||||
},
|
||||
// 信息
|
||||
gethistory(id) {
|
||||
this.$model.getdetail({
|
||||
id: id
|
||||
}).then((res) => {
|
||||
if (res.code != 0) {
|
||||
return
|
||||
}
|
||||
this.info = res.data
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
editorInfo() {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/adduser?familayData=" + JSON.stringify(this.info),
|
||||
})
|
||||
},
|
||||
//删除
|
||||
deldet(id) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '确定删除该成员吗',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getdelete({
|
||||
id: id,
|
||||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg("删除成功!");
|
||||
that.getFamilyList()
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消删除!");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getFamilyList() {
|
||||
let that = this
|
||||
that.$model.getFamilyList({}).then(res => {
|
||||
that.$store.commit("changeFamilay", res)
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
familyid: res[0].familyid
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/me/me'
|
||||
});
|
||||
}).catch(e => {})
|
||||
},
|
||||
// 详情
|
||||
clickItemMethod(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pageTwo/me/info?index=" + JSON.stringify(item)
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="scoped" lang="scss">
|
||||
.list {
|
||||
margin-top: 80px;
|
||||
}
|
||||
.list {
|
||||
margin-top: 80px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
text-align: center;
|
||||
margin: 10px 0 15px;
|
||||
}
|
||||
.list-item {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
text-align: center;
|
||||
margin: 10px 0 15px;
|
||||
}
|
||||
|
||||
.item {
|
||||
background-color: #fff;
|
||||
padding: 5px 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-radius: 10px;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
margin-bottom: 30rpx;
|
||||
line-height: 40rpx;
|
||||
.item {
|
||||
background-color: #fff;
|
||||
padding: 5px 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-radius: 10px;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
margin-bottom: 30rpx;
|
||||
line-height: 40rpx;
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
font-size: 24rpx;
|
||||
display: block;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
}
|
||||
text {
|
||||
width: 100%;
|
||||
font-size: 24rpx;
|
||||
display: block;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
view {
|
||||
width: 18%;
|
||||
}
|
||||
view {
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 32% !important;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
.time {
|
||||
width: 32% !important;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
margin-top: 3px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
//
|
||||
.common {
|
||||
padding: 0 15px;
|
||||
min-height: calc(100vh - 90px);
|
||||
height: 100%;
|
||||
}
|
||||
text {
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
margin-top: 3px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 90px;
|
||||
background: $mainColor;
|
||||
position: fixed;
|
||||
top: 0rem;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
z-index: 99;
|
||||
padding: 0 10px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.left {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
//
|
||||
.common {
|
||||
padding: 0 15px;
|
||||
min-height: calc(100vh - 90px);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.left_sm {
|
||||
text-align: left;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
left: 60px;
|
||||
top: 25px;
|
||||
right: 0;
|
||||
.header {
|
||||
height: 90px;
|
||||
background: $mainColor;
|
||||
position: fixed;
|
||||
top: 0rem;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
z-index: 99;
|
||||
padding: 0 10px;
|
||||
justify-content: space-between;
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.left {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
padding-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.left_sm {
|
||||
text-align: left;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
left: 60px;
|
||||
top: 25px;
|
||||
right: 0;
|
||||
|
||||
.type,
|
||||
.type2 {
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
padding: 0 3px !important;
|
||||
font-size: 12px !important;
|
||||
border-radius: 10px;
|
||||
line-height: initial;
|
||||
color: $btncolor;
|
||||
}
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.image1 {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
border-radius: 50%;
|
||||
}
|
||||
text {
|
||||
display: inline-block;
|
||||
padding-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: left;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
.type,
|
||||
.type2 {
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
padding: 0 3px !important;
|
||||
font-size: 12px !important;
|
||||
border-radius: 10px;
|
||||
line-height: initial;
|
||||
color: $btncolor;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
.image1 {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.guanliyuan {
|
||||
border: 1px solid #fff;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
p {
|
||||
text-align: left;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.leftChild {
|
||||
width: 100% !important;
|
||||
padding: 10px 0 !important;
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
|
||||
view {
|
||||
min-width: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.guanliyuan {
|
||||
border: 1px solid #fff;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.leftChild {
|
||||
width: 100% !important;
|
||||
padding: 10px 0 !important;
|
||||
|
||||
view {
|
||||
min-width: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont2 {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<view>{{item.weight}}<text>体重</text></view>
|
||||
<view>{{item.bmi}}<text>BMI</text></view>
|
||||
<view>{{item.fat_r}}<text>脂肪率</text></view>
|
||||
<icon class="iconfont icon-arrow-right"></icon>
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
|
|
@ -24,7 +24,8 @@
|
|||
<view class="endtext" v-if="!lastPage || page >= lastPage">—— 到底了,看看别的吧 ——</view>
|
||||
</view>
|
||||
<view class="nolist" v-if="!lastPage">
|
||||
<icon class="iconfont icon-zanwu"></icon>
|
||||
<image src="../../static/zanwu.png" class="iconfont"></image>
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -160,6 +161,11 @@
|
|||
|
||||
.item {
|
||||
margin-bottom: 0;
|
||||
|
||||
image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
<view class="h5">{{ite.title}}</view>
|
||||
<view class="item">
|
||||
<view class="group" v-for="(it, id) in ite.data" :key="id" @click="Changeradio(it)">
|
||||
<icon class="iconfont radioimg" :class="[dasC.indexOf(it.val)!=-1?'icon-radio':'icon-kongradio']">
|
||||
</icon>
|
||||
<image :src="dasC.indexOf(it.val)!=-1?'../../static/radio.png':'../../static/icon-kongradio.png'" class="iconfont radioimg"></image>
|
||||
<view>{{it.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -307,6 +307,14 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F9FAFC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "child/BYHD02BT",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F9FAFC"
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
<!-- 成人 -->
|
||||
<view class="item">
|
||||
<view class="check">
|
||||
<icon class="iconfont" :class="isActive.indexOf(item.id)!=-1?'icon-radio':'icon-kongradio'">
|
||||
</icon>
|
||||
<image :src="isActive.indexOf(item.id)!=-1?'../../static/radio.png':'../../static/icon-kongradio.png'" class="iconfont"></image>
|
||||
</view>
|
||||
<view>{{item.height}}<text>身高</text></view>
|
||||
<view>{{item.weight}}<text>体重</text></view>
|
||||
|
|
@ -30,7 +29,7 @@
|
|||
<view>{{ite.weight}}<text>体重</text></view>
|
||||
<view>{{ite.bmi}}<text>BMI</text></view>
|
||||
<view class="check">
|
||||
<icon class="iconfont icon-quxiao"></icon>
|
||||
<image src="../../static/quxiao.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,21 @@
|
|||
</view>
|
||||
<!-- 工具 -->
|
||||
<view class="tools_l">
|
||||
<view v-for="(item,index) in toollist" :key="index" class="list" @click="clickTool(item.id)">
|
||||
<image :src="item.icon"></image>
|
||||
<view class="text">{{item.title}}</view>
|
||||
<view class="list" @click="clickTool(0)">
|
||||
<image src="/static/tool1.png"></image>
|
||||
<view class="text">手动记录</view>
|
||||
</view>
|
||||
<view class="list" @click="clickTool(1)">
|
||||
<image src="/static/tool2.png"></image>
|
||||
<view class="text">体质评估</view>
|
||||
</view>
|
||||
<view class="list" @click="clickTool(2)" v-if="configBox.isshowchild">
|
||||
<image src="/static/tool3.png"></image>
|
||||
<view class="text">儿童测量</view>
|
||||
</view>
|
||||
<view class="list" @click="clickTool(3)">
|
||||
<image src="/static/tool4.png"></image>
|
||||
<view class="text">历史记录</view>
|
||||
</view>
|
||||
<!-- 客服 -->
|
||||
<message v-if="token&&configBox.serviceappid"></message>
|
||||
|
|
@ -127,7 +139,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view v-else class="nolist">
|
||||
<icon class="iconfont icon-zanwu"></icon>
|
||||
<image src="../../static/zanwu.png" class="iconfont"></image>
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="introction" v-if="MeasureResult&&infoList.length">
|
||||
|
|
@ -194,14 +207,6 @@
|
|||
that.userId = options.userid
|
||||
}
|
||||
await that.login()
|
||||
|
||||
// let value = "a900260e1501003200000000021d03fa1600ae9a"
|
||||
let value = "a900260710020064451100f99a"
|
||||
let dw = value.substring(19, 20)
|
||||
let type = value.substring(8, 10)
|
||||
let typeInfo = value.substring(10, 12)
|
||||
let weight = parseInt(value.substring(12, 18), 16)
|
||||
console.log("value", type, typeInfo, weight, dw ,value.substring(12, 18))
|
||||
},
|
||||
onShow() {
|
||||
this.token = uni.getStorageSync('token')
|
||||
|
|
@ -381,16 +386,11 @@
|
|||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
that.$store.commit("changeBluetooth", true);
|
||||
// if (that.devHomePram && that.devHomePram.t && that.devHomePram.sn) {
|
||||
// that.$tools.handlePages(that.devHomePram.t, that.devHomePram.sn)
|
||||
// return
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: "/pages/search/devType"
|
||||
})
|
||||
|
|
@ -510,16 +510,16 @@
|
|||
title: '体质评估',
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
icon: '/static/tool3.png',
|
||||
title: '儿童测量',
|
||||
id: 2
|
||||
},
|
||||
{
|
||||
icon: '/static/tool4.png',
|
||||
title: '历史记录',
|
||||
id: 3
|
||||
},
|
||||
{
|
||||
icon: '/static/tool3.png',
|
||||
title: '儿童测量',
|
||||
id: 2
|
||||
}
|
||||
|
||||
],
|
||||
checkList: [{
|
||||
|
|
|
|||
615
pages/me/me.vue
|
|
@ -1,325 +1,326 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="header-con" :style="{background:appTheme}">
|
||||
<view class="header" v-if="token">
|
||||
<image :src="user.headimg" class="headimage" />
|
||||
<text>{{user.name||user.name}}</text>
|
||||
</view>
|
||||
<view class="header2" v-else @click="handleLogin">
|
||||
<view class="text"><text>登录</text>查看更多信息</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="infolist">
|
||||
<view class="item borderRadius" @click="handleEditClick">
|
||||
<view class="left">
|
||||
性别
|
||||
</view>
|
||||
<view class="right"><text>{{user.sex==0?"未知":user.sex==1?'男':'女'}}</text>
|
||||
<icon class="t-icon t-icon-bianji3"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item borderRadius" @click="handleEditClick">
|
||||
<view class="left">
|
||||
年龄(岁)
|
||||
</view>
|
||||
<view class="right"><text>{{user.age?user.age:user.mage?user.mage:0}}</text>
|
||||
<icon class="t-icon t-icon-bianji3"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item borderRadius" @click="handleEditClick">
|
||||
<view class="left">
|
||||
身高(cm)
|
||||
</view>
|
||||
<view class="right"><text>{{user.height?user.height:0}}</text>
|
||||
<icon class="t-icon t-icon-bianji3"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="wxlist borderRadius">
|
||||
<view class="list" @tap="navTo('/pageTwo/me/manage')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<i class="t-icon t-icon-shoucang"></i>
|
||||
<view class="name">成员管理</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @tap="navTo('/pageTwo/me/history')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<i class="t-icon t-icon-gonglve"></i>
|
||||
<view class="name">历史记录</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @tap="navTo('/pageTwo/me/feedBack')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<i class="t-icon t-icon-pinglun"></i>
|
||||
<view class="name">意见反馈</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @click="handleClick('device')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<icon class="t-icon t-icon-shouhou"></icon>
|
||||
<view class="name">设备管理</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @click="handleClick('adult')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<icon class="t-icon t-icon-hezuo"></icon>
|
||||
<view class="name">儿童测量</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn ml-15 mr-15" v-if="token" @click="handleOutLogin">退出登录</view>
|
||||
<SignUp></SignUp>
|
||||
<userPopup></userPopup>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="header-con" :style="{background:appTheme}">
|
||||
<view class="header" v-if="token">
|
||||
<image :src="user.headimg" class="headimage" />
|
||||
<text>{{user.name||user.name}}</text>
|
||||
</view>
|
||||
<view class="header2" v-else @click="handleLogin">
|
||||
<view class="text"><text>登录</text>查看更多信息</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="infolist">
|
||||
<view class="item borderRadius" @click="handleEditClick">
|
||||
<view class="left">
|
||||
性别
|
||||
</view>
|
||||
<view class="right"><text>{{user.sex==0?"未知":user.sex==1?'男':'女'}}</text>
|
||||
<icon class="t-icon t-icon-bianji3"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item borderRadius" @click="handleEditClick">
|
||||
<view class="left">
|
||||
年龄(岁)
|
||||
</view>
|
||||
<view class="right"><text>{{user.age?user.age:user.mage?user.mage:0}}</text>
|
||||
<icon class="t-icon t-icon-bianji3"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item borderRadius" @click="handleEditClick">
|
||||
<view class="left">
|
||||
身高(cm)
|
||||
</view>
|
||||
<view class="right"><text>{{user.height?user.height:0}}</text>
|
||||
<icon class="t-icon t-icon-bianji3"></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="wxlist borderRadius">
|
||||
<view class="list" @tap="navTo('/pageTwo/me/manage')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<i class="t-icon t-icon-shoucang"></i>
|
||||
<view class="name">成员管理</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @tap="navTo('/pageTwo/me/history')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<i class="t-icon t-icon-gonglve"></i>
|
||||
<view class="name">历史记录</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @tap="navTo('/pageTwo/me/feedBack')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<i class="t-icon t-icon-pinglun"></i>
|
||||
<view class="name">意见反馈</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @click="handleClick('device')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<icon class="t-icon t-icon-shouhou"></icon>
|
||||
<view class="name">设备管理</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="list" @click="handleClick('adult')" v-if="configBox.isshowchild">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<icon class="t-icon t-icon-hezuo"></icon>
|
||||
<view class="name">儿童测量</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image src="../../static/arrow-right.png" class="iconfont"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn ml-15 mr-15" v-if="token" @click="handleOutLogin">退出登录</view>
|
||||
<SignUp></SignUp>
|
||||
<userPopup></userPopup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import SignUp from '@/components/signup/signup.vue';
|
||||
import userPopup from '@/components/userLogin.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: null,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
userPopup,
|
||||
SignUp,
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "configBox", "appTheme"]),
|
||||
},
|
||||
onTabItemTap() {
|
||||
this.$store.commit("changeEdit", false);
|
||||
},
|
||||
onLoad() {
|
||||
// 导航栏颜色
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: this.appTheme,
|
||||
})
|
||||
//
|
||||
this.token = uni.getStorageSync("token")
|
||||
},
|
||||
methods: {
|
||||
handleLogin() {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
},
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '是否退出登录?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getoutlogin({
|
||||
sessionid: uni.getStorageSync('sessionid')
|
||||
}).then((res) => {
|
||||
that.$tools.msg(res.message)
|
||||
if (res.code != 0) return
|
||||
console.log('确定退出', res)
|
||||
uni.clearStorageSync()
|
||||
uni.setStorageSync('sessionid', null)
|
||||
that.$store.commit("changeLogout", false);
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消操作!");
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
handleClick(ind) {
|
||||
let that = this
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
if (ind == 'adult' && that.configBox.referappid) {
|
||||
console.log("跳转儿童小程序", uni.getStorageSync('userid'))
|
||||
uni.navigateToMiniProgram({
|
||||
appId: that.configBox.referappid,
|
||||
path: 'pages/index/index?userid=' + uni.getStorageSync('userid'),
|
||||
extraData: {},
|
||||
})
|
||||
return
|
||||
}
|
||||
if (ind == 'device' && that.configBox.businessappid) {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: that.configBox.businessappid,
|
||||
path: 'pages/index/index',
|
||||
extraData: {},
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
navTo(url) {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
handleEditClick() {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
this.$store.commit("changeEdit", true);
|
||||
},
|
||||
}
|
||||
}
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import SignUp from '@/components/signup/signup.vue';
|
||||
import userPopup from '@/components/userLogin.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: null,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
userPopup,
|
||||
SignUp,
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "configBox", "appTheme"]),
|
||||
},
|
||||
onTabItemTap() {
|
||||
this.$store.commit("changeEdit", false);
|
||||
},
|
||||
onLoad() {
|
||||
// 导航栏颜色
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: this.appTheme,
|
||||
})
|
||||
//
|
||||
this.token = uni.getStorageSync("token")
|
||||
},
|
||||
methods: {
|
||||
handleLogin() {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
},
|
||||
handleOutLogin() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '是否退出登录?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$model.getoutlogin({
|
||||
sessionid: uni.getStorageSync('sessionid')
|
||||
}).then((res) => {
|
||||
that.$tools.msg(res.message)
|
||||
if (res.code != 0) return
|
||||
console.log('确定退出', res)
|
||||
uni.clearStorageSync()
|
||||
uni.setStorageSync('sessionid', null)
|
||||
that.$store.commit("changeLogout", false);
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
that.$tools.msg("您已取消操作!");
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
handleClick(ind) {
|
||||
let that = this
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
if (ind == 'adult' && that.configBox.referappid) {
|
||||
console.log("跳转儿童小程序", uni.getStorageSync('userid'))
|
||||
uni.navigateToMiniProgram({
|
||||
appId: that.configBox.referappid,
|
||||
path: 'pages/index/index?userid=' + uni.getStorageSync('userid'),
|
||||
extraData: {},
|
||||
})
|
||||
return
|
||||
}
|
||||
if (ind == 'device' && that.configBox.businessappid) {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: that.configBox.businessappid,
|
||||
path: 'pages/index/index',
|
||||
extraData: {},
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
navTo(url) {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
handleEditClick() {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
uni.redirectTo({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
// that.$store.commit("changeUserLogin", true)
|
||||
return
|
||||
}
|
||||
this.$store.commit("changeEdit", true);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped="scoped" lang="scss">
|
||||
.content {
|
||||
min-height: 100vh;
|
||||
margin-top: 110px;
|
||||
}
|
||||
.content {
|
||||
min-height: 100vh;
|
||||
margin-top: 110px;
|
||||
}
|
||||
|
||||
.header-con {
|
||||
height: 95px !important;
|
||||
}
|
||||
.header-con {
|
||||
height: 95px !important;
|
||||
}
|
||||
|
||||
.wxlist {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0 15px;
|
||||
padding: 0 15px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
.wxlist {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0 15px;
|
||||
padding: 0 15px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
|
||||
.item {
|
||||
width: auto;
|
||||
font-size: 14px;
|
||||
line-height: 55px;
|
||||
height: 55px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
// border-bottom: 1px solid #dfdfdf;
|
||||
.item {
|
||||
width: auto;
|
||||
font-size: 14px;
|
||||
line-height: 55px;
|
||||
height: 55px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
// border-bottom: 1px solid #dfdfdf;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
.left {
|
||||
display: flex;
|
||||
|
||||
.name {
|
||||
float: left;
|
||||
color: #333;
|
||||
position: absolute;
|
||||
left: 27px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.name {
|
||||
float: left;
|
||||
color: #333;
|
||||
position: absolute;
|
||||
left: 27px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infolist {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 15px;
|
||||
.infolist {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 15px;
|
||||
|
||||
.item {
|
||||
width: 30%;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
}
|
||||
.item {
|
||||
width: 30%;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 5px;
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 5px;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
font-weight: 700;
|
||||
}
|
||||
text {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
icon {
|
||||
position: absolute;
|
||||
right: 7px;
|
||||
bottom: 9px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: auto;
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .header {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0;
|
||||
}
|
||||
.btn {
|
||||
width: auto;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
/deep/ .header text {
|
||||
background: inherit;
|
||||
border: none;
|
||||
width: 100%;
|
||||
display: block;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-right: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
/deep/ .header {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/deep/ .header text {
|
||||
background: inherit;
|
||||
border: none;
|
||||
width: 100%;
|
||||
display: block;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-right: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -40,7 +40,8 @@
|
|||
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
||||
</view>
|
||||
<view class="nolist" v-else>
|
||||
<icon class="iconfont icon-zanwu"></icon>
|
||||
<image src="../../static/zanwu.png" class="iconfont"></image>
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -261,7 +261,7 @@
|
|||
},
|
||||
cHeight: {
|
||||
type: Number,
|
||||
default: 400
|
||||
default: 700
|
||||
},
|
||||
cWidth: {
|
||||
type: Number,
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 18 KiB |