aaa
This commit is contained in:
parent
ca38c78719
commit
ee33abc2c8
|
@ -275,7 +275,6 @@
|
|||
this.showloading=false
|
||||
uni.hideLoading()
|
||||
}
|
||||
|
||||
})
|
||||
// console.log(res.data.data)
|
||||
|
||||
|
|
|
@ -411,7 +411,6 @@
|
|||
// uni.hideLoading()
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
setTimeout(() => {
|
||||
request.get('/api/beehive/detail/' + item.id, {}).then(res => {
|
||||
const newData = res.data.data;
|
||||
|
@ -426,7 +425,8 @@
|
|||
}
|
||||
})
|
||||
}, 500)
|
||||
}, 4000)
|
||||
uni.hideLoading()
|
||||
}, 6000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
|
@ -581,28 +581,35 @@
|
|||
mask: true
|
||||
})
|
||||
request.post('/api/beehive/removePeel/' + item.id, {}).then(res => {
|
||||
uni.hideLoading()
|
||||
// that.loadData()
|
||||
request.get('/api/beehive/detail/' + item.id, {}).then(res => {
|
||||
const newData = res.data.data; // 提取新数据
|
||||
// 查找具有相同id的项
|
||||
const existingItem = this.listData.find(item => item.id ===
|
||||
newData.id);
|
||||
if (existingItem) {
|
||||
// 如果找到,替换原数据
|
||||
const index = this.listData.indexOf(existingItem);
|
||||
this.listData.splice(index, 1,
|
||||
newData); // 删除旧数据并插入新数据
|
||||
} else {
|
||||
// 如果没有找到,添加到数组中
|
||||
this.listData.push(newData);
|
||||
}
|
||||
console.log(this.listData, 101010);
|
||||
})
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res.data.msg
|
||||
})
|
||||
request.get('/api/beehive/detail/' + item.id, {}).then(res => {
|
||||
const newData = res.data.data;
|
||||
const existingItem = that.listData.find(item => item.id === newData.id);
|
||||
if (existingItem) {
|
||||
// 如果找到,替换原数据
|
||||
const index = that.listData.indexOf(existingItem);
|
||||
that.listData.splice(index, 1, newData);
|
||||
} else {
|
||||
that.listData.push(newData);
|
||||
}
|
||||
// uni.hideLoading()
|
||||
})
|
||||
setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
request.get('/api/beehive/detail/' + item.id, {}).then(res => {
|
||||
const newData = res.data.data;
|
||||
const existingItem = that.listData.find(item => item.id === newData
|
||||
.id);
|
||||
if (existingItem) {
|
||||
// 如果找到,替换原数据
|
||||
const index = that.listData.indexOf(existingItem);
|
||||
that.listData.splice(index, 1, newData);
|
||||
} else {
|
||||
that.listData.push(newData);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
uni.hideLoading()
|
||||
}, 6000)
|
||||
})
|
||||
|
||||
} else if (res.cancel) {}
|
||||
|
|
|
@ -156,7 +156,8 @@
|
|||
</view>
|
||||
<view class="charts-box" >
|
||||
<qiun-data-charts v-if="logoflag" type="column" :opts="optsZhu" :chartData="chartDataZhu" :errorShow="false" :errorReload="false" :animation="false" :tooltipShow="false" :tapLegend="false" />
|
||||
<view class="" v-else style="color: #ccc;font-size: 36rpx;width: 100%;text-align: center;margin-top: 50rpx;">暂无蜂箱...</view>
|
||||
<view class="" v-else style="color: #ccc;font-size: 36rpx;width: 100%;text-align: center;margin-top: 50rpx;">暂无蜂箱...
|
||||
<view @click="djdl" style="width: 200rpx;height: 80rpx;text-align: center;line-height: 80rpx;background-color: #3CA272;margin: auto;margin-top: 30rpx;border-radius: 30rpx;color: #fff;padding: 0rpx 20rpx;box-sizing: border-box;">点击登录</view> </view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 折线 -->
|
||||
|
@ -468,6 +469,11 @@
|
|||
clearInterval(this.intervalId);
|
||||
},
|
||||
methods: {
|
||||
djdl(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/login/index'
|
||||
})
|
||||
},
|
||||
topage(num) {
|
||||
if (this.tokenflag == true) {
|
||||
if (num == 1) {
|
||||
|
|
|
@ -790,6 +790,7 @@
|
|||
// 接收参数
|
||||
onLoad(option) {
|
||||
console.log(option);
|
||||
this.getuserid()
|
||||
if (option.scene) {
|
||||
let sceneValue = option.scene
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
|
@ -805,7 +806,7 @@
|
|||
} else {
|
||||
this.id = option.id
|
||||
if (!wx.getStorageSync('userToken')) {
|
||||
uni.navigateTo({
|
||||
uni.reLaunch({
|
||||
url: '/pagesFengXiang/pages/fengxiangDetailtwo/index?id=' + this.id
|
||||
})
|
||||
} else {
|
||||
|
@ -816,9 +817,22 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
getuserid(){
|
||||
let page = 1
|
||||
let qrcode = ''
|
||||
request.get('/api/apiary/index', {page,qrcode}).then(res => {
|
||||
this.user_id = res.data.data[0].user_id
|
||||
console.log(wx.getStorageSync('user_id'),this.user_id);
|
||||
if (wx.getStorageSync('user_id') != this.user_id) {
|
||||
uni.reLaunch({
|
||||
url: '/pagesFengXiang/pages/fengxiangDetailtwo/index?id=' + this.id
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fenlampbut() {
|
||||
if (this.switchk) {
|
||||
this.switchk = false
|
||||
|
@ -869,13 +883,13 @@
|
|||
listDataFn() {
|
||||
request.get('/api/beehive/detail/' + this.id, {}).then(res => {
|
||||
this.idss = res.data.data.id
|
||||
this.user_id = res.data.data.user_id
|
||||
console.log(wx.getStorageSync('user_id'),this.user_id);
|
||||
if (wx.getStorageSync('user_id') != this.user_id) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesFengXiang/pages/fengxiangDetailtwo/index?id=' + this.id
|
||||
})
|
||||
}
|
||||
// this.user_id = res.data.data.user_id
|
||||
// console.log(wx.getStorageSync('user_id'),this.user_id);
|
||||
// if (wx.getStorageSync('user_id') != this.user_id) {
|
||||
// uni.reLaunch({
|
||||
// url: '/pagesFengXiang/pages/fengxiangDetailtwo/index?id=' + this.id
|
||||
// })
|
||||
// }
|
||||
this.getServerDatas()
|
||||
console.log(res);
|
||||
this.listdata = {
|
||||
|
|
|
@ -221,10 +221,10 @@
|
|||
markers: [{
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
width: 25,
|
||||
height: 25,
|
||||
width: 15,
|
||||
height: 15,
|
||||
id: 0,
|
||||
iconPath: '../../../static/dwicon.png',
|
||||
iconPath: '../../../static/a11.png',
|
||||
}],
|
||||
},
|
||||
// 折线图1
|
||||
|
|
Loading…
Reference in New Issue
Block a user