对接SG818

This commit is contained in:
qiaocl 2024-06-25 11:08:20 +08:00
parent 34305f11f0
commit a73bfec1a1
220 changed files with 60441 additions and 5096 deletions

View File

@ -2,6 +2,10 @@
// launchtypelocalremote, localremote // launchtypelocalremote, localremote
"version": "0.0", "version": "0.0",
"configurations": [{ "configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" : "default" :
{ {
"launchtype" : "local" "launchtype" : "local"

22
BLEPages/child/EFS003.vue Normal file
View File

@ -0,0 +1,22 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@ -305,15 +305,15 @@
let bleData = plugin.parseBleData(characteristic.value) let bleData = plugin.parseBleData(characteristic.value)
let dw0 = "kg" let dw0 = "kg"
let dw1 = "kg" let dw1 = "kg"
console.log("bleData", bleData)
if (bleData.status == 0) { if (bleData.status == 0) {
let sex0 = that.info.sex == 1 ? 1 : 0 let sex0 = that.info.sex == 1 ? 1 : 0
let sex = "0x0" + sex0.toString(16) let sex = "0x0" + sex0.toString(16)
let age = "0x" + that.info.age.toString(16) let age = "0x" + that.info.age.toString(16)
let height = "0x" + that.info.height.toString(16) let height = "0x" + that.info.height.toString(16)
let arr = [0x01, parseInt(sex), parseInt(age), parseInt(height), 0x00] let arr = [0x01, parseInt(sex), parseInt(age), parseInt(height), 0x00]
console.log("指令发送成功", arr)
plugin.sendDataOfA7(arr) plugin.sendDataOfA7(arr)
console.log("握手成功") console.log("握手成功", arr)
} else if (bleData.status == 1) { } else if (bleData.status == 1) {
let payload = that.$tools.ab2hex(bleData.data, '') let payload = that.$tools.ab2hex(bleData.data, '')
let typeInfo = payload.substring(4, 6) let typeInfo = payload.substring(4, 6)

436
BLEPages/child/HCSG818.vue Normal file
View File

@ -0,0 +1,436 @@
<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">{{textW}}</view>
<view class="text">{{textH}}</view>
<view class="image">
<image src="/BLEPages/static/SG818.gif"></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 {
textW: "",
height: "",
weight: "",
macAddr: "",
deviceId: "",
serviceId: "",
readId: "",
writeId: "",
notifyId: "",
isSend: true,
Unload: false,
devicesList: [],
isConnection: 0,
data01: {},
data02: {},
BLEResult: {}
}
},
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("页面返回onUnload")
}
},
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
}
},
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
that.textW = ""
console.log("options", options)
if (options && options.deviceId) {
that.macAddr = options.deviceId
that.deviceId = options.deviceId
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.openBluetoothAdapter()
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.textW = ""
that.isSend = true
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
console.log('初始化蓝牙成功:' + e.errMsg);
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("蓝牙连接状态", JSON.stringify(res));
if (!res.connected) {
that.Unload = true
that.isConnection = 2
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
that.$store.commit("changeConnected", res.connected);
})
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false,
interval: 500, //
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) // 广maciOSmac
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.deviceId = device.deviceId
that.macAddr = device.macAddr
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)
},
});
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log("设备连接成功获取设备的services", 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.serviceId = service.uuid;
that.isConnection = 1
that.getBLEDeviceCharacteristics(that.deviceId, service.uuid);
console.log("设备的FFE0的serviceId ", that.serviceId);
break;
}
}
},
fail: res => {
console.log('获取设备的UUID失败:', res)
}
});
},
/**
* 获取指定服务的特征值
*/
getBLEDeviceCharacteristics(deviceId, serviceId) {
let characteristicsList = [];
let that = this;
uni.getBLEDeviceCharacteristics({
deviceId: deviceId,
serviceId: serviceId,
success: res => {
console.log("服务的特征值成功", res)
characteristicsList = res.characteristics;
for (let i = 0; i < characteristicsList.length; i++) {
let item = characteristicsList[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,
serviceId,
characteristicId: that.uuid2,
state: true,
})
uni.notifyBLECharacteristicValueChange({
deviceId,
serviceId,
characteristicId: that.uuid3,
state: true,
})
uni.onBLECharacteristicValueChange((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, type)
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.textW = "您的实时体重是:" + data + dw1
}
if (typeInfo == "02") {
that.textW = "您的体重是:" + data + dw1
that.weight = data + dw2
console.log("稳定体重:", value, that.weight)
}
}
if (type == "14") {
that.height = parseInt(value.substring(10, 14), 16)
that.textH = "您的身高是:" + that.height + "cm"
console.log("稳定身高:", that.height)
}
if (type == '15') {
if (typeInfo == "01") {
that.data01 = {
bodyage: 0, //
fat_r: parseInt(value.substring(12, 16), 16) / 10, //
muscle: parseInt(value.substring(24, 28), 16) / 10, //
kcal: parseInt(value.substring(28, 32), 16), //
visceral: 0, //
sfr: 0, //
}
}
if (typeInfo == '02') {
that.data02 = {
water: parseInt(value.substring(24, 28), 16) / 10, //
bone: parseInt(value.substring(12, 16), 16) / 100, //
fatlevlval: 0, //
protein: 0, //
bmi: parseInt(value.substring(28, 32), 16) / 10, //BMI
}
}
that.BLEResult = Object.assign(that.data01, that.data02)
}
if (type == "30") {
that.BLEResult.weight = that.weight
that.BLEResult.ecode = that.macAddr
that.BLEResult.height = that.height
that.BLEResult.familyid = that.info.id
console.log("测量完成", that.BLEResult)
that.handleGetMeasure(that.BLEResult)
}
})
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
})
},
//
handleGetMeasure(data) {
console.log("保存结果")
let that = this
that.$model.getmeasuredata(data).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)
})
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
handleBack() {
let that = this
that.Unload = true
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
},
}
</script>
<style scoped lang="scss">
</style>

View File

@ -158,8 +158,7 @@
device.mac = new Uint8Array(buff) // 广maciOSmac device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac) let tempMac = Array.from(device.mac)
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase() device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
if (device.deviceId.indexOf(that.deviceId) !== -1 || device.macAddr.indexOf(that.deviceId) !== - if (device.deviceId.indexOf(that.deviceId) !== -1 || device.macAddr.indexOf(that.deviceId) !== -1) {
1) {
let msg = parseInt(value.substring(16, 18), 16).toString(2) let msg = parseInt(value.substring(16, 18), 16).toString(2)
let weight = parseInt(value.substring(4, 8), 16) let weight = parseInt(value.substring(4, 8), 16)
let type = msg.substring(5, 6) //0,1 let type = msg.substring(5, 6) //0,1

BIN
BLEPages/static/SG818.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1332,7 +1332,7 @@
.fen { .fen {
width: 20%; width: 20%;
position: absolute; position: absolute;
right: 0px; right: 15px;
top: -15px; top: -15px;
line-height: 60px; line-height: 60px;
@ -1418,7 +1418,7 @@
align-items: center; align-items: center;
color: #666; color: #666;
position: relative; position: relative;
border-bottom: 1px solid #f7f7f7; // border-bottom: 1px solid #f7f7f7;
.level, .level,
.val { .val {
@ -1446,7 +1446,7 @@
.desc { .desc {
line-height: 20px; line-height: 20px;
text-align: left; text-align: left;
width: 100%; width:calc(100% - 20px);
height: auto; height: auto;
overflow: hidden; overflow: hidden;
border-radius: 5px; border-radius: 5px;
@ -1483,7 +1483,7 @@
position: absolute; position: absolute;
z-index: 9; z-index: 9;
border: 2px solid #1b2086; border: 2px solid #1b2086;
top: -1px; top: 9px;
} }
} }
} }

BIN
components/.DS_Store vendored

Binary file not shown.

View File

@ -0,0 +1,206 @@
<template>
<view class="main">
<movable-area class="showValue" :style="{background: sliderAreaBg}">
<view class="up" :style="{width: `${upButtonwidth}px`,background: `linear-gradient(90deg, ${sliderStartColor} 0%, ${sliderEndColor} 100%)` }"></view>
<movable-view class="sliderView" :out-of-bounds="false" :animation="animation" :x="sliderLength" @change="sliding" direction="horizontal" >
<view class="buttonPointer" :style="{backgroundColor: sliderButtonColor}"></view>
</movable-view>
</movable-area>
</view>
</template>
<script>
export default {
props: {
//
sliderAreaBg: {
default: "#E9EDF5"
},
//
sliderStartColor: {
default: "#537DFC"
},
//
sliderEndColor: {
default: "#5DBEF2"
},
//
sliderButtonColor: {
default: "#ffffff"
},
//
partsCount: {
default: 5
}
},
data() {
return {
bgOffset: 30,
sliderLength: 0,
animation: true,
showValue: 0,
sliderAreaWidth: 360 //
}
},
watch: {
sliderLength(newValue) {
this.sliderLength = newValue
this.showValue = this.getSliderCurrentPart()
}
},
computed: {
upButtonwidth() {
return this.sliderLength + this.bgOffset
}
},
methods: {
/**
* 滑动条进行滑动时执行
* @param {Object} item
*/
sliding(item) {
this.sliderLength = item.target.x
},
/**
* 获取滑动条的宽度信息; 为了适配不同页面长度调用该函数会自动适配宽度
*/
getClientInfoBySelector() {
uni.createSelectorQuery().in(this).select('.showValue').boundingClientRect((rect) => {
this.sliderAreaWidth = rect.right - rect.left
this.showValue = this.getSliderCurrentPart()
}).exec()
uni.createSelectorQuery().in(this).select('.sliderView').boundingClientRect((rect2) => {
this.bgOffset = rect2.right - rect2.left
}).exec()
},
/**
* 设置滑动条的值
* @param {Object} sliderNewValue
*/
setSliderValue(sliderNewValue) {
this.animation = false
if(sliderNewValue > this.sliderAreaWidth) {
this.sliderLength = this.sliderAreaWidth
} else if (sliderNewValue < 0) {
this.sliderLength = 0
} else {
this.sliderLength = sliderNewValue
}
this.$nextTick(() => {
setTimeout(() => {
this.animation = true
}, 250)
})
},
/**
* 根据百分值设置进度条的值
* @param {Object} percentageValue 滑动条的百分值
*/
setSliderValueByPercentage(percentageValue) {
const decimalValue = parseInt(percentageValue) / 100
const newValue = (this.sliderAreaWidth * decimalValue).toFixed(2)
this.setSliderValue(parseFloat(newValue))
},
/**
* 根据 part 设置滑动条的长度同下区域的索引从0开始
*/
setSliderValueByPart(part) {
if(this.partsCount <= 0) return false
const onePatrWidth = Math.ceil(this.sliderAreaWidth / this.partsCount)
let setValue = onePatrWidth * part
//
if((part + 1) == this.partsCount) {
setValue = this.sliderAreaWidth
} else if (part === 0) {
setValue = 0
} else {
setValue += onePatrWidth / 2
}
this.setSliderValue(setValue > this.sliderAreaWidth ? this.sliderAreaWidth : setValue)
},
/**
* 获取当前滑动到那个区域根据 partsCount 的值表示第几个区域第一个区域返回0
*/
getSliderCurrentPart() {
if(this.partsCount <= 0) return false
const onePatrWidth = Math.ceil(this.sliderAreaWidth / this.partsCount)
let currentPart = 0
for (let i = 0; i < this.partsCount; i++) {
if(onePatrWidth * i <= this.sliderLength && this.sliderLength <= (i+1) * onePatrWidth) {
currentPart = i
break
}
}
return currentPart
},
/**
* 获取当前进度条移动距离
*/
getSliderWidth() {
return this.sliderLength
}
}
}
</script>
<style lang="scss" scoped>
.main {
width: 100%;
.showValue {
width: 100%;
height: 43rpx;
border-radius: 40rpx;
position: relative;
overflow: hidden;
margin: 0 auto;
.up {
width: 0%;
height: 100%;
position: absolute;
top: 0;
border-radius: 50rpx;
// background: linear-gradient(90deg, #537DFC 0%, #5DBEF2 100%);
}
.sliderView {
width: 35rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 0 12rpx;
}
.buttonPointer {
width: 35rpx;
height: 35rpx;
// background-color: white;
border-radius: 20rpx;
position: absolute;
}
}
}
</style>

View File

@ -57,7 +57,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx3e83b37ba682faf5", "appid" : "wx80ee50db22dbbb2f",
"setting" : { "setting" : {
"urlCheck" : true, "urlCheck" : true,
"minified" : true, "minified" : true,

View File

@ -7,8 +7,8 @@
<view class="right"> <view class="right">
<view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view> <view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view>
<view class="top"> <view class="top">
<view class="age">性别{{memInfo.sex==0?'未知':memInfo.sex==1?'男':'女'}}</view> <view class="age">性别{{memInfo.gender==0?'未知':memInfo.gender==1?'男':'女'}}</view>
<view>年龄{{user.age}}</view> <view>年龄{{memInfo.age}}</view>
</view> </view>
</view> </view>
<!-- <button class="pkclass" @click="handleImage">保存图片</button> --> <!-- <button class="pkclass" @click="handleImage">保存图片</button> -->
@ -25,8 +25,8 @@
</view> </view>
<view class="item"> <view class="item">
<view>{{Math.abs(memInfo.fat_wdiff)}}</view> <view>{{Math.abs(memInfo.fat_wdiff)}}</view>
<text v-if="Number(memInfo.fat_wdiff)>0">增脂(kg)</text> <text v-if="Number(memInfo.fat_wdiff)>0">增脂(%)</text>
<text v-else>减脂(kg)</text> <text v-else>减脂(%)</text>
</view> </view>
<view class="time"> <view class="time">
<view> <view>
@ -43,6 +43,32 @@
<view>之后</view> <view>之后</view>
</view> </view>
<view v-for="(ite,ind) in listStr" :key="ind" class="li"> <view v-for="(ite,ind) in listStr" :key="ind" class="li">
<view class="name">
<view class="icon">
<icon class="t-icon" :class="'t-icon-'+ite.name"></icon>
</view>
<text>{{ite.title}}</text>
</view>
<view class="num">
<text v-if="ite.diffval!=0">{{Math.abs(ite.diffval)}}</text>
<icon class="t-icon t-icon-xia" v-if="Number(ite.diffval)>0"></icon>
<icon class="t-icon t-icon-shang" v-if="Number(ite.diffval)<0"></icon>
<icon class="hengxian" v-if="!ite.diffval||ite.diffval==0"></icon>
</view>
<view class="f">
<view :class="[ite.firstresult.value!=''?'':'hengxian']">
{{ite.firstresult?ite.firstresult.value:''}}
</view>
<text>{{ite.firstresult.value!=''?ite.firstresult.level:''}}</text>
</view>
<view class="f">
<view :class="[ite.secondresult.value!=''?'':'hengxian']">
{{ite.secondresult?ite.secondresult.value:''}}
</view>
<text>{{ite.secondresult.value!=""?ite.secondresult.level:''}}</text>
</view>
</view>
<!-- <view v-for="(ite,ind) in listStr" :key="ind" class="li">
<view class="name"> <view class="name">
<view class="icon"> <view class="icon">
<icon class="t-icon" :class="'t-icon-'+ite.key"></icon> <icon class="t-icon" :class="'t-icon-'+ite.key"></icon>
@ -72,7 +98,7 @@
<view>{{ite.svalue}}</view> <view>{{ite.svalue}}</view>
<text v-if="ite.fevaluation">{{ite.sevaluation}}</text> <text v-if="ite.fevaluation">{{ite.sevaluation}}</text>
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
</template> </template>
@ -100,19 +126,26 @@
...mapState(["user", "appTheme"]), ...mapState(["user", "appTheme"]),
}, },
methods: { methods: {
handleSharepic(id) { handleSharepic(item) {
let that = this let that = this
that.$model.getresultdiff({ that.$model.getresultdiffNew({
familyid: id.familyid, familyid: item.familyid,
firstId: id.firstId, firstId: item.firstId,
secondId: id.secondId, secondId: item.secondId,
}).then(res => { }).then(res => {
console.log("res", res) console.log("res", res)
if (res.code != 0) { if (res.code != 0) {
this.$tools.msg(res.message) this.$tools.msg(res.message)
return return
} }
that.handleInfoList(res.data) res.data.list.forEach(ite => {
if (ite.firstresult || ite.secondresult) {
ite.name = ite.firstresult ? ite.firstresult.name : ite.secondresult.name
ite.title = ite.firstresult ? ite.firstresult.title : ite.secondresult.title
}
})
that.memInfo = res.data
that.listStr = res.data.list
}) })
}, },
handleInfoList(data) { handleInfoList(data) {
@ -176,7 +209,10 @@
justify-content: center; justify-content: center;
} }
.t-icon-hengxian { .hengxian {
height: 4px !important; width: 8px;
height: 2px;
background: #999;
margin: auto;
} }
</style> </style>

View File

@ -69,7 +69,7 @@
computed: { computed: {
...mapState(["configBox", "appTheme"]), ...mapState(["configBox", "appTheme"]),
}, },
onLoad(options) { async onLoad(options) {
// //
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#ffffff', frontColor: '#ffffff',
@ -80,13 +80,45 @@
that.infoRes = options that.infoRes = options
console.log("登录信息", options, that.infoRes, this.configBox) console.log("登录信息", options, that.infoRes, this.configBox)
} }
that.iswxphone = uni.getStorageSync('iswxphone')
this.iswxphone = uni.getStorageSync('iswxphone') that.sessionid = uni.getStorageSync('sessionid')
console.log("sessionid", that.sessionid)
if (that.sessionid == '' || that.sessionid == undefined || that.sessionid == null) {
await that.login()
}
}, },
methods: { methods: {
checkboxChange(e) { checkboxChange(e) {
this.value = e.detail.value.length ? e.detail.value[0] : "0" this.value = e.detail.value.length ? e.detail.value[0] : "0"
}, },
login() {
let that = this
uni.login({
success(res) {
if (res.code) {
if (res.errMsg = "login:ok") {
that.$model.onlogin({
code: res.code,
userid: ""
}).then(res => {
if (res.code == 2) {
uni.clearStorageSync()
that.sessionid = res.data.sessionid
that.$store.commit("changeLogout", false);
uni.setStorageSync('tenantid', res.data.tenantid)
uni.setStorageSync('sessionid', res.data.sessionid)
uni.setStorageSync('iswxphone', res.data.iswxphone)
that.$store.dispatch("getConfig", {
tenantId: res.data.tenantid
})
return
}
}).catch(e => {})
}
}
}
})
},
// //
handleTelLogin() { handleTelLogin() {
let that = this let that = this

View File

@ -1,22 +1,21 @@
<template> <template>
<view>
<view class="box"> <view class="box">
<view class="form lanBox"> <view class="form lanBox">
<!-- <view class="lan border-bottom" v-for="(item,index) in list" :key="index"> <view class="lan border-bottom" v-for="(item,index) in list" :key="index">
<view class="left"><view class="icon"> <view class="left">
<view class="icon"> <view class="icon">
<icon class="t-icon" :class="'t-icon-'+item.key"></icon></view> <icon class="t-icon" :class="'t-icon-'+item.name"></icon>
</view> </view>
{{item.title}} {{item.title}}
</view> </view>
<view class="center"> <view class="center">
<view v-if="item.title!='肥胖等级'"> <view v-if="item.title=='肥胖等级'||item.title=='体型'||item.title=='年龄'"><text>{{item.level}}</text></view>
<text>{{item.fvalue?item.fvalue:"0"}}</text><text v-if="item.dw">{{item.dw}}</text> <view v-else>
<text>{{item.value?item.value:"0"}}</text><text v-if="item.unit">{{item.unit}}</text>
</view> </view>
<view v-if="item.title=='肥胖等级'"><text>{{item.fevaluation}}</text></view>
</view> </view>
</view> --> </view>
<view class="lan border-bottom"> <!-- <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
<icon class="t-icon t-icon-height"></icon> <icon class="t-icon t-icon-height"></icon>
@ -24,7 +23,6 @@
</view> </view>
<view class="right">{{memInfo.height?memInfo.height:"0"}}cm</view> <view class="right">{{memInfo.height?memInfo.height:"0"}}cm</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -33,7 +31,6 @@
</view> </view>
<view class="right">{{memInfo.weight?memInfo.weight:"0"}}kg</view> <view class="right">{{memInfo.weight?memInfo.weight:"0"}}kg</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -42,7 +39,6 @@
</view> </view>
<view class="right">{{memInfo.age?memInfo.age:"0岁"}}</view> <view class="right">{{memInfo.age?memInfo.age:"0岁"}}</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -51,7 +47,6 @@
</view> </view>
<view class="right">{{memInfo.bmi?memInfo.bmi:"0"}}</view> <view class="right">{{memInfo.bmi?memInfo.bmi:"0"}}</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -60,7 +55,6 @@
</view> </view>
<view class="right">{{memInfo.fat_w?memInfo.fat_w:"0"}}%</view> <view class="right">{{memInfo.fat_w?memInfo.fat_w:"0"}}%</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -69,8 +63,6 @@
</view> </view>
<view class="right">{{memInfo.fat_r?memInfo.fat_r:"0"}}%</view> <view class="right">{{memInfo.fat_r?memInfo.fat_r:"0"}}%</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -79,7 +71,6 @@
</view> </view>
<view class="right">{{memInfo.muscleval?memInfo.muscleval:"0"}}kg</view> <view class="right">{{memInfo.muscleval?memInfo.muscleval:"0"}}kg</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -88,7 +79,6 @@
</view> </view>
<view class="right">{{memInfo.muscle?memInfo.muscle:"0"}}%</view> <view class="right">{{memInfo.muscle?memInfo.muscle:"0"}}%</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -97,7 +87,6 @@
</view> </view>
<view class="right">{{memInfo.proteinval?memInfo.proteinval:'0'}}kg</view> <view class="right">{{memInfo.proteinval?memInfo.proteinval:'0'}}kg</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -106,8 +95,6 @@
</view> </view>
<view class="right">{{memInfo.protein?memInfo.protein:"0"}}%</view> <view class="right">{{memInfo.protein?memInfo.protein:"0"}}%</view>
</view> </view>
<!-- -->
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -116,7 +103,6 @@
</view> </view>
<view class="right">{{memInfo.water?memInfo.water:"0"}}</view> <view class="right">{{memInfo.water?memInfo.water:"0"}}</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -125,7 +111,6 @@
</view> </view>
<view class="right">{{memInfo.bone?memInfo.bone:"0"}}kg</view> <view class="right">{{memInfo.bone?memInfo.bone:"0"}}kg</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -134,7 +119,6 @@
</view> </view>
<view class="right">{{memInfo.visceral?memInfo.visceral:"0"}}</view> <view class="right">{{memInfo.visceral?memInfo.visceral:"0"}}</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -143,7 +127,6 @@
</view> </view>
<view class="right">{{memInfo.sfr?memInfo.sfr:"0"}}%</view> <view class="right">{{memInfo.sfr?memInfo.sfr:"0"}}%</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -152,7 +135,6 @@
</view> </view>
<view class="right">{{memInfo.kcal?memInfo.kcal:'0'}}kcal</view> <view class="right">{{memInfo.kcal?memInfo.kcal:'0'}}kcal</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -161,7 +143,6 @@
</view> </view>
<view class="right">{{memInfo.lbm?memInfo.lbm:"0"}}kg</view> <view class="right">{{memInfo.lbm?memInfo.lbm:"0"}}kg</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -170,7 +151,6 @@
</view> </view>
<view class="right">{{memInfo.bodyage?memInfo.bodyage:"0"}}</view> <view class="right">{{memInfo.bodyage?memInfo.bodyage:"0"}}</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -179,7 +159,6 @@
</view> </view>
<view class="right">{{memInfo.fatlevel?memInfo.fatlevel:'0'}}</view> <view class="right">{{memInfo.fatlevel?memInfo.fatlevel:'0'}}</view>
</view> </view>
<!-- -->
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
@ -188,7 +167,7 @@
</view> </view>
<view class="right">{{memInfo.body?memInfo.body:'0'}}</view> <view class="right">{{memInfo.body?memInfo.body:'0'}}</view>
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
</template> </template>
@ -208,17 +187,29 @@
...mapState(["appTheme"]) ...mapState(["appTheme"])
}, },
onLoad(options) { onLoad(options) {
let that = this
// //
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#ffffff', frontColor: '#ffffff',
backgroundColor: this.appTheme, backgroundColor: that.appTheme,
}) })
// //
let info = options.index let info = options.index
let memInfo = JSON.parse(info) let memInfo = JSON.parse(info)
this.memInfo = memInfo that.memInfo = memInfo
// this.list = this.weightInfo.infoList(memInfo) that.getList()
// console.log(this.list) },
methods: {
getList() {
let that = this
that.$model.gethistorydetail({
id: that.memInfo.id,
}).then((res) => {
console.log("历史记录详情", res)
if (res.code != 0) return
that.list = res.data.list
})
},
} }
}; };
</script> </script>

View File

@ -283,6 +283,21 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC" "navigationBarBackgroundColor": "#F9FAFC"
} }
}, {
"path": "child/EFS003",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "child/HCSG818",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
} }
] ]
}], }],

View File

@ -94,6 +94,7 @@
endtime: end, endtime: end,
}).then(res => { }).then(res => {
if (res) { if (res) {
console.log("11111", res)
that.markDays = res.pkList.Dlist that.markDays = res.pkList.Dlist
that.list = res.pkList.list that.list = res.pkList.list
for (var i = 0; i < res.pkList.list.length; i++) { for (var i = 0; i < res.pkList.list.length; i++) {
@ -178,4 +179,7 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content {
padding-bottom: 50px
}
</style> </style>

View File

@ -66,11 +66,11 @@
<view>体重</view> <view>体重</view>
</view> </view>
<view class="item"> <view class="item">
<view><text>{{MeasureResult.bodyage}}</text></view> <view><text>{{MeasureResult.bodyage?MeasureResult.bodyage:'-'}}</text></view>
<view>体龄</view> <view>体龄</view>
</view> </view>
<view class="item"> <view class="item">
<view><text class="f-15">{{MeasureResult.body}}</text></view> <view><text class="f-15">{{MeasureResult.body?MeasureResult.body:'-'}}</text></view>
<view>体型</view> <view>体型</view>
</view> </view>
</view> </view>
@ -83,49 +83,46 @@
</view> </view>
<view v-if="MeasureResult&&infoList.length"> <view v-if="MeasureResult&&infoList.length">
<view class="box1"> <view class="box1">
<view class="list" v-for="(item,index) in infoList" :key="index" @click="handleToggle(index)"> <uni-collapse accordion>
<view class="block"> <uni-collapse-item class="list" v-for="(item,index) in infoList" :key="index">
<template v-slot:title>
<uni-list-item class="block">
<view class="name"> <view class="name">
<icon class="t-icon iconfont" :class="'t-icon-'+item.key"></icon> <icon class="t-icon iconfont" :class="'t-icon-'+item.name"></icon>
{{item.title}} {{item.title}}
</view> </view>
<view class="val" v-if="item.title!='肥胖等级'"> <view class="val" v-if="item.title=='肥胖等级'">
{{item.fvalue?item.fvalue:'0'}}{{item.dw}} {{item.level?item.level:'-'}} </view>
<view class="val" v-else>{{item.value?item.value:'0'}}{{item.unit}}</view>
<view class="level">
<view class="btnf" :style="{backgroundColor:item.color}">{{item.level}}</view>
</view> </view>
<view class="val0" v-else>{{item.fevaluation}}</view>
<view class="level" v-if="item.title!='肥胖等级'"> </uni-list-item>
<view class="btnf" :style="{backgroundColor:item.color}">{{item.fevaluation}}</view> </template>
</view> <view class="desc">
<view class="icon">
<icon class="iconfont icon-arrow-down" v-if="item.desc"></icon>
</view>
</view>
<view class="desc" v-if="item.showCon">
<view v-if="item.desc">{{item.desc}}</view> <view v-if="item.desc">{{item.desc}}</view>
<view class="statuevue" v-if="item.slist"> <view class="scale" v-if="item.ishasscale">本次评分{{item.scale}}</view>
<view :class="[item.list.length?'statuevue':'']" v-if="item.list">
<view class="bi" v-if="item.title!='基础代谢'"> <view class="bi" v-if="item.title!='基础代谢'">
<view class="item" v-for="(ite , ind) in item.slist" :key="ind" :style="{backgroundColor:ite.color}"> <view :style="'left:'+item.offset+'%'" class="peobox">
<view class="xx"></view>
</view>
<view class="item" v-for="(ite , ind) in item.list" :key="ind"
:style="{backgroundColor:ite.color}">
<view class="span1">{{ite.text}}</view> <view class="span1">{{ite.text}}</view>
<!-- 超高 --> <view class="span" v-if="ind<item.list.length-1">{{ite.maxvalue}}</view>
<view v-if="ite.text==item.fevaluation&&item.fvalue>ite.maxvalue" class="peobox" style="right: 5px">
<view class="xx"></view>
</view>
<!-- z正常 -->
<view v-if="ite.text==item.fevaluation&&item.fvalue<=ite.maxvalue"
:style="'left:'+item.leftval+'rem'" class="peobox">
<view class="xx"></view>
</view>
<view class="span" v-if="ind<item.slist.length-1">{{ite.maxvalue}}</view>
</view> </view>
</view> </view>
<view v-else> <view v-else>
<view class="kcalClass"> <view class="kcalClass" v-if="item.list&&item.list.length">
标准值:{{item.slist[0].maxvalue}}kcal 标准值:{{item.list[0].maxvalue}}kcal
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</uni-collapse-item>
</uni-collapse>
</view> </view>
</view> </view>
<view v-else class="nolist"> <view v-else class="nolist">
@ -192,13 +189,9 @@
backgroundColor: that.appTheme, backgroundColor: that.appTheme,
}); });
that.token = uni.getStorageSync('token') that.token = uni.getStorageSync('token')
console.log("首页收参", options, )
if (options && options.userid) { if (options && options.userid) {
that.userId = options.userid that.userId = options.userid
} }
// if (options && options.t) {
// that.$store.commit("changeDevType", options);
// }
await that.login() await that.login()
}, },
onShow() { onShow() {
@ -210,8 +203,11 @@
}, },
watch: { watch: {
MeasureResult() { MeasureResult() {
console.log("MeasureResult更新", this.MeasureResult) let that = this
this.handleToggle(0) console.log("MeasureResult更新")
if (!that.MeasureResult) return
that.infoList = that.MeasureResult.list
// this.handleToggle(0)
}, },
appTheme() { appTheme() {
uni.setNavigationBarColor({ uni.setNavigationBarColor({
@ -686,4 +682,20 @@
margin-left: 3px; margin-left: 3px;
} }
} }
/deep/uni-collapse {
width: 100% !important;
}
/deep/.uni-collapse-item {
width: 100% !important;
}
/deep/.uni-collapse-item__title-arrow {
margin-right: 0 !important;
}
/deep/.uni-collapse-item__wrap-content.uni-collapse-item--border {
border-bottom-width: 0
}
</style> </style>

View File

@ -25,10 +25,16 @@ const httpRequest = (url, method = "get", data) => {
(res) => { (res) => {
uni.hideLoading() uni.hideLoading()
if (res[1].data.code == 401) { if (res[1].data.code == 401) {
tools.msg(res[1].data.message)
uni.clearStorageSync() uni.clearStorageSync()
uni.setStorageSync('token', "") uni.setStorageSync('token', "")
uni.setStorageSync('iswxphone', true) uni.setStorageSync('iswxphone', true)
store.commit("changeLogout", false); store.commit("changeLogout", false);
setTimeout(() => {
uni.redirectTo({
url: "/pageTwo/login/login"
})
}, 2000)
return return
} }
if (res[1].statusCode != 200) { if (res[1].statusCode != 200) {

View File

@ -181,6 +181,11 @@ export default {
return res return res
}) })
}, },
gethistorydetail(param) { //成员历史详情
return http.post('/api/family/gethistorydetail', param).then(res => {
return res
})
},
getaddlist(param) { //手动添加记录列表 getaddlist(param) { //手动添加记录列表
return http.post('/api/family/getaddlist', param).then(res => { return http.post('/api/family/getaddlist', param).then(res => {
return res return res
@ -298,7 +303,11 @@ export default {
return res return res
}) })
}, },
getresultdiffNew(param) { //两次记录对比
return http.post("/api/result/resultdiffnew", param).then(res => {
return res
})
},
// //
getdevactive(param) { //设备激活 getdevactive(param) { //设备激活
return http.post('/api/device/active', param).then(res => { return http.post('/api/device/active', param).then(res => {

View File

@ -0,0 +1,36 @@
## 1.4.32022-01-25
- 修复 初始化的时候 open 属性失效的bug
## 1.4.22022-01-21
- 修复 微信小程序resize后组件收起的bug
## 1.4.12021-11-22
- 修复 vue3中个别scss变量无法找到的问题
## 1.4.02021-11-19
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)
## 1.3.32021-08-17
- 优化 show-arrow 属性默认为true
## 1.3.22021-08-17
- 新增 show-arrow 属性,控制是否显示右侧箭头
## 1.3.12021-07-30
- 优化 vue3下小程序事件警告的问题
## 1.3.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.2.22021-07-21
- 修复 由1.2.0版本引起的 change 事件返回 undefined 的Bug
## 1.2.12021-07-21
- 优化 组件示例
## 1.2.02021-07-21
- 新增 组件折叠动画
- 新增 value\v-model 属性 ,动态修改面板折叠状态
- 新增 title 插槽 ,可定义面板标题
- 新增 border 属性 ,显示隐藏面板内容分隔线
- 新增 title-border 属性 ,显示隐藏面板标题分隔线
- 修复 resize 方法失效的Bug
- 修复 change 事件返回参数不正确的Bug
- 优化 H5、App 平台自动更具内容更新高度,无需调用 reszie() 方法
## 1.1.72021-05-12
- 新增 组件示例地址
## 1.1.62021-02-05
- 优化 组件引用关系通过uni_modules引用组件
## 1.1.52021-02-05
- 调整为uni_modules目录规范

View File

@ -0,0 +1,402 @@
<template>
<view class="uni-collapse-item">
<!-- onClick(!isOpen) -->
<view @click="onClick(!isOpen)" class="uni-collapse-item__title"
:class="{'is-open':isOpen &&titleBorder === 'auto' ,'uni-collapse-item-border':titleBorder !== 'none'}">
<view class="uni-collapse-item__title-wrap">
<slot name="title">
<view class="uni-collapse-item__title-box" :class="{'is-disabled':disabled}">
<image v-if="thumb" :src="thumb" class="uni-collapse-item__title-img" />
<text class="uni-collapse-item__title-text">{{ title }}</text>
</view>
</slot>
</view>
<view v-if="showArrow"
:class="{ 'uni-collapse-item__title-arrow-active': isOpen, 'uni-collapse-item--animation': showAnimation === true }"
class="uni-collapse-item__title-arrow">
<uni-icons :color="disabled?'#ddd':'#bbb'" size="14" type="bottom" />
</view>
</view>
<view class="uni-collapse-item__wrap" :class="{'is--transition':showAnimation}"
:style="{height: (isOpen?height:0) +'px'}">
<view :id="elId" ref="collapse--hook" class="uni-collapse-item__wrap-content"
:class="{open:isheight,'uni-collapse-item--border':border&&isOpen}">
<slot></slot>
</view>
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = weex.requireModule('dom')
// #endif
/**
* CollapseItem 折叠面板子组件
* @description 折叠面板子组件
* @property {String} title 标题文字
* @property {String} thumb 标题左侧缩略图
* @property {String} name 唯一标志符
* @property {Boolean} open = [true|false] 是否展开组件
* @property {Boolean} titleBorder = [true|false] 是否显示标题分隔线
* @property {Boolean} border = [true|false] 是否显示分隔线
* @property {Boolean} disabled = [true|false] 是否展开面板
* @property {Boolean} showAnimation = [true|false] 开启动画
* @property {Boolean} showArrow = [true|false] 是否显示右侧箭头
*/
export default {
name: 'uniCollapseItem',
props: {
//
title: {
type: String,
default: ''
},
name: {
type: [Number, String],
default: ''
},
//
disabled: {
type: Boolean,
default: false
},
// #ifdef APP-PLUS
// ,app
showAnimation: {
type: Boolean,
default: false
},
// #endif
// #ifndef APP-PLUS
//
showAnimation: {
type: Boolean,
default: true
},
// #endif
//
open: {
type: Boolean,
default: false
},
//
thumb: {
type: String,
default: ''
},
// 线
titleBorder: {
type: String,
default: 'auto'
},
border: {
type: Boolean,
default: true
},
showArrow: {
type: Boolean,
default: true
}
},
data() {
// TODO IDbug
const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
return {
isOpen: false,
isheight: null,
height: 0,
elId,
nameSync: 0
}
},
watch: {
open(val) {
this.isOpen = val
this.onClick(val, 'init')
}
},
updated(e) {
this.$nextTick(() => {
this.init(true)
})
},
created() {
this.collapse = this.getCollapse()
this.oldHeight = 0
this.onClick(this.open, 'init')
},
// #ifndef VUE3
// TODO vue2
destroyed() {
if (this.__isUnmounted) return
this.uninstall()
},
// #endif
// #ifdef VUE3
// TODO vue3
unmounted() {
this.__isUnmounted = true
this.uninstall()
},
// #endif
mounted() {
if (!this.collapse) return
if (this.name !== '') {
this.nameSync = this.name
} else {
this.nameSync = this.collapse.childrens.length + ''
}
if (this.collapse.names.indexOf(this.nameSync) === -1) {
this.collapse.names.push(this.nameSync)
} else {
console.warn(`name 值 ${this.nameSync} 重复`);
}
if (this.collapse.childrens.indexOf(this) === -1) {
this.collapse.childrens.push(this)
}
this.init()
},
methods: {
init(type) {
// #ifndef APP-NVUE
this.getCollapseHeight(type)
// #endif
// #ifdef APP-NVUE
this.getNvueHwight(type)
// #endif
},
uninstall() {
if (this.collapse) {
this.collapse.childrens.forEach((item, index) => {
if (item === this) {
this.collapse.childrens.splice(index, 1)
}
})
this.collapse.names.forEach((item, index) => {
if (item === this.nameSync) {
this.collapse.names.splice(index, 1)
}
})
}
},
onClick(isOpen, type) {
if (this.disabled) return
this.isOpen = isOpen
if (this.isOpen && this.collapse) {
this.collapse.setAccordion(this)
}
if (type !== 'init') {
this.collapse.onChange(isOpen, this)
}
},
getCollapseHeight(type, index = 0) {
const views = uni.createSelectorQuery().in(this)
views
.select(`#${this.elId}`)
.fields({
size: true
}, data => {
// TODO
if (index >= 10) return
if (!data) {
index++
this.getCollapseHeight(false, index)
return
}
// #ifdef APP-NVUE
this.height = data.height + 1
// #endif
// #ifndef APP-NVUE
this.height = data.height
// #endif
this.isheight = true
if (type) return
this.onClick(this.isOpen, 'init')
})
.exec()
},
getNvueHwight(type) {
const result = dom.getComponentRect(this.$refs['collapse--hook'], option => {
if (option && option.result && option.size) {
// #ifdef APP-NVUE
this.height = option.size.height + 1
// #endif
// #ifndef APP-NVUE
this.height = option.size.height
// #endif
this.isheight = true
if (type) return
this.onClick(this.open, 'init')
}
})
},
/**
* 获取父元素实例
*/
getCollapse(name = 'uniCollapse') {
let parent = this.$parent;
let parentName = parent.$options.name;
while (parentName !== name) {
parent = parent.$parent;
if (!parent) return false;
parentName = parent.$options.name;
}
return parent;
}
}
}
</script>
<style lang="scss">
.uni-collapse-item {
/* #ifndef APP-NVUE */
box-sizing: border-box;
/* #endif */
&__title {
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
box-sizing: border-box;
/* #endif */
flex-direction: row;
align-items: center;
transition: border-bottom-color .3s;
// transition-property: border-bottom-color;
// transition-duration: 5s;
&-wrap {
width: 100%;
flex: 1;
}
&-box {
padding: 0 15px;
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
box-sizing: border-box;
/* #endif */
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 48px;
line-height: 48px;
background-color: #fff;
color: #303133;
font-size: 13px;
font-weight: 500;
/* #ifdef H5 */
cursor: pointer;
outline: none;
/* #endif */
&.is-disabled {
.uni-collapse-item__title-text {
color: #999;
}
}
}
&.uni-collapse-item-border {
border-bottom: 1px solid #ebeef5;
}
&.is-open {
border-bottom-color: transparent;
}
&-img {
height: 22px;
width: 22px;
margin-right: 10px;
}
&-text {
flex: 1;
font-size: 14px;
/* #ifndef APP-NVUE */
white-space: nowrap;
color: inherit;
/* #endif */
/* #ifdef APP-NVUE */
lines: 1;
/* #endif */
overflow: hidden;
text-overflow: ellipsis;
}
&-arrow {
/* #ifndef APP-NVUE */
display: flex;
box-sizing: border-box;
/* #endif */
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
margin-right: 10px;
transform: rotate(0deg);
&-active {
transform: rotate(-180deg);
}
}
}
&__wrap {
/* #ifndef APP-NVUE */
will-change: height;
box-sizing: border-box;
/* #endif */
background-color: #fff;
overflow: hidden;
position: relative;
height: 0;
&.is--transition {
// transition: all 0.3s;
transition-property: height, border-bottom-width;
transition-duration: 0.3s;
/* #ifndef APP-NVUE */
will-change: height;
/* #endif */
}
&-content {
position: absolute;
font-size: 13px;
color: #303133;
// transition: height 0.3s;
border-bottom-color: transparent;
border-bottom-style: solid;
border-bottom-width: 0;
&.uni-collapse-item--border {
border-bottom-width: 1px;
border-bottom-color: red;
border-bottom-color: #ebeef5;
}
&.open {
position: relative;
}
}
}
&--animation {
transition-property: transform;
transition-duration: 0.3s;
transition-timing-function: ease;
}
}
</style>

View File

@ -0,0 +1,147 @@
<template>
<view class="uni-collapse">
<slot />
</view>
</template>
<script>
/**
* Collapse 折叠面板
* @description 展示可以折叠 / 展开的内容区域
* @tutorial https://ext.dcloud.net.cn/plugin?id=23
* @property {String|Array} value 当前激活面板改变时触发(如果是手风琴模式参数类型为string否则为array)
* @property {Boolean} accordion = [true|false] 是否开启手风琴效果是否开启手风琴效果
* @event {Function} change 切换面板时触发如果是手风琴模式返回类型为string否则为array
*/
export default {
name: 'uniCollapse',
emits:['change','activeItem','input','update:modelValue'],
props: {
value: {
type: [String, Array],
default: ''
},
modelValue: {
type: [String, Array],
default: ''
},
accordion: {
//
type: [Boolean, String],
default: false
},
},
data() {
return {}
},
computed: {
// TODO vue2 vue3
dataValue() {
let value = (typeof this.value === 'string' && this.value === '') ||
(Array.isArray(this.value) && this.value.length === 0)
let modelValue = (typeof this.modelValue === 'string' && this.modelValue === '') ||
(Array.isArray(this.modelValue) && this.modelValue.length === 0)
if (value) {
return this.modelValue
}
if (modelValue) {
return this.value
}
return this.value
}
},
watch: {
dataValue(val) {
this.setOpen(val)
}
},
created() {
this.childrens = []
this.names = []
},
mounted() {
this.$nextTick(()=>{
this.setOpen(this.dataValue)
})
},
methods: {
setOpen(val) {
let str = typeof val === 'string'
let arr = Array.isArray(val)
this.childrens.forEach((vm, index) => {
if (str) {
if (val === vm.nameSync) {
if (!this.accordion) {
console.warn('accordion 属性为 false ,v-model 类型应该为 array')
return
}
vm.isOpen = true
}
}
if (arr) {
val.forEach(v => {
if (v === vm.nameSync) {
if (this.accordion) {
console.warn('accordion 属性为 true ,v-model 类型应该为 string')
return
}
vm.isOpen = true
}
})
}
})
this.emit(val)
},
setAccordion(self) {
if (!this.accordion) return
this.childrens.forEach((vm, index) => {
if (self !== vm) {
vm.isOpen = false
}
})
},
resize() {
this.childrens.forEach((vm, index) => {
// #ifndef APP-NVUE
vm.getCollapseHeight()
// #endif
// #ifdef APP-NVUE
vm.getNvueHwight()
// #endif
})
},
onChange(isOpen, self) {
let activeItem = []
if (this.accordion) {
activeItem = isOpen ? self.nameSync : ''
} else {
this.childrens.forEach((vm, index) => {
if (vm.isOpen) {
activeItem.push(vm.nameSync)
}
})
}
this.$emit('change', activeItem)
this.emit(activeItem)
},
emit(val){
this.$emit('input', val)
this.$emit('update:modelValue', val)
}
}
}
</script>
<style lang="scss" >
.uni-collapse {
/* #ifndef APP-NVUE */
width: 100%;
display: flex;
/* #endif */
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
flex-direction: column;
background-color: #fff;
}
</style>

View File

@ -0,0 +1,89 @@
{
"id": "uni-collapse",
"displayName": "uni-collapse 折叠面板",
"version": "1.4.3",
"description": "Collapse 组件,可以折叠 / 展开的内容区域。",
"keywords": [
"uni-ui",
"折叠",
"折叠面板",
"手风琴"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@ -0,0 +1,12 @@
## Collapse 折叠面板
> **组件名uni-collapse**
> 代码块: `uCollapse`
> 关联组件:`uni-collapse-item`、`uni-icons`。
折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839

View File

@ -0,0 +1,22 @@
## 1.3.52022-01-24
- 优化 size 属性可以传入不带单位的字符串数值
## 1.3.42022-01-24
- 优化 size 支持其他单位
## 1.3.32022-01-17
- 修复 nvue 有些图标不显示的bug兼容老版本图标
## 1.3.22021-12-01
- 优化 示例可复制图标名称
## 1.3.12021-11-23
- 优化 兼容旧组件 type 值
## 1.3.02021-11-19
- 新增 更多图标
- 优化 自定义图标使用方式
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
## 1.1.72021-11-08
## 1.2.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.52021-05-12
- 新增 组件示例地址
## 1.1.42021-02-05
- 调整为uni_modules目录规范

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,96 @@
<template>
<!-- #ifdef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
<!-- #endif -->
</template>
<script>
import icons from './icons.js';
const getVal = (val) => {
const reg = /^[0-9]*$/g
return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
}
// #ifdef APP-NVUE
var domModule = weex.requireModule('dom');
import iconUrl from './uniicons.ttf'
domModule.addRule('fontFace', {
'fontFamily': "uniicons",
'src': "url('"+iconUrl+"')"
});
// #endif
/**
* Icons 图标
* @description 用于展示 icons 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: 'UniIcons',
emits:['click'],
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
customPrefix:{
type: String,
default: ''
}
},
data() {
return {
icons: icons.glyphs
}
},
computed:{
unicode(){
let code = this.icons.find(v=>v.font_class === this.type)
if(code){
return unescape(`%u${code.unicode}`)
}
return ''
},
iconSize(){
return getVal(this.size)
}
},
methods: {
_onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss">
/* #ifndef APP-NVUE */
@import './uniicons.css';
@font-face {
font-family: uniicons;
src: url('./uniicons.ttf') format('truetype');
}
/* #endif */
.uni-icons {
font-family: uniicons;
text-decoration: none;
text-align: center;
}
</style>

View File

@ -0,0 +1,663 @@
.uniui-color:before {
content: "\e6cf";
}
.uniui-wallet:before {
content: "\e6b1";
}
.uniui-settings-filled:before {
content: "\e6ce";
}
.uniui-auth-filled:before {
content: "\e6cc";
}
.uniui-shop-filled:before {
content: "\e6cd";
}
.uniui-staff-filled:before {
content: "\e6cb";
}
.uniui-vip-filled:before {
content: "\e6c6";
}
.uniui-plus-filled:before {
content: "\e6c7";
}
.uniui-folder-add-filled:before {
content: "\e6c8";
}
.uniui-color-filled:before {
content: "\e6c9";
}
.uniui-tune-filled:before {
content: "\e6ca";
}
.uniui-calendar-filled:before {
content: "\e6c0";
}
.uniui-notification-filled:before {
content: "\e6c1";
}
.uniui-wallet-filled:before {
content: "\e6c2";
}
.uniui-medal-filled:before {
content: "\e6c3";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-fire-filled:before {
content: "\e6c5";
}
.uniui-refreshempty:before {
content: "\e6bf";
}
.uniui-location-filled:before {
content: "\e6af";
}
.uniui-person-filled:before {
content: "\e69d";
}
.uniui-personadd-filled:before {
content: "\e698";
}
.uniui-back:before {
content: "\e6b9";
}
.uniui-forward:before {
content: "\e6ba";
}
.uniui-arrow-right:before {
content: "\e6bb";
}
.uniui-arrowthinright:before {
content: "\e6bb";
}
.uniui-arrow-left:before {
content: "\e6bc";
}
.uniui-arrowthinleft:before {
content: "\e6bc";
}
.uniui-arrow-up:before {
content: "\e6bd";
}
.uniui-arrowthinup:before {
content: "\e6bd";
}
.uniui-arrow-down:before {
content: "\e6be";
}
.uniui-arrowthindown:before {
content: "\e6be";
}
.uniui-bottom:before {
content: "\e6b8";
}
.uniui-arrowdown:before {
content: "\e6b8";
}
.uniui-right:before {
content: "\e6b5";
}
.uniui-arrowright:before {
content: "\e6b5";
}
.uniui-top:before {
content: "\e6b6";
}
.uniui-arrowup:before {
content: "\e6b6";
}
.uniui-left:before {
content: "\e6b7";
}
.uniui-arrowleft:before {
content: "\e6b7";
}
.uniui-eye:before {
content: "\e651";
}
.uniui-eye-filled:before {
content: "\e66a";
}
.uniui-eye-slash:before {
content: "\e6b3";
}
.uniui-eye-slash-filled:before {
content: "\e6b4";
}
.uniui-info-filled:before {
content: "\e649";
}
.uniui-reload:before {
content: "\e6b2";
}
.uniui-micoff-filled:before {
content: "\e6b0";
}
.uniui-map-pin-ellipse:before {
content: "\e6ac";
}
.uniui-map-pin:before {
content: "\e6ad";
}
.uniui-location:before {
content: "\e6ae";
}
.uniui-starhalf:before {
content: "\e683";
}
.uniui-star:before {
content: "\e688";
}
.uniui-star-filled:before {
content: "\e68f";
}
.uniui-calendar:before {
content: "\e6a0";
}
.uniui-fire:before {
content: "\e6a1";
}
.uniui-medal:before {
content: "\e6a2";
}
.uniui-font:before {
content: "\e6a3";
}
.uniui-gift:before {
content: "\e6a4";
}
.uniui-link:before {
content: "\e6a5";
}
.uniui-notification:before {
content: "\e6a6";
}
.uniui-staff:before {
content: "\e6a7";
}
.uniui-vip:before {
content: "\e6a8";
}
.uniui-folder-add:before {
content: "\e6a9";
}
.uniui-tune:before {
content: "\e6aa";
}
.uniui-auth:before {
content: "\e6ab";
}
.uniui-person:before {
content: "\e699";
}
.uniui-email-filled:before {
content: "\e69a";
}
.uniui-phone-filled:before {
content: "\e69b";
}
.uniui-phone:before {
content: "\e69c";
}
.uniui-email:before {
content: "\e69e";
}
.uniui-personadd:before {
content: "\e69f";
}
.uniui-chatboxes-filled:before {
content: "\e692";
}
.uniui-contact:before {
content: "\e693";
}
.uniui-chatbubble-filled:before {
content: "\e694";
}
.uniui-contact-filled:before {
content: "\e695";
}
.uniui-chatboxes:before {
content: "\e696";
}
.uniui-chatbubble:before {
content: "\e697";
}
.uniui-upload-filled:before {
content: "\e68e";
}
.uniui-upload:before {
content: "\e690";
}
.uniui-weixin:before {
content: "\e691";
}
.uniui-compose:before {
content: "\e67f";
}
.uniui-qq:before {
content: "\e680";
}
.uniui-download-filled:before {
content: "\e681";
}
.uniui-pyq:before {
content: "\e682";
}
.uniui-sound:before {
content: "\e684";
}
.uniui-trash-filled:before {
content: "\e685";
}
.uniui-sound-filled:before {
content: "\e686";
}
.uniui-trash:before {
content: "\e687";
}
.uniui-videocam-filled:before {
content: "\e689";
}
.uniui-spinner-cycle:before {
content: "\e68a";
}
.uniui-weibo:before {
content: "\e68b";
}
.uniui-videocam:before {
content: "\e68c";
}
.uniui-download:before {
content: "\e68d";
}
.uniui-help:before {
content: "\e679";
}
.uniui-navigate-filled:before {
content: "\e67a";
}
.uniui-plusempty:before {
content: "\e67b";
}
.uniui-smallcircle:before {
content: "\e67c";
}
.uniui-minus-filled:before {
content: "\e67d";
}
.uniui-micoff:before {
content: "\e67e";
}
.uniui-closeempty:before {
content: "\e66c";
}
.uniui-clear:before {
content: "\e66d";
}
.uniui-navigate:before {
content: "\e66e";
}
.uniui-minus:before {
content: "\e66f";
}
.uniui-image:before {
content: "\e670";
}
.uniui-mic:before {
content: "\e671";
}
.uniui-paperplane:before {
content: "\e672";
}
.uniui-close:before {
content: "\e673";
}
.uniui-help-filled:before {
content: "\e674";
}
.uniui-paperplane-filled:before {
content: "\e675";
}
.uniui-plus:before {
content: "\e676";
}
.uniui-mic-filled:before {
content: "\e677";
}
.uniui-image-filled:before {
content: "\e678";
}
.uniui-locked-filled:before {
content: "\e668";
}
.uniui-info:before {
content: "\e669";
}
.uniui-locked:before {
content: "\e66b";
}
.uniui-camera-filled:before {
content: "\e658";
}
.uniui-chat-filled:before {
content: "\e659";
}
.uniui-camera:before {
content: "\e65a";
}
.uniui-circle:before {
content: "\e65b";
}
.uniui-checkmarkempty:before {
content: "\e65c";
}
.uniui-chat:before {
content: "\e65d";
}
.uniui-circle-filled:before {
content: "\e65e";
}
.uniui-flag:before {
content: "\e65f";
}
.uniui-flag-filled:before {
content: "\e660";
}
.uniui-gear-filled:before {
content: "\e661";
}
.uniui-home:before {
content: "\e662";
}
.uniui-home-filled:before {
content: "\e663";
}
.uniui-gear:before {
content: "\e664";
}
.uniui-smallcircle-filled:before {
content: "\e665";
}
.uniui-map-filled:before {
content: "\e666";
}
.uniui-map:before {
content: "\e667";
}
.uniui-refresh-filled:before {
content: "\e656";
}
.uniui-refresh:before {
content: "\e657";
}
.uniui-cloud-upload:before {
content: "\e645";
}
.uniui-cloud-download-filled:before {
content: "\e646";
}
.uniui-cloud-download:before {
content: "\e647";
}
.uniui-cloud-upload-filled:before {
content: "\e648";
}
.uniui-redo:before {
content: "\e64a";
}
.uniui-images-filled:before {
content: "\e64b";
}
.uniui-undo-filled:before {
content: "\e64c";
}
.uniui-more:before {
content: "\e64d";
}
.uniui-more-filled:before {
content: "\e64e";
}
.uniui-undo:before {
content: "\e64f";
}
.uniui-images:before {
content: "\e650";
}
.uniui-paperclip:before {
content: "\e652";
}
.uniui-settings:before {
content: "\e653";
}
.uniui-search:before {
content: "\e654";
}
.uniui-redo-filled:before {
content: "\e655";
}
.uniui-list:before {
content: "\e644";
}
.uniui-mail-open-filled:before {
content: "\e63a";
}
.uniui-hand-down-filled:before {
content: "\e63c";
}
.uniui-hand-down:before {
content: "\e63d";
}
.uniui-hand-up-filled:before {
content: "\e63e";
}
.uniui-hand-up:before {
content: "\e63f";
}
.uniui-heart-filled:before {
content: "\e641";
}
.uniui-mail-open:before {
content: "\e643";
}
.uniui-heart:before {
content: "\e639";
}
.uniui-loop:before {
content: "\e633";
}
.uniui-pulldown:before {
content: "\e632";
}
.uniui-scan:before {
content: "\e62a";
}
.uniui-bars:before {
content: "\e627";
}
.uniui-cart-filled:before {
content: "\e629";
}
.uniui-checkbox:before {
content: "\e62b";
}
.uniui-checkbox-filled:before {
content: "\e62c";
}
.uniui-shop:before {
content: "\e62f";
}
.uniui-headphones:before {
content: "\e630";
}
.uniui-cart:before {
content: "\e631";
}

View File

@ -0,0 +1,86 @@
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "1.3.5",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
"uniui",
"icon",
"图标"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.14"
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": ["uni-scss"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@ -0,0 +1,8 @@
## Icons 图标
> **组件名uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839

View File

View File

@ -0,0 +1 @@
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,aAAI,CAAC,C","file":"BLEPages/HCSG818.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './BLEPages/HCSG818.vue'\ncreatePage(Page)"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

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