From 69a1b3bf45738f048361ee4ccb6bdc64fce35720 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 12 三月 2025 11:31:46 +0800
Subject: [PATCH] 更新
---
pda/pages/index/control.vue | 88 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 88 insertions(+), 0 deletions(-)
diff --git a/pda/pages/index/control.vue b/pda/pages/index/control.vue
new file mode 100644
index 0000000..739a7d0
--- /dev/null
+++ b/pda/pages/index/control.vue
@@ -0,0 +1,88 @@
+<template>
+ <view class="main_app">
+ <template v-for="item in platformGroupList">
+ <view class="title">
+ <view class="icon"></view>
+ <view class="name">{{item.name}}</view>
+ </view>
+ <view class="data_list">
+ <view class="line" v-for="(platform, i) in item.platformList" :key="platform.id">
+ <view class="name">{{platform.name}}</view>
+ <u-switch v-model="platform.status" activeColor="#279BAA" inactiveColor="#cccccc" :inactiveValue="1" :activeValue="0" @change="e => changeStatus(platform)" />
+ </view>
+ </view>
+ </template>
+ </view>
+</template>
+
+<script>
+ import { getPlatformGroupList, updPlatformStatus } from '@/api'
+export default {
+ data() {
+ return {
+ platformGroupList: []
+ }
+ },
+ onLoad() {
+ this.getPlatformGroup()
+ },
+ methods: {
+ changeStatus(item) {
+ console.log(item);
+ updPlatformStatus({
+ id: item.id,
+ status: item.status
+ })
+ },
+ getPlatformGroup() {
+ getPlatformGroupList({
+ queryData: 0,
+ queryType: 0
+ }).then(res => {
+ this.platformGroupList = res.data || []
+ })
+ },
+ }
+}
+</script>
+<style lang="scss">
+.main_app {
+ padding: 30rpx 0;
+ background: #fff;
+ .data_list {
+ padding: 30rpx;
+ .line {
+ padding: 0 30rpx;
+ background: #F4F9F8;
+ margin-bottom: 20rpx;
+ display: flex;
+ align-items: center;
+ height: 84rpx;
+ font-size: 32rpx;
+ color: #333333;
+ border-radius: 8rpx;
+ justify-content: space-between;
+ &:nth-of-type(2n){
+ background: #F7F7F7;
+ }
+ }
+ }
+ .title {
+ display: flex;
+ align-items: center;
+ padding: 0 30rpx;
+ .icon {
+ width: 22rpx;
+ height: 22rpx;
+ margin-right: 16rpx;
+ border: 6rpx solid $uni-color-primary;
+ border-radius: 50%;
+ }
+ .name {
+ font-weight: 600;
+ font-size: 34rpx;
+ color: #111111;
+ }
+ }
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.3