增加晶全app静态页面
This commit is contained in:
203
pages/6170/addvideo/index.vue
Normal file
203
pages/6170/addvideo/index.vue
Normal file
@ -0,0 +1,203 @@
|
||||
<template>
|
||||
<view class="device-page">
|
||||
<!-- 表单内容 -->
|
||||
<view class="form-content">
|
||||
<!-- 名称输入框 -->
|
||||
<view class="input-group">
|
||||
<text class="label">名称</text>
|
||||
<input class="input" type="text" placeholder="请输入名称" v-model="name" />
|
||||
</view>
|
||||
|
||||
<!-- 视频链接输入框 -->
|
||||
<view class="input-group">
|
||||
<text class="label">视频链接</text>
|
||||
<input class="input" type="text" placeholder="请输入视频链接" v-model="videoLink" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 保存按钮 -->
|
||||
<button class="save-button" @click="saveData">保 存</button>
|
||||
|
||||
<!--===================== 保存成功提示框================== -->
|
||||
<view class="agreement-mask" v-if="showModal">
|
||||
<!-- 上传画面弹窗 -->
|
||||
<view class="agreement-popupC">
|
||||
<view class="popup-content">
|
||||
<image src="/static/images/path2.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>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
videoLink: '',
|
||||
showModal: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
saveData() {
|
||||
// 这里可以添加保存数据的逻辑,例如发送到服务器等
|
||||
console.log('保存数据:', this.name, this.videoLink);
|
||||
if (this.name == "") {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '名称不能为空'
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.videoLink == '') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '视频链接不为空'
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.showModal = true
|
||||
uni.navigateBack()
|
||||
},
|
||||
// 确定提示框
|
||||
handleBtn() {
|
||||
this.showModal = false
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.device-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.form-content {
|
||||
flex: 1;
|
||||
/* padding: 20px; */
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label {
|
||||
width: 70px;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
height: 96rpx;
|
||||
padding: 0 10px;
|
||||
background-color: rgb(26, 26, 26);
|
||||
color: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
/* 当输入框获得焦点时,更改边框颜色 */
|
||||
.input:focus {
|
||||
border-color: #7AC23C;
|
||||
/* 获得焦点时的边框颜色 */
|
||||
outline: none;
|
||||
/* 移除默认的outline样式 */
|
||||
}
|
||||
|
||||
.save-button {
|
||||
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
|
||||
}
|
||||
|
||||
/* 遮罩层 */
|
||||
.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.87);
|
||||
padding: 20rpx 0rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.agreement-popupC {
|
||||
width: 60%;
|
||||
background-color: rgb(42, 42, 42);
|
||||
border-radius: 40rpx;
|
||||
padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid rgba(187, 230, 0, 0.3);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.path2 {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* 通用按钮样式 */
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
816
pages/6170/deviceControl/index.vue
Normal file
816
pages/6170/deviceControl/index.vue
Normal file
@ -0,0 +1,816 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 使用自定义导航栏 -->
|
||||
<custom-navbar :title="navTitle" :showBack="true" color="#FFFFFF" :rightIcon=true
|
||||
right-color="rgba(255, 255, 255, 0.87)" @right-click="uploadStartup"></custom-navbar>
|
||||
<view class="device-detail-container" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||
<!-- 设备电量信息 -->
|
||||
<view class="battery-section">
|
||||
<view class="battery-sectionLeft">
|
||||
<image src="/static/images/bip.6.png" class="bipImg"></image>
|
||||
</view>
|
||||
<view>
|
||||
<view class="battery-v1">
|
||||
<image src="/static/images/dl.png" class="dlIMG"></image>
|
||||
<view>
|
||||
<view class="battery-v2">90%</view>
|
||||
<view class="battery-v3">电量</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="battery-v1">
|
||||
<image src="/static/images/nz.png" class="dlIMG"></image>
|
||||
<view>
|
||||
<view class="battery-v2">1小时</view>
|
||||
<view class="battery-v3">续航时间</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 设备基本信息 -->
|
||||
<view class="info-card">
|
||||
<view class="info-row">
|
||||
<text class="info-label">IMEI号</text>
|
||||
<text class="info-value">123456</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">设备状态</text>
|
||||
<text class="info-value status-running">运行中</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">定位信息</text>
|
||||
<view class="info-value status-running">
|
||||
<view class="info-value status-running">114.72 30.28</view>
|
||||
<view class="info-value status-running">深圳市龙华区富源晟</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">灯光亮度</text>
|
||||
<text class="info-value status-running">%</text>
|
||||
</view>
|
||||
|
||||
<!-- 灯光亮度控制 -->
|
||||
<view class="control-card">
|
||||
<slider :value="sliderValue" min="0" max="100" activeColor="rgb(187, 230, 0)"
|
||||
backgroundColor="rgb(26, 26, 26)" show-value />
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 灯光模式选择 -->
|
||||
<view class="mode-section">
|
||||
<view class="mode-buttons">
|
||||
<view class="mode-v1">
|
||||
<view class="mode-v2" @click="selectMode('main')">
|
||||
<image src="/static/images/set.png" class="setIMG"></image>
|
||||
<view>
|
||||
<view class="battery-v2">灯光模式</view>
|
||||
<view class="mode-v3">{{ currentMainMode }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mode-v1">
|
||||
<view class="mode-v2" @click="lasermode">
|
||||
<image src="/static/images/jg.png" class="setIMG"></image>
|
||||
<view>
|
||||
<view class="battery-v2">激光模式</view>
|
||||
<!-- <view class="mode-v3">{{currentSecondaryMode}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mode-v1">
|
||||
<view class="mode-v2" @click="uploadStartup">
|
||||
<image src="/static/images/path7.png" class="setIMG"></image>
|
||||
<view>
|
||||
<view class="battery-v2">开机画面</view>
|
||||
<view class="mode-v3">上传</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 人员信息登记 -->
|
||||
<view class="form-section">
|
||||
<view class="mode-buttons">
|
||||
<view class="section-title">人员信息登记</view>
|
||||
<!-- <button class="send-btn">发送</button> -->
|
||||
<view class="right-icons">
|
||||
|
||||
<uni-icons @click="toggleForm" :type="isFormExpanded ? 'arrowup' : 'down'" size="20"
|
||||
color="rgba(255, 255, 255, 0.87" class="toggle-icon" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-content" v-if="isFormExpanded">
|
||||
<button class="send-btn1">发送</button>
|
||||
<view class="form-row">
|
||||
<text class="form-label">单位:</text>
|
||||
<input class="form-input" placeholder="请输入单位" />
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<text class="form-label">姓名:</text>
|
||||
<input class="form-input" placeholder="请输入姓名" />
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<text class="form-label">职位:</text>
|
||||
<input class="form-input" placeholder="请输入职位" />
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<text class="form-label">ID:</text>
|
||||
<input class="form-input" placeholder="请输入ID号" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 人员信息登记 -->
|
||||
<view class="form-section">
|
||||
<view class="mode-buttons">
|
||||
<view class="section-title">发送信息</view>
|
||||
<button class="send-btn">发送</button>
|
||||
</view>
|
||||
|
||||
<view class="form-row">
|
||||
<input class="form-input" placeholder="请输入文字" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 产品信息 -->
|
||||
<view class="section-title">产品信息</view>
|
||||
<view class="mode-buttons">
|
||||
<view class="mode_1" @click="productparams">
|
||||
<image src="/static/images/cp.png" mode="" class="cpIMG"></image>
|
||||
<view class="">产品参数</view>
|
||||
</view>
|
||||
<view class="mode_1" @click="operatingInst">
|
||||
<image src="/static/images/sm.png" mode="" class="cpIMG"></image>
|
||||
<view class="">操作说明</view>
|
||||
</view>
|
||||
<view class="mode_1" @click="operatingVideo">
|
||||
<image src="/static/images/sp.png" mode="" class="cpIMG"></image>
|
||||
<view class="">操作视频</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹框 -->
|
||||
<view class="agreement-mask" v-if="lightModeA">
|
||||
<!-- 协议弹窗 -->
|
||||
<view class="agreement-popup" @click.stop>
|
||||
<!-- 标题 -->
|
||||
<view class="popup-title"> {{ popupTitle }}</view>
|
||||
<view class="popup-content">
|
||||
<view v-for="(item, index) in items" :key="index">
|
||||
<view class="item" :class="{'selected': item.selected}" @click="onItemClick(index)">
|
||||
<image :src="item.image" class="setIMG"></image>
|
||||
{{item.text}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮组 -->
|
||||
<view class="popup-buttons">
|
||||
<button class="agree" @click="handleSumbit">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 上传开机画面弹框 -->
|
||||
<view class="agreement-mask" v-if="lightModeB">
|
||||
<!-- 上传画面弹窗 -->
|
||||
<view class="agreement-popup">
|
||||
<!-- 标题 -->
|
||||
<view class="popup-title">上传开机画面</view>
|
||||
<view class="popup-content">
|
||||
<view class="example-body">
|
||||
<uni-file-picker limit="1"></uni-file-picker>
|
||||
<view class="example_title">点击上传图片</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮组 -->
|
||||
<view class="popup-buttons">
|
||||
<button class="agree" @click="handleupload">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--===================== 激光提示框================== -->
|
||||
<view class="agreement-mask" v-if="lightModeC">
|
||||
<!-- 上传画面弹窗 -->
|
||||
<view class="agreement-popupC">
|
||||
<!-- 标题 -->
|
||||
<view class="popup-title">确认开启激光模式?</view>
|
||||
<view class="popup-content">
|
||||
<view class="popup-Title">
|
||||
<view>注意事项</view>
|
||||
<view>1.禁止直视光源或反射面!</view>
|
||||
<view>2.避免直射人或易燃物!</view>
|
||||
<view>3.需佩戴相应专业防护眼镜!</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮组 -->
|
||||
<view class="popup-buttons">
|
||||
<button class="btn disagree" @click="handleDisagree">取消</button>
|
||||
<button class="btn agreeBtn" @click="handleBtn">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mainMode: 'string',
|
||||
secondaryMode: 'string',
|
||||
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
||||
navTitle: "6170",
|
||||
sliderValue: 50,
|
||||
lightModeA: false,
|
||||
currentMainMode: '强光模式',
|
||||
currentSecondaryMode: '泛光模式',
|
||||
lightModeB: false,
|
||||
lightModeC: false, //激光提示框
|
||||
items: [],
|
||||
isFormExpanded: true // 默认展开
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
popupTitle() {
|
||||
return this.modeType === 'main' ? '灯光模式' : '激光模式';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectMode(type) {
|
||||
this.modeType = type;
|
||||
this.lightModeA = true;
|
||||
if (type === 'main') {
|
||||
this.items = [{
|
||||
text: '强光',
|
||||
selected: this.currentMainMode === '强光模式',
|
||||
image: '/static/images/sett.png'
|
||||
},
|
||||
{
|
||||
text: '弱光',
|
||||
selected: this.currentMainMode === '弱光模式',
|
||||
image: '/static/images/sett.png'
|
||||
},
|
||||
{
|
||||
text: '爆闪',
|
||||
selected: this.currentMainMode === '爆闪模式',
|
||||
image: '/static/images/bs.png'
|
||||
},
|
||||
{
|
||||
text: '泛光',
|
||||
selected: this.currentMainMode === '泛光模式',
|
||||
image: '/static/images/settt.png'
|
||||
},
|
||||
|
||||
];
|
||||
}
|
||||
},
|
||||
// 激光模式
|
||||
lasermode() {
|
||||
this.lightModeC = true
|
||||
},
|
||||
toggleForm() {
|
||||
this.isFormExpanded = !this.isFormExpanded;
|
||||
},
|
||||
|
||||
onItemClick(index) {
|
||||
const selectedItem = this.items[index];
|
||||
console.log(selectedItem.text, 'selectedItem.text');
|
||||
if (selectedItem.text === '激光') {
|
||||
this.lightModeC = true
|
||||
this.selectedItemIndex = index; // 记录当前选择的索引
|
||||
} else {
|
||||
this.updateSelectedItem(index);
|
||||
}
|
||||
},
|
||||
updateSelectedItem(index) {
|
||||
this.items = this.items.map((item, i) => ({
|
||||
...item,
|
||||
selected: i === index
|
||||
}));
|
||||
if (this.modeType === 'main') {
|
||||
this.currentMainMode = this.items[index].text + '模式';
|
||||
} else {
|
||||
this.currentSecondaryMode = this.items[index].text + '模式';
|
||||
}
|
||||
this.showPopup = false; // 关闭弹窗
|
||||
},
|
||||
// 确认
|
||||
handleSumbit() {
|
||||
this.lightModeA = false
|
||||
},
|
||||
// 上传开机画面
|
||||
uploadStartup() {
|
||||
this.lightModeB = true
|
||||
},
|
||||
// 上传开机画面确认按键
|
||||
handleupload() {
|
||||
this.lightModeB = false
|
||||
},
|
||||
|
||||
// 操纵说明
|
||||
operatingInst() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/6170/operatingInstruct/index'
|
||||
})
|
||||
},
|
||||
// 产品参数
|
||||
productparams() {
|
||||
|
||||
},
|
||||
// 操作视频
|
||||
operatingVideo() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/6170/operationVideo/index'
|
||||
})
|
||||
|
||||
},
|
||||
// 同意
|
||||
handleBtn() {
|
||||
this.lightModeC = false
|
||||
this.updateSelectedItem(this.selectedItemIndex); // 使用记录的索引来更新选择项
|
||||
this.lightModeA = false //关闭大弹框
|
||||
},
|
||||
// 不同意
|
||||
handleDisagree() {
|
||||
this.lightModeC = false
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.device-detail-container {
|
||||
padding: 30rpx;
|
||||
background: #121212;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.battery {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.battery-section {
|
||||
background-color: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.battery-info,
|
||||
.duration {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bipImg {
|
||||
width: 204rpx;
|
||||
height: 144rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.dlIMG {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
}
|
||||
|
||||
.cpIMG {
|
||||
width: 66rpx;
|
||||
height: 66rpx;
|
||||
}
|
||||
|
||||
.battery-sectionLeft {
|
||||
width: 308rpx;
|
||||
height: 220rpx;
|
||||
background: rgba(42, 42, 42, 0.5);
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
line-height: 220rpx;
|
||||
}
|
||||
|
||||
.percentage {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #007AFF;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.battery-v1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.battery-v2 {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-left: 18rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.battery-v3 {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
margin-left: 25rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.mode-v3 {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 26rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.info-card {
|
||||
background-color: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
padding: 10rpx 30rpx 5rpx 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.status-running {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.control-card {
|
||||
background-color: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.light {
|
||||
position: absolute;
|
||||
/* top:10rpx; */
|
||||
color: rgba(74, 74, 74, 0.87);
|
||||
top: 58rpx;
|
||||
left: 108rpx
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: block;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.slider-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.slider {
|
||||
flex: 1;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
.mode-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.mode_1 {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 16rpx;
|
||||
background: rgb(26, 26, 26);
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
padding-top: 37rpx;
|
||||
}
|
||||
|
||||
.mode-v1 {
|
||||
background: #1A1A1A;
|
||||
border-radius: 18rpx;
|
||||
height: 150rpx;
|
||||
margin-bottom: 20rpx;
|
||||
width: 47%;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mode-v2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-left: 40rpx;
|
||||
|
||||
}
|
||||
|
||||
.example-body {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 70%;
|
||||
width: 100%;
|
||||
transform: translate(-17%, -100%);
|
||||
|
||||
}
|
||||
.uni-file-picker__container{
|
||||
width: 200rpx !important;
|
||||
border: 1px solid rgb(58, 58, 58);
|
||||
}
|
||||
|
||||
:deep .file-picker__box {
|
||||
width: 40% !important;
|
||||
}
|
||||
|
||||
.example_title {
|
||||
padding-top: 20rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.mode-btn {
|
||||
width: 48%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background-color: #f5f5f5;
|
||||
color: #333;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.mode-btn.active {
|
||||
background-color: #007AFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
background-color: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
background: rgb(42, 42, 42);
|
||||
border-radius: 16rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
font-size: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.form-input {
|
||||
height: 80rpx;
|
||||
border: 1rpx solid transparent;
|
||||
font-size: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.product-section {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.product-tabs {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.tab {
|
||||
padding: 15rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
border-bottom: 4rpx solid transparent;
|
||||
}
|
||||
|
||||
.tab.active {
|
||||
color: #007AFF;
|
||||
border-bottom-color: #007AFF;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
background-color: rgb(187, 230, 0);
|
||||
color: rgba(35, 35, 35, 0.87);
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 16rpx;
|
||||
font-size: 26rpx;
|
||||
width: 112rpx;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
right: 70rpx;
|
||||
|
||||
}
|
||||
|
||||
.send-btn1 {
|
||||
background-color: rgb(187, 230, 0);
|
||||
color: rgba(35, 35, 35, 0.87);
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 16rpx;
|
||||
font-size: 26rpx;
|
||||
width: 112rpx;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
right: 0rpx;
|
||||
top: -70rpx
|
||||
}
|
||||
|
||||
|
||||
/* 遮罩层 */
|
||||
.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: 80%;
|
||||
background-color: rgb(42, 42, 42);
|
||||
border-radius: 40rpx;
|
||||
padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid rgba(255, 200, 78, 1);
|
||||
}
|
||||
|
||||
.popup-Title {
|
||||
color: rgba(255, 200, 78, 1);
|
||||
}
|
||||
|
||||
/* 标题 */
|
||||
.popup-title {
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
/* 内容文本 */
|
||||
.popup-content {
|
||||
font-size: 30rpx;
|
||||
line-height: 1.6;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 10px;
|
||||
margin: 5px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.setIMG {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.item.selected {
|
||||
background-color: rgb(58, 58, 58);
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
/* 按钮容器 */
|
||||
.popup-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/*确定按钮 */
|
||||
.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
|
||||
}
|
||||
|
||||
/* 通用按钮样式 */
|
||||
.btn {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 32rpx;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
/* 不同意按钮 */
|
||||
.disagree {
|
||||
background-color: transparent;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
border: 1px solid rgba(255, 200, 78, 0.7);
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 200, 78, 1);
|
||||
}
|
||||
|
||||
/* 同意按钮 */
|
||||
.agreeBtn {
|
||||
background-color: rgba(255, 200, 78, 1);
|
||||
color: #232323;
|
||||
border: none;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.right-icons {
|
||||
/* display: flex; */
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.toggle-icon {
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
margin-top: -40rpx;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.form-content {
|
||||
transition: all 0.3s ease;
|
||||
margin-top: 60rpx;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
11
pages/6170/editVideo/index.vue
Normal file
11
pages/6170/editVideo/index.vue
Normal file
@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<view>
|
||||
<text>编辑视频</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
350
pages/6170/operatingInstruct/index.vue
Normal file
350
pages/6170/operatingInstruct/index.vue
Normal file
@ -0,0 +1,350 @@
|
||||
<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>
|
||||
233
pages/6170/operationVideo/index.vue
Normal file
233
pages/6170/operationVideo/index.vue
Normal file
@ -0,0 +1,233 @@
|
||||
<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' }">
|
||||
<scroll-view scroll-y>
|
||||
<uni-swipe-action >
|
||||
<block v-for="(item, index) in videoList" :key="index">
|
||||
<uni-swipe-action-item :right-options="item.showConfirm ? confirmOptions : deleteOptions"
|
||||
@click="handleSwipeClick($event, index)" class="content">
|
||||
<view class="image-box" @click="openVideoUrl(item.url)">
|
||||
<view class="deviceIMG">
|
||||
<image src="/static/images/video.png" mode="" class="video"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="file-title">{{item.title}}</view>
|
||||
<view class="file-baidu">{{item.url}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/cires.png" class="circle"></image>
|
||||
</uni-swipe-action-item>
|
||||
</block>
|
||||
</uni-swipe-action>
|
||||
</scroll-view>
|
||||
<view class="content1" @click="addvideo">
|
||||
<image src="/static/images/path1.png" class="path1"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navTitle: '操作视频',
|
||||
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
||||
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: [{
|
||||
text: '编辑',
|
||||
style: {
|
||||
backgroundColor: 'rgb(224, 147, 25)',
|
||||
borderRadius: '16px 0 0 16px',
|
||||
width: '160rpx',
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: 'rgb(240, 60, 60)',
|
||||
borderRadius: '0 16px 16px 0',
|
||||
width: '160rpx',
|
||||
},
|
||||
}
|
||||
],
|
||||
confirmOptions: [{
|
||||
text: '确认删除',
|
||||
style: {
|
||||
backgroundColor: 'rgb(240, 60, 60)',
|
||||
borderRadius: '16px',
|
||||
width: '280rpx',
|
||||
fontSize: '30rpx',
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 导航栏编辑按钮
|
||||
handleEdit() {
|
||||
uni.showToast({
|
||||
title: '点击了导航栏编辑',
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
|
||||
// 添加视频
|
||||
addvideo() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/6170/addvideo/index'
|
||||
})
|
||||
},
|
||||
|
||||
// 处理滑动按钮点击
|
||||
handleSwipeClick(e, index) {
|
||||
const {
|
||||
content
|
||||
} = e;
|
||||
// 如果是确认删除操作
|
||||
if (content.text === '确认删除') {
|
||||
this.videoList.splice(index, 1);
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 编辑操作
|
||||
if (content.text === '编辑') {
|
||||
this.editVideo(this.videoList[index].id);
|
||||
}
|
||||
// 删除操作
|
||||
else if (content.text === '删除') {
|
||||
// 只修改当前项的选项为确认删除
|
||||
this.$set(this.videoList[index], 'showConfirm', true);
|
||||
// 关闭其他项的确认状态
|
||||
this.videoList.forEach((item, i) => {
|
||||
if (i !== index && item.showConfirm) {
|
||||
this.$set(this.videoList[i], 'showConfirm', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 编辑视频
|
||||
editVideo(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/6170/editVideo/index?id=${id}`
|
||||
});
|
||||
},
|
||||
// 打开视频URL
|
||||
openVideoUrl(url) {
|
||||
console.log(url, 'url333');
|
||||
// 检查URL是否包含协议头,如果没有则添加https://
|
||||
let fullUrl = url;
|
||||
if (!url.startsWith('http://') && !url.startsWith('https://')) {
|
||||
fullUrl = 'https://' + url;
|
||||
}
|
||||
//APP跳转方式
|
||||
if (plus) {
|
||||
plus.runtime.openURL(fullUrl, function(err) {
|
||||
uni.showToast({
|
||||
title: '打开链接失败',
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面整体样式 */
|
||||
.device-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
background: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content1 {
|
||||
height: 160rpx;
|
||||
background: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
line-height: 200rpx;
|
||||
}
|
||||
|
||||
.image-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.video {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.file-title {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.file-baidu {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.path1 {
|
||||
width: 62rpx;
|
||||
height: 62rpx;
|
||||
}
|
||||
|
||||
.circle {
|
||||
width: 10rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 50rpx;
|
||||
}
|
||||
</style>
|
||||
25
pages/aboutUs/index.vue
Normal file
25
pages/aboutUs/index.vue
Normal file
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<view class="device-page">
|
||||
<view class="deviceTitle">欢迎你使用我们的产品和服务!本用户协议(以下简称“协议”)由你(以下简称“用户”)与[公司名称](以下简称“我们”或“本公司”)就使用[产品名称]的相关事宜共同订立。
|
||||
欢迎你使用我们的产品和服务!本用户协议(以下简称“协议”)由你(以下简称“用户”)与[公司名称](以下简称“我们”或“本公司”)就使用[产品名称]的相关事宜共同订立。</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面整体样式 */
|
||||
.device-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
}
|
||||
.deviceTitle{
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
line-height: 45mnrpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
408
pages/index/index.vue
Normal file
408
pages/index/index.vue
Normal file
@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 使用自定义导航栏 -->
|
||||
<custom-navbar :title="navTitle" :showBack="false" backgroundColor="#202020" color="#FFFFFF" right-text="发送信息"
|
||||
right-color="rgba(255, 255, 255, 0.87)" @right-click="handleSend"></custom-navbar>
|
||||
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||
<scroll-view class="device-list" scroll-y>
|
||||
<uni-swipe-action ref="swipeAction">
|
||||
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
|
||||
<uni-swipe-action-item :right-options="Options" @click="handleSwipeClick($event, item, index)"
|
||||
class="device-card">
|
||||
<!-- 设备卡片内容保持不变 -->
|
||||
<view @click.stop="handleFile(item)">
|
||||
<view class="device-header">
|
||||
<view class="deviceIMG">
|
||||
<image src="/static/images/device.png" mode="" class="IMG"></image>
|
||||
</view>
|
||||
<view class="device-name">
|
||||
<view>设备:001-00</view>
|
||||
<view class="ID">ID:0222222</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="device-status online">已连接</view>
|
||||
<view class="device-info">
|
||||
<text class="onlines">在线</text>
|
||||
<text class="line"></text>
|
||||
<text>电量:90%</text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/cires.png" class="circle"></image>
|
||||
</uni-swipe-action-item>
|
||||
</block>
|
||||
</uni-swipe-action>
|
||||
<view class="device-uplod" @click="scan">
|
||||
<uni-icons type="plusempty" size="60" color="rgba(255, 255, 255, 0.5)"></uni-icons>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</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 closeBtn" @click="sureBtn">取消</button> -->
|
||||
<button class="btn agreeBtn" @click="handleBtn">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- =========重命名============== -->
|
||||
<view class="agreement-mask" v-if="RenameModel">
|
||||
<view class="agreement-popupD">
|
||||
<view class="popup-content">
|
||||
<view>
|
||||
<view class="popup-flex">
|
||||
<text>设备名称</text>
|
||||
<input type="text" placeholder="请输入设备名称" class="popup-input" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮组 -->
|
||||
|
||||
<view class="popup-buttons" style="margin-top:50rpx;">
|
||||
<button class="btn agreeBtn4" @click="handleBtn">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
||||
deviceList: Array(5).fill().map((_, i) => ({
|
||||
id: `022222${i}`,
|
||||
|
||||
})),
|
||||
Options: [{
|
||||
text: '重命名',
|
||||
style: {
|
||||
backgroundColor: '#E09319',
|
||||
borderRadius: '16px',
|
||||
width: '240rpx', // 初始宽度
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: 'rgb(240, 60, 60)',
|
||||
borderRadius: '16px',
|
||||
width: '240rpx', // 初始宽度
|
||||
},
|
||||
},
|
||||
],
|
||||
navTitle: "我的设备",
|
||||
deleteShow: false,
|
||||
RenameModel: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scan() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/scan/scan'
|
||||
})
|
||||
},
|
||||
// 右滑点击事件处理
|
||||
handleSwipeClick(e, item, index) {
|
||||
const {
|
||||
content
|
||||
} = e
|
||||
console.log(e, 'eeeee');
|
||||
switch (content.text) {
|
||||
case '删除':
|
||||
this.handleDeleteDevice(item, index)
|
||||
break
|
||||
case '重命名':
|
||||
this.handleRenameDevice(item, index)
|
||||
break
|
||||
};
|
||||
|
||||
},
|
||||
// 删除设备
|
||||
handleDeleteDevice(item, index) {
|
||||
this.deleteShow = true
|
||||
uni.hideTabBar()
|
||||
},
|
||||
// 确认删除
|
||||
handleBtn() {
|
||||
this.deleteShow = false,
|
||||
uni.showTabBar()
|
||||
},
|
||||
|
||||
// 重命名设备
|
||||
handleRenameDevice(item, index) {
|
||||
this.RenameModel = true
|
||||
uni.hideTabBar()
|
||||
},
|
||||
// 发生短信
|
||||
handleSend() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/send/index'
|
||||
})
|
||||
},
|
||||
handleFile() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/6170/deviceControl/index'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 页面整体样式 */
|
||||
.device-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
/* 设备列表 */
|
||||
.device-list {
|
||||
/* flex: 1; */
|
||||
/* padding: 20rpx; */
|
||||
}
|
||||
|
||||
/* 设备卡片 */
|
||||
.device-card {
|
||||
background-color: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
/* padding: 30rpx; */
|
||||
margin-bottom: 20rpx;
|
||||
/* box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); */
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.device-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15rpx;
|
||||
padding: 30rpx 0 10rpx 30rpx;
|
||||
}
|
||||
|
||||
.device-name {
|
||||
font-size: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-left: 24rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.ID {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.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: 10rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 100rpx;
|
||||
}
|
||||
|
||||
.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::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
background: rgb(0, 171, 103);
|
||||
border-radius: 50%;
|
||||
left: 120rpx;
|
||||
top: 15rpx
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.device-uplod {
|
||||
background-color: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
height: 202rpx;
|
||||
line-height: 200rpx;
|
||||
}
|
||||
|
||||
.uni-swipe-action-item__options {
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
/* 遮罩层 */
|
||||
.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;
|
||||
}
|
||||
|
||||
.popup-Title {
|
||||
color: rgba(255, 255, 255, 0.86);
|
||||
text-align: center;
|
||||
padding: 30rpx 0rpx;
|
||||
}
|
||||
|
||||
.popup-buttons {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 弹窗主体 */
|
||||
.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: 60%;
|
||||
background-color: rgb(42, 42, 42);
|
||||
border-radius: 40rpx;
|
||||
padding: 30rpx;
|
||||
text-align: center;
|
||||
border: 1px solid rgba(255, 200, 78, 0.3);
|
||||
}
|
||||
|
||||
.agreement-popupD {
|
||||
width: 70%;
|
||||
background-color: rgb(42, 42, 42);
|
||||
border-radius: 40rpx;
|
||||
padding: 40rpx;
|
||||
text-align: center;
|
||||
border: 1px solid rgba(187, 230, 0, 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;
|
||||
}
|
||||
|
||||
.agreeBtn4 {
|
||||
background: rgba(187, 230, 0, 1);
|
||||
color: #232323;
|
||||
border: none;
|
||||
width: 170rpx !important;
|
||||
}
|
||||
|
||||
.closeBtn {
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
background-color: rgba(35, 35, 35, 0.87);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
</style>
|
||||
362
pages/login/index.vue
Normal file
362
pages/login/index.vue
Normal file
@ -0,0 +1,362 @@
|
||||
<template>
|
||||
<view class="pageContent">
|
||||
<image src="/static/images/login.png" mode="" class="login-bg"></image>
|
||||
<view class="content_con">
|
||||
欢迎登录
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class='ver_item'>
|
||||
<input type="number" v-model="phone" :maxlength="11" placeholder="请输入手机号" class="input" />
|
||||
</view>
|
||||
<view class='ver_item'>
|
||||
<input type="number" v-model="code" :maxlength="6" placeholder="请输入验证码" class="input" />
|
||||
<button :class="showView?' get_phone_number blue':'get_phone_number grad'"
|
||||
@click="getPhoneCode">{{ isCounting ? `${countdown}s后重新获取` : '获取验证码' }}</button>
|
||||
</view>
|
||||
<!-- 协议勾选 -->
|
||||
<view class="agreement">
|
||||
<view class="custom-checkbox" @click="toggleCheck">
|
||||
<view class="checkbox-icon" :class="{ checked: isChecked }">
|
||||
<uni-icons v-if="isChecked" type="checkmarkempty" size="8" color="#fff"></uni-icons>
|
||||
</view>
|
||||
<text class="checkbox-label">我已认真阅读,理解并同意<a class="agreeT">《用户服务协议》</a>及<a
|
||||
class="agreeT">《隐私政策》</a></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
<button class="login-btn" @click="handleLogin">
|
||||
登录
|
||||
</button>
|
||||
</view>
|
||||
<!-- 弹框 -->
|
||||
<view class="agreement-mask" v-if="showAgreement">
|
||||
<!-- 协议弹窗 -->
|
||||
<view class="agreement-popup" @click.stop>
|
||||
<!-- 标题 -->
|
||||
<view class="popup-title">服务协议及隐私政策</view>
|
||||
<!-- 协议内容 -->
|
||||
<view class="popup-content">
|
||||
为了更好的保障您的合法权益,请您阅读并同意以下协议
|
||||
<text class="protocol-link" @click="openProtocol('user')">《用户服务协议》</text>
|
||||
<text class="protocol-link" @click="openProtocol('privacy')">《隐私政策》</text>
|
||||
</view>
|
||||
<!-- 按钮组 -->
|
||||
<view class="popup-buttons">
|
||||
<button class="btn disagree" @click="handleDisagree">不同意</button>
|
||||
<button class="btn agree" @click="handleAgree">同意</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showView: false,
|
||||
//codebtn: '获取验证码',
|
||||
phone: '', //手机号码
|
||||
code: "", //验证码
|
||||
agreed: false,
|
||||
isCounting: false,
|
||||
countdown: 60,
|
||||
isChecked: false,
|
||||
showAgreement: false // 控制弹窗显示
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取验证码
|
||||
getPhoneCode() {
|
||||
const phoneNumber = this.phone
|
||||
const myreg = /^1[3456789]\d{9}$/;
|
||||
if (!phoneNumber) {
|
||||
uni.showToast({
|
||||
title: '手机号不能为空',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
return false;
|
||||
} else if (!myreg.test(phoneNumber)) {
|
||||
uni.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.isCounting = true
|
||||
this.countdown = 60
|
||||
const timer = setInterval(() => {
|
||||
this.countdown--
|
||||
if (this.countdown <= 0) {
|
||||
clearInterval(timer)
|
||||
this.isCounting = false
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
// 接口调用
|
||||
// uni.request({
|
||||
// ...
|
||||
// })
|
||||
},
|
||||
// 勾选同意
|
||||
toggleCheck() {
|
||||
this.isChecked = !this.isChecked
|
||||
},
|
||||
// 登录
|
||||
handleLogin() {
|
||||
if (this.phone == '') {
|
||||
uni.showToast({
|
||||
title: '手机号不能为空',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
return false
|
||||
} else if (this.code == '') {
|
||||
uni.showToast({
|
||||
title: '验证码不能为空',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
return false
|
||||
} else if (!this.isChecked) {
|
||||
this.showAgreement = true
|
||||
return false
|
||||
}
|
||||
// 接口调用
|
||||
// uni.request({
|
||||
// ...
|
||||
// })
|
||||
// uni.showToast({
|
||||
// title: '验证通过了,走接口',
|
||||
// icon: 'none',
|
||||
// duration: 1000
|
||||
// })
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
},
|
||||
// 打开具体协议
|
||||
openProtocol(type) {
|
||||
if (type === 'user') {
|
||||
// 跳转到用户协议页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/protocol/user'
|
||||
})
|
||||
} else {
|
||||
// 跳转到隐私政策页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/protocol/privacy'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 不同意
|
||||
handleDisagree() {
|
||||
this.showAgreement = false
|
||||
},
|
||||
// 同意
|
||||
handleAgree() {
|
||||
this.isChecked = !this.isChecked
|
||||
this.showAgreement = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pageContent {
|
||||
background: rgb(26, 26, 26);
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.login-bg {
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 70%;
|
||||
width: 100%;
|
||||
background: rgb(26, 26, 26);
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
border-radius: 60px 60px 0px 0px;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.content_con {
|
||||
position: absolute;
|
||||
top: 220rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
left: 30rpx;
|
||||
font-size: 60rpx;
|
||||
}
|
||||
|
||||
.input {
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
height: 80rpx;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.ver_item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.get_phone_number {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
color: #999;
|
||||
top: 1rpx;
|
||||
background: rgb(26, 26, 26);
|
||||
border: none;
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
}
|
||||
|
||||
.grad {
|
||||
color: rgb(187, 230, 0);
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.agreement {
|
||||
margin: 50rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
margin-top: 150rpx;
|
||||
background-color: rgb(187, 230, 0);
|
||||
color: rgb(35, 35, 35);
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.login-btn[disabled] {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.custom-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.checkbox-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.87);
|
||||
border-radius: 50rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.checkbox-icon.checked {
|
||||
background-color: #07C160;
|
||||
border-color: #07C160;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.agreeT {
|
||||
color: rgb(187, 230, 0);
|
||||
}
|
||||
|
||||
/* 遮罩层 */
|
||||
.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: 999;
|
||||
}
|
||||
|
||||
/* 弹窗主体 */
|
||||
.agreement-popup {
|
||||
width: 80%;
|
||||
background-color: rgba(42, 42, 42);
|
||||
border-radius: 16rpx;
|
||||
padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid rgba(187, 230, 0, 0.3)
|
||||
}
|
||||
|
||||
/* 标题 */
|
||||
.popup-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
/* 内容文本 */
|
||||
.popup-content {
|
||||
font-size: 30rpx;
|
||||
line-height: 1.6;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
/* 协议链接 */
|
||||
.protocol-link {
|
||||
color: rgb(187, 230, 0);
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
/* 按钮容器 */
|
||||
.popup-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* 通用按钮样式 */
|
||||
.btn {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 32rpx;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
/* 不同意按钮 */
|
||||
.disagree {
|
||||
background-color: transparent;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
border: 1px solid rgb(255, 255, 255);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/* 同意按钮 */
|
||||
.agree {
|
||||
background-color: rgb(187, 230, 0);
|
||||
color: #232323;
|
||||
border: none;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
25
pages/privacyAgreement/index.vue
Normal file
25
pages/privacyAgreement/index.vue
Normal file
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<view class="device-page">
|
||||
<view class="deviceTitle">欢迎你使用我们的产品和服务!本用户协议(以下简称“协议”)由你(以下简称“用户”)与[公司名称](以下简称“我们”或“本公司”)就使用[产品名称]的相关事宜共同订立。
|
||||
欢迎你使用我们的产品和服务!本用户协议(以下简称“协议”)由你(以下简称“用户”)与[公司名称](以下简称“我们”或“本公司”)就使用[产品名称]的相关事宜共同订立。</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面整体样式 */
|
||||
.device-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
}
|
||||
.deviceTitle{
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
line-height: 45mnrpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
177
pages/qrcode/qrcode.vue
Normal file
177
pages/qrcode/qrcode.vue
Normal file
@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<view class="pageContent">
|
||||
<!-- 初始状态 -->
|
||||
<view class="pause" v-if="!isConnecting">
|
||||
<image src="/static/images/svg.png" class="svg"></image>
|
||||
<view class="scanT">ID: {{ deviceId }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 连接中状态 -->
|
||||
<view class="connecting-container" v-else>
|
||||
<view class="device-info">
|
||||
<view>
|
||||
<image src="/static/images/bip.6.png" class="bip"></image>
|
||||
</view>
|
||||
<text class="device-name">设备名:CLI</text>
|
||||
<text class="device-model1">ID:{{deviceId}}</text>
|
||||
</view>
|
||||
<view class="connecting-line" v-if="isConnecting && !isConnected">连接中...</view>
|
||||
<view class="connecting-success" v-if="isConnected">设备绑定成功</view>
|
||||
</view>
|
||||
<view class="btn-bottom">
|
||||
<button class="login-btn" @click="handleConnect">
|
||||
{{ isConnecting ? '确认' : '连接' }}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deviceId: '',
|
||||
isConnecting: false, // 是否正在连接
|
||||
isConnected: false // 是否连接成功
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleConnect() {
|
||||
if (this.isConnecting) {
|
||||
|
||||
} else {
|
||||
console.log('这里了么');
|
||||
// 开始连接逻辑
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中....'
|
||||
})
|
||||
this.isConnecting = true;
|
||||
//这里可以添加实际的连接操作
|
||||
setTimeout(() => {
|
||||
this.connectSuccess();
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
connectSuccess() {
|
||||
uni.hideLoading()
|
||||
// 连接成功后的处理
|
||||
uni.showToast({
|
||||
title: '连接成功',
|
||||
icon: 'success'
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.deviceId) {
|
||||
this.deviceId = decodeURIComponent(options.deviceId);
|
||||
} else {
|
||||
this.deviceId = '未获取到设备ID';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pageContent {
|
||||
height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pause {
|
||||
text-align: center;
|
||||
transform: translate(-50%, -100%);
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 30%;
|
||||
}
|
||||
|
||||
.scanT {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
font-size: 38rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.svg {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
background-color: rgb(187, 230, 0);
|
||||
color: rgb(35, 35, 35);
|
||||
border-radius: 50rpx;
|
||||
position: absolute;
|
||||
bottom: 200rpx;
|
||||
width: 90%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 连接中状态样式 */
|
||||
.connecting-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 20%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.connecting-text {
|
||||
font-size: 36rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-bottom: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.device-dimensions,
|
||||
.dimensions {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.scanned-device {
|
||||
font-size: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.device-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.device-name {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
font-size: 34rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.device-model1 {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.connecting-line {
|
||||
font-size: 30rpx;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.bip {
|
||||
width: 174rpx;
|
||||
height: 123rpx;
|
||||
}
|
||||
|
||||
.connecting-success {
|
||||
color: rgb(187, 230, 0);
|
||||
}
|
||||
</style>
|
||||
61
pages/scan/scan.vue
Normal file
61
pages/scan/scan.vue
Normal file
@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<view class="pageContent">
|
||||
<view class="pause" @click="scanCode">
|
||||
<uni-icons type="scan" size="100" color="rgba(255, 255, 255, 0.5)"></uni-icons>
|
||||
<view class="scanT">扫一扫添加设备</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 这里可以添加数据绑定
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 扫描
|
||||
scanCode() {
|
||||
uni.scanCode({
|
||||
success: (res) => { // 改为箭头函数保持this指向
|
||||
console.log('条码内容:' + res.result);
|
||||
// 跳转并传递扫描结果
|
||||
uni.navigateTo({
|
||||
url: `/pages/qrcode/qrcode?deviceId=${encodeURIComponent(res.result)}`
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('扫码失败', err);
|
||||
uni.showToast({
|
||||
title: '扫码失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pageContent {
|
||||
height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.pause {
|
||||
text-align: center;
|
||||
transform: translate(-50%, -100%);
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
}
|
||||
|
||||
.scanT {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
font-size: 38rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
</style>
|
||||
220
pages/send/index.vue
Normal file
220
pages/send/index.vue
Normal file
@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 设备列表 -->
|
||||
<scroll-view class="device-list" scroll-y>
|
||||
<view class="device-card" v-for="(item, index) in deviceList" :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="deviceIMG">
|
||||
<image src="/static/images/device.png" mode="" class="IMG"></image>
|
||||
</view>
|
||||
<view class="device-name">
|
||||
<view>设备:001-00</view>
|
||||
<view class="ID">ID:{{ item.id }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="device-status online">已连接</view>
|
||||
<view class="device-info">
|
||||
<text class="onlines">在线</text>
|
||||
<text class="line"></text>
|
||||
<text>电量:90℃</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:20rpx;">
|
||||
<view class="ql-editor">编辑信息</view>
|
||||
<view class="ql-input">
|
||||
<textarea placeholder-style="color:rgba(255, 255, 255, 0.4)" placeholder="请输入内容" class="textarea"/>
|
||||
</view>
|
||||
<button class="login-btn">发送</button>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deviceList: Array(6).fill().map((_, i) => ({
|
||||
id: `1321615${i}`,
|
||||
checked: false,
|
||||
showConfirm: false
|
||||
})),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleSelect(index) {
|
||||
this.deviceList[index].checked = !this.deviceList[index].checked
|
||||
this.$forceUpdate()
|
||||
},
|
||||
sendMessage() {
|
||||
const selectedDevices = this.deviceList.filter(item => item.checked)
|
||||
console.log('选中的设备:', selectedDevices)
|
||||
uni.showToast({
|
||||
title: `已发送到${selectedDevices.length}台设备`,
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
}
|
||||
.header {
|
||||
padding: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
.device-list {
|
||||
flex: 1;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.device-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 94%;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.checkbox.checked {
|
||||
background-color: rgb(187, 230, 0);
|
||||
border-color: rgb(187, 230, 0);
|
||||
}
|
||||
.device-content {
|
||||
background-color: rgb(26, 26, 26);
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
/* display: flex; */
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
width: 93%;
|
||||
}
|
||||
.device-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.device-name {
|
||||
font-size: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-left: 24rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.ID {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
|
||||
.online {
|
||||
color: rgb(187, 230, 0);
|
||||
}
|
||||
|
||||
.device-info {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.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::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
background: rgb(0, 171, 103);
|
||||
border-radius: 50%;
|
||||
left: 98rpx;
|
||||
bottom: 32rpx
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.ql-editor {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size:30rpx;
|
||||
}
|
||||
|
||||
.ql-input {
|
||||
width:95.9%;
|
||||
height: 200rpx;
|
||||
margin-top: 30rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
border-radius:16rpx;
|
||||
background: rgb(26, 26, 26);
|
||||
}
|
||||
.textarea{
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.login-btn {
|
||||
margin-top:30rpx;
|
||||
background-color: rgb(187, 230, 0);
|
||||
color: rgb(35, 35, 35);
|
||||
border-radius: 50rpx;
|
||||
width:90%;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
</style>
|
||||
288
pages/user/index.vue
Normal file
288
pages/user/index.vue
Normal file
@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<view class="pageContent">
|
||||
<image src="/static/images/login.png" mode="" class="login-bg"></image>
|
||||
<view class="content_con">
|
||||
<view class="user_logo">
|
||||
<image src="/static/images/logo.png" class="logo"></image>
|
||||
</view>
|
||||
<view class="user-right">
|
||||
<view class="user-title">星汉研创</view>
|
||||
<view class="ID">ID:123456</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="menu-list">
|
||||
<view class="menu-item" @click="userAgree">
|
||||
<image src="/static/images/xy.png" class="icon"></image>
|
||||
<text class="title">用户协议</text>
|
||||
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
||||
</view>
|
||||
<view class="menu-item" @click="privacyAgree">
|
||||
<image src="/static/images/ys.png" class="icon"></image>
|
||||
<text class="title">隐私协议</text>
|
||||
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
||||
</view>
|
||||
<view class="menu-item" @click="aboutUs">
|
||||
<image src="/static/images/wm.png" class="icon"></image>
|
||||
<text class="title">关于我们</text>
|
||||
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
||||
</view>
|
||||
<view class="btn_footer">
|
||||
<button class="logout" @click="logout">退出登录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹框 -->
|
||||
<view class="agreement-mask" v-if="showAgreement">
|
||||
<!-- 协议弹窗 -->
|
||||
<view class="agreement-popup" @click.stop>
|
||||
<!-- 标题 -->
|
||||
<view class="popup-title">退出登录</view>
|
||||
<!-- 协议内容 -->
|
||||
<view class="popup-content">
|
||||
您确定要退出登录吗?
|
||||
</view>
|
||||
<!-- 按钮组 -->
|
||||
<view class="popup-buttons">
|
||||
<button class="btn disagree" @click="handleDisagree">取消</button>
|
||||
<button class="btn agree" @click="handleAgree">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showAgreement: false // 控制弹窗显示
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 不同意
|
||||
handleDisagree() {
|
||||
this.showAgreement = false,
|
||||
uni.showTabBar()
|
||||
},
|
||||
// 同意
|
||||
handleAgree() {
|
||||
this.showAgreement = false
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
uni.showTabBar()
|
||||
},
|
||||
// 退出登录
|
||||
logout() {
|
||||
this.showAgreement = true
|
||||
uni.hideTabBar()
|
||||
},
|
||||
// 用户协议
|
||||
userAgree(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/userAgreement/index'
|
||||
})
|
||||
},
|
||||
// 隐私协议
|
||||
privacyAgree(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/privacyAgreement/index'
|
||||
})
|
||||
},
|
||||
// 关于我们
|
||||
aboutUs(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/aboutUs/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pageContent {
|
||||
background: rgb(26, 26, 26);
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.login-bg {
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 78%;
|
||||
width: 100%;
|
||||
background: rgb(26, 26, 26);
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
border-radius: 60px 60px 0px 0px;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.content_con {
|
||||
position: absolute;
|
||||
top: 100rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
left: 30rpx;
|
||||
font-size: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.user-title {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.ID {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
background-color: rgb(42, 42, 42);
|
||||
border-radius: 16rpx;
|
||||
padding: 0 30rpx;
|
||||
margin-top: 50rpx;
|
||||
/* 使菜单靠底部 */
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
font-size: 32rpx;
|
||||
color: rgb(255, 255, 255);
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1rpx solid rgba(255, 255, 255, 0.04);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
|
||||
}
|
||||
|
||||
.title {
|
||||
padding-left: 20rpx;
|
||||
padding-top: -8rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.uniIcon {
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
}
|
||||
|
||||
.user-right {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.btn_footer {
|
||||
height: 80rpx;
|
||||
background: rgb(42, 42, 42);
|
||||
position: absolute;
|
||||
width: 92%;
|
||||
bottom: 60rpx;
|
||||
left: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.logout {
|
||||
background: rgb(42, 42, 42);
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
/* 遮罩层 */
|
||||
.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: 80%;
|
||||
background-color: rgba(42, 42, 42);
|
||||
border-radius: 16rpx;
|
||||
padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid rgba(187, 230, 0, 0.3);
|
||||
}
|
||||
|
||||
/* 标题 */
|
||||
.popup-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
/* 内容文本 */
|
||||
.popup-content {
|
||||
font-size: 30rpx;
|
||||
line-height: 1.6;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
/* 协议链接 */
|
||||
.protocol-link {
|
||||
color: rgb(187, 230, 0);
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
/* 按钮容器 */
|
||||
.popup-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* 通用按钮样式 */
|
||||
.btn {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 32rpx;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
/* 不同意按钮 */
|
||||
.disagree {
|
||||
background-color: transparent;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
border: 1px solid rgb(255, 255, 255);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/* 同意按钮 */
|
||||
.agree {
|
||||
background-color: rgb(187, 230, 0);
|
||||
color: #232323;
|
||||
border: none;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
25
pages/userAgreement/index.vue
Normal file
25
pages/userAgreement/index.vue
Normal file
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<view class="device-page">
|
||||
<view class="deviceTitle">欢迎你使用我们的产品和服务!本用户协议(以下简称“协议”)由你(以下简称“用户”)与[公司名称](以下简称“我们”或“本公司”)就使用[产品名称]的相关事宜共同订立。
|
||||
欢迎你使用我们的产品和服务!本用户协议(以下简称“协议”)由你(以下简称“用户”)与[公司名称](以下简称“我们”或“本公司”)就使用[产品名称]的相关事宜共同订立。</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面整体样式 */
|
||||
.device-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: rgb(18, 18, 18);
|
||||
padding: 30rpx;
|
||||
}
|
||||
.deviceTitle{
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
line-height: 45mnrpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user