diff --git a/common/api/feedback.js b/common/api/feedback.js
index ce13d41..1a8a472 100644
--- a/common/api/feedback.js
+++ b/common/api/feedback.js
@@ -11,7 +11,7 @@ export function addFeedBack(params) {
let data = JSON.parse(JSON.stringify(params));
delete data.files
return uni.uploadFile({
- url: config.domain + '/cs-device-boot/feedback/addFeedBack', //仅为示例,非真实的接口地址
+ url: config.domain + '/cs-system-boot/feedback/addFeedBack', //仅为示例,非真实的接口地址
files: files,
header: {
Authorization: uni.getStorageSync('access_token'),
@@ -27,7 +27,7 @@ export function addFeedBack(params) {
*/
export function queryFeedBackDetail(id) {
return request({
- url: '/cs-device-boot/feedback/queryFeedBackDetail',
+ url: '/cs-system-boot/feedback/queryFeedBackDetail',
method: 'post',
data: {
id,
@@ -38,7 +38,7 @@ export function queryFeedBackDetail(id) {
// 问题列表
export function queryFeedBackPage(params) {
return request({
- url: '/cs-device-boot/feedback/queryFeedBackPage',
+ url: '/cs-system-boot/feedback/queryFeedBackPage',
method: 'post',
data: {
pageNum: 1,
@@ -58,7 +58,7 @@ export function queryFeedBackPage(params) {
*/
export function AddFeedbackChat(params) {
return request({
- url: '/cs-device-boot/feedbackChat/AddFeedbackChat',
+ url: '/cs-system-boot/feedbackChat/AddFeedbackChat',
method: 'post',
data: params,
header: {
@@ -77,7 +77,7 @@ export function AddFeedbackChat(params) {
*/
export function updateChatStatus(params) {
return request({
- url: '/cs-device-boot/feedbackChat/updateChatStatus',
+ url: '/cs-system-boot/feedbackChat/updateChatStatus',
method: 'post',
data: params,
header: {
diff --git a/common/api/project.js b/common/api/project.js
index 09809eb..db8e099 100644
--- a/common/api/project.js
+++ b/common/api/project.js
@@ -19,15 +19,16 @@ export function addAppProject(params, files) {
})
}
}
+
// 修改项目
export function updateAppProject(params, files) {
if (files.length === 0) {
return request({
- url: '/cs-device-boot/project/updateAppProject',
+ url: '/cs-device-boot/project/auditAppProject',
method: 'post',
data: params,
})
- }else{
+ } else {
return uni.uploadFile({
url: config.domain + '/cs-device-boot/project/auditAppProject', //仅为示例,非真实的接口地址
files: files,
@@ -92,8 +93,16 @@ export function deleteAppTopologyDiagram(id) {
id,
status: 0,
},
- header: {
- 'Content-Type': 'application/json',
+ })
+}
+
+// 删除拓扑图
+export function checkCanDelete(id) {
+ return request({
+ url: '/cs-device-boot/topologyDiagram/checkCanDelete',
+ method: 'post',
+ data: {
+ id,
},
})
}
diff --git a/common/api/user.js b/common/api/user.js
index 6af8b7b..92d24d4 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -78,10 +78,9 @@ export function apiRegister(params) {
*/
export function autoLogin(phone) {
return request({
- url: '/user-boot/appUser/autoLogin',
+ url: '/pqs-auth/oauth/autoLogin',
data: {
phone: phone,
- devCode: uni.getStorageSync('devCode'),
},
method: 'POST',
})
@@ -204,3 +203,19 @@ export function apiUpdateUser(params) {
method: 'PUT',
})
}
+
+// 更新用户推送标识
+
+export function apiUpdatePush(params) {
+ uni.getPushClientId((res) => {
+ let push_clientid = res.cid
+ request({
+ url: '/user-boot/appUser/updateDevCode',
+ data: {
+ devCode: push_clientid,
+ userId: uni.getStorageSync('userInfo').userIndex,
+ },
+ method: 'POST',
+ })
+ })
+}
diff --git a/common/css/base.scss b/common/css/base.scss
index 0a32f6d..a4bde80 100644
--- a/common/css/base.scss
+++ b/common/css/base.scss
@@ -277,3 +277,15 @@ page {
color: #666;
}
}
+
+
+image {
+ will-change: transform;//解决加载时瞬间拉伸问题
+ width: auto;//解决加载时瞬间拉伸问题
+ height: auto;//解决加载时瞬间拉伸问题
+ image-rendering:-moz-crisp-edges;
+ image-rendering:-o-crisp-edges;
+ image-rendering:-webkit-optimize-contrast;
+ image-rendering: crisp-edges;
+ -ms-interpolation-mode:nearest-neighbor;
+}
diff --git a/common/js/util.js b/common/js/util.js
index 882d039..82a64dd 100644
--- a/common/js/util.js
+++ b/common/js/util.js
@@ -1,6 +1,7 @@
import request from './request'
import cache from './cacheKey.js'
import { getImageUrl } from '@/common/api/basic'
+import { apiUpdatePush } from '@/common/api/user'
import { queryDictDataCache } from '../api/dictionary.js'
import cacheKey from './cacheKey.js'
const toast = (title, duration = 1500, call, mask = false, icon = 'none') => {
@@ -200,31 +201,39 @@ const prePage = () => {
return prePage
}
-const loginSuccess = (data) => {
- console.log(data)
- uni.setStorageSync('access_token', data.token_type + ' ' + data.access_token)
- uni.setStorageSync('refresh_token', data.refresh_token)
- let strings = data.access_token.split('.') //截取token,获取载体
- console.log(escape, atob)
- var userInfo = JSON.parse(decodeURIComponent(escape(atob(strings[1].replace(/-/g, '+').replace(/_/g, '/')))))
- userInfo.authorities = userInfo.authorities[0]
- if (userInfo.headSculpture) {
- getImageUrl(userInfo.headSculpture).then((res) => {
- userInfo.avatar = res.data
+const loginSuccess = (data, jump = true) => {
+ return new Promise((resolve, reject) => {
+ console.log(data)
+ uni.setStorageSync('access_token', data.token_type + ' ' + data.access_token)
+ uni.setStorageSync('refresh_token', data.refresh_token)
+ let strings = data.access_token.split('.') //截取token,获取载体
+ console.log(escape, atob)
+ var userInfo = JSON.parse(decodeURIComponent(escape(atob(strings[1].replace(/-/g, '+').replace(/_/g, '/')))))
+ userInfo.authorities = userInfo.authorities[0]
+ if (userInfo.headSculpture) {
+ getImageUrl(userInfo.headSculpture).then((res) => {
+ userInfo.avatar = res.data
+ uni.setStorageSync(cache.userInfo, userInfo)
+ apiUpdatePush()
+ resolve(userInfo)
+ })
+ } else {
uni.setStorageSync(cache.userInfo, userInfo)
- })
- } else {
- uni.setStorageSync(cache.userInfo, userInfo)
- }
- console.log('reLaunch')
- queryDictDataCache().then((res) => {
- uni.setStorageSync(cacheKey.dictData, res.data)
- uni.reLaunch({
- url: '/pages/index/index',
- fail: (err) => {
- console.log(err)
- },
- })
+ apiUpdatePush()
+ resolve(userInfo)
+ }
+ console.log('reLaunch')
+ if (jump) {
+ queryDictDataCache().then((res) => {
+ uni.setStorageSync(cacheKey.dictData, res.data)
+ uni.reLaunch({
+ url: '/pages/index/index',
+ fail: (err) => {
+ console.log(err)
+ },
+ })
+ })
+ }
})
}
/**
diff --git a/components/Cn-htmlToImg/Cn-htmlToImg.vue b/components/Cn-htmlToImg/Cn-htmlToImg.vue
index 333c1bf..aa603a6 100644
--- a/components/Cn-htmlToImg/Cn-htmlToImg.vue
+++ b/components/Cn-htmlToImg/Cn-htmlToImg.vue
@@ -1,7 +1,7 @@
-
-
+
+
@@ -33,11 +33,13 @@ export default {
setTimeout(() => {
let dom = document.getElementById(domId);
console.log(dom.offsetWidth, dom.offsetHeight);
- html2canvas(dom, {
- scale: 8,
+ html2canvas(dom, {
+ scale: 2,
useCORS: true,
width: dom.offsetWidth,
height: dom.offsetHeight,
+ dpi: 300,
+ taintTest: true,
}).then((canvas) => {
// this.$refs.header.appendChild(canvas);
const posterImg = canvas.toDataURL()
@@ -54,4 +56,5 @@ export default {
-
+
diff --git a/manifest.json b/manifest.json
index 9053702..a86dad9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "灿能物联",
"appid" : "__UNI__88BC25B",
"description" : "",
- "versionName" : "1.0.8",
- "versionCode" : 108,
+ "versionName" : "1.0.9",
+ "versionCode" : 109,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/package.json b/package.json
index 6f7371c..672fd08 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"dependencies": {
"crypto-js": "^4.1.1",
- "html2canvas": "1.0.0-rc.4",
+ "html2canvas": "^1.4.1",
"image-tools": "^1.4.0",
"mqtt": "3.0.0",
"pinyin-pro": "^3.13.2",
diff --git a/pages/device/APF/detail.vue b/pages/device/APF/detail.vue
index 7aa16e5..08a72a1 100644
--- a/pages/device/APF/detail.vue
+++ b/pages/device/APF/detail.vue
@@ -1,11 +1,16 @@
-
+
@@ -78,10 +71,10 @@
-
+
+
@@ -111,7 +104,7 @@ import IO from './comp/IO.vue'
import { queryTopologyDiagram, deleteDevice } from '@/common/api/device'
import { MQTT_IP, MQTT_OPTIONS } from '@/common/js/mqtt.js'
import mqtt from 'mqtt/dist/mqtt.js'
-import { base64ToPath } from 'image-tools'
+import { base64ToPath, pathToBase64 } from 'image-tools'
export default {
components: {
basic,
@@ -122,6 +115,7 @@ export default {
},
data() {
return {
+ domLoading: true,
loading: true,
deviceInfo: {},
navMenuActive: 0,
@@ -364,7 +358,7 @@ export default {
this.init()
queryTopologyDiagram(options.id).then((res) => {
this.deviceInfo = res.data
- console.log(this.dictData)
+ uni.setNavigationBarTitle({ title: this.deviceInfo.devName || '设备详情' })
this.dictData.forEach((item) => {
if (item.code == 'Line_Position') {
item.children.forEach((item2) => {
@@ -377,16 +371,6 @@ export default {
}
})
this.initMqtt()
- console.log(this.loading, 'loading')
- // this.$nextTick(() => {
- // // 获取nav高度
- // uni.createSelectorQuery()
- // .select('.nav')
- // .boundingClientRect((rect) => {
- // this.navHeight = rect.height
- // })
- // .exec()
- // })
})
},
}
@@ -438,7 +422,7 @@ export default {
.module {
position: absolute;
bottom: 0;
- right: 20rpx;
+ right: 10rpx;
width: 200rpx;
.grid-card-content-2,
diff --git a/pages/device/transfer.vue b/pages/device/transfer.vue
index 363807b..4e7452c 100644
--- a/pages/device/transfer.vue
+++ b/pages/device/transfer.vue
@@ -31,10 +31,10 @@ export default {
},
methods: {
back() {
- this.$util.refreshPrePage(2)
+ uni.navigateBack({ delta: 1 })
},
home() {
- this.$util.refreshPrePage(2)
+ uni.navigateBack({ delta: 1 })
},
},
onLoad(options) {
diff --git a/pages/engineering/list.vue b/pages/engineering/list.vue
index fddfb10..b6dad29 100644
--- a/pages/engineering/list.vue
+++ b/pages/engineering/list.vue
@@ -44,6 +44,7 @@
diff --git a/pages/index/comp/indexYunWei.vue b/pages/index/comp/indexYunWei.vue
index 84139de..6a3de0f 100644
--- a/pages/index/comp/indexYunWei.vue
+++ b/pages/index/comp/indexYunWei.vue
@@ -1,33 +1,36 @@
- 所有工程统计信息
-
+ 当前工程设备统计
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index df80161..dc2b030 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -4,7 +4,7 @@ specifiers:
'@types/html5plus': ^1.0.2
'@types/uni-app': ^1.4.4
crypto-js: ^4.1.1
- html2canvas: 1.0.0-rc.4
+ html2canvas: ^1.4.1
image-tools: ^1.4.0
mqtt: 3.0.0
pinyin-pro: ^3.13.2
@@ -13,7 +13,7 @@ specifiers:
dependencies:
crypto-js: 4.1.1
- html2canvas: 1.0.0-rc.4
+ html2canvas: 1.4.1
image-tools: 1.4.0
mqtt: 3.0.0
pinyin-pro: 3.13.2
@@ -86,8 +86,8 @@ packages:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: false
- /base64-arraybuffer/0.2.0:
- resolution: {integrity: sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==}
+ /base64-arraybuffer/1.0.2:
+ resolution: {integrity: sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==}
engines: {node: '>= 0.6.0'}
dev: false
@@ -174,10 +174,10 @@ packages:
resolution: {integrity: sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==}
dev: false
- /css-line-break/1.1.1:
- resolution: {integrity: sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==}
+ /css-line-break/2.1.0:
+ resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
dependencies:
- base64-arraybuffer: 0.2.0
+ utrie: 1.0.2
dev: false
/csstype/3.1.2:
@@ -369,11 +369,12 @@ packages:
xtend: 4.0.2
dev: false
- /html2canvas/1.0.0-rc.4:
- resolution: {integrity: sha512-5sJ+oM3FfNFpGVbMQkJFDl1WH5Sa293l2koMEZWbaehJ3dWHty4mSrmZtfWlWDoLckfGojZS9aZ7Zk3uFouyPw==}
+ /html2canvas/1.4.1:
+ resolution: {integrity: sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==}
engines: {node: '>=8.0.0'}
dependencies:
- css-line-break: 1.1.1
+ css-line-break: 2.1.0
+ text-segmentation: 1.0.3
dev: false
/ieee754/1.2.1:
@@ -673,6 +674,12 @@ packages:
safe-buffer: 5.2.1
dev: false
+ /text-segmentation/1.0.3:
+ resolution: {integrity: sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==}
+ dependencies:
+ utrie: 1.0.2
+ dev: false
+
/through2-filter/3.0.0:
resolution: {integrity: sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==}
dependencies:
@@ -732,6 +739,12 @@ packages:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: false
+ /utrie/1.0.2:
+ resolution: {integrity: sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==}
+ dependencies:
+ base64-arraybuffer: 1.0.2
+ dev: false
+
/vconsole/3.15.1:
resolution: {integrity: sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==}
dependencies:
diff --git a/uni_modules/uni-easyinput/changelog.md b/uni_modules/uni-easyinput/changelog.md
index 33130c6..765401a 100644
--- a/uni_modules/uni-easyinput/changelog.md
+++ b/uni_modules/uni-easyinput/changelog.md
@@ -1,53 +1,97 @@
-## 1.1.3(2022-09-22)
-- 修复,引入 uni.scss 引入默认主题色报错的问题
-## 1.1.2(2022-09-22)
-- 增加主题色 primaryColor 配置选项
-## 1.1.1(2022-09-19)
-- 修复,输入后回车,change 事件触发两次,[详情](https://ask.dcloud.net.cn/question/152149)
+## 1.1.9(2023-04-11)
+- 修复 vue3 下 keyboardheightchange 事件报错的bug
+## 1.1.8(2023-03-29)
+- 优化 trim 属性默认值
+## 1.1.7(2023-03-29)
+- 新增 cursor-spacing 属性
+## 1.1.6(2023-01-28)
+- 新增 keyboardheightchange 事件,可监听键盘高度变化
+## 1.1.5(2022-11-29)
+- 优化 主题样式
+## 1.1.4(2022-10-27)
+- 修复 props 中背景颜色无默认值的bug
## 1.1.0(2022-06-30)
+
- 新增 在 uni-forms 1.4.0 中使用可以在 blur 时校验内容
- 新增 clear 事件,点击右侧叉号图标触发
- 新增 change 事件 ,仅在输入框失去焦点或用户按下回车时触发
- 优化 组件样式,组件获取焦点时高亮显示,图标颜色调整等
--
+
## 1.0.5(2022-06-07)
+
- 优化 clearable 显示策略
+
## 1.0.4(2022-06-07)
+
- 优化 clearable 显示策略
+
## 1.0.3(2022-05-20)
-- 修复 关闭图标某些情况下无法取消的bug
+
+- 修复 关闭图标某些情况下无法取消的 bug
+
## 1.0.2(2022-04-12)
-- 修复 默认值不生效的bug
+
+- 修复 默认值不生效的 bug
+
## 1.0.1(2022-04-02)
-- 修复 value不能为0的bug
+
+- 修复 value 不能为 0 的 bug
+
## 1.0.0(2021-11-19)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+
+- 优化 组件 UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-easyinput](https://uniapp.dcloud.io/component/uniui/uni-easyinput)
+
## 0.1.4(2021-08-20)
+
- 修复 在 uni-forms 的动态表单中默认值校验不通过的 bug
+
## 0.1.3(2021-08-11)
+
- 修复 在 uni-forms 中重置表单,错误信息无法清除的问题
+
## 0.1.2(2021-07-30)
-- 优化 vue3下事件警告的问题
+
+- 优化 vue3 下事件警告的问题
+
## 0.1.1
+
- 优化 errorMessage 属性支持 Boolean 类型
+
## 0.1.0(2021-07-13)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+
+- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+
## 0.0.16(2021-06-29)
+
- 修复 confirmType 属性(仅 type="text" 生效)导致多行文本框无法换行的 bug
+
## 0.0.15(2021-06-21)
+
- 修复 passwordIcon 属性拼写错误的 bug
+
## 0.0.14(2021-06-18)
-- 新增 passwordIcon 属性,当type=password时是否显示小眼睛图标
+
+- 新增 passwordIcon 属性,当 type=password 时是否显示小眼睛图标
- 修复 confirmType 属性不生效的问题
+
## 0.0.13(2021-06-04)
+
- 修复 disabled 状态可清出内容的 bug
+
## 0.0.12(2021-05-12)
+
- 新增 组件示例地址
+
## 0.0.11(2021-05-07)
+
- 修复 input-border 属性不生效的问题
+
## 0.0.10(2021-04-30)
+
- 修复 ios 遮挡文字、显示一半的问题
+
## 0.0.9(2021-02-05)
-- 调整为uni_modules目录规范
+
+- 调整为 uni_modules 目录规范
- 优化 兼容 nvue 页面
diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
index 23d0a7b..7f5113e 100644
--- a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
+++ b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
@@ -1,34 +1,74 @@
-
+
-
-
-
+
+
+
-
-
+
-
+
-
+
@@ -36,570 +76,582 @@
diff --git a/uni_modules/uni-easyinput/package.json b/uni_modules/uni-easyinput/package.json
index 4ca4200..bd128e1 100644
--- a/uni_modules/uni-easyinput/package.json
+++ b/uni_modules/uni-easyinput/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-easyinput",
"displayName": "uni-easyinput 增强输入框",
- "version": "1.1.3",
+ "version": "1.1.9",
"description": "Easyinput 组件是对原生input组件的增强",
"keywords": [
"uni-ui",
diff --git a/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue b/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
index 9a133c4..04ecdcf 100644
--- a/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
+++ b/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
@@ -106,7 +106,10 @@
}
},
// #endif
-
+ beforeRemove: {
+ type: Function,
+ default: () => {}
+ },
disabled: {
type: Boolean,
default: false
@@ -514,7 +517,12 @@
* 删除文件
* @param {Object} index
*/
- delFile(index) {
+ async delFile(index) {
+ let res = await this.beforeRemove({
+ tempFile: this.files[index],
+ tempFilePath: this.files[index].url
+ })
+ if (res === false) return
this.$emit('delete', {
tempFile: this.files[index],
tempFilePath: this.files[index].url
@@ -569,6 +577,7 @@
let newFilesData = []
files.forEach(v => {
newFilesData.push({
+ ...v,
extname: v.extname,
fileType: v.fileType,
image: v.image,