当前位置: 首页 > news >正文

必应搜索网站建网站公司销售

必应搜索网站,建网站公司销售,设计类专业选科要求,企业营销策划案例分析1.需求#xff1a;3.0的桩可以值扫码通过蓝牙名字直接绑定#xff0c;2.0的桩二维码无蓝牙名称则需通过蓝牙列表来绑定 2.碰到问题 1.0 蓝牙列表需要去重#xff08;蓝牙列表通过deviceId去重再放进展示列表#xff09; 2.0页面会卡顿#xff08;调用my.stopBluetoothDevi…1.需求3.0的桩可以值扫码通过蓝牙名字直接绑定2.0的桩二维码无蓝牙名称则需通过蓝牙列表来绑定 2.碰到问题 1.0 蓝牙列表需要去重蓝牙列表通过deviceId去重再放进展示列表 2.0页面会卡顿调用my.stopBluetoothDevicesDiscovery() 3.特别注意点 4.代码 templateview styleheight:100vh;padding-top: 40rpx;view classtitleHead请选择蓝牙设备绑定/viewview classtable-body touchmovemoveview classtable-item v-for(item,index) in bluetoothList :keyindex clickselectBluetooth(item){{item.name}}/view/viewview classbottom-titleview设备名称规则:ZDBT桩编码后9位/viewview例:ZDBT000000V01/view/view/view /templatescriptexport default {onShow() {this.initBluetooth()},onLoad() {},onUnload() {my.offBluetoothDeviceFound();my.closeBluetoothAdapter({success: function(res) {console.log(res);},fail: function(err) {console.log(err);}});},onHide() {my.offBluetoothDeviceFound();my.closeBluetoothAdapter({success: function(res) {console.log(res);},fail: function(err) {console.log(err);}});},onPullDownRefresh() {uni.showToast({title: 正在刷新...})this.connectBluetooth()},components: {// timePicker},data() {return {tipShow: false,show: false,msg: ,pendingShow: false,successShow: false,timer: null,count: 3,bluetoothList: [],idList:[],//存放设备deviceId数组 去重}},methods: {goService() {this.tipShow true;},// clickFla(){// my.stopPullDownRefresh()// my.offBluetoothDeviceFound();// },move() {my.stopPullDownRefresh()my.offBluetoothDeviceFound();my.stopBluetoothDevicesDiscovery();},/*选中蓝牙*/selectBluetooth(item) {my.stopPullDownRefresh()my.offBluetoothDeviceFound();my.stopBluetoothDevicesDiscovery({success: (res) {my.closeBluetoothAdapter();uni.reLaunch({url: /pages/bluetoothList/index?name item.name})},fail: (error) {console.log(error);},});},/*蓝牙初始化*/initBluetooth() {console.log(蓝牙初始化)let that this;my.openBluetoothAdapter({success: res {console.log(蓝牙初始化)console.log(res)console.log(蓝牙初始化)if (!res.isSupportBLE) {uni.showToast({title: 抱歉您的手机蓝牙暂不可用})return;}that.connectBluetooth()},fail: error {uni.showToast({title: JSON.stringify(error.errorMessage)})},});},/*搜索连接蓝牙*/connectBluetooth() {console.log(开始搜索蓝牙)let that this;let list []//启用下拉刷新my.startPullDownRefresh({success: function(res) {console.log(res);},fail: function(err) {console.log(err);}});my.startBluetoothDevicesDiscovery({success() {my.onBluetoothDeviceFound(res {var deviceArray res.devices;for (let item of deviceArray) {if (item.name ! undefined item.name ! null) {if (that.idList.indexOf(item[deviceId]) -1) {//数组去重that.idList.push(item[deviceId])that.bluetoothList.push(item)}}}//10秒后停止搜索释放系统资源let timer setTimeout(() {my.stopBluetoothDevicesDiscovery()my.stopPullDownRefresh()clearTimeout(timer)}, 10000);})}})}},} /scriptstyle langscss scoped.titleHead {width: 100%;height: 66rpx;font-size: 48rpx;font-family: PingFangSC-Semibold, PingFang SC;font-weight: 600;color: #2D3748;line-height: 66rpx;margin: 0 50rpx 0 50rpx;}.table-body {display: flex;flex-direction: column;align-items: center;margin-top: 30rpx;height: calc(100vh - 350rpx);overflow: scroll;.table-item {width: 650rpx;height: 90rpx;line-height: 90rpx;background: #FFFFFF;box-shadow: 0rpx 0rpx 30rpx 14rpx rgba(236, 235, 236, 0.25);border-radius: 45rpx;padding-left: 50rpx;margin-bottom: 20rpx;}.table-active {width: 650rpx;height: 90rpx;background: #1677FF;color: #FFFFFF;box-shadow: 0rpx 0rpx 30rpx 14rpx rgba(236, 235, 236, 0.25);border-radius: 45rpx;padding-left: 50rpx;margin-bottom: 20rpx;}}.bottom-title {position: fixed;bottom: 100rpx;left: 50%;transform: translateX(-50%);font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #1677FF;line-height: 34rpx;view {text-align: center;}} /style 5.效果
http://www.zqtcl.cn/news/311239/

相关文章:

  • 上海做兼职的网站如何在凡科建设网站
  • 沙朗镇做网站公司企业管理咨询师是干什么的
  • 起名网站建设商汇通网站
  • 网站开发费税率是多少钱建设小网站教程
  • 企业制作网站服务物联网应用有哪些
  • 中国建设网站银行个人做网站要注意什么条件
  • 莆田哪里有学做网站的wordpress可视化函数
  • 网站规划书500字上海金融网站制作网站制作公司好
  • 郑州网站制做钓鱼网站的公司
  • 网站域名授权怎么做以鹦鹉做头像的网站
  • 后端开发网站做一些什么WordPress能做门户网吗
  • 石家庄市住房和城乡建设厅网站好的企业型网站模板下载
  • 哈尔滨快速建站公司推荐网站刷流量会怎么样
  • 网站开发 顺德做新闻微网站有哪些
  • 如何阿里巴巴网站做推广苏州高新区建设局网站管网
  • 个人网站设计构思做汽车保养的网站
  • 在什么网站可以接国外的模具做中英文网站是怎么做的
  • 网站中的文字滑动怎么做的沈阳模板建站定制
  • 国内网站开发二手房网站开发背景
  • 电商网站建设与管理实践电商网站前端制作分工
  • 外贸公司怎么接订单网站编辑做seo好做吗
  • 科技企业网站建设珠海微信网站开发
  • 科凡网站建设小程序自己开发
  • 专门做金融的招聘网站wordpress 价格
  • 微商城网站建设信息定制程序网站
  • 电子政务网站开发餐饮品牌设计包括哪些
  • 深圳手机商城网站设计公司网站做会员用什么源码
  • 安康网站建设公司价格pathon做网站
  • jq网站模板宣城有做网站的公司吗
  • 江苏个人备案网站内容大连seo加盟