更新 订单管理 收支列表
This commit is contained in:
parent
110839ea05
commit
98c167ca59
|
@ -13,7 +13,7 @@
|
|||
<div class="tab" @tap.stop="changeTabbar(2)">
|
||||
<image src="@/static/tabbar/my.png" mode="" v-show="indexs!=2" style="width: 28rpx;height: 36.4rpx;"></image>
|
||||
<image src="@/static/tabbar/my-active.png" mode="" v-show="indexs==2" style="width: 28rpx;height: 36.4rpx;"></image>
|
||||
<div class="txt" :class="indexs==2?'act1':''">我的</div>
|
||||
<div class="txt" :class="indexs==2?'act1':''">商户</div>
|
||||
</div>
|
||||
|
||||
</view>
|
||||
|
|
|
@ -93,7 +93,10 @@
|
|||
<u-checkbox v-model="checked" @change="checkboxChange" active-color="#8883F0 ">我已同意
|
||||
</u-checkbox><text>《用户服务协议》</text>
|
||||
</u-checkbox-group>
|
||||
<view class="zf" @click="btnzhifu">
|
||||
<view class="zf" @click="btnzhifu" v-if="zhifuflag">
|
||||
立即支付
|
||||
</view>
|
||||
<view class="zf" v-else>
|
||||
立即支付
|
||||
</view>
|
||||
</view>
|
||||
|
@ -110,6 +113,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
zhifuflag:true,
|
||||
indexactive: -1,
|
||||
checked: false,
|
||||
lanyaflag: false,
|
||||
|
@ -131,7 +135,8 @@
|
|||
jine: '',
|
||||
dingobj: {},
|
||||
suitTimeUnit:'',
|
||||
zfflag:true
|
||||
zfflag:true,
|
||||
prices:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -144,54 +149,69 @@
|
|||
let sceneValue = option.q
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
this.id = getQueryParam(decodedValue, 's')
|
||||
this.$u.get(`/app/device/${this.id}/bySn`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.mac = 'CTKG-' + res.data.mac
|
||||
this.onlineStatus = res.data.onlineStatus
|
||||
|
||||
if (this.onlineStatus == 0) {
|
||||
// 一开始搜索设备
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
})
|
||||
setTimeout(() => {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
if (this.devicesList.length > 0) {
|
||||
xBlufi.notifyConnectBle({
|
||||
isStart: true,
|
||||
deviceId: this.deviceId,
|
||||
name: this.name
|
||||
})
|
||||
}
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.startTimer()
|
||||
this.gettaoc()
|
||||
this.getmac()
|
||||
if (this.onlineStatus == 0) {
|
||||
// 一开始搜索设备
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
})
|
||||
setTimeout(() => {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
if (this.devicesList.length > 0) {
|
||||
xBlufi.notifyConnectBle({
|
||||
isStart: true,
|
||||
deviceId: this.deviceId,
|
||||
name: this.name
|
||||
})
|
||||
}
|
||||
}, 2000)
|
||||
}
|
||||
// this.getmac()
|
||||
|
||||
} else {
|
||||
this.id = option.id
|
||||
this.$u.get(`/app/device/${this.id}/bySn`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.mac = 'CTKG-' + res.data.mac
|
||||
this.onlineStatus = res.data.onlineStatus
|
||||
if (this.onlineStatus == 0) {
|
||||
// 一开始搜索设备
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
})
|
||||
setTimeout(() => {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
if (this.devicesList.length > 0) {
|
||||
xBlufi.notifyConnectBle({
|
||||
isStart: true,
|
||||
deviceId: this.deviceId,
|
||||
name: this.name
|
||||
})
|
||||
}
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.startTimer()
|
||||
this.gettaoc()
|
||||
this.getmac()
|
||||
if (this.onlineStatus == 0) {
|
||||
// 一开始搜索设备
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
})
|
||||
setTimeout(() => {
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
})
|
||||
if (this.devicesList.length > 0) {
|
||||
xBlufi.notifyConnectBle({
|
||||
isStart: true,
|
||||
deviceId: this.deviceId,
|
||||
name: this.name
|
||||
})
|
||||
}
|
||||
}, 2000)
|
||||
}
|
||||
// this.getmac()
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -312,7 +332,7 @@
|
|||
},
|
||||
startTimer() {
|
||||
this.timer = setInterval(() => {
|
||||
this.gettaoc();
|
||||
// this.gettaoc();
|
||||
}, 30000);
|
||||
},
|
||||
getmac() {
|
||||
|
@ -320,7 +340,6 @@
|
|||
if (res.code == 200) {
|
||||
this.mac = 'CTKG-' + res.data.mac
|
||||
this.onlineStatus = res.data.onlineStatus
|
||||
// console.log(this.mac,'期初');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -339,8 +358,7 @@
|
|||
// this.expireTimeStr = parseInt(differenceInMinutes) <= 0 ? '0' : differenceInMinutes
|
||||
let targetDateStr = this.deviceobj.expireTime;
|
||||
let targetParts = targetDateStr.split(/[- :]/);
|
||||
let targetDate = new Date(targetParts[0], targetParts[1] - 1, targetParts[2], targetParts[
|
||||
3], targetParts[4], targetParts[5]);
|
||||
let targetDate = new Date(targetParts[0], targetParts[1] - 1, targetParts[2], targetParts[3], targetParts[4], targetParts[5]);
|
||||
let now = new Date();
|
||||
let differenceInMs = targetDate - now;
|
||||
if (differenceInMs <= 0) {
|
||||
|
@ -365,6 +383,7 @@
|
|||
duration: 1000
|
||||
})
|
||||
} else if (this.onlineStatus == 1) {
|
||||
this.zhifuflag = false
|
||||
let that = this
|
||||
let data = {
|
||||
deviceNo: that.id,
|
||||
|
@ -376,39 +395,53 @@
|
|||
that.$u.post('/app/bill/recharge', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
that.orderno = res.data
|
||||
that.$u.get(`/app/pay/wx/${that.orderno}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: res.data.timeStamp,
|
||||
nonceStr: res.data.nonceStr,
|
||||
package: res.data.packageVal,
|
||||
signType: res.data.signType,
|
||||
paySign: res.data.paySign,
|
||||
success: (res) => {
|
||||
console.log(res, '支付成功');
|
||||
if (that.timer) {
|
||||
clearInterval(this.timer);
|
||||
that.timer = null;
|
||||
}
|
||||
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(res => {})
|
||||
// 支付成功逻辑
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
console.log(this.prices);
|
||||
if(this.prices == 0){
|
||||
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(res => {})
|
||||
// 支付成功逻辑
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
}else{
|
||||
console.log('不是0元购');
|
||||
that.$u.get(`/app/pay/wx/${that.orderno}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: res.data.timeStamp,
|
||||
nonceStr: res.data.nonceStr,
|
||||
package: res.data.packageVal,
|
||||
signType: res.data.signType,
|
||||
paySign: res.data.paySign,
|
||||
success: (res) => {
|
||||
this.zhifuflag = true
|
||||
console.log(res, '支付成功');
|
||||
if (that.timer) {
|
||||
clearInterval(this.timer);
|
||||
that.timer = null;
|
||||
}
|
||||
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(res => {})
|
||||
// 支付成功逻辑
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
this.zhifuflag = true
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
x
|
||||
} else if (res.code == 401) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
|
@ -451,7 +484,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
this.zhifuflag = false
|
||||
let that = this
|
||||
let data = {
|
||||
deviceNo: that.id,
|
||||
|
@ -463,81 +496,128 @@
|
|||
that.$u.post('/app/bill/recharge', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
that.orderno = res.data
|
||||
that.$u.get(`/app/pay/wx/${that.orderno}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: res.data.timeStamp,
|
||||
nonceStr: res.data.nonceStr,
|
||||
package: res.data.packageVal,
|
||||
signType: res.data.signType,
|
||||
paySign: res.data.paySign,
|
||||
success: (res) => {
|
||||
// console.log(res, '支付成功');
|
||||
if (that.timer) {
|
||||
clearInterval(this.timer);
|
||||
that.timer = null;
|
||||
}
|
||||
|
||||
// 111111111111111111111111
|
||||
that.$u.get('/app/bill/recharge/device/fail/list').then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log('获取订单状态',res);
|
||||
let dingobj = res.data[0].billNo
|
||||
console.log(dingobj,'订单号');
|
||||
uni.getNetworkType({
|
||||
if(this.prices == 0){
|
||||
that.$u.get('/app/bill/recharge/device/fail/list').then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log('获取订单状态',res);
|
||||
let dingobj = res.data[0].billNo
|
||||
console.log(dingobj,'订单号');
|
||||
uni.getNetworkType({
|
||||
success(res) {
|
||||
if (res.networkType !== 'none') {
|
||||
uni.getConnectedBluetoothDevices({
|
||||
success(res) {
|
||||
if (res.networkType !== 'none') {
|
||||
uni.getConnectedBluetoothDevices({
|
||||
success(res) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "time@" + that.jine
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.error('获取已连接蓝牙设备信息失败:',err)
|
||||
}
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "time@" + that.jine
|
||||
})
|
||||
that.$u.get(`/app/bill/recharge/${dingobj}/bluetoothSuccess`).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log('蓝牙离线充值成功')
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('手机未连接网络')
|
||||
// this.baiflag = false
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.error('获取已连接蓝牙设备信息失败:',err)
|
||||
}
|
||||
})
|
||||
that.$u.get(`/app/bill/recharge/${dingobj}/bluetoothSuccess`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.zhifuflag = true
|
||||
console.log('蓝牙离线充值成功')
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('手机未连接网络')
|
||||
// this.baiflag = false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// 11111111111111111111111
|
||||
|
||||
// 支付成功逻辑
|
||||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
setTimeout(() => {
|
||||
this.czflag = false
|
||||
uni.hideLoading()
|
||||
}, 500)
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
// 11111111111111111111111
|
||||
// 支付成功逻辑
|
||||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
}else{
|
||||
that.$u.get(`/app/pay/wx/${that.orderno}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: res.data.timeStamp,
|
||||
nonceStr: res.data.nonceStr,
|
||||
package: res.data.packageVal,
|
||||
signType: res.data.signType,
|
||||
paySign: res.data.paySign,
|
||||
success: (res) => {
|
||||
// console.log(res, '支付成功');
|
||||
if (that.timer) {
|
||||
clearInterval(this.timer);
|
||||
that.timer = null;
|
||||
}
|
||||
|
||||
// 111111111111111111111111
|
||||
that.$u.get(`/app/pay/result/${this.orderno}`).then(res =>{
|
||||
if(res.code == 200){
|
||||
that.$u.get('/app/bill/recharge/device/fail/list').then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log('获取订单状态',res);
|
||||
let dingobj = res.data[0].billNo
|
||||
console.log(dingobj,'订单号');
|
||||
uni.getNetworkType({
|
||||
success(res) {
|
||||
if (res.networkType !== 'none') {
|
||||
uni.getConnectedBluetoothDevices({
|
||||
success(res) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "time@" + that.jine
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.error('获取已连接蓝牙设备信息失败:',err)
|
||||
}
|
||||
})
|
||||
that.$u.get(`/app/bill/recharge/${dingobj}/bluetoothSuccess`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.zhifuflag = true
|
||||
console.log('蓝牙离线充值成功')
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('手机未连接网络')
|
||||
// this.baiflag = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 支付成功逻辑
|
||||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
this.zhifuflag = true
|
||||
setTimeout(() => {
|
||||
this.czflag = false
|
||||
uni.hideLoading()
|
||||
}, 500)
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else if (res.code == 401) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
|
@ -552,6 +632,8 @@
|
|||
},
|
||||
//选择套餐
|
||||
btnactive(item) {
|
||||
this.zhifuflag = true
|
||||
this.prices = item.price
|
||||
this.sytime = item.value
|
||||
this.zfobj = item
|
||||
this.indexactive = item.suitId
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
height='50'></u-navbar>
|
||||
|
||||
<view class="box" v-if="loading">
|
||||
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in list" :key="item.suitId" @click="click(item)" @open="open" :options="options">
|
||||
|
||||
<!-- <u-swipe-action :show="item.show" :index="index" v-for="(item, index) in list" :key="item.suitId" @click="click(item)" @open="open" :options="options">
|
||||
<view class="boxlist" @click="btnedit(item)">
|
||||
<view class="toptime">
|
||||
<text>{{item.name.length > 5 ? item.name.substring(0,4) + '...' : item.name}}(通电时长:{{item.value}} <text v-if="item.timeUnit == 1">日</text> <text v-if="item.timeUnit == 2">时</text> <text v-if="item.timeUnit == 3">分钟</text> <text v-if="item.timeUnit == 4">秒</text> )</text> <text>¥{{item.price}}</text>
|
||||
|
@ -13,7 +14,14 @@
|
|||
<text class="shi">{{item.description.length > 20 ? item.description.substring(0, 20) + '...' : item.description}}</text></text>
|
||||
</view>
|
||||
</view>
|
||||
</u-swipe-action>
|
||||
</u-swipe-action> -->
|
||||
|
||||
<HM-dragSorts ref="dragSorts" :list="newobj" :tcidlist="tcidlist"
|
||||
@update:tcidlist="handleTcidlistUpdate" :autoScroll="true" :feedbackGenerator="false"
|
||||
@newList="handleNewList" rowHeight='50' @change="change" @confirm="confirm" @onclick="onclick"
|
||||
:listBackgroundColor='F7FAFE'></HM-dragSorts>
|
||||
|
||||
|
||||
<view class="" v-if="list.length == 0" style="color: #ccc;font-size: 36rpx;margin-top: 200rpx;text-align: center;">
|
||||
该设备暂无套餐
|
||||
</view>
|
||||
|
@ -23,12 +31,18 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dragSorts from '@/page_components/HM-dragSorts/HM-dragSorts.vue'
|
||||
export default {
|
||||
components: {
|
||||
'HM-dragSorts': dragSorts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
|
@ -46,6 +60,8 @@
|
|||
bgc: {
|
||||
backgroundColor: "#8883f0",
|
||||
},
|
||||
newobj:[],
|
||||
tcidlist:''
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -53,6 +69,9 @@
|
|||
this.deviceId = option.id
|
||||
},
|
||||
onShow() {
|
||||
this.tcidlist = []
|
||||
this.list = []
|
||||
this.newobj = []
|
||||
this.getlist()
|
||||
},
|
||||
// 分享到好友(会话)
|
||||
|
@ -72,6 +91,34 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
handleTcidlistUpdate(newTcidlist) {
|
||||
// 这里是处理接收到的新 tcidlist 的地方
|
||||
// console.log('接收到的 tcidlist:', newTcidlist);
|
||||
this.tcidlist = newTcidlist
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/statulist/taocanlist/addtaocan/index?id=' + this.deviceId + '&suitId=' + this.tcidlist.suitId
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleNewList(newList) {
|
||||
let list = [this.list, ...newList]
|
||||
const newSortedList = list.map((item, index) => {
|
||||
return {
|
||||
suitId: item.suitId,
|
||||
sort: index + 1 // 使用索引值加 1 作为 groupSort
|
||||
}
|
||||
})
|
||||
let filteredArr = newSortedList.filter(item => item.suitId !== undefined)
|
||||
console.log("新的排列数据:", filteredArr)
|
||||
setTimeout(() => {
|
||||
this.$u.put("/app/suit/sort", filteredArr).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// this.getgroup()
|
||||
}
|
||||
});
|
||||
}, 200)
|
||||
},
|
||||
|
||||
getlist() {
|
||||
let data = {
|
||||
|
@ -81,23 +128,25 @@
|
|||
this.$u.get(`/app/suit/tempList`, data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.list = res.rows
|
||||
|
||||
this.loading = true
|
||||
this.list = this.list.map(item => ({
|
||||
...item,
|
||||
checked: false,
|
||||
isActive: false
|
||||
}))
|
||||
// this.list = this.list.map(item => ({
|
||||
// ...item,
|
||||
// checked: false,
|
||||
// isActive: false
|
||||
// }))
|
||||
this.newobj = this.list
|
||||
console.log(this.list);
|
||||
this.loading = true
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
btnedit(item){
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/statulist/taocanlist/addtaocan/index?id=' + this.deviceId + '&suitId=' + item.suitId
|
||||
})
|
||||
},
|
||||
// btnedit(item){
|
||||
// uni.navigateTo({
|
||||
// url:'/page_fenbao/statulist/taocanlist/addtaocan/index?id=' + this.deviceId + '&suitId=' + item.suitId
|
||||
// })
|
||||
// },
|
||||
|
||||
click(item) {
|
||||
this.$u.delete(`/app/suit/${item.suitId}`).then((res) => {
|
||||
|
@ -124,12 +173,29 @@
|
|||
uni.navigateTo({
|
||||
url:'/page_fenbao/statulist/taocanlist/addtaocan/index?id=' + this.deviceId
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
change() {
|
||||
|
||||
},
|
||||
confirm(e) {
|
||||
|
||||
},
|
||||
onclick(e) {
|
||||
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-swipe-del{
|
||||
height: 140rpx !important;
|
||||
}
|
||||
/deep/ .u-swipe-action{
|
||||
height: 140rpx !important;
|
||||
}
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 22rpx;
|
||||
}
|
||||
|
@ -174,7 +240,7 @@
|
|||
}
|
||||
|
||||
.boxlist{
|
||||
padding: 40rpx 42rpx;
|
||||
padding: 20rpx 42rpx;
|
||||
box-sizing: border-box;
|
||||
.toptime{
|
||||
font-size: 32rpx;
|
||||
|
|
|
@ -7,16 +7,34 @@
|
|||
<!-- 内容 v-if="false"-->
|
||||
<view class="row-content">
|
||||
<view class="row" :style="{'height': rowHeight+'px'}">
|
||||
<image v-if="shadowRow.icon" class="icon" :src="shadowRow.icon"></image>
|
||||
<text class="text">{{shadowRow.name}}</text>
|
||||
<!-- <image v-if="shadowRow.icon" class="icon" :src="shadowRow.icon"></image> -->
|
||||
<view class="" style="display: flex;justify-content: space-between;">
|
||||
<text style="margin-top:15rpx" class="text">{{shadowRow.name}}</text>
|
||||
<text style="margin-top:15rpx" >
|
||||
(通电时长:{{shadowRow.value}}
|
||||
<text v-if="shadowRow.timeUnit == 1">日</text>
|
||||
<text v-if="shadowRow.timeUnit == 2">时</text>
|
||||
<text v-if="shadowRow.timeUnit == 3">分钟</text>
|
||||
<text v-if="shadowRow.timeUnit == 4">秒</text>
|
||||
)</text>
|
||||
<text style="margin-top:15rpx" >¥{{shadowRow.price}}</text>
|
||||
</view>
|
||||
<view class="ccc" style="display: block;">
|
||||
<view class="bumday" v-if="shadowRow.description == null">
|
||||
<text class="shi"></text></text>
|
||||
</view>
|
||||
<view class="bumday" v-else>
|
||||
<text>{{shadowRow.description.length > 20 ? shadowRow.description.substring(0, 20) + '...' : shadowRow.description}}</text></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 拖拽图标 -->
|
||||
<view class="drag-content">
|
||||
<!-- <view class="drag-content">
|
||||
<view class="drag-icon" :style="{'height': rowHeight+'px'}">
|
||||
<text class="iconfont icon-drag"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -823,8 +841,7 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
// overflow: hidden;
|
||||
.scroll-view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
@ -832,13 +849,13 @@
|
|||
.rowBox,
|
||||
.rowBox-shadow {
|
||||
width: 100%;
|
||||
|
||||
.hm-row-shadow,
|
||||
.hm-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
|
||||
// padding-top: 20rpx;
|
||||
// box-sizing: border-box;
|
||||
.modules {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
@ -849,12 +866,12 @@
|
|||
.row-content {
|
||||
width: 100%;
|
||||
flex-shrink: 1;
|
||||
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
padding-left: 12px;
|
||||
|
||||
padding-right: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.icon {
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
<u-icon name="file-text" color="#8883F0" size="50"></u-icon>
|
||||
<textarea name="" placeholder="详细输入您想了解的信息" id="" v-model="cont" cols="30" rows="10"></textarea>
|
||||
</view>
|
||||
<view class="" style="width: 100%;text-align: center;color: red;font-size: 28rpx;margin-top: 20rpx;">
|
||||
请填写真实信息,感谢您的配合!
|
||||
</view>
|
||||
|
||||
<view class="tijiao" @click="btnshenq">
|
||||
提交申请
|
||||
|
|
|
@ -4,38 +4,69 @@
|
|||
title-size='36' height='50'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="list">
|
||||
<view class="" style="display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
align-items: center;margin-top: 30rpx;">
|
||||
<view class="title">
|
||||
套餐名称
|
||||
</view>
|
||||
<input type="text" v-model="name" placeholder="输入套餐名称" />
|
||||
</view>
|
||||
<view class="" style="display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
align-items: center;margin-top: 30rpx;">
|
||||
<view class="title">
|
||||
价格(元)
|
||||
</view>
|
||||
<input type="text" v-model="price" placeholder="输入价格" />
|
||||
</view>
|
||||
<view class="" style="display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
align-items: center;margin-top: 30rpx;">
|
||||
<view class="title">
|
||||
套餐名称
|
||||
</view>
|
||||
<input type="text" v-model="name" placeholder="输入套餐名称" />
|
||||
<view class="title" style="margin-top: 50rpx;">
|
||||
价格(元)
|
||||
</view>
|
||||
<input type="text" v-model="price" placeholder="输入价格" />
|
||||
<view class="title" style="margin-top: 50rpx;">
|
||||
通电时长
|
||||
</view>
|
||||
<view class="" style="display: flex;justify-content: space-between;position: relative;">
|
||||
<input style="width: 80%;" type="number" v-model="value" placeholder="输入通电时长" />
|
||||
<!-- <picker style="margin-top: 24rpx;border: 1px solid;padding: 5rpx 10rpx;border-radius: 10rpx;height: 40rpx;" mode="selector" :range="array" @change="bindPickerChange"> -->
|
||||
<view class="picker" @click="btnxz">
|
||||
{{array[index]}} <u-icon v-if="arrflag" name="arrow-down" color="#000" size="24"></u-icon> <u-icon v-else name="arrow-right" color="#000" size="24"></u-icon>
|
||||
<input type="number" v-model="value" placeholder="输入通电时长" />
|
||||
<view class="picker" @click="btnxz">
|
||||
{{array[index]}} <u-icon v-if="arrflag" name="arrow-down" color="#000" size="24"></u-icon>
|
||||
<u-icon v-else name="arrow-right" color="#000" size="24"></u-icon>
|
||||
</view>
|
||||
<view class="arr_list" v-if="arrflag">
|
||||
<view class="arr_item" v-for="(item,index) in array" :key="index" @click="btnxl(index)">
|
||||
{{item}}
|
||||
</view>
|
||||
<view class="arr_list" v-if="arrflag">
|
||||
<view class="arr_item" v-for="(item,index) in array" :key="index" @click="btnxl(index)">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- </picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="title" style="margin-top: 50rpx;margin-bottom: 20rpx;">
|
||||
</view>
|
||||
<view class="title" style="margin-top: 30rpx;margin-bottom: 20rpx;">
|
||||
详细说明
|
||||
</view>
|
||||
<textarea v-model="description" placeholder="输入说明解释" auto-height="true" />
|
||||
</view>
|
||||
|
||||
<!-- 应用设备 -->
|
||||
<!-- <view class="shebei">
|
||||
<view class="sbtit">应用设备</view>
|
||||
<view class="sbarr">
|
||||
<view class="sbarrval" v-for="(item,index) in 5" :key="index">
|
||||
扫码开关
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnsbadd" @click="btnaddsb">
|
||||
+
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="trues" @click="btnadd">
|
||||
{{title}}
|
||||
</view>
|
||||
<view v-if="title == '修改'" class="truess" @click="btndel">
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
@ -54,8 +85,11 @@
|
|||
suitId: '',
|
||||
array: ['天', '时', '分钟', '秒'],
|
||||
index: 2,
|
||||
timewz:'',
|
||||
arrflag:false
|
||||
timewz: '',
|
||||
arrflag: false,
|
||||
bgc: {
|
||||
backgroundColor: "#8883f0",
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -70,33 +104,39 @@
|
|||
}
|
||||
},
|
||||
// 分享到好友(会话)
|
||||
onShareAppMessage: function () {
|
||||
return {
|
||||
title: '创想物联',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function () {
|
||||
return {
|
||||
title: '创想物联',
|
||||
query: '',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: '创想物联',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function() {
|
||||
return {
|
||||
title: '创想物联',
|
||||
query: '',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// bindPickerChange(e) {
|
||||
// this.index = e.detail.value
|
||||
// },
|
||||
btnxl(index){
|
||||
// 跳转选择设备
|
||||
btnaddsb(){
|
||||
uni.navigateTo({
|
||||
url:'/page_components/shebeixz'
|
||||
})
|
||||
},
|
||||
btnxl(index) {
|
||||
this.index = index
|
||||
this.arrflag = false
|
||||
},
|
||||
btnxz(){
|
||||
if(this.arrflag == true){
|
||||
btnxz() {
|
||||
if (this.arrflag == true) {
|
||||
this.arrflag = false
|
||||
}else{
|
||||
} else {
|
||||
this.arrflag = true
|
||||
}
|
||||
},
|
||||
|
@ -112,6 +152,26 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
btndel() {
|
||||
this.$u.delete(`/app/suit/${this.suitId}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
btnadd() {
|
||||
let regex = /^\d+(\.\d{1,2})?$/
|
||||
|
@ -160,7 +220,7 @@
|
|||
value: this.value,
|
||||
price: this.price,
|
||||
description: this.description,
|
||||
timeUnit:Number(this.index) + 1
|
||||
timeUnit: Number(this.index) + 1
|
||||
}
|
||||
this.$u.post('/app/suit', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -182,7 +242,7 @@
|
|||
value: this.value,
|
||||
price: this.price,
|
||||
description: this.description,
|
||||
timeUnit:Number(this.index) + 1
|
||||
timeUnit: Number(this.index) + 1
|
||||
}
|
||||
this.$u.put('/app/suit', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -218,47 +278,107 @@
|
|||
padding-bottom: 22rpx;
|
||||
}
|
||||
|
||||
.shebei {
|
||||
width: 654rpx;
|
||||
max-height: 100%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
|
||||
-webkit-filter: blur(0px);
|
||||
filter: blur(0px);
|
||||
margin: auto;
|
||||
border-radius: 30rpx;
|
||||
padding: 28rpx 38rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 150rpx;
|
||||
|
||||
.sbtit {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sbarr{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
.sbarrval{
|
||||
width: 48%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background-color: #8883F0;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
.btnsbadd{
|
||||
width: 48%;
|
||||
height: 80rpx;
|
||||
line-height: 70rpx;
|
||||
background-color: #8883F0;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 65rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
.arr_list{
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
.arr_list {
|
||||
position: absolute;
|
||||
top: 80rpx;
|
||||
top: 50rpx;
|
||||
right: -20rpx;
|
||||
background: #FFFFFF;
|
||||
width: 140rpx;
|
||||
height:320rpx;
|
||||
height: 245rpx;
|
||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
|
||||
padding: 5rpx 0;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
z-index: 99;
|
||||
.arr_item:last-child{
|
||||
opacity: 0;
|
||||
animation-name: fadeIn;
|
||||
animation-duration: .5s;
|
||||
animation-fill-mode: forwards;
|
||||
.arr_item:last-child {
|
||||
border: none !important;
|
||||
}
|
||||
.arr_item{
|
||||
|
||||
.arr_item {
|
||||
text-align: center;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-bottom:1px solid #ccc;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
.picker{
|
||||
margin-top: 30rpx;
|
||||
|
||||
.picker {
|
||||
// margin-top: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-top: 32rpx;
|
||||
|
||||
padding-bottom: 400rpx;
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
overflow: scroll;
|
||||
overflow: hidden;
|
||||
.list {
|
||||
width: 654rpx;
|
||||
max-height: 100%;
|
||||
|
@ -267,7 +387,7 @@
|
|||
filter: blur(0px);
|
||||
margin: auto;
|
||||
border-radius: 30rpx;
|
||||
padding: 48rpx 38rpx;
|
||||
padding: 15rpx 38rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
|
@ -277,12 +397,14 @@
|
|||
}
|
||||
|
||||
input {
|
||||
margin-top: 30rpx;
|
||||
// margin-top: 30rpx;
|
||||
// padding-left: 100rpx;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.trues {
|
||||
width: 590rpx;
|
||||
width: 290rpx;
|
||||
height: 84rpx;
|
||||
background: #8883F0;
|
||||
filter: blur(0px);
|
||||
|
@ -290,7 +412,23 @@
|
|||
line-height: 84rpx;
|
||||
position: fixed;
|
||||
bottom: 76rpx;
|
||||
left: 50%;
|
||||
left: 75%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.truess {
|
||||
width: 290rpx;
|
||||
height: 84rpx;
|
||||
background: red;
|
||||
filter: blur(0px);
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
position: fixed;
|
||||
bottom: 76rpx;
|
||||
right: 33%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="jlflag" class="" style="font-size: 28rpx;color: red;margin-top: 30rpx;width: 100%;text-align: center;">-没有更多记录了-</view>
|
||||
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
|
||||
<image style="width: 200rpx;height: 200rpx;"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
|
||||
|
@ -59,7 +60,8 @@
|
|||
noMoreData: false, // 是否没有更多数据
|
||||
total: 0,
|
||||
deviceId:'',
|
||||
showflag:false
|
||||
showflag:false,
|
||||
jlflag:false
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -109,11 +111,7 @@
|
|||
if (this.pagenum-1 < sum) {
|
||||
this.getlist(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有更多订单记录了',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
this.jlflag = true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -99,13 +99,7 @@
|
|||
</view>
|
||||
<view class="bot">归零</view>
|
||||
</view>
|
||||
<view class="cont" @click="topage(2)">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ue0X00T1C3fh7TCgjopm" mode=""
|
||||
style="width: 58rpx;height: 60rpx;"></image>
|
||||
</view>
|
||||
<view class="bot">异常</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="cont" style="width: 120rpx;" @click="toydfx()">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uDVSE5BFHQnjG2JTVE62" mode="">
|
||||
|
@ -119,22 +113,22 @@
|
|||
</view>
|
||||
<view class="bot">充值</view>
|
||||
</view>
|
||||
<view class="cont" @click="topage(2)">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ue0X00T1C3fh7TCgjopm" mode=""
|
||||
style="width: 58rpx;height: 60rpx;"></image>
|
||||
</view>
|
||||
<view class="bot">异常</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;margin-top: 20rpx;">
|
||||
<view class="cont" @click="topage(3)">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/umjPUc8nDKf1JwVqRAeb" mode=""
|
||||
style="width: 58rpx;height: 60rpx;"></image>
|
||||
style="width: 50rpx;height: 60rpx;"></image>
|
||||
</view>
|
||||
<view class="bot" style="margin-top: 10rpx;">收费方式</view>
|
||||
</view>
|
||||
<view class="cont" @click="topage(4)">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u2Uco0iXf8aure0H2ihz" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="bot">设置</view>
|
||||
</view>
|
||||
<view class="cont" @click="topage(5)">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uik9veDG6pMVG5M1Vxze" mode="">
|
||||
|
@ -142,6 +136,13 @@
|
|||
</view>
|
||||
<view class="bot">配网</view>
|
||||
</view>
|
||||
<view class="cont" @click="topage(4)">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u2Uco0iXf8aure0H2ihz" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="bot">设置</view>
|
||||
</view>
|
||||
|
||||
<view class="cont" @click="btnkq">
|
||||
<view class="top">
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
|
||||
<view class="cards" v-for="(item,index) in wateringList" :key="index" @click="btndetail(item.billId)" @scrolltolower="onReachBottom">
|
||||
<view class="card_left">
|
||||
<view class="top" v-if="item.type == 1">用户充值</view>
|
||||
<view class="top" v-if="item.type == 2">商户提现</view>
|
||||
<view class="top" v-if="item.type == 1">用户充值{{item.userName}}</view>
|
||||
<view class="top" v-if="item.type == 2">商户提现{{item.userName}}</view>
|
||||
<view class="bot">
|
||||
{{item.createTime}}
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<view class="top" v-if="item.type == 1">{{item.suitTime}}分钟</view>
|
||||
<view class="top" v-if="item.type == 1">{{item.suitTime}}<text v-if="item.timeUnit == 1">日</text> <text v-if="item.timeUnit == 2">时</text> <text v-if="item.timeUnit == 3">分钟</text> <text v-if="item.timeUnit == 4">秒</text></view>
|
||||
<view class="bot">
|
||||
¥{{item.money}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="jlflag" class="" style="font-size: 28rpx;color: red;margin-top: 30rpx;width: 100%;text-align: center;">-没有更多记录了-</view>
|
||||
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
|
||||
<image style="width: 200rpx;height: 200rpx;"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
|
||||
|
@ -48,7 +48,8 @@
|
|||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
total: 0,
|
||||
showflag: false
|
||||
showflag: false,
|
||||
jlflag:false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -73,7 +74,7 @@
|
|||
methods: {
|
||||
// 请求收支列表
|
||||
getList(){
|
||||
this.$u.get("/app/bill/list").then((res) => {
|
||||
this.$u.get(`/app/bill/incomeList?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (this.total > 0) {
|
||||
|
@ -98,11 +99,12 @@
|
|||
if (this.pagenum-1 < sum) {
|
||||
this.getList(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有更多收支明细记录了',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
this.jlflag = true
|
||||
// uni.showToast({
|
||||
// title: '没有更多收支明细记录了',
|
||||
// icon: 'none',
|
||||
// duration: 1000
|
||||
// });
|
||||
}
|
||||
},
|
||||
// 点击查询收支详情
|
||||
|
|
|
@ -1,48 +1,26 @@
|
|||
<template>
|
||||
<view class="pages">
|
||||
<u-navbar title="设备列表" :border-bottom="false" :background="bgc" title-color='#262B37' title-size='36' height='36'></u-navbar>
|
||||
<view class="titleadd">
|
||||
<view class="title"> 点击切换设备 </view>
|
||||
<view class="add" @click="show=true"> + </view>
|
||||
</view>
|
||||
<view class="dd">
|
||||
<u-select v-model="show" :list="list" title='添加方式' @confirm="confirm"></u-select>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="card_box" v-for="(item,index) in deviceList" :key="index" @click="todetail(item.deviceId)">
|
||||
<view class="card">
|
||||
<view class="card_right">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uoQO0pUZ1UHcW5uVKkuR" mode=""></image>
|
||||
</view>
|
||||
<view class="card_left">
|
||||
<view class="card_left_tit">
|
||||
{{item.deviceId}}电表
|
||||
</view>
|
||||
<view class="card_left_sta">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uZSiz7XWpxcXEkl6sTwj" mode=""></image>
|
||||
<view class="sta_txt" v-if="item.status==3">
|
||||
剩余电量:{{item.surplusElectriQuantity}}度
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==2" style="color:#95989D ;">
|
||||
已欠费
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==1" style="color:#FF4F4F ;">
|
||||
欠费已断电
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_left_no">
|
||||
电表号:{{item.mac}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="nowuse" v-if="item.isDefault">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uv8toN3gFm0IDcjfsdH2" mode=""></image>
|
||||
</view>
|
||||
<view class="switch" v-else @click="changedefort(item)" >
|
||||
切换
|
||||
</view>
|
||||
</view>
|
||||
<u-navbar title="订单管理" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
|
||||
title-size='36' height='50'></u-navbar>
|
||||
<view class="time">
|
||||
<view class="timetit">
|
||||
时间范围
|
||||
</view>
|
||||
<view class="timert">
|
||||
<view class="xztime"></view> - <view class="xztime"></view>
|
||||
<view class="qinc">×</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="serch">
|
||||
<input type="text" placeholder="请输入SN码或手机号" />
|
||||
<view class="">搜索</view>
|
||||
</view>
|
||||
|
||||
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -51,215 +29,131 @@
|
|||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
backgroundColor: "#F7FAFE",
|
||||
backgroundColor: "#8883F0",
|
||||
},
|
||||
show:false,
|
||||
deviceList:{},
|
||||
list: [{
|
||||
value: '1',
|
||||
label: '扫码添加'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '搜索附近设备添加'
|
||||
}
|
||||
],
|
||||
name: '待收货'
|
||||
}, {
|
||||
name: '待付款'
|
||||
}, {
|
||||
name: '待评价',
|
||||
}],
|
||||
current: 0
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getdevice()
|
||||
|
||||
},
|
||||
// 分享到好友(会话)
|
||||
onShareAppMessage: function () {
|
||||
return {
|
||||
title: '创想物联',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function () {
|
||||
return {
|
||||
title: '创想物联',
|
||||
query: '',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirm(e){
|
||||
console.log(e,'eeeeeeeeee');
|
||||
let type =e[0].value
|
||||
if(type=='1'){
|
||||
this.scanQRCode()
|
||||
}else if(type=='2'){
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/device/index'
|
||||
})
|
||||
}
|
||||
// console.log(e);
|
||||
// this.mode = e[0].label
|
||||
// this.gettype()
|
||||
},
|
||||
getdevice() {
|
||||
this.$u.get("/app/device/tenant").then((res) => {
|
||||
this.deviceList = res.rows
|
||||
// uni.setStorageSync('deviceId', this.deviceInfo.deviceId);
|
||||
});
|
||||
},
|
||||
changedefort(item){
|
||||
this.$u.put("/app/device/tenant/setDefault/"+item.deviceId).then((res) => {
|
||||
this.getdevice()
|
||||
// uni.setStorageSync('deviceId', this.deviceInfo.deviceId);
|
||||
|
||||
});
|
||||
},
|
||||
scanQRCode() {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
function getQueryParam(url, paramName) {
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||
let results = regex.exec(url);
|
||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||
}
|
||||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
this.qrResult = getQueryParam(decodedValue, 's')
|
||||
// this.qrResult = res.result; // 将扫描结果存储在数据中
|
||||
},
|
||||
fail: err => {
|
||||
console.error('扫描失败:', err);
|
||||
uni.showToast({
|
||||
title: '扫描失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: '创想物联',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function() {
|
||||
return {
|
||||
title: '创想物联',
|
||||
query: '',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(index) {
|
||||
this.current = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title {
|
||||
padding-bottom: 22rpx;
|
||||
}
|
||||
|
||||
/deep/ .u-icon__icon {
|
||||
padding-bottom: 22rpx;
|
||||
}
|
||||
|
||||
.serch {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// margin-top: 30rpx;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
// margin-bottom: 30rpx;
|
||||
height: 120rpx;
|
||||
background-color: #fff;
|
||||
input {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding-left: 50rpx;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
width: 170rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background-color: #8883F0;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// margin-top: 50rpx;
|
||||
height: 110rpx;
|
||||
padding-top: 40rpx !important;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
.timetit {
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.timert {
|
||||
display: flex;
|
||||
line-height: 60rpx;
|
||||
justify-content: space-between;
|
||||
|
||||
.xztime {
|
||||
width: 200rpx;
|
||||
height: 60rpx;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
margin-left: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.qinc {
|
||||
font-size: 50rpx;
|
||||
color: #ccc;
|
||||
width: 80rpx;
|
||||
height: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #F7FAFE !important;
|
||||
}
|
||||
|
||||
.pages {
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
// padding: 0 40rpx;
|
||||
// box-sizing: border-box;
|
||||
}
|
||||
.titleadd{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 12rpx;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.add{
|
||||
font-size: 68rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
.card_box {
|
||||
margin-top: 34rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
margin-top: 20rpx;
|
||||
width: 658rpx;
|
||||
height: 282rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(255, 255, 255, 0);
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.card_left {
|
||||
width: 310rpx;
|
||||
margin-top: 46rpx;
|
||||
margin-left: 50rpx;
|
||||
|
||||
.card_left_tit {
|
||||
font-size: 44rpx;
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 500;
|
||||
color: #8883F0;
|
||||
}
|
||||
|
||||
.card_left_sta {
|
||||
|
||||
margin-top: 15rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 23.32rpx;
|
||||
height: 36.47rpx;
|
||||
|
||||
}
|
||||
|
||||
.sta_txt {
|
||||
margin-left: 15rpx;
|
||||
color: #262B37;
|
||||
font-size: 24rpx;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.card_left_no {
|
||||
margin-top: 15rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 400;
|
||||
color: #95989D;
|
||||
}
|
||||
}
|
||||
|
||||
.card_right {
|
||||
margin-top: 60rpx;
|
||||
margin-left: 50rpx;
|
||||
// margin-right: 94rpx;
|
||||
|
||||
image {
|
||||
width: 63.04rpx;
|
||||
height: 167.48rpx;
|
||||
}
|
||||
}
|
||||
.nowuse{
|
||||
margin-top: 68rpx;
|
||||
image{
|
||||
width: 124rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
.switch{
|
||||
margin-top: 116rpx;
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 108rpx;
|
||||
height: 60rpx;
|
||||
background: rgba(255,255,255,0);
|
||||
border: 2rpx solid #8883F0;
|
||||
border-radius: 20rpx;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #8883F0;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -2,11 +2,6 @@
|
|||
<view class="pages">
|
||||
<u-navbar title="提现记录" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
|
||||
height='50'></u-navbar>
|
||||
|
||||
<!-- <view class="tops">
|
||||
<view class="tit">提现记录</view>
|
||||
<view class="more">更多</view>
|
||||
</view> -->
|
||||
<view class="cards" v-for="(item,index) in list" :key="index">
|
||||
<view class="card_left">
|
||||
<view class="top">成功提现</view>
|
||||
|
@ -17,13 +12,10 @@
|
|||
<view class="card_right">
|
||||
<view class="top">-{{item.money}}元</view>
|
||||
<view class="bot">
|
||||
<!-- ¥{{item.money}} -->
|
||||
剩余金额 {{item.afterBalance}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="btn">
|
||||
电费充值
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
|
@ -148,7 +140,7 @@
|
|||
text-align: right;
|
||||
|
||||
.top {
|
||||
margin-top: 12rpx;
|
||||
// margin-top: 12rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||
font-weight: 400;
|
||||
|
|
|
@ -11,10 +11,13 @@
|
|||
<view class="tip">累计提现:{{userinfo.withDrawlAmount}}</view>
|
||||
</view>
|
||||
<view class="tit">
|
||||
<view class="tit_line">
|
||||
|
||||
<view class="" style="display: flex;">
|
||||
<view class="tit_line" style="margin-top: 4rpx;"></view>
|
||||
余额提现
|
||||
</view>
|
||||
<view class="" style="color: #8883f0;" @click="btntxrecord">
|
||||
提现明细
|
||||
</view>
|
||||
余额提现
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<view class="yuan">
|
||||
|
@ -28,10 +31,12 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="tit">
|
||||
<view class="tit_line">
|
||||
|
||||
<view class="" style="display: flex;">
|
||||
<view class="tit_line" style="margin-top: 4rpx;">
|
||||
|
||||
</view>
|
||||
提现方式
|
||||
</view>
|
||||
提现方式
|
||||
</view>
|
||||
<view class="pay_type">
|
||||
<view class="type_box" @click="pay(0,'1')">
|
||||
|
@ -115,6 +120,12 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 跳转到提现记录
|
||||
btntxrecord(){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/txrecord'
|
||||
})
|
||||
},
|
||||
getinfo(){
|
||||
this.$u.get('/app/account' ).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -234,6 +245,9 @@
|
|||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
line-height: 38rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
.tit_line{
|
||||
margin-right: 12rpx;
|
||||
width: 4rpx;
|
||||
|
|
10
pages.json
10
pages.json
|
@ -498,6 +498,16 @@
|
|||
"navigationBarTextStyle": "#FFFFFF",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shebeixz",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加设备",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#3996FD",
|
||||
"navigationBarTextStyle": "#FFFFFF",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/uyr6T0Vfkefty2blkDmU" mode=""
|
||||
style="width: 52rpx;height: 52rpx;margin-right: 10rpx;vertical-align: bottom;vertical-align: bottom;"
|
||||
@click="btnshouye"></image>
|
||||
<text>商户中心</text>
|
||||
<text>店铺</text>
|
||||
</view>
|
||||
|
||||
<u-mask :show="showtip" @click="show = false" :z-index='1000' />
|
||||
|
@ -28,6 +28,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="fd">
|
||||
<!-- 刷新动画 -->
|
||||
<view class="shuaxin" v-if="shuaxin">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uoJ3GHWs14BwXetAlZTW" mode=""></image>
|
||||
<!-- <view class="">努力刷新中</view> -->
|
||||
</view>
|
||||
<view class="fd_top">
|
||||
<view class="fd_da">
|
||||
<view class="fd_lt"
|
||||
|
@ -47,6 +52,7 @@
|
|||
|
||||
</view>
|
||||
<u-mask :show="showfz" @click="showfz=false"></u-mask>
|
||||
|
||||
<view class="fz" v-show="showfz">
|
||||
<view class="fz_top">
|
||||
<view class="iconfont icon-shanchu" @click="showfz=false">
|
||||
|
@ -61,7 +67,7 @@
|
|||
</view>
|
||||
<view class="card_cont">
|
||||
<view class="cards" v-for="(item,index) in groupLists" :key="index">
|
||||
<!-- //@click="changeGp(item)" -->
|
||||
<!-- //@click="changeGp(item)" groupLists -->
|
||||
<view class="txt">
|
||||
{{item.name}}
|
||||
</view>
|
||||
|
@ -75,8 +81,8 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<swiper class="swiper" style="height: 100%;margin-top: 20rpx;" :current='curtitidx' @change="swiperchange" @touchstart="touchStart" @touchend="touchEnd">
|
||||
<swiper class="swiper" style="height: 100%;" :current='curtitidx' @change="swiperchange"
|
||||
@touchstart="touchStart" @touchend="touchEnd">
|
||||
<swiper-item v-for="(item,index) in groupLists" :key="index">
|
||||
<view class="" v-if="shujuflag"
|
||||
style="width: 100%;height: 200rpx;margin: auto;margin-top: 230rpx;text-align: center;">
|
||||
|
@ -84,8 +90,8 @@
|
|||
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
|
||||
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">该店铺暂无设备...</view>
|
||||
</view>
|
||||
<view class="swiper-item">
|
||||
<!-- <view class="" ref="targetBox" id="targetBox"></view> -->
|
||||
<view class="swiper_item">
|
||||
<!-- <view class="" ref="targetBox" id="targetBox"></view> wateringList -->
|
||||
<view class="card_box" v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="card">
|
||||
<view class="card_left">
|
||||
|
@ -136,20 +142,6 @@
|
|||
<!-- 选择店铺 -->
|
||||
<u-select v-model="showshop" :list="shoplist" @confirm="confirms"></u-select>
|
||||
|
||||
<!-- <view class="noDevice" v-if="addflag">
|
||||
<view class="img_box">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uD3h9FDe458MjVW5H7VB" mode=""></image>
|
||||
<view class="tps">
|
||||
暂无设备
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="addbutn" @click="show = true">
|
||||
添加方式
|
||||
</view>
|
||||
<view class="tip">需要添加设备后方可使用</view>
|
||||
</view> -->
|
||||
|
||||
<image v-if="curtitidx == 0" class="saoyisao" @click="saoyisao"
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uiDR6MnGHguBRNSYFTVw" mode=""></image>
|
||||
|
||||
|
@ -159,11 +151,7 @@
|
|||
<u-select v-model="show" :list="list" title='添加方式' @confirm="confirm"></u-select>
|
||||
</view>
|
||||
|
||||
<!-- 刷新动画 -->
|
||||
<view class="shuaxin" v-if="shuaxin">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uoJ3GHWs14BwXetAlZTW" mode=""></image>
|
||||
<view class="">努力刷新中</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
@ -230,8 +218,8 @@
|
|||
shujuflag: false,
|
||||
id: '',
|
||||
|
||||
touchStartX: 0, // 触屏起始点x
|
||||
touchStartY: 0, // 触屏起始点y
|
||||
touchStartX: 0, // 触屏起始点x
|
||||
touchStartY: 0, // 触屏起始点y
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -296,38 +284,38 @@
|
|||
query: '',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 按下
|
||||
touchStart(e) {
|
||||
this.touchStartX = e.touches[0].clientX;
|
||||
this.touchStartY = e.touches[0].clientY;
|
||||
},
|
||||
this.touchStartX = e.touches[0].clientX;
|
||||
this.touchStartY = e.touches[0].clientY;
|
||||
},
|
||||
// 松开
|
||||
touchEnd(e) {
|
||||
let deltaX = e.changedTouches[0].clientX - this.touchStartX;
|
||||
let deltaY = e.changedTouches[0].clientY - this.touchStartY;
|
||||
if (Math.abs(deltaX) > 50 && Math.abs(deltaX) > Math.abs(deltaY)) {
|
||||
if (deltaX >= 0) {
|
||||
// console.log("左滑")
|
||||
} else {
|
||||
// console.log("右滑")
|
||||
}
|
||||
} else if(Math.abs(deltaY) > 50&& Math.abs(deltaX) < Math.abs(deltaY)) {
|
||||
if (deltaY < 0) {
|
||||
// console.log("上滑")
|
||||
} else {
|
||||
// console.log("下滑")
|
||||
this.shuaxin = true
|
||||
setTimeout(()=>{
|
||||
this.getlist()
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
},
|
||||
touchEnd(e) {
|
||||
let deltaX = e.changedTouches[0].clientX - this.touchStartX;
|
||||
let deltaY = e.changedTouches[0].clientY - this.touchStartY;
|
||||
if (Math.abs(deltaX) > 50 && Math.abs(deltaX) > Math.abs(deltaY)) {
|
||||
if (deltaX >= 0) {
|
||||
// console.log("左滑")
|
||||
} else {
|
||||
// console.log("右滑")
|
||||
}
|
||||
} else if (Math.abs(deltaY) > 50 && Math.abs(deltaX) < Math.abs(deltaY)) {
|
||||
if (deltaY < 0) {
|
||||
// console.log("上滑")
|
||||
} else {
|
||||
console.log(deltaY)
|
||||
if(deltaY > 300){
|
||||
this.shuaxin = true
|
||||
this.pagenum = 1
|
||||
setTimeout(() => {
|
||||
this.getlist()
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 扫一扫绑定设备
|
||||
|
@ -367,10 +355,16 @@
|
|||
that.$u.put("/app/device/bind", data).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
that.$u.get(`/app/device/${id}/bySn`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
that.$u.get(
|
||||
`/app/device/${id}/bySn`
|
||||
).then((res) => {
|
||||
if (res.code ==
|
||||
200) {
|
||||
uni.navigateTo({
|
||||
url: '/page_components/bindsz?id=' + res.data.deviceId
|
||||
url: '/page_components/bindsz?id=' +
|
||||
res
|
||||
.data
|
||||
.deviceId
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -487,7 +481,8 @@
|
|||
} else if (systemInfo.platform === 'ios') {
|
||||
// console.log('aaaaaaaaaaaa');
|
||||
uni.navigateTo({
|
||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId + '&name=' + this.name
|
||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId +
|
||||
'&name=' + this.name
|
||||
})
|
||||
}
|
||||
uni.showToast({
|
||||
|
@ -573,7 +568,9 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.get(`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
||||
this.$u.get(
|
||||
`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.shuaxin = false
|
||||
this.total = res.total
|
||||
|
@ -654,7 +651,9 @@
|
|||
this.pagenum = 1
|
||||
// this.wateringList = []
|
||||
this.titlist = item.name
|
||||
this.$u.get(`/app/device/list?storeId=${item.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
||||
this.$u.get(
|
||||
`/app/device/list?storeId=${item.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`
|
||||
).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
// if(this.pagenum > 1){
|
||||
|
@ -954,12 +953,6 @@
|
|||
url: '/page_user/cbRecord'
|
||||
})
|
||||
},
|
||||
// 点击切换设备
|
||||
switchs() {
|
||||
uni.navigateTo({
|
||||
url: '/page_user/switchs'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -967,31 +960,22 @@
|
|||
<style lang="scss">
|
||||
.shuaxin {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
height: 110rpx;
|
||||
z-index: 99;
|
||||
animation: fadeIn 1s forwards;
|
||||
text-align: center;
|
||||
|
||||
image {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
position: fixed;
|
||||
top: 10%;
|
||||
left: 46%;
|
||||
transform: translateX(-50%);
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
view{
|
||||
|
||||
view {
|
||||
// width: 100%;
|
||||
height: 80rpx;
|
||||
position: fixed;
|
||||
top: 15%;
|
||||
left: 52%;
|
||||
font-size: 30rpx;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1034,7 +1018,7 @@
|
|||
background-color: #8883F0;
|
||||
|
||||
text {
|
||||
padding-left: 28%;
|
||||
padding-left: 33%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1429,23 +1413,29 @@
|
|||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
.fd {
|
||||
margin-top: 20rpx;
|
||||
padding: 0 40rpx;
|
||||
padding-bottom: 200rpx;
|
||||
height: 100%;
|
||||
|
||||
|
||||
.fz {
|
||||
margin: 0 -40rpx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 750rpx;
|
||||
height: 1152rpx;
|
||||
height: 830rpx;
|
||||
background: #F7FAFE;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
z-index: 10071;
|
||||
|
||||
opacity: 0;
|
||||
animation-name: fadeIn;
|
||||
animation-duration: 1s;
|
||||
animation-fill-mode: forwards;
|
||||
.fz_top {
|
||||
margin: 18rpx 0 auto;
|
||||
display: flex;
|
||||
|
@ -1589,7 +1579,7 @@
|
|||
|
||||
.swiper {
|
||||
|
||||
.swiper-item {
|
||||
.swiper_item {
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 660rpx;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar :is-back="false" title="我的" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36'
|
||||
<u-navbar :is-back="false" title="商户中心" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36'
|
||||
height='36'
|
||||
id="navbar">
|
||||
</u-navbar>
|
||||
|
@ -71,7 +71,7 @@
|
|||
</view>
|
||||
<view class="botcard" @click="topage(1)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ujXfMLJmerXRSRGZfGFV" mode=""></image>
|
||||
<view class="txt">订单记录</view>
|
||||
<view class="txt">订单管理</view>
|
||||
</view>
|
||||
<view class="botcard" @click="topage(4)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uKewAY8xvJN04yFpGEjl" mode=""></image>
|
||||
|
@ -166,6 +166,9 @@
|
|||
uni.navigateTo({
|
||||
url:'/page_fenbao/statulist/myorder/index'
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url:'/page_user/switchs'
|
||||
// })
|
||||
}else if(num==2){
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/statulist/question/index'
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3NDAI21OIGQH0Exdmdd" mode=""
|
||||
style="width: 96rpx;height:94rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="guangg" @click="btnad">
|
||||
<image :src="imgad" mode=""></image>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue
Block a user