diff --git a/common/http.interceptor.js b/common/http.interceptor.js index ad96f00..3c4faa8 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -19,7 +19,7 @@ const install = (Vue, vm) => { // }, // }); Vue.prototype.$u.http.setConfig({ - baseUrl: 'http://192.168.1.4:10002', + baseUrl: 'http://192.168.2.27:10002', // baseUrl: 'https://kg.chuangtewl.com/prod-api', // loadingText: '加载中...', // loadingTime: 1000, diff --git a/page_components/bindszthr.vue b/page_components/bindszthr.vue index abada08..543d833 100644 --- a/page_components/bindszthr.vue +++ b/page_components/bindszthr.vue @@ -3,36 +3,15 @@ - - 套餐模版配置 - + 能更方便,快速的配置设备套餐 - 选择套餐列表 @@ -269,7 +248,7 @@ } this.$u.get(`/app/suit/tempList`, data).then((res) => { if (res.code == 200) { - this.getao() + // this.getao() this.list = res.rows // this.list = this.list.map(item => ({ // ...item, @@ -304,11 +283,16 @@ this.bluetoothflag = false }, getlistobj(id) { - this.$u.get("/app/device/" + id).then((res) => { + this.$u.get(`/app/device/${id}?withSuit=true`).then((res) => { if (res.code == 200) { this.listobj = res.data this.arrlists.push(res.data) uni.setStorageSync('tcidlist', this.arrlists) + if(res.data.suitList){ + res.data.suitList.forEach(item =>{ + this.isActive.push(item.suitId) + }) + } } }) }, @@ -360,7 +344,7 @@ setTimeout(() => { this.btnmsk = false uni.reLaunch({ - url:'/pages/shouye/index' + url:'/pages/index/index' }) }, 1000) }else{ diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue index 6e08351..121ffe5 100644 --- a/page_components/fuwu/index.vue +++ b/page_components/fuwu/index.vue @@ -253,15 +253,6 @@ } }, onShow() { - wx.openBluetoothAdapter({ - success: function (res) { - console.log('蓝牙适配器初始化成功'); - // 你可以在这里继续调用其他蓝牙相关的API - }, - fail: function (err) { - console.error('蓝牙适配器初始化失败,可能是因为没有权限', err); - } - }) // this.getuserinfo() if(uni.getStorageSync('tcid')){ uni.removeStorage({ @@ -280,6 +271,15 @@ if (res.code == 200) { this.phonenumber = res.data.phonenumber this.userId = res.data.userId + wx.openBluetoothAdapter({ + success: function (res) { + console.log('蓝牙适配器初始化成功'); + // 你可以在这里继续调用其他蓝牙相关的API + }, + fail: function (err) { + console.error('蓝牙适配器初始化失败,可能是因为没有权限', err); + } + }) this.getone() } else { uni.navigateTo({ @@ -367,11 +367,11 @@ uni.hideLoading() }else{ uni.hideLoading() - uni.showToast({ - title:res.msg, - icon: 'none', - duration:2000 - }) + // uni.showToast({ + // title:res.msg, + // icon: 'none', + // duration:2000 + // }) } }) }, diff --git a/page_fenbao/device/joinDevice.vue b/page_fenbao/device/joinDevice.vue index cf68b62..b081094 100644 --- a/page_fenbao/device/joinDevice.vue +++ b/page_fenbao/device/joinDevice.vue @@ -477,10 +477,10 @@ success(res) { console.log('已连接的蓝牙设备信息:', res); xBlufi.notifySendCustomData({ - customData: "time" + 30 + '@' + customData: "time" + 10 + '@' }) xBlufi.notifySendCustomData({ - customData: "11time" + 30 + '@' + customData: "11time" + 10 + '@' }) }, fail(err) { @@ -767,10 +767,10 @@ console.log('状态', options.result) if (options.result == false) { this.carstause = false - uni.showToast({ - title: '设备断开链接,请重新点击蓝牙链接', - icon: 'none' - }); + // uni.showToast({ + // title: '设备断开链接,请重新点击蓝牙链接', + // icon: 'none' + // }); // uni.showModal({ // title: '很抱歉提醒你!', // content: '小程序与设备异常断开', diff --git a/page_fenbao/editshenhe.vue b/page_fenbao/editshenhe.vue index f411880..d483669 100644 --- a/page_fenbao/editshenhe.vue +++ b/page_fenbao/editshenhe.vue @@ -89,18 +89,38 @@ 门头照片必须清晰、方正、易于辨识 - - - - + + + + + - + + + + + + + + + 取消提交 @@ -256,7 +276,7 @@ this.longitude = this.listobj.lng this.xqdz = this.listobj.address this.selectorvalue = this.listobj.type - this.imglist = this.listobj.picture + this.imglist = this.listobj.picture.split(',') this.province = this.listobj.province this.city = this.listobj.city this.area = this.listobj.county @@ -349,7 +369,32 @@ font-size: 40rpx; color: #FFFFFF; } - + .container { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + margin-top: 40rpx; + } + .piclist{ + .wz{ + margin-top: 20rpx; + width: 100%; + text-align: center; + color: red; + } + } + .swiper { + width: 100%; + height: 300rpx; + border-radius: 30rpx; + overflow: hidden; + } + + .slide-image { + width: 100%; + height: 100%; + } .icon { display: flex; flex-wrap: wrap; diff --git a/page_fenbao/fenxiang.vue b/page_fenbao/fenxiang.vue index 921494e..f94893f 100644 --- a/page_fenbao/fenxiang.vue +++ b/page_fenbao/fenxiang.vue @@ -5,8 +5,8 @@ - 微信“扫一扫” 使用小程序 - 选择您所需要的用电套餐 + 微信“扫一扫”使用小程序 + 选择您所需要的套餐 @@ -372,7 +372,7 @@ padding: 36rpx 92rpx; box-sizing: border-box; margin: auto; - margin-top: 104rpx; + margin-top: 40rpx; text{ margin-top: 16rpx; display: block; diff --git a/page_fenbao/hehuoren/addhehuo.vue b/page_fenbao/hehuoren/addhehuo.vue index 8ef2b55..1c8da05 100644 --- a/page_fenbao/hehuoren/addhehuo.vue +++ b/page_fenbao/hehuoren/addhehuo.vue @@ -9,8 +9,8 @@ 合伙人名称 - - 分成比例 + + 分成比例 % 套餐名称{{detailobj.suitName == undefined ? '--' : detailobj.suitName}} @@ -395,11 +395,17 @@ text-align: center; font-size: 36rpx; font-weight: 600; - color: red; - height: 238rpx; + height: 100rpx; + line-height: 100rpx; margin: auto; margin-top: 56rpx; - border-radius: 30rpx; + border-radius: 50rpx; + position: fixed; + left: 50%; + transform: translateX(-50%); + bottom: 50rpx; + background-color: #8883F0; + color: #fff; } .listxq{ width: 680rpx; diff --git a/page_fenbao/statulist/myshop/editshop/index.vue b/page_fenbao/statulist/myshop/editshop/index.vue index f3fafa0..776c137 100644 --- a/page_fenbao/statulist/myshop/editshop/index.vue +++ b/page_fenbao/statulist/myshop/editshop/index.vue @@ -76,36 +76,40 @@ - - - - - - - - + + + + + + + + + + 长按可删除图片 + + 提交修改 @@ -200,7 +204,7 @@ this.longitude = this.listobj.lng this.xqdz = this.listobj.address this.selectorvalue = this.listobj.type - this.imglist = this.listobj.picture + this.imglist = this.listobj.picture.split(',') this.province = this.listobj.province this.city = this.listobj.city this.area = this.listobj.county @@ -238,6 +242,18 @@ } }, methods: { + handleLongPress(index) { + this.imglist.splice(index, 1) + uni.showToast({ + title: '删除成功', + icon: 'success', + duration: 2000 + }) + if(this.imglist.length < 1){ + this.imgflag = true + } + }, + getImage() { uni.chooseImage({ count: 1, @@ -262,7 +278,7 @@ success: function(res) { let str = JSON.parse(res.data) _this.userImgs = 'https://api.ccttiot.com/' + str.key - _this.imglist = _this.userImgs + _this.imglist.push(_this.userImgs) _this.imgflag = false } }) @@ -339,10 +355,11 @@ duration: 1000 }) } else { + let urlString = this.imglist.filter(item => typeof item == 'string').join(',') this.btnmsk = true let data = { name: this.shopname, - picture: this.imglist, + picture: urlString, address: this.xqdz, lng: this.longitude, lat: this.latitude, @@ -526,7 +543,32 @@ font-size: 40rpx; color: #FFFFFF; } - + .container { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + margin-top: 40rpx; + } + .piclist{ + .wz{ + margin-top: 20rpx; + width: 100%; + text-align: center; + color: red; + } + } + .swiper { + width: 100%; + height: 300rpx; + border-radius: 30rpx; + overflow: hidden; + } + + .slide-image { + width: 100%; + height: 100%; + } .icon { display: flex; flex-wrap: wrap; diff --git a/page_fenbao/statulist/myshop/shopxx/index.vue b/page_fenbao/statulist/myshop/shopxx/index.vue index f1493ad..5f08572 100644 --- a/page_fenbao/statulist/myshop/shopxx/index.vue +++ b/page_fenbao/statulist/myshop/shopxx/index.vue @@ -84,35 +84,39 @@ - - - - - - - - + + + + + + + + + + 长按可删除图片 + + 提交创建 @@ -146,7 +150,7 @@ }, show: false, checkeds:true, - imglist: '', + imglist: [], token: '', userImgs: '', imgflag: true, @@ -205,6 +209,18 @@ this.getQiniuToken() }, methods: { + handleLongPress(index) { + this.imglist.splice(index, 1) + uni.showToast({ + title: '删除成功', + icon: 'success', + duration: 2000 + }) + if(this.imglist.length < 1){ + this.imgflag = true + } + }, + getImage() { uni.chooseImage({ count: 1, @@ -229,7 +245,7 @@ success: function(res) { let str = JSON.parse(res.data) _this.userImgs = 'https://api.ccttiot.com/' + str.key - _this.imglist = _this.userImgs + _this.imglist.push(_this.userImgs) _this.imgflag = false } }) @@ -283,15 +299,7 @@ icon: 'none', duration: 2000 }) - } - // else if (this.regiontext == '请选择省市区') { - // uni.showToast({ - // title: '请选择省市区', - // icon: 'none', - // duration: 1000 - // }) - // } - else if (this.lxname == '') { + }else if (this.lxname == '') { uni.showToast({ title: '请输入客服名称', icon: 'none', @@ -322,10 +330,12 @@ duration: 1000 }) } else { + let urlString = this.imglist.filter(item => typeof item == 'string').join(',') + console.log(urlString); this.btnmsk = true let data = { name: this.shopname, - picture: this.imglist, + picture: urlString, address: this.jtdz, lng: this.longitude, lat: this.latitude, @@ -438,34 +448,6 @@ } }) }, - // 支付宝使用 - btnzfb() { - let _this = this - let math = 'static/' + _this.$u.guid(20) - uni.chooseImage({ - count: 1, - type: 'all', - success(res) { - const tempFilePaths = res.tempFiles - wx.uploadFile({ - url: 'https://up-z2.qiniup.com', - name: 'file', - filePath: tempFilePaths[0].path, - formData: { - token: _this.token, //后端返回的token - key: 'smartmeter/img/' + math - }, - success: function(res) { - let str = JSON.parse(res.data) - console.log(str.key) - _this.userImgs = 'https://api.ccttiot.com/' + str.key - _this.imglist = _this.userImgs - _this.imgflag = false - } - }); - } - }) - }, } } @@ -502,13 +484,17 @@ .box { width: 750rpx; height: 1440rpx; + padding-bottom: 300rpx; + box-sizing: border-box; + overflow: scroll; background: #F4F5F7; border-radius: 0rpx 0rpx 0rpx 0rpx; padding-top: 40rpx; .list { width: 680rpx; - height: 1060rpx; + max-height: 5060rpx; + padding-bottom: 30rpx; background: #FFFFFF; border-radius: 24rpx 24rpx 24rpx 24rpx; margin: auto; @@ -533,7 +519,32 @@ font-size: 40rpx; color: #FFFFFF; } - + .container { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + margin-top: 40rpx; + } + .piclist{ + .wz{ + margin-top: 20rpx; + width: 100%; + text-align: center; + color: red; + } + } + .swiper { + width: 100%; + height: 300rpx; + border-radius: 30rpx; + overflow: hidden; + } + + .slide-image { + width: 100%; + height: 100%; + } .icon { display: flex; flex-wrap: wrap; diff --git a/page_fenbao/statulist/nearby/index.vue b/page_fenbao/statulist/nearby/index.vue index ac37cdd..26b3c0c 100644 --- a/page_fenbao/statulist/nearby/index.vue +++ b/page_fenbao/statulist/nearby/index.vue @@ -24,7 +24,7 @@ - + @@ -58,7 +58,7 @@ - + diff --git a/page_fenbao/statulist/taocanlist/addtaocan/index.vue b/page_fenbao/statulist/taocanlist/addtaocan/index.vue index 727ec66..e6fddfa 100644 --- a/page_fenbao/statulist/taocanlist/addtaocan/index.vue +++ b/page_fenbao/statulist/taocanlist/addtaocan/index.vue @@ -612,6 +612,12 @@ this.deviceId + '&modevalue=' + this.modevalue + '&sn=' + this.sn }) + }else if(this.modevalue == 4){ + uni.reLaunch({ + url: '/page_components/bindszthr?id=' + + this.deviceId + '&modevalue=' + this.modevalue + + '&sn=' + this.sn + }) } }, // 统一全天时间 @@ -982,6 +988,12 @@ url: '/page_fenbao/statulist/taocanlist/index?id=' + this.deviceId + '&modevalue=' + this .modevalue + '&sn=' + this.sn }) + }else if (this.modevalue == 4) { + uni.reLaunch({ + url: '/page_components/bindszthr?id=' + + this.deviceId + '&modevalue=' + this.modevalue + + '&sn=' + this.sn + }) } }, diff --git a/page_user/mapditu/index.vue b/page_user/mapditu/index.vue index 1d3a357..bb80249 100644 --- a/page_user/mapditu/index.vue +++ b/page_user/mapditu/index.vue @@ -18,7 +18,20 @@ - + + + + + + + @@ -45,7 +58,7 @@ @@ -543,15 +556,16 @@ } page { - background:#D9D8FF; + background:#f8f8f8; border-radius: 0rpx 0rpx 0rpx 0rpx; } .bjimg{ width: 100%; - height: 176rpx; + height: 210rpx; position: fixed; top: 0; left: 0; + z-index: 99; } .pic { width: 100%; @@ -561,6 +575,22 @@ height: 434rpx; mode: "aspectFill"; } + .container { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + } + + .swiper { + width: 100%; + height: 100%; /* 根据需要调整高度 */ + } + + .slide-image { + width: 100%; + height: 100%; + } } .page { // width: 750rpx; @@ -578,7 +608,7 @@ .card { display: flex; - justify-content:space-between; + // justify-content:space-between; margin-top: 20rpx; width: 672rpx; height: 250rpx; @@ -650,13 +680,13 @@ // -webkit-transform: translateX(-50%); // transform: translateX(-50%); width: 100%; - height: 91vh; + max-height: 9999rpx; background: #f8f8f8; - box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08); margin: auto; padding: 46rpx 40rpx; + padding-bottom: 100rpx; box-sizing: border-box; - + .chakan { display: flex; justify-content: space-between; diff --git a/page_user/mapditu/orderxq.vue b/page_user/mapditu/orderxq.vue index a89531f..2636c54 100644 --- a/page_user/mapditu/orderxq.vue +++ b/page_user/mapditu/orderxq.vue @@ -38,9 +38,9 @@ 用户手机{{detailobj.userMobile == undefined ? '--' : detailobj.userMobile}} - + 店铺名称{{detailobj.storeName == undefined ? '--' : detailobj.storeName}} diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue index 3f10c5f..bf13ca7 100644 --- a/page_user/sbdetail.vue +++ b/page_user/sbdetail.vue @@ -7,39 +7,43 @@ - - {{ deviceInfo.deviceName == null ? '' : deviceInfo.deviceName }} - - 蓝牙已连接 - 蓝牙连接中 - 蓝牙未连接 - + + {{ deviceInfo.deviceName == null ? '' : deviceInfo.deviceName }} + + SN:{{ deviceInfo.deviceNo == null ? '' : deviceInfo.deviceNo }}
- 网络: 在线 + 在线
- 网络: 离线 + 离线
- 状态: 空闲 + 空闲
- 状态: 使用中 + 使用中 +
+
+ {{deviceInfo.storeName}}
- - SN:{{ deviceInfo.deviceNo == null ? '' : deviceInfo.deviceNo }} - - 更新时间:{{deviceInfo.lastPullTime == null ? '--' : deviceInfo.lastPullTime}} + + + + 蓝牙已连接 + 蓝牙连接中 + 蓝牙未连接 + +
+ style="width: 196rpx;height: 196rpx;border-radius: 10rpx;"> @@ -54,15 +58,12 @@
- + 实时参数 - 点击刷新 - + + - @@ -145,16 +146,14 @@ - 其他功能 - - + 其他功能 + 充值记录 - @@ -162,7 +161,6 @@ style="width: 44rpx;height: 44rpx;"> 收费方式 - @@ -170,7 +168,6 @@ style="width: 44rpx;height: 44rpx;"> 归零 - @@ -179,10 +176,7 @@ 充值 - - - 配网 - - 设备二维码 + 二维码 - @@ -207,29 +199,30 @@ style="width: 44rpx;height: 40rpx;"> 上报异常 - - + + + 所属店铺 + + + + + + 解除绑定 + + + - - @@ -281,7 +274,8 @@ - + + @@ -299,6 +293,26 @@ + + + + + 修改名称 + + + + + + + 取消 + + + 确定 + + + + + @@ -307,6 +321,8 @@ export default { data() { return { + showmc:false, + xgname:'', suitSurplus:'', showflag: false, imgflag: false, @@ -315,6 +331,7 @@ bluetoothflag: false, shibaiflag: false, danwei: '请选择时长单位', + wateringList: [], listdanwei: [{ value: 2, label: '小时' @@ -369,12 +386,14 @@ sklistflag:false, ljtype:'2', userTpye_userid:'', - ver_dataflag:2 + ver_dataflag:2, + showshop: false, } }, onLoad(option) { let id = option.id this.id = id + this.gettanc() if(this.setMode == null){ this.Binddevice() } @@ -462,42 +481,105 @@ this.drawCanvas() }, methods: { + // 点击修改名称 + btnxgname(){ + this.xgname = this.deviceInfo.deviceName + this.showmc = true + }, + // 点击修改名称 + subname(){ + let data = { + deviceId: this.id, + deviceName: this.xgname, + } + this.$u.put('/app/device', data).then(res => { + if (res.code == 200) { + this.showmc = false + this.getshuax() + uni.showToast({ + title: '修改成功', + icon: 'success', + duration: 2000 + }) + } + }) + }, + // 点击取消修改名称 + close() { + this.showmc = false + }, + // 点击更换店铺 + confirms(e){ + let data = { + deviceId: this.id, + storeId:e[0].value + } + this.$u.put('/app/device', data).then(res => { + if (res.code == 200) { + this.getshuax() + uni.showToast({ + title: '修改成功', + icon: 'success', + duration: 2000 + }) + } + }) + }, + sremakes() { + this.showshop = true + }, + gettanc(){ + this.$u.get('/app/store/listCount').then((res) => { + if (res.code == 200) { + this.total = res.total + if (res.data.length > 0) { + let arr = res.data.map(row => ({ + value: row.storeId, + label: row.name + })) + this.wateringList = arr.slice(1) + } + } + }) + }, + // 解绑设备 + deldevice() { + uni.showModal({ + title: '确认解绑', + content: '您确定要解绑设备吗?', + success: (resModal) => { + if (resModal.confirm) { + this.$u.delete(`/app/device/mch/unbind/${this.id}`).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: '解除成功', + icon: 'success', + duration: 2000 + }) + uni.reLaunch({ + url:'/pages/index/index' + }) + } else if(res.code == 500){ + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }) + } + }) + } else if (resModal.cancel) { + + } + } + }) + }, + // 自定义返回 btns(){ uni.reLaunch({ url:'/pages/index/index' }) }, - // 拿到mac调用查询附近设备进行匹配 - // Binddevice(){ - // this.ver_dataflag = 2 - // 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 - // }) - // xBlufi.notifyInitBleEsp32({ - // deviceId: this.deviceId - // }) - // }, 2000) - // setTimeout(()=>{ - // if(this.setMode == null){ - // this.ver_dataflag = 1 - // setTimeout(()=>{ - // this.Binddevice() - // },3000) - // } - // },15000) - // }, + // 连接蓝牙 Binddevice() { xBlufi.initXBlufi(1); xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent); @@ -1429,10 +1511,11 @@ width: 196rpx; height: 40rpx; line-height: 40rpx; - background-color: rgba(198, 209, 248, .6); - color: #3D3D3D; + background-color: #8883F0; + color: #fff; position: absolute; bottom: 0; + border-radius: 0 0 10rpx 10rpx; } .conts { @@ -1556,7 +1639,66 @@ margin-top: 100rpx; } } - + .popcard { + display: flex; + justify-content: center; + flex-wrap: wrap; + width: 550rpx; + height: 400rpx; + border-radius: 20rpx; + + .tit { + display: flex; + justify-content: center; + width: 100%; + align-items: center; + font-size: 28rpx; + font-weight: 700; + } + + .ipt { + margin-top: 60rpx; + width: 80%; + + .u-input::placeholder { + font-size: 20px; + color: red; + } + } + + .btnbox { + width: 100%; + display: flex; + flex-wrap: nowrap; + border-radius: 0 0 20rpx 20rpx; + + .btn2 { + display: flex; + align-items: center; + justify-content: center; + width: 50%; + font-size: 32rpx; + font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; + font-weight: 400; + color: #000; + background-color: #fff; + } + + .btn1 { + display: flex; + align-items: center; + justify-content: center; + width: 50%; + font-size: 32rpx; + font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; + font-weight: 400; + color: #fff; + background-color: #8883f0; + border: 1rpx solid #ccc; + } + } + + } /deep/ .u-title { padding-bottom: 22rpx; } @@ -1707,6 +1849,8 @@ justify-content: space-between; .mid_left { + border-radius: 20rpx; + border: 1px solid #ff; image { width: 160rpx; height: 160rpx; @@ -1722,16 +1866,14 @@ .mid_top { width: 100%; font-size: 36rpx; - font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; font-weight: 600; color: #333; display: flex; align-items: center; - justify-content: space-between; - padding-right: 10rpx; + padding-right: 4rpx; box-sizing: border-box; text{ - margin-left: 20rpx; + margin-left: 10rpx; font-weight: 400; font-size: 24rpx; padding: 6rpx; @@ -1742,21 +1884,10 @@ .mid_bot { width: 100%; display: flex; - justify-content: space-between; padding-right: 102rpx; box-sizing: border-box; - // flex-wrap: nowrap; - // align-items: center; - margin-top: 6rpx; - - - + margin-top: 10rpx; .tip { - // display: flex; - // align-items: center; - // justify-content: center; - // margin-left: 10rpx; - // padding: 0 10rpx; box-sizing: border-box; background: rgba(204, 204, 204, 0); opacity: 1; @@ -1764,6 +1895,7 @@ font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; font-weight: 400; color: #5B5B5B; + margin-right: 16rpx; } } } @@ -1872,39 +2004,6 @@ color: #3D3D3D; font-weight: 600; } - - .cont_box { - margin-top: 32rpx; - display: flex; - flex-wrap: nowrap; - justify-content: space-around; - - - .cont { - width: 25%; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - text-align: center; - - .top { - width: 100%; - font-size: 32rpx; - font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; - font-weight: 400; - color: #262B37; - } - - .bot { - margin-top: 20rpx; - font-size: 26rpx; - font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; - font-weight: 400; - color: #262B37; - } - } - } } .card3 { @@ -1927,42 +2026,29 @@ .cont_box { padding: 0 40rpx; - margin-top: 32rpx; display: flex; - flex-wrap: nowrap; - justify-content: space-around; - + padding-bottom: 40rpx; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; .cont:last-child { margin-right: 0rpx; } - .cont { - width: 100%; - display: flex; - justify-content: space-between; - align-items: center; - .jt{ - width: 15rpx; - height: 26rpx; - } + width: 25%; + text-align: center; + margin-top: 58rpx; .top { width: 100%; - display: flex; - align-items: center; - border-bottom: 1px solid #D8D8D8; - padding-top: 20rpx; - padding-bottom: 20rpx; - box-sizing: border-box; image { - width: 44rpx; - height: 44rpx; - margin-right: 26rpx; + width: 58rpx !important; + height: 58rpx !important; } .bot { - font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; font-weight: 400; font-size: 32rpx; color: #3D3D3D; + margin-top: 24rpx; } } } diff --git a/page_user/setting.vue b/page_user/setting.vue index 90e30ac..a87fd54 100644 --- a/page_user/setting.vue +++ b/page_user/setting.vue @@ -69,17 +69,7 @@
- - - 类型 - - - - {{listobj.model == null ? '' : listobj.model}} - - - - + WiFi名称 @@ -89,6 +79,17 @@
+ + + 类型 + + + + {{listobj.model == null ? '' : listobj.model}} + + + + 解除绑定 diff --git a/pages/index/index.vue b/pages/index/index.vue index dfef08b..5df748b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -149,7 +149,7 @@ - + @@ -272,7 +272,7 @@ total: 0, shujuflag: false, id: '', - + showshop: false, touchStartX: 0, // 触屏起始点x touchStartY: 0, // 触屏起始点y @@ -794,7 +794,27 @@ } } }, - + // 获取店铺 + sremakes(item) { + if(this.shoplist.length == 0){ + uni.showModal({ + title: '提示', + content: '未创建店铺,是否去创建店铺?', + success: function(res) { + if (res.confirm) { + uni.navigateTo({ + url:'/page_fenbao/statulist/myshop/shopxx/index' + }) + } else if (res.cancel) { + + } + } + }) + }else{ + this.id = item.deviceId + this.showshop = true + } + }, // 扫一扫绑定设备 saoyisao() { @@ -873,28 +893,6 @@ } }) }, - - // 获取店铺 - sremakes(item) { - if(this.shoplist.length == 0){ - uni.showModal({ - title: '提示', - content: '未创建店铺,是否去创建店铺?', - success: function(res) { - if (res.confirm) { - uni.navigateTo({ - url:'/page_fenbao/statulist/myshop/shopxx/index' - }) - } else if (res.cancel) { - - } - } - }) - }else{ - this.id = item.deviceId - this.showshop = true - } - }, gettanc() { this.$u.get('/app/store/listCount').then((res) => { if (res.code == 200) { @@ -1021,6 +1019,14 @@ return item.name === '全部' }) this.storeId = this.groupList[0].storeId + if (res.data.length > 0) { + let arr = res.data.map(row => ({ + value: row.storeId, // 将storeId赋值给value + label: row.name // 将name赋值给label + })) + this.shoplist = arr + this.shoplist = this.shoplist.slice(1) + } } }) }, diff --git a/pages/shouye/index.vue b/pages/shouye/index.vue index de23fa5..56cb6c9 100644 --- a/pages/shouye/index.vue +++ b/pages/shouye/index.vue @@ -4,7 +4,7 @@ - + @@ -138,17 +138,19 @@ - + 创想物联公告 - 公告标题 + {{gonggaoxq.noticeTitle}} - - + + + 我知道了 + @@ -198,60 +200,24 @@ isStaff:null, dlflag:false, announcements: {}, - gonggaoxq:{} + gonggaoxq:{}, + gonggaoflag:false, + bangdingid:'' } }, onLoad(option) { if (option.id) { - let id = option.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.data == 0) { - uni.showModal({ - title: '提示', - content: '该设备未录入,请先进行录入', - success: function(res) { - if (res.confirm) { - // uni.navigateTo({ - // url: '/page_fenbao/zhuce?sn=' + id - // }) - } - } - }) - } - }) + this.bangdingid = option.id } + wx.openBluetoothAdapter({ + success: function (res) { + console.log('蓝牙适配器初始化成功') + // 你可以在这里继续调用其他蓝牙相关的API + }, + fail: function (err) { + console.error('蓝牙适配器初始化失败,可能是因为没有权限', err) + } + }) }, // 分享到好友(会话) onShareAppMessage: function() { @@ -270,22 +236,13 @@ }, onShow() { this.logins() - wx.openBluetoothAdapter({ - success: function (res) { - console.log('蓝牙适配器初始化成功'); - // 你可以在这里继续调用其他蓝牙相关的API - }, - fail: function (err) { - console.error('蓝牙适配器初始化失败,可能是因为没有权限', err); - } - }) this.getgonggao() this.getad() this.getzf() this.gethuidaio() this.getshiy() setTimeout(()=>{ - this.onControltap() + this.onControltap() },1000) }, onReady() { @@ -306,6 +263,20 @@ }, methods: { + // 点击头部滚动通知 + btntopgg(){ + this.$u.get(`/app/notice/${this.announcements.noticeId}`).then(resp =>{ + if(resp.code == 200){ + this.gonggaoxq = resp.data + this.gonggaoflag = true + } + }) + }, + // 点击公共我知道了 + btnggtc(){ + this.gonggaoflag = false + uni.setStorageSync('noticeId', this.announcements.noticeId) + }, // 获取最新公告 getgonggao(){ this.$u.get("/app/notice/new").then(res =>{ @@ -313,7 +284,10 @@ this.announcements = res.data this.$u.get(`/app/notice/${res.data.noticeId}`).then(resp =>{ if(resp.code == 200){ - this.gonggaoxq = res.data + this.gonggaoxq = resp.data + if(resp.data.noticeId != uni.getStorageSync('noticeId')){ + this.gonggaoflag = true + } } }) } @@ -682,7 +656,9 @@ icon: 'success', duration: 1000 }) - this.getuserinfo() + setTimeout(()=>{ + this.getuserinfo() + },1000) }else{ uni.showToast({ title: res.msg, @@ -864,11 +840,65 @@ uni.setStorageSync('userType', res.data) this.userType = res.data.userType this.deviceCount = res.data.deviceCount + if(this.bangdingid != '' && this.phonenumber == ''){ + this.huoqutelflag = true + }else{ + this.getbdsb() + } } else { this.jmlogin() } }) }, + // 绑定设备 + getbdsb(){ + let that = this + let data = { + deviceNo: that.bangdingid + } + that.$u.get(`/app/device/isBind?deviceNo=${that.bangdingid}`).then(res => { + if (res.data == 2) { + that.$u.get(`/app/device/${that.bangdingid}/withSuitList`).then((res) => { + if (res.code == 200) { + uni.navigateTo({ + url: '/page_components/fuwu/index?id=' + that.bangdingid + }) + } + }) + } 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/${that.bangdingid}/bySn`).then((res) => { + if (res.code == 200) { + uni.navigateTo({ + url: '/page_components/bindsz?id=' + res.data.deviceId + }) + } + }) + } + }) + } + } + }) + } else if (res.data == 0) { + uni.showModal({ + title: '提示', + content: '该设备未录入,请先进行录入', + showCancel:false, + success: function(res) { + if (res.confirm) { + + } + } + }) + } + }) + }, // 静默登录 jmlogin() { let taht = this @@ -966,7 +996,52 @@ transform: translateX(-100%); } } - + .noticetc{ + width: 680rpx; + height: 950rpx; + background-color: #fff; + border-radius: 20rpx; + padding: 0 20rpx; + box-sizing: border-box; + position: fixed; + top: 340rpx; + left: 50%; + transform: translateX(-50%); + z-index: 2; + .btn{ + width: 600rpx; + height: 100rpx; + line-height: 100rpx; + text-align: center; + border-radius: 50rpx; + background-color: #8883F0; + color: #fff; + font-size: 32rpx; + font-weight: 600; + margin: auto; + margin-top: 30rpx; + } + .name{ + width: 100%; + text-align: center; + font-size: 36rpx; + font-weight: 600; + margin-top: 30rpx; + } + .biaoti{ + font-size: 32rpx; + margin-top: 20rpx; + } + .cont{ + width: 100%; + height: 620rpx; + overflow: scroll; + background-color: #ececec; + margin-top: 20rpx; + padding: 20rpx; + box-sizing: border-box; + } + } .shenfentc{ width: 632rpx; height: 498rpx; diff --git a/pages/tj.vue b/pages/tj.vue index 8e168f9..432c67a 100644 --- a/pages/tj.vue +++ b/pages/tj.vue @@ -33,7 +33,7 @@ - {{userobj.withDrawlAmount == null ? '0.00' : userobj.withDrawlAmount}} + {{tjobj.totalIncome == null ? '0.00' : tjobj.totalIncome}} 总收入/元 @@ -41,7 +41,7 @@ - {{tjobj.todayOrder == null ? 0 : tjobj.todayOrder}} + {{tjobj.totalOrder == null ? 0 : tjobj.totalOrder}} 总订单/笔 @@ -49,7 +49,7 @@ - {{userobj.balance == null ? '0.00' : userobj.balance}} + {{tjobj.balance == null ? '0.00' : tjobj.balance}} 账户余额 @@ -225,7 +225,7 @@ } }, onLoad(option) { - + }, onShow() { this.tabindex = 1 @@ -239,18 +239,18 @@ this.formattedCurrentDate = this.formatDate(currentDate) this.formattedThirtyDaysAgo = this.formatDate(thirtyDaysAgo) console.log(this.formattedCurrentDate,this.formattedThirtyDaysAgo) - this.getinfo() + // this.getinfo() this.gettimes() this.gettj() }, methods: { - getinfo(){ - this.$u.get("/app/user/userInfo").then((res) => { - if (res.code == 200) { - this.userobj = res.data - } - }) - }, + // getinfo(){ + // this.$u.get("/app/user/userInfo").then((res) => { + // if (res.code == 200) { + // this.userobj = res.data + // } + // }) + // }, // 点击导航栏回到首页 btnshouye() {