diff --git a/page_components/bindsz.vue b/page_components/bindsz.vue
index e5400e6..bd9b2ec 100644
--- a/page_components/bindsz.vue
+++ b/page_components/bindsz.vue
@@ -64,16 +64,7 @@
-
-
- WiFi配网
-
-
-
-
-
-
-
+
套餐设置
@@ -95,7 +86,17 @@
-
+
+
+ WiFi配网
+
+
+
+ {{listobj.wifi == null ? '' : listobj.wifi}}
+
+
+
+
@@ -290,13 +291,15 @@
let id = option.id
this.id = id
this.getDevice(id)
- this.getlistobj(id)
+
this.gettanc()
},
onShow() {
+ this.setMode == null
this.taocan = ''
this.getQiniuToken()
this.getgroup()
+ this.getlistobj(this.id)
this.getuserinfo()
this.getao()
},
diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue
index f91d448..2f807a7 100644
--- a/page_components/fuwu/index.vue
+++ b/page_components/fuwu/index.vue
@@ -140,79 +140,187 @@
}
},
onLoad(option) {
- if (option.q) {
- function getQueryParam(url, paramName) {
- let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
- let results = regex.exec(url);
- return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
- }
- 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
+ this.$u.get("/app/user/userInfo").then((res) => {
+ if (res.code == 200) {
+ if (option.q) {
+ function getQueryParam(url, paramName) {
+ let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
+ let results = regex.exec(url);
+ return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
+ }
+ let sceneValue = option.q
+ let decodedValue = decodeURIComponent(sceneValue);
+ this.id = getQueryParam(decodedValue, 's')
- 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)
+ let that = this
+ let data = {
+ deviceNo: that.id
}
- }
- })
- this.startTimer()
- this.gettaoc()
- // 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
+ that.$u.get(`/app/device/isBind?deviceNo=${that.id}`).then(res => {
+ if (res.data == 2) {
+ that.$u.get(`/app/device/${that.id}/withSuitList`).then((res) => {
+ if (res.code == 200) {
+ that.$u.get(`/app/device/${that.id}/bySn`).then((res) => {
+ if (res.code == 200) {
+ that.mac = 'CTKG-' + res.data.mac
+ that.onlineStatus = res.data.onlineStatus
+ if (that.onlineStatus == 0) {
+ // 一开始搜索设备
+ xBlufi.initXBlufi(1)
+ xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': true
+ })
+ setTimeout(() => {
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': false
+ })
+ if (that.devicesList.length > 0) {
+ xBlufi.notifyConnectBle({
+ isStart: true,
+ deviceId: that.deviceId,
+ name: that.name
+ })
+ }
+ }, 2000)
+ }
+ }
+ })
+ }
})
- if (this.devicesList.length > 0) {
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: this.deviceId,
- name: this.name
- })
- }
- }, 2000)
+ } else if (res.data == 1) {
+ console.log(111);
+ uni.showModal({
+ title: '提示',
+ content: '该设备未绑定,你需进行绑定吗?',
+ success: function(res) {
+ if (res.confirm) {
+ that.$u.put("/app/device/bind", data).then(res => {
+ if(res.code == 200){
+ that.$u.get(`/app/device/${that.id}/bySn`).then((res) => {
+ if (res.code == 200) {
+ uni.navigateTo({
+ url: '/page_components/bindsz?id=' + res.data.deviceId
+ })
+ }
+ })
+ }
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ })
+ } else if (res.data == 0) {
+ uni.showModal({
+ title: '提示',
+ content: '该设备未录入,你需进行录入吗?',
+ success: function(res) {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: '/page_fenbao/zhuce?sn=' + that.id
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ })
+ }
+ })
+
+ this.startTimer()
+ this.gettaoc()
+ // this.getmac()
+
+ } else {
+ this.id = option.id
+
+ let that = this
+ let data = {
+ deviceNo: that.id
}
+ that.$u.get(`/app/device/isBind?deviceNo=${that.id}`).then(res => {
+ if (res.data == 2) {
+ that.$u.get(`/app/device/${that.id}/withSuitList`).then((res) => {
+ if (res.code == 200) {
+ that.$u.get(`/app/device/${that.id}/bySn`).then((res) => {
+ if (res.code == 200) {
+ that.mac = 'CTKG-' + res.data.mac
+ that.onlineStatus = res.data.onlineStatus
+ if (that.onlineStatus == 0) {
+ // 一开始搜索设备
+ xBlufi.initXBlufi(1)
+ xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': true
+ })
+ setTimeout(() => {
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': false
+ })
+ if (that.devicesList.length > 0) {
+ xBlufi.notifyConnectBle({
+ isStart: true,
+ deviceId: that.deviceId,
+ name: that.name
+ })
+ }
+ }, 2000)
+ }
+ }
+ })
+ }
+ })
+ } else if (res.data == 1) {
+ console.log(222);
+ uni.showModal({
+ title: '提示',
+ content: '该设备未绑定,你需进行绑定吗?',
+ success: function(res) {
+ if (res.confirm) {
+ that.$u.put("/app/device/bind", data).then(res => {
+ if(res.code == 200){
+ that.$u.get(`/app/device/${that.id}/bySn`).then((res) => {
+ if (res.code == 200) {
+ uni.navigateTo({
+ url: '/page_components/bindsz?id=' + res.data.deviceId
+ })
+ }
+ })
+ }
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ })
+ } else if (res.data == 0) {
+ uni.showModal({
+ title: '提示',
+ content: '该设备未录入,你需进行录入吗?',
+ success: function(res) {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: '/page_fenbao/zhuce?sn=' + that.id
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ })
+ }
+ })
+ this.startTimer()
+ this.gettaoc()
+ // this.getmac()
}
- })
- this.startTimer()
- this.gettaoc()
- // this.getmac()
+ } else {
+ uni.navigateTo({
+ url: '/pages/login/login?id=' + 1
+ })
+ }
+ })
- }
},
computed: {
@@ -234,7 +342,7 @@
}
},
onShow() {
- this.getuserinfo()
+ // this.getuserinfo()
if (this.orderno) {
// this.gethuidaio()
}
@@ -312,7 +420,7 @@
gettrue() {
this.$u.get("/app/device/isBind?deviceNo=" + this.id).then((res) => {
- if (res.data == false) {
+ if (res.data == 0 || res.data == 1) {
uni.navigateTo({
url: '/pages/shouye/index?flag=' + true + '&id=' + this.id
})
@@ -322,7 +430,7 @@
getuserinfo() {
this.$u.get("/app/user/userInfo").then((res) => {
if (res.code == 200) {
- this.gettrue()
+ // this.gettrue()
} else {
uni.navigateTo({
url: '/pages/login/login?id=' + 1
diff --git a/page_components/wifilist/index.vue b/page_components/wifilist/index.vue
index 287d42d..0718d65 100644
--- a/page_components/wifilist/index.vue
+++ b/page_components/wifilist/index.vue
@@ -10,7 +10,8 @@
请选择您需要连接的2.4GwiFi名称
- 刷新
+
+ 刷新
@@ -44,7 +45,7 @@
- {{item.SSID}}
+ {{item.SSID == '' ? 'CMCC-eaca' : item.SSID}}
@@ -63,28 +64,38 @@
-
+
连接网络
{{ssid}}
-
+
-
+
-
+
-
+
-
-
+
+
取消
-
- {{textwifi}}
+
+ 连接
+
+ 连接中
+
+ .
+
+
@@ -96,29 +107,36 @@
手动添加
-
+
-
+
-
+
-
+
-
-
+
+
取消
- {{ textwifi }}
+ 连接
+
+ 连接中
+
+ .
+
+
-
+
@@ -178,7 +196,14 @@
bgc: {
backgroundColor: "#8883f0",
},
- textwifi:'连接'
+ textwifi:'连接',
+
+ rotateDegree: 0, // 图片的旋转角度
+ rotationInterval: null, // 定时器的引用
+ isRotating: false, // 标志位,控制是否正在旋转
+
+ currentIndex: 0, // 控制当前应该显示到哪个点
+ dotShowInterval: null,
};
},
@@ -313,19 +338,70 @@
},
onUnload: function() {
console.log("unload返回 ");
+ if (this.dotShowInterval) {
+ clearInterval(this.dotShowInterval);
+ }
let that = this;
+ wx.closeBLEConnection({
+ deviceId: that.objlist.deviceId,
+ })
},
+ mounted() {
+ // 开始闪烁动画
+ this.startDotShow()
+ },
methods: {
+ // 开始旋转图片
+
+ // 模拟异步请求
+ simulateRequest() {
+ // 使用setTimeout来模拟异步操作
+ setTimeout(() => {
+ // 假设请求完成
+ console.log('请求完成');
+ this.stopRotation();
+ }, 3000);
+ },
+ // 停止旋转图片
+ stopRotation() {
+ this.isRotating = false;
+ clearInterval(this.rotationInterval); // 清除定时器
+ },
+
+ startDotShow() {
+ this.dotShowInterval = setInterval(() => {
+ if (this.currentIndex < 3) {
+ this.currentIndex++;
+ } else {
+ // 如果需要循环显示,可以重置currentIndex
+ this.currentIndex = 0; // 重启动画
+ }
+ }, 500); // 每500毫秒更新currentIndex
+ },
+
+
btnmaskflag(){
+ this.textwifi = '连接'
this.maskflag = false
this.password = ''
},
btnsdmaskflag(){
+ this.textwifi = '连接'
this.sdmaskflag = false
this.password = ''
},
// 点击重新获取wifi
btnwifi(){
+ if (!this.isRotating) {
+ this.isRotating = true;
+ this.rotationInterval = setInterval(() => {
+ if (this.isRotating) {
+ this.rotateDegree = (this.rotateDegree + 5) % 360; // 每次增加5度,并循环
+ }
+ }, 10); // 每100毫秒旋转一次
+ // 假设这里发起一个异步请求
+ this.simulateRequest();
+ }
var that = this
wx.startWifi({
success: function() {
@@ -426,6 +502,7 @@
// mask: true
// })
this.textwifi = '连接中...'
+
xBlufi.notifySendCustomData({
customData: "ssid@" + this.ssid + "pass@" + this.password
})
@@ -485,9 +562,19 @@
content: `连接成功`,
showCancel: false,
success: function(res) {
- uni.switchTab({
- url: '/pages/index/index'
- })
+ // uni.switchTab({
+ // url: '/pages/index/index'
+ // })
+ let systemInfo = uni.getSystemInfoSync();
+ if (systemInfo.platform == 'android') {
+ // 当前设备是 Android
+ uni.navigateBack()
+ } else if (systemInfo.platform == 'ios') {
+ // 当前设备是 iOS
+ uni.navigateBack({
+ delta:2
+ })
+ }
// let ids = that.$store.state.user.deviceId
wx.closeBLEConnection({
deviceId: this.objlist.deviceId,
@@ -502,6 +589,7 @@
}
})
}
+ break;
}
break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_MY_DATA:
@@ -521,17 +609,32 @@
console.log('初始化成功');
} else {
console.log('初始化失败');
+ wx.closeBLEConnection({
+ deviceId: this.objlist.deviceId,
+ })
uni.showModal({
title: '温馨提示',
content: `设备初始化失败,请重新连接`,
showCancel: false,
//是否显示取消按钮
success: function(res) {
- uni.switchTab({
- url:'/pages/index/index'
- })
+ let systemInfo = uni.getSystemInfoSync();
+ if (systemInfo.platform == 'android') {
+ // 当前设备是 Android
+ uni.navigateBack()
+ } else if (systemInfo.platform == 'ios') {
+ // 当前设备是 iOS
+ uni.navigateBack({
+ delta:2
+ })
+ }
+
+ // uni.switchTab({
+ // url:'/pages/index/index'
+ // })
}
- });
+ })
+ break;
}
break;
}
@@ -650,6 +753,12 @@
.actives{
opacity: .5 !important;
}
+ .sximg{
+ width: 34rpx;
+ height: 34rpx;
+ vertical-align: middle;
+ margin-right: 10rpx;
+ }
//wifi信号强度显示
.wifiactive {
background-color: limegreen !important;
@@ -693,15 +802,16 @@
}
}
.annius{
- position: fixed;
+ // position: fixed;
align-items: center;
- left: 50%;
- transform: translateX(-50%);
- bottom: 50rpx;
+ // left: 50%;
+ // transform: translateX(-50%);
+ // bottom: 50rpx;
border-radius: 52rpx 52rpx 52rpx 52rpx;
// font-weight: 700;
font-size: 38rpx;
- width: 90%;
+ width: 100%;
+ margin-top: 20rpx;
view{
height: 96rpx;
border-radius: 30rpx;
@@ -718,8 +828,8 @@
.lianjie{
- width: 520rpx;
- height: 320rpx;
+ width: 620rpx;
+ height: 425rpx;
background-color: #fff;
border-radius: 30rpx;
position: fixed;
@@ -734,15 +844,20 @@
}
.wifiname{
font-size: 30rpx;
- color: #ccc;
+ color: #000;
margin-top: 30rpx;
}
input{
- width: 79%;
+ width: 100%;
margin-top: 30rpx;
color: #000;
font-size: 30rpx;
- margin-left: 30rpx;
+ // margin-left: 30rpx;
+ padding-left: 30rpx;
+ box-sizing: border-box;
+ background-color: #efefef;
+ border-radius: 10rpx;
+ height: 80rpx;
}
.butlj{
display: flex;
@@ -755,6 +870,8 @@
color: #8883F0;
width: 100%;
text-align: center;
+ height: 95rpx;
+ line-height: 95rpx;
}
}
}
diff --git a/page_fenbao/statulist/myshop/shopdetail/index.vue b/page_fenbao/statulist/myshop/shopdetail/index.vue
index b7a1778..bd3bb98 100644
--- a/page_fenbao/statulist/myshop/shopdetail/index.vue
+++ b/page_fenbao/statulist/myshop/shopdetail/index.vue
@@ -184,53 +184,79 @@
}
},
scanQRCode() {
- uni.scanCode({
- onlyFromCamera: true,
- scanType: ['qrCode'],
- success: res => {
- // console.log('扫描结果:', 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);
- let id = getQueryParam(decodedValue, 's')
- this.$u.get(`/app/device/${id}/bySn`).then((res) => {
- if (res.code == 200) {
- this.macs = res.data.mac
- this.qrResult = 'CTKG-' + res.data.mac
- xBlufi.initXBlufi(1);
- xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- });
- // 停止蓝牙搜索
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- });
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: this.deviceId,
- name: this.name
- });
- }, 2000)
- uni.showLoading({
- title: '连接中...'
- });
- }
- })
- },
- fail: err => {
- console.error('扫描失败:', err);
- uni.showToast({
- title: '扫描失败',
- icon: 'none'
- });
- }
- });
+ 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)
+ let id = getQueryParam(decodedValue, 's')
+ // console.log(res, id)
+ let that = this
+ let data = {
+ deviceNo: id
+ }
+ that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => {
+ if (res.data == 2) {
+ that.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
+ if (res.code == 200) {
+ uni.navigateTo({
+ url: '/page_components/fuwu/index?id=' + id
+ })
+ }
+ })
+ } else if (res.data == 1) {
+ uni.showModal({
+ title: '提示',
+ content: '该设备未绑定,你需进行绑定吗?',
+ success: function(res) {
+ if (res.confirm) {
+ 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) {
+ uni.navigateTo({
+ url: '/page_components/bindsz?id=' + res.data.deviceId
+ })
+ }
+ })
+ }
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ })
+ } else if (res.data == 0) {
+ uni.showModal({
+ title: '提示',
+ content: '该设备未录入,你需进行录入吗?',
+ success: function(res) {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: '/page_fenbao/zhuce?sn=' + id
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ })
+ }
+ })
+ },
+ fail: err => {
+ console.error('扫描失败:', err)
+ uni.showToast({
+ title: '扫描失败',
+ icon: 'none'
+ })
+ }
+ })
},
funListenDeviceMsgEvent: function(options) {
diff --git a/page_user/setting.vue b/page_user/setting.vue
index 593cfcf..38160c4 100644
--- a/page_user/setting.vue
+++ b/page_user/setting.vue
@@ -3,6 +3,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
设备名称
@@ -209,12 +228,17 @@
pagesize: 10,
isLoading: false,
noMoreData: false,
- total: 0
+ total: 0,
+
+ userImgs:'',
+ url:'',
+ token:''
}
},
onLoad(option) {
let id = option.id
this.id = id
+ this.getQiniuToken()
this.getDevice(id)
this.getlistobj(id)
this.gettanc()
@@ -239,6 +263,60 @@
this.getgroup()
},
methods: {
+ getQiniuToken() {
+ this.$u.get("/common/qiniu/uploadInfo").then((res) => {
+ if (res.code == 200) {
+ this.token = res.token
+ }
+ })
+ },
+ getImage() {
+ uni.chooseImage({
+ count: 1,
+ success: (rst) => {
+ this.url = rst.tempFilePaths[0];
+ }
+ })
+ },
+ onok(ev) {
+ this.url = "";
+ this.path = ev.path;
+ let _this = this
+ let math = 'static/' + _this.$u.guid(20)
+ wx.uploadFile({
+ url: 'https://up-z2.qiniup.com',
+ name: 'file',
+ filePath: _this.path,
+ formData: {
+ token: _this.token, //后端返回的token
+ key: 'smartmeter/img/' + math
+ },
+ success: function(res) {
+ let str = JSON.parse(res.data)
+ _this.userImgs = 'https://api.ccttiot.com/' + str.key
+ let data = {
+ deviceId:_this.id,
+ customPicture:_this.userImgs
+ }
+ _this.$u.put('/app/device', data).then((res) => {
+ if (res.code == 200) {
+ // this.getDevice()
+ uni.showToast({
+ title: '操作成功',
+ icon: 'success',
+ duration: 2000
+ })
+ }
+ })
+ }
+ })
+ },
+ oncancel() {
+ // url设置为空,隐藏控件
+ this.url = ""
+ },
+
+
sremakes() {
this.showshop = true
},
@@ -353,7 +431,7 @@
if (res.code == 200) {
uni.showToast({
title: '解除成功',
- icon: 'none',
+ icon: 'success',
duration: 2000
});
uni.navigateBack({
@@ -397,7 +475,7 @@
this.getDevice()
uni.showToast({
title: '修改成功',
- icon: 'none',
+ icon: 'success',
duration: 2000
});
@@ -431,7 +509,12 @@
console.log(this.deviceInfo, 'resres');
this.price = this.deviceInfo.price
this.remake = this.deviceInfo.remark
- // this.loadings=true
+ if(this.deviceInfo.customPicture == null){
+ this.userImgs = this.deviceInfo.picture
+ }else{
+ this.userImgs = this.deviceInfo.customPicture
+ }
+ // this.loadings=true
// this.initChart()
}
});
@@ -477,7 +560,7 @@
bottom: 230rpx;
width: 632rpx;
height: 90rpx;
- background-color: red;
+ background-color: #ccc;
text-align: center;
line-height: 90rpx;
font-size: 36rpx;
@@ -687,4 +770,28 @@
}
}
}
+ .icon {
+ // display: flex;
+ // flex-wrap: wrap;
+ // align-items: center;
+ margin-top: 40rpx;
+ margin-bottom: 30rpx;
+ .imgbox {
+ // width: 33%;
+ image {
+ width: 142rpx;
+ height: 142rpx;
+ }
+ }
+ }
+ /deep/ .panel{
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 99 !important;
+ overflow: hidden;
+ }
\ No newline at end of file
diff --git a/page_user/txrecord.vue b/page_user/txrecord.vue
index 8a1ef2b..7f1eaa0 100644
--- a/page_user/txrecord.vue
+++ b/page_user/txrecord.vue
@@ -2,7 +2,7 @@
-
+
提现
(审核中)
@@ -23,6 +23,12 @@
+ -没有更多记录了-
+
+
+ 暂无更多提现记录...
+
@@ -37,7 +43,14 @@
bgc: {
backgroundColor: "#8883f0",
},
- list:''
+ list:[],
+ jlflag:false,
+ pagenum: 1,
+ pagesize: 10, // 一页多少数据
+ isLoading: false, // 是否正在加载数据
+ noMoreData: false, // 是否没有更多数据
+ total: 0,
+ showflag: false,
}
},
onLoad() {
@@ -60,17 +73,37 @@
}
},
methods: {
+ onReachBottom() {
+ if (this.list.length < this.total) {
+ this.getDeviceList(); // 上拉加载更多
+ } else {
+ this.jlflag = true
+ }
+ },
btntx(billId){
uni.navigateTo({
url:'/page_user/mapditu/withdraw_xq?billId=' + billId
})
},
getDeviceList(){
- this.$u.get("/app/bill/withdrawList?pageNum=1&pageSize=10").then((res) => {
- if (res.code == 200) {
- this.list = res.rows
- console.log(this.list,'000');
- }
+ this.$u.get(`/app/bill/withdrawList?$pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
+ if (res.code == 200) {
+ this.total = res.total
+ if (this.total > 0) {
+ this.showflag = false
+ } else {
+ this.showflag = true
+ }
+ if (res.rows.length > 0) {
+ // 有数据,追加到列表
+ this.list = this.list.concat(res.rows)
+ this.pagenum++
+ } else {
+ // 没有更多数据
+ this.noMoreData = true;
+ }
+ this.isLoading = false;
+ }
});
},
@@ -91,7 +124,8 @@
.pages {
width: 750rpx;
-
+ padding-bottom: 100rpx;
+ box-sizing: border-box;
.tops {
margin-top: 20rpx;
display: flex;
@@ -127,7 +161,6 @@
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
margin: 18rpx auto;
border-radius: 30rpx;
-
.card_left {
margin-left: 50rpx;
diff --git a/page_user/userSet.vue b/page_user/userSet.vue
index 1be326c..33b9409 100644
--- a/page_user/userSet.vue
+++ b/page_user/userSet.vue
@@ -46,7 +46,8 @@
-
+
+
个人信息收集清单
@@ -56,6 +57,17 @@
+
+
+ 秘钥管理
+
+
+
+
+
+
+
+
@@ -175,6 +187,10 @@
uni.navigateTo({
url:'/page_components/wentdetail?type=' + this.type
})
+ }else if(num == 4){
+ uni.navigateTo({
+ url:'/page_components/miyao'
+ })
}
},
diff --git a/page_user/yetx.vue b/page_user/yetx.vue
index 5213199..107c3a8 100644
--- a/page_user/yetx.vue
+++ b/page_user/yetx.vue
@@ -24,15 +24,15 @@
¥
-
+
全部提现
- 提现服务费为 ¥{{serviceRates}}
-
+ 提现服务费为 ¥{{roundToTwoDecimalsTraditional(this.serviceRates)}}
+
@@ -40,17 +40,26 @@
提现方式
-
-
-
+
+
+
-
+
- 微信提现
+ {{item.name}}
-
-
+
+
+
+
+
+
+
+ 当前暂无提现方式
+
+
+ 去添加
@@ -90,7 +99,7 @@
-->
-
+
确认提现
@@ -108,17 +117,22 @@
idnum:'',
money:'',
infoList:{},
- currentindex:0,
+ currentindex:-1,
payType:1,
accountNo:'',
userinfo:{},
serviceType:'',
serviceRate:'',
serviceRates:'',
- sjmeoey:''
+ sjmeoey:'',
+ txlist:'',
+ channelId:'',
+
+ listflag:true
}
},
onShow() {
+ this.gettxlist()
this.getfuwu()
this.getinfo()
this.getuserinfo()
@@ -140,17 +154,42 @@
}
},
methods: {
+ // 添加提现方式
+ btnadd(){
+ uni.navigateTo({
+ url:'/page_user/skzh'
+ })
+ },
+ // 获取提现渠道列表
+ gettxlist(){
+ this.$u.get('/app/channel/recharge/enabledWithdrawList').then(res => {
+ if(res.code == 200){
+ if(res.data.length > 0){
+ this.listflag = true
+ this.txlist = res.data
+ }else{
+ this.listflag = false
+ }
+ }
+ })
+ },
+
+
change(){
if(this.serviceType == 2){
this.serviceRates = this.serviceRate
this.sjmeoey = Number(this.money) - Number(this.serviceRates)
}else{
let qian = this.money * this.serviceRate / 100
- this.serviceRates = qian
+ this.serviceRates = qian
this.sjmeoey = Number(this.money) - Number(this.serviceRates)
}
},
+ // 计算小数
+ roundToTwoDecimalsTraditional(num) {
+ return Math.round(num * 100) / 100;
+ },
// 跳转到提现记录
btntxrecord(){
uni.navigateTo({
@@ -160,19 +199,14 @@
getinfo(){
this.$u.get('/app/account' ).then((res) => {
if (res.code == 200) {
- console.log(res)
+ // console.log(res)
this.infoList=res.data
}
})
},
- pay(index,type,id){
+ pay(index,id){
+ this.channelId = id
this.currentindex=index
- this.payType=type
- if(type==3){
- this.accountNo=id
- }else{
- this.accountNo=''
- }
},
all(){
this.money=this.userinfo.balance
@@ -212,12 +246,18 @@
icon: 'none',
duration: 2000
});
- }else{
+ }else if(this.currentindex == -1){
+ uni.showToast({
+ title: '请选择提现方式',
+ icon: 'none',
+ duration: 2000
+ })
+ } else{
let data ={
money:this.money,
- arrivalAmount:this.sjmeoey,
- serviceCharge:this.serviceRates,
- channelId:1,
+ arrivalAmount:this.roundToTwoDecimalsTraditional(Number(this.money) - Number(this.roundToTwoDecimalsTraditional(this.serviceRates))),
+ serviceCharge:this.roundToTwoDecimalsTraditional(this.serviceRates),
+ channelId:this.channelId,
serviceRate:this.serviceRate , //服务费
serviceType:this.serviceType //服务费收取方式
}
@@ -228,7 +268,8 @@
title: '提现成功',
icon: 'none',
duration: 2000
- });
+ })
+ this.serviceRates = 0
}
})
}
@@ -260,6 +301,18 @@
page{
background: #F7FAFE;
}
+ .addtj{
+ margin-top: 44rpx;
+ width: 646rpx;
+ height: 88rpx;
+ background: #E4E3FB;
+ box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ text-align: center;
+ line-height: 88rpx;
+ font-size: 36rpx;
+ color: #8883F0;
+ }
.cont{
display: flex;
// justify-content: center;
diff --git a/pages/shouye/index.vue b/pages/shouye/index.vue
index 2ab0557..b41c545 100644
--- a/pages/shouye/index.vue
+++ b/pages/shouye/index.vue
@@ -138,51 +138,66 @@
// this.deviceobj = res.data
// }
// })
-
// let that = this
// let data = {
// deviceNo: id
// }
// that.$u.put("/app/device/bind", data).then(res => {
// if (res.code == 200) {
- // uni.showModal({
- // title: '提示',
- // content: '该设备未绑定,你需进行绑定吗?',
- // success: function(res) {
- // if (res.confirm) {
- // uni.navigateTo({
- // url: '/page_components/bindsz?id=' + that.deviceobj.deviceId
- // })
- // } else if (res.cancel) {
-
- // }
+ // let that = this
+ // let data = {
+ // deviceNo: id
+ // }
+ // that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => {
+ // if (res.data == 2) {
+ // that.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
+ // if (res.code == 200) {
+ // uni.navigateTo({
+ // url: '/page_components/fuwu/index?id=' + id
+ // })
+ // }
+ // })
+ // } else if (res.data == 1) {
+ // uni.showModal({
+ // title: '提示',
+ // content: '该设备未绑定,你需进行绑定吗?',
+ // success: function(res) {
+ // if (res.confirm) {
+ // 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) {
+ // uni.navigateTo({
+ // url: '/page_components/bindsz?id=' + res.data.deviceId
+ // })
+ // }
+ // })
+ // }
+ // })
+ // } else if (res.cancel) {
+
+ // }
+ // }
+ // })
+ // } else if (res.data == 0) {
+ // uni.showModal({
+ // title: '提示',
+ // content: '该设备未录入,你需进行录入吗?',
+ // success: function(res) {
+ // if (res.confirm) {
+ // uni.navigateTo({
+ // url: '/page_fenbao/zhuce?sn=' + id
+ // })
+ // } else if (res.cancel) {
+
+ // }
+ // }
+ // })
// }
// })
- // } else {
- // if (res.msg == '设备未录入') {
- // uni.showModal({
- // title: '提示',
- // content: '该设备未录入,你需进行录入吗?',
- // success: function(res) {
- // if (res.confirm) {
- // uni.navigateTo({
- // url: '/page_fenbao/zhuce?sn=' + id
- // })
- // } else if (res.cancel) {
-
- // }
- // }
- // })
- // } else {
- // uni.showToast({
- // title: res.msg,
- // icon: 'none',
- // duration: 1000
- // })
- // }
// }
- // })
- // }
+ // })
+ // }
},
// 分享到好友(会话)
onShareAppMessage: function() {