diff --git a/api/6170/deviceControl.js b/api/6170/deviceControl.js new file mode 100644 index 0000000..44b4601 --- /dev/null +++ b/api/6170/deviceControl.js @@ -0,0 +1,31 @@ +// 获取设备详细信息 +import request from '@/utils/request' +export function deviceDetail(id) { + return request({ + url: `/app/device/${id}`, + method: 'get', + }) +} +// 获取设备分享详细信息 +export function deviceShareId(id) { + return request({ + url: `/app/deviceShare/${id}`, + method: 'get', + }) +} +// 人员信息登记 +export function registerPersonInfo(data) { + return request({ + url: `/app/device/registerPersonInfo`, + method: 'post', + data: data + }) +} +// 发送信息 +export function deviceSendMessage(data) { + return request({ + url: `/app/device/sendMessage`, + method: 'post', + data: data + }) +} diff --git a/api/6170/share.js b/api/6170/share.js index 79be8e9..a21eea6 100644 --- a/api/6170/share.js +++ b/api/6170/share.js @@ -7,13 +7,7 @@ export function deviceShareAdd(data) { data: data }) } -// 获取设备分享详细信息 -export function deviceShareId(id) { - return request({ - url: `/app/deviceShare/${id}`, - method: 'get', - }) -} + // 分享短信验证码 export function deviceShareCode(params) { return request({ @@ -23,7 +17,7 @@ export function deviceShareCode(params) { }) } -//设备管理列表 +//设备管理列表 我的分享 export function deviceShareList(params) { return request({ url: '/app/deviceShare/deviceShareList', @@ -31,6 +25,14 @@ export function deviceShareList(params) { data: params }) } +// 他人分享 +export function otherDeviceShareList(params) { + return request({ + url: '/app/deviceShare/otherDeviceShareList', + method: 'get', + data: params + }) +} // 移除设备管理 export function deviceShareDelete(ids) { return request({ diff --git a/pages.json b/pages.json index 0cb085b..16a4efc 100644 --- a/pages.json +++ b/pages.json @@ -127,6 +127,19 @@ "navigationBarTitleText": "地图" } }, + { + "path": "pages/common/allType/index", + "style": { + "navigationBarTitleText": "所有类型" + } + }, + { + "path": "pages/6170/allShare/index", + "style": { + "navigationBarTitleText": "所有分享" + } + }, + { "path": "pages/6170/share/index", "style": { diff --git a/pages/6170/allShare/index.vue b/pages/6170/allShare/index.vue new file mode 100644 index 0000000..fe3ce26 --- /dev/null +++ b/pages/6170/allShare/index.vue @@ -0,0 +1,519 @@ + + + + + \ No newline at end of file diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 9db8c79..cdf0b3f 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -1,214 +1,221 @@ @@ -127,6 +141,7 @@ tabs: [], activeTab: 0, showTooltip: false, + showshare: false, Options: [{ text: '重命名', style: { @@ -158,6 +173,17 @@ action: 'bluetooth' } ], + shareItems: [{ + text: '所有类型', + icon: '/static/images/type.png', + action: 'type' + }, + { + text: '所有分享', + icon: '/static/images/share.png', + action: 'share' + } + ], page: 1, // 当前页码 size: 10, // 每页条数 total: 0, // 总数据量 @@ -168,6 +194,26 @@ } }, methods: { + // 更多 + allMore(){ + this.showshare = !this.showshare; + }, + // 所有分享,所有类型 + handleshareClick(item){ + this.showshare = false; // 关闭弹窗 + switch (item.action) { + case 'type': + uni.navigateTo({ + url: '/pages/common/allType/index' + }); + break; + case 'share': + uni.navigateTo({ + url: "/pages/6170/allShare/index" + }) + break; + } + }, // 点击弹框外的区域关闭 closePopup(type) { if (type === 'delete') { @@ -208,7 +254,6 @@ const deviceType = tab.id === '' ? undefined : tab.id; this.getData(deviceType); }, - // 获取设备列表 getData(deviceType = '') { if (this.loading || this.finished) return; @@ -243,10 +288,11 @@ onScrollToLower() { this.getData(); }, + // 添加扫一三图标 scan() { this.showTooltip = !this.showTooltip; }, - + // 添加设备,扫一扫,蓝牙 handleMenuClick(item) { this.showTooltip = false; // 关闭弹窗 switch (item.action) { @@ -256,15 +302,6 @@ }); break; case 'bluetooth': - // uni.navigateTo({ - // url: 'pages/common/addBLE/AddDevice', - // success:(res)=>{ - // res.eventChannel.emit('key', { data: 'data from starter page' }) - // },fail: (ex) => { - // console.log("跳转失败了",JSON.stringify(ex)); - // } - // }); - uni.navigateTo({ url: "/pages/common/addBLE/addEquip" }) @@ -391,7 +428,8 @@ success: (res) => { // 页面跳转成功后的回调函数 res.eventChannel.emit('deviceControl', { - data: item + data: item, + apiType: 'listA' // 自定义标识,详情哪里根据这个参数不同信息 }); } }) @@ -454,6 +492,7 @@ white-space: nowrap; /* 禁止换行 */ overflow: hidden; + position: relative; } @@ -491,6 +530,21 @@ font-size: 28rpx; } + .uniui-more { + position: relative; + width: 100%; + } + + .more { + width: 40rpx; + height: 8rpx; + /* position: absolute; */ + /* right: 0rpx; + z-index: 100; */ + float: right; + top: -95rpx + } + .gprs { width: 28rpx; height: 35rpx; @@ -634,10 +688,11 @@ padding: 20rpx; font-size: 22rpx; } - .noDATA{ + + .noDATA { text-align: center; color: rgba(255, 255, 255, 0.87); - transform: translate(-0%,100%); + transform: translate(-0%, 100%); } /* 遮罩层 */ @@ -757,6 +812,13 @@ /* 根据导航栏高度调整 */ z-index: 9999; } + .tooltip-share{ + position: fixed; + right: 18rpx; + top: 230rpx; + /* 根据导航栏高度调整 */ + z-index: 9999; + } .tooltip-arrow { width: 0; diff --git a/pages/common/send/index.vue b/pages/common/send/index.vue index 01e9ad1..ada8c38 100644 --- a/pages/common/send/index.vue +++ b/pages/common/send/index.vue @@ -34,12 +34,29 @@ 编辑信息 -