修改估分地区
This commit is contained in:
parent
73cfd5140b
commit
cbad43df91
|
|
@ -11,7 +11,7 @@
|
||||||
<text class="mr-10">性别:{{info.gender==1?'男':info.gender==2?'女':'未知'}}</text>
|
<text class="mr-10">性别:{{info.gender==1?'男':info.gender==2?'女':'未知'}}</text>
|
||||||
<text class="ml-10">年龄:{{info.age}}岁</text>
|
<text class="ml-10">年龄:{{info.age}}岁</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-10">地区:{{info.address}}</view>
|
<view class="mt-10">当前地区:{{info.address}}</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
|
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<!-- 地区 -->
|
<!-- 地区 -->
|
||||||
<view class="cityList">
|
<view class="cityList">
|
||||||
<view class="area" v-if="isArea" @click="visible = true">
|
<view class="area" v-if="isArea" @click="visible = true">
|
||||||
<view>选择地区标准:</view>
|
<view>中招地区标准:</view>
|
||||||
<view>{{region?region:info.address}}<uni-icons type="bottom"></uni-icons></view>
|
<view>{{region?region:info.address}}<uni-icons type="bottom"></uni-icons></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
|
@ -86,8 +86,8 @@
|
||||||
userList() {
|
userList() {
|
||||||
return this.familayList
|
return this.familayList
|
||||||
},
|
},
|
||||||
userId() {
|
userAddress() {
|
||||||
return this.user.id
|
return this.user.address
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -109,7 +109,7 @@
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
userId() {
|
userAddress() {
|
||||||
let that = this
|
let that = this
|
||||||
that.region = that.user.address
|
that.region = that.user.address
|
||||||
that.handleCityList()
|
that.handleCityList()
|
||||||
|
|
|
||||||
|
|
@ -108,22 +108,12 @@
|
||||||
that.$store.commit("changeBluetooth", res.available);
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// #ifdef APP-PLUS
|
|
||||||
onBackPress(options) {
|
|
||||||
let that = this
|
|
||||||
that.handleEnd()
|
|
||||||
innerAudioContext.stop();
|
|
||||||
console.log("PCT01返回onBackPress")
|
|
||||||
},
|
|
||||||
// #endif
|
|
||||||
// #ifndef APP-PLUS
|
|
||||||
onUnload: function() {
|
onUnload: function() {
|
||||||
let that = this
|
let that = this
|
||||||
that.handleEnd()
|
that.handleEnd()
|
||||||
innerAudioContext.stop();
|
innerAudioContext.stop();
|
||||||
console.log("PCT01返回onUnload")
|
console.log("PCT01返回onUnload")
|
||||||
},
|
},
|
||||||
// #endif
|
|
||||||
watch: {
|
watch: {
|
||||||
isConnected: function() {
|
isConnected: function() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -185,7 +175,6 @@
|
||||||
let that = this
|
let that = this
|
||||||
if (that.isStart) {
|
if (that.isStart) {
|
||||||
that.handleAudio()
|
that.handleAudio()
|
||||||
console.log("11111111")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -293,8 +282,10 @@
|
||||||
cancelText: "返回",
|
cancelText: "返回",
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.cancel) {
|
if (res.cancel) {
|
||||||
that.handleEnd()
|
|
||||||
innerAudioContext.stop();
|
innerAudioContext.stop();
|
||||||
|
uni.navigateBack({ //返回
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -341,6 +332,7 @@
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
that.bpm = that.weight / (that.time / 60)
|
that.bpm = that.weight / (that.time / 60)
|
||||||
that.iswrapper = true
|
that.iswrapper = true
|
||||||
|
that.info.isSuccessful = true
|
||||||
that.$store.dispatch('getUserInfo', {
|
that.$store.dispatch('getUserInfo', {
|
||||||
aud_id: uni.getStorageSync('userid')
|
aud_id: uni.getStorageSync('userid')
|
||||||
})
|
})
|
||||||
|
|
@ -387,7 +379,6 @@
|
||||||
},
|
},
|
||||||
handleTarget() {
|
handleTarget() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.$emit('updateData', JSON.stringify(that.info))
|
|
||||||
uni.navigateBack({ //返回
|
uni.navigateBack({ //返回
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
|
|
@ -400,9 +391,7 @@
|
||||||
that.handleStart('结束')
|
that.handleStart('结束')
|
||||||
}, 400)
|
}, 400)
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.redirectTo({
|
uni.$emit('updateData', JSON.stringify(that.info))
|
||||||
url: "/pages/skiping/skip?info=" + JSON.stringify(that.info)
|
|
||||||
})
|
|
||||||
}, 600)
|
}, 600)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,12 +149,13 @@
|
||||||
labelList() {
|
labelList() {
|
||||||
let that = this
|
let that = this
|
||||||
if (that.PublicContent) {
|
if (that.PublicContent) {
|
||||||
that.labelName = that.PublicContent.label_list[0]
|
that.labelName = that.PublicContent.label_list[that.active]
|
||||||
that.lineList = that.PublicContent.line_list
|
that.lineList = that.PublicContent.line_list
|
||||||
that.label_data = that.PublicContent.label_data
|
that.label_data = that.PublicContent.label_data
|
||||||
that.chartData.series[0].data = Number(that.PublicContent.label_data[0].offset) / 100
|
that.chartData.series[0].data = Number(that.PublicContent.label_data[that.active].offset) / 100
|
||||||
that.offset = that.PublicContent.label_data[0].offset
|
that.offset = that.PublicContent.label_data[that.active].offset
|
||||||
}
|
}
|
||||||
|
console.log("11111", that.PublicContent, that.active, that.labelName)
|
||||||
return that.PublicContent ? that.PublicContent.label_list : []
|
return that.PublicContent ? that.PublicContent.label_list : []
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -40,16 +40,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="list">
|
|
||||||
<view class="item border-bottom">
|
|
||||||
<view class="left">
|
|
||||||
<view class="name">意见反馈</view>
|
|
||||||
</view>
|
|
||||||
<view class="right">
|
|
||||||
<uni-icons type="right"></uni-icons>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<view class="list" @click="navTo('/pageTwo/my/about')">
|
<view class="list" @click="navTo('/pageTwo/my/about')">
|
||||||
<view class="item border-bottom">
|
<view class="item border-bottom">
|
||||||
|
|
@ -62,16 +52,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- <view class="list" @click="navTo('/pages/login/forgetPassword?type=forgetPassword')">
|
|
||||||
<view class="item border-bottom">
|
|
||||||
<view class="left">
|
|
||||||
<view class="name">重置密码</view>
|
|
||||||
</view>
|
|
||||||
<view class="right">
|
|
||||||
<uni-icons type="right"></uni-icons>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btn mb-15" v-if="token" @click="handleOutLogin">退出登录</view>
|
<view class="btn mb-15" v-if="token" @click="handleOutLogin">退出登录</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -207,9 +187,6 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: auto;
|
width: auto;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|
@ -230,6 +207,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.href {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
color: #000;
|
||||||
|
text-decoration: none;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
width: auto;
|
width: auto;
|
||||||
background: $btncolor;
|
background: $btncolor;
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<headerIndex @getAciveCity="getAciveCity"></headerIndex>
|
<headerIndex @getAciveCity="getAciveCity" v-if="!isRefresh"></headerIndex>
|
||||||
<!-- 估分 -->
|
<!-- 估分 -->
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="title bold">本次估分成绩为</view>
|
<view class="title bold">本次估分成绩为</view>
|
||||||
<view class="charts mt-15">
|
<view class="charts mt-15">
|
||||||
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="140" :Width="140"/>
|
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="140" :Width="140" />
|
||||||
<view class="name">{{score?score:'--'}}</view>
|
<view class="name">{{score?score:'--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn history" @click="navTo('/pageTwo/score/history')">估分历史</view>
|
<view class="btn history" @click="navTo('/pageTwo/score/history')">估分历史</view>
|
||||||
|
|
@ -83,8 +83,9 @@
|
||||||
<uni-icons :type="isActive.name==item.name?'circle-filled':'circle'" size="22"
|
<uni-icons :type="isActive.name==item.name?'circle-filled':'circle'" size="22"
|
||||||
:color="isActive.name==item.name?'#FEC407':'#dfdfdf'" v-if="choice==1"></uni-icons>
|
:color="isActive.name==item.name?'#FEC407':'#dfdfdf'" v-if="choice==1"></uni-icons>
|
||||||
<!-- 多选 -->
|
<!-- 多选 -->
|
||||||
<uni-icons :type="isActiveList.indexOf(item)!=-1?'checkbox-filled':'circle'" size="22"
|
<uni-icons :type="isActiveNameList.indexOf(item.name)!=-1?'checkbox-filled':'circle'" size="22"
|
||||||
:color="isActiveList.indexOf(item)!=-1?'#FEC407':'#dfdfdf'" v-if="choice>1"></uni-icons>
|
:color="isActiveNameList.indexOf(item.name)!=-1?'#FEC407':'#dfdfdf'"
|
||||||
|
v-if="choice>1"></uni-icons>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<view class="overflow">
|
<view class="overflow">
|
||||||
|
|
@ -124,6 +125,7 @@
|
||||||
selectllist: [],
|
selectllist: [],
|
||||||
isActive: {},
|
isActive: {},
|
||||||
isActiveList: [],
|
isActiveList: [],
|
||||||
|
isActiveNameList: [],
|
||||||
region_list: {},
|
region_list: {},
|
||||||
timeList: [],
|
timeList: [],
|
||||||
timesTndex: [0, 0],
|
timesTndex: [0, 0],
|
||||||
|
|
@ -131,14 +133,19 @@
|
||||||
msg: "暂无信息",
|
msg: "暂无信息",
|
||||||
address: "",
|
address: "",
|
||||||
isresult: false,
|
isresult: false,
|
||||||
choice: 0
|
choice: 0,
|
||||||
|
isRefresh: false,
|
||||||
|
info: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user", "familayList"]),
|
...mapState(["user", "familayList"]),
|
||||||
|
userAddress() {
|
||||||
|
return this.user.address
|
||||||
|
},
|
||||||
userId() {
|
userId() {
|
||||||
return this.user.id
|
return this.user.id
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
uslider,
|
uslider,
|
||||||
|
|
@ -155,6 +162,7 @@
|
||||||
that.address = that.user.address
|
that.address = that.user.address
|
||||||
that.getList()
|
that.getList()
|
||||||
}
|
}
|
||||||
|
console.log("onLoad")
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -163,14 +171,17 @@
|
||||||
that.Max_score = 0
|
that.Max_score = 0
|
||||||
that.selectllist = []
|
that.selectllist = []
|
||||||
that.sportsList = []
|
that.sportsList = []
|
||||||
|
that.isRefresh = true
|
||||||
that.timeList = that.$tools.gethms()
|
that.timeList = that.$tools.gethms()
|
||||||
if (that.familayList.length) {
|
if (that.familayList.length) {
|
||||||
that.address = that.user.address
|
that.address = that.user.address
|
||||||
that.getList()
|
that.getList()
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
that.isRefresh = false
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}, 1000);
|
}, 200);
|
||||||
|
console.log("刷新")
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -182,19 +193,19 @@
|
||||||
that.selectllist = []
|
that.selectllist = []
|
||||||
that.sportsList = []
|
that.sportsList = []
|
||||||
that.isActiveList = []
|
that.isActiveList = []
|
||||||
|
that.isActiveNameList = []
|
||||||
that.chartData.series[0].data = 0.8
|
that.chartData.series[0].data = 0.8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// userId() {
|
// userAddress() {
|
||||||
// let that = this
|
// let that = this
|
||||||
// that.score = 0
|
// that.score = 0
|
||||||
// that.selectllist = []
|
// that.selectllist = []
|
||||||
// that.sportsList = []
|
// that.sportsList = []
|
||||||
// that.address = that.user.address
|
// that.address = that.user.address
|
||||||
// that.getList()
|
// that.getList()
|
||||||
// that.handleSportsList()
|
// console.log("user地址变了", that.sportsList, that.selectllist)
|
||||||
// console.log("user变了", that.sportsList, that.selectllist)
|
|
||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -207,6 +218,7 @@
|
||||||
that.selectllist = []
|
that.selectllist = []
|
||||||
that.sportsList = []
|
that.sportsList = []
|
||||||
that.isActiveList = []
|
that.isActiveList = []
|
||||||
|
that.isActiveNameList = []
|
||||||
that.getList()
|
that.getList()
|
||||||
},
|
},
|
||||||
//
|
//
|
||||||
|
|
@ -291,7 +303,7 @@
|
||||||
that.choice = item.is_choice
|
that.choice = item.is_choice
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// console.log("添加项目", item)
|
console.log("添加项目", item)
|
||||||
that.isDrawe = true
|
that.isDrawe = true
|
||||||
},
|
},
|
||||||
bindTimeChange(e, it) {
|
bindTimeChange(e, it) {
|
||||||
|
|
@ -304,36 +316,49 @@
|
||||||
// 选择项目
|
// 选择项目
|
||||||
toggle(item) {
|
toggle(item) {
|
||||||
let that = this
|
let that = this
|
||||||
|
// 单选
|
||||||
if (that.choice == 1) {
|
if (that.choice == 1) {
|
||||||
that.isActive = that.isActive.name == item.name ? {} : item
|
that.isActive = that.isActive.name == item.name ? {} : item
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (that.isActiveList.indexOf(item.name) == -1) {
|
// 多选
|
||||||
|
if (that.isActiveNameList.indexOf(item.name) == -1) {
|
||||||
|
that.isActiveNameList.push(item.name)
|
||||||
that.isActiveList.push(item)
|
that.isActiveList.push(item)
|
||||||
} else {
|
} else {
|
||||||
that.isActiveList = that.isActiveList.filter(ite => ite.name !== item.name)
|
for (var n = 0; n < that.isActiveNameList.length; n++) {
|
||||||
|
if (item.name == that.isActiveNameList[n]) {
|
||||||
|
if (that.isActiveNameList.indexOf(item.name) == -1) {
|
||||||
|
that.isActiveNameList.push(item.name)
|
||||||
|
that.isActiveList.push(item);
|
||||||
|
}
|
||||||
|
that.isActiveNameList.splice(n, 1)
|
||||||
|
that.isActiveList.splice(n, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (that.isActiveList.length > that.choice) {
|
if (that.isActiveList.length > that.choice) {
|
||||||
that.isActiveList.splice(0, 1)
|
that.isActiveList.splice(0, 1)
|
||||||
|
that.isActiveNameList.splice(0, 1)
|
||||||
}
|
}
|
||||||
// console.log("isActiveList", that.selectllist, that.region_list, item)
|
console.log("isActiveList", item.name, that.isActiveList, that.region_list.list)
|
||||||
},
|
},
|
||||||
// 确定选择项目
|
// 确定选择项目
|
||||||
handleTarget() {
|
handleTarget() {
|
||||||
let that = this
|
let that = this
|
||||||
// console.log('确定', that.selectllist, that.region_list)
|
|
||||||
that.selectllist.forEach(item => {
|
|
||||||
item.list.forEach(it => {
|
|
||||||
if (it.key == that.region_list.key) {
|
|
||||||
it.list = []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
if (that.choice == 1) {
|
if (that.choice == 1) {
|
||||||
that.region_list.list.push(that.isActive)
|
that.region_list.list.push(that.isActive)
|
||||||
} else {
|
} else {
|
||||||
that.region_list.list = that.isActiveList
|
that.region_list.list = that.isActiveList
|
||||||
}
|
}
|
||||||
|
that.selectllist.forEach(item => {
|
||||||
|
item.list.forEach(it => {
|
||||||
|
if (it.key == that.region_list.key) {
|
||||||
|
it.list = that.region_list.list
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
that.isDrawe = false
|
that.isDrawe = false
|
||||||
},
|
},
|
||||||
handleTips(text) {
|
handleTips(text) {
|
||||||
|
|
@ -348,6 +373,11 @@
|
||||||
this.isActive = {}
|
this.isActive = {}
|
||||||
this.isDrawe = false
|
this.isDrawe = false
|
||||||
},
|
},
|
||||||
|
handleTap() {
|
||||||
|
// this.isActive = {}
|
||||||
|
// this.isDrawe = false
|
||||||
|
console.log('quxiao', this.info)
|
||||||
|
},
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,6 @@
|
||||||
active: 1,
|
active: 1,
|
||||||
acd_id: 6,
|
acd_id: 6,
|
||||||
weight: 50,
|
weight: 50,
|
||||||
Unload: false,
|
|
||||||
disabled: false,
|
disabled: false,
|
||||||
isDevice: 0,
|
isDevice: 0,
|
||||||
isConnection: false,
|
isConnection: false,
|
||||||
|
|
@ -167,18 +166,6 @@
|
||||||
that.handleisSdevice()
|
that.handleisSdevice()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
// 跳绳页返回
|
|
||||||
if (options && options.info) {
|
|
||||||
let data = JSON.parse(options.info)
|
|
||||||
that.Unload = true
|
|
||||||
that.active = data.active
|
|
||||||
that.deviceId = data.deviceId
|
|
||||||
that.serviceId = data.serviceId
|
|
||||||
that.write = data.write
|
|
||||||
that.notify = data.notify
|
|
||||||
that.islink = !that.isConnected ? -1 : 1
|
|
||||||
that.notifyBLECharacteristicValue()
|
|
||||||
}
|
|
||||||
that.$store.dispatch("getSkipResult", {
|
that.$store.dispatch("getSkipResult", {
|
||||||
aud_id: uni.getStorageSync('userid')
|
aud_id: uni.getStorageSync('userid')
|
||||||
})
|
})
|
||||||
|
|
@ -196,56 +183,48 @@
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
// 跳绳页返回
|
// 跳绳页返回
|
||||||
uni.$on('updateData', function(data) {
|
uni.$on('updateData', function(info) {
|
||||||
let info = JSON.parse(data)
|
let data = JSON.parse(info)
|
||||||
that.acd_id = info.acd_id
|
that.acd_id = data.acd_id
|
||||||
that.isDevice = info.device
|
that.isDevice = data.device
|
||||||
console.log('监听到事件来自 updateData ,携带参数为:' + info);
|
that.active = data.active
|
||||||
|
that.deviceId = data.deviceId
|
||||||
|
that.serviceId = data.serviceId
|
||||||
|
that.write = data.write
|
||||||
|
that.notify = data.notify
|
||||||
|
that.islink = !that.isConnected ? -1 : 1
|
||||||
|
that.isConnection = that.isConnected
|
||||||
|
that.notifyBLECharacteristicValue()
|
||||||
|
if (data.isSuccessful) {
|
||||||
|
that.$store.dispatch("getSkipResult", {
|
||||||
|
aud_id: uni.getStorageSync('userid')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
that.$Bluetooth.onBLEConnectionStateChange()
|
||||||
|
uni.onBluetoothAdapterStateChange(function(res) {
|
||||||
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
|
})
|
||||||
|
console.log('监听到事件来自 updateData', data);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// #ifdef APP-PLUS
|
onUnload: function() {
|
||||||
onBackPress() {
|
|
||||||
let that = this
|
let that = this
|
||||||
that.islink = -1
|
|
||||||
clearTimeout(myTime);
|
clearTimeout(myTime);
|
||||||
|
that.islink = -1
|
||||||
that.isConnection = false
|
that.isConnection = false
|
||||||
console.log("返回首页onBackPress")
|
|
||||||
that.$Bluetooth.closeBluetoothAdapter()
|
that.$Bluetooth.closeBluetoothAdapter()
|
||||||
that.$Bluetooth.closeBLEConnection(that.deviceId)
|
that.$Bluetooth.closeBLEConnection(that.deviceId)
|
||||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||||
that.$store.commit("changeBluetooth", false);
|
that.$store.commit("changeBluetooth", false);
|
||||||
that.$store.commit("changeConnected", false);
|
that.$store.commit("changeConnected", false);
|
||||||
|
uni.$off("updateData")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
return true
|
|
||||||
},
|
|
||||||
// #endif
|
|
||||||
// #ifndef APP-PLUS
|
|
||||||
onUnload: function() {
|
|
||||||
let that = this
|
|
||||||
// clearTimeout(myTime);
|
|
||||||
// that.islink = -1
|
|
||||||
// that.isConnection = false
|
|
||||||
// that.$Bluetooth.closeBluetoothAdapter()
|
|
||||||
// that.$Bluetooth.closeBLEConnection(that.deviceId)
|
|
||||||
// that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
|
||||||
// that.$store.commit("changeBluetooth", false);
|
|
||||||
// that.$store.commit("changeConnected", false);
|
|
||||||
// setTimeout(() => {
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/home/home'
|
|
||||||
})
|
|
||||||
// }, 300)
|
|
||||||
let pages = getCurrentPages()
|
|
||||||
let prevPage = pages[pages.length - 2]
|
|
||||||
console.log("prevPage", prevPage)
|
|
||||||
uni.$off("updateData")
|
|
||||||
console.log("返回首页onUnload")
|
console.log("返回首页onUnload")
|
||||||
},
|
},
|
||||||
// #endif
|
|
||||||
watch: {
|
watch: {
|
||||||
devicesList() {
|
devicesList() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -426,7 +405,6 @@
|
||||||
success(res) {
|
success(res) {
|
||||||
uni.onBLECharacteristicValueChange(function(res) {
|
uni.onBLECharacteristicValueChange(function(res) {
|
||||||
let value = that.$tools.ab2hex(res.value, "");
|
let value = that.$tools.ab2hex(res.value, "");
|
||||||
console.log("1111跳", value)
|
|
||||||
if (value == '5a05090169') { //模式设置成功
|
if (value == '5a05090169') { //模式设置成功
|
||||||
let info = {
|
let info = {
|
||||||
active: that.active,
|
active: that.active,
|
||||||
|
|
@ -435,9 +413,11 @@
|
||||||
notify: that.notify,
|
notify: that.notify,
|
||||||
write: that.write,
|
write: that.write,
|
||||||
acd_id: that.acd_id,
|
acd_id: that.acd_id,
|
||||||
isDevice: that.isDevice
|
isDevice: that.isDevice,
|
||||||
|
isSuccessful: false
|
||||||
}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
uni.$off("updateData")
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pageTwo/devices/PCT01?info=" + JSON
|
url: "/pageTwo/devices/PCT01?info=" + JSON
|
||||||
.stringify(info)
|
.stringify(info)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export default {
|
||||||
return model.getAccountNumber({}).then(res => {
|
return model.getAccountNumber({}).then(res => {
|
||||||
console.log("账户信息", res.data)
|
console.log("账户信息", res.data)
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
that.$tools.msg(res.msg)
|
tools.msg(res.msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
commit('changeAccountNumber', res.data)
|
commit('changeAccountNumber', res.data)
|
||||||
|
|
@ -24,7 +24,7 @@ export default {
|
||||||
return model.getUserInfo(account).then(res => {
|
return model.getUserInfo(account).then(res => {
|
||||||
console.log("用户信息", res.data)
|
console.log("用户信息", res.data)
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
that.$tools.msg(res.msg)
|
tools.msg(res.msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.setStorageSync('userid', res.data.id)
|
uni.setStorageSync('userid', res.data.id)
|
||||||
|
|
@ -40,7 +40,7 @@ export default {
|
||||||
account) {
|
account) {
|
||||||
return model.getUserList(account).then(res => {
|
return model.getUserList(account).then(res => {
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
that.$tools.msg(res.msg)
|
tools.msg(res.msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
commit('changeFamilay', res.data)
|
commit('changeFamilay', res.data)
|
||||||
|
|
|
||||||
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
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
|
|
@ -2556,7 +2556,7 @@ var render = function () {
|
||||||
_c(
|
_c(
|
||||||
"uni-view",
|
"uni-view",
|
||||||
{ staticClass: _vm._$g(10, "sc"), attrs: { _i: 10 } },
|
{ staticClass: _vm._$g(10, "sc"), attrs: { _i: 10 } },
|
||||||
[_vm._v("地区:" + _vm._$g(10, "t0-0"))]
|
[_vm._v("当前地区:" + _vm._$g(10, "t0-0"))]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
1
|
1
|
||||||
|
|
@ -2621,7 +2621,7 @@ var render = function () {
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
_c("uni-view", { attrs: { _i: 17 } }, [
|
_c("uni-view", { attrs: { _i: 17 } }, [
|
||||||
_vm._v("选择地区标准:"),
|
_vm._v("中招地区标准:"),
|
||||||
]),
|
]),
|
||||||
_c(
|
_c(
|
||||||
"uni-view",
|
"uni-view",
|
||||||
|
|
@ -16585,7 +16585,7 @@ if(false) {}
|
||||||
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ./node_modules/css-loader/dist/runtime/api.js */ 13);
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ./node_modules/css-loader/dist/runtime/api.js */ 13);
|
||||||
exports = ___CSS_LOADER_API_IMPORT___(false);
|
exports = ___CSS_LOADER_API_IMPORT___(false);
|
||||||
// Module
|
// Module
|
||||||
exports.push([module.i, "@charset \"UTF-8\";\n/* 主题色 */\n.content[data-v-b74f0dfc] {\n background-color: #F3F4F6;\n padding: 15px;\n min-height: 100vh;\n}\n.top[data-v-b74f0dfc] {\n height: auto;\n background: #fff;\n border-radius: 10px;\n display: flex;\n padding: 10px;\n align-items: center;\n justify-content: space-between;\n}\n.top .headimg[data-v-b74f0dfc] {\n width: 80%;\n display: flex;\n align-items: center;\n}\n.top .headimg uni-view[data-v-b74f0dfc] {\n width: calc(100% - 70px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.top uni-image[data-v-b74f0dfc] {\n width: 60px;\n height: 60px;\n border-radius: 50%;\n margin-right: 10px;\n}\n.wxlist[data-v-b74f0dfc] {\n height: auto;\n overflow: hidden;\n position: relative;\n}\n.wxlist .item[data-v-b74f0dfc] {\n width: auto;\n font-size: 32rpx;\n line-height: 45px;\n height: 45px;\n display: flex;\n margin-top: 15px;\n background: #fff;\n padding: 0 10px;\n border-radius: 10px;\n justify-content: space-between;\n align-items: center;\n}\n.wxlist .item .left[data-v-b74f0dfc] {\n display: flex;\n align-items: center;\n}\n.btn[data-v-b74f0dfc] {\n width: auto;\n background: #fea606;\n margin: 50px 15px 0 15px;\n}\n", ""]);
|
exports.push([module.i, "@charset \"UTF-8\";\n/* 主题色 */\n.content[data-v-b74f0dfc] {\n background-color: #F3F4F6;\n padding: 15px;\n min-height: 100vh;\n}\n.top[data-v-b74f0dfc] {\n height: auto;\n background: #fff;\n border-radius: 10px;\n display: flex;\n padding: 10px;\n align-items: center;\n justify-content: space-between;\n}\n.top .headimg[data-v-b74f0dfc] {\n width: 80%;\n display: flex;\n align-items: center;\n}\n.top .headimg uni-view[data-v-b74f0dfc] {\n width: calc(100% - 70px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.top uni-image[data-v-b74f0dfc] {\n width: 60px;\n height: 60px;\n border-radius: 50%;\n margin-right: 10px;\n}\n.wxlist[data-v-b74f0dfc] {\n height: auto;\n overflow: hidden;\n position: relative;\n}\n.wxlist .item[data-v-b74f0dfc] {\n width: auto;\n font-size: 32rpx;\n line-height: 45px;\n height: 45px;\n display: flex;\n margin-top: 15px;\n background: #fff;\n padding: 0 10px;\n border-radius: 10px;\n justify-content: space-between;\n align-items: center;\n}\n.wxlist .item .left[data-v-b74f0dfc] {\n display: flex;\n align-items: center;\n}\n.href[data-v-b74f0dfc] {\n display: flex;\n width: 100%;\n color: #000;\n text-decoration: none;\n justify-content: space-between;\n}\n.btn[data-v-b74f0dfc] {\n width: auto;\n background: #fea606;\n margin: 50px 15px 0 15px;\n}\n", ""]);
|
||||||
// Exports
|
// Exports
|
||||||
module.exports = exports;
|
module.exports = exports;
|
||||||
|
|
||||||
|
|
@ -16700,14 +16700,16 @@ var render = function () {
|
||||||
"uni-view",
|
"uni-view",
|
||||||
{ staticClass: _vm._$g(0, "sc"), attrs: { _i: 0 } },
|
{ staticClass: _vm._$g(0, "sc"), attrs: { _i: 0 } },
|
||||||
[
|
[
|
||||||
_c("headerIndex", {
|
_vm._$g(1, "i")
|
||||||
attrs: { _i: 1 },
|
? _c("headerIndex", {
|
||||||
on: {
|
attrs: { _i: 1 },
|
||||||
getAciveCity: function ($event) {
|
on: {
|
||||||
return _vm.$handleViewEvent($event)
|
getAciveCity: function ($event) {
|
||||||
},
|
return _vm.$handleViewEvent($event)
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
|
})
|
||||||
|
: _vm._e(),
|
||||||
_c(
|
_c(
|
||||||
"uni-view",
|
"uni-view",
|
||||||
{ staticClass: _vm._$g(2, "sc"), attrs: { _i: 2 } },
|
{ staticClass: _vm._$g(2, "sc"), attrs: { _i: 2 } },
|
||||||
|
|
|
||||||
|
|
@ -10999,7 +10999,7 @@ var _default = {
|
||||||
return _model.default.getAccountNumber({}).then(function (res) {
|
return _model.default.getAccountNumber({}).then(function (res) {
|
||||||
console.log("账户信息", res.data);
|
console.log("账户信息", res.data);
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
that.$tools.msg(res.msg);
|
_tools.default.msg(res.msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
commit('changeAccountNumber', res.data);
|
commit('changeAccountNumber', res.data);
|
||||||
|
|
@ -11011,7 +11011,7 @@ var _default = {
|
||||||
return _model.default.getUserInfo(account).then(function (res) {
|
return _model.default.getUserInfo(account).then(function (res) {
|
||||||
console.log("用户信息", res.data);
|
console.log("用户信息", res.data);
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
that.$tools.msg(res.msg);
|
_tools.default.msg(res.msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.setStorageSync('userid', res.data.id);
|
uni.setStorageSync('userid', res.data.id);
|
||||||
|
|
@ -11025,7 +11025,7 @@ var _default = {
|
||||||
var commit = _ref3.commit;
|
var commit = _ref3.commit;
|
||||||
return _model.default.getUserList(account).then(function (res) {
|
return _model.default.getUserList(account).then(function (res) {
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
that.$tools.msg(res.msg);
|
_tools.default.msg(res.msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
commit('changeFamilay', res.data);
|
commit('changeFamilay', res.data);
|
||||||
|
|
|
||||||
|
|
@ -202,8 +202,8 @@ var _default = {
|
||||||
userList: function userList() {
|
userList: function userList() {
|
||||||
return this.familayList;
|
return this.familayList;
|
||||||
},
|
},
|
||||||
userId: function userId() {
|
userAddress: function userAddress() {
|
||||||
return this.user.id;
|
return this.user.address;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -225,7 +225,7 @@ var _default = {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
userId: function userId() {
|
userAddress: function userAddress() {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.region = that.user.address;
|
that.region = that.user.address;
|
||||||
that.handleCityList();
|
that.handleCityList();
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="data-v-ef249ed8"><view class="header data-v-ef249ed8"><block wx:if="{{$root.g0}}"><view class="top data-v-ef249ed8"><view data-event-opts="{{[['tap',[['handleAddUser',[1]]]]]}}" class="headimg data-v-ef249ed8" bindtap="__e"><image src="{{info.head_pic}}" class="data-v-ef249ed8"></image></view><view data-event-opts="{{[['tap',[['handleAddUser',[1]]]]]}}" class="info data-v-ef249ed8" bindtap="__e"><view class="size18 bold data-v-ef249ed8">{{info.nickname}}</view><view class="mt-10 data-v-ef249ed8"><text class="mr-10 data-v-ef249ed8">{{"性别:"+(info.gender==1?'男':info.gender==2?'女':'未知')}}</text><text class="ml-10 data-v-ef249ed8">{{"年龄:"+info.age+"岁"}}</text></view><view class="mt-10 data-v-ef249ed8">{{"地区:"+info.address}}</view></view><block wx:if="{{isLeft}}"><text data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="t-icon t-icon-qiehuan1 data-v-ef249ed8" bindtap="__e"></text></block></view></block><block wx:else><view data-event-opts="{{[['tap',[['handleAddUser',[2]]]]]}}" class="top data-v-ef249ed8" bindtap="__e"><view class="info data-v-ef249ed8">暂无成员,请先添加~</view><view class="add data-v-ef249ed8">+</view></view></block></view><view class="cityList data-v-ef249ed8"><block wx:if="{{isArea}}"><view data-event-opts="{{[['tap',[['e1',['$event']]]]]}}" class="area data-v-ef249ed8" bindtap="__e"><view class="data-v-ef249ed8">选择地区标准:</view><view class="data-v-ef249ed8">{{region?region:info.address}}<uni-icons vue-id="f56e3a1c-1" type="bottom" class="data-v-ef249ed8" bind:__l="__l"></uni-icons></view></view></block><block wx:if="{{visible}}"><view data-event-opts="{{[['tap',[['e2',['$event']]]]]}}" class="visible data-v-ef249ed8" bindtap="__e"><view data-event-opts="{{[['tap',[['',['$event']]]]]}}" class="item data-v-ef249ed8" catchtap="__e"><view class="groupBtn data-v-ef249ed8"><view data-event-opts="{{[['tap',[['e3',['$event']]]]]}}" bindtap="__e" class="data-v-ef249ed8">取消</view><view data-event-opts="{{[['tap',[['handlesure']]]]}}" class="sure data-v-ef249ed8" bindtap="__e">确定</view></view><picker-view class="picker-view data-v-ef249ed8" value="{{value}}" indicator-style="{{indicatorStyle}}" data-event-opts="{{[['change',[['bindChange',['$event']]]]]}}" bindchange="__e"><picker-view-column class="data-v-ef249ed8"><block wx:for="{{province}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-ef249ed8">{{item.name}}</view></block></picker-view-column><picker-view-column class="data-v-ef249ed8"><block wx:for="{{city}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-ef249ed8">{{item}}</view></block></picker-view-column></picker-view></view></view></block></view><drawer vue-id="f56e3a1c-2" class="data-v-ef249ed8" bind:__l="__l"></drawer></view>
|
<view class="data-v-ef249ed8"><view class="header data-v-ef249ed8"><block wx:if="{{$root.g0}}"><view class="top data-v-ef249ed8"><view data-event-opts="{{[['tap',[['handleAddUser',[1]]]]]}}" class="headimg data-v-ef249ed8" bindtap="__e"><image src="{{info.head_pic}}" class="data-v-ef249ed8"></image></view><view data-event-opts="{{[['tap',[['handleAddUser',[1]]]]]}}" class="info data-v-ef249ed8" bindtap="__e"><view class="size18 bold data-v-ef249ed8">{{info.nickname}}</view><view class="mt-10 data-v-ef249ed8"><text class="mr-10 data-v-ef249ed8">{{"性别:"+(info.gender==1?'男':info.gender==2?'女':'未知')}}</text><text class="ml-10 data-v-ef249ed8">{{"年龄:"+info.age+"岁"}}</text></view><view class="mt-10 data-v-ef249ed8">{{"当前地区:"+info.address}}</view></view><block wx:if="{{isLeft}}"><text data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="t-icon t-icon-qiehuan1 data-v-ef249ed8" bindtap="__e"></text></block></view></block><block wx:else><view data-event-opts="{{[['tap',[['handleAddUser',[2]]]]]}}" class="top data-v-ef249ed8" bindtap="__e"><view class="info data-v-ef249ed8">暂无成员,请先添加~</view><view class="add data-v-ef249ed8">+</view></view></block></view><view class="cityList data-v-ef249ed8"><block wx:if="{{isArea}}"><view data-event-opts="{{[['tap',[['e1',['$event']]]]]}}" class="area data-v-ef249ed8" bindtap="__e"><view class="data-v-ef249ed8">中招地区标准:</view><view class="data-v-ef249ed8">{{region?region:info.address}}<uni-icons vue-id="f56e3a1c-1" type="bottom" class="data-v-ef249ed8" bind:__l="__l"></uni-icons></view></view></block><block wx:if="{{visible}}"><view data-event-opts="{{[['tap',[['e2',['$event']]]]]}}" class="visible data-v-ef249ed8" bindtap="__e"><view data-event-opts="{{[['tap',[['',['$event']]]]]}}" class="item data-v-ef249ed8" catchtap="__e"><view class="groupBtn data-v-ef249ed8"><view data-event-opts="{{[['tap',[['e3',['$event']]]]]}}" bindtap="__e" class="data-v-ef249ed8">取消</view><view data-event-opts="{{[['tap',[['handlesure']]]]}}" class="sure data-v-ef249ed8" bindtap="__e">确定</view></view><picker-view class="picker-view data-v-ef249ed8" value="{{value}}" indicator-style="{{indicatorStyle}}" data-event-opts="{{[['change',[['bindChange',['$event']]]]]}}" bindchange="__e"><picker-view-column class="data-v-ef249ed8"><block wx:for="{{province}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-ef249ed8">{{item.name}}</view></block></picker-view-column><picker-view-column class="data-v-ef249ed8"><block wx:for="{{city}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-ef249ed8">{{item}}</view></block></picker-view-column></picker-view></view></view></block></view><drawer vue-id="f56e3a1c-2" class="data-v-ef249ed8" bind:__l="__l"></drawer></view>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"component": true,
|
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||||
}
|
},
|
||||||
|
"component": true
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"component": true,
|
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||||
}
|
},
|
||||||
|
"component": true
|
||||||
}
|
}
|
||||||
|
|
@ -266,7 +266,6 @@ var _default = {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (that.isStart) {
|
if (that.isStart) {
|
||||||
that.handleAudio();
|
that.handleAudio();
|
||||||
console.log("11111111");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -374,8 +373,11 @@ var _default = {
|
||||||
cancelText: "返回",
|
cancelText: "返回",
|
||||||
success: function success(res) {
|
success: function success(res) {
|
||||||
if (res.cancel) {
|
if (res.cancel) {
|
||||||
that.handleEnd();
|
|
||||||
innerAudioContext.stop();
|
innerAudioContext.stop();
|
||||||
|
uni.navigateBack({
|
||||||
|
//返回
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -421,6 +423,7 @@ var _default = {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
that.bpm = that.weight / (that.time / 60);
|
that.bpm = that.weight / (that.time / 60);
|
||||||
that.iswrapper = true;
|
that.iswrapper = true;
|
||||||
|
that.info.isSuccessful = true;
|
||||||
that.$store.dispatch('getUserInfo', {
|
that.$store.dispatch('getUserInfo', {
|
||||||
aud_id: uni.getStorageSync('userid')
|
aud_id: uni.getStorageSync('userid')
|
||||||
});
|
});
|
||||||
|
|
@ -467,7 +470,6 @@ var _default = {
|
||||||
},
|
},
|
||||||
handleTarget: function handleTarget() {
|
handleTarget: function handleTarget() {
|
||||||
var that = this;
|
var that = this;
|
||||||
uni.$emit('updateData', JSON.stringify(that.info));
|
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
//返回
|
//返回
|
||||||
delta: 1
|
delta: 1
|
||||||
|
|
@ -481,9 +483,7 @@ var _default = {
|
||||||
that.handleStart('结束');
|
that.handleStart('结束');
|
||||||
}, 400);
|
}, 400);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
uni.redirectTo({
|
uni.$emit('updateData', JSON.stringify(that.info));
|
||||||
url: "/pages/skiping/skip?info=" + JSON.stringify(that.info)
|
|
||||||
});
|
|
||||||
}, 600);
|
}, 600);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -221,12 +221,13 @@ var _default = {
|
||||||
labelList: function labelList() {
|
labelList: function labelList() {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (that.PublicContent) {
|
if (that.PublicContent) {
|
||||||
that.labelName = that.PublicContent.label_list[0];
|
that.labelName = that.PublicContent.label_list[that.active];
|
||||||
that.lineList = that.PublicContent.line_list;
|
that.lineList = that.PublicContent.line_list;
|
||||||
that.label_data = that.PublicContent.label_data;
|
that.label_data = that.PublicContent.label_data;
|
||||||
that.chartData.series[0].data = Number(that.PublicContent.label_data[0].offset) / 100;
|
that.chartData.series[0].data = Number(that.PublicContent.label_data[that.active].offset) / 100;
|
||||||
that.offset = that.PublicContent.label_data[0].offset;
|
that.offset = that.PublicContent.label_data[that.active].offset;
|
||||||
}
|
}
|
||||||
|
console.log("11111", that.PublicContent, that.active, that.labelName);
|
||||||
return that.PublicContent ? that.PublicContent.label_list : [];
|
return that.PublicContent ? that.PublicContent.label_list : [];
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,13 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.href.data-v-0ac7a6b2 {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
color: #000;
|
||||||
|
text-decoration: none;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
.btn.data-v-0ac7a6b2 {
|
.btn.data-v-0ac7a6b2 {
|
||||||
width: auto;
|
width: auto;
|
||||||
background: #fea606;
|
background: #fea606;
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,8 @@ var render = function () {
|
||||||
var l2 = _vm.isDrawe
|
var l2 = _vm.isDrawe
|
||||||
? _vm.__map(_vm.List, function (item, index) {
|
? _vm.__map(_vm.List, function (item, index) {
|
||||||
var $orig = _vm.__get_orig(item)
|
var $orig = _vm.__get_orig(item)
|
||||||
var g3 = _vm.choice > 1 ? _vm.isActiveList.indexOf(item) : null
|
var g3 = _vm.choice > 1 ? _vm.isActiveNameList.indexOf(item.name) : null
|
||||||
var g4 = _vm.choice > 1 ? _vm.isActiveList.indexOf(item) : null
|
var g4 = _vm.choice > 1 ? _vm.isActiveNameList.indexOf(item.name) : null
|
||||||
return {
|
return {
|
||||||
$orig: $orig,
|
$orig: $orig,
|
||||||
g3: g3,
|
g3: g3,
|
||||||
|
|
@ -256,6 +256,7 @@ var _default = {
|
||||||
selectllist: [],
|
selectllist: [],
|
||||||
isActive: {},
|
isActive: {},
|
||||||
isActiveList: [],
|
isActiveList: [],
|
||||||
|
isActiveNameList: [],
|
||||||
region_list: {},
|
region_list: {},
|
||||||
timeList: [],
|
timeList: [],
|
||||||
timesTndex: [0, 0],
|
timesTndex: [0, 0],
|
||||||
|
|
@ -263,10 +264,15 @@ var _default = {
|
||||||
msg: "暂无信息",
|
msg: "暂无信息",
|
||||||
address: "",
|
address: "",
|
||||||
isresult: false,
|
isresult: false,
|
||||||
choice: 0
|
choice: 0,
|
||||||
|
isRefresh: false,
|
||||||
|
info: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", "familayList"])), {}, {
|
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", "familayList"])), {}, {
|
||||||
|
userAddress: function userAddress() {
|
||||||
|
return this.user.address;
|
||||||
|
},
|
||||||
userId: function userId() {
|
userId: function userId() {
|
||||||
return this.user.id;
|
return this.user.id;
|
||||||
}
|
}
|
||||||
|
|
@ -286,6 +292,7 @@ var _default = {
|
||||||
that.address = that.user.address;
|
that.address = that.user.address;
|
||||||
that.getList();
|
that.getList();
|
||||||
}
|
}
|
||||||
|
console.log("onLoad");
|
||||||
},
|
},
|
||||||
onPullDownRefresh: function onPullDownRefresh() {
|
onPullDownRefresh: function onPullDownRefresh() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
@ -294,14 +301,17 @@ var _default = {
|
||||||
that.Max_score = 0;
|
that.Max_score = 0;
|
||||||
that.selectllist = [];
|
that.selectllist = [];
|
||||||
that.sportsList = [];
|
that.sportsList = [];
|
||||||
|
that.isRefresh = true;
|
||||||
that.timeList = that.$tools.gethms();
|
that.timeList = that.$tools.gethms();
|
||||||
if (that.familayList.length) {
|
if (that.familayList.length) {
|
||||||
that.address = that.user.address;
|
that.address = that.user.address;
|
||||||
that.getList();
|
that.getList();
|
||||||
}
|
}
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
that.isRefresh = false;
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}, 1000);
|
}, 200);
|
||||||
|
console.log("刷新");
|
||||||
},
|
},
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
@ -313,19 +323,19 @@ var _default = {
|
||||||
that.selectllist = [];
|
that.selectllist = [];
|
||||||
that.sportsList = [];
|
that.sportsList = [];
|
||||||
that.isActiveList = [];
|
that.isActiveList = [];
|
||||||
|
that.isActiveNameList = [];
|
||||||
that.chartData.series[0].data = 0.8;
|
that.chartData.series[0].data = 0.8;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// userId() {
|
// userAddress() {
|
||||||
// let that = this
|
// let that = this
|
||||||
// that.score = 0
|
// that.score = 0
|
||||||
// that.selectllist = []
|
// that.selectllist = []
|
||||||
// that.sportsList = []
|
// that.sportsList = []
|
||||||
// that.address = that.user.address
|
// that.address = that.user.address
|
||||||
// that.getList()
|
// that.getList()
|
||||||
// that.handleSportsList()
|
// console.log("user地址变了", that.sportsList, that.selectllist)
|
||||||
// console.log("user变了", that.sportsList, that.selectllist)
|
|
||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -338,6 +348,7 @@ var _default = {
|
||||||
that.selectllist = [];
|
that.selectllist = [];
|
||||||
that.sportsList = [];
|
that.sportsList = [];
|
||||||
that.isActiveList = [];
|
that.isActiveList = [];
|
||||||
|
that.isActiveNameList = [];
|
||||||
that.getList();
|
that.getList();
|
||||||
},
|
},
|
||||||
//
|
//
|
||||||
|
|
@ -422,7 +433,7 @@ var _default = {
|
||||||
that.choice = item.is_choice;
|
that.choice = item.is_choice;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// console.log("添加项目", item)
|
console.log("添加项目", item);
|
||||||
that.isDrawe = true;
|
that.isDrawe = true;
|
||||||
},
|
},
|
||||||
bindTimeChange: function bindTimeChange(e, it) {
|
bindTimeChange: function bindTimeChange(e, it) {
|
||||||
|
|
@ -435,38 +446,48 @@ var _default = {
|
||||||
// 选择项目
|
// 选择项目
|
||||||
toggle: function toggle(item) {
|
toggle: function toggle(item) {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
// 单选
|
||||||
if (that.choice == 1) {
|
if (that.choice == 1) {
|
||||||
that.isActive = that.isActive.name == item.name ? {} : item;
|
that.isActive = that.isActive.name == item.name ? {} : item;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (that.isActiveList.indexOf(item.name) == -1) {
|
// 多选
|
||||||
|
if (that.isActiveNameList.indexOf(item.name) == -1) {
|
||||||
|
that.isActiveNameList.push(item.name);
|
||||||
that.isActiveList.push(item);
|
that.isActiveList.push(item);
|
||||||
} else {
|
} else {
|
||||||
that.isActiveList = that.isActiveList.filter(function (ite) {
|
for (var n = 0; n < that.isActiveNameList.length; n++) {
|
||||||
return ite.name !== item.name;
|
if (item.name == that.isActiveNameList[n]) {
|
||||||
});
|
if (that.isActiveNameList.indexOf(item.name) == -1) {
|
||||||
|
that.isActiveNameList.push(item.name);
|
||||||
|
that.isActiveList.push(item);
|
||||||
|
}
|
||||||
|
that.isActiveNameList.splice(n, 1);
|
||||||
|
that.isActiveList.splice(n, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (that.isActiveList.length > that.choice) {
|
if (that.isActiveList.length > that.choice) {
|
||||||
that.isActiveList.splice(0, 1);
|
that.isActiveList.splice(0, 1);
|
||||||
|
that.isActiveNameList.splice(0, 1);
|
||||||
}
|
}
|
||||||
// console.log("isActiveList", that.selectllist, that.region_list, item)
|
console.log("isActiveList", item.name, that.isActiveList, that.region_list.list);
|
||||||
},
|
},
|
||||||
// 确定选择项目
|
// 确定选择项目
|
||||||
handleTarget: function handleTarget() {
|
handleTarget: function handleTarget() {
|
||||||
var that = this;
|
var that = this;
|
||||||
// console.log('确定', that.selectllist, that.region_list)
|
|
||||||
that.selectllist.forEach(function (item) {
|
|
||||||
item.list.forEach(function (it) {
|
|
||||||
if (it.key == that.region_list.key) {
|
|
||||||
it.list = [];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
if (that.choice == 1) {
|
if (that.choice == 1) {
|
||||||
that.region_list.list.push(that.isActive);
|
that.region_list.list.push(that.isActive);
|
||||||
} else {
|
} else {
|
||||||
that.region_list.list = that.isActiveList;
|
that.region_list.list = that.isActiveList;
|
||||||
}
|
}
|
||||||
|
that.selectllist.forEach(function (item) {
|
||||||
|
item.list.forEach(function (it) {
|
||||||
|
if (it.key == that.region_list.key) {
|
||||||
|
it.list = that.region_list.list;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
that.isDrawe = false;
|
that.isDrawe = false;
|
||||||
},
|
},
|
||||||
handleTips: function handleTips(text) {
|
handleTips: function handleTips(text) {
|
||||||
|
|
@ -481,6 +502,11 @@ var _default = {
|
||||||
this.isActive = {};
|
this.isActive = {};
|
||||||
this.isDrawe = false;
|
this.isDrawe = false;
|
||||||
},
|
},
|
||||||
|
handleTap: function handleTap() {
|
||||||
|
// this.isActive = {}
|
||||||
|
// this.isDrawe = false
|
||||||
|
console.log('quxiao', this.info);
|
||||||
|
},
|
||||||
navTo: function navTo(url) {
|
navTo: function navTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -295,7 +295,6 @@ var _default = {
|
||||||
active: 1,
|
active: 1,
|
||||||
acd_id: 6,
|
acd_id: 6,
|
||||||
weight: 50,
|
weight: 50,
|
||||||
Unload: false,
|
|
||||||
disabled: false,
|
disabled: false,
|
||||||
isDevice: 0,
|
isDevice: 0,
|
||||||
isConnection: false,
|
isConnection: false,
|
||||||
|
|
@ -336,18 +335,6 @@ var _default = {
|
||||||
that.handleisSdevice();
|
that.handleisSdevice();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
// 跳绳页返回
|
|
||||||
if (options && options.info) {
|
|
||||||
var data = JSON.parse(options.info);
|
|
||||||
that.Unload = true;
|
|
||||||
that.active = data.active;
|
|
||||||
that.deviceId = data.deviceId;
|
|
||||||
that.serviceId = data.serviceId;
|
|
||||||
that.write = data.write;
|
|
||||||
that.notify = data.notify;
|
|
||||||
that.islink = !that.isConnected ? -1 : 1;
|
|
||||||
that.notifyBLECharacteristicValue();
|
|
||||||
}
|
|
||||||
that.$store.dispatch("getSkipResult", {
|
that.$store.dispatch("getSkipResult", {
|
||||||
aud_id: uni.getStorageSync('userid')
|
aud_id: uni.getStorageSync('userid')
|
||||||
});
|
});
|
||||||
|
|
@ -365,32 +352,46 @@ var _default = {
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
var that = this;
|
var that = this;
|
||||||
// 跳绳页返回
|
// 跳绳页返回
|
||||||
uni.$on('updateData', function (data) {
|
uni.$on('updateData', function (info) {
|
||||||
var info = JSON.parse(data);
|
var data = JSON.parse(info);
|
||||||
that.acd_id = info.acd_id;
|
that.acd_id = data.acd_id;
|
||||||
that.isDevice = info.device;
|
that.isDevice = data.device;
|
||||||
console.log('监听到事件来自 updateData ,携带参数为:' + info);
|
that.active = data.active;
|
||||||
|
that.deviceId = data.deviceId;
|
||||||
|
that.serviceId = data.serviceId;
|
||||||
|
that.write = data.write;
|
||||||
|
that.notify = data.notify;
|
||||||
|
that.islink = !that.isConnected ? -1 : 1;
|
||||||
|
that.isConnection = that.isConnected;
|
||||||
|
that.notifyBLECharacteristicValue();
|
||||||
|
if (data.isSuccessful) {
|
||||||
|
that.$store.dispatch("getSkipResult", {
|
||||||
|
aud_id: uni.getStorageSync('userid')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
that.$Bluetooth.onBLEConnectionStateChange();
|
||||||
|
uni.onBluetoothAdapterStateChange(function (res) {
|
||||||
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
|
});
|
||||||
|
console.log('监听到事件来自 updateData', data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onUnload: function onUnload() {
|
onUnload: function onUnload() {
|
||||||
var that = this;
|
var that = this;
|
||||||
// clearTimeout(myTime);
|
clearTimeout(myTime);
|
||||||
// that.islink = -1
|
that.islink = -1;
|
||||||
// that.isConnection = false
|
that.isConnection = false;
|
||||||
// that.$Bluetooth.closeBluetoothAdapter()
|
that.$Bluetooth.closeBluetoothAdapter();
|
||||||
// that.$Bluetooth.closeBLEConnection(that.deviceId)
|
that.$Bluetooth.closeBLEConnection(that.deviceId);
|
||||||
// that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
that.$Bluetooth.stopBluetoothDevicesDiscovery();
|
||||||
// that.$store.commit("changeBluetooth", false);
|
that.$store.commit("changeBluetooth", false);
|
||||||
// that.$store.commit("changeConnected", false);
|
that.$store.commit("changeConnected", false);
|
||||||
// setTimeout(() => {
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/home/home'
|
|
||||||
});
|
|
||||||
// }, 300)
|
|
||||||
var pages = getCurrentPages();
|
|
||||||
var prevPage = pages[pages.length - 2];
|
|
||||||
console.log("prevPage", prevPage);
|
|
||||||
uni.$off("updateData");
|
uni.$off("updateData");
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/home/home'
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
console.log("返回首页onUnload");
|
console.log("返回首页onUnload");
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -572,7 +573,6 @@ var _default = {
|
||||||
success: function success(res) {
|
success: function success(res) {
|
||||||
uni.onBLECharacteristicValueChange(function (res) {
|
uni.onBLECharacteristicValueChange(function (res) {
|
||||||
var value = that.$tools.ab2hex(res.value, "");
|
var value = that.$tools.ab2hex(res.value, "");
|
||||||
console.log("1111跳", value);
|
|
||||||
if (value == '5a05090169') {
|
if (value == '5a05090169') {
|
||||||
//模式设置成功
|
//模式设置成功
|
||||||
var info = {
|
var info = {
|
||||||
|
|
@ -582,9 +582,11 @@ var _default = {
|
||||||
notify: that.notify,
|
notify: that.notify,
|
||||||
write: that.write,
|
write: that.write,
|
||||||
acd_id: that.acd_id,
|
acd_id: that.acd_id,
|
||||||
isDevice: that.isDevice
|
isDevice: that.isDevice,
|
||||||
|
isSuccessful: false
|
||||||
};
|
};
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
uni.$off("updateData");
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pageTwo/devices/PCT01?info=" + JSON.stringify(info)
|
url: "/pageTwo/devices/PCT01?info=" + JSON.stringify(info)
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue