操作说明,产品说明,接口联调对接
This commit is contained in:
45
App.vue
45
App.vue
@ -15,27 +15,52 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import 'vk-uview-ui/index.scss';
|
@import 'vk-uview-ui/index.scss';
|
||||||
uni-slider .uni-slider-handle-wrapper{
|
|
||||||
|
uni-slider .uni-slider-handle-wrapper {
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
uni-slider .uni-slider-thumb{
|
|
||||||
|
uni-slider .uni-slider-thumb {
|
||||||
width: 66rpx !important;
|
width: 66rpx !important;
|
||||||
height:80rpx !important;
|
height: 80rpx !important;
|
||||||
margin-top: -40rpx !important;
|
margin-top: -40rpx !important;
|
||||||
border-radius: 16rpx !important;
|
border-radius: 16rpx !important;
|
||||||
margin-left: -72rpx !important;
|
margin-left: -72rpx !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
uni-slider .uni-slider-handle-wrapper{
|
|
||||||
|
uni-slider .uni-slider-handle-wrapper {
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
uni-slider .uni-slider-value{
|
|
||||||
|
uni-slider .uni-slider-value {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
color: rgba(255, 255, 255,0.8);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
right:2.5%;
|
right: 2.5%;
|
||||||
top:-60rpx
|
top: -60rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-file-picker .file-picker__box-content {
|
||||||
|
background: rgba(26, 26, 26, 1);
|
||||||
|
border: none !important;
|
||||||
|
border-radius: 45rpx;
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-file-picker.custom-file-picker {
|
||||||
|
overflow: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-file-picker .icon-add {
|
||||||
|
height: 5rpx !important;
|
||||||
|
width: 70rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-file-picker .file-picker__box-content {
|
||||||
|
// display: none
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
17
api/common/operatingInstruct/index.js
Normal file
17
api/common/operatingInstruct/index.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import qs from 'qs'
|
||||||
|
// 查询列表
|
||||||
|
export function fileInfo(params) {
|
||||||
|
return request({
|
||||||
|
url: '/app/file/list',
|
||||||
|
method: 'GET',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function fileDelete(ids) {
|
||||||
|
return request({
|
||||||
|
url: `/app/file/delete/${ids}`,
|
||||||
|
method: 'delete',
|
||||||
|
})
|
||||||
|
}
|
12
pages.json
12
pages.json
@ -61,25 +61,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/6170/operationVideo/index",
|
"path": "pages/common/operationVideo/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/6170/addvideo/index",
|
"path": "pages/common/addvideo/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "添加"
|
"navigationBarTitleText": "添加"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 操作说明
|
||||||
{
|
{
|
||||||
"path": "pages/6170/editVideo/index",
|
"path": "pages/common/operatingInstruct/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "编辑视频"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 产品说明
|
||||||
{
|
{
|
||||||
"path": "pages/6170/operatingInstruct/index",
|
"path": "pages/common/productDes/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<!-- 使用自定义导航栏 -->
|
<!-- 使用自定义导航栏 -->
|
||||||
<custom-navbar :title="navTitle" :showBack="true" color="#FFFFFF" rightIcon="/static/images/path.png"
|
<custom-navbar :title="navTitle" :showBack="true" color="#FFFFFF" rightIcon="/static/images/path.png"
|
||||||
@right-click="uploadStartup"></custom-navbar>
|
@right-click="uploadStartup"></custom-navbar>
|
||||||
<view class="device-detail-container" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="device-detail-container" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||||
<!-- 设备电量信息 -->
|
<!-- 设备电量信息 -->
|
||||||
<view class="battery-section">
|
<view class="battery-section">
|
||||||
@ -231,7 +231,8 @@
|
|||||||
lightModeB: false,
|
lightModeB: false,
|
||||||
lightModeC: false, //激光提示框
|
lightModeC: false, //激光提示框
|
||||||
items: [],
|
items: [],
|
||||||
isFormExpanded: true // 默认展开
|
isFormExpanded: true, // 默认展开
|
||||||
|
deviceID: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -314,17 +315,19 @@
|
|||||||
// 操纵说明
|
// 操纵说明
|
||||||
operatingInst() {
|
operatingInst() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/6170/operatingInstruct/index'
|
url: `/pages/common/operatingInstruct/index?id=${this.deviceID}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 产品参数
|
// 产品参数
|
||||||
productparams() {
|
productparams() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/common/productDes/index?id=${this.deviceID}`
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 操作视频
|
// 操作视频
|
||||||
operatingVideo() {
|
operatingVideo() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/6170/operationVideo/index'
|
url: `/pages/common/operationVideo/index?id=${this.deviceID}`
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -338,6 +341,10 @@
|
|||||||
handleDisagree() {
|
handleDisagree() {
|
||||||
this.lightModeC = false
|
this.lightModeC = false
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
console.log(options.id) // 输出: 123
|
||||||
|
this.deviceID = options.id
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -549,7 +556,8 @@
|
|||||||
transform: translate(-17%, -100%);
|
transform: translate(-17%, -100%);
|
||||||
|
|
||||||
}
|
}
|
||||||
.uni-file-picker__container{
|
|
||||||
|
.uni-file-picker__container {
|
||||||
width: 200rpx !important;
|
width: 200rpx !important;
|
||||||
border: 1px solid rgb(58, 58, 58);
|
border: 1px solid rgb(58, 58, 58);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<text>编辑视频</text>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
@ -1,350 +0,0 @@
|
|||||||
<template>
|
|
||||||
<!-- 使用自定义导航栏 -->
|
|
||||||
<view>
|
|
||||||
<custom-navbar :title="navTitle" :showBack="true" backgroundColor="#202020" color="#FFFFFF" right-text="编辑"
|
|
||||||
right-color="rgba(255, 255, 255, 0.87)" @right-click="handleEdit"></custom-navbar>
|
|
||||||
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
|
||||||
<view class="pathContent">
|
|
||||||
<image src="/static/images/path3.png" mode="" class="path3"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!--上传文件弹框 -->
|
|
||||||
<view class="agreement-mask" v-if="opeartShow">
|
|
||||||
<!-- 上传画面弹窗 -->
|
|
||||||
<view class="agreement-popup">
|
|
||||||
<!-- 标题 -->
|
|
||||||
<view class="popup-title">编辑</view>
|
|
||||||
<view class="popup-content">
|
|
||||||
<view v-for="(item, index) in items" :key="index">
|
|
||||||
<view class="item" :class="{'selected': index === selectedItemIndex}"
|
|
||||||
@click="handleItemAction(index)"> <!-- 修改点击事件 -->
|
|
||||||
<image :src="item.image" class="setIMG"></image>
|
|
||||||
{{item.text}}
|
|
||||||
<!-- 隐藏的文件输入(仅用于上传模式) -->
|
|
||||||
<!-- <input v-if="index === 0" type="file" ref="fileInput" style="display: none"
|
|
||||||
@change="onFileSelect"> -->
|
|
||||||
<uni-file-picker v-if="index === 0" limit="1" file-mediatype="all"></uni-file-picker>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 按钮组 -->
|
|
||||||
<view class="popup-buttons">
|
|
||||||
<button class="agree" @click="handleupload">确定</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="agreement-mask" v-if="opeartSuccess">
|
|
||||||
<view class="agreement-popupC">
|
|
||||||
<view class="popup-content">
|
|
||||||
<image src="/static/images/path5.png" mode="" class="path2"></image>
|
|
||||||
<view class="popup-Title">
|
|
||||||
<view>上传成功!</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 按钮组 -->
|
|
||||||
<view class="popup-buttons">
|
|
||||||
<button class="btn agreeBtn" @click="handleBtn">确定</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- =============删除文件,列表文件=============== -->
|
|
||||||
<view class="agreement-mask" v-if="opeartDelect">
|
|
||||||
<!-- 上传画面弹窗 -->
|
|
||||||
<view class="agreement-popup">
|
|
||||||
<view class="popup-title">删除文件</view>
|
|
||||||
<view class="popup-content">
|
|
||||||
<!-- 设备列表 -->
|
|
||||||
<scroll-view class="device-list" scroll-y>
|
|
||||||
<view class="device-card" v-for="(item, index) in delectList" :key="index"
|
|
||||||
@click="toggleSelect(index)">
|
|
||||||
<!-- 复选框 -->
|
|
||||||
<view class="checkbox" :class="{ checked: item.checked }">
|
|
||||||
<uni-icons v-if="item.checked" type="checkmarkempty" size="18"
|
|
||||||
color="rgb(0, 0, 0)"></uni-icons>
|
|
||||||
</view>
|
|
||||||
<!-- 设备信息 -->
|
|
||||||
<view class="device-content">
|
|
||||||
<view class="device-header">
|
|
||||||
<view class="device-name">
|
|
||||||
<view>设备:001-00</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
<!-- 按钮组 -->
|
|
||||||
<view class="popup-buttons">
|
|
||||||
<button class="agree" @click="handleopearBtn">确定</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
navTitle: '操作说明',
|
|
||||||
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
|
||||||
opeartShow: false,
|
|
||||||
items: [{
|
|
||||||
text: '点击选择上传文件',
|
|
||||||
selected: true,
|
|
||||||
image: '/static/images/upload.png'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '删除文件',
|
|
||||||
selected: false,
|
|
||||||
image: '/static/images/delete.png'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
selectedItemIndex: 0, // 默认选中第一个
|
|
||||||
fileInput: false,
|
|
||||||
opeartSuccess: false,
|
|
||||||
opeartDelect: false,
|
|
||||||
delectList: Array(6).fill().map((_, i) => ({
|
|
||||||
id: `1321615${i}`,
|
|
||||||
checked: false,
|
|
||||||
showConfirm: false
|
|
||||||
})),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 编辑
|
|
||||||
handleEdit() {
|
|
||||||
this.opeartShow = true
|
|
||||||
},
|
|
||||||
handleItemAction(index) {
|
|
||||||
this.selectedItemIndex = index;
|
|
||||||
if (index === 0) {
|
|
||||||
// 调用 Uni-app 文件选择 API
|
|
||||||
// uni.chooseFile({
|
|
||||||
// count: 1, // 最多选择1个文件
|
|
||||||
// success: (res) => {
|
|
||||||
// const file = res.tempFiles[0];
|
|
||||||
// this.items[0].text = `已选择: ${file.name}`;
|
|
||||||
// this.selectedFile = file; // 存储文件对象
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
} else {
|
|
||||||
// 这里是走删除弹框列表
|
|
||||||
this.opeartDelect = true //显示批量删除弹框列表
|
|
||||||
this.opeartShow = false //隐藏编辑弹框
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
onFileSelect(e) {
|
|
||||||
const files = e.target.files;
|
|
||||||
if (files.length > 0) {
|
|
||||||
// 这里拿到文件对象,可以立即上传或显示文件名
|
|
||||||
console.log("选择的文件:", files[0].name);
|
|
||||||
// 示例:显示文件名在item.text中
|
|
||||||
this.items[0].text = `已选择: ${files[0].name}`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 确认
|
|
||||||
handleupload() {
|
|
||||||
this.opeartSuccess = true
|
|
||||||
//this.opeartShow = false;
|
|
||||||
},
|
|
||||||
// 上传成功后确实弹框提示确认
|
|
||||||
handleBtn() {
|
|
||||||
this.opeartSuccess = false
|
|
||||||
},
|
|
||||||
toggleSelect(index) {
|
|
||||||
this.delectList[index].checked = !this.delectList[index].checked
|
|
||||||
this.$forceUpdate()
|
|
||||||
},
|
|
||||||
// 批量删除文件确认按钮
|
|
||||||
handleopearBtn() {
|
|
||||||
this.opeartDelect = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.device-page {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-height: 100vh;
|
|
||||||
background-color: rgb(18, 18, 18);
|
|
||||||
padding: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pathContent {
|
|
||||||
background-color: rgb(52, 52, 52);
|
|
||||||
width: 100%;
|
|
||||||
min-height: 87vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.files-button uni-button {
|
|
||||||
background: red !important;
|
|
||||||
position: absolute;
|
|
||||||
left: 50rpx;
|
|
||||||
top: 50rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.path2 {
|
|
||||||
width: 64rpx;
|
|
||||||
height: 64rpx;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-Title {
|
|
||||||
color: rgba(255, 255, 255, 0.87);
|
|
||||||
padding: 20rpx 0rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.path3 {
|
|
||||||
width: 172rpx;
|
|
||||||
height: 114rpx;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 遮罩层 */
|
|
||||||
.agreement-mask {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
z-index: 9999;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 弹窗主体 */
|
|
||||||
.agreement-popup {
|
|
||||||
width: 100%;
|
|
||||||
height: 50%;
|
|
||||||
background-color: rgb(42, 42, 42);
|
|
||||||
border-radius: 60rpx 60rpx 0rpx 0rpx;
|
|
||||||
padding: 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.agreement-popupC {
|
|
||||||
width: 70%;
|
|
||||||
background-color: rgb(42, 42, 42);
|
|
||||||
border-radius: 40rpx;
|
|
||||||
padding: 30rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 1rpx solid rgba(187, 230, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-title {
|
|
||||||
color: rgba(255, 255, 255, 0.87);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.agree {
|
|
||||||
background-color: rgb(187, 230, 0);
|
|
||||||
color: #232323;
|
|
||||||
border: none;
|
|
||||||
font-size: 24rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
line-height: 88rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0rpx;
|
|
||||||
left: 0rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
padding: 10px;
|
|
||||||
margin: 5px 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background-color 0.3s;
|
|
||||||
color: #fff;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.setIMG {
|
|
||||||
width: 88rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item.selected {
|
|
||||||
background-color: rgb(58, 58, 58);
|
|
||||||
color: rgba(255, 255, 255, 0.87);
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-content {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 通用按钮样式 */
|
|
||||||
.btn {
|
|
||||||
flex: 1;
|
|
||||||
height: 70rpx;
|
|
||||||
line-height: 70rpx;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
margin: 10rpx auto;
|
|
||||||
width: 200rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 同意按钮 */
|
|
||||||
.agreeBtn {
|
|
||||||
background-color: rgb(187, 230, 0);
|
|
||||||
color: #232323;
|
|
||||||
border: none;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 删除文件,弹框列表样式文件
|
|
||||||
*/
|
|
||||||
.device-card {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-content {
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background: rgba(58, 58, 58, 1);
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
align-items: center;
|
|
||||||
padding: 20rpx;
|
|
||||||
width: 93%;
|
|
||||||
color: rgba(255, 255, 255, 0.87);
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkbox {
|
|
||||||
width: 40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
border: 2rpx solid rgba(255, 255, 255, 0.5);
|
|
||||||
margin-right: 20rpx;
|
|
||||||
border-radius: 4rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: -25rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkbox.checked {
|
|
||||||
background-color: rgb(187, 230, 0);
|
|
||||||
border-color: rgb(187, 230, 0);
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -14,10 +14,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="sendFlex">
|
<view class="sendFlex">
|
||||||
<view>
|
|
||||||
<image src="/static/images/gprs.png" class="gprs"></image>
|
|
||||||
</view>
|
|
||||||
<view class="callpolice">报警</view>
|
<view class="callpolice">报警</view>
|
||||||
|
<view class="Sendmessage">位置</view>
|
||||||
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -28,6 +27,31 @@
|
|||||||
<uni-swipe-action-item :right-options="Options" @click="handleSwipeClick($event, item, index)"
|
<uni-swipe-action-item :right-options="Options" @click="handleSwipeClick($event, item, index)"
|
||||||
class="device-card">
|
class="device-card">
|
||||||
<!-- 设备卡片内容保持不变 -->
|
<!-- 设备卡片内容保持不变 -->
|
||||||
|
<!-- <view @click.stop="handleFile(item)">
|
||||||
|
<view class="device-header">
|
||||||
|
<view class="deviceIMG">
|
||||||
|
<image :src="item.devicePic" class="IMG"></image>
|
||||||
|
</view>
|
||||||
|
<view class="device-name">
|
||||||
|
<view>设备:{{item.deviceName}}</view>
|
||||||
|
<view class="device-info">
|
||||||
|
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
|
||||||
|
</view>
|
||||||
|
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
||||||
|
<view class="device-flex" v-if="item.communicationMode==0">
|
||||||
|
<view class="onlines" >在线</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
<view>电量:90%</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-if="item.communicationMode==1">
|
||||||
|
<view class="device-status online">已连接</view>
|
||||||
|
<view class="device-status unline">未连接</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
<view @click.stop="handleFile(item)">
|
<view @click.stop="handleFile(item)">
|
||||||
<view class="device-header">
|
<view class="device-header">
|
||||||
<view class="deviceIMG">
|
<view class="deviceIMG">
|
||||||
@ -35,17 +59,20 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="device-name">
|
<view class="device-name">
|
||||||
<view>设备:{{item.deviceName}}</view>
|
<view>设备:{{item.deviceName}}</view>
|
||||||
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}</view>
|
<view class="ID">
|
||||||
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
|
||||||
|
</view>
|
||||||
|
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
||||||
|
<view class="onlines" v-if="item.communicationMode==0">在线</view>
|
||||||
|
<view>电量:90%</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="device-status online">已连接</view> -->
|
<view class="" v-if="item.communicationMode==1">
|
||||||
<view class="device-status unline">未连接</view>
|
<view class="device-status online">已连接</view>
|
||||||
<view class="device-info" v-if="item.communicationMode==0">
|
<view class="device-status unline">未连接</view>
|
||||||
<text class="onlines">在线</text>
|
|
||||||
<text class="line"></text>
|
|
||||||
<text>电量:90%</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/images/cires.png" class="circle"></image>
|
<image src="/static/images/cires.png" class="circle"></image>
|
||||||
</uni-swipe-action-item>
|
</uni-swipe-action-item>
|
||||||
@ -152,7 +179,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
page: 1, // 当前页码
|
page: 1, // 当前页码
|
||||||
size:10, // 每页条数
|
size: 10, // 每页条数
|
||||||
total: 0, // 总数据量
|
total: 0, // 总数据量
|
||||||
loading: false,
|
loading: false,
|
||||||
finished: false,
|
finished: false,
|
||||||
@ -334,7 +361,7 @@
|
|||||||
// communicationMode 0是4G 1是蓝牙
|
// communicationMode 0是4G 1是蓝牙
|
||||||
if (item.communicationMode == 0) {
|
if (item.communicationMode == 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/6170/deviceControl/index'
|
url: `/pages/6170/deviceControl/index?id=${item.id}`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -381,15 +408,17 @@
|
|||||||
/* justify-content: space-around; */
|
/* justify-content: space-around; */
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
/* min-width: 100%; */
|
/* min-width: 100%; */
|
||||||
/* 最小宽度 */
|
/* 最小宽度 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-item {
|
.tab-item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
/* min-width: 120rpx; */
|
/* min-width: 120rpx; */
|
||||||
padding: 0 30rpx; /* 左右内边距 */
|
padding: 0 30rpx;
|
||||||
text-align: center; /* 文字居中 */
|
/* 左右内边距 */
|
||||||
|
text-align: center;
|
||||||
|
/* 文字居中 */
|
||||||
/* 设置最小宽度 */
|
/* 设置最小宽度 */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,45 +436,38 @@
|
|||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
.gprs{
|
|
||||||
width:28rpx;
|
.gprs {
|
||||||
height:35rpx;
|
width: 28rpx;
|
||||||
|
height: 35rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left:50rpx
|
left: 50rpx
|
||||||
}
|
}
|
||||||
|
|
||||||
.Sendmessage {
|
.Sendmessage {
|
||||||
margin-left: 50rpx;
|
margin-left: 50rpx;
|
||||||
border: 1px solid rgba(187, 230, 0, 0.4);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
border-radius: 20px;
|
|
||||||
padding: 7rpx 20rpx;
|
|
||||||
color: rgba(187, 230, 0, 1);
|
|
||||||
}
|
}
|
||||||
.callpolice{
|
|
||||||
border: 1px solid rgba(224, 52, 52, 0.4);
|
.callpolice {
|
||||||
border-radius: 20px;
|
|
||||||
color: rgba(224, 52, 52, 1);
|
color: rgba(224, 52, 52, 1);
|
||||||
width: 150rpx;
|
|
||||||
text-align: center;
|
|
||||||
padding: 5rpx 10rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 设备卡片 */
|
/* 设备卡片 */
|
||||||
.device-card {
|
.device-card {
|
||||||
background-color: rgb(26, 26, 26);
|
background-color: rgb(26, 26, 26);
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
/* padding: 30rpx; */
|
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
/* box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); */
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-header {
|
/* .device-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
padding: 30rpx 0 10rpx 30rpx;
|
padding: 30rpx 0 10rpx 30rpx;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-name {
|
.device-name {
|
||||||
@ -477,8 +499,8 @@
|
|||||||
width: 8rpx;
|
width: 8rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 40rpx;
|
right: 18rpx;
|
||||||
top: 80rpx;
|
top: 65rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.online {
|
.online {
|
||||||
@ -498,11 +520,15 @@
|
|||||||
|
|
||||||
.device-info {
|
.device-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0rpx 0rpx 30rpx 30rpx;
|
width: 100%;
|
||||||
|
}
|
||||||
|
.device-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.deviceIMG {
|
.deviceIMG {
|
||||||
@ -547,19 +573,123 @@
|
|||||||
color: rgba(255, 255, 255, 0.6);
|
color: rgba(255, 255, 255, 0.6);
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
}
|
} */
|
||||||
|
.device-header {
|
||||||
.device-uplod {
|
display: flex;
|
||||||
background-color: rgb(26, 26, 26);
|
|
||||||
border-radius: 16rpx;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
margin-bottom: 15rpx;
|
||||||
height: 202rpx;
|
padding: 30rpx 0 10rpx 30rpx;
|
||||||
line-height: 200rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-swipe-action-item__options {
|
.unline {
|
||||||
transition: width 0.3s ease;
|
color: rgba(255, 255, 255, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-name {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
margin-left: 24rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: 75%;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ID {
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
font-size: 26rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-status {
|
||||||
|
width: 122rpx;
|
||||||
|
height: 52rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
border-radius: 0px 8px 0px 8px;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
right: 0rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 52rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
width: 8rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 25rpx;
|
||||||
|
top: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.online {
|
||||||
|
color: rgb(187, 230, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-id {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
position: relative;
|
||||||
|
padding: 0rpx 0rpx 30rpx 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deviceIMG {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
position: relative;
|
||||||
|
background-color: rgba(42, 42, 42, 0.6);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.IMG {
|
||||||
|
width: 68rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
margin-left: 17%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 15rpx;
|
||||||
|
height: 15rpx;
|
||||||
|
background: rgb(0, 171, 103);
|
||||||
|
border-radius: 50%;
|
||||||
|
top: 20rpx;
|
||||||
|
left: -20rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 2rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
rgba(0, 0, 0, 0) 0%,
|
||||||
|
rgb(255, 255, 255) 50%,
|
||||||
|
rgba(255, 255, 255, 0) 100%);
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-status {
|
||||||
|
text-align: center;
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 遮罩层 */
|
/* 遮罩层 */
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
class="agreeT">《隐私政策》</a></text>
|
class="agreeT">《隐私政策》</a></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 登录按钮 -->
|
<!-- 登录按钮 -->
|
||||||
<button class="login-btn" @click="handleLogin">
|
<button class="login-btn" @click="handleLogin">
|
||||||
登录
|
登录
|
||||||
@ -114,7 +113,6 @@
|
|||||||
},
|
},
|
||||||
// 登录
|
// 登录
|
||||||
async handleLogin() {
|
async handleLogin() {
|
||||||
console.log('33333');
|
|
||||||
if (this.phone == '') {
|
if (this.phone == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '手机号不能为空',
|
title: '手机号不能为空',
|
||||||
@ -146,7 +144,6 @@
|
|||||||
smsCode: this.code,
|
smsCode: this.code,
|
||||||
tenantId: '894078' //租户ID
|
tenantId: '894078' //租户ID
|
||||||
})
|
})
|
||||||
console.log(res, 'res44444');
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.setStorageSync('token', res.data.access_token) // 缓存token
|
uni.setStorageSync('token', res.data.access_token) // 缓存token
|
||||||
|
403
pages/common/operatingInstruct/index.vue
Normal file
403
pages/common/operatingInstruct/index.vue
Normal file
@ -0,0 +1,403 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 使用自定义导航栏 -->
|
||||||
|
<view>
|
||||||
|
<custom-navbar title="操作说明" :showBack="true" backgroundColor="#202020" color="#FFFFFF"
|
||||||
|
:right-text="isDeleteMode ? '完成' : '删除'" right-color="rgba(255, 255, 255, 0.87)"
|
||||||
|
@right-click="toggleDeleteMode">
|
||||||
|
</custom-navbar>
|
||||||
|
|
||||||
|
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||||
|
<view class="example-body">
|
||||||
|
<!-- 图片列表 -->
|
||||||
|
<view class="image-list">
|
||||||
|
<view class="image-item" v-for="(image, index) in instructionImages" :key="index"
|
||||||
|
@click="handleImageClick(index,image)">
|
||||||
|
<image :src="image.fileUrl" mode="aspectFit" class="instruction-image"
|
||||||
|
:class="{ 'image-selected': isDeleteMode && selectedImages.includes(index) }"></image>
|
||||||
|
|
||||||
|
<!-- 多选模式下的选中标记 -->
|
||||||
|
<view class="checkmark" v-if="isDeleteMode && selectedImages.includes(index)">
|
||||||
|
<image src="/static/images/delete-icon.png" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 上传按钮(非删除模式显示) -->
|
||||||
|
<view class="upload-btn" v-if="!isDeleteMode">
|
||||||
|
<uni-file-picker ref="filePicker" v-model="fileList" @select="selectFile" limit="9"
|
||||||
|
class="custom-file-picker"></uni-file-picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部删除按钮(多选模式显示) -->
|
||||||
|
<view class="delete-footer" v-if="isDeleteMode && selectedImages.length > 0">
|
||||||
|
<button @click="deleteSelectedImages">删除({{selectedImages.length}})</button>
|
||||||
|
</view>
|
||||||
|
<!-- 删除弹框 -->
|
||||||
|
<view class="agreement-mask" v-if="deleteShow">
|
||||||
|
<view class="agreement-popupC">
|
||||||
|
<view class="popup-content">
|
||||||
|
<image src="/static/images/dell.png" mode="" class="svg"></image>
|
||||||
|
<uni-icon class="trash"></uni-icon>
|
||||||
|
<view>
|
||||||
|
<view class="popup-Title">确定删除所选设备!</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 按钮组 -->
|
||||||
|
<view class="popup-buttons">
|
||||||
|
<button class="btn agreeBtn" @click="handleBtn">确定</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
baseURL,
|
||||||
|
getToken,
|
||||||
|
clientid
|
||||||
|
} from '@/utils/request'
|
||||||
|
import {
|
||||||
|
fileInfo,
|
||||||
|
fileDelete
|
||||||
|
} from '@/api/common/operatingInstruct/index.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
||||||
|
fileList: [],
|
||||||
|
deviceID: "",
|
||||||
|
instructionImages: [],
|
||||||
|
isDeleteMode: false, // 是否删除模式
|
||||||
|
selectedImages: [], // 选中的图片索引
|
||||||
|
deleteShow: false,
|
||||||
|
ImageData: [],
|
||||||
|
filePicker: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 选择文件
|
||||||
|
selectFile(e) {
|
||||||
|
console.log('选择文件:', e)
|
||||||
|
// const file = e.tempFiles[0].file
|
||||||
|
const files = e.tempFiles.map(item => item.file)
|
||||||
|
console.log('files', files);
|
||||||
|
this.uploadFile(files)
|
||||||
|
},
|
||||||
|
// 上传图片
|
||||||
|
uploadFile(files) {
|
||||||
|
this.$refs.filePicker.clearFiles() // 通过ref操作uni-file-picker组件
|
||||||
|
uni.showLoading({
|
||||||
|
title: '上传中...'
|
||||||
|
})
|
||||||
|
files.forEach(file => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: baseURL + '/app/file/upload',
|
||||||
|
filePath: file.path || file.url,
|
||||||
|
name: 'files',
|
||||||
|
formData: {
|
||||||
|
deviceId: this.deviceID,
|
||||||
|
fileType: '1' //文件类型(1:操作说明,2:产品参数)
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'Authorization': 'Bearer ' + getToken(),
|
||||||
|
'clientid': clientid(),
|
||||||
|
},
|
||||||
|
complete: (res) => {
|
||||||
|
console.log(res, 'resss');
|
||||||
|
try {
|
||||||
|
const responseData = JSON.parse(res.data);
|
||||||
|
if (responseData.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: responseData.msg,
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
|
this.$refs.filePicker.clearFiles(); // 清空已选文件
|
||||||
|
this.callOtherApi();
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: responseData.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取图片列表
|
||||||
|
callOtherApi() {
|
||||||
|
let data = {
|
||||||
|
deviceId: this.deviceID
|
||||||
|
}
|
||||||
|
fileInfo(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.instructionImages = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 切换删除模式
|
||||||
|
toggleDeleteMode() {
|
||||||
|
this.isDeleteMode = !this.isDeleteMode
|
||||||
|
if (!this.isDeleteMode) {
|
||||||
|
this.selectedImages = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 图片点击处理
|
||||||
|
handleImageClick(index, item) {
|
||||||
|
if (this.isDeleteMode) {
|
||||||
|
// 删除模式下处理多选
|
||||||
|
const selectedIndex = this.selectedImages.indexOf(index)
|
||||||
|
if (selectedIndex > -1) {
|
||||||
|
this.selectedImages.splice(selectedIndex, 1)
|
||||||
|
this.ImageData.splice(selectedIndex, 1) // 保持同步删除
|
||||||
|
} else {
|
||||||
|
this.selectedImages.push(
|
||||||
|
index
|
||||||
|
|
||||||
|
)
|
||||||
|
this.ImageData.push(item) // 保持同步添加
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 正常模式下预览图片
|
||||||
|
uni.previewImage({
|
||||||
|
current: this.instructionImages[index].fileUrl,
|
||||||
|
urls: this.instructionImages.map(item => item.fileUrl)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除选中的图片
|
||||||
|
deleteSelectedImages() {
|
||||||
|
if (this.selectedImages.length === 0) return
|
||||||
|
this.deleteShow = true
|
||||||
|
},
|
||||||
|
async handleBtn() {
|
||||||
|
try {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '删除中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
// 构造删除请求数据
|
||||||
|
const ids = this.ImageData.map(item => item.id).join(',')
|
||||||
|
// 调用删除接口
|
||||||
|
const res = await fileDelete(ids)
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '删除成功',
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
// 从后往前删除,避免索引变化
|
||||||
|
this.selectedImages
|
||||||
|
.sort((a, b) => b.index - a.index)
|
||||||
|
.forEach(item => {
|
||||||
|
this.instructionImages.splice(item.index, 1)
|
||||||
|
})
|
||||||
|
this.callOtherApi()
|
||||||
|
// 重置状态
|
||||||
|
this.selectedImages = []
|
||||||
|
this.isDeleteMode = false
|
||||||
|
this.deleteShow = false
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.deleteShow = false
|
||||||
|
}
|
||||||
|
} catch (error) {} finally {
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.deviceID = options.id
|
||||||
|
this.callOtherApi()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.device-page {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: rgb(18, 18, 18);
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-body {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片列表 */
|
||||||
|
.image-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin: -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片项 */
|
||||||
|
.image-item {
|
||||||
|
width: 33.33%;
|
||||||
|
padding: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片样式 */
|
||||||
|
.instruction-image {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #2a2a2a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选中效果 */
|
||||||
|
.image-selected {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选中标记 */
|
||||||
|
.checkmark {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20rpx;
|
||||||
|
right: 40rpx;
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkmark image {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上传按钮 */
|
||||||
|
.upload-btn {
|
||||||
|
width: 33.33%;
|
||||||
|
padding: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 底部删除按钮 */
|
||||||
|
.delete-footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-footer button {
|
||||||
|
width: 90%;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
background: rgba(187, 230, 0, 1);
|
||||||
|
background: rgba(187, 230, 0, 1);
|
||||||
|
border-radius: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 遮罩层 */
|
||||||
|
.agreement-mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 弹窗主体 */
|
||||||
|
.agreement-popup {
|
||||||
|
width: 100%;
|
||||||
|
height: 50%;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
border-radius: 60rpx 60rpx 0rpx 0rpx;
|
||||||
|
padding: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-Title {
|
||||||
|
color: rgba(255, 255, 255, 0.86);
|
||||||
|
text-align: center;
|
||||||
|
padding: 30rpx 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-buttons {
|
||||||
|
display: flex;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement-popupC {
|
||||||
|
width: 60%;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid rgba(255, 200, 78, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-flex {
|
||||||
|
display: flex;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
height: 50rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-input {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
padding: 10rpx 0rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg {
|
||||||
|
width: 58rpx;
|
||||||
|
height: 62rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 通用按钮样式 */
|
||||||
|
.btn {
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin: 10rpx auto;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 同意按钮 */
|
||||||
|
.agreeBtn {
|
||||||
|
background: #FFC84E;
|
||||||
|
color: #232323;
|
||||||
|
border: none;
|
||||||
|
width: 170rpx !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 使用自定义导航栏 -->
|
<!-- 使用自定义导航栏 -->
|
||||||
<custom-navbar :title="navTitle" :showBack="true" backgroundColor="#202020" color="#FFFFFF" right-text="编辑"
|
<custom-navbar title="操作视频" :showBack="true" backgroundColor="#202020" color="#FFFFFF"></custom-navbar>
|
||||||
right-color="rgba(255, 255, 255, 0.87)" @right-click="handleEdit"></custom-navbar>
|
|
||||||
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||||
<scroll-view scroll-y>
|
<scroll-view scroll-y>
|
||||||
<uni-swipe-action >
|
<uni-swipe-action >
|
||||||
@ -36,37 +35,7 @@
|
|||||||
return {
|
return {
|
||||||
navTitle: '操作视频',
|
navTitle: '操作视频',
|
||||||
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
||||||
videoList: [{
|
videoList: [],
|
||||||
id: 1,
|
|
||||||
title: '使用教程1',
|
|
||||||
url: 'https://www.bilibili.com/variety/?spm_id_from=333.1007.0.0',
|
|
||||||
showConfirm: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
title: '使用教程2',
|
|
||||||
url: 'www.baidu.com',
|
|
||||||
showConfirm: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
title: '使用教程3',
|
|
||||||
url: 'www.baidu.com',
|
|
||||||
showConfirm: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
title: '使用教程4',
|
|
||||||
url: 'www.baidu.com',
|
|
||||||
showConfirm: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 5,
|
|
||||||
title: '使用教程5',
|
|
||||||
url: 'www.baidu.com',
|
|
||||||
showConfirm: false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
deleteOptions: [{
|
deleteOptions: [{
|
||||||
text: '编辑',
|
text: '编辑',
|
||||||
style: {
|
style: {
|
||||||
@ -96,14 +65,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 导航栏编辑按钮
|
|
||||||
handleEdit() {
|
|
||||||
uni.showToast({
|
|
||||||
title: '点击了导航栏编辑',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 添加视频
|
// 添加视频
|
||||||
addvideo() {
|
addvideo() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
403
pages/common/productDes/index.vue
Normal file
403
pages/common/productDes/index.vue
Normal file
@ -0,0 +1,403 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 使用自定义导航栏 -->
|
||||||
|
<view>
|
||||||
|
<custom-navbar title="产品说明" :showBack="true" backgroundColor="#202020" color="#FFFFFF"
|
||||||
|
:right-text="isDeleteMode ? '完成' : '删除'" right-color="rgba(255, 255, 255, 0.87)"
|
||||||
|
@right-click="toggleDeleteMode">
|
||||||
|
</custom-navbar>
|
||||||
|
|
||||||
|
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||||
|
<view class="example-body">
|
||||||
|
<!-- 图片列表 -->
|
||||||
|
<view class="image-list">
|
||||||
|
<view class="image-item" v-for="(image, index) in instructionImages" :key="index"
|
||||||
|
@click="handleImageClick(index,image)">
|
||||||
|
<image :src="image.fileUrl" mode="aspectFit" class="instruction-image"
|
||||||
|
:class="{ 'image-selected': isDeleteMode && selectedImages.includes(index) }"></image>
|
||||||
|
|
||||||
|
<!-- 多选模式下的选中标记 -->
|
||||||
|
<view class="checkmark" v-if="isDeleteMode && selectedImages.includes(index)">
|
||||||
|
<image src="/static/images/delete-icon.png" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 上传按钮(非删除模式显示) -->
|
||||||
|
<view class="upload-btn" v-if="!isDeleteMode">
|
||||||
|
<uni-file-picker ref="filePicker" v-model="fileList" @select="selectFile" limit="9"
|
||||||
|
class="custom-file-picker"></uni-file-picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部删除按钮(多选模式显示) -->
|
||||||
|
<view class="delete-footer" v-if="isDeleteMode && selectedImages.length > 0">
|
||||||
|
<button @click="deleteSelectedImages">删除({{selectedImages.length}})</button>
|
||||||
|
</view>
|
||||||
|
<!-- 删除弹框 -->
|
||||||
|
<view class="agreement-mask" v-if="deleteShow">
|
||||||
|
<view class="agreement-popupC">
|
||||||
|
<view class="popup-content">
|
||||||
|
<image src="/static/images/dell.png" mode="" class="svg"></image>
|
||||||
|
<uni-icon class="trash"></uni-icon>
|
||||||
|
<view>
|
||||||
|
<view class="popup-Title">确定删除所选设备!</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 按钮组 -->
|
||||||
|
<view class="popup-buttons">
|
||||||
|
<button class="btn agreeBtn" @click="handleBtn">确定</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
baseURL,
|
||||||
|
getToken,
|
||||||
|
clientid
|
||||||
|
} from '@/utils/request'
|
||||||
|
import {
|
||||||
|
fileInfo,
|
||||||
|
fileDelete
|
||||||
|
} from '@/api/common/operatingInstruct/index.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
||||||
|
fileList: [],
|
||||||
|
deviceID: "",
|
||||||
|
instructionImages: [],
|
||||||
|
isDeleteMode: false, // 是否删除模式
|
||||||
|
selectedImages: [], // 选中的图片索引
|
||||||
|
deleteShow: false,
|
||||||
|
ImageData: [],
|
||||||
|
filePicker: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 选择文件
|
||||||
|
selectFile(e) {
|
||||||
|
console.log('选择文件:', e)
|
||||||
|
// const file = e.tempFiles[0].file
|
||||||
|
const files = e.tempFiles.map(item => item.file)
|
||||||
|
console.log('files', files);
|
||||||
|
this.uploadFile(files)
|
||||||
|
},
|
||||||
|
// 上传图片
|
||||||
|
uploadFile(files) {
|
||||||
|
this.$refs.filePicker.clearFiles() // 通过ref操作uni-file-picker组件
|
||||||
|
uni.showLoading({
|
||||||
|
title: '上传中...'
|
||||||
|
})
|
||||||
|
files.forEach(file => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: baseURL + '/app/file/upload',
|
||||||
|
filePath: file.path || file.url,
|
||||||
|
name: 'files',
|
||||||
|
formData: {
|
||||||
|
deviceId: this.deviceID,
|
||||||
|
fileType: '2' //文件类型(1:操作说明,2:产品参数)
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'Authorization': 'Bearer ' + getToken(),
|
||||||
|
'clientid': clientid(),
|
||||||
|
},
|
||||||
|
complete: (res) => {
|
||||||
|
console.log(res, 'resss');
|
||||||
|
try {
|
||||||
|
const responseData = JSON.parse(res.data);
|
||||||
|
if (responseData.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: responseData.msg,
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
|
this.$refs.filePicker.clearFiles(); // 清空已选文件
|
||||||
|
this.callOtherApi();
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: responseData.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取图片列表
|
||||||
|
callOtherApi() {
|
||||||
|
let data = {
|
||||||
|
deviceId: this.deviceID
|
||||||
|
}
|
||||||
|
fileInfo(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.instructionImages = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 切换删除模式
|
||||||
|
toggleDeleteMode() {
|
||||||
|
this.isDeleteMode = !this.isDeleteMode
|
||||||
|
if (!this.isDeleteMode) {
|
||||||
|
this.selectedImages = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 图片点击处理
|
||||||
|
handleImageClick(index, item) {
|
||||||
|
if (this.isDeleteMode) {
|
||||||
|
// 删除模式下处理多选
|
||||||
|
const selectedIndex = this.selectedImages.indexOf(index)
|
||||||
|
if (selectedIndex > -1) {
|
||||||
|
this.selectedImages.splice(selectedIndex, 1)
|
||||||
|
this.ImageData.splice(selectedIndex, 1) // 保持同步删除
|
||||||
|
} else {
|
||||||
|
this.selectedImages.push(
|
||||||
|
index
|
||||||
|
|
||||||
|
)
|
||||||
|
this.ImageData.push(item) // 保持同步添加
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 正常模式下预览图片
|
||||||
|
uni.previewImage({
|
||||||
|
current: this.instructionImages[index].fileUrl,
|
||||||
|
urls: this.instructionImages.map(item => item.fileUrl)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除选中的图片
|
||||||
|
deleteSelectedImages() {
|
||||||
|
if (this.selectedImages.length === 0) return
|
||||||
|
this.deleteShow = true
|
||||||
|
},
|
||||||
|
async handleBtn() {
|
||||||
|
try {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '删除中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
// 构造删除请求数据
|
||||||
|
const ids = this.ImageData.map(item => item.id).join(',')
|
||||||
|
// 调用删除接口
|
||||||
|
const res = await fileDelete(ids)
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '删除成功',
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
// 从后往前删除,避免索引变化
|
||||||
|
this.selectedImages
|
||||||
|
.sort((a, b) => b.index - a.index)
|
||||||
|
.forEach(item => {
|
||||||
|
this.instructionImages.splice(item.index, 1)
|
||||||
|
})
|
||||||
|
this.callOtherApi()
|
||||||
|
// 重置状态
|
||||||
|
this.selectedImages = []
|
||||||
|
this.isDeleteMode = false
|
||||||
|
this.deleteShow = false
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.deleteShow = false
|
||||||
|
}
|
||||||
|
} catch (error) {} finally {
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.deviceID = options.id
|
||||||
|
this.callOtherApi()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.device-page {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: rgb(18, 18, 18);
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-body {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片列表 */
|
||||||
|
.image-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin: -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片项 */
|
||||||
|
.image-item {
|
||||||
|
width: 33.33%;
|
||||||
|
padding: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片样式 */
|
||||||
|
.instruction-image {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #2a2a2a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选中效果 */
|
||||||
|
.image-selected {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选中标记 */
|
||||||
|
.checkmark {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20rpx;
|
||||||
|
right: 40rpx;
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkmark image {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上传按钮 */
|
||||||
|
.upload-btn {
|
||||||
|
width: 33.33%;
|
||||||
|
padding: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 底部删除按钮 */
|
||||||
|
.delete-footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-footer button {
|
||||||
|
width: 90%;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
background: rgba(187, 230, 0, 1);
|
||||||
|
background: rgba(187, 230, 0, 1);
|
||||||
|
border-radius: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 遮罩层 */
|
||||||
|
.agreement-mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 弹窗主体 */
|
||||||
|
.agreement-popup {
|
||||||
|
width: 100%;
|
||||||
|
height: 50%;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
border-radius: 60rpx 60rpx 0rpx 0rpx;
|
||||||
|
padding: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-Title {
|
||||||
|
color: rgba(255, 255, 255, 0.86);
|
||||||
|
text-align: center;
|
||||||
|
padding: 30rpx 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-buttons {
|
||||||
|
display: flex;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement-popupC {
|
||||||
|
width: 60%;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid rgba(255, 200, 78, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-flex {
|
||||||
|
display: flex;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
height: 50rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-input {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
padding: 10rpx 0rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg {
|
||||||
|
width: 58rpx;
|
||||||
|
height: 62rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 通用按钮样式 */
|
||||||
|
.btn {
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin: 10rpx auto;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 同意按钮 */
|
||||||
|
.agreeBtn {
|
||||||
|
background: #FFC84E;
|
||||||
|
color: #232323;
|
||||||
|
border: none;
|
||||||
|
width: 170rpx !important;
|
||||||
|
}
|
||||||
|
</style>
|
BIN
static/images/delete-icon.png
Normal file
BIN
static/images/delete-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 605 B |
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
var isReady=false;var onReadyCallbacks=[];
|
var isReady=false;var onReadyCallbacks=[];
|
||||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
||||||
var __uniConfig = {"pages":["pages/common/login/index","pages/common/index/index","pages/common/user/index","pages/common/scan/scan","pages/common/qrcode/qrcode","pages/common/send/index","pages/common/userAgreement/index","pages/common/privacyAgreement/index","pages/common/aboutUs/index","pages/6170/deviceControl/index","pages/6170/operationVideo/index","pages/6170/addvideo/index","pages/6170/editVideo/index","pages/6170/operatingInstruct/index","pages/6155/index","pages/6155/bluetooth/bluetooth"],"window":{"navigationBarTextStyle":"white","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#121212","backgroundColor":"#121212"},"tabBar":{"color":"#fff","selectedColor":"#BBE600","backgroundColor":"#202020","list":[{"pagePath":"pages/common/index/index","text":"我的设备","iconPath":"/static/tabs/device.png","selectedIconPath":"/static/tabs/device-HL.png"},{"pagePath":"pages/common/user/index","text":"我的","iconPath":"/static/tabs/my.png","selectedIconPath":"/static/tabs/my-HL.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JingQuan","compilerVersion":"4.64","entryPagePath":"pages/common/login/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
var __uniConfig = {"pages":["pages/common/login/index","pages/common/index/index","pages/common/user/index","pages/common/scan/scan","pages/common/qrcode/qrcode","pages/common/send/index","pages/common/userAgreement/index","pages/common/privacyAgreement/index","pages/common/aboutUs/index","pages/6170/deviceControl/index","pages/6170/operationVideo/index","pages/6170/addvideo/index","pages/6170/editVideo/index","pages/common/operatingInstruct/index","pages/common/productDes/index","pages/6155/index","pages/6155/bluetooth/bluetooth"],"window":{"navigationBarTextStyle":"white","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#121212","backgroundColor":"#121212"},"tabBar":{"color":"#fff","selectedColor":"#BBE600","backgroundColor":"#202020","list":[{"pagePath":"pages/common/index/index","text":"我的设备","iconPath":"/static/tabs/device.png","selectedIconPath":"/static/tabs/device-HL.png"},{"pagePath":"pages/common/user/index","text":"我的","iconPath":"/static/tabs/my.png","selectedIconPath":"/static/tabs/my-HL.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JingQuan","compilerVersion":"4.64","entryPagePath":"pages/common/login/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||||
var __uniRoutes = [{"path":"/pages/common/login/index","meta":{"isQuit":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的"}},{"path":"/pages/common/scan/scan","meta":{},"window":{"navigationBarTitleText":"扫描"}},{"path":"/pages/common/qrcode/qrcode","meta":{},"window":{"navigationBarTitleText":"扫描到的设备"}},{"path":"/pages/common/send/index","meta":{},"window":{"navigationBarTitleText":"发送信息"}},{"path":"/pages/common/userAgreement/index","meta":{},"window":{"navigationBarTitleText":"用户协议"}},{"path":"/pages/common/privacyAgreement/index","meta":{},"window":{"navigationBarTitleText":"隐私协议"}},{"path":"/pages/common/aboutUs/index","meta":{},"window":{"navigationBarTitleText":"关于我们"}},{"path":"/pages/6170/deviceControl/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6170/operationVideo/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6170/addvideo/index","meta":{},"window":{"navigationBarTitleText":"添加"}},{"path":"/pages/6170/editVideo/index","meta":{},"window":{"navigationBarTitleText":"编辑视频"}},{"path":"/pages/6170/operatingInstruct/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6155/index","meta":{},"window":{"navigationBarTitleText":"6155"}},{"path":"/pages/6155/bluetooth/bluetooth","meta":{},"window":{"navigationStyle":"custom"}}];
|
var __uniRoutes = [{"path":"/pages/common/login/index","meta":{"isQuit":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的"}},{"path":"/pages/common/scan/scan","meta":{},"window":{"navigationBarTitleText":"扫描"}},{"path":"/pages/common/qrcode/qrcode","meta":{},"window":{"navigationBarTitleText":"扫描到的设备"}},{"path":"/pages/common/send/index","meta":{},"window":{"navigationBarTitleText":"发送信息"}},{"path":"/pages/common/userAgreement/index","meta":{},"window":{"navigationBarTitleText":"用户协议"}},{"path":"/pages/common/privacyAgreement/index","meta":{},"window":{"navigationBarTitleText":"隐私协议"}},{"path":"/pages/common/aboutUs/index","meta":{},"window":{"navigationBarTitleText":"关于我们"}},{"path":"/pages/6170/deviceControl/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6170/operationVideo/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6170/addvideo/index","meta":{},"window":{"navigationBarTitleText":"添加"}},{"path":"/pages/6170/editVideo/index","meta":{},"window":{"navigationBarTitleText":"编辑视频"}},{"path":"/pages/common/operatingInstruct/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/productDes/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6155/index","meta":{},"window":{"navigationBarTitleText":"6155"}},{"path":"/pages/6155/bluetooth/bluetooth","meta":{},"window":{"navigationStyle":"custom"}}];
|
||||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
||||||
|
1195
unpackage/dist/dev/app-plus/app-service.js
vendored
1195
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
1068
unpackage/dist/dev/app-plus/app-view.js
vendored
1068
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/dev/app-plus/static/images/delete-icon.png
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/static/images/delete-icon.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 605 B |
@ -1,44 +1,47 @@
|
|||||||
const BASE_URL = 'http://192.168.2.34:8001';
|
const BASE_URL = 'http://192.168.2.34:8000';
|
||||||
|
|
||||||
const request = (options) => {
|
const request = (options) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// 处理GET请求参数
|
// 处理GET请求参数
|
||||||
let url = BASE_URL + options.url;
|
let url = BASE_URL + options.url;
|
||||||
if (options.method === 'GET' && options.data) {
|
if (options.method === 'GET' && options.data) {
|
||||||
// 使用qs序列化参数
|
// 使用qs序列化参数
|
||||||
const params = Object.keys(options.data)
|
const params = Object.keys(options.data)
|
||||||
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(options.data[key])}`)
|
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(options.data[key])}`)
|
||||||
.join('&');
|
.join('&');
|
||||||
url += `?${params}`;
|
url += `?${params}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
url: url,
|
url: url,
|
||||||
method: options.method || 'GET',
|
method: options.method || 'GET',
|
||||||
data: options.method !== 'GET' ? options.data : {},
|
data: options.method !== 'GET' ? options.data : {},
|
||||||
header: options.header || {},
|
header: options.header || {},
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!options.url.includes('/login')) {
|
if (!options.url.includes('/login')) {
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
const clientid = uni.getStorageSync('clientID');
|
const clientid = uni.getStorageSync('clientID');
|
||||||
if (token) {
|
if (token) {
|
||||||
config.header['Authorization'] = 'Bearer ' + token;
|
config.header['Authorization'] = 'Bearer ' + token;
|
||||||
config.header['clientid'] = clientid;
|
config.header['clientid'] = clientid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!config.header['Content-Type']) {
|
if (!config.header['Content-Type']) {
|
||||||
config.header['Content-Type'] = 'application/json';
|
config.header['Content-Type'] = 'application/json';
|
||||||
}
|
}
|
||||||
uni.request(config);
|
uni.request(config);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export default request;
|
export default request;
|
||||||
|
// 导出基础URL以便其他地方使用
|
||||||
|
export const baseURL = BASE_URL
|
||||||
|
export const getToken = () => uni.getStorageSync('token') // 获取token的方法
|
||||||
|
export const clientid =() => uni.getStorageSync('clientID');
|
Reference in New Issue
Block a user