diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 9c734f5..dec621d 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -19,8 +19,8 @@ const install = (Vue, vm) => { // }, // }); Vue.prototype.$u.http.setConfig({ - // baseUrl: 'http://192.168.2.81:10002', - baseUrl: 'https://kg.chuangtewl.com/prod-api', + baseUrl: 'http://192.168.2.81:10002', + // baseUrl: 'https://kg.chuangtewl.com/prod-api', // loadingText: '努力加载中~', // loadingTime: 1000, // 设置自定义头部content-type diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue index 6b11e1b..32c89d8 100644 --- a/components/tab-bar/tab-bar.vue +++ b/components/tab-bar/tab-bar.vue @@ -89,7 +89,7 @@ .cont { position: fixed; left: 60rpx; - bottom: 78rpx; + bottom: 58rpx; width: 632rpx; height: 128rpx; background: #FFFFFF; diff --git a/page_components/eletj.vue b/page_components/eletj.vue index 45e1f81..bc99330 100644 --- a/page_components/eletj.vue +++ b/page_components/eletj.vue @@ -286,8 +286,6 @@ this.$u.put(`/app/bill/${this.id}/refreshPayResult`).then(res => { this.getDevice() }) - // this.getDevice(id) - // console.log(option); if (option.flag) { this.opflag = option.flag } diff --git a/page_user/order_detail.vue b/page_user/order_detail.vue index e015e31..448e03f 100644 --- a/page_user/order_detail.vue +++ b/page_user/order_detail.vue @@ -39,7 +39,7 @@ 变动金额 - ¥{{list.amount}} + ¥{{list.amount == undefined ? '--' : list.amount}} @@ -51,7 +51,7 @@ 变动日期 - {{list.createTime}} + {{list.createTime == undefind ? '--' : list.createTime}} @@ -59,7 +59,7 @@ 变动前余额 - ¥{{list.beforeBalance}} + ¥{{list.beforeBalance == undefind ? '--' : list.beforeBalance}} @@ -67,7 +67,7 @@ 变动后余额 - ¥{{list.afterBalance}} + ¥{{list.afterBalance == undefind ? '--' : list.afterBalance}} @@ -75,16 +75,16 @@ 用户名称 - {{list.userName}} + {{list.userName == undefind ? '--' : list.userName}} - + 变动原因 - {{list.reason}} + {{list.reason == undefind ? '--' : list.reason}} diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue index b84eb40..7f30985 100644 --- a/page_user/sbdetail.vue +++ b/page_user/sbdetail.vue @@ -182,7 +182,7 @@ 请输入您需要充值的时长或度数 - + 取消 - - - - + + + + + + + + + 确认修改 @@ -79,61 +84,6 @@ 取消 - - - - - - - 常见问题 - - - - - - - - - - 意见反馈 - - - - - - - - - - - - - - - - 设备分组 - - - 管理 - - - - - - 全部 - - - 1 - - - - - - - - - - @@ -142,6 +92,17 @@ export default { data() { return { + onetype: 'password', + passwordIcon: true, + border: true, + twotype: 'password', + passwordIcontwo: true, + bordertwo: true, + thrtype: 'password', + passwordIconthr: true, + borderthr: true, + thrpwd:'password', + twopwd:'password', oldmm:'', newmm:'', qrmm:'', @@ -186,6 +147,28 @@ } }, methods: { + onepwdpassword(){ + this.onepwd = 'password' + }, + onepwdtext(){ + this.onepwd = 'text' + }, + + twopwdpassword(){ + this.twopwd = 'password' + }, + twopwdtext(){ + this.twopwd = 'text' + }, + + thrpwdpassword(){ + this.thrpwd = 'password' + }, + thrpwdtext(){ + this.thrpwd = 'text' + }, + + // 修改密码 btnxg(){ this.pwdflag = true @@ -292,7 +275,7 @@ /deep/ .u-title{ padding-bottom: 22rpx; } - /deep/ .u-icon__icon{ + /deep/ .uicon-nav-back{ padding-bottom: 22rpx; } page { @@ -308,26 +291,15 @@ color: #000; margin-bottom: 30rpx; } - input{ - width: 562rpx; - height: 90rpx; - margin-top: 20rpx; - border-radius: 20rpx; - background-color: #eeefee; - text-align: center; - padding-left: 30rpx; - box-sizing: border-box; - text-align: left; - } .mmdl{ width: 562rpx; - height: 96rpx; + height: 80rpx; background: #8883F0; border-radius: 52rpx 52rpx 52rpx 52rpx; font-weight: 500; font-size: 36rpx; color: #FFFFFF; - line-height: 96rpx; + line-height: 80rpx; margin-top: 50rpx; } } diff --git a/pages/login/login.vue b/pages/login/login.vue index fabe557..e19ac16 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -23,54 +23,67 @@ —— 账号密码登录 —— - —— 暂不授权登录 —— - - + + 账号密码登录 - - + + + + + + + + 登录 - + 取消 - + 验证码登录 - - - - 发送验证码 + + + + + + + + + {{tips}} + + 登录 - + 取消 - - - + + + @@ -79,6 +92,12 @@ export default { data() { return { + tips: '', + seconds: 60, + onetype: 'password', + passwordIcon: true, + border: true, + twopwd: 'password', bgc: { backgroundColor: "#7D86EF", }, @@ -86,47 +105,74 @@ chooseType: true, usertype: '', login: false, - id:'', - dlflag:false, - zh:'', - mm:'', - yzmflag:false, - syflag:true + id: '', + dlflag: false, + zh: '', + mm: '', + yzm: '', + yzmflag: false, + syflag: true } }, onLoad(option) { - if(option.id){ + if (option.id) { this.id = option.id } }, // 分享到好友(会话) - 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: { + codeChange(text) { + this.tips = text; + }, + getCode() { + if (this.$refs.uCode.canGetCode) { + // 模拟向后端请求验证码 + uni.showLoading({ + title: '正在获取验证码' + }) + setTimeout(() => { + uni.hideLoading(); + // 这里此提示会被this.start()方法中的提示覆盖 + this.$u.toast('验证码已发送'); + // 通知验证码组件内部开始倒计时 + this.$refs.uCode.start(); + }, 1000); + } else { + this.$u.toast('验证码已发送'); + } + }, + start() { + this.$u.toast('验证码已发送'); + }, + + + // 账号密码登录 - btndl(){ + btndl() { let data = { - username:this.zh, - password:this.mm + username: this.zh, + password: this.mm } this.$u.post("/app/auth/login", data).then(res => { - if(res.code == 200){ + if (res.code == 200) { wx.setStorageSync('token', res.token); this.ceshi() - }else{ + } else { uni.showToast({ title: res.msg, icon: 'none', @@ -135,20 +181,20 @@ } }) }, - btnqx(num){ - if(num == 1){ + btnqx(num) { + if (num == 1) { this.dlflag = false this.syflag = true - }else{ + } else { this.yzmflag = false this.syflag = true } }, - btnyzm(){ + btnyzm() { this.yzmflag = true this.syflag = false }, - btnshoudong(){ + btnshoudong() { this.dlflag = true this.syflag = false }, @@ -166,7 +212,8 @@ console.log("eeeeeeee", e); const wxLoginAsync = () => { return new Promise((resolve, reject) => { - wx.login({success(res) { + wx.login({ + success(res) { if (res.code) { let data = { loginCode: res.code, @@ -176,36 +223,37 @@ } else { reject(res.errMsg) } - },fail(err) { + }, + fail(err) { reject(err) } }) }) } wxLoginAsync().then(async (data) => { - this.$u.post("/app/auth/wxLogin", data).then((res) => { - if (res.code == 200) { - wx.setStorageSync('token', res.token); - that.ceshi() - } - }) - }).catch((err) => { - console.error(err) + this.$u.post("/app/auth/wxLogin", data).then((res) => { + if (res.code == 200) { + wx.setStorageSync('token', res.token); + that.ceshi() + } }) + }).catch((err) => { + console.error(err) + }) }, async ceshi() { this.$u.get("/app/user/userInfo").then((res) => { - if(this.id == 1){ + if (this.id == 1) { uni.navigateBack() - }else{ + } else { uni.reLaunch({ url: '/pages/shouye/index' }) } }) }, - - btnbudl(){ + + btnbudl() { uni.reLaunch({ url: '/pages/shouye/index' }) @@ -215,47 +263,60 @@