diff --git a/env/cl.js b/env/cl.js index a394b7c..5335457 100644 --- a/env/cl.js +++ b/env/cl.js @@ -1,5 +1,5 @@ const ENV_PATH = { - baseUrl: 'http://192.168.31.231:8080/autoSR/api', // 长龙 + baseUrl: 'http://192.168.31.244:8080/autoSR/api', // 长龙 } module.exports = ENV_PATH \ No newline at end of file diff --git a/manifest.json b/manifest.json index 16f44b9..d5bfc1e 100644 --- a/manifest.json +++ b/manifest.json @@ -91,7 +91,7 @@ }, "quickapp" : {}, "mp-weixin" : { - "appid" : "wx8f883dca5ecc5510", + "appid" : "wxe044603515ff2cb5", "setting" : { "urlCheck" : false, "es6" : true, diff --git a/pages/center/consumer/edit.vue b/pages/center/consumer/edit.vue index a4fe208..ae14b53 100644 --- a/pages/center/consumer/edit.vue +++ b/pages/center/consumer/edit.vue @@ -96,7 +96,7 @@ - + {{item.name}} @@ -344,15 +344,30 @@ if (this.form.showPhones != this.form.showPhone) { this.form.phone = this.form.showPhone } - - this.allList.map(item => { - item.children.map(item1 => { - if (item1.selected == 0) { - console.log(item, item1) - str.push(item1.keywordsId) + let isPass = false // 默认通过 + let indexs = 0; // + try { + this.allList.forEach(item => { + if (item.mustSelected == 0) { + if (item.children.findIndex(item => item.selected == 0) == -1) { + throw new Error(item.name) + } } + item.children.map(item1 => { + if (item1.selected == 0) { + str.push(item1.keywordsId) + } + }) }) - }) + } catch (e) { + console.log(e) + uni.showToast({ + title: `${e.message}为必选项~`, + icon: 'none', + duration: 2000 + }) + return + } str = str.join(',') param = this.form param.keywordIds = str @@ -402,6 +417,7 @@ padding: 0 30rpx; .conmsg-msg-lab { + position: relative; height: 102rpx; display: flex; font-size: 30rpx; @@ -410,6 +426,15 @@ border-bottom: 1px solid #E0E0E0; line-height: 102rpx; + &.mustSe::before { + content: '*'; + color: red; + position: absolute; + left: -10rpx; + right: -10rpx; + z-index: 10; + } + .conmsg-msg-lab-1 { display: flex; min-width: 136rpx; diff --git a/pages/center/prohibited/details.vue b/pages/center/prohibited/details.vue index cb461ad..89e23a6 100644 --- a/pages/center/prohibited/details.vue +++ b/pages/center/prohibited/details.vue @@ -68,6 +68,22 @@ + + + + + + + + {{dealword(subitem)[1]}} + + + @@ -95,7 +111,7 @@ 录音文件 - @@ -328,6 +344,26 @@ }, methods: { + // 对话加命中标签 + dealTypes(type) { + if (type) { + let tem = type.split(',') + return tem + } else { + return [] + } + }, + // 对话加命中标签 + dealword(type) { + if (type) { + let a = type.split('-') + let rest = type.substring(2).split('-').join(',') + let arr = [a[0], rest] + return arr + } else { + return [] + } + }, // 获取违禁词 findTabooWords() { this.$u.get('/customer/findTabooWords', { @@ -1142,13 +1178,38 @@ color: #333333; } } + // 违禁正则标签 + .newmark { + margin: 30rpx 0 10rpx 120rpx; + .mark-item { + display: flex; + flex-wrap: wrap; + margin-bottom: 12rpx; + + .markicon { + width: 30rpx; + height: 30rpx; + margin-right: 12rpx; + } + + .marktext { + font-size: 24rpx; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #3E50E8; + min-height: 30rpx; + line-height: 30rpx; + max-width: 420rpx; + text-align: left; + word-break: break-all; + } + } + } .text { - margin: 50upx 30upx; + margin: 0 30upx; display: flex; align-items: center; - - .avatar { margin-right: 24rpx; width: 64upx; diff --git a/pages/login/index.vue b/pages/login/index.vue index 2d15bed..c904276 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -103,7 +103,7 @@ uni.setStorageSync(WXB_SESSION_LOGIN_DATA, data); //写入缓存 that.getMenu() that.getUser(); - util.showSuccess('登录成功'); + // util.showSuccess('登录成功'); } else { util.showNone("账号名或密码错误,请重试"); return false; diff --git a/pages/mine/calibration.vue b/pages/mine/calibration.vue index ce5d8e9..ac77ba8 100644 --- a/pages/mine/calibration.vue +++ b/pages/mine/calibration.vue @@ -5,7 +5,8 @@ - + {{item.name}} @@ -36,35 +37,35 @@ export default { data() { return { - allList:[], - customerId:'' + allList: [], + customerId: '' } }, onLoad(e) { - this.customerId=e.id; + this.customerId = e.id; this.getListByType() }, methods: { - Edittag(item,item1,index,i){ - if(this.allList[index].children[i].selected==0){ - this.allList[index].children[i].selected=1; - }else{ - this.allList[index].children[i].selected=0; + Edittag(item, item1, index, i) { + if (this.allList[index].children[i].selected == 0) { + this.allList[index].children[i].selected = 1; + } else { + this.allList[index].children[i].selected = 0; } - this.$forceUpdate() + this.$forceUpdate() }, // 字典表接口 getListByType() { this.$u.get("/matchKeywords/findManualCalibration", { customerId: this.customerId, - type:2 + type: 2 }) .then(res => { res.forEach(item1 => { item1.children.map(item => { if (item.isInterval == 0) { item.label = item.name + item.unit + '-' + item.endName + item - .unit; + .unit; } else { item.label = item.name } @@ -77,36 +78,52 @@ // 提交 submit() { let param = { - keywordIds:'', + keywordIds: '', id: this.customerId, projectId: uni.getStorageSync('buildingID').id, } let str = [] - this.allList.map(item => { - item.children.map(item1 => { - if (item1.selected == 0) { - str.push(item1.keywordsId) + let indexs = 0; // + try { + this.allList.forEach(item => { + if (item.mustSelected == 0) { + if (item.children.findIndex(item => item.selected == 0) == -1) { + throw new Error(item.name) + } } + item.children.map(item1 => { + if (item1.selected == 0) { + str.push(item1.keywordsId) + } + }) }) - }) - + } catch (e) { + console.log(e) + uni.showToast({ + title: `${e.message}为必选项~`, + icon: 'none', + duration: 2000 + }) + return + } + str = str.join(',') - param.keywordIds = str + param.keywordIds = str this.$u.post("matchKeywords/updateManualCalibration", param).then(res => { uni.showToast({ title: '操作成功', icon: 'none', success: () => { - let sdd={ + let sdd = { keywordIds: this.customerId, id: this.customerId, - bg:0, - speaker:0 + bg: 0, + speaker: 0 } - let pages = getCurrentPages() //获取当前页面栈的信息 - let prevPage = pages[pages.length - 2] //获取上一个页面 - prevPage.setData({ //把需要回传的值保存到上一个页面 - info: sdd + let pages = getCurrentPages() //获取当前页面栈的信息 + let prevPage = pages[pages.length - 2] //获取上一个页面 + prevPage.setData({ //把需要回传的值保存到上一个页面 + info: sdd }); uni.navigateBack() } @@ -144,6 +161,7 @@ padding: 0 30rpx; .conmsg-msg-lab { + position: relative; height: 102rpx; display: flex; font-size: 30rpx; @@ -152,6 +170,15 @@ border-bottom: 1px solid #E0E0E0; line-height: 102rpx; + &.mustSe::before { + content: '*'; + color: red; + position: absolute; + left: -10rpx; + right: -10rpx; + z-index: 10; + } + .conmsg-msg-lab-1 { display: flex; min-width: 136rpx; diff --git a/pages/mine/selectBuilding.vue b/pages/mine/selectBuilding.vue index 128f233..f36161a 100644 --- a/pages/mine/selectBuilding.vue +++ b/pages/mine/selectBuilding.vue @@ -4,8 +4,11 @@ - - {{item.propertyName}} + + + {{item.propertyName}} + + ({{ item.daysRemaining < 0 ? '已过期' : '' }} {{ item.lockFlag == 1 ? '已禁用' : ''}}) @@ -22,22 +25,32 @@ list: [], }; }, - methods:{ - s(e){ + methods: { + s(e) { this.init(e) }, - okSelect(id,name){ + okSelect(data) { + if (data.lockFlag == 1) { + uni.showToast({ + title: `${data.propertyName}项目已禁用,不能操作`, + icon: 'none', + duration: 2000 + }) + return + } let lopan = { - id, - name + id: data.id, + name: data.propertyName } uni.setStorageSync("buildingID", lopan); uni.navigateBack({ - delta:-1 + delta: -1 }) }, - init(e){ - let data = {houseName:decodeURI(e)||''} + init(e) { + let data = { + houseName: decodeURI(e) || '' + } uni.request({ url: config.service.getUser, method: "GET", @@ -67,10 +80,13 @@ .searchResultStyle { padding: 0 30rpx; - .searchList{ + + .searchList { border-bottom: 1rpx solid #E0E0E0; padding: 30rpx 0; font-size: 30rpx; + display: flex; + justify-content: space-between; } } }