From c21fc37b9c70801a2c3a2bbb1219d8305e181658 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Thu, 16 May 2024 18:02:44 +0800 Subject: [PATCH] aa --- common/http.interceptor.js | 2 +- page_user/hezuo/index.vue | 57 ++- page_user/shopedit.vue | 462 ++++++++++++++++-- page_user/yajin/index.vue | 2 +- page_user/yunying/gongdan/mingxi.vue | 3 +- pages/abbr/index.vue | 2 +- .../devicemanagement/failure/index.vue | 39 ++ .../failure/yichang/index.vue | 16 +- pages/agentpages/devicemanagement/index.vue | 34 +- .../repairapplication/index.vue | 45 +- pages/agentpages/index/index.vue | 16 +- .../shopguanli/discipleshop/index.vue | 27 +- pages/agentpages/shopguanli/index.vue | 12 +- .../agentpages/shopguanli/setupshop/index.vue | 427 ++++++++++++++-- pages/agentpages/user/index.vue | 6 +- pages/detail/detailed/index.vue | 2 +- pages/index/index.vue | 15 +- pages/personal/index.vue | 14 +- static/image/a1.png | Bin 2810 -> 0 bytes static/image/a2.png | Bin 2694 -> 0 bytes static/image/a3.png | Bin 2908 -> 0 bytes static/image/a4.png | Bin 3266 -> 0 bytes static/image/a5.png | Bin 164366 -> 0 bytes static/image/ap2.png | Bin 3066 -> 0 bytes static/image/ap3.png | Bin 4028 -> 0 bytes static/image/ap4.png | Bin 3873 -> 0 bytes static/image/ap5.png | Bin 3057 -> 0 bytes static/image/ap6.png | Bin 3604 -> 0 bytes static/image/ddgl.png | Bin 2518 -> 0 bytes static/image/dldp.png | Bin 891 -> 0 bytes static/image/dlgl.png | Bin 3781 -> 0 bytes static/image/dlkf.png | Bin 1007 -> 0 bytes static/image/dlwx.png | Bin 1034 -> 0 bytes static/image/dp1.png | Bin 3358 -> 0 bytes static/image/dpgl.png | Bin 3074 -> 0 bytes static/image/hydp.png | Bin 3594 -> 0 bytes static/image/icon1.png | Bin 1682 -> 0 bytes static/image/icon2.png | Bin 1001 -> 0 bytes static/image/icon3.png | Bin 1001 -> 0 bytes static/image/icon4.png | Bin 890 -> 0 bytes static/image/icon5.png | Bin 1111 -> 0 bytes static/image/icon6.png | Bin 591 -> 0 bytes static/image/icon7.png | Bin 728 -> 0 bytes static/image/lx.png | Bin 1007 -> 0 bytes static/image/nt20.jfif | Bin 9300 -> 0 bytes static/image/sbgl.png | Bin 3328 -> 0 bytes static/image/sjfx.png | Bin 2971 -> 0 bytes static/image/sm.png | Bin 769 -> 0 bytes static/image/tb.png | Bin 2551 -> 0 bytes static/image/xing.png | Bin 479 -> 0 bytes static/image/yygl.png | Bin 2906 -> 0 bytes 51 files changed, 1026 insertions(+), 155 deletions(-) delete mode 100644 static/image/a1.png delete mode 100644 static/image/a2.png delete mode 100644 static/image/a3.png delete mode 100644 static/image/a4.png delete mode 100644 static/image/a5.png delete mode 100644 static/image/ap2.png delete mode 100644 static/image/ap3.png delete mode 100644 static/image/ap4.png delete mode 100644 static/image/ap5.png delete mode 100644 static/image/ap6.png delete mode 100644 static/image/ddgl.png delete mode 100644 static/image/dldp.png delete mode 100644 static/image/dlgl.png delete mode 100644 static/image/dlkf.png delete mode 100644 static/image/dlwx.png delete mode 100644 static/image/dp1.png delete mode 100644 static/image/dpgl.png delete mode 100644 static/image/hydp.png delete mode 100644 static/image/icon1.png delete mode 100644 static/image/icon2.png delete mode 100644 static/image/icon3.png delete mode 100644 static/image/icon4.png delete mode 100644 static/image/icon5.png delete mode 100644 static/image/icon6.png delete mode 100644 static/image/icon7.png delete mode 100644 static/image/lx.png delete mode 100644 static/image/nt20.jfif delete mode 100644 static/image/sbgl.png delete mode 100644 static/image/sjfx.png delete mode 100644 static/image/sm.png delete mode 100644 static/image/tb.png delete mode 100644 static/image/xing.png delete mode 100644 static/image/yygl.png diff --git a/common/http.interceptor.js b/common/http.interceptor.js index bdae802..f5e4284 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -1,6 +1,6 @@ const install = (Vue, vm) => { Vue.prototype.$u.http.setConfig({ - baseUrl: 'http://192.168.2.243:3100/dev-api', + baseUrl: 'http://192.168.2.17:3100/dev-api', // baseUrl: 'https://znb.ccttiot.com', loadingText: '努力加载中~', loadingTime: 800, diff --git a/page_user/hezuo/index.vue b/page_user/hezuo/index.vue index a726edf..d6d8045 100644 --- a/page_user/hezuo/index.vue +++ b/page_user/hezuo/index.vue @@ -13,7 +13,7 @@ 验证码 - 获取验证码 + {{yzm}} @@ -37,7 +37,7 @@ background: '#25CE88' }, show: false, - tit:'请选择您的合作意向', + tit: '请选择您的合作意向', list: [{ value: '1', label: '成为充电合作商' @@ -51,16 +51,61 @@ label: '贴牌OEM' } ], + yzm: '获取验证码', + countdown: 0, // 倒计时变量 + countdownInterval: null, // 倒计时间隔ID } }, methods: { btnxz() { - this.show = true + this.show = true }, - confirm(e){ + confirm(e) { this.tit = e[0].label - } - } + }, + hqyzm() { + if(this.yzm == '获取验证码'){ + uni.showToast({ + title: '验证码已发送', + icon: 'success', + duration: 2000 + }); + // 清除之前的定时器 + this.clearCountdown(); + // 开始新的倒计时 + this.startCountdown(); + }else{ + uni.showToast({ + title: '验证码已发送', + icon: 'none', + duration: 2000 + }); + } + }, + startCountdown() { + this.yzm = '60秒'; + this.countdown = 60; + this.countdownInterval = setInterval(() => { + if (this.countdown > 0) { + this.countdown--; + this.yzm = this.countdown + '秒'; + } else { + this.clearCountdown(); + this.yzm = '获取验证码'; + } + }, 1000); + }, + clearCountdown() { + if (this.countdownInterval) { + clearInterval(this.countdownInterval); + this.countdownInterval = null; + } + }, + }, + beforeDestroy() { + // 在组件销毁前清除定时器 + this.clearCountdown(); + }, } diff --git a/page_user/shopedit.vue b/page_user/shopedit.vue index 57ae2ce..4417f81 100644 --- a/page_user/shopedit.vue +++ b/page_user/shopedit.vue @@ -2,43 +2,81 @@ - - - - 店铺名称 - - - 店铺类型 + + + + 店铺名称 + + + + 店铺类型 + - 营业时间 + 营业时间 + + {{ksyy}} + -- + {{jsyy}} + - - 省市区 + + 省市区 + + + + 联系人 + + + + 联系电话 + - - 经纬度 - - - - + 经纬度 + + + + - 详细地址 + 详细地址 + - - 联系人 + + + + + 上传门头照 + + + 门头照片必须清晰、方正、易于辨识 + + + + + + - - 联系电话 + + 确定修改 - - 保存修改 - - - + + + + + + + + + + @@ -46,18 +84,291 @@ export default { data() { return { - + params: { + hour: true, + minute: true, + }, + show: false, + imglist: '', + token: '', + userImgs: '', + imgflag: true, + selectorshow: false, + selectortext: '请选择商铺类型', + selectorvalue: '', + regionshow: false, + regiontext: '请选择省市区', + regionvalue: '', + selector: [{ + value: 1, + label: '商场' + }, + { + value: 2, + label: '学校' + }, + { + value: 3, + label: '娱乐场所' + }, + { + value: 4, + label: '出租房' + }, + { + value: 5, + label: '其他' + }, + ], + latitude: '请输入纬度', + longitude: '请输入经度', + shopname: '', + yetime: '', + lxname: '', + lxphone: '', + xqdz: '', + ksyy:'开始营业时间', + jsyy:'结束营业时间', + yynum:0, + province:'', + city:'', + area:'', + listobj:{}, + storeId:'' } }, + onLoad(option) { + let obj = JSON.parse(option.obj) + this.listobj = obj + console.log(this.listobj); + this.shopname = this.listobj.name + this.ksyy = this.listobj.businessTimeStart + this.jsyy = this.listobj.businessTimeEnd + this.regiontext = this.listobj.province + this.listobj.city + this.listobj.county + this.lxname = this.listobj.contactName + this.lxphone = this.listobj.contactMobile + this.latitude = this.listobj.lat + this.longitude = this.listobj.lng + this.xqdz = this.listobj.address + this.selectorvalue = this.listobj.type + this.imglist = this.listobj.picture + this.province = this.listobj.province + this.city = this.listobj.city + this.area = this.listobj.county + this.storeId = this.listobj.storeId + if(this.selectorvalue == 1){ + this.selectortext = '商场' + }else if(this.selectorvalue == 2){ + this.selectortext = '学校' + }else if(this.selectorvalue == 3){ + this.selectortext = '娱乐场所' + }else if(this.selectorvalue == 4){ + this.selectortext = '出租房' + }else{ + this.selectortext = '其他' + } + this.getQiniuToken() + }, methods: { + btnyinye(num){ + this.show = true + this.yynum = num + }, + btnyy(e){ + if(this.yynum == 1){ + this.ksyy = e.hour + ':' + e.minute + }else{ + this.jsyy = e.hour + ':' + e.minute + } + }, + btncreat() { + let phoneRegex = /^1[3-9]\d{9}$/ //判断手机号码格式 + if (this.shopname == '') { + uni.showToast({ + title: '请输入店铺名称', + icon: 'none', + duration: 1000 + }); + } else if (this.selectortext == '请选择商铺类型') { + uni.showToast({ + title: '请选择商铺类型', + icon: 'none', + duration: 1000 + }); + } else if (this.ksyy == '开始营业时间') { + uni.showToast({ + title: '请选择开始营业时间', + icon: 'none', + duration: 2000 + }); + } else if (this.jsyy == '结束营业时间') { + uni.showToast({ + title: '请选择结束营业时间', + icon: 'none', + duration: 2000 + }); + } else if (this.regiontext == '请选择省市区') { + uni.showToast({ + title: '请选择省市区', + icon: 'none', + duration: 1000 + }); + } else if (this.lxname == '') { + uni.showToast({ + title: '请输入联系人', + icon: 'none', + duration: 1000 + }); + } else if (this.lxphone == '') { + uni.showToast({ + title: '请输入联系电话', + icon: 'none', + duration: 1000 + }); + } else if (this.latitude == '请输入纬度') { + uni.showToast({ + title: '请输入纬度', + icon: 'none', + duration: 1000 + }); + } else if (this.longitude == '请输入经度') { + uni.showToast({ + title: '请输入经度', + icon: 'none', + duration: 1000 + }); + }else if (this.xqdz == '') { + uni.showToast({ + title: '请输入详细地址', + icon: 'none', + duration: 1000 + }); + } else if (this.imglist == '') { + uni.showToast({ + title: '请上传一张商铺门面照', + icon: 'none', + duration: 1000 + }); + } else { + let data = { + name: this.shopname, + picture: this.imglist, + address: this.xqdz, + lng: this.longitude, + lat: this.latitude, + businessTimeStart:this.ksyy, + businessTimeEnd:this.jsyy, + province:this.province, + city:this.city, + county:this.area, + specificAddress:this.xqdz, + contactName:this.lxname, + contactMobile:this.lxphone, + type:this.selectorvalue, + storeId:this.storeId + } + this.$u.put("/app/store",data).then(res => { + if (res.code == 500) { + uni.showToast({ + title: 'res.msg', + icon: 'success', + duration: 1000 + }) + }else{ + uni.showToast({ + title: '修改成功', + icon: 'success', + duration: 1000 + }) + setTimeout(()=>{ + uni.navigateBack({ + delta: 2 + }) + },1000) + } + }) + } + }, + btnlx() { + this.selectorshow = true + }, + btnselector(e) { + this.selectorvalue = e[0].value + this.selectortext = e[0].label + }, + btnregion() { + this.regionshow = true + }, + btnregions(e) { + this.regiontext = e.province.label + e.city.label + e.area.label + this.province = e.province.label + this.city = e.city.label + this.area = e.area.label + }, + btnjwd() { + uni.chooseLocation({ + success: (res) => { + this.latitude = res.latitude; + this.longitude = res.longitude; + }, + fail: function(err) { + console.log('选择位置失败', err); + }, + complete: (res) => { + if (res.errMsg === 'chooseLocation:ok') { + } else if (res.errMsg.indexOf('chooseLocation:cancel') === 0) { + uni.showToast({ + title: '您取消了位置选择', + icon: 'none' + }); + } + } + }); + }, + + + getQiniuToken() { + this.$u.get("/common/qiniu/uploadInfo").then((res) => { + if (res.code == 200) { + this.token = res.token + } + }); + }, + btn() { + 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 + } + }); + } + }) + }, } }