diff --git a/common/http.interceptor.js b/common/http.interceptor.js index ac555e4..c8c80c1 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -19,13 +19,13 @@ const install = (Vue, vm) => { // }, // }); - uni.setStorageSync('deptId', 101); + uni.setStorageSync('deptId', 100); Vue.prototype.$u.http.setConfig({ // baseUrl: 'http://61.174.243.28:15861', // baseUrl: 'http://192.168.2.14:8080', // baseUrl: 'http://124.221.246.124:2289', - baseUrl: 'https://dianche.chuantewulian.cn/prod-api', - // baseUrl: 'https://dche.ccttiot.com/prod-api', + // baseUrl: 'https://dianche.chuantewulian.cn/prod-api', + baseUrl: 'https://dche.ccttiot.com/prod-api', loadingText: '努力加载中~', // loadingTime: 2000, // 设置自定义头部content-type diff --git a/manifest.json b/manifest.json index 8d15cb5..cad1f86 100644 --- a/manifest.json +++ b/manifest.json @@ -51,7 +51,7 @@ /* 小程序特有相关 */ "mp-weixin" : { "libVersion" : "latest", - "appid" : "wx4d178f8c80348214", + "appid" : "wx3428c498d5061192", "setting" : { "urlCheck" : false }, diff --git a/page_user/bulelink.vue b/page_user/bulelink.vue new file mode 100644 index 0000000..4d28343 --- /dev/null +++ b/page_user/bulelink.vue @@ -0,0 +1,95 @@ +<template> + <view class="page"> + <u-navbar :title="info.title" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' + height='45'></u-navbar> + <view class="cont" v-html="content"></view> + + + </view> +</template> + +<script> + export default { + data() { + return { + bgc: { + backgroundColor: "#fff", + }, + content: '', + info:{} + } + }, + onLoad() { + this.getword() + }, + methods: { + // getclass() { + + // this.$u.get("/app/classify/list?&parentId=111?&classifyId=114" ).then((res) => { + + // if (res.code == 200) { + // this.classlist = res.data + // let id =this.classlist[0].classifyId + // this.getword(id) + // } else { + // // uni.showToast({ + // // title: res.msg, + // // icon: 'none', + // // duration: 2000 + // // }); + // } + // }); + // }, + getword() { + + this.$u.get("/app/article/list?classifyId=" + 100).then((res) => { + + if (res.code == 200) { + this.info = res.rows.find(item => item.articleId == 18); + this.content = this.info.content + this.content = this.replaceImgWithImage(this.content) + + } else { + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }); + } + }); + }, + replaceImgWithImage(content) { + // 替换所有的 为 \u00A0 + content = content.replace(/ /g, '\u00A0'); + + // 替换 <img> 标签的宽度和高度样式 + content = content.replace(/<img([^>]*)>/g, (match, group1) => { + // 查找并移除可能存在的尾部斜杠 + let cleanedGroup = group1.replace(/\s*\/$/, ''); + return `<img style="width: 85vw ; height: auto;" ${cleanedGroup} />`; + }); + + return content; + } + } + } +</script> + +<style lang="scss"> + page { + background-color: #fff; + } + + .page { + width: 750rpx; + padding-bottom: 100rpx; + .cont { + + margin-top: 34rpx; + margin: 0 auto; + width: 634rpx; + + } + + } +</style> \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 501f62f..b695a14 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4477,13 +4477,14 @@ this.showdevice = true; this.type = 0; } else { - if (this.deviceInfos.onlineStatus == 0) { - wx.showToast({ - title: '车辆离线中,请使用其他车辆', - icon: 'none', - duration: 4000 - }); - } else if (this.deviceInfos.status == 0) { + // if (this.deviceInfos.onlineStatus == 0) { + // wx.showToast({ + // title: '车辆离线中,请使用其他车辆', + // icon: 'none', + // duration: 4000 + // }); + // } else + if (this.deviceInfos.status == 0) { uni.showToast({ title: '车辆未上架,请使用其他车辆', icon: 'none', @@ -4571,15 +4572,16 @@ this.showdevice = true; this.type = 0; } else { - if (this.deviceInfos - .onlineStatus == - 0) { - uni.showToast({ - title: '车辆离线中,请使用其他车辆', - icon: 'none', - duration: 4000 - }); - } else if (this.deviceInfos + // if (this.deviceInfos + // .onlineStatus == + // 0) { + // uni.showToast({ + // title: '车辆离线中,请使用其他车辆', + // icon: 'none', + // duration: 4000 + // }); + // } else + if (this.deviceInfos .status == 0) { uni.showToast({