瀏覽代碼

Merge branch 'master' of http://150.158.33.144:3000/lalalashen/MoeNovaClient

# Conflicts:
#	pages/index/index.vue
ck@123911.net 2 月之前
父節點
當前提交
7b24d74c40

+ 4 - 0
App.vue

@@ -25,6 +25,7 @@ import {
   createTeenagePopUpWindow,
   setupTeenagePopupTimer,
 } from "@/common/teenagePopup.js";
+import permission from '@/common/permission.js'
 uni.$createTeenagePopUpWindow = createTeenagePopUpWindow;
 
 export default {
@@ -215,6 +216,9 @@ export default {
         callback(); // 登录状态有效时执行回调
       }
     });
+
+    // 将permission挂载到全局
+    getApp().globalData.permission = permission;
   },
 
   onShow: function (options) {

+ 472 - 329
common/permission.js

@@ -1,349 +1,492 @@
 /**
- * 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
+ * 权限管理工具类
+ * 用于iOS和Android的权限检查、请求和本地缓存
  */
-var isIos
+
+// 判断是否为iOS系统
+let isIos = false;
 // #ifdef APP-PLUS
-isIos = (plus.os.name == "iOS")
+isIos = (plus.os.name == "iOS");
 // #endif
- 
 
-// 判断推送权限是否开启
-function judgeIosPermissionPush() {
-	var result = 0;
-	var UIApplication = plus.ios.import("UIApplication");
-	var app = UIApplication.sharedApplication();
-	var enabledTypes = 0;
-	if (app.currentUserNotificationSettings) {
-		var settings = app.currentUserNotificationSettings();
-		enabledTypes = settings.plusGetAttribute("types");
-		if (enabledTypes == 0) {
-			console.log("推送权限没有开启");
-		} else {
-			result = 1;
-			console.log("已经开启推送功能!")
-		}
-		plus.ios.deleteObject(settings);
-	} else {
-		enabledTypes = app.enabledRemoteNotificationTypes();
-		if (enabledTypes == 0) {
-			console.log("推送权限没有开启!");
-		} else {
-			result = 1;
-			console.log("已经开启推送功能!")
-		}
-		console.log("enabledTypes2:" + enabledTypes);
-	}
-	plus.ios.deleteObject(app);
-	plus.ios.deleteObject(UIApplication);
-	return result;
-}
+/**
+ * 权限类型枚举
+ * @enum {string}
+ */
+export const PermissionType = {
+  // 相机权限
+  CAMERA: 'camera',
+  // 相册权限 
+  PHOTO_LIBRARY: 'photoLibrary',
+  // 相册写入权限
+  PHOTO_LIBRARY_ADD_ONLY: 'photoLibraryAddOnly',
+  // 麦克风权限
+  MICROPHONE: 'microphone',
+  // 位置权限
+  LOCATION: 'location',
+  // 位置权限(始终允许)
+  LOCATION_ALWAYS: 'locationAlways',
+  // 位置权限(使用期间)
+  LOCATION_WHEN_IN_USE: 'locationWhenInUse',
+  // 位置权限(精确位置)
+  LOCATION_PRECISE: 'locationPrecise',
+  // 位置权限(粗略位置)
+  LOCATION_APPROXIMATE: 'locationApproximate',
+  // 通知权限
+  NOTIFICATION: 'notification',
+  // 通讯录权限
+  CONTACTS: 'contacts',
+  // 日历权限
+  CALENDAR: 'calendar',
+  // 备忘录权限
+  MEMO: 'memo',
+  // 蓝牙权限
+  BLUETOOTH: 'bluetooth',
+  // 蓝牙外设权限
+  BLUETOOTH_PERIPHERAL: 'bluetoothPeripheral',
+  // 蓝牙中心设备权限
+  BLUETOOTH_CENTRAL: 'bluetoothCentral',
+  // 健康数据权限
+  HEALTH: 'health',
+  // 运动与健身权限
+  MOTION: 'motion',
+  // 生物识别权限(指纹/面容)
+  BIOMETRICS: 'biometrics',
+  // 网络权限
+  NETWORK: 'network',
+  // 后台运行权限
+  BACKGROUND_FETCH: 'backgroundFetch',
+  // 后台处理权限
+  BACKGROUND_PROCESSING: 'backgroundProcessing',
+  // 后台音频播放权限
+  BACKGROUND_AUDIO: 'backgroundAudio',
+  // 后台位置更新权限
+  BACKGROUND_LOCATION: 'backgroundLocation',
+  // 后台网络权限
+  BACKGROUND_NETWORK: 'backgroundNetwork',
+  // 后台蓝牙权限
+  BACKGROUND_BLUETOOTH: 'backgroundBluetooth',
+  // 后台通知权限
+  BACKGROUND_NOTIFICATION: 'backgroundNotification',
+  // 后台传感器权限
+  BACKGROUND_SENSOR: 'backgroundSensor',
+  // 后台任务权限
+  BACKGROUND_TASK: 'backgroundTask',
+  // 后台下载权限
+  BACKGROUND_DOWNLOAD: 'backgroundDownload',
+  // 后台上传权限
+  BACKGROUND_UPLOAD: 'backgroundUpload',
+  // 后台同步权限
+  BACKGROUND_SYNC: 'backgroundSync',
+  // 后台定位权限
+  BACKGROUND_LOCATION_ALWAYS: 'backgroundLocationAlways',
+  // 后台定位权限(使用期间)
+  BACKGROUND_LOCATION_WHEN_IN_USE: 'backgroundLocationWhenInUse',
+  // 后台定位权限(精确位置)
+  BACKGROUND_LOCATION_PRECISE: 'backgroundLocationPrecise',
+  // 后台定位权限(粗略位置)
+  BACKGROUND_LOCATION_APPROXIMATE: 'backgroundLocationApproximate'
+};
 
-// 判断定位权限是否开启
-function judgeIosPermissionLocation() {
-	var result = 0;
-	var cllocationManger = plus.ios.import("CLLocationManager");
-	var status = cllocationManger.authorizationStatus();
-	result = (status != 2) ? 1 : 0;
-	console.log("定位权限开启:" + result); 
-	plus.ios.deleteObject(cllocationManger);
-	return {
-		result: result,
-		permissionName: "定位"
-	};
-}
+// 默认权限说明配置
+const DefaultPermissionConfig = {
+  [PermissionType.LOCATION]: {
+    title: '定位权限说明',
+    describe: '便于您使用该功能在位置展示时显示距搜索位置的距离,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.ACCESS_FINE_LOCATION',
+    permissionName: '位置'
+  },
+  [PermissionType.LOCATION_ALWAYS]: {
+    title: '后台定位权限说明',
+    describe: '便于您在应用后台运行时获取位置信息,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.ACCESS_BACKGROUND_LOCATION',
+    permissionName: '后台定位'
+  },
+  [PermissionType.LOCATION_WHEN_IN_USE]: {
+    title: '使用期间定位权限说明',
+    describe: '便于您在应用使用期间获取位置信息,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.ACCESS_COARSE_LOCATION',
+    permissionName: '使用期间定位'
+  },
+  [PermissionType.PHOTO_LIBRARY]: {
+    title: '相册权限说明',
+    describe: '便于您使用该功能上传您的照片/图片/及用户修改头像,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.READ_EXTERNAL_STORAGE',
+    permissionName: '相册'
+  },
+  [PermissionType.PHOTO_LIBRARY_ADD_ONLY]: {
+    title: '相册写入权限说明',
+    describe: '便于您保存图片到相册,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.WRITE_EXTERNAL_STORAGE',
+    permissionName: '相册写入'
+  },
+  [PermissionType.CAMERA]: {
+    title: '拍摄权限说明',
+    describe: '便于您使用该功能拍摄照片修改头像、意见反馈上传图片等信息,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.CAMERA',
+    permissionName: '相机'
+  },
+  [PermissionType.MICROPHONE]: {
+    title: '麦克风权限说明',
+    describe: '便于您使用该功能录制音频,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.RECORD_AUDIO',
+    permissionName: '麦克风'
+  },
+  [PermissionType.NOTIFICATION]: {
+    title: '通知权限说明',
+    describe: '便于您接收重要消息通知,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.POST_NOTIFICATIONS',
+    permissionName: '通知'
+  },
+  [PermissionType.CONTACTS]: {
+    title: '通讯录权限说明',
+    describe: '便于您使用该功能访问通讯录,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.READ_CONTACTS',
+    permissionName: '通讯录'
+  },
+  [PermissionType.CALENDAR]: {
+    title: '日历权限说明',
+    describe: '便于您使用该功能访问日历,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.READ_CALENDAR',
+    permissionName: '日历'
+  },
+  [PermissionType.MEMO]: {
+    title: '备忘录权限说明',
+    describe: '便于您使用该功能访问备忘录,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.READ_CALENDAR',
+    permissionName: '备忘录'
+  },
+  [PermissionType.BLUETOOTH]: {
+    title: '蓝牙权限说明',
+    describe: '便于您使用蓝牙功能,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.BLUETOOTH',
+    permissionName: '蓝牙'
+  },
+  [PermissionType.BLUETOOTH_PERIPHERAL]: {
+    title: '蓝牙外设权限说明',
+    describe: '便于您使用蓝牙外设功能,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.BLUETOOTH_ADMIN',
+    permissionName: '蓝牙外设'
+  },
+  [PermissionType.BLUETOOTH_CENTRAL]: {
+    title: '蓝牙中心设备权限说明',
+    describe: '便于您使用蓝牙中心设备功能,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.BLUETOOTH_SCAN',
+    permissionName: '蓝牙中心设备'
+  },
+  [PermissionType.HEALTH]: {
+    title: '健康数据权限说明',
+    describe: '便于您使用健康数据相关功能,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.ACTIVITY_RECOGNITION',
+    permissionName: '健康数据'
+  },
+  [PermissionType.MOTION]: {
+    title: '运动与健身权限说明',
+    describe: '便于您使用运动与健身相关功能,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.ACTIVITY_RECOGNITION',
+    permissionName: '运动与健身'
+  },
+  [PermissionType.BIOMETRICS]: {
+    title: '生物识别权限说明',
+    describe: '便于您使用指纹/面容识别功能,请您确认授权,否则无法使用该功能',
+    androidPermission: 'android.permission.USE_BIOMETRICS',
+    permissionName: '生物识别'
+  }
+};
 
-// 判断麦克风权限是否开启
-function judgeIosPermissionRecord() {
-	var result = 0;
-	var avaudiosession = plus.ios.import("AVAudioSession");
-	var avaudio = avaudiosession.sharedInstance();
-	var permissionStatus = avaudio.recordPermission();
-	console.log("permissionStatus:" + permissionStatus);
-	if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
-		console.log("麦克风权限没有开启");
-	} else {
-		result = 1;
-		console.log("麦克风权限已经开启");
-	}
-	plus.ios.deleteObject(avaudiosession);
-	return {
-		result: result,
-		permissionName: "麦克风"
-	};
-}
+/**
+ * 获取权限配置
+ * @param {string} permissionType 权限类型
+ * @param {Object} customConfig 自定义配置
+ * @returns {Object} 权限配置
+ */
+function getPermissionConfig(permissionType, customConfig = {}) {
+  const defaultConfig = DefaultPermissionConfig[permissionType] || {
+    title: '权限说明',
+    describe: '便于您使用该功能,请您确认授权,否则无法使用该功能',
+    androidPermission: '',
+    permissionName: '未知权限'
+  };
 
-// 判断相机权限是否开启
-function judgeIosPermissionCamera() {
-	var result = 0;
-	var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
-	var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
-	console.log("authStatus:" + authStatus);
-	if (authStatus == 3) {
-		result = 1;
-		console.log("相机权限已经开启");
-	} else {
-		console.log("相机权限没有开启");
-	}
-	plus.ios.deleteObject(AVCaptureDevice);
-	return {
-		result: result,
-		permissionName: "相机"
-	};
+  return {
+    ...defaultConfig,
+    ...customConfig
+  };
 }
 
-// 判断相册权限是否开启
-function judgeIosPermissionPhotoLibrary() {
-	var result = 0;
-	var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
-	var authStatus = PHPhotoLibrary.authorizationStatus();
-	console.log("authStatus:" + authStatus);
-	if (authStatus == 3) {
-		result = 1;
-		console.log("相册权限已经开启");
-	} else {
-		console.log("相册权限没有开启");
-	}
-	plus.ios.deleteObject(PHPhotoLibrary);
-	return {
-		result: result,
-		permissionName: "相册"
-	};
-}
+// iOS权限相关的常量和工具函数
+const IOS_PERMISSION_HANDLERS = {
+  // 定位权限
+  location: {
+    check: () => {
+      const cllocationManger = plus.ios.import("CLLocationManager");
+      const status = cllocationManger.authorizationStatus();
+      const result = (status != 2) ? 1 : 0;
+      plus.ios.deleteObject(cllocationManger);
+      return result;
+    },
+    request: () => {
+      return new Promise((resolve) => {
+        const cllocationManger = plus.ios.import("CLLocationManager");
+        const manager = new cllocationManger();
+        manager.requestWhenInUseAuthorization();
+        plus.ios.deleteObject(manager);
+        plus.ios.deleteObject(cllocationManger);
+        setTimeout(() => resolve(IOS_PERMISSION_HANDLERS.location.check() === 1), 1000);
+      });
+    }
+  },
+  // 相机权限
+  camera: {
+    check: () => {
+      const AVCaptureDevice = plus.ios.import("AVCaptureDevice");
+      const authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
+      const result = authStatus === 3 ? 1 : 0;
+      plus.ios.deleteObject(AVCaptureDevice);
+      return result;
+    },
+    request: () => {
+      return new Promise((resolve) => {
+        const AVCaptureDevice = plus.ios.import("AVCaptureDevice");
+        AVCaptureDevice.requestAccessForMediaTypeCompletionHandler('vide', (granted) => {
+          plus.ios.deleteObject(AVCaptureDevice);
+          resolve(granted);
+        });
+      });
+    }
+  },
+  // 相册权限
+  photoLibrary: {
+    check: () => {
+      const PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
+      const authStatus = PHPhotoLibrary.authorizationStatus();
+      const result = authStatus === 3 ? 1 : 0;
+      plus.ios.deleteObject(PHPhotoLibrary);
+      return result;
+    },
+    request: () => {
+      return new Promise((resolve) => {
+        const PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
+        PHPhotoLibrary.requestAuthorization((status) => {
+          plus.ios.deleteObject(PHPhotoLibrary);
+          resolve(status === 3);
+        });
+      });
+    }
+  },
+  // 麦克风权限
+  microphone: {
+    check: () => {
+      const avaudiosession = plus.ios.import("AVAudioSession");
+      const avaudio = avaudiosession.sharedInstance();
+      const permissionStatus = avaudio.recordPermission();
+      const result = (permissionStatus !== 1684369017 && permissionStatus !== 1970168948) ? 1 : 0;
+      plus.ios.deleteObject(avaudiosession);
+      return result;
+    },
+    request: () => {
+      return new Promise((resolve) => {
+        const avaudiosession = plus.ios.import("AVAudioSession");
+        const avaudio = avaudiosession.sharedInstance();
+        avaudio.requestRecordPermission((granted) => {
+          plus.ios.deleteObject(avaudiosession);
+          resolve(granted);
+        });
+      });
+    }
+  },
+  // 其他iOS权限处理器...
+};
 
-// 判断通讯录权限是否开启
-function judgeIosPermissionContact() {
-	var result = 0;
-	var CNContactStore = plus.ios.import("CNContactStore");
-	var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
-	if (cnAuthStatus == 3) {
-		result = 1;
-		console.log("通讯录权限已经开启");
-	} else {
-		console.log("通讯录权限没有开启");
-	}
-	plus.ios.deleteObject(CNContactStore);
-	return {
-		result: result,
-		permissionName: "通讯录"
-	};
-}
+// Android权限处理
+const ANDROID_PERMISSION_HANDLERS = {
+  request: (permissionID) => {
+    return new Promise((resolve) => {
+      plus.android.requestPermissions(
+        [permissionID],
+        (resultObj) => {
+          let result = 0;
+          if (resultObj.granted.length > 0) {
+            result = 1;
+          } else if (resultObj.deniedAlways.length > 0) {
+            result = -1;
+          }
+          resolve(result);
+        },
+        (error) => {
+          console.error('Request permission error:', error);
+          resolve(0);
+        }
+      );
+    });
+  }
+};
 
-// 判断日历权限是否开启
-function judgeIosPermissionCalendar() {
-	var result = 0;
-	var EKEventStore = plus.ios.import("EKEventStore");
-	var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
-	if (ekAuthStatus == 3) {
-		result = 1;
-		console.log("日历权限已经开启");
-	} else {
-		console.log("日历权限没有开启");
-	}
-	plus.ios.deleteObject(EKEventStore);
-	return {
-		result: result,
-		permissionName: "日历"
-	};
-}
+// 权限配置映射
+const PERMISSION_CONFIG = {
+  [PermissionType.CAMERA]: {
+    title: '相机权限申请',
+    describe: '需要使用相机权限来拍摄照片',
+    androidPermission: 'android.permission.CAMERA',
+    iosHandler: 'camera'
+  },
+  [PermissionType.PHOTO_LIBRARY]: {
+    title: '相册权限申请',
+    describe: '需要访问相册权限来选择照片',
+    androidPermission: 'android.permission.READ_EXTERNAL_STORAGE',
+    iosHandler: 'photoLibrary'
+  },
+  // ... 其他权限配置
+};
 
-// 判断备忘录权限是否开启
-function judgeIosPermissionMemo() {
-	var result = 0;
-	var EKEventStore = plus.ios.import("EKEventStore");
-	var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
-	if (ekAuthStatus == 3) {
-		result = 1;
-		console.log("备忘录权限已经开启");
-	} else {
-		console.log("备忘录权限没有开启");
-	}
-	plus.ios.deleteObject(EKEventStore);
-	return {
-		result: result,
-		permissionName: "备忘录"
-	};
-}
+// 统一的权限处理类
+class PermissionManager {
+  static async check(permissionType) {
+    const config = PERMISSION_CONFIG[permissionType];
+    if (!config) return false;
+
+    if (isIos) {
+      const handler = IOS_PERMISSION_HANDLERS[config.iosHandler];
+      return handler ? handler.check() === 1 : false;
+    } else {
+      const MainActivity = plus.android.runtimeMainActivity();
+      const permission = config.androidPermission;
+      return MainActivity.checkSelfPermission(permission) === 0;
+    }
+  }
+
+  static async request(permissionType, options = {}) {
+    const config = PERMISSION_CONFIG[permissionType];
+    if (!config) return false;
+
+    const hasPermission = await this.check(permissionType);
+    if (hasPermission) return true;
+
+    const confirmed = await showPermissionDialog({
+      title: options.title || config.title,
+      content: options.describe || config.describe
+    });
+
+    if (!confirmed) return false;
 
-// Android权限查询
-function requestAndroidPermission(permissionID, permissionName) { 
-	return new Promise((resolve, reject) => {
-		plus.android.requestPermissions(
-			[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
-			function(resultObj) {
-				console.log('resultObj:99999', resultObj);
-				var result = 0;
-				for (var i = 0; i < resultObj.granted.length; i++) {
-					var grantedPermission = resultObj.granted[i];
-					console.log('已获取的权限:' + grantedPermission);
-					result = 1
-				}
-				for (var i = 0; i < resultObj.deniedPresent.length; i++) {
-					var deniedPresentPermission = resultObj.deniedPresent[i];
-					console.log('拒绝本次申请的权限:' + deniedPresentPermission);
-					result = 0
-				}
-				for (var i = 0; i < resultObj.deniedAlways.length; i++) {
-					var deniedAlwaysPermission = resultObj.deniedAlways[i];
-					console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
-					result = -1
-				}
-				resolve({
-					result: result,
-					permissionName: permissionName
-				});
-				// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
-				if (result != 1) {
-				gotoAppPermissionSetting()
-				}
-			},
-			function(error) {
-				console.log('申请权限错误:' + error.code + " = " + error.message);
-				resolve({
-					code: error.code,
-					message: error.message
-				});
-			}
-		);
-	});
+    if (isIos) {
+      const handler = IOS_PERMISSION_HANDLERS[config.iosHandler];
+      return handler ? await handler.request() : false;
+    } else {
+      const result = await ANDROID_PERMISSION_HANDLERS.request(config.androidPermission);
+      return result === 1;
+    }
+  }
+
+  static openSettings() {
+    if (isIos) {
+      const UIApplication = plus.ios.import("UIApplication");
+      const application = UIApplication.sharedApplication();
+      const settingsUrl = plus.ios.newObject("NSURL").URLWithString("app-settings:");
+      application.openURL(settingsUrl);
+      plus.ios.deleteObject(settingsUrl);
+      plus.ios.deleteObject(application);
+    } else {
+      const Intent = plus.android.importClass("android.content.Intent");
+      const Settings = plus.android.importClass("android.provider.Settings");
+      const Uri = plus.android.importClass("android.net.Uri");
+      const MainActivity = plus.android.runtimeMainActivity();
+      
+      const intent = new Intent();
+      intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+      const uri = Uri.fromParts("package", MainActivity.getPackageName(), null);
+      intent.setData(uri);
+      MainActivity.startActivity(intent);
+    }
+  }
 }
 
-/**
- * 授权前告知用户使用意图
- * @param content
- * @returns
- */
-const showAuthTipModal = async (string) => {
-	// #ifdef H5
-	if (1 === 1) {
-		return true;
-	}
-	// #endif
-	// ios端在manifest.json配置权限使用说明,以下权限判断仅在安卓端可用  
-	var Manifest = plus.android.importClass("android.Manifest");
-	var MainActivity = plus.android.runtimeMainActivity();
-	var arr = string.split(".")
-	let result = MainActivity.checkSelfPermission(Manifest.permission[arr[2]]);
-	console.log('result: ', result);
-	if (result === 0) return true;
-	// // 如果已经授权直接返回
-	const contentData = {
-		['android.permission.ACCESS_FINE_LOCATION']: {
-			title: '定位权限说明',
-			describe: '便于您使用该功能在位置展示时显示距搜索位置的距离,请您确认授权,否则无法使用该功能'
-		},
-		['android.permission.READ_EXTERNAL_STORAGE']: {
-			title: '相册权限说明',
-			describe: '便于您使用该功能上传您的照片/图片/及用户修改头像,请您确认授权,否则无法使用该功能'
-		},
-		['android.permission.CAMERA']: {
-			title: '拍摄权限说明',
-			describe: '便于您使用该功能拍摄照片修改头像、意见反馈上传图片等信息,请您确认授权,否则无法使用该功能'
-		},
-		['android.permission.CALL_PHONE']: {
-			title: '拨打电话权限说明',
-			describe: '便于您使用该功能拨发货人、司机、客服电话,请您确认授权,否则无法使用该功能'
-		}
-	}; 
- 
-	return new Promise((resolve) => { 
-		alert(55)
-		resolve(false)
- 
-		// uni.showModal({
-		// 	title: contentData[string].title,
-		// 	content: contentData[string].describe,
-		// 	success: (res) => {
-		// 		console.log(res,111);
-		// 		resolve(!!res.confirm);
-		// 	},
-		// 	fail: () => {}
-		// });
-	});
+// 显示权限说明弹窗
+const showPermissionDialog = (options) => {
+  return new Promise((resolve) => {
+    // #ifdef APP-PLUS
+    // 获取当前页面实例
+    const pages = getCurrentPages();
+    const currentPage = pages[pages.length - 1];
+    
+    if (currentPage && currentPage.$vm && currentPage.$vm.$refs && currentPage.$vm.$refs.customConfirm) {
+      const customConfirm = currentPage.$vm.$refs.customConfirm;
+      if (typeof customConfirm.confirm === 'function') {
+        customConfirm.confirm({
+          title: options.title || '权限申请',
+          content: options.content || options.describe,
+          btn1: '暂不授权',
+          btn2: '去授权',
+          DialogType: 'inquiry',
+          animation: 0
+        }).then(res => {
+          resolve(res.isConfirm);
+        }).catch(() => {
+          resolve(false);
+        });
+      } else {
+        // 降级使用 uni.showModal
+        uni.showModal({
+          title: options.title || '权限申请',
+          content: options.content || options.describe,
+          cancelText: '暂不授权',
+          confirmText: '去授权',
+          success: (res) => {
+            resolve(res.confirm);
+          }
+        });
+      }
+    } else {
+      // 降级使用 uni.showModal
+      uni.showModal({
+        title: options.title || '权限申请',
+        content: options.content || options.describe,
+        cancelText: '暂不授权',
+        confirmText: '去授权',
+        success: (res) => {
+          resolve(res.confirm);
+        }
+      });
+    }
+    // #endif
+
+    // #ifndef APP-PLUS
+    // 非 APP 环境使用 uni.showModal
+    uni.showModal({
+      title: options.title || '权限申请',
+      content: options.content || options.describe,
+      cancelText: '暂不授权',
+      confirmText: '去授权',
+      success: (res) => {
+        resolve(res.confirm);
+      }
+    });
+    // #endif
+  });
 };
-async function getUserLocation(permissionID, callback) { 
-	return new Promise(async (resolve, reject) => {
- 
-		let authFlag = await showAuthTipModal(permissionID);
-		return resolve(authFlag)
-	});
 
+/**
+ * 清除权限缓存
+ * @param {string} permissionType 权限类型,不传则清除所有权限缓存
+ */
+function clearPermissionCache(permissionType) {
+  if (permissionType) {
+    uni.removeStorageSync(`permission_${permissionType}`);
+  } else {
+    // 清除所有权限缓存
+    Object.values(PermissionType).forEach(type => {
+      uni.removeStorageSync(`permission_${type}`);
+    });
+  }
 }
-// 判断是否有权限
-function judgePermission(permissionID, callback) { 
-	function handle(res) {
-		callback && callback(res);
 
-		// 引导用户去开通权限的弹窗
-		if (res === -1) {
-			uni.showModal({
-				title: "提示",
-				content: "您还未开通" + res.permissionName + "权限,是否去应用设置里开通~",
-				confirmText: "去开通",
-				cancelText: "再逛会",
-				success: (data) => {
-					if (data.confirm) {
-						gotoAppPermissionSetting();
-					}
-				}
-			});
-		}
-	}
-	if (permissionID == "location") { // 位置
-		if (isIos) {
-			handle(judgeIosPermissionLocation());
-		} else {
-			requestAndroidPermission("android.permission.ACCESS_FINE_LOCATION", "位置").then(handle);
-		}
-	} else if (permissionID == "camera") { // 摄像头
-		if (isIos) {
-			handle(judgeIosPermissionCamera());
-		} else {
-			requestAndroidPermission("android.permission.CAMERA", "摄像头").then(handle);
-		}
-	} else if (permissionID == "photoLibrary") { // 相册 
-		if (isIos) {
-			handle(judgeIosPermissionPhotoLibrary());
-		} else {
-			getUserLocation("android.permission.READ_EXTERNAL_STORAGE", "相册读取").then(handle);
-			// requestAndroidPermission("android.permission.READ_EXTERNAL_STORAGE", "相册读取").then(handle);
-		}
-	} else if (permissionID == "record") { // 麦克风
-		if (isIos) {
-			handle(judgeIosPermissionRecord());
-		} else {
-			requestAndroidPermission("android.permission.RECORD_AUDIO", "麦克风").then(handle);
-		}
-	} else if (permissionID == "push") { // 推送
-		if (isIos) {
-			handle(judgeIosPermissionPush());
-		} else {
-			handle(1);
-		}
-	} else if (permissionID == "contact") { // 通讯录
-		if (isIos) {
-			handle(judgeIosPermissionContact());
-		} else {
-			requestAndroidPermission("android.permission.READ_CONTACTS", "通讯录读取").then(handle);
-		}
-	} else if (permissionID == "calendar") { // 日历
-		if (isIos) {
-			handle(judgeIosPermissionCalendar());
-		} else {
-			requestAndroidPermission("android.permission.READ_CALENDAR", "日历读取").then(handle);
-		}
-	} else if (permissionID == "memo") { // 备忘录
-		if (isIos) {
-			handle(judgeIosPermissionMemo());
-		} else {
-			handle(1);
-		}
-	} else if (permissionID == "call_phone") { // 拨打电话
-		if (isIos) {
-			handle(1);
-		} else {
-			requestAndroidPermission("android.permission.CALL_PHONE", "拨打电话").then(handle);
-		}
-	}
-}
- 
-export default	judgePermission 
+// 导出模块
+export default {
+  PermissionType,
+  check: PermissionManager.check.bind(PermissionManager),
+  request: PermissionManager.request.bind(PermissionManager),
+  openSettings: PermissionManager.openSettings.bind(PermissionManager),
+  showPermissionDialog,
+  clearPermissionCache,
+  getPermissionConfig
+}; 

+ 58 - 0
components/SwipeDetector/SwipeDetector.vue

@@ -0,0 +1,58 @@
+
+<template>
+  <view 
+    @touchstart="handleTouchStart"
+    @touchmove="handleTouchMove"
+    @touchend="handleTouchEnd"
+    class="swipe-detector"
+  >
+    <slot></slot>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'SwipeDetector',
+  data() {
+    return {
+      startX: 0,
+      startY: 0,
+      endX: 0,
+      endY: 0,
+      minSwipeDistance: 50 // 最小滑动距离(px)
+    }
+  },
+  methods: {
+    handleTouchStart(e) {
+      this.startX = e.touches[0].clientX
+      this.startY = e.touches[0].clientY
+    },
+    handleTouchMove(e) {
+      this.endX = e.touches[0].clientX
+      this.endY = e.touches[0].clientY
+    },
+    handleTouchEnd() {
+      const diffX = this.endX - this.startX
+      const diffY = this.endY - this.startY
+      
+      // 确保是水平滑动(垂直滑动距离小于水平滑动距离的一半)
+      if (Math.abs(diffY) < Math.abs(diffX) / 2) {
+        if (Math.abs(diffX) > this.minSwipeDistance) {
+          if (diffX > 0) {
+            this.$emit('swipeRight')
+          } else {
+            this.$emit('swipeLeft')
+          }
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style>
+.swipe-detector {
+  width: 100%;
+  height: 100%;
+}
+</style>

+ 2 - 1
pages/index/Search.vue

@@ -597,8 +597,9 @@ export default {
         align-items: center;
         justify-content: center;
         position: absolute;
-        top: 4rpx;
+        top: 50%;
         right: 4rpx;
+		transform: translateY(-50%);
 
         .image {
           width: 36rpx;

+ 0 - 410
pages/index/index copy.scss

@@ -1,410 +0,0 @@
- 
-
-	@font-face {
-	    font-family: 'CustomFont';
-	    src: url('@/static/fonts/alibaba.otf') format('opentype');
-	    font-weight: normal;
-	    font-style: normal;
-	}
-	.tab-nav {
-		display: flex;
-		justify-content: flex-start;
-		padding: 20rpx 20rpx;
-		box-sizing: border-box;
-		background: #ffffff;
- 
-		.tab-item {
-			padding: 10rpx 38rpx;
-			color: #1F1F1F;
-			font-size: 28rpx;
-			background: #F2F6F2;
-			margin-right: 20rpx;
-			border-radius: 30rpx;
-			position: relative;
-			left: 0;
-			top: 0;
-			.indicator-triangle {
-			    position: absolute;
-			    bottom: -10rpx;
-			    left: 50%;
-			    transform: translateX(-50%);
-			    width: 0;
-			    height: 0;
-			    border-left: 10rpx solid transparent;
-			    border-right: 10rpx solid transparent;
-			    border-top: 10rpx solid #ACF934;
-				display: none;
-			}
-			&.active {  
-				background: #ACF934;
-				font-family: "CustomFont" !important;
-				.indicator-triangle {
-					display: block; 
-				}
-			}
-		}
-	}
-
-	.hot-topics {
-		padding: 20rpx;
-		// background: #fff;
-		margin: 20rpx;
-		border-radius: 16rpx;
-		border: #000000 solid 2rpx; 
-		 background:url("../../static/home/hot-topice-bg.png") center/100% 99%  no-repeat;
-		 
-		.hot-topics-header {
-			margin-bottom: 20rpx;
-		
-			.hot-topics-title { 
-				width: 140rpx;
-				height: 34rpx;
-			}
-		}
-
-		.hot-topics-swiper {
-			height: 220rpx;  
-			box-sizing: border-box;
-		}
-
-		.hot-topics-list {
-			padding: 22rpx 26rpx; 
-			padding-bottom: 0;
-				 
-		}
-
-		.topic-item {
-			 
-			display: flex;
-			align-items: center;
-			padding: 5rpx 0;
-			justify-content: space-between;
-			.hot-topics-left{
-				display: flex;
-				.topic-index{
-					width: 30rpx;
-					height: 30rpx;
-					font-weight: 700;
-					font-size: 24rpx;
-					display: inline-flex;
-					align-items: center;
-					justify-content: center;
-					color: #fff;
-					border-radius: 5rpx;
-					margin-right: 18rpx; 
-					background: #CECECE;
-					&.topic-index-img{
-						background: transparent;
-						color: transparent;
-						width: 36rpx;
-						height: 36rpx;
-						position: relative;
-						left: -2rpx;
-						top: 0;
-					}
-				} 
-				.topic-content{
-					font-size: 24rpx; 
-					max-width: 330rpx;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					white-space: nowrap;
-				}
-			}
-				.topic-participants{
-					font-size: 20rpx;
-					color: #999;
-				}
-		.hot-tag {
-			 width: 46rpx;
-			 height: 22rpx;
-			margin: auto;
-			margin-left: 10rpx;
-		}
-		}
-
-		.indicator-dots {
-			display: flex;
-			justify-content: center;
-			margin-top: 20rpx;
-
-			.dot {
-				width: 12rpx;
-				height: 12rpx;
-				border-radius: 50%;
-				background: #808080;
-				margin: 0 6rpx;
-
-				&.active {
-					background: #ffffff;
-				}
-			}
-		}
-	}
-
-	.follow-list {
-		padding: 20rpx;
-		background: #fff;
-		margin: 0rpx;
-		border-radius: 0rpx;
-
-		.works-list {
-			display: flex;
-			flex-wrap: wrap;
-			padding: 10rpx;
-
-			.work-item {
-				width: 48%;
-				margin: 1%;
-				margin-bottom: 20rpx;
-
-				.work-image {
-					width: 100%;
-					aspect-ratio: 1;
-					border-radius: 12rpx;
-				}
-
-				.work-title {
-					font-size: 28rpx;
-					color: #ffffff;
-					margin-top: 10rpx;
-					padding: 0 10rpx;
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-				}
-			}
-		}
-
-		.no-data {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: center;
-			padding: 60rpx 0;
-			background-color: #fff;
-			text {
-				color: #808080;
-				font-size: 28rpx;
-			}
-		}
-	}
-
-	.no-data {
-		text-align: center;
-		padding: 40rpx 0;
-		color: #808080;
-		font-size: 28rpx;
-	}
-
-	.news-list {
-		padding: 20rpx;
-		background: #fff;
-
-		.news-grid {
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
-
-			.news-item {
-				width: 48%;
-				margin-bottom: 30rpx;
-				background: #28292D;
-				border-radius: 12rpx;
-				overflow: hidden;
-
-				.news-image {
-					width: 100%;
-					aspect-ratio: 1;
-					height: auto;
-					border-radius: 12rpx 12rpx 0 0;
-				}
-
-				.news-title {
-					font-size: 28rpx;
-					color: #ffffff;
-					padding: 15rpx;
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					height: 60rpx;
-					line-height: 60rpx;
-				}
-
-				.news-footer {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					padding: 0 15rpx 15rpx;
-
-					.news-author {
-						font-size: 24rpx;
-						color: #808080;
-						max-width: 60%;
-						white-space: nowrap;
-						overflow: hidden;
-						text-overflow: ellipsis;
-					}
-
-					.news-views {
-						display: flex;
-						align-items: center;
-						font-size: 24rpx;
-						color: #808080;
-
-						.view-icon {
-							width: 26rpx;
-							height: 18rpx;
-							margin-right: 6rpx;
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.float-btn {
-		position: fixed;
-		right: 30rpx;
-		bottom: 145rpx;
-		width: 120rpx;
-		height: 120rpx; 
-		border-radius: 50%;
-		display: flex;
-		justify-content: center;
-		align-items: center; 
-		z-index: 999;
-
-		.float-btn-icon {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	.blankHeight {
-		// width: 500rpx;
-		// height: 500rpx;
-		width: 100%;
-		height: 144rpx;
-	}
-	.benner-box{
-		box-sizing: border-box;
-		padding:  20rpx; 
-		background: #fff;	
-		border-top-left-radius: 20rpx;
-		border-top-right-radius: 20rpx;
-		::v-deep.uv-swiper{
-			border-radius: 10rpx !important;
-			overflow: hidden;
-		}
-		.classModel{
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			position: relative;
-			left: 0;
-			right: 0;
-			.benner-iconBom{
-				height: 18rpx;
-				width: 50rpx;
-				position: absolute;
-				top: calc(55% + 18rpx);
-				left: 50%;
-				transform: translateX(-50%);
-				z-index: 99;
-			}
-			.benner-icontop{
-				width: 45rpx;
-				height: 20rpx;
-				position: absolute;
-				top: 55%;
-				left: 50%;
-				transform: translateX(-50%);
-			
-			}
-			.benner-box{
-				height: 256rpx;
-				width: 344rpx;
-				position: relative;
-			}
-	
-			.benner-left-box{
-				background:url("../../static/home/benner-left.-bg.png") center/100% 99%  no-repeat;
-			.text1{
-				color: rgba(255,255,255, 0.8);
-				color: 28rpx;
-				position: absolute;
-				left: 26rpx;
-				top: 88rpx;
-				
-			}
-			.btn{
-				font-size: 24rpx;
-				background: #1F1F1F;
-				color: #ACF934 ;
-				display: inline-block;
-				border-radius: 390rpx;
-				padding: 8rpx 24rpx;
-				padding-bottom: 10rpx;
-				position: absolute;
-				bottom: 38rpx;
-				left: 26rpx;
-			}
-			}
-			.benner-right-box{
-				background:url("../../static/home/benner-right-bg.png") center/100% 99%  no-repeat;
-				display: flex;
-				flex-direction: column;
-				justify-content: space-evenly;
-				align-items: center; 
-				height: 256rpx;
-				.text{
-					color: #999;
-					font-size: 20rpx;
-					position: absolute;
-					top: 56rpx;
-					left: 26rpx; 	
-				}
-				.guard{
-					position: relative;
-					left: 0;
-					top: 0;
-					width: 312rpx;
-					height: 104rpx;
-					background: url("../../static/home/benner-right-btnTop.png") center/100%   no-repeat;
-					margin-bottom: 10rpx;
-				}
-				.match{
-					position: relative;
-					left: 0;
-					top: 0;
-					width: 312rpx;
-					height: 104rpx;
-					background: url("../../static/home/benner-right-btnBom.png") center/100%   no-repeat;
-				}
-			}
-			}
-		}
-		.waterfall-list-container{
-			background: #fff;
-		}
-		.navCenter{
-			.topBox{
-				display: flex;
-				flex-direction: row;
-				justify-content: center;
-				align-items: center;
-			}
-		}
-		.lhSelectCity{
-			background-color: #fff; 
-			position: fixed;
-			left: 0;
-			right: 0;
-			width: 100%;
-			height: 100vh;
-			padding: 0 25rpx;
-			padding-top:  var(--status-bar-height);
-				
-;
-		}

+ 953 - 906
pages/index/index copy.vue

@@ -1,6 +1,6 @@
 <template>
-	<view :style="{ height: windowHeight + 'px' }">
-		<!-- <view style="display: flex; justify-content: flex-end">
+  <view :style="{ height: windowHeight + 'px' }">
+    <!-- <view style="display: flex; justify-content: flex-end">
 			<view class="view0 step1"></view>
 		</view>
 		<view class="view1 step2"></view>
@@ -11,232 +11,191 @@
 		<view style="display: flex; justify-content: flex-end">
 			<view class="view6 step7"></view>
 		</view> -->
-		<z-paging :use-custom-refresher="false" ref="paging" v-model="dataList" :auto="false"
-			:style="{ height: windowHeight - 80 + 'px' }" :show-scrollbar="false" :refresher-enabled="false">
-			<template #top>
-				<page-navbar>
-					<template #navCenter>
-						<view class="top" style="  display: flex;">
-							<!-- 手动选择城市功能隐藏 -->
-							<!-- <view class="topBox" @click="lhSelectCityFun"> -->
-							<view class="topBox" @click="lhSelectCityFun">
-								<text
-									style="margin-left: 10rpx;margin-right: 20rpx;  font-size: 44rpx;font-weight: 600;">
-									{{ currentCity }}
-								</text>
-								<!-- <image src="@/static/home/home-bom.png"
+    <z-paging :use-custom-refresher="false" ref="paging" v-model="dataList" :auto="false"
+      :style="{ height: windowHeight - 80 + 'px' }" :show-scrollbar="false" :refresher-enabled="true"
+      @refresherrefresh="onRefresh" @refresherrestore="onRefresherRestore" @query="queryLists" :fixed="true"
+      :safe-area-inset-bottom="true" :loading-more-enabled="true" :loading-more-no-more-text="'没有更多了'"
+      :loading-more-loading-text="'加载中...'" :loading-more-fail-text="'加载失败,点击重试'" :loading-more-default-text="'上拉加载更多'"
+      :loading-more-loading-style="{ color: '#999' }" :loading-more-no-more-style="{ color: '#999' }"
+      :loading-more-fail-style="{ color: '#999' }" :loading-more-default-style="{ color: '#999' }"
+      @loadingMore="onLoadingMore">
+      <template #top>
+        <page-navbar>
+          <template #navCenter>
+            <view class="top" style="display: flex">
+              <!-- 手动选择城市功能隐藏 -->
+              <!-- <view class="topBox" @click="lhSelectCityFun"> -->
+              <view class="topBox" @click="lhSelectCityFun">
+                <text style="
+                    margin-left: 10rpx;
+                    margin-right: 20rpx;
+                    font-size: 44rpx;
+                    font-weight: 600;
+                  ">
+                  {{ currentCity }}
+                </text>
+                <!-- <image src="@/static/home/home-bom.png"
 									style="width: 36rpx; height: 36rpx;margin-left: 15rpx;margin-right: 30rpx;"></image> -->
-							</view>
-							<view class="weather">
-								<p>{{ weather.weather }}<i :class="'qi-' + weather.icon"></i>️{{ weather.temp }}</p>
-								<p>{{ getDayOfWeek }}</p>
-							</view>
-						</view>
-						<view class="search " @click="goPage('/pages/index/Search')">
-							<uv-input placeholder="🔥“潮玩大作战” 派对季重磅开启!" border="none"
-								:custom-style="{ background: '#fff', paddingLeft: '25rpx' }" shape="circle">
-
-
-
-								<image class="testImg" src="@/static/home/icon-hot.png"
-									style="width: 22rpx; height: 30rpx"></image>
-
-								<template #suffix>
-									<view class="input-box">
-										<image src="@/static/icon/search.png" style="width: 32rpx; height: 32rpx">
-										</image>
-									</view>
-								</template>
-							</uv-input>
-						</view>
-					</template>
-				</page-navbar>
-			</template>
-			<z-paging-cell class="benner-box ">
-				<sortble :default-sorts="['uvSwiper', 'classModel', 'uvSwiperCard']">
-					<template #uvSwiper>
-						<uv-swiper :list="bannerList" :autoplay="true" circular :interval="5000" indicator
-							indicator-mode="dot" height="200" radius="0"></uv-swiper>
-					</template>
-
-					<template #classModel>
-						<view class="classModel">
-							<image src="@/static/home/benner-iconBom.png" class="benner-iconBom" mode=""></image>
-							<image src="@/static/home/benner-icontop.png" class="benner-icontop" mode=""></image>
-							<view class="benner-box benner-left-box" @click="goPage('/pages/my/job')">
-								<view class="text1">
-									获取奖励
-								</view>
-								<view class="btn">
-									立即前往
-								</view>
-							</view>
-							<view class="benner-box benner-right-box" ref="classModel1">
-								<view class="guard ">
-									<view class="text">
-										潮玩IP
-									</view>
-								</view>
-								<view class="match">
-									<view class="text">
-										社交
-									</view>
-								</view>
-							</view>
-							<!-- 	<view class="classModel-bg classModel-bg1" ref="classModel1"
-								@click="goPage('/pages/my/job')">
-								<image class="classModel-img" src="@/static/zhHans-text-icon/text-2.png" mode="">
-								</image>
-							</view>
-							<view class="classModel-bg classModel-bg2" ref="classModel2">
-								<image class="classModel-img" src="@/static/zhHans-text-icon/text-3.png" mode="">
-								</image>
-							</view>
-							<view class="classModel-bg" ref="classModel3">
-								<image class="classModel-img" src="@/static/zhHans-text-icon/text-4.png" mode="">
-								</image>
-							</view> -->
-						</view>
-					</template>
-
-				</sortble>
-			</z-paging-cell>
-			<z-paging-cell style="background: #fff;">
-				<view class="tab-nav ">
-					<view v-for="(tab, index) in tabs" :key="index"
-						:class="['tab-item', currentTab === index ? 'active' : '']" @click="switchTab(index)">
-						{{ tab }}
-						<view class="indicator-triangle">
-						</view>
-					</view>
-				</view>
-
-				<view v-if="currentTab === 2" class="hot-topics">
-					<view class="hot-topics-header">
-						<!-- <text class="hot-topics-title">热搜资讯!</text> -->
-						<image class="hot-topics-title" src="@/static/home/hot-topics-title.png" mode=""></image>
-
-					</view>
-					<swiper class="hot-topics-swiper" :current="currentTopicPage" @change="handleTopicPageChange">
-						<swiper-item v-for="(page, pageIndex) in topicPages" :key="pageIndex">
-							<view class="hot-topics-list">
-								<view v-for="(topic, index) in page" :key="index" class="topic-item"
-									@click="goToArticleDetail(topic.id)">
-									<view class="hot-topics-left">
-										<image v-if="(pageIndex * 4 + index) == 0" src="@/static/icon/icon-first.png"
-											class="topic-index topic-index-img" mode=""></image>
-										<image v-else-if="(pageIndex * 4 + index) == 1"
-											src="@/static/icon/icon-second.png" class="topic-index topic-index-img"
-											mode=""></image>
-										<image v-else-if="(pageIndex * 4 + index) == 2"
-											src="@/static/icon/icon-third.png" class="topic-index topic-index-img"
-											mode=""></image>
-										<text v-else class="topic-index">{{ pageIndex * 4 + index + 1 }}</text>
-
-										<view class="topic-content toe">
-											{{ topic.title }}
-										</view>
-										<image v-if="topic.isHot" src="@/static/icon/icon-hot.png" class="hot-tag"
-											mode=""></image>
-									</view>
-									<text class="topic-participants">{{ topic.num_like }}人正在热议</text>
-									<!-- <text class="topic-index">{{ pageIndex * 5 + index + 1 }}</text>
-									<view class="topic-content">
-										<view class="topic-title-row">
-											<text class="topic-title">{{ topic.title }}</text>
-											<text v-if="topic.isHot" class="hot-tag">HOT</text>
-										</view>
-										<text class="topic-participants">{{ topic.num_like }}人正在热议</text>
-									</view> -->
-								</view>
-							</view>
-						</swiper-item>
-					</swiper>
-					<view class="indicator-dots">
-						<view v-for="i in 2" :key="i" :class="['dot', currentTopicPage === i - 1 ? 'active' : '']">
-						</view>
-					</view>
-				</view>
-
-				<!-- 根据当前标签显示不同样式的列表 -->
-				<!-- 关注列表 - 类似my.vue -->
-				<view v-show="currentTab === 0" class="follow-list ">
-					<block v-if="followList.length > 0">
-						<!-- 		<view class="works-list">
-							<view class="work-item" v-for="(item, index) in followList" :key="index"
-								@click="goWork(item)">
-								<image class="work-image" :src="item.images || item.img_url" mode="aspectFill"></image>
-								<view class="work-title">{{
-                  item.title || "作品" + index
-                }}</view>
-							</view>
-						</view> -->
-						<w-waterfall :data="followList">
-							<template v-slot:content="{ item, width }">
-								<card :item="formatItem(item)" :width="width" :custom-style="{ background: '#fff' }"
-									textColor="#000"></card>
-							</template>
-						</w-waterfall>
-					</block>
-					<view class="no-data" v-else-if="!isLoadingFollow">
-						<text>暂无关注数据</text>
-					</view>
-				</view>
-
-				<!-- 推荐列表 - 瀑布流样式 -->
-				<w-waterfall v-show="currentTab === 1 && recommendList.length > 0" :data="recommendList">
-					<template v-slot:content="{ item, width }">
-						<card :item="formatItem(item)" :width="width" :custom-style="{ background: '#fff' }"
-							textColor="#000"></card>
-					</template>
-				</w-waterfall>
-
-				<!-- 探索列表 - 热点新闻已经有现成的热搜资讯组件,只需添加新闻列表 -->
-				<view v-show="currentTab === 2 && newsList.length > 0" class="news-list ">
-					<!-- <view class="news-grid">
-						<view class="news-item" v-for="(item, index) in newsList" :key="index"
-							@click="goToArticleDetail(item.id)">
-							<image class="news-image" :src="item.img_url || item.images" mode="aspectFill"></image>
-							<view class="news-title">{{ item.title || "新闻标题" }}</view>
-							<view class="news-footer">
-								<view class="news-author">{{ item.author || "作者" }}</view>
-								<view class="news-views">
-									<image src="/static/icon/icon-4.png" class="view-icon"></image>
-									<text>{{ item.num_view || "0" }}</text>
-								</view>
-							</view>
-						</view>
-					</view> -->
-					<w-waterfall v-show="currentTab === 2 && newsList.length > 0" :data="newsList">
-						<template v-slot:content="{ item, width }">
-							<card :item="formatItem(item)" :width="width" goLink="/pages/index/articleDetail?id="
-								:custom-style="{ background: '#fff' }" textColor="#000"></card>
-						</template>
-					</w-waterfall>
-				</view>
-
-				<view class="no-data" v-if="currentTab === 1 && recommendList.length === 0 && !isLoadingRecommend">
-					<text>暂无推荐数据</text>
-				</view>
-
-				<view class="no-data" v-if="currentTab === 2 && newsList.length === 0 && !isLoadingNews">
-					<text>暂无新闻数据</text>
-				</view>
-			</z-paging-cell>
-			<view class="blankHeight"></view>
-		</z-paging>
-		<tabbar-vue :tabbars="tabbars" :currentIndex="0" ref="tabbar"></tabbar-vue>
-
-		<!-- 添加浮动按钮 -->
-		<view v-if="currentTab === 2" class="float-btn" @click="goToMake">
-			<image src="/static/home/release-btn.png" class="float-btn-icon"></image>
-		</view>
-
-		<!-- <novice-guidance :step="step"></novice-guidance> -->
-		<lhSelectCity style="height: 100vh;" class="lhSelectCity" :currentCity="currentCity"
-			:windowHeight="windowHeight" :hotCitys="hotCitys" @onSelect="City" v-if="lhSelectCityFalg"
-			@closeLhSelectCityFun="closeLhSelectCityFun()" />
-	</view>
+              </view>
+              <view class="weather">
+                <p>
+                  {{ weather.weather }}<i :class="'qi-' + weather.icon"></i>️{{
+                    weather.temp
+                  }}
+                </p>
+                <p>{{ getDayOfWeek }}</p>
+              </view>
+            </view>
+            <view class="search" @click="goPage('/pages/index/Search')">
+              <uv-input placeholder="🔥 潮玩大作战 派对季重磅开启!" border="none"
+                :custom-style="{ background: '#fff', paddingLeft: '25rpx' }" shape="circle">
+                <image class="testImg" src="@/static/home/icon-hot.png" style="width: 22rpx; height: 30rpx"></image>
+
+                <template #suffix>
+                  <view class="input-box">
+                    <image src="@/static/icon/search.png" style="width: 32rpx; height: 32rpx">
+                    </image>
+                  </view>
+                </template>
+              </uv-input>
+            </view>
+          </template>
+        </page-navbar>
+      </template>
+      <z-paging-cell class="benner-box">
+        <sortble :default-sorts="['uvSwiper', 'classModel', 'uvSwiperCard']">
+          <template #uvSwiper>
+            <uv-swiper :list="bannerList" :autoplay="true" circular :interval="5000" indicator indicator-mode="dot"
+              height="200" radius="0"></uv-swiper>
+          </template>
+
+          <template #classModel>
+            <view class="classModel">
+              <image src="@/static/home/benner-iconBom.png" class="benner-iconBom" mode=""></image>
+              <image src="@/static/home/benner-icontop.png" class="benner-icontop" mode=""></image>
+              <view class="benner-box benner-left-box" @click="goPage('/pages/my/job')">
+                <view class="text1"> 获取奖励 </view>
+                <view class="btn"> 立即前往 </view>
+              </view>
+              <view class="benner-box benner-right-box" ref="classModel1">
+                <view class="guard">
+                  <view class="text"> 潮玩IP </view>
+                </view>
+                <view class="match">
+                  <view class="text"> 社交 </view>
+                </view>
+              </view>
+            </view>
+          </template>
+        </sortble>
+      </z-paging-cell>
+      <z-paging-cell style="background: #fff">
+        <view class="tab-nav">
+          <view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', currentTab === index ? 'active' : '']"
+            @click="switchTab(index)">
+            {{ tab }}
+            <view class="indicator-triangle"> </view>
+          </view>
+        </view>
+        <SwipeDetector @swipeLeft="swipeLeft()" @swipeRight="swipeRight()">
+          <!-- 根据当前标签显示不同样式的列表 -->
+          <!-- 关注列表 - 类似my.vue -->
+          <view v-show="currentTab === 0" class="follow-list">
+            <block v-if="followList.length > 0">
+              <w-waterfall :data="followList">
+                <template v-slot:content="{ item, width }">
+                  <card :item="formatItem(item)" :width="width" :custom-style="{ background: '#fff' }" textColor="#000">
+                  </card>
+                </template>
+              </w-waterfall>
+            </block>
+            <view class="no-data" v-else-if="!isLoadingFollow">
+              <text>暂无关注数据</text>
+            </view>
+          </view>
+
+          <!-- 推荐列表 - 瀑布流样式 -->
+          <template>
+            <w-waterfall v-show="currentTab === 1 && recommendList.length > 0" :data="recommendList">
+              <template v-slot:content="{ item, width }">
+                <card :item="formatItem(item)" :width="width" :custom-style="{ background: '#fff' }" textColor="#000">
+                </card>
+              </template>
+            </w-waterfall>
+            <view class="no-data" v-if="
+              currentTab === 1 &&
+              recommendList.length === 0 &&
+              !isLoadingRecommend
+            ">
+              <text>暂无推荐数据</text>
+            </view>
+          </template>
+
+          <!-- 探索列表 - 热点新闻已经有现成的热搜资讯组件,只需添加新闻列表 -->
+          <template>
+            <view v-if="currentTab === 2" class="hot-topics">
+              <view class="hot-topics-header">
+                <image class="hot-topics-title" src="@/static/home/hot-topics-title.png" mode=""></image>
+              </view>
+              <swiper class="hot-topics-swiper" :current="currentTopicPage" @change="handleTopicPageChange">
+                <swiper-item v-for="(page, pageIndex) in topicPages" :key="pageIndex">
+                  <view class="hot-topics-list">
+                    <view v-for="(topic, index) in page" :key="index" class="topic-item"
+                      @click="goToArticleDetail(topic.id)">
+                      <view class="hot-topics-left">
+                        <image v-if="pageIndex * 4 + index == 0" src="@/static/icon/icon-first.png"
+                          class="topic-index topic-index-img" mode=""></image>
+                        <image v-else-if="pageIndex * 4 + index == 1" src="@/static/icon/icon-second.png"
+                          class="topic-index topic-index-img" mode=""></image>
+                        <image v-else-if="pageIndex * 4 + index == 2" src="@/static/icon/icon-third.png"
+                          class="topic-index topic-index-img" mode=""></image>
+                        <text v-else class="topic-index">{{
+                          pageIndex * 4 + index + 1
+                          }}</text>
+
+                        <view class="topic-content toe">
+                          {{ topic.title }}
+                        </view>
+                        <image v-if="topic.isHot" src="@/static/icon/icon-hot.png" class="hot-tag" mode=""></image>
+                      </view>
+                      <text class="topic-participants">{{ topic.num_like }}人正在热议</text>
+                    </view>
+                  </view>
+                </swiper-item>
+              </swiper>
+              <view class="indicator-dots">
+                <view v-for="i in 2" :key="i" :class="['dot', currentTopicPage === i - 1 ? 'active' : '']">
+                </view>
+              </view>
+            </view>
+            <view v-show="currentTab === 2 && newsList.length > 0" class="news-list">
+              <w-waterfall v-show="currentTab === 2 && newsList.length > 0" :data="newsList">
+                <template v-slot:content="{ item, width }">
+                  <card :item="formatItem(item)" :width="width" goLink="/pages/index/articleDetail?id="
+                    :custom-style="{ background: '#fff' }" textColor="#000"></card>
+                </template>
+              </w-waterfall>
+            </view>
+
+            <view class="no-data" v-if="currentTab === 2 && newsList.length === 0 && !isLoadingNews">
+              <text>暂无新闻数据</text>
+            </view>
+          </template>
+        </SwipeDetector>
+      </z-paging-cell>
+      <view class="blankHeight"></view>
+    </z-paging>
+    <tabbar-vue :tabbars="tabbars" :currentIndex="0" ref="tabbar"></tabbar-vue>
+
+    <!-- 添加浮动按钮 -->
+    <view v-if="currentTab === 2" class="float-btn" @click="goToMake">
+      <image src="/static/home/release-btn.png" class="float-btn-icon"></image>
+    </view>
+
+    <!-- <novice-guidance :step="step"></novice-guidance> -->
+    <lhSelectCity style="height: 100vh" class="lhSelectCity" :currentCity="currentCity" :windowHeight="windowHeight"
+      :hotCitys="hotCitys" @onSelect="City" v-if="lhSelectCityFalg" @closeLhSelectCityFun="closeLhSelectCityFun()" />
+  </view>
 </template>
 
 <script>
@@ -246,692 +205,780 @@ import pageNavbar from "@/components/page-navbar/page-navbar.vue";
 import wWaterfall from "@/components/w-waterfall/w-waterfall.vue";
 import tabbar from "@/mixins/tabbar";
 import card from "@/components/card/card.vue";
-import lhSelectCity from "@/components/lh-select-city/index.vue"
-import { getStorage, setStorage, removeStorage } from '@/common/util.js'
+import lhSelectCity from "@/components/lh-select-city/index.vue";
+import { getStorage, setStorage, removeStorage } from "@/common/util.js";
 // import noviceGuidance from "@/components/novice-guidance/index.vue";
 export default {
-	components: {
-		sortble,
-		tabbarVue,
-		pageNavbar,
-		wWaterfall,
-		lhSelectCity,
-		card
-		// noviceGuidance
-	},
-	mixins: [tabbar],
-	data() {
-		return {
-			step: {
-				name: "workbenchSet5",
-				guideList: [{
-					el: ".step1",
-					tips: "这里是第一步的介绍~",
-					next: "下一步",
-				},
-				{
-					el: ".step2",
-					tips: "这里是第二步的介绍~",
-					next: "下一步",
-				},
-				{
-					el: ".step3",
-					tips: "这里是第三步的介绍~",
-					next: "下一步",
-				},
-				{
-					el: ".step4",
-					tips: "这里是第四步的介绍~",
-					next: "下一步",
-				},
-				{
-					el: ".step5",
-					tips: "这里是第五步的介绍~",
-					next: "下一步",
-				},
-				{
-					el: ".step6",
-					tips: "这里是第六步的介绍~",
-					next: "下一步",
-				},
-				{
-					el: ".step7",
-					tips: "最后一步啦~",
-					next: "完成",
-				},
-				],
-			},
-			windowHeight: uni.getWindowInfo().windowHeight,
-			bannerList: [
-				"../../static/dome/home-swper.png",
-				"../../static/dome/home-swper.png",
-				"../../static/dome/home-swper.png",
-			],
-			cardList: [{
-				img: "/static/img/img-1.png",
-				bgimg: "/static/image/bg-2.png",
-			},
-			{
-				img: "/static/img/img-3.png",
-				bgimg: "/static/image/bg-3.png",
-			},
-			{
-				img: "/static/img/img-2.png",
-				bgimg: "/static/image/bg-1.png",
-			},
-			],
-			list: [], // 瀑布流全部数据
-			dataList: [],
-			tabs: ["关注", "推荐", "探索"],
-			currentTab: 1,
-			currentTopicPage: 0,
-			followList: [], // 关注列表数据
-			recommendList: [], // 推荐列表数据
-			exploreList: [], // 探索列表数据
-			hotNewsList: [], // 热点新闻数据
-			newsList: [], // 新闻列表数据
-			followOffset: 0, // 关注列表偏移量
-			recommendOffset: 0, // 推荐列表偏移量
-			exploreOffset: 0, // 探索列表偏移量
-			newsOffset: 0, // 新闻列表偏移量
-			hasMoreFollow: true, // 是否有更多关注列表数据
-			hasMoreRecommend: true, // 是否有更多推荐列表数据
-			hasMoreExplore: true, // 是否有更多探索列表数据
-			hasMoreNews: true, // 是否有更多新闻列表数据
-			isLoadingFollow: false, // 是否正在加载关注列表
-			isLoadingRecommend: false, // 是否正在加载推荐列表
-			isLoadingExplore: false, // 是否正在加载探索列表
-			isLoadingNews: false, // 是否正在加载新闻列表
-			hotTopics: [],
-			lhSelectCityFalg: false,
-			hotCitys: [
-				'杭州',
-				'天津',
-				'北京',
-				'上海',
-				'深圳',
-				'广州',
-				'成都',
-				'重庆',
-				'厦门'
-			],
-			currentCity: '北京',
-			windowHeight: "",
-			weather: {
-				city: "",
-				weather: "",
-				temp: '0℃',
-				icon: 101
-			},
-			isContentRecommendation: true,
-		};
-	},
-
-	computed: {
-		getDayOfWeek() {
-			const days = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
-			const today = new Date();
-			const dayOfWeek = days[today.getDay()];
-			return dayOfWeek;
-		},
-		currentList() {
-			switch (this.currentTab) {
-				case 0:
-					return this.followList;
-				case 1:
-					return this.recommendList; // 使用专门的推荐列表
-				case 2:
-					return this.exploreList;
-				default:
-					return [];
-			}
-		},
-		topicPages() {
-			const pages = [];
-			for (let i = 0; i < this.hotTopics.length; i += 4) {
-				pages.push(this.hotTopics.slice(i, i + 4));
-			}
-			return pages;
-		},
-	},
-	onLoad() {
-		let that = this;
-		// 计算出可用高度
-		this.windowHeight = uni.getSystemInfoSync().windowHeight + "px";
-		// 不在onLoad中直接加载数据,避免与z-paging组件重复请求
-		// 让z-paging组件通过queryList方法控制数据加载 
-		this.getWeather()
-		this.queryList();
-
-	},
-	onShow() {
-		var isContentRecommendation = getStorage('isContentRecommendation')
-		console.log(isContentRecommendation, "isContentRecommendation");
-		if (isContentRecommendation != 'false') {
-			isContentRecommendation = true
-		} else {
-			isContentRecommendation = false
-		}
-		this.isContentRecommendation = isContentRecommendation
-
-		if (isContentRecommendation == false) {
-			this.tabs = ["关注"]
-			this.currentTab = 0
-			this.queryList()
-		} else {
-			this.tabs = ["关注", "推荐", "探索"]
-			this.currentTab = 1
-		}
-
-	},
-	// 上拉加载更多
-	onReachBottom() {
-		this.loadMoreData();
-	},
-
-	// 下拉刷新数据
-	methods: {
-		getWeather(city) {
-			uni.request({
-				url: this.$apiHost + '/Index/getAreaInfo',
-				data: {
-					uuid: getApp().globalData.uuid,
-					skey: getApp().globalData.skey,
-					city: city || (this.currentCity == "北京" ? "" : this.currentCity)
-				},
-				header: {
-					"content-type": "application/json",
-					'sign': getApp().globalData.headerSign
-				},
-				success: (res) => {
-					console.log(this.weather, "天气数据", res.data);
-					if (res.data.city) {
-						this.currentCity = res.data.city
-						this.weather = res.data
-					}
-
-				},
-				complete: () => { },
-				fail: (e) => { }
-			});
-		},
-		lhSelectCityFun() {
-			this.lhSelectCityFalg = true
-		},
-		// 选中事件
-		City(city) {
-			this.currentCity = city
-			setTimeout(() => {
-				this.lhSelectCityFalg = false
-			}, 300)
-
-		},
-		closeLhSelectCityFun() {
-			this.lhSelectCityFalg = false
-		},
-		queryList() {
-			// 根据当前标签刷新数据
-			switch (this.currentTab) {
-				case 0:
-					// 重置关注列表
-					this.followList = [];
-					this.followOffset = 0;
-					this.hasMoreFollow = true;
-					this.loadFollowList();
-					break;
-				case 1:
-					// 重置推荐列表
-					this.recommendList = [];
-					this.recommendOffset = 0;
-					this.hasMoreRecommend = true;
-					this.loadRecommendList();
-					break;
-				case 2:
-					// 重置热点新闻和新闻列表
-					this.hotNewsList = [];
-					this.newsList = [];
-					this.newsOffset = 0;
-					this.hasMoreNews = true;
-					// 加载热点新闻和新闻列表
-					this.loadHotNews();
-					this.loadNewsList();
-					break;
-			}
-		},
-
-		switchTab(index) {
-			this.currentTab = index;
-
-			// Check if the target tab's list is already populated
-			if (this.currentList.length > 0) {
-				// If the list is already populated, do not fetch data again
-				return;
-			}
-
-			// If the list is not populated, load the corresponding data
-			this.loadTabData(index);
-		},
-		loadTabData(index) {
-			switch (index) {
-				case 0:
-					if (!this.followList.length) {
-						this.loadFollowList();
-					}
-					break;
-				case 1:
-					if (!this.recommendList.length) {
-						this.loadRecommendList();
-					}
-					break;
-				case 2:
-					if (!this.hotNewsList.length) {
-						this.loadHotNews();
-					}
-					if (!this.newsList.length) {
-						this.loadNewsList();
-					}
-					break;
-			}
-		},
-		loadFollowList() {
-			if (this.isLoadingFollow) return;
-			this.isLoadingFollow = true;
-
-			uni.request({
-				url: this.$apiHost + "/Work/getlist",
-				data: {
-					uuid: getApp().globalData.uuid,
-					skey: getApp().globalData.skey,
-					type: "attention", // 关注列表
-					offset: this.followOffset,
-				},
-				header: {
-					"content-type": "application/json",
-					sign: getApp().globalData.headerSign,
-				},
-				success: (res) => {
-					console.log("关注列表数据:", res.data);
-					// 确保在任何情况下都完成加载
-					if (
-						res.data.success == "yes" &&
-						res.data.list &&
-						res.data.list.length > 0
-					) {
-						// 只有当列表有数据时才追加
-						this.followList = [...this.followList, ...res.data.list];
-						this.followOffset += res.data.list.length;
-
-						if (res.data.list.length < 20) {
-							this.hasMoreFollow = false;
-						}
-					} else {
-						// 如果列表为空,确保标记没有更多数据
-						this.hasMoreFollow = false;
-					}
-
-					// 无论是否有数据,都需要通知z-paging组件完成刷新
-					if (this.$refs.paging) {
-						this.$refs.paging.complete(this.followList);
-					}
-				},
-				complete: () => {
-					this.isLoadingFollow = false;
-				},
-				fail: (e) => {
-					console.log("请求关注列表失败:", e);
-					this.isLoadingFollow = false;
-					// 加载失败时也要通知组件完成
-					if (this.$refs.paging) {
-						this.$refs.paging.complete(false);
-					}
-				},
-			});
-		},
-		loadRecommendList() {
-			if (this.isLoadingRecommend) return;
-			this.isLoadingRecommend = true;
-
-			uni.request({
-				url: this.$apiHost + "/Work/getlist",
-				data: {
-					uuid: getApp().globalData.uuid,
-					skey: getApp().globalData.skey,
-					type: "recommend", // 推荐列表
-					offset: this.recommendOffset,
-				},
-				header: {
-					"content-type": "application/json",
-					sign: getApp().globalData.headerSign,
-				},
-				success: (res) => {
-					console.log("推荐列表数据:", res.data);
-					if (
-						res.data.success == "yes" &&
-						res.data.list &&
-						res.data.list.length > 0
-					) {
-						this.recommendList = [...this.recommendList, ...res.data.list];
-						this.recommendOffset += res.data.list.length;
-
-						if (res.data.list.length < 20) {
-							this.hasMoreRecommend = false;
-						}
-					} else {
-						this.hasMoreRecommend = false;
-					}
-
-					// 无论是否有数据,都需要通知z-paging组件完成刷新
-					if (this.$refs.paging) {
-						this.$refs.paging.complete(this.recommendList);
-					}
-				},
-				complete: () => {
-					this.isLoadingRecommend = false;
-				},
-				fail: (e) => {
-					console.log("请求推荐列表失败:", e);
-					this.isLoadingRecommend = false;
-					// 加载失败时也要通知组件完成
-					if (this.$refs.paging) {
-						this.$refs.paging.complete(false);
-					}
-				},
-			});
-		},
-		loadHotNews() {
-			if (this.isLoadingExplore) return;
-			this.isLoadingExplore = true;
-
-			uni.request({
-				url: this.$apiHost + "/Article/getlist",
-				data: {
-					uuid: getApp().globalData.uuid,
-					skey: getApp().globalData.skey,
-					type: "hot", // 热点新闻
-				},
-				header: {
-					"content-type": "application/json",
-					sign: getApp().globalData.headerSign,
-				},
-				success: (res) => {
-					console.log("热点新闻数据:", res.data);
-					if (
-						res.data.success == "yes" &&
-						res.data.list &&
-						res.data.list.length > 0
-					) {
-						this.hotNewsList = res.data.list;
-
-						// 如果有热点新闻数据,更新热搜资讯
-						if (this.hotNewsList.length > 0) {
-							// 将API返回的热点新闻转换为热搜资讯格式
-							this.hotTopics = this.hotNewsList.map((item, index) => {
-								return {
-									id: item.id,
-									title: item.title || "热门话题",
-									num_like: item.num_like || 0,
-									isHot: index % 2 === 0, // 偶数索引的设为热点
-								};
-							});
-						}
-					}
-				},
-				complete: () => {
-					this.isLoadingExplore = false;
-				},
-				fail: (e) => {
-					console.log("请求热点新闻失败:", e);
-					this.isLoadingExplore = false;
-				},
-			});
-		},
-		loadNewsList() {
-			if (this.isLoadingNews) return;
-			this.isLoadingNews = true;
-			// uni.request({
-			// 	url: this.$apiHost + "/Article/getlist",
-			// 	data: {
-			// 		uuid: getApp().globalData.uuid,
-			// 		skey: getApp().globalData.skey,
-			// 		type: "list", // 新闻列表
-			// 		offset: this.newsOffset,
-			// 	},
-			// 	header: {
-			// 		"content-type": "application/json",
-			// 		sign: getApp().globalData.headerSign,
-			// 	},
-			// 	success: (res) => {
-			// 		console.log("新闻列表数据:", res.data);
-			// 		if (
-			// 			res.data.success == "yes" &&
-			// 			res.data.list &&
-			// 			res.data.list.length > 0
-			// 		) {
-			// 			this.newsList = [...this.newsList, ...res.data.list];
-			// 			this.newsOffset += res.data.list.length;
-
-			// 			if (res.data.list.length < 20) {
-			// 				this.hasMoreNews = false;
-			// 			}
-			// 		} else {
-			// 			this.hasMoreNews = false;
-			// 		}
-
-			// 		// 无论是否有数据,都需要通知z-paging组件完成刷新
-			// 		if (this.$refs.paging) {
-			// 			this.$refs.paging.complete(this.newsList);
-			// 		}
-			// 	},
-			// 	complete: () => {
-			// 		this.isLoadingNews = false;
-			// 	},
-			// 	fail: (e) => {
-			// 		console.log("请求新闻列表失败:", e);
-			// 		this.isLoadingNews = false;
-			// 		// 加载失败时也要通知组件完成
-			// 		if (this.$refs.paging) {
-			// 			this.$refs.paging.complete(false);
-			// 		}
-			// 	},
-			// });
-			this.$http.get('/Article/getlist', {
-				uuid: getApp().globalData.uuid,
-				skey: getApp().globalData.skey,
-				type: "list", // 新闻列表
-				offset: this.newsOffset,
-			}).then(
-				async res => {
-					await res
-					console.log("新闻列表数据:", res);
-					if (
-						res.data.success == "yes" &&
-						res.data.list &&
-						res.data.list.length > 0
-					) {
-						this.newsList = [...this.newsList, ...res.data.list];
-						this.newsOffset += res.data.list.length;
-
-						if (res.data.list.length < 20) {
-							this.hasMoreNews = false;
-						}
-					} else {
-						this.hasMoreNews = false;
-					}
-
-					// 无论是否有数据,都需要通知z-paging组件完成刷新
-					if (this.$refs.paging) {
-						this.$refs.paging.complete(this.newsList);
-					}
-				}).catch(
-					async e => {
-						await e
-						console.log("请求新闻列表失败:", e);
-						this.isLoadingNews = false;
-						// 加载失败时也要通知组件完成
-						if (this.$refs.paging) {
-							this.$refs.paging.complete(false);
-						}
-					}).finally(
-						() => {
-							this.isLoadingNews = false;
-						})
-
-
-		},
-		loadMoreData() {
-			// 根据当前标签加载更多数据
-			switch (this.currentTab) {
-				case 0:
-					if (this.hasMoreFollow && !this.isLoadingFollow) {
-						this.loadFollowList();
-					}
-					break;
-				case 1:
-					if (this.hasMoreRecommend && !this.isLoadingRecommend) {
-						this.loadRecommendList();
-					}
-					break;
-				case 2:
-					if (this.hasMoreNews && !this.isLoadingNews) {
-						this.loadNewsList();
-					}
-					break;
-			}
-		},
-		handleTopicPageChange(e) {
-			this.currentTopicPage = e.detail.current;
-		},
-
-		formatItem(item) {
-			console.log("item:", item);
-
-			this.downloadAndProcessImage(item.images)
-				.then((color) => {
-					console.log(`平均颜色: R=${color.r}, G=${color.g}, B=${color.b}`);
-				})
-				.catch((error) => {
-					console.error("获取图像失败:", error);
-				});
-			let img = ''
-			if (item.images) {
-				img = item.images.split("|")[0]
-			}
-
-			// 处理接口返回的数据,使其适配card组件
-			return {
-				id: item.id,
-				allowEdit: false,
-				nickname: item.nickname,
-				avator: item.avator,
-				num_like: item.num_like,
-				num_view: item.num_view,
-				image: img || item.img_url || item.image, // 优先使用images字段
-				w: item.width,
-				h: item.height,
-				title: item.title || "",
-				desc: item.desc || "",
-				userID:item.userID || 0,
-				backgroundColor: "#f6f6f6",
-			};
-		},
-		downloadAndProcessImage(imageUrl, width = 10, height = 10) {
-			return new Promise((resolve, reject) => {
-				uni.downloadFile({
-					url: imageUrl,
-					success: (downloadResult) => {
-						if (downloadResult.statusCode === 200) {
-							const tempFilePath = downloadResult.tempFilePath;
-							const ctx = uni.createCanvasContext('myCanvas', this);
-							ctx.drawImage(tempFilePath, 0, 0, width, height);
-							ctx.draw(false, () => {
-								uni.canvasGetImageData({
-									canvasId: 'myCanvas',
-									x: 0,
-									y: 0,
-									width: width,
-									height: height,
-									success: (res) => {
-										const data = res.data;
-										let r = 0,
-											g = 0,
-											b = 0;
-										for (let i = 0; i < data.length; i +=
-											4) {
-											r += data[i];
-											g += data[i + 1];
-											b += data[i + 2];
-										}
-										const count = width * height;
-										r = Math.floor(r / count);
-										g = Math.floor(g / count);
-										b = Math.floor(b / count);
-										resolve({
-											r,
-											g,
-											b
-										});
-									},
-									fail: (err) => {
-										reject(err);
-									}
-								});
-							});
-						} else {
-							reject(new Error('下载图像失败'));
-						}
-					},
-					fail: (err) => {
-						reject(err);
-					}
-				});
-			});
-		},
-		goToArticleDetail(id) {
-			if (!id) {
-				uni.showToast({
-					title: "文章ID不存在",
-					icon: "none",
-				});
-				return;
-			}
-			// uni.$emit("check_login", () => {
-			uni.navigateTo({
-				url: "/pages/index/articleDetail?id=" + id,
-			});
-			// });
-		},
-		goWork(item) {
-			console.log("skeylogin", "xxx");
-			uni.$emit("check_login", () => {
-				uni.navigateTo({
-					url: "/pages/index/workDetail?id=" + item.id,
-				});
-			});
-		},
-		goToMake() {
-			console.log("skeylogin", "xxx2");
-			uni.$emit("check_login", () => {
-				uni.navigateTo({
-					// 生成个人形象
-					// url: "/pages/make/make",
-					url: "/pages/make/fabuArticle?id=-1",
-				});
-			});
-		},
-		goPage(page) {
-			uni.$emit("check_login", () => {
-				uni.navigateTo({
-					url: page,
-				});
-			});
-		},
-	},
+  components: {
+    sortble,
+    tabbarVue,
+    pageNavbar,
+    wWaterfall,
+    lhSelectCity,
+    card,
+    // noviceGuidance
+  },
+  mixins: [tabbar],
+  data() {
+    return {
+      isFirstLoad: true, // 添加标记,用于判断是否是第一次加载
+      step: {
+        name: "workbenchSet5",
+        guideList: [
+          {
+            el: ".step1",
+            tips: "这里是第一步的介绍~",
+            next: "下一步",
+          },
+          {
+            el: ".step2",
+            tips: "这里是第二步的介绍~",
+            next: "下一步",
+          },
+          {
+            el: ".step3",
+            tips: "这里是第三步的介绍~",
+            next: "下一步",
+          },
+          {
+            el: ".step4",
+            tips: "这里是第四步的介绍~",
+            next: "下一步",
+          },
+          {
+            el: ".step5",
+            tips: "这里是第五步的介绍~",
+            next: "下一步",
+          },
+          {
+            el: ".step6",
+            tips: "这里是第六步的介绍~",
+            next: "下一步",
+          },
+          {
+            el: ".step7",
+            tips: "最后一步啦~",
+            next: "完成",
+          },
+        ],
+      },
+      windowHeight: uni.getWindowInfo().windowHeight,
+      bannerList: [
+        "../../static/dome/home-swper.png",
+        "../../static/dome/home-swper.png",
+        "../../static/dome/home-swper.png",
+      ],
+      cardList: [
+        {
+          img: "/static/img/img-1.png",
+          bgimg: "/static/image/bg-2.png",
+        },
+        {
+          img: "/static/img/img-3.png",
+          bgimg: "/static/image/bg-3.png",
+        },
+        {
+          img: "/static/img/img-2.png",
+          bgimg: "/static/image/bg-1.png",
+        },
+      ],
+      list: [], // 瀑布流全部数据
+      dataList: [],
+      tabs: ["关注", "推荐", "探索"],
+      currentTab: 1,
+      currentTopicPage: 0,
+      followList: [], // 关注列表数据
+      recommendList: [], // 推荐列表数据
+      exploreList: [], // 探索列表数据
+      hotNewsList: [], // 热点新闻数据
+      newsList: [], // 新闻列表数据
+      followOffset: 0, // 关注列表偏移量
+      recommendOffset: 0, // 推荐列表偏移量
+      exploreOffset: 0, // 探索列表偏移量
+      newsOffset: 0, // 新闻列表偏移量
+      hasMoreFollow: true, // 是否有更多关注列表数据
+      hasMoreRecommend: true, // 是否有更多推荐列表数据
+      hasMoreExplore: true, // 是否有更多探索列表数据
+      hasMoreNews: true, // 是否有更多新闻列表数据
+      isLoadingFollow: false, // 是否正在加载关注列表
+      isLoadingRecommend: false, // 是否正在加载推荐列表
+      isLoadingExplore: false, // 是否正在加载探索列表
+      isLoadingNews: false, // 是否正在加载新闻列表
+      hotTopics: [],
+      lhSelectCityFalg: false,
+      hotCitys: [
+        "杭州",
+        "天津",
+        "北京",
+        "上海",
+        "深圳",
+        "广州",
+        "成都",
+        "重庆",
+        "厦门",
+      ],
+      currentCity: "北京",
+      windowHeight: "",
+      weather: {
+        city: "",
+        weather: "",
+        temp: "0℃",
+        icon: 101,
+      },
+      isContentRecommendation: true,
+    };
+  },
+
+  computed: {
+    getDayOfWeek() {
+      const days = [
+        "星期日",
+        "星期一",
+        "星期二",
+        "星期三",
+        "星期四",
+        "星期五",
+        "星期六",
+      ];
+      const today = new Date();
+      const dayOfWeek = days[today.getDay()];
+      return dayOfWeek;
+    },
+    currentList() {
+      switch (this.currentTab) {
+        case 0:
+          return this.followList;
+        case 1:
+          return this.recommendList; // 使用专门的推荐列表
+        case 2:
+          return this.exploreList;
+        default:
+          return [];
+      }
+    },
+    topicPages() {
+      const pages = [];
+      for (let i = 0; i < this.hotTopics.length; i += 4) {
+        pages.push(this.hotTopics.slice(i, i + 4));
+      }
+      return pages;
+    },
+  },
+  onLoad() {
+    let that = this;
+    // 计算出可用高度
+    this.windowHeight = uni.getSystemInfoSync().windowHeight + "px";
+    // 不在onLoad中直接加载数据,避免与z-paging组件重复请求
+    // 让z-paging组件通过queryList方法控制数据加载
+    this.getWeather();
+    // this.queryList();
+  },
+  onShow() {
+    var isContentRecommendation = getStorage("isContentRecommendation");
+    console.log(isContentRecommendation, "isContentRecommendation");
+    if (isContentRecommendation != "false") {
+      isContentRecommendation = true;
+    } else {
+      isContentRecommendation = false;
+    }
+    this.isContentRecommendation = isContentRecommendation;
+
+    if (isContentRecommendation == false) {
+      this.tabs = ["关注"];
+      this.currentTab = 0;
+      this.queryList();
+    } else {
+      this.tabs = ["关注", "推荐", "探索"];
+      this.currentTab = 1;
+    }
+  },
+  // 修改触底加载方法
+  onReachBottom() {
+    console.log('触底加载更多');
+    // 根据当前标签页加载更多数据
+    switch (this.currentTab) {
+      case 0:
+        if (this.hasMoreFollow && !this.isLoadingFollow) {
+          this.loadFollowList();
+        }
+        break;
+      case 1:
+        if (this.hasMoreRecommend && !this.isLoadingRecommend) {
+          this.loadRecommendList();
+        }
+        break;
+      case 2:
+        if (this.hasMoreNews && !this.isLoadingNews) {
+          this.loadNewsList();
+        }
+        break;
+    }
+  },
+
+  // 下拉刷新数据
+  methods: {
+    swipeRight() {
+    let index =this.currentTab
+    index-- 
+    if (index < 0) {
+      index =this.tabs.length-1
+    }
+    this.switchTab(index)
+      console.log('向右滑动')
+    },
+    swipeLeft() {
+    let index =this.currentTab
+    index++
+    if (index>this.tabs.length-1) {
+      index=0
+    }
+    this.switchTab(index)
+      console.log('向左滑动')
+    },
+    getWeather(city) {
+      uni.request({
+        url: this.$apiHost + "/Index/getAreaInfo",
+        data: {
+          uuid: getApp().globalData.uuid,
+          skey: getApp().globalData.skey,
+          city: city || (this.currentCity == "北京" ? "" : this.currentCity),
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log(this.weather, "天气数据", res.data);
+          if (res.data.city) {
+            this.currentCity = res.data.city;
+            this.weather = res.data;
+          }
+        },
+        complete: () => { },
+        fail: (e) => { },
+      });
+    },
+    lhSelectCityFun() {
+      this.lhSelectCityFalg = true;
+    },
+    // 选中事件
+    City(city) {
+      this.currentCity = city;
+      setTimeout(() => {
+        this.lhSelectCityFalg = false;
+      }, 300);
+    },
+    closeLhSelectCityFun() {
+      this.lhSelectCityFalg = false;
+    },
+    queryList() {
+      // 根据当前标签刷新数据
+      switch (this.currentTab) {
+        case 0:
+          // 重置关注列表
+          this.followList = [];
+          this.followOffset = 0;
+          this.hasMoreFollow = true;
+          this.loadFollowList();
+          break;
+        case 1:
+          // 重置推荐列表
+          this.recommendList = [];
+          this.recommendOffset = 0;
+          this.hasMoreRecommend = true;
+          this.loadRecommendList();
+          break;
+        case 2:
+          // 重置热点新闻和新闻列表
+          this.hotNewsList = [];
+          this.newsList = [];
+          this.newsOffset = 0;
+          this.hasMoreNews = true;
+          // 加载热点新闻和新闻列表
+          this.loadHotNews();
+          this.loadNewsList();
+          break;
+      }
+    },
+    queryLists() {
+      // 根据当前标签刷新数据
+      switch (this.currentTab) {
+        case 0:
+          // 重置关注列表
+          // this.followList = [];
+          // this.followOffset = 0;
+          // this.hasMoreFollow = true;
+          this.loadFollowList();
+          break;
+        case 1:
+          // 重置推荐列表
+          // this.recommendList = [];
+          // this.recommendOffset = 0;
+          // this.hasMoreRecommend = true;
+          this.loadRecommendList();
+          break;
+        case 2:
+          // 重置热点新闻和新闻列表
+          // this.hotNewsList = [];
+          // this.newsList = [];
+          // this.newsOffset = 0;
+          // this.hasMoreNews = true;
+          // 加载热点新闻和新闻列表
+          this.loadHotNews();
+          // this.loadNewsList();
+          break;
+      }
+      // 第一次加载完成后,将标记设置为false
+      this.isFirstLoad = false;
+    },
+
+    switchTab(index) {
+      if (this.currentTab === index) return;
+      this.currentTab = index;
+
+      // 重置当前标签页的数据
+      switch (index) {
+        case 0:
+          this.followList = [];
+          this.followOffset = 0;
+          this.hasMoreFollow = true;
+          break;
+        case 1:
+          this.recommendList = [];
+          this.recommendOffset = 0;
+          this.hasMoreRecommend = true;
+          break;
+        case 2:
+          this.newsList = [];
+          this.hotTopics = [];
+          this.newsOffset = 0;
+          this.hasMoreNews = true;
+          break;
+      }
+
+      // 加载新标签页的数据
+      this.loadTabData(index);
+    },
+    loadTabData(index) {
+      switch (index) {
+        case 0:
+          this.loadFollowList();
+          break;
+        case 1:
+          this.loadRecommendList();
+          break;
+        case 2:
+          this.loadHotNews();
+          this.loadNewsList();
+          break;
+      }
+    },
+    // 修改关注列表加载方法
+    loadFollowList() {
+      if (this.isLoadingFollow) return;
+      this.isLoadingFollow = true;
+
+      // 保存当前列表数据
+      const currentList = [...this.followList];
+
+      uni.request({
+        url: this.$apiHost + "/Work/getlist",
+        data: {
+          uuid: getApp().globalData.uuid,
+          skey: getApp().globalData.skey,
+          type: "attention",
+          offset: this.followOffset,
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log("关注列表数据:", res.data);
+          if (res.data.success == "yes" && res.data.list && res.data.list.length > 0) {
+            // 使用 Vue.set 确保响应式更新
+            if (this.followOffset === 0) {
+              this.followList = res.data.list;
+            } else {
+              // 使用 Vue.set 更新数组,避免数据闪烁
+              this.followList = currentList.concat(res.data.list);
+            }
+            this.followOffset += res.data.list.length;
+            this.hasMoreFollow = res.data.list.length >= 20;
+          } else {
+            this.hasMoreFollow = false;
+          }
+
+          // 使用 nextTick 确保数据更新后再通知组件
+          this.$nextTick(() => {
+            if (this.$refs.paging) {
+              this.$refs.paging.complete(this.followList);
+            }
+          });
+        },
+        complete: () => {
+          this.isLoadingFollow = false;
+        },
+        fail: (e) => {
+          console.log("请求关注列表失败:", e);
+          this.isLoadingFollow = false;
+          if (this.$refs.paging) {
+            this.$refs.paging.complete(false);
+          }
+        },
+      });
+    },
+    // 修改推荐列表加载方法
+    loadRecommendList() {
+      if (this.isLoadingRecommend) return;
+      this.isLoadingRecommend = true;
+
+      // 保存当前列表数据
+      const currentList = [...this.recommendList];
+
+      uni.request({
+        url: this.$apiHost + "/Work/getlist",
+        data: {
+          uuid: getApp().globalData.uuid,
+          skey: getApp().globalData.skey,
+          type: "recommend",
+          offset: this.recommendOffset,
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log("推荐列表数据:", res.data);
+          if (res.data.success == "yes" && res.data.list && res.data.list.length > 0) {
+            if (this.recommendOffset === 0) {
+              this.recommendList = res.data.list;
+            } else {
+              this.recommendList = currentList.concat(res.data.list);
+            }
+            this.recommendOffset += res.data.list.length;
+            this.hasMoreRecommend = res.data.list.length >= 20;
+          } else {
+            this.hasMoreRecommend = false;
+          }
+
+          this.$nextTick(() => {
+            if (this.$refs.paging) {
+              this.$refs.paging.complete(this.recommendList);
+            }
+          });
+        },
+        complete: () => {
+          this.isLoadingRecommend = false;
+        },
+        fail: (e) => {
+          console.log("请求推荐列表失败:", e);
+          this.isLoadingRecommend = false;
+          if (this.$refs.paging) {
+            this.$refs.paging.complete(false);
+          }
+        },
+      });
+    },
+    loadHotNews() { 
+      if (this.isLoadingExplore) return;
+      this.isLoadingExplore = true;
+
+      uni.request({
+        url: this.$apiHost + "/Article/getlist",
+        data: {
+          uuid: getApp().globalData.uuid,
+          skey: getApp().globalData.skey,
+          type: "hot",
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log("热点新闻数据:", res.data);
+          if (res.data.success == "yes" && res.data.list && res.data.list.length > 0) {
+            this.hotNewsList = res.data.list;
+            this.hotTopics = this.hotNewsList.map((item, index) => ({
+              id: item.id,
+              title: item.title || "热门话题",
+              num_like: item.num_like || 0,
+              isHot: index % 2 === 0,
+            }));
+          }
+        },
+        complete: () => {
+          this.isLoadingExplore = false;
+        },
+        fail: (e) => {
+          console.log("请求热点新闻失败:", e);
+          this.isLoadingExplore = false;
+        },
+      });
+    },
+    // 修改新闻列表加载方法
+    loadNewsList() { 
+      if (this.isLoadingNews) return;
+      this.isLoadingNews = true;
+
+      // 保存当前列表数据
+      const currentList = [...this.newsList];
+
+      uni.request({
+        url: this.$apiHost + "/Article/getlist",
+        data: {
+          uuid: getApp().globalData.uuid,
+          skey: getApp().globalData.skey,
+          type: "list",
+          offset: this.newsOffset,
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log("新闻列表数据:", res.data);
+          if (res.data.success == "yes" && res.data.list && res.data.list.length > 0) {
+            if (this.newsOffset === 0) {
+              this.newsList = res.data.list;
+            } else {
+              this.newsList = currentList.concat(res.data.list);
+            }
+            this.newsOffset += res.data.list.length;
+            console.log(this.newsOffset, "新闻列表数据");
+            
+            this.hasMoreNews = res.data.list.length >= 20;
+          } else {
+            this.hasMoreNews = false;
+          }
+
+          this.$nextTick(() => {
+            if (this.$refs.paging) {
+              this.$refs.paging.complete(this.newsList);
+            }
+          });
+        },
+        complete: () => {
+          this.isLoadingNews = false;
+        },
+        fail: (e) => {
+          console.log("请求新闻列表失败:", e);
+          this.isLoadingNews = false;
+          if (this.$refs.paging) {
+            this.$refs.paging.complete(false);
+          }
+        },
+      });
+    },
+    handleTopicPageChange(e) {
+      this.currentTopicPage = e.detail.current;
+    },
+
+    formatItem(item) {
+      console.log("item:", item);
+
+
+      let img = "";
+      if (item.images) {
+        img = item.images.split("|")[0];
+      }
+
+      // 处理接口返回的数据,使其适配card组件
+      return {
+        id: item.id,
+        allowEdit: false,
+        nickname: item.nickname,
+        avator: item.avator,
+        num_like: item.num_like,
+        num_view: item.num_view,
+        image: img || item.img_url || item.image, // 优先使用images字段
+        w: item.width,
+        h: item.height,
+        title: item.title || "",
+        desc: item.desc || "",
+        userID: item.userID || 0,
+        backgroundColor: "#f6f6f6",
+      };
+    },
+    downloadAndProcessImage(imageUrl, width = 10, height = 10) {
+      return new Promise((resolve, reject) => {
+        uni.downloadFile({
+          url: imageUrl,
+          success: (downloadResult) => {
+            if (downloadResult.statusCode === 200) {
+              const tempFilePath = downloadResult.tempFilePath;
+              const ctx = uni.createCanvasContext("myCanvas", this);
+              ctx.drawImage(tempFilePath, 0, 0, width, height);
+              ctx.draw(false, () => {
+                uni.canvasGetImageData({
+                  canvasId: "myCanvas",
+                  x: 0,
+                  y: 0,
+                  width: width,
+                  height: height,
+                  success: (res) => {
+                    const data = res.data;
+                    let r = 0,
+                      g = 0,
+                      b = 0;
+                    for (let i = 0; i < data.length; i += 4) {
+                      r += data[i];
+                      g += data[i + 1];
+                      b += data[i + 2];
+                    }
+                    const count = width * height;
+                    r = Math.floor(r / count);
+                    g = Math.floor(g / count);
+                    b = Math.floor(b / count);
+                    resolve({
+                      r,
+                      g,
+                      b,
+                    });
+                  },
+                  fail: (err) => {
+                    reject(err);
+                  },
+                });
+              });
+            } else {
+              reject(new Error("下载图像失败"));
+            }
+          },
+          fail: (err) => {
+            reject(err);
+          },
+        });
+      });
+    },
+    goToArticleDetail(id) {
+      if (!id) {
+        uni.showToast({
+          title: "文章ID不存在",
+          icon: "none",
+        });
+        return;
+      }
+      // uni.$emit("check_login", () => {
+      uni.navigateTo({
+        url: "/pages/index/articleDetail?id=" + id,
+      });
+      // });
+    },
+    goWork(item) {
+      console.log("skeylogin", "xxx");
+      uni.$emit("check_login", () => {
+        uni.navigateTo({
+          url: "/pages/index/workDetail?id=" + item.id,
+        });
+      });
+    },
+    goToMake() {
+      console.log("skeylogin", "xxx2");
+      uni.$emit("check_login", () => {
+        uni.navigateTo({
+          // 生成个人形象
+          // url: "/pages/make/make",
+          url: "/pages/make/fabuArticle?id=-1",
+        });
+      });
+    },
+    goPage(page) {
+      uni.$emit("check_login", () => {
+        uni.navigateTo({
+          url: page,
+        });
+      });
+    },
+    // 修改下拉刷新方法
+    onRefresh() {
+      console.log('下拉刷新开始');
+      // 重置所有数据
+      this.followList = [];
+      this.recommendList = [];
+      this.newsList = [];
+      this.hotTopics = [];
+
+      // 重置偏移量
+      this.followOffset = 0;
+      this.recommendOffset = 0;
+      this.newsOffset = 0;
+
+      // 重置加载状态
+      this.hasMoreFollow = true;
+      this.hasMoreRecommend = true;
+      this.hasMoreNews = true;
+
+      // 根据当前标签页加载数据
+      this.loadTabData(this.currentTab);
+    },
+
+    // 下拉刷新恢复
+    onRefresherRestore() {
+      console.log('下拉刷新恢复');
+    },
+    // 触底加载更多时的回调
+    onLoadingMore() {
+      // 如果不是第一次加载,且没有更多数据时显示提示
+      if (!this.isFirstLoad) {
+        switch (this.currentTab) {
+          case 0:
+            if (this.followList.length === 0) {
+              uni.showToast({
+                title: '暂无更多关注内容',
+                icon: 'none',
+                duration: 2000
+              });
+            }
+            break;
+          case 1:
+            if (this.recommendList.length === 0) {
+              uni.showToast({
+                title: '暂无更多推荐内容',
+                icon: 'none',
+                duration: 2000
+              });
+            }
+            break;
+          case 2:
+            if (this.newsList.length === 0) {
+              uni.showToast({
+                title: '暂无更多新闻内容',
+                icon: 'none',
+                duration: 2000
+              });
+            }
+            break;
+        }
+      }
+    },
+  },
 };
 </script>
 
 <style lang="scss">
 @import "index.scss";
+
+// 添加过渡效果样式
+.fade-enter-active,
+.fade-leave-active {
+  transition: opacity 0.3s;
+}
+
+.fade-enter,
+.fade-leave-to {
+  opacity: 0;
+}
+
+// 确保列表项有最小高度,避免闪烁
+.list-item {
+  min-height: 200rpx;
+  background: #fff;
+  margin-bottom: 20rpx;
+  border-radius: 12rpx;
+  overflow: hidden;
+}
 </style>
 <style>
 @import "@/style/qweather-icons.css";
-</style>
+</style>

+ 401 - 164
pages/index/index.vue

@@ -10,15 +10,15 @@
 		<view class="view5 step6"></view>
 		<view style="display: flex; justify-content: flex-end">
 			<view class="view6 step7"></view>
-		</view> -->
+		</view> --		</view> -->
 		<z-paging :use-custom-refresher="false" ref="paging" v-model="dataList" :auto="false"
 			:style="{ height: windowHeight - 80 + 'px' }" :show-scrollbar="false" :refresher-enabled="true"
-			@refresherrefresh="onRefresh" @refresherrestore="onRefresherRestore" @query="queryList" :fixed="true"
+			@refresherrefresh="onRefresh" @refresherrestore="onRefresherRestore" @query="queryLists" :fixed="true"
 			:safe-area-inset-bottom="true" :loading-more-enabled="true" :loading-more-no-more-text="'没有更多了'"
 			:loading-more-loading-text="'加载中...'" :loading-more-fail-text="'加载失败,点击重试'"
 			:loading-more-default-text="'上拉加载更多'" :loading-more-loading-style="{ color: '#999' }"
 			:loading-more-no-more-style="{ color: '#999' }" :loading-more-fail-style="{ color: '#999' }"
-			:loading-more-default-style="{ color: '#999' }">
+			:loading-more-default-style="{ color: '#999' }" @loadingMore="onZPagingLoadMore">
 			<template #top>
 				<page-navbar>
 					<template #navCenter>
@@ -98,93 +98,105 @@
 						<view class="indicator-triangle"> </view>
 					</view>
 				</view>
+				<swiper class="tab-content-swiper" :current="currentTab" @change="handleTabChange" :duration="300"
+					:style="{ height: swiperHeight + 'px' }">
+					<!-- 关注列表 -->
+					<swiper-item>
+						<view class="follow-list">
+							<block v-if="currentTab === 0 && followList.length > 0">
+								<w-waterfall :data="followList">
+									<template v-slot:content="{ item, width }">
+										<card :item="formatItem(item)" :width="width"
+											:custom-style="{ background: '#fff' }" textColor="#000"
+											@imageLoad="onImageLoaded">
+										</card>
+									</template>
+								</w-waterfall>
+							</block>
+							<view class="no-data"
+								v-else-if="currentTab === 0 && !isLoadingFollow && followList.length === 0">
+								<text>暂无关注数据</text>
+							</view>
+						</view>
+					</swiper-item>
 
-				<!-- 根据当前标签显示不同样式的列表 -->
-				<!-- 关注列表 - 类似my.vue -->
-				<view v-show="currentTab === 0" class="follow-list">
-					<block v-if="followList.length > 0">
-						<w-waterfall :data="followList">
-							<template v-slot:content="{ item, width }">
-								<card :item="formatItem(item)" :width="width" :custom-style="{ background: '#fff' }"
-									textColor="#000">
-								</card>
-							</template>
-						</w-waterfall>
-					</block>
-					<view class="no-data" v-else-if="!isLoadingFollow">
-						<text>暂无关注数据</text>
-					</view>
-				</view>
-
-				<!-- 推荐列表 - 瀑布流样式 -->
-				<template>
-					<w-waterfall v-show="currentTab === 1 && recommendList.length > 0" :data="recommendList">
-						<template v-slot:content="{ item, width }">
-							<card :item="formatItem(item)" :width="width" :custom-style="{ background: '#fff' }"
-								textColor="#000">
-							</card>
-						</template>
-					</w-waterfall>
-					<view class="no-data"
-						v-if=" currentTab === 1 && recommendList.length === 0 &&  !isLoadingRecommend ">
-						<text>暂无推荐数据</text>
-					</view>
-				</template>
-
-				<!-- 探索列表 - 热点新闻已经有现成的热搜资讯组件,只需添加新闻列表 -->
-				<template>
-					<view v-if="currentTab === 2" class="hot-topics">
-						<view class="hot-topics-header">
-							<image class="hot-topics-title" src="@/static/home/hot-topics-title.png" mode=""></image>
+					<!-- 推荐列表 -->
+					<swiper-item>
+						<view class="recommend-list">
+							<w-waterfall v-if="currentTab === 1 && recommendList.length > 0" :data="recommendList">
+								<template v-slot:content="{ item, width }">
+									<card :item="formatItem(item)" :width="width" :custom-style="{ background: '#fff' }"
+										textColor="#000" @imageLoad="onImageLoaded">
+									</card>
+								</template>
+							</w-waterfall>
+							<view class="no-data"
+								v-if="currentTab === 1 && recommendList.length === 0 && !isLoadingRecommend">
+								<text>暂无推荐数据</text>
+							</view>
 						</view>
-						<swiper class="hot-topics-swiper" :current="currentTopicPage" @change="handleTopicPageChange">
-							<swiper-item v-for="(page, pageIndex) in topicPages" :key="pageIndex">
-								<view class="hot-topics-list">
-									<view v-for="(topic, index) in page" :key="index" class="topic-item"
-										@click="goToArticleDetail(topic.id)">
-										<view class="hot-topics-left">
-											<image v-if="pageIndex * 4 + index == 0" src="@/static/icon/icon-first.png"
-												class="topic-index topic-index-img" mode=""></image>
-											<image v-else-if="pageIndex * 4 + index == 1"
-												src="@/static/icon/icon-second.png" class="topic-index topic-index-img"
-												mode=""></image>
-											<image v-else-if="pageIndex * 4 + index == 2"
-												src="@/static/icon/icon-third.png" class="topic-index topic-index-img"
-												mode=""></image>
-											<text v-else class="topic-index">{{
-                        pageIndex * 4 + index + 1
-                      }}</text>
-
-											<view class="topic-content toe">
-												{{ topic.title }}
+					</swiper-item>
+
+					<!-- 探索列表 -->
+					<swiper-item>
+						<view class="explore-list">
+							<view class="hot-topics" v-if="currentTab === 2">
+								<view class="hot-topics-header">
+									<image class="hot-topics-title" src="@/static/home/hot-topics-title.png" mode="">
+									</image>
+								</view>
+								<swiper class="hot-topics-swiper" :current="currentTopicPage"
+									@change="handleTopicPageChange">
+									<swiper-item v-for="(page, pageIndex) in topicPages" :key="pageIndex">
+										<view class="hot-topics-list">
+											<view v-for="(topic, index) in page" :key="index" class="topic-item"
+												@click="goToArticleDetail(topic.id)">
+												<view class="hot-topics-left">
+													<image v-if="pageIndex * 4 + index == 0"
+														src="@/static/icon/icon-first.png"
+														class="topic-index topic-index-img" mode=""></image>
+													<image v-else-if="pageIndex * 4 + index == 1"
+														src="@/static/icon/icon-second.png"
+														class="topic-index topic-index-img" mode=""></image>
+													<image v-else-if="pageIndex * 4 + index == 2"
+														src="@/static/icon/icon-third.png"
+														class="topic-index topic-index-img" mode=""></image>
+													<text v-else class="topic-index">{{
+                            pageIndex * 4 + index + 1
+                          }}</text>
+													<view class="topic-content toe">
+														{{ topic.title }}
+													</view>
+													<image v-if="topic.isHot" src="@/static/icon/icon-hot.png"
+														class="hot-tag" mode=""></image>
+												</view>
+												<text class="topic-participants">{{ topic.num_like }}人正在热议</text>
 											</view>
-											<image v-if="topic.isHot" src="@/static/icon/icon-hot.png" class="hot-tag"
-												mode=""></image>
 										</view>
-										<text class="topic-participants">{{ topic.num_like }}人正在热议</text>
+									</swiper-item>
+								</swiper>
+								<view class="indicator-dots">
+									<view v-for="i in 2" :key="i"
+										:class="['dot', currentTopicPage === i - 1 ? 'active' : '']">
 									</view>
 								</view>
-							</swiper-item>
-						</swiper>
-						<view class="indicator-dots">
-							<view v-for="i in 2" :key="i" :class="['dot', currentTopicPage === i - 1 ? 'active' : '']">
+							</view>
+							<view class="news-list">
+								<w-waterfall v-if="currentTab === 2 && newsList.length > 0" :data="newsList">
+									<template v-slot:content="{ item, width }">
+										<card :item="formatItem(item)" :width="width"
+											goLink="/pages/index/articleDetail?id="
+											:custom-style="{ background: '#fff' }" textColor="#000"
+											@imageLoad="onImageLoaded"></card>
+									</template>
+								</w-waterfall>
+							</view>
+							<view class="no-data" v-if="currentTab === 2 && newsList.length === 0 && !isLoadingNews">
+								<text>暂无新闻数据</text>
 							</view>
 						</view>
-					</view>
-					<view v-show="currentTab === 2 && newsList.length > 0" class="news-list">
-						<w-waterfall v-show="currentTab === 2 && newsList.length > 0" :data="newsList">
-							<template v-slot:content="{ item, width }">
-								<card :item="formatItem(item)" :width="width" goLink="/pages/index/articleDetail?id="
-									:custom-style="{ background: '#fff' }" textColor="#000"></card>
-							</template>
-						</w-waterfall>
-					</view>
-
-					<view class="no-data" v-if="currentTab === 2 && newsList.length === 0 && !isLoadingNews">
-						<text>暂无新闻数据</text>
-					</view>
-				</template>
-
+					</swiper-item>
+				</swiper>
 			</z-paging-cell>
 			<view class="blankHeight"></view>
 		</z-paging>
@@ -199,9 +211,6 @@
 		<lhSelectCity style="height: 100vh" class="lhSelectCity" :currentCity="currentCity" :windowHeight="windowHeight"
 			:hotCitys="hotCitys" @onSelect="City" v-if="lhSelectCityFalg"
 			@closeLhSelectCityFun="closeLhSelectCityFun()" />
-
-
-		<wu-app-update></wu-app-update>
 	</view>
 </template>
 
@@ -232,6 +241,9 @@
 		mixins: [tabbar],
 		data() {
 			return {
+				isFirstLoad: true, // 添加标记,用于判断是否是第一次加载
+				swiperHeight: 300, // 默认swiper高度
+				noMoreDataTimer: null, // 用于防抖处理的定时器
 				step: {
 					name: "workbenchSet5",
 					guideList: [{
@@ -334,6 +346,7 @@
 					icon: 101,
 				},
 				isContentRecommendation: true,
+				updateHeightTimer: null,
 			};
 		},
 
@@ -376,10 +389,18 @@
 			let that = this;
 			// 计算出可用高度
 			this.windowHeight = uni.getSystemInfoSync().windowHeight + "px";
-			// 不在onLoad中直接加载数据,避免与z-paging组件重复请求
-			// 让z-paging组件通过queryList方法控制数据加载
+			// 计算swiper默认高度
+			const systemInfo = uni.getSystemInfoSync();
+			this.swiperHeight = systemInfo.windowHeight * 0.6; // 初始设置为窗口高度的60%
+
+			// 获取天气信息
 			this.getWeather();
-			this.queryList();
+
+			// 初始化数据,确保首次加载正确
+			this.$nextTick(() => {
+				// 根据当前标签加载数据
+				this.initialLoad();
+			});
 		},
 		onShow() {
 			var isContentRecommendation = getStorage("isContentRecommendation");
@@ -398,8 +419,11 @@
 			} else {
 				this.tabs = ["关注", "推荐", "探索"];
 				this.currentTab = 1;
+				// 如果数据为空,加载初始数据
+				if (this.recommendList.length === 0) {
+					this.initialLoad();
+				}
 			}
-
 			uni.$emit('check_update');
 		},
 		// 修改触底加载方法
@@ -427,6 +451,24 @@
 
 		// 下拉刷新数据
 		methods: {
+			swipeRight() {
+				let index = this.currentTab
+				index--
+				if (index < 0) {
+					index = this.tabs.length - 1
+				}
+				this.switchTab(index)
+				console.log('向右滑动')
+			},
+			swipeLeft() {
+				let index = this.currentTab
+				index++
+				if (index > this.tabs.length - 1) {
+					index = 0
+				}
+				this.switchTab(index)
+				console.log('向左滑动')
+			},
 			getWeather(city) {
 				uni.request({
 					url: this.$apiHost + "/Index/getAreaInfo",
@@ -492,6 +534,27 @@
 						break;
 				}
 			},
+			queryLists() {
+				// 根据当前标签刷新数据
+				switch (this.currentTab) {
+					case 0:
+						// 重置关注列表
+						this.loadFollowList();
+						break;
+					case 1:
+						// 重置推荐列表
+						this.loadRecommendList();
+						break;
+					case 2:
+						// 重置热点新闻和新闻列表
+						// 加载热点新闻和新闻列表
+						this.loadHotNews();
+						this.loadNewsList();
+						break;
+				}
+				// 第一次加载完成后,将标记设置为false
+				this.isFirstLoad = false;
+			},
 
 			switchTab(index) {
 				if (this.currentTab === index) return;
@@ -519,6 +582,12 @@
 
 				// 加载新标签页的数据
 				this.loadTabData(index);
+
+				// 切换标签后更新swiper高度
+				// 在切换标签时,先将高度设置为一个合适的默认值
+				// 然后在数据加载完成后再动态调整
+				const systemInfo = uni.getSystemInfoSync();
+				this.swiperHeight = systemInfo.windowHeight * 0.6;
 			},
 			loadTabData(index) {
 				switch (index) {
@@ -542,6 +611,10 @@
 				// 保存当前列表数据
 				const currentList = [...this.followList];
 
+				// offset设置为当前列表长度
+				this.followOffset = currentList.length;
+				console.log('请求关注列表数据,当前offset =', this.followOffset);
+
 				uni.request({
 					url: this.$apiHost + "/Work/getlist",
 					data: {
@@ -557,24 +630,31 @@
 					success: (res) => {
 						console.log("关注列表数据:", res.data);
 						if (res.data.success == "yes" && res.data.list && res.data.list.length > 0) {
-							// 使用 Vue.set 确保响应式更新
-							if (this.followOffset === 0) {
-								this.followList = res.data.list;
-							} else {
-								// 使用 Vue.set 更新数组,避免数据闪烁
-								this.followList = currentList.concat(res.data.list);
-							}
-							this.followOffset += res.data.list.length;
+							// 追加新数据到列表
+							this.followList = [...currentList, ...res.data.list];
+							console.log('关注列表加载成功,当前列表长度:', this.followList.length);
 							this.hasMoreFollow = res.data.list.length >= 20;
 						} else {
 							this.hasMoreFollow = false;
+							this.showNoMoreDataToast("没有更多关注内容了");
 						}
 
 						// 使用 nextTick 确保数据更新后再通知组件
 						this.$nextTick(() => {
 							if (this.$refs.paging) {
+								// 第一个参数需要是数组,将当前列表传入
 								this.$refs.paging.complete(this.followList);
 							}
+							// 数据加载完成后更新swiper高度
+							if (this.currentTab === 0) {
+								// 使用setTimeout确保数据渲染完成后再更新高度
+								setTimeout(() => {
+									this.updateSwiperHeight();
+								}, 300);
+								setTimeout(() => {
+									this.updateSwiperHeight();
+								}, 650);
+							}
 						});
 					},
 					complete: () => {
@@ -584,7 +664,8 @@
 						console.log("请求关注列表失败:", e);
 						this.isLoadingFollow = false;
 						if (this.$refs.paging) {
-							this.$refs.paging.complete(false);
+							// 加载失败时提供空数组
+							this.$refs.paging.complete([]);
 						}
 					},
 				});
@@ -597,6 +678,10 @@
 				// 保存当前列表数据
 				const currentList = [...this.recommendList];
 
+				// offset设置为当前列表长度
+				this.recommendOffset = currentList.length;
+				console.log('请求推荐列表数据,当前offset =', this.recommendOffset);
+
 				uni.request({
 					url: this.$apiHost + "/Work/getlist",
 					data: {
@@ -612,21 +697,29 @@
 					success: (res) => {
 						console.log("推荐列表数据:", res.data);
 						if (res.data.success == "yes" && res.data.list && res.data.list.length > 0) {
-							if (this.recommendOffset === 0) {
-								this.recommendList = res.data.list;
-							} else {
-								this.recommendList = currentList.concat(res.data.list);
-							}
-							this.recommendOffset += res.data.list.length;
+							// 追加新数据到列表
+							this.recommendList = [...currentList, ...res.data.list];
+							console.log('推荐列表加载成功,当前列表长度:', this.recommendList.length);
 							this.hasMoreRecommend = res.data.list.length >= 20;
 						} else {
 							this.hasMoreRecommend = false;
+							this.showNoMoreDataToast("没有更多推荐内容了");
 						}
 
 						this.$nextTick(() => {
 							if (this.$refs.paging) {
+								// 第一个参数需要是数组,将当前列表传入
 								this.$refs.paging.complete(this.recommendList);
 							}
+							// 数据加载完成后更新swiper高度
+							if (this.currentTab === 1) {
+								setTimeout(() => {
+									this.updateSwiperHeight();
+								}, 300);
+								setTimeout(() => {
+									this.updateSwiperHeight();
+								}, 650);
+							}
 						});
 					},
 					complete: () => {
@@ -636,7 +729,8 @@
 						console.log("请求推荐列表失败:", e);
 						this.isLoadingRecommend = false;
 						if (this.$refs.paging) {
-							this.$refs.paging.complete(false);
+							// 加载失败时提供空数组
+							this.$refs.paging.complete([]);
 						}
 					},
 				});
@@ -685,6 +779,10 @@
 				// 保存当前列表数据
 				const currentList = [...this.newsList];
 
+				// offset设置为当前列表长度
+				this.newsOffset = currentList.length;
+				console.log('请求新闻列表数据,当前offset =', this.newsOffset);
+
 				uni.request({
 					url: this.$apiHost + "/Article/getlist",
 					data: {
@@ -700,21 +798,30 @@
 					success: (res) => {
 						console.log("新闻列表数据:", res.data);
 						if (res.data.success == "yes" && res.data.list && res.data.list.length > 0) {
-							if (this.newsOffset === 0) {
-								this.newsList = res.data.list;
-							} else {
-								this.newsList = currentList.concat(res.data.list);
-							}
-							this.newsOffset += res.data.list.length;
+							// 追加新数据到列表
+							this.newsList = [...currentList, ...res.data.list];
+							console.log('新闻列表加载成功,当前列表长度:', this.newsList.length);
+
 							this.hasMoreNews = res.data.list.length >= 20;
 						} else {
 							this.hasMoreNews = false;
+							this.showNoMoreDataToast("没有更多新闻内容了");
 						}
 
 						this.$nextTick(() => {
 							if (this.$refs.paging) {
+								// 第一个参数需要是数组,将当前列表传入
 								this.$refs.paging.complete(this.newsList);
 							}
+							// 数据加载完成后更新swiper高度
+							if (this.currentTab === 2) {
+								setTimeout(() => {
+									this.updateSwiperHeight();
+								}, 300);
+								setTimeout(() => {
+									this.updateSwiperHeight();
+								}, 650);
+							}
 						});
 					},
 					complete: () => {
@@ -724,7 +831,8 @@
 						console.log("请求新闻列表失败:", e);
 						this.isLoadingNews = false;
 						if (this.$refs.paging) {
-							this.$refs.paging.complete(false);
+							// 加载失败时提供空数组
+							this.$refs.paging.complete([]);
 						}
 					},
 				});
@@ -759,58 +867,7 @@
 					backgroundColor: "#f6f6f6",
 				};
 			},
-			downloadAndProcessImage(imageUrl, width = 10, height = 10) {
-				return new Promise((resolve, reject) => {
-					uni.downloadFile({
-						url: imageUrl,
-						success: (downloadResult) => {
-							if (downloadResult.statusCode === 200) {
-								const tempFilePath = downloadResult.tempFilePath;
-								const ctx = uni.createCanvasContext("myCanvas", this);
-								ctx.drawImage(tempFilePath, 0, 0, width, height);
-								ctx.draw(false, () => {
-									uni.canvasGetImageData({
-										canvasId: "myCanvas",
-										x: 0,
-										y: 0,
-										width: width,
-										height: height,
-										success: (res) => {
-											const data = res.data;
-											let r = 0,
-												g = 0,
-												b = 0;
-											for (let i = 0; i < data.length; i +=
-												4) {
-												r += data[i];
-												g += data[i + 1];
-												b += data[i + 2];
-											}
-											const count = width * height;
-											r = Math.floor(r / count);
-											g = Math.floor(g / count);
-											b = Math.floor(b / count);
-											resolve({
-												r,
-												g,
-												b,
-											});
-										},
-										fail: (err) => {
-											reject(err);
-										},
-									});
-								});
-							} else {
-								reject(new Error("下载图像失败"));
-							}
-						},
-						fail: (err) => {
-							reject(err);
-						},
-					});
-				});
-			},
+
 			goToArticleDetail(id) {
 				if (!id) {
 					uni.showToast({
@@ -877,6 +934,168 @@
 			onRefresherRestore() {
 				console.log('下拉刷新恢复');
 			},
+			// 处理z-paging的触底加载更多事件
+			onZPagingLoadMore(pageNo, pageSize) {
+				console.log('触底加载更多, 页码:', pageNo, '页大小:', pageSize);
+				// 根据当前标签页加载更多数据
+				switch (this.currentTab) {
+					case 0:
+						if (this.hasMoreFollow && !this.isLoadingFollow) {
+							this.loadFollowList();
+						} else if (!this.hasMoreFollow && !this.isLoadingFollow && this.followList.length > 0) {
+							this.showNoMoreDataToast("没有更多关注内容了");
+							// 通知组件加载完毕且没有更多数据
+							this.$nextTick(() => {
+								if (this.$refs.paging) {
+									this.$refs.paging.complete(this.followList);
+								}
+							});
+						} else if (this.followList.length === 0 && !this.isLoadingFollow) {
+							this.showNoMoreDataToast("暂无关注内容");
+							// 通知组件加载完毕且没有数据
+							this.$nextTick(() => {
+								if (this.$refs.paging) {
+									this.$refs.paging.complete([]);
+								}
+							});
+						}
+						break;
+					case 1:
+						if (this.hasMoreRecommend && !this.isLoadingRecommend) {
+							this.loadRecommendList();
+						} else if (!this.hasMoreRecommend && !this.isLoadingRecommend && this.recommendList.length > 0) {
+							this.showNoMoreDataToast("没有更多推荐内容了");
+							// 通知组件加载完毕且没有更多数据
+							this.$nextTick(() => {
+								if (this.$refs.paging) {
+									this.$refs.paging.complete(this.recommendList);
+								}
+							});
+						} else if (this.recommendList.length === 0 && !this.isLoadingRecommend) {
+							this.showNoMoreDataToast("暂无推荐内容");
+							// 通知组件加载完毕且没有数据
+							this.$nextTick(() => {
+								if (this.$refs.paging) {
+									this.$refs.paging.complete([]);
+								}
+							});
+						}
+						break;
+					case 2:
+						if (this.hasMoreNews && !this.isLoadingNews) {
+							this.loadNewsList();
+						} else if (!this.hasMoreNews && !this.isLoadingNews && this.newsList.length > 0) {
+							this.showNoMoreDataToast("没有更多新闻内容了");
+							// 通知组件加载完毕且没有更多数据
+							this.$nextTick(() => {
+								if (this.$refs.paging) {
+									this.$refs.paging.complete(this.newsList);
+								}
+							});
+						} else if (this.newsList.length === 0 && !this.isLoadingNews) {
+							this.showNoMoreDataToast("暂无新闻内容");
+							// 通知组件加载完毕且没有数据
+							this.$nextTick(() => {
+								if (this.$refs.paging) {
+									this.$refs.paging.complete([]);
+								}
+							});
+						}
+						break;
+				}
+			},
+			// 处理swiper的change事件
+			handleTabChange(e) {
+				const current = e.detail.current;
+				this.switchTab(current);
+				// 在tab切换后,延迟更新swiper高度
+				// 切换标签页后,需要给一些时间让内容渲染,然后再更新高度
+				setTimeout(() => {
+					this.updateSwiperHeight();
+				}, 300);
+			},
+			// 更新swiper高度方法
+			updateSwiperHeight() {
+				const query = uni.createSelectorQuery().in(this);
+
+				// 根据当前选中的标签页查询内容高度
+				let selector = '.follow-list';
+				if (this.currentTab === 1) {
+					selector = '.recommend-list';
+				} else if (this.currentTab === 2) {
+					selector = '.explore-list';
+				}
+
+				query.select(selector).boundingClientRect(data => {
+					if (data) {
+						// 设置最小高度,防止内容过少时swiper太小
+						let minHeight = uni.getSystemInfoSync().windowHeight * 0.2; // 最小高度为窗口高度的40%
+						this.swiperHeight = Math.max(data.height, minHeight);
+						console.log('更新swiper高度:', this.swiperHeight, 'selector:', selector);
+					}
+				}).exec();
+			},
+			// 首次进入页面初始化数据
+			initialLoad() {
+				console.log('初始化数据加载...');
+				// 根据当前标签页加载初始数据
+				switch (this.currentTab) {
+					case 0:
+						// 重置关注列表
+						this.followList = [];
+						this.followOffset = 0;
+						this.hasMoreFollow = true;
+						this.loadFollowList();
+						break;
+					case 1:
+						// 重置推荐列表
+						this.recommendList = [];
+						this.recommendOffset = 0;
+						this.hasMoreRecommend = true;
+						this.loadRecommendList();
+						break;
+					case 2:
+						// 重置热点新闻和新闻列表
+						this.hotNewsList = [];
+						this.newsList = [];
+						this.newsOffset = 0;
+						this.hasMoreNews = true;
+						// 加载热点新闻和新闻列表
+						this.loadHotNews();
+						this.loadNewsList();
+						break;
+				}
+			},
+			// 显示没有更多数据的提示,带防抖处理
+			showNoMoreDataToast(message) {
+				return
+				// 如果已经有一个定时器在运行,先清除它
+				if (this.noMoreDataTimer) {
+					clearTimeout(this.noMoreDataTimer);
+					this.noMoreDataTimer = null;
+				}
+
+				// 设置新的定时器,防抖处理,1秒内不会重复显示提示
+				this.noMoreDataTimer = setTimeout(() => {
+					console.log(message);
+					uni.showToast({
+						title: message,
+						icon: 'none',
+						duration: 2000
+					});
+					this.noMoreDataTimer = null;
+				}, 1000);
+			},
+			onImageLoaded() {
+				// 图片加载完成后重新计算高度
+				// 使用延迟执行,确保所有图片都有时间加载完成
+				if (this.updateHeightTimer) {
+					clearTimeout(this.updateHeightTimer);
+				}
+				this.updateHeightTimer = setTimeout(() => {
+					this.updateSwiperHeight();
+				}, 300);
+			},
 		},
 	};
 </script>
@@ -903,6 +1122,24 @@
 		border-radius: 12rpx;
 		overflow: hidden;
 	}
+
+	// swiper样式
+	.tab-content-swiper {
+		width: 100%;
+		transition: height 0.3s;
+	}
+
+	/* 确保内容可以正常显示 */
+	.swiper-item {
+		height: auto;
+		overflow: visible;
+	}
+
+	.follow-list,
+	.recommend-list,
+	.explore-list {
+		min-height: 300px;
+	}
 </style>
 <style>
 	@import "@/style/qweather-icons.css";

+ 2 - 2
pages/makedetail/makeImgDetail.scss

@@ -242,10 +242,10 @@
     gap: 10rpx;
 
     .tag {
-      padding: 10rpx 25rpx 8rpx 25rpx;
+      padding: 18rpx 35rpx 16rpx 35rpx;
       background: #f5f7fa;
       border-radius: 12rpx;
-      font-size: 24rpx;
+      font-size: 28rpx;
       color: #666;
       transition: all 0.3s;
       border: 1rpx solid transparent;

+ 47 - 44
pages/makedetail/makeImgDetail.vue

@@ -9,15 +9,15 @@
 				<image src="@/static/makedetail/cz_icon_lingganchuangzuo.png" class="edit"></image>
 			</view>
 			<view class="right">
-				<view class="coinM"  @click="goPage('/pages/vip/M_purchase')">
+				<view class="coinM" @click="goPage('/pages/vip/M_purchase')">
 					<image src="/static/icon/coin_m.png" mode="aspectFit"></image>
-					<text>{{ myinfo.num_gmm | formatNumberToK}}</text>
-					 <view class="money-add">+</view>
+					<text>{{ myinfo.num_gmm | formatNumberToK }}</text>
+					<view class="money-add">+</view>
 				</view>
 				<view class="coinC" @click="goPage('/pages/my/job?type=recharge')">
 					<image src="/static/icon/coin_cd.png" mode="aspectFit"></image>
-					<text>{{ myinfo.num_gmd | formatNumberToK}}</text>
-					 <view class="money-add">+</view>
+					<text>{{ myinfo.num_gmd | formatNumberToK }}</text>
+					<view class="money-add">+</view>
 				</view>
 			</view>
 		</view>
@@ -180,42 +180,42 @@ export default {
 			step: {
 				name: "makeImgGuide",
 				guideList: [
-				{
-					el: ".right",
-					tips: "积分可在这里查看,每日签到可获得积分!",
-					next: "知道了",
-					// style: "width: 120px; left: 490rpx;"
-				},
-				{
-					el: ".input-area",
-					tips: "输入关键词,描述我想要的画面!",
-					next: "知道了",
-				},
-				{
-					el: ".action-section",
-					tips: "选择或输入主体的行为动作!",
-					next: "知道了",
-				},
-				{
-					el: ".environment-section",
-					tips: "选择或输入主体所处的环境场景",
-					next: "知道了",
-				},
-				{
-					el: ".image-section",
-					tips: "选择或输入主体形象特征",
-					next: "知道了",
-				},
-				{
-					el: ".style-scroll",
-					tips: "选择您喜欢的参考风格",
-					next: "知道了",
-				},
-				{
-					el: ".generate-btn",
-					tips: "点击这里开始生成您的图片作品",
-					next: "完成",
-				}]
+					{
+						el: ".right",
+						tips: "积分可在这里查看,每日签到可获得积分!",
+						next: "知道了",
+						// style: "width: 120px; left: 490rpx;"
+					},
+					{
+						el: ".input-area",
+						tips: "输入关键词,描述我想要的画面!",
+						next: "知道了",
+					},
+					{
+						el: ".action-section",
+						tips: "选择或输入主体的行为动作!",
+						next: "知道了",
+					},
+					{
+						el: ".environment-section",
+						tips: "选择或输入主体所处的环境场景",
+						next: "知道了",
+					},
+					{
+						el: ".image-section",
+						tips: "选择或输入主体形象特征",
+						next: "知道了",
+					},
+					{
+						el: ".style-scroll",
+						tips: "选择您喜欢的参考风格",
+						next: "知道了",
+					},
+					{
+						el: ".generate-btn",
+						tips: "点击这里开始生成您的图片作品",
+						next: "完成",
+					}]
 			}
 		}
 	},
@@ -313,7 +313,7 @@ export default {
 		selectStyle(index) {
 			this.selectedStyle = index
 		},
-		 
+
 		generateImage() {
 			if (!this.description) {
 				uni.showToast({
@@ -361,8 +361,11 @@ export default {
 						// TODO: 处理生成成功后的逻辑
 						setTimeout(function () {
 							// that.checkQueueStatus()
-							uni.navigateBack()
-						}, 500);
+							// uni.navigateBack()
+							// 使用全局变量存储状态
+							getApp().globalData.needSwitchToGenerating = true;
+							uni.switchTab({ url: '/pages/my/my' });
+						}, 1500);
 					}
 				},
 				fail: (err) => {

+ 5 - 5
pages/makedetail/makeMusicDetail.scss

@@ -375,9 +375,9 @@
         padding: 20rpx 20rpx;
         box-sizing: border-box;
         background: #ffffff;
-
+        padding-bottom: 30rpx;
         text {
-          padding: 10rpx 38rpx;
+          padding: 12rpx 38rpx;
           color: #1f1f1f;
           font-size: 28rpx;
           background: #f2f6f2;
@@ -412,13 +412,13 @@
       .tags {
         display: flex;
         flex-wrap: wrap;
-        gap: 10rpx;
+        gap: 15rpx;
 
         .tag {
-          padding: 10rpx 25rpx 8rpx 25rpx;
+          padding: 18rpx 35rpx 16rpx 35rpx;
           background: #f5f7fa;
           border-radius: 12rpx;
-          font-size: 24rpx;
+          font-size: 28rpx;
           color: #666;
           transition: all 0.3s;
           border: 1rpx solid transparent;

+ 49 - 45
pages/makedetail/makeMusicDetail.vue

@@ -8,15 +8,15 @@
 				<image src="@/static/makedetail/cz_icon_lingganchuangzuo.png" class="edit"></image>
 			</view>
 			<view class="right">
-				<view class="coinM"  @click="goPage('/pages/vip/M_purchase')">
+				<view class="coinM" @click="goPage('/pages/vip/M_purchase')">
 					<image src="/static/icon/coin_m.png" mode="aspectFit"></image>
-					<text>{{ myinfo.num_gmm | formatNumberToK}}</text>
-					 <view class="money-add">+</view>
+					<text>{{ myinfo.num_gmm | formatNumberToK }}</text>
+					<view class="money-add">+</view>
 				</view>
-				<view class="coinC"  @click="goPage('/pages/my/job?type=recharge')">
+				<view class="coinC" @click="goPage('/pages/my/job?type=recharge')">
 					<image src="/static/icon/coin_cd.png" mode="aspectFit"></image>
-					<text>{{ myinfo.num_gmd | formatNumberToK}}</text>
-					 <view class="money-add">+</view>
+					<text>{{ myinfo.num_gmd | formatNumberToK }}</text>
+					<view class="money-add">+</view>
 				</view>
 			</view>
 		</view>
@@ -155,36 +155,36 @@ export default {
 			step: {
 				name: "makeMusicGuide",
 				guideList: [
-				{
-					el: ".right",
-					tips: "积分可在这里查看,每日签到可获得积分!",
-					next: "知道了", 
-				},	
-				{
-					el: ".input-field",
-					tips: "在这里输入您想要创作的歌曲名称",
-					next: "知道了",
-				},
-				{
-					el: ".textarea-field",
-					tips: "在这里输入歌词内容,AI将根据歌词生成音乐",
-					next: "知道了",
-				},
-				{
-					el: ".tabs",
-					tips: "选择音乐风格,包括情感、流派、年代和乐器",
-					next: "知道了",
-				},
-				{
-					el: ".tags",
-					tips: "点击选择具体的风格标签,可以多选",
-					next: "知道了",
-				},
-				{
-					el: ".generate-btn",
-					tips: "点击这里开始生成您的音乐作品",
-					next: "完成",
-				}]
+					{
+						el: ".right",
+						tips: "积分可在这里查看,每日签到可获得积分!",
+						next: "知道了",
+					},
+					{
+						el: ".input-field",
+						tips: "在这里输入您想要创作的歌曲名称",
+						next: "知道了",
+					},
+					{
+						el: ".textarea-field",
+						tips: "在这里输入歌词内容,AI将根据歌词生成音乐",
+						next: "知道了",
+					},
+					{
+						el: ".tabs",
+						tips: "选择音乐风格,包括情感、流派、年代和乐器",
+						next: "知道了",
+					},
+					{
+						el: ".tags",
+						tips: "点击选择具体的风格标签,可以多选",
+						next: "知道了",
+					},
+					{
+						el: ".generate-btn",
+						tips: "点击这里开始生成您的音乐作品",
+						next: "完成",
+					}]
 			}
 		}
 	},
@@ -193,7 +193,8 @@ export default {
 		this.getMyInfo();
 		if (e.id) {
 			this.getQueueDetail(e.id)
-		}
+		} 
+						
 	},
 	computed: {
 		currentTags() {
@@ -308,8 +309,11 @@ export default {
 						setTimeout(function () {
 							// that.checkQueueStatus()
 							//返回上一页
-							uni.navigateBack()
-						}, 500);
+							// uni.navigateBack()
+							// 使用全局变量存储状态
+							getApp().globalData.needSwitchToGenerating = true;
+							uni.switchTab({ url: '/pages/my/my' });
+						}, 1500);
 					}
 				},
 				fail: (err) => {
@@ -341,7 +345,7 @@ export default {
 				this.selectedTab = tab;
 				// 不再清空已选择的标签
 			}
-		}, 
+		},
 		state() {
 			if (this.inQueue) {
 				uni.showToast({
@@ -355,7 +359,7 @@ export default {
 				})
 			}
 		},
-		
+
 		toggleTag(tag) {
 			if (this.selectedTags[this.selectedTab].includes(tag)) {
 				this.selectedTags[this.selectedTab] = this.selectedTags[this.selectedTab].filter(t => t !== tag);
@@ -382,10 +386,10 @@ export default {
 				success: (res) => {
 					console.log("查询单个结果:", res.data);
 					if (res.data.success == "yes") {
-						var { queuePosition, allPosition, song_name,lyrics,style} = res.data.data
-						that.songName=song_name
-						that.lyrics =lyrics
- 
+						var { queuePosition, allPosition, song_name, lyrics, style } = res.data.data
+						that.songName = song_name
+						that.lyrics = lyrics
+
 						const styles = style.split(',');
 						styles.forEach(tag => {
 							for (const [key, tags] of Object.entries(that.tagOptions)) {

+ 6 - 5
pages/message/mailMessage.scss

@@ -1,7 +1,8 @@
-page {
+.page {
   padding-bottom: calc(var(--window-bottom) + 120rpx);
   box-sizing: border-box;
   min-height: 100vh;
+  background: #f2f6f2;
 }
 
 .topbg {
@@ -16,7 +17,7 @@ page {
   display: flex;
   flex-direction: column;
   border-bottom: solid 2rpx #eeeeee;
-  background: #fff;
+  // background: #fff;
   padding-top: calc(var(--status-bar-height) + 40rpx);
   padding-bottom: 10rpx;
   position: fixed;
@@ -69,7 +70,7 @@ page {
   display: flex;
   flex-direction: column;
   align-items: center;
-  background-color: #fff;
+  // background-color: #fff;
   padding: 0 32rpx;
   box-sizing: border-box;
   .item {
@@ -161,14 +162,14 @@ page {
   flex-direction: column;
   align-items: center;
   padding: 0 28rpx;
-
+  background: #f2f6f2;
   .item {
     margin-top: 20rpx;
     display: flex;
     flex-direction: column;
     align-items: center;
     width: 690rpx;
-    background: #f0f0f0;
+    background: #f2f6f2;
     border-radius: 28rpx;
     padding-bottom: 30rpx;
 

+ 6 - 3
pages/message/mailMessage.vue

@@ -86,9 +86,9 @@
 			<template v-else-if="!isLoading">
 				<view class="noData">
 					<image src="@/static/icon/xx_img_zanwuxiaoxi.png"></image>
-					<text class="tips-title"> 暂无内容</text>
+					<text class="tips-title"> 暂无消息</text>
 					<text class="tips-content">
-						点赞还在赶来的路上,别着急,你的精彩值得被看见</text>
+						消息还在 “放假”,等它们元气满满回来</text>
 				</view>
 			</template>
 		</view>
@@ -111,7 +111,7 @@ export default {
 	mixins: [tabbar],
 	data() {
 		return {
-			tab: 2,
+			tab: 1,
 			scrollTop: 0,
 			old: {
 				scrollTop: 0,
@@ -216,6 +216,9 @@ export default {
 			} else {
 				this.bgColor = "#ffffff";
 				this.list = [];
+				if (!this.isLoading) {
+					this.bgColor = "#f2f6f2";
+				}
 			}
 
 			this.loadData();

+ 94 - 57
pages/my/editInfo.vue

@@ -9,7 +9,7 @@
 		<!-- <view  style="height: 90rpx;"></view> -->
 		<view class="list_info">
 			<view class="bcenter">
-				<view class="avator" @click="upload">
+				<view class="avator" @click="chooseAvatar">
 					<!-- <image class="img" :src="avator" mode="aspectFill" /> -->
 					<CircleAvatar class="avator" :src="avator" style="width: 200rpx; height: 200rpx;"></CircleAvatar>
 					<image class="photo" src="../../static/me/photo.png" mode="widthFix" />
@@ -130,13 +130,13 @@
 
 		<ToastW3 ref="ToastW3"></ToastW3>
 
-		<view v-if="showRights"
+		<!-- <view v-if="showRights"
 			style="width:100%;height:300rpx;background-color: rgba(255,255,255,0.9);position: fixed;top:0;display: flex;flex-direction: column;justify-content: center;align-items: center;">
 			<text
 				style="width:90%;color:#000000;font-size:38rpx;text-align: left;padding:10rpx 20rpx;padding-top:10rpx;">正在获取相机、存储权限</text>
 			<text
 				style="width:90%;color:#666666;font-size:28rpx;text-align: left;padding:10rpx 20rpx;">该权限用于获取设备拍摄或获取本地应用相册,进行头像或图片上传。</text>
-		</view>
+		</view> -->
 		<view>
 			<NicknamePopup title="编辑昵称" subtitle="" class="openNicknamePopUpWindow" ref="openNicknamePopUpWindow">
 				<template slot="content">
@@ -169,6 +169,7 @@
 	import PageHeader from '@/components/PageHeader/PageHeader.vue';
 	import CircleAvatar from '@/components/CircleAvatar/CircleAvatar.vue';
 	import NicknamePopup from '@/components/NicknamePopup/NicknamePopup.vue';
+	import permission from '@/common/permission.js';
 	export default {
 		components: {
 			PageHeader,
@@ -313,6 +314,7 @@
 						this.sex = res.data.sex;
 						this.sexText = this.sexOptions[res.data.sex - 1] || '';
 						this.birthday = res.data.birthday;
+						this.content = res.data.content;
 						this.xinzuo_sel = this.getConstellation(this.birthday);
 						if (res.data.avator != "") {
 							this.avator = res.data.avator;
@@ -348,9 +350,10 @@
 					dataType: 'json',
 					success: (res) => {
 						console.log("res", res.data)
-						this.$refs['ToastW3'].showToast({
+						uni.showToast({
 							title: res.data.str,
-							animation: 0
+							animation: 0,
+							icon: "none"
 						});
 						if (this.success == 'yes' && isBack == true) {
 							if (this.nickname) {
@@ -376,63 +379,97 @@
 					}
 				});
 			},
-			upload() {
-				this.checkRights();
-				console.log("----upload");
-				var _self = this;
-				uni.chooseImage({
-					count: 1,
-					sizeType: ['compressed'],
-					sourceType: ['album', 'camera'],
-					success: function(res) {
-						console.log('res:', res)
-						if (res.tempFilePaths.length > 0) {
-							_self.imglocal = res.tempFilePaths[0]
-							const tempFilePaths = res.tempFilePaths[0];
-							console.log('tempFilePaths:', tempFilePaths);
-							const uploadTask = uni.uploadFile({
-								url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
-								filePath: res.tempFilePaths[0],
-								name: 'file',
-								success: function(uploadFileRes) {
-									let resdata = JSON.parse(uploadFileRes.data)
-									console.log('Success11:', uploadFileRes);
-									console.log('Success21:', resdata);
-									if (resdata.success == 'yes') {
-										_self.showRights = false;
-										_self.avator = resdata.url;
-									}
-								},
-								fail: function(uploadFileFail) {
-									console.log('Error:', uploadFileFail.data);
-								},
-								complete: () => {
-									console.log('Complete:');
-								}
-							});
-						}
-					},
-					error: function(e) {
-						console.log(e);
+			chooseAvatar() {
+				uni.showActionSheet({
+					itemList: ['拍照', '从相册选择'],
+					success: (res) => {
+						const sourceType = res.tapIndex === 0 ? 'camera' : 'album';
+						this.chooseImage(sourceType);
 					}
 				});
 			},
-			checkRights() {
-				let that = this;
-				that.showRights = true;
-				requestAndroidPermission('android.permission.CAMERA')
-					.then(result => {
-						that.showRights = false;
-						if (result === 1) {} else if (result === 0) {
-							console.log('权限被拒绝');
-						} else if (result === -1) {
-							console.log('权限被永久拒绝');
+			async chooseImage(sourceType) {
+				try {
+					let hasPermission = false;
+					
+					if (sourceType === 'camera') {
+						hasPermission = await this.checkCameraPermission();
+					} else if (sourceType === 'album') {
+						hasPermission = await this.checkPhotoLibraryPermission();
+					}
+
+					if (!hasPermission) {
+						uni.showToast({
+							title: '未获得权限',
+							icon: 'none'
+						});
+						return;
+					}
+
+					uni.chooseImage({
+						count: 1,
+						sizeType: ['compressed'],
+						sourceType: [sourceType],
+						success: async (res) => {
+							console.log('res:', res)
+							if (res.tempFilePaths.length > 0) {
+								const tempFilePath = res.tempFilePaths[0];
+								console.log('tempFilePaths:', tempFilePath);
+								await this.uploadImage(tempFilePath);
+							}
+						},
+						fail: (err) => {
+							console.error('选择图片失败:', err);
+							uni.showToast({
+								title: '选择图片失败',
+								icon: 'none'
+							});
 						}
-					})
-					.catch(error => {
-						that.showRights = true;
-						console.log('权限申请失败:', error);
 					});
+				} catch (error) {
+					console.error('权限检查失败:', error);
+					uni.showToast({
+						title: '权限检查失败',
+						icon: 'none'
+					});
+				} 
+			},
+			async checkCameraPermission() {
+				const hasPermission = await permission.request(permission.PermissionType.CAMERA, {
+					title: '相机权限申请',
+					describe: '需要使用相机拍摄照片,请允许使用相机权限'
+				});
+				return hasPermission;
+			},
+			async checkPhotoLibraryPermission() {
+				const hasPermission = await permission.request(permission.PermissionType.PHOTO_LIBRARY, {
+					title: '相册权限申请',
+					describe: '需要访问相册选择照片,请允许访问相册权限'
+				});
+				return hasPermission;
+			},
+			uploadImage(tempFilePath) {
+				var _self = this;
+				const uploadTask = uni.uploadFile({
+					url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
+					filePath: tempFilePath,
+					name: 'file',
+					success: function(uploadFileRes) {
+						let resdata = JSON.parse(uploadFileRes.data)
+						console.log('Success11:', uploadFileRes);
+						console.log('Success21:', resdata);
+						if (resdata.success == 'yes') {
+							_self.showRights = false;
+							_self.avator = resdata.url;
+						}
+					},
+					fail: function(uploadFileFail) {
+						console.log('Error:', uploadFileFail.data);
+					},
+					complete: () => {
+						console.log('Complete:');
+					}
+				});
 			},
 			onBirthdayChange(e) {
 				this.birthday = e.detail.value;

+ 424 - 316
pages/my/job.vue

@@ -89,11 +89,11 @@
 					</view>
 					<view class="task-reward">
 						<image src="@/static/me/job/wd_icon_xingyuan.png"></image>+{{
-              item.num
-            }}
+							item.num
+						}}
 					</view>
 					<view class="task-btn" :class="{ 'task-completed': item.status == 9 || item.status == 1 }"
-						@click="claimReward(index)">
+						@click="claimReward(index, item)">
 						<text v-if="item.status == 1">未完成</text>
 						<text v-if="item.status == 2">领取</text>
 						<text v-if="item.status == 9">已领取</text>
@@ -186,389 +186,497 @@
 </template>
 
 <script>
-	import checkInPopUpWindow from "@/components/checkIn-popUp-window/checkIn-popUp-window.vue";
-	import DropdownMenu from "@/components/DropdownMenu.vue";
+import checkInPopUpWindow from "@/components/checkIn-popUp-window/checkIn-popUp-window.vue";
+import DropdownMenu from "@/components/DropdownMenu.vue";
 
-	export default {
-		components: {
-			checkInPopUpWindow,
-			DropdownMenu,
-		},
-		data() {
-			return {
-				title: "任务中心",
-				myinfo: {},
-				realname: "",
-				num_gmd: 0,
-				newer_bfb: "",
-				beanBalance: 2560,
-				showExchange: false,
-				exchangeAmount: "",
-				mCoinBalance: 0,
-				signNotify: true,
-				signRewards: [{
-						dayNum: "01",
-						reward: "10星源",
-						isVip: false,
-					},
-					{
-						dayNum: "02",
-						reward: "15星源",
-						isVip: false,
-					},
-					{
-						dayNum: "03",
-						reward: "20星源",
-						isVip: false,
-					},
-					{
-						dayNum: "04",
-						reward: "25星源",
-						isVip: false,
-					},
-					{
-						dayNum: "05",
-						reward: "30星源",
-						isVip: false,
-					},
-					{
-						dayNum: "06",
-						reward: "35星源",
-						isVip: true,
-					},
-					{
-						dayNum: "07",
-						reward: "50星源",
-						isVip: true,
-					},
-				],
-				signInfo: {
-					signDay: 1,
-					isSigned: false,
-					reward: 0,
-				},
-				taskList: [],
-				dropdownOptions: [{
-					label: "星源记录",
-					type: "starSourceRecord"
-				}],
-				isRefreshing: false,
-			};
-		},
-		onPullDownRefresh() {
-			if (this.isRefreshing) return;
-
-			this.isRefreshing = true;
-			this.refreshData();
-		},
-		onLoad(e) {
-			if (e && e.type == "recharge") {
-				setTimeout(() => {
-					this.openNicknamePopUpWindow();
-				}, 0);
-			}
-			this.loadData();
-			this.getSignInfo();
-		},
-		onShow() {},
-		methods: {
-			opencheckInPopUpWindow() {
-				this.$refs.checkInPopUpWindow.open();
+export default {
+	components: {
+		checkInPopUpWindow,
+		DropdownMenu,
+	},
+	data() {
+		return {
+			title: "任务中心",
+			myinfo: {},
+			realname: "",
+			num_gmd: 0,
+			newer_bfb: "",
+			beanBalance: 2560,
+			showExchange: false,
+			exchangeAmount: "",
+			mCoinBalance: 0,
+			signNotify: true,
+			signRewards: [{
+				dayNum: "01",
+				reward: "10星源",
+				isVip: false,
 			},
-			closecheckInPopUpWindow() {
-				this.$refs.checkInPopUpWindow.close();
+			{
+				dayNum: "02",
+				reward: "15星源",
+				isVip: false,
 			},
-			openNicknamePopUpWindow() {
-				this.$refs.NicknamePopUpWindow.open();
+			{
+				dayNum: "03",
+				reward: "20星源",
+				isVip: false,
 			},
-			closeNicknamePopUpWindow() {
-				this.$refs.NicknamePopUpWindow.close();
+			{
+				dayNum: "04",
+				reward: "25星源",
+				isVip: false,
 			},
-			onBack() {},
-
-			loadData() {
-				return new Promise((resolve, reject) => {
-					uni.request({
-						url: this.$apiHost + "/Job/getlist",
-						data: {
-							uuid: getApp().globalData.uuid,
-						},
-						header: {
-							"content-type": "application/json",
-							sign: getApp().globalData.headerSign,
-						},
-						success: (res) => {
-							console.log("----:", res.data);
-							this.num_gmd = res.data.num_gmd;
-							this.newer_bfb = res.data.newer_bfb;
-							this.taskList = res.data.list;
-							resolve(res);
-						},
-						complete: (com) => {
-							// uni.hideLoading();
-						},
-						fail: (e) => {
-							console.log("----e:", e);
-							reject(e);
-						},
-					});
-				});
+			{
+				dayNum: "05",
+				reward: "30星源",
+				isVip: false,
 			},
-
-			getSignInfo() {
-				return new Promise((resolve, reject) => {
-					uni.request({
-						url: this.$apiHost + "/User/sign7Day",
-						data: {
-							uuid: getApp().globalData.uuid,
-							action: "get",
-						},
-						header: {
-							"content-type": "application/json",
-							sign: getApp().globalData.headerSign,
-						},
-						success: (res) => {
-							if (res.data.success === "yes") {
-								this.signInfo = {
-									signDay: res.data.data.sign_day,
-									isSigned: res.data.data.is_signed,
-									reward: res.data.data.reward || 0,
-								};
-							}
-							resolve(res);
-						},
-						fail: (e) => {
-							console.log("获取签到信息失败:", e);
-							reject(e);
-						},
-					});
-
-					uni.request({
-						url: this.$apiHost + "/User/getinfo",
-						data: {
-							uuid: getApp().globalData.uuid,
-							skey: getApp().globalData.skey,
-						},
-						header: {
-							"content-type": "application/json",
-							sign: getApp().globalData.headerSign,
-						},
-						success: (res) => {
-							this.myinfo = res.data;
-							resolve(res);
-						},
-						complete: (com) => {},
-						fail: (e) => {
-							console.log("----e:", e);
-							reject(e);
-						},
-					});
-				});
+			{
+				dayNum: "06",
+				reward: "35星源",
+				isVip: true,
 			},
-
-			showExchangePopup() {
-				this.showExchange = true;
+			{
+				dayNum: "07",
+				reward: "50星源",
+				isVip: true,
 			},
-
-			hideExchangePopup() {
-				this.showExchange = false;
-			},
-
-			toggleSignNotify(falg) {
-				this.signNotify = falg;
+			],
+			signInfo: {
+				signDay: 1,
+				isSigned: false,
+				reward: 0,
 			},
+			taskList: [],
+			dropdownOptions: [{
+				label: "星源记录",
+				type: "starSourceRecord"
+			}],
+			isRefreshing: false,
+		};
+	},
+	onPullDownRefresh() {
+		if (this.isRefreshing) return;
 
-			confirmSign(type) {
-				if (this.signInfo.isSigned) {
-					uni.showToast({
-						title: "今日已签到,明天再来吧",
-						icon: "none",
-					});
-					return;
-				}
+		this.isRefreshing = true;
+		this.refreshData();
+	},
+	onLoad(e) {
+		if (e && e.type == "recharge") {
+			setTimeout(() => {
+				this.openNicknamePopUpWindow();
+			}, 0);
+		}
+		this.loadData();
+		this.getSignInfo();
+	},
+	onShow() { },
+	methods: {
+		opencheckInPopUpWindow() {
+			this.$refs.checkInPopUpWindow.open();
+		},
+		closecheckInPopUpWindow() {
+			this.$refs.checkInPopUpWindow.close();
+		},
+		openNicknamePopUpWindow() {
+			this.$refs.NicknamePopUpWindow.open();
+		},
+		closeNicknamePopUpWindow() {
+			this.$refs.NicknamePopUpWindow.close();
+		},
+		onBack() { },
 
+		loadData() {
+			return new Promise((resolve, reject) => {
 				uni.request({
-					url: this.$apiHost + "/User/sign7Day",
+					url: this.$apiHost + "/Job/getlist",
 					data: {
 						uuid: getApp().globalData.uuid,
-						action: "sign",
 					},
 					header: {
 						"content-type": "application/json",
 						sign: getApp().globalData.headerSign,
 					},
 					success: (res) => {
-						if (res.data.success === "yes") {
-							uni.showToast({
-								title: res.data.str,
-								icon: "none",
-							});
-							this.getSignInfo();
-							this.loadData();
-						} else {
-							uni.showToast({
-								title: res.data.str,
-								icon: "none",
-							});
-						}
+						console.log("----:", res.data);
+						this.num_gmd = res.data.num_gmd;
+						this.newer_bfb = res.data.newer_bfb;
+						this.taskList = res.data.list;
+						resolve(res);
+					},
+					complete: (com) => {
+						// uni.hideLoading();
 					},
 					fail: (e) => {
-						console.log("签到失败:", e);
-						uni.showToast({
-							title: "签到失败,请稍后重试",
-							icon: "none",
-						});
+						console.log("----e:", e);
+						reject(e);
 					},
 				});
-			},
-
-			confirmExchange() {
-				if (!this.exchangeAmount) {
-					uni.showToast({
-						title: "请输入兑换数量",
-						icon: "none",
-					});
-					return;
-				}
-
-				const amount = parseInt(this.exchangeAmount);
-
-				if (isNaN(amount) || amount <= 0) {
-					uni.showToast({
-						title: "请输入有效数量",
-						icon: "none",
-					});
-					return;
-				}
+			});
+		},
 
-				if (amount % 10 !== 0) {
-					uni.showToast({
-						title: "兑换数量必须是10的倍数",
-						icon: "none",
-					});
-					return;
-				}
-				let that = this;
+		getSignInfo() {
+			return new Promise((resolve, reject) => {
 				uni.request({
-					url: this.$apiHost + "/User/gmmToGMD",
+					url: this.$apiHost + "/User/sign7Day",
 					data: {
 						uuid: getApp().globalData.uuid,
-						num: amount,
+						action: "get",
 					},
 					header: {
 						"content-type": "application/json",
 						sign: getApp().globalData.headerSign,
 					},
 					success: (res) => {
-						console.log("----:", res.data);
-						uni.showToast({
-							title: res.data.str,
-							icon: "none",
-						});
-						if (res.data.success == "yes") {
-							this.hideExchangePopup();
-							this.exchangeAmount = "";
-							setTimeout(function() {
-								that.loadData();
-							}, 900);
+						if (res.data.success === "yes") {
+							this.signInfo = {
+								signDay: res.data.data.sign_day,
+								isSigned: res.data.data.is_signed,
+								reward: res.data.data.reward || 0,
+							};
 						}
-					},
-					complete: (com) => {
-						this.closeNicknamePopUpWindow();
+						resolve(res);
 					},
 					fail: (e) => {
-						console.log("----e:", e);
+						console.log("获取签到信息失败:", e);
+						reject(e);
 					},
 				});
-			},
 
-			claimReward(index) {
-				if (this.taskList[index].status == 9) {
-					uni.showToast({
-						title: "已领取该奖励",
-						icon: "none",
-					});
-					return;
-				}
-				let that = this;
 				uni.request({
-					url: this.$apiHost + "/Job/doAct",
+					url: this.$apiHost + "/User/getinfo",
 					data: {
 						uuid: getApp().globalData.uuid,
-						id: this.taskList[index].id,
+						skey: getApp().globalData.skey,
 					},
 					header: {
 						"content-type": "application/json",
 						sign: getApp().globalData.headerSign,
 					},
 					success: (res) => {
-						console.log("----:", res.data);
-						if (res.data.success == "yes") {
-							uni.showToast({
-								title: res.data.str,
-								icon: "none",
-							});
-							setTimeout(function() {
-								that.loadData();
-							}, 900);
-						}
-					},
-					complete: (com) => {
-						// uni.hideLoading();
+						this.myinfo = res.data;
+						resolve(res);
 					},
+					complete: (com) => { },
 					fail: (e) => {
 						console.log("----e:", e);
+						reject(e);
 					},
 				});
-			},
+			});
+		},
+
+		showExchangePopup() {
+			this.showExchange = true;
+		},
 
-			handleDropdownSelect(item) {
-				switch (item.type) {
-					case "starSourceRecord":
-						uni.navigateTo({
-							url: "/pages/vip/record?type=star",
+		hideExchangePopup() {
+			this.showExchange = false;
+		},
+
+		toggleSignNotify(falg) {
+			this.signNotify = falg;
+		},
+
+		confirmSign(type) {
+			if (this.signInfo.isSigned) {
+				uni.showToast({
+					title: "今日已签到,明天再来吧",
+					icon: "none",
+				});
+				return;
+			}
+
+			uni.request({
+				url: this.$apiHost + "/User/sign7Day",
+				data: {
+					uuid: getApp().globalData.uuid,
+					action: "sign",
+				},
+				header: {
+					"content-type": "application/json",
+					sign: getApp().globalData.headerSign,
+				},
+				success: (res) => {
+					if (res.data.success === "yes") {
+						uni.showToast({
+							title: res.data.str,
+							icon: "none",
 						});
-						break;
-				}
-			},
+						this.getSignInfo();
+						this.loadData();
+					} else {
+						uni.showToast({
+							title: res.data.str,
+							icon: "none",
+						});
+					}
+				},
+				fail: (e) => {
+					console.log("签到失败:", e);
+					uni.showToast({
+						title: "签到失败,请稍后重试",
+						icon: "none",
+					});
+				},
+			});
+		},
+
+		confirmExchange() {
+			console.log(123465);
+
+			if (!this.exchangeAmount) {
+				uni.showToast({
+					title: "请输入兑换数量",
+					icon: "none",
+				});
+				return;
+			}
+
+			const amount = parseInt(this.exchangeAmount);
+
+			if (isNaN(amount) || amount <= 0) {
+				uni.showToast({
+					title: "请输入有效数量",
+					icon: "none",
+				});
+				return;
+			}
+
+			if (amount % 10 !== 0) {
+				uni.showToast({
+					title: "兑换数量必须是10的倍数",
+					icon: "none",
+				});
+				return;
+			}
+			let that = this;
+			uni.request({
+				url: this.$apiHost + "/User/gmmToGMD",
+				data: {
+					uuid: getApp().globalData.uuid,
+					num: amount,
+				},
+				header: {
+					"content-type": "application/json",
+					sign: getApp().globalData.headerSign,
+				},
+				success: (res) => {
+					console.log("----:", res.data);
+					uni.showToast({
+						title: res.data.str,
+						icon: "none",
+					});
+					if (res.data.success == "yes") {
+						this.hideExchangePopup();
+						this.exchangeAmount = "";
+						setTimeout(function () {
+							that.loadData();
+						}, 900);
+					}
+				},
+				complete: (com) => {
+					this.closeNicknamePopUpWindow();
+				},
+				fail: (e) => {
+					console.log("----e:", e);
+				},
+			});
+		},
+		jumpTask(item) { 
+			let url = "";
+			switch (item.id) {
+				case 1:
+					uni.switchTab({
+						url: "/pages/make/index"
+					})
+					break;
+				case 2:
+					uni.switchTab({
+						url: "/pages/my/my"
+					})
+					break;
+				case 3:
+					uni.switchTab({
+						url: "/pages/index/index"
+					})
+					break;
+				case 4:
+					uni.switchTab({
+						url: "/pages/make/index"
+					})
+					break;
+				case 5:
+					uni.navigateTo({
+						url: "/pages/vip/index"
+					});
+
 
-			showExchangeConfirm() {
+					break;
+			}
+
+			var arr = [
+				{
+					"id": 3,
+					"image": "https://e.zhichao.art/images/job/newer.png",
+					"rule": "newer",
+					"type": "all",
+					"name": "邀请好友领星源",
+					"content": "成功邀请一位好友注册",
+					"num": 50,
+					"status": 1
+				},
+				{
+					"id": 1,
+					"image": "https://e.zhichao.art/images/job/fabu.png",
+					"rule": "fabu",
+					"type": "day",
+					"name": "每日首次发布作品",
+					"content": "当日首次发布作品即可获得奖励",
+					"num": 20,
+					"status": 1
+				},
+				{
+					"id": 2,
+					"image": "https://e.zhichao.art/images/job/share.png",
+					"rule": "share",
+					"type": "day",
+					"name": "分享作品领星源",
+					"content": "分享作品到社交平台即可获得奖励",
+					"num": 20,
+					"status": 1
+				},
+				{
+					"id": 5,
+					"image": "https://e.zhichao.art/images/job/zan.png",
+					"rule": "zan",
+					"type": "day",
+					"name": "口碑缔造者",
+					"content": "给他人作品评论5次",
+					"num": 20,
+					"status": 1
+				},
+				{
+					"id": 4,
+					"image": "https://e.zhichao.art/images/job/congzi.png",
+					"rule": "congzi",
+					"type": "day",
+					"name": "充值赠礼",
+					"content": "首次充值即可获得额外奖励",
+					"num": 30,
+					"status": 1
+				}
+			]
+		},
+		claimReward(index, item) {
+			if (item.status == 9) {
+				uni.showToast({
+					title: "已领取该奖励",
+					icon: "none",
+				});
+				return;
+			}
+			if (item.status == 1) {
+				uni.showToast({
+					title: "还没有完成该任务",
+					icon: "none",
+				});
 				this.$refs["DialogBox"]
 					.confirm({
-						title: "确认兑换",
-						content: "确定要兑换" + this.exchangeAmount + "星源吗?",
+						title: "任务提示",
+						content: item.content,
 						DialogType: "inquiry",
-						btn1: "再考虑一下",
-						btn2: "确认兑换",
+						btn1: "暂时不完成",
+						btn2: "去完成任务",
 						animation: 0,
 					})
 					.then((res) => {
-						if (res.confirm) {
-							this.confirmExchange();
+						if (res.isConfirm) {
+							this.jumpTask(item);
 						}
 					});
-			},
 
-			refreshData() {
-				Promise.all([this.loadData(), this.getSignInfo()])
-					.then(() => {
-						this.isRefreshing = false;
-						uni.stopPullDownRefresh();
-					})
-					.catch(() => {
-						this.isRefreshing = false;
-						uni.stopPullDownRefresh();
+				return;
+			}
+			let that = this;
+			uni.request({
+				url: this.$apiHost + "/Job/doAct",
+				data: {
+					uuid: getApp().globalData.uuid,
+					id: this.taskList[index].id,
+				},
+				header: {
+					"content-type": "application/json",
+					sign: getApp().globalData.headerSign,
+				},
+				success: (res) => {
+					console.log("----:", res.data);
+					if (res.data.success == "yes") {
+						uni.showToast({
+							title: res.data.str,
+							icon: "none",
+						});
+						setTimeout(function () {
+							that.loadData();
+						}, 900);
+					}
+				},
+				complete: (com) => {
+					// uni.hideLoading();
+				},
+				fail: (e) => {
+					console.log("----e:", e);
+				},
+			});
+		},
+
+		handleDropdownSelect(item) {
+			switch (item.type) {
+				case "starSourceRecord":
+					uni.navigateTo({
+						url: "/pages/vip/record?type=star",
 					});
-			},
-			goPage(page) {
-				uni.navigateTo({
-					url: page,
+					break;
+			}
+		},
+
+		showExchangeConfirm() {
+			this.$refs["DialogBox"]
+				.confirm({
+					title: "确认兑换",
+					content: "确定要兑换" + this.exchangeAmount + "星源吗?",
+					DialogType: "inquiry",
+					btn1: "再考虑一下",
+					btn2: "确认兑换",
+					animation: 0,
+				})
+				.then((res) => {
+					if (res.isConfirm) {
+						this.confirmExchange();
+					}
 				});
-			},
 		},
-	};
+
+		refreshData() {
+			Promise.all([this.loadData(), this.getSignInfo()])
+				.then(() => {
+					this.isRefreshing = false;
+					uni.stopPullDownRefresh();
+				})
+				.catch(() => {
+					this.isRefreshing = false;
+					uni.stopPullDownRefresh();
+				});
+		},
+		goPage(page) {
+			uni.navigateTo({
+				url: page,
+			});
+		},
+	},
+};
 </script>
 
 <style scoped lang="scss">
-	@import "job.scss";
+@import "job.scss";
 </style>

+ 621 - 747
pages/my/my.vue

@@ -1,778 +1,652 @@
 <template>
-  <view class="page"> 
-    <view class="topBody">
-      <view class="header">
-        <view class="reserveASeat"></view> 
-        <view class="card-box">
-          <view class="card-top">
-            <view class="top-box">
-              <view class="hello-box"> Hello! </view>
-              <view class="settingBtn-box">
-                <image
-                  @click="clickShare()"
-                  src="@/static/me/wd_icon_fenxian.png"
-                  mode=""
-                ></image>
-                <image
-                  src="@/static/me/wd_icon_shezhi.png"
-                  mode=""
-                  @click="navigateToSettings"
-                ></image>
-              </view>
-            </view>
-            <view class="userinfo-box" @click="goPage('/pages/my/editInfo')">
-              <view class="userinfo-left">
-                <CircleAvatar
-                  class="avator"
-                  :src="myinfo.avator"
-                ></CircleAvatar>
-              </view>
-              <view class="userinfo-right">
-                <view class="nickname">
-                  <text class="one-omit">{{ myinfo.nickname }}</text>
-                  <image
-                    src="../../static/icon/wd_icon_nan.png"
-                    mode="widthFix"
-                    v-if="myinfo.sex_id == 1"
-                  ></image>
-                  <image
-                    src="../../static/icon/wd_icon_nv.png"
-                    mode="widthFix"
-                    v-else-if="myinfo.sex_id == 2"
-                  ></image>
-                  <view class="level">Lv{{ myinfo.my_level }}</view>
-                </view>
-                <view class="label">
-                  <view v-for="(item, index) in aihao_tags" :key="index + item">
-                    {{ item }}
-                  </view>
-                </view>
-              </view>
-            </view>
-            <view class="intro_row">
-              <block v-if="myinfo.content == ''">
-                <text class="intro_text two-omit">添加简介</text>
-                <image
-                  src="@/static/icon/wd_icon_edit.png"
-                  mode="widthFix"
-                  class="add_icon"
-                ></image>
-              </block>
-              <uv-text v-else class="intro_text two-omit">
-                {{ myinfo.content }}
-              </uv-text>
-            </view>
-            <view class="bom">
-              <view class="follow_info" @click="navigateToFollow">
-                <view class="follow-box">
-                  <view class="num">{{ myinfo.num_attention }}</view>
-                  <view class="label">关注</view>
-                </view>
-                <view class="separator"></view>
-                <view class="follow-box">
-                  <view class="num">{{ myinfo.num_fans }}</view>
-                  <view class="label">粉丝</view>
-                </view>
-                <view class="separator"></view>
-                <view class="follow-box">
-                  <view class="num">{{ myinfo.num_like }}</view>
-                  <view class="label">获赞</view>
-                </view>
-              </view>
-              <view class="points-box" >
-                <view class="points" @click="goPage('/pages/vip/M_purchase')">
-                  <image src="@/static/icon/wd_icon_coin.png" mode=""></image>
-                  {{ myinfo.num_gmm | formatNumberToK}}
-                  <view class="money-add">+</view>
-                </view>
-                <view class="points" @click="goPage('/pages/my/job?type=recharge')">
-                  <image
-                    src="@/static/icon/wd_icon_xingyuan.png"
-                    mode=""
-                  ></image>
-                  {{ myinfo.num_gmd | formatNumberToK}}
-                  					 <view class="money-add">+</view>
-                </view>
-              </view>
-            </view>
-          </view>
-          <view class="card-bom" @click="goPage('/pages/vip/index')">
-            <view class="content-box">
-              <image
-                v-if="false"
-                src="@/static/me/icon-vip2.png"
-                mode=""
-              ></image>
-              <image
-                v-else-if="0"
-                src="@/static/me/icon-vip1.png"
-                mode=""
-              ></image>
-              <image v-else src="@/static/me/icon-vip0.png" mode=""></image>
-              <text v-if="true">开启专属会员权益</text>
-              <text v-else>会员权益生效中</text>
-            </view>
-            <image src="@/static/me/wd_icon_jiantou.png" mode=""></image>
-          </view>
-        </view>
-      </view>
+	<view class="page">
+		<view class="topBody">
+			<view class="header">
+				<view class="reserveASeat"></view>
+				<view class="card-box">
+					<view class="card-top">
+						<view class="top-box">
+							<view class="hello-box"> Hello! </view>
+							<view class="settingBtn-box">
+								<image @click="clickShare()" src="@/static/me/wd_icon_fenxian.png" mode=""></image>
+								<image src="@/static/me/wd_icon_shezhi.png" mode="" @click="navigateToSettings"></image>
+							</view>
+						</view>
+						<view class="userinfo-box" @click="goPage('/pages/my/editInfo')">
+							<view class="userinfo-left">
+								<CircleAvatar class="avator" :src="myinfo.avator"></CircleAvatar>
+							</view>
+							<view class="userinfo-right">
+								<view class="nickname">
+									<text class="one-omit">{{ myinfo.nickname }}</text>
+									<image src="../../static/icon/wd_icon_nan.png" mode="widthFix"
+										v-if="myinfo.sex_id == 1"></image>
+									<image src="../../static/icon/wd_icon_nv.png" mode="widthFix"
+										v-else-if="myinfo.sex_id == 2"></image>
+									<view class="level">Lv{{ myinfo.my_level }}</view>
+								</view>
+								<view class="label">
+									<view v-for="(item, index) in aihao_tags" :key="index + item">
+										{{ item }}
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="intro_row">
+							<block v-if="myinfo.content == ''">
+								<text class="intro_text two-omit">添加简介</text>
+								<image src="@/static/icon/wd_icon_edit.png" mode="widthFix" class="add_icon"></image>
+							</block>
+							<uv-text v-else class="intro_text two-omit">
+								{{ myinfo.content }}
+							</uv-text>
+						</view>
+						<view class="bom">
+							<view class="follow_info" @click="navigateToFollow">
+								<view class="follow-box">
+									<view class="num">{{ myinfo.num_attention }}</view>
+									<view class="label">关注</view>
+								</view>
+								<view class="separator"></view>
+								<view class="follow-box">
+									<view class="num">{{ myinfo.num_fans }}</view>
+									<view class="label">粉丝</view>
+								</view>
+								<view class="separator"></view>
+								<view class="follow-box">
+									<view class="num">{{ myinfo.num_like }}</view>
+									<view class="label">获赞</view>
+								</view>
+							</view>
+							<view class="points-box">
+								<view class="points" @click="goPage('/pages/vip/M_purchase')">
+									<image src="@/static/icon/wd_icon_coin.png" mode=""></image>
+									{{ myinfo.num_gmm | formatNumberToK}}
+									<view class="money-add">+</view>
+								</view>
+								<view class="points" @click="goPage('/pages/my/job?type=recharge')">
+									<image src="@/static/icon/wd_icon_xingyuan.png" mode=""></image>
+									{{ myinfo.num_gmd | formatNumberToK}}
+									<view class="money-add">+</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="card-bom" @click="goPage('/pages/vip/index')">
+						<view class="content-box">
+							<image v-if="false" src="@/static/me/icon-vip2.png" mode=""></image>
+							<image v-else-if="0" src="@/static/me/icon-vip1.png" mode=""></image>
+							<image v-else src="@/static/me/icon-vip0.png" mode=""></image>
+							<text v-if="true">开启专属会员权益</text>
+							<text v-else>会员权益生效中</text>
+						</view>
+						<image src="@/static/me/wd_icon_jiantou.png" mode=""></image>
+					</view>
+				</view>
+			</view>
 
-      <view class="myinfo">
-        <!-- <view class="line"></view> -->
-        <view class="tablist">
-          <view
-            class="item"
-            :class="{ active: firstLevelNavActive === 0 }"
-            @click="firstLevelNavActiveSwitch(0)"
-            >我的作品
-            <view class="indicator-triangle"> </view>
-          </view>
-          <view
-            class="item"
-            :class="{ active: firstLevelNavActive === 1 }"
-            @click="firstLevelNavActiveSwitch(1)"
-            >我的帖子
-            <view class="indicator-triangle"> </view>
-          </view> 
-        </view>
-        <!-- 作品列表 -->
-        <template v-if="firstLevelNavActive == 0">
-          <view class="line"></view>
-          <view class="subtitle">
-            <view
-              class="item"
-              :class="{ active: activeTab === 0 }"
-              @click="switchTab(0)"
-            >
-              作品
-            </view>
-            <view
-              class="item"
-              :class="{ active: activeTab === 1 }"
-              @click="switchTab(1)"
-            >
-              生成中
-            </view>
-          </view>
-          <view
-            class="numlist1"
-            v-if="activeTab === 0"
-            style="margin-top: 30rpx"
-          >
-            <WorkItem
-              v-for="(item, index) in worksList"
-              :secrecy="true"
-              :subtitle="true"
-              :key="index"
-              :item="item"
-              @click="goWork(item)"
-            />
-            <!-- 暂无内容提示 -->
-            <view v-if="worksList.length === 0" class="empty-state">
-              <image 
-                src="@/static/icon/xx_img_zanwuxiaoxi.png" 
-                mode="aspectFit" 
-                class="empty-image"
-              ></image>
-              <text class="empty-text">暂无作品</text>
-              <text class="empty-subtext">快来创作你的第一个作品吧~</text>
-            </view>
-          </view>
-          <view
-            class="numlist2"
-            v-if="activeTab === 1"
-            style="margin-top: 30rpx"
-          >
-            <view
-              class="item"
-              v-for="(item, index) in worksList"
-              :key="index"
-              style="margin-bottom: 28rpx"
-            >
-              <view class="num" @click="goWork(item)">
-                <WorkItem :item="item" style="margin-bottom: 12rpx" />
+			<view class="myinfo">
+				<!-- <view class="line"></view> -->
+				<view class="tablist">
+					<view class="item" :class="{ active: firstLevelNavActive === 0 }"
+						@click="firstLevelNavActiveSwitch(0)">我的作品
+						<view class="indicator-triangle"> </view>
+					</view>
+					<view class="item" :class="{ active: firstLevelNavActive === 1 }"
+						@click="firstLevelNavActiveSwitch(1)">我的帖子
+						<view class="indicator-triangle"> </view>
+					</view>
+				</view>
+				<!-- 作品列表 -->
+				<template v-if="firstLevelNavActive == 0">
+					<view class="line"></view>
+					<view class="subtitle">
+						<view class="item" :class="{ active: activeTab === 0 }" @click="switchTab(0)">
+							作品
+						</view>
+						<view class="item" :class="{ active: activeTab === 1 }" @click="switchTab(1)">
+							生成中
+						</view>
+					</view>
+					<view class="numlist1" v-if="activeTab === 0" style="margin-top: 30rpx">
+						<WorkItem v-for="(item, index) in worksList" :secrecy="true" :subtitle="true" :key="index"
+							:item="item" @click="goWork(item)" />
+						<!-- 暂无内容提示 -->
+						<view v-if="worksList.length === 0" class="empty-state">
+							<image src="@/static/icon/xx_img_zanwuxiaoxi.png" mode="aspectFit" class="empty-image">
+							</image>
+							<text class="empty-text">暂无作品</text>
+							<text class="empty-subtext">快来创作你的第一个作品吧~</text>
+						</view>
+					</view>
+					<view class="numlist2" v-if="activeTab === 1" style="margin-top: 30rpx">
+						<view class="item" v-for="(item, index) in worksList" :key="index" style="margin-bottom: 28rpx">
+							<view class="num" @click="goWork(item)">
+								<WorkItem :item="item" style="margin-bottom: 12rpx" />
 
-                <image
-                  class="incomplete-bg"
-                  v-if="item.status != 9"
-                  src="@/static/me/wd_bg_zhizuozhong.png"
-                ></image>
-                <view class="maskLayer"></view>
-                <!-- 当activeTab为1时显示队列状态 -->
-                <view class="queue-status">
-                  <!-- 排队中 -->
-                  <view v-if="item.status === 1" class="status-text">
-                    <image
-                      class="state-img"
-                      src="@/static/me/wd_icon_paiduizhong.png"
-                    ></image>
-                  </view>
-                  <!-- 生成失败 -->
-                  <view
-                    v-if="item.status === 3 || item.status === 4"
-                    class="status-text"
-                  >
-                    <image
-                      class="state-img"
-                      src="@/static/me/wd_icon_zhizuoshibai.png"
-                    ></image>
-                  </view>
-                  <!-- 制作中 -->
-                  <view v-else-if="item.status < 9" class="status-text">
-                    <image
-                      class="state-img"
-                      src="@/static/me/wd_icon_zhizuozhong.png"
-                    ></image>
-                  </view>
-                  <!-- 创作完成 -->
-                  <view v-else-if="item.status === 9" class="status-text">
-                    <image
-                      class="state-img"
-                      src="@/static/me/wd_icon_chuangzuowancheng.png"
-                    ></image>
-                  </view>
-                </view>
-                <view
-                  class="name"
-                  style="
+								<image class="incomplete-bg" v-if="item.status != 9"
+									src="@/static/me/wd_bg_zhizuozhong.png"></image>
+								<view class="maskLayer"></view>
+								<!-- 当activeTab为1时显示队列状态 -->
+								<view class="queue-status">
+									<!-- 排队中 -->
+									<view v-if="item.status === 1" class="status-text">
+										<image class="state-img" src="@/static/me/wd_icon_paiduizhong.png"></image>
+									</view>
+									<!-- 生成失败 -->
+									<view v-if="item.status === 3 || item.status === 4" class="status-text">
+										<image class="state-img" src="@/static/me/wd_icon_zhizuoshibai.png"></image>
+									</view>
+									<!-- 制作中 -->
+									<view v-else-if="item.status < 9" class="status-text">
+										<image class="state-img" src="@/static/me/wd_icon_zhizuozhong.png"></image>
+									</view>
+									<!-- 创作完成 -->
+									<view v-else-if="item.status === 9" class="status-text">
+										<image class="state-img" src="@/static/me/wd_icon_chuangzuowancheng.png">
+										</image>
+									</view>
+								</view>
+								<view class="name" style="
                     font-family: 'PingFang SC-Medium';
                     font-weight: 500;
                     font-size: 28rpx;
                     color: #1a4d2e;
-                  "
-                >
-                  {{ item.title || item.description || "作品" + index }}</view
-                >
+                  ">
+									{{ item.title || item.description || "作品" + index }}
+								</view>
 
-                <!-- 显示任务类型标签 -->
-                <view class="task-type-tag">
-                  <image
-                    style="width: 120rpx; height: 36rpx"
-                    v-if="item.task_type === 1"
-                    src="@/static/me/wd_icon_lingganchuangzuo.png"
-                  ></image>
-                  <image
-                    style="width: 82rpx; height: 36rpx"
-                    v-else-if="item.task_type === 2"
-                    src="@/static/me/wd_icon_yinyue.png"
-                  ></image>
-                  <!-- <text v-if="item.task_type === 1">灵感创作</text>
+								<!-- 显示任务类型标签 -->
+								<view class="task-type-tag">
+									<image style="width: 120rpx; height: 36rpx" v-if="item.task_type === 1"
+										src="@/static/me/wd_icon_lingganchuangzuo.png"></image>
+									<image style="width: 82rpx; height: 36rpx" v-else-if="item.task_type === 2"
+										src="@/static/me/wd_icon_yinyue.png"></image>
+									<!-- <text v-if="item.task_type === 1">灵感创作</text>
                   <text v-else-if="item.task_type === 2">音乐</text> -->
-                </view>
-              </view>
-            </view>
-            <!-- 暂无内容提示 -->
-            <view v-if="worksList.length === 0" class="empty-state">
-              <image 
-                src="@/static/icon/xx_img_zanwuxiaoxi.png" 
-                mode="aspectFit" 
-                class="empty-image"
-              ></image>
-              <text class="empty-text">暂无生成中的作品</text>
-              <text class="empty-subtext">快去创作新作品吧~</text>
-            </view>
-          </view>
-        </template>
-        <template v-else>
-          <view class="numlist2" style="margin-top: 30rpx">
-            <view
-              class="item"
-              v-for="(item, index) in worksList"
-              :key="index"
-              style="margin-bottom: 15rpx"
-            >
-              <view class="num" @click="goWork2(item)">
-                <WorkItem :item="item" style="margin-bottom: 20rpx" />
+								</view>
+							</view>
+						</view>
+						<!-- 暂无内容提示 -->
+						<view v-if="worksList.length === 0" class="empty-state">
+							<image src="@/static/icon/xx_img_zanwuxiaoxi.png" mode="aspectFit" class="empty-image">
+							</image>
+							<text class="empty-text">暂无生成中的作品</text>
+							<text class="empty-subtext">快去创作新作品吧~</text>
+						</view>
+					</view>
+				</template>
+				<template v-else>
+					<view class="numlist2" style="margin-top: 30rpx">
+						<view class="item" v-for="(item, index) in worksList" :key="index" style="margin-bottom: 15rpx">
+							<view class="num" @click="goWork2(item)">
+								<WorkItem :item="item" style="margin-bottom: 20rpx" />
 
-                <view class="incomplete-bg" style="background: #f8f9fa"></view>
-                <image
-                  class="incomplete-bg"
-                  v-if="item.status != 1"
-                  src="@/static/me/wd_bg_zhizuozhong.png"
-                ></image>
-                <image
-                  class="incomplete-bg2"
-                  v-else-if="item.status == 1"
-                  :src="item.image"
-                  mode="widthFix"
-                ></image>
+								<view class="incomplete-bg" style="background: #f8f9fa"></view>
+								<image class="incomplete-bg" v-if="item.status != 1"
+									src="@/static/me/wd_bg_zhizuozhong.png"></image>
+								<image class="incomplete-bg2" v-else-if="item.status == 1" :src="item.image"
+									mode="widthFix"></image>
 
-                <view class="maskLayer" v-if="item.status != 1"></view>
-                <!-- 当activeTab为1时显示队列状态 -->
-                <view class="queue-status">
-                  <!-- 已发布 -->
-                  <view v-if="item.status == 1" class="status-text">
-                    <!-- <image class="state-img" src="@/static/me/wd_icon_paiduizhong.png"></image> -->
-                    <!-- ({{ item.queue_position }}/{{ item.all_position }}) -->
-                  </view>
-                  <!-- 待审核 -->
-                  <view
-                    v-if="item.status == 2 || item.status === 4"
-                    class="status-text"
-                  >
-                    <image
-                      class="state-img"
-                      src="@/static/me/wd_icon_shenhezhong.png"
-                    ></image>
-                  </view>
-                  <!-- 审核失败 -->
-                  <view v-else-if="item.status == 3" class="status-text">
-                    <image
-                      class="state-img"
-                      src="@/static/me/wd_icon_fabushibai.png"
-                    ></image>
-                  </view>
-                </view>
-                <view
-                  class="name"
-                  style="
+								<view class="maskLayer" v-if="item.status != 1"></view>
+								<!-- 当activeTab为1时显示队列状态 -->
+								<view class="queue-status">
+									<!-- 已发布 -->
+									<view v-if="item.status == 1" class="status-text">
+										<!-- <image class="state-img" src="@/static/me/wd_icon_paiduizhong.png"></image> -->
+										<!-- ({{ item.queue_position }}/{{ item.all_position }}) -->
+									</view>
+									<!-- 待审核 -->
+									<view v-if="item.status == 2 || item.status === 4" class="status-text">
+										<image class="state-img" src="@/static/me/wd_icon_shenhezhong.png"></image>
+									</view>
+									<!-- 审核失败 -->
+									<view v-else-if="item.status == 3" class="status-text">
+										<image class="state-img" src="@/static/me/wd_icon_fabushibai.png"></image>
+									</view>
+								</view>
+								<view class="name" style="
                     font-family: 'PingFang SC-Medium';
                     font-weight: 500;
                     font-size: 28rpx;
                     color: #1a4d2e;
-                  "
-                >
-                  {{ item.title || item.description || "作品" + index }}</view
-                >
-              </view>
-            </view>
-            <!-- 暂无内容提示 -->
-            <view v-if="worksList.length === 0" class="empty-state">
-              <image 
-                src="@/static/icon/xx_img_zanwuxiaoxi.png" 
-                mode="aspectFit" 
-                class="empty-image"
-              ></image>
-              <text class="empty-text">暂无帖子</text>
-              <text class="empty-subtext">快来发布你的第一个帖子吧~</text>
-            </view>
-          </view>
-        </template>
-        <!-- 加载更多提示 -->
-        <!-- <view class="loading-more" v-if="isLoading">加载中...</view>
+                  ">
+									{{ item.title || item.description || "作品" + index }}
+								</view>
+							</view>
+						</view>
+						<!-- 暂无内容提示 -->
+						<view v-if="worksList.length === 0" class="empty-state">
+							<image src="@/static/icon/xx_img_zanwuxiaoxi.png" mode="aspectFit" class="empty-image">
+							</image>
+							<text class="empty-text">暂无帖子</text>
+							<text class="empty-subtext">快来发布你的第一个帖子吧~</text>
+						</view>
+					</view>
+				</template>
+				<!-- 加载更多提示 -->
+				<!-- <view class="loading-more" v-if="isLoading">加载中...</view>
 				<view class="no-more" v-if="!hasMore && worksList.length > 0">没有更多作品了</view>
 				<view class="no-more" v-if="!hasMore && worksList.length === 0">暂无作品</view> -->
-      </view>
-      <view style="width: 100%; text-align: center; background: #fff"
-        >杭州智潮创意科技有限公司</view
-      >
+			</view>
+			<view style="width: 100%; text-align: center; background: #fff">杭州智潮创意科技有限公司</view>
 
-      <view class="blankHeight"></view> 
-    </view>
-    <view class="reserveASeatBom"></view>
-    <!-- 确认框 -->
-    <CustomConfirm ref="customConfirm"></CustomConfirm>
-    <!-- 提示框 -->
-    <DialogBox ref="DialogBox"></DialogBox>
-    <tabbar-view
-      :tabbars="tabbars"
-      :currentIndex="4"
-      ref="tabbar"
-    ></tabbar-view>
-    <!-- SharePopup组件 --> 
-    <SharePopup
-      :visible="showShare"
-      :share-url="shareUrl"
-      :share-title="shareTitle"
-      :share-desc="shareDesc"
-      :share-img="shareImg"
-      @close="showShare = false"
-    />
- 
-  </view>
+			<view class="blankHeight"></view>
+		</view>
+		<view class="reserveASeatBom"></view>
+		<!-- 确认框 -->
+		<CustomConfirm ref="customConfirm"></CustomConfirm>
+		<!-- 提示框 -->
+		<DialogBox ref="DialogBox"></DialogBox>
+		<tabbar-view :tabbars="tabbars" :currentIndex="4" ref="tabbar"></tabbar-view>
+		<!-- SharePopup组件 -->
+		<SharePopup :visible="showShare" :share-url="shareUrl" :share-title="shareTitle" :share-desc="shareDesc"
+			:share-img="shareImg" @close="showShare = false" />
+
+	</view>
 </template>
 
 <script>
-import tabbarView from "@/components/tabbar/tabbar.vue";
-import tabbar from "@/mixins/tabbar";
-import CustomConfirm from "@/components/custome-confirm/customeConfirm.vue";
-import CircleAvatar from "@/components/CircleAvatar/CircleAvatar.vue";
-import meCard from "@/components/meCard/meCard.vue";
-import WorkItem from "@/components/WorkItem/WorkItem.vue";
-export default {
-  components: {
-    tabbarView,
-    CustomConfirm,
-    CircleAvatar,
-    meCard,
-    WorkItem,
-  },
-  mixins: [tabbar],
-  data() {
-    return {
-      title: "",
-      sel: 1,
-      firstLevelNavActive: 0,
-      myinfo: {
-        avator: "../../static/logo.png",
-        nickname: "",
-        join_name: "",
-        num_1: 0,
-        num_2: 0,
-        num_3: 0,
-        num_4: 0,
-        is_login: "no",
-        num_history: 0,
-        num_collection: 0,
-      },
-      aihao_tags: [],
-      menu_list: [],
-      data_list: [  ],
-      activeTab: 0,
-      offset: 0,
-      hasMore: true,
-      isLoading: false,
-      worksList: [],
-      showShare: false,
-      shareUrl: "https://your-share-url.com",
-      shareTitle: "分享标题",
-      shareDesc: "分享描述",
-      shareImg: "https://your-share-image.com/image.jpg",
-    };
-  },
-  onLoad() {
-    // setTimeout(function() {
-    // 	uni.setNavigationBarColor({
-    // 		frontColor: '#ffffff',
-    // 		backgroundColor: '#00000000',
-    // 		animation: {
-    // 			duration: 400,
-    // 			timingFunc: 'easeIn'
-    // 		}
-    // 	})
-    // }, 200);
-  
-  },
-  onShow() {
-    uni.$emit("check_login", () => {});
-    // this.loadData();
-    this.offset = 0;
-    this.hasMore = true;
-    this.worksList = [];
-    this.loadInfo();
-    this.loadWorksList();
-  },
-  onReachBottom() {
-    if (this.hasMore && !this.isLoading) {
-      this.loadMoreWorks();
-    }
-  },
-  methods: {
-    clickShare(item) {
-      this.showShare = true;
-    },
-    async showConfirm() {
-      let that = this;
-      this.$refs["customConfirm"]
-        .confirm({
-          title: "确认解绑",
-          content: "解绑微信账号后将无法继续使用它登录该App账号?",
-          DialogType: "inquiry",
-          btn1: "再考虑一下",
-          btn2: "确认解绑",
-          animation: 0,
-        })
-        .then((res) => {});
-    },
-    onBack() {},
-    chkSel() {
-      if (this.sel == 1) {
-        this.sel = 0;
-      } else {
-        this.sel = 1;
-      }
-    },
-    goPage(page) {
-      if (page == "kefu") {
-        let that = this;
-        // #ifdef APP-PLUS
-        plus.share.getServices((res) => {
-          const wechat = res.find((i) => i.id === "weixin");
-          if (wechat) {
-            wechat.openCustomerServiceChat(
-              {
-                corpid: "wwbc06aa8311b6ac08",
-                // url: 'https://work.weixin.qq.com/kfid/kfc4b0bcb4038d00a50'
-                url: that.myinfo.wxkf,
-              },
-              (src) => {
-                console.log("success:");
-              },
-              (err) => {
-                console.log("error:");
-              }
-            );
-          } else {
-            uni.showToast({
-              title: "没有检测到微信,请先安装",
-              icon: "error",
-            });
-          }
-        });
-        // #endif
-      } else if (page != "") {
-        uni.navigateTo({
-          url: page,
-        });
-      }
-    },
-    loadInfo() {
-      console.log({
-        uuid: getApp().globalData.uuid,
-        skey: getApp().globalData.skey,
-      });
-      uni.request({
-        url: this.$apiHost + "/User/getinfo",
-        data: {
-          uuid: getApp().globalData.uuid,
-          skey: getApp().globalData.skey,
-        },
-        header: {
-          "content-type": "application/json",
-          sign: getApp().globalData.headerSign,
-        },
-        success: (res) => {
-          console.log("----:", JSON.parse(JSON.stringify(res.data)));
-          if (res.data.need_login == "yes") {
-            // getApp().globalData.skey = "";
-            // getApp().globalData.uuid = "";
-            uni.removeStorageSync("wapptoken");
-            uni.redirectTo({
-              url: "/pages/login/login",
-            });
-            return;
-          }
-          if (res.data.aihao) {
-            this.aihao_tags = res.data.aihao.split(",");
-          }
-          this.myinfo = res.data;
-        },
-        complete: (com) => {
-          // uni.hideLoading();
-        },
-        fail: (e) => {
-          console.log("----e:", e);
-        },
-      });
-    },
-    onLogout() {
-      let that = this;
-      this.$refs["DialogBox"]
-        .confirm({
-          title: "提示",
-          content: "确定退出吗?",
-          DialogType: "inquiry",
-          btn1: "取消",
-          btn2: "退出",
-          animation: 0,
-        })
-        .then((res) => {
-          uni.request({
-            url: that.$apiHost + "/My/logout",
-            data: {
-              uuid: getApp().globalData.uuid,
-              skey: getApp().globalData.skey,
-            },
-            header: {
-              "content-type": "application/json",
-              sign: getApp().globalData.headerSign,
-            },
-            success: (res) => {
-              console.log("----:", res.data);
-              // getApp().globalData.skey = "";
-              // getApp().globalData.uuid = "";
-              uni.removeStorageSync("wapptoken");
-              uni.redirectTo({
-                url: "/pages/login/login",
-              });
-            },
-            complete: (com) => {
-              // uni.hideLoading();
-            },
-            fail: (e) => {
-              console.log("----e:", e);
-            },
-          });
-        });
-    },
-    switchTab(index) {
-      this.activeTab = index;
-      this.offset = 0;
-      this.hasMore = true;
-      this.worksList = [];
-      this.loadWorksList();
-    },
-    loadWorksList() {
-      if (this.isLoading) return;
-      this.isLoading = true;
+	import tabbarView from "@/components/tabbar/tabbar.vue";
+	import tabbar from "@/mixins/tabbar";
+	import CustomConfirm from "@/components/custome-confirm/customeConfirm.vue";
+	import CircleAvatar from "@/components/CircleAvatar/CircleAvatar.vue";
+	import meCard from "@/components/meCard/meCard.vue";
+	import WorkItem from "@/components/WorkItem/WorkItem.vue";
+	export default {
+		components: {
+			tabbarView,
+			CustomConfirm,
+			CircleAvatar,
+			meCard,
+			WorkItem,
+		},
+		mixins: [tabbar],
+		data() {
+			return {
+				title: "",
+				sel: 1,
+				firstLevelNavActive: 0,
+				myinfo: {
+					avator: "../../static/logo.png",
+					nickname: "",
+					join_name: "",
+					num_1: 0,
+					num_2: 0,
+					num_3: 0,
+					num_4: 0,
+					is_login: "no",
+					num_history: 0,
+					num_collection: 0,
+				},
+				aihao_tags: [],
+				menu_list: [],
+				data_list: [],
+				activeTab: 0,
+				offset: 0,
+				hasMore: true,
+				isLoading: false,
+				worksList: [],
+				showShare: false,
+				shareUrl: "https://your-share-url.com",
+				shareTitle: "分享标题",
+				shareDesc: "分享描述",
+				shareImg: "https://your-share-image.com/image.jpg",
+			};
+		},
+		onLoad(e) {
+			// setTimeout(function() {
+			// 	uni.setNavigationBarColor({
+			// 		frontColor: '#ffffff',
+			// 		backgroundColor: '#00000000',
+			// 		animation: {
+			// 			duration: 400,
+			// 			timingFunc: 'easeIn'
+			// 		}
+			// 	})
+			// }, 200);
 
-      // 根据activeTab选择不同的API
-      let apiUrl = "";
-      if (this.firstLevelNavActive == 0) {
-        if (this.activeTab === 0) {
-          apiUrl = "/Work/getlist";
-        } else {
-          apiUrl = "/WorkAI/getMyQueueList";
-        }
-      } else if (this.firstLevelNavActive == 1) {
-        apiUrl = "/Article/getlist";
+			 
+		},
+		onShow() {
+			uni.$emit("check_login", () => {});
+			// this.loadData();
+			this.offset = 0;
+			this.hasMore = true;
+			this.worksList = [];
+			this.loadInfo();
+		
+			
+			// 检查全局变量,如果需要切换到生成中标签
+			if (getApp().globalData.needSwitchToGenerating) {
+				setTimeout(() => { 
+					this.switchTab(1);
+					// 重置全局变量
+					getApp().globalData.needSwitchToGenerating = false;
+				}, 300);
+			}else{
+        this.loadWorksList();
       }
-      uni.request({
-        url: this.$apiHost + apiUrl,
-        data: {
-          uuid: getApp().globalData.uuid,
-          skey: getApp().globalData.skey,
-          type: "my", // 固定为my,表示获取自己的作品
-          offset: this.offset,
-          status: this.activeTab === 0 ? 1 : undefined, // 只有我的作品需要status参数
-        },
-        header: {
-          "content-type": "application/json",
-          sign: getApp().globalData.headerSign,
-        },
-        success: (res) => {
-          console.log("列表数据:", JSON.parse(JSON.stringify(res.data)));
-          if (res.data.success == "yes" && res.data.list) {
-            if (res.data.list.length > 0) {
-              this.worksList = [...this.worksList, ...res.data.list];
-              this.offset += res.data.list.length;
-            }
+		},
+		onReachBottom() {
+			if (this.hasMore && !this.isLoading) {
+				this.loadMoreWorks();
+			}
+		},
+		methods: {
+			clickShare(item) {
+				this.showShare = true;
+			},
+			async showConfirm() {
+				let that = this;
+				this.$refs["customConfirm"]
+					.confirm({
+						title: "确认解绑",
+						content: "解绑微信账号后将无法继续使用它登录该App账号?",
+						DialogType: "inquiry",
+						btn1: "再考虑一下",
+						btn2: "确认解绑",
+						animation: 0,
+					})
+					.then((res) => {});
+			},
+			onBack() {},
+			chkSel() {
+				if (this.sel == 1) {
+					this.sel = 0;
+				} else {
+					this.sel = 1;
+				}
+			},
+			goPage(page) {
+				if (page == "kefu") {
+					let that = this;
+					// #ifdef APP-PLUS
+					plus.share.getServices((res) => {
+						const wechat = res.find((i) => i.id === "weixin");
+						if (wechat) {
+							wechat.openCustomerServiceChat({
+									corpid: "wwbc06aa8311b6ac08",
+									// url: 'https://work.weixin.qq.com/kfid/kfc4b0bcb4038d00a50'
+									url: that.myinfo.wxkf,
+								},
+								(src) => {
+									console.log("success:");
+								},
+								(err) => {
+									console.log("error:");
+								}
+							);
+						} else {
+							uni.showToast({
+								title: "没有检测到微信,请先安装",
+								icon: "error",
+							});
+						}
+					});
+					// #endif
+				} else if (page != "") {
+					uni.navigateTo({
+						url: page,
+					});
+				}
+			},
+			loadInfo() {
+				console.log({
+					uuid: getApp().globalData.uuid,
+					skey: getApp().globalData.skey,
+				});
+				uni.request({
+					url: this.$apiHost + "/User/getinfo",
+					data: {
+						uuid: getApp().globalData.uuid,
+						skey: getApp().globalData.skey,
+					},
+					header: {
+						"content-type": "application/json",
+						sign: getApp().globalData.headerSign,
+					},
+					success: (res) => {
+						console.log("----:", JSON.parse(JSON.stringify(res.data)));
+						if (res.data.need_login == "yes") {
+							// getApp().globalData.skey = "";
+							// getApp().globalData.uuid = "";
+							uni.removeStorageSync("wapptoken");
+							uni.redirectTo({
+								url: "/pages/login/login",
+							});
+							return;
+						}
+						if (res.data.aihao) {
+							this.aihao_tags = res.data.aihao.split(",");
+						}
+						this.myinfo = res.data;
+					},
+					complete: (com) => {
+						// uni.hideLoading();
+					},
+					fail: (e) => {
+						console.log("----e:", e);
+					},
+				});
+			},
+			onLogout() {
+				let that = this;
+				this.$refs["DialogBox"]
+					.confirm({
+						title: "提示",
+						content: "确定退出吗?",
+						DialogType: "inquiry",
+						btn1: "取消",
+						btn2: "退出",
+						animation: 0,
+					})
+					.then((res) => {
+						uni.request({
+							url: that.$apiHost + "/My/logout",
+							data: {
+								uuid: getApp().globalData.uuid,
+								skey: getApp().globalData.skey,
+							},
+							header: {
+								"content-type": "application/json",
+								sign: getApp().globalData.headerSign,
+							},
+							success: (res) => {
+								console.log("----:", res.data);
+								// getApp().globalData.skey = "";
+								// getApp().globalData.uuid = "";
+								uni.removeStorageSync("wapptoken");
+								uni.redirectTo({
+									url: "/pages/login/login",
+								});
+							},
+							complete: (com) => {
+								// uni.hideLoading();
+							},
+							fail: (e) => {
+								console.log("----e:", e);
+							},
+						});
+					});
+			},
+			switchTab(index) {
+				this.activeTab = index;
+				this.offset = 0;
+				this.hasMore = true;
+				this.worksList = [];
+				this.loadWorksList();
+			},
+			loadWorksList() {
+				if (this.isLoading) return;
+				this.isLoading = true;
 
-            if (res.data.list.length < 20) {
-              this.hasMore = false;
-            }
-          } else {
-            this.hasMore = false;
-          }
+				// 根据activeTab选择不同的API
+				let apiUrl = "";
+				if (this.firstLevelNavActive == 0) {
+					if (this.activeTab === 0) {
+						apiUrl = "/Work/getlist";
+					} else {
+						apiUrl = "/WorkAI/getMyQueueList";
+					}
+				} else if (this.firstLevelNavActive == 1) {
+					apiUrl = "/Article/getlist";
+				}
+				uni.request({
+					url: this.$apiHost + apiUrl,
+					data: {
+						uuid: getApp().globalData.uuid,
+						skey: getApp().globalData.skey,
+						type: "my", // 固定为my,表示获取自己的作品
+						offset: this.offset,
+						status: this.activeTab === 0 ? 1 : undefined, // 只有我的作品需要status参数
+					},
+					header: {
+						"content-type": "application/json",
+						sign: getApp().globalData.headerSign,
+					},
+					success: (res) => {
+						console.log("列表数据:", JSON.parse(JSON.stringify(res.data)));
+						if (res.data.success == "yes" && res.data.list) {
+							if (res.data.list.length > 0) {
+								this.worksList = [...this.worksList, ...res.data.list];
+								this.offset += res.data.list.length;
+							}
 
-          // 只有在"我的作品"标签下才更新data_list
-          if (this.activeTab === 0) {
-            this.updateDataList();
-          }
-          console.log("作品列表数据:", this.worksList);
-        },
-        complete: () => {
-          this.isLoading = false;
-        },
-        fail: (e) => {
-          console.log("请求列表失败:", e);
-          this.isLoading = false;
-        },
-      });
-    },
-    firstLevelNavActiveSwitch(n) {
-      this.firstLevelNavActive = n;
-      this.offset = 0;
-      this.hasMore = true;
-      this.worksList = [];
-      if (this.firstLevelNavActive == 0) {
-        this.activeTab = 0;
-      }
-      this.loadWorksList();
-    },
+							if (res.data.list.length < 20) {
+								this.hasMore = false;
+							}
+						} else {
+							this.hasMore = false;
+						}
 
-    loadMoreWorks() {
-      if (this.hasMore && !this.isLoading) {
-        this.loadWorksList();
-      }
-    },
-    updateDataList() {
-      this.data_list = this.worksList.map((item) => {
-        return {
-          url:
-            item.images || item.img_url || item.url || "../../static/logo.png",
-          title: item.title || item.description || "作品",
-          id: item.id,
-        };
-      });
-    },
-    goWork(item) {
-      uni.$emit("check_login", () => {});
-      // , //任务状态(1:排队中,3:生成失败,4:生成失败,9:创作完成)
-      if (this.activeTab == 0) {
-        uni.navigateTo({
-          // url: "/pages/index/workDetail?id=" + item.id,
-          url:
-            "/pages/makedetail/makeDetail?id=" +
-            item.queue_id +
-            "&queueId=" +
-            item.id,
-        });
-      } else {
-        if (item.status >= 9) {
-          uni.navigateTo({
-            url: "/pages/makedetail/makeDetail?id=" + item.id,
-          });
-        }
-        if (item.status < 9 && item.status != 3 && item.status != 4) {
-          // <!-- <text v-if="item.task_type === 1">灵感创作</text>
-          // <text v-else-if="item.task_type === 2">音乐</text> -->
-          var url = "";
-          if (item.task_type === 1) {
-            url = "/makedetail/makeImgDetail";
-          }
-          if (item.task_type === 2) {
-            url = "/makedetail/makeMusicDetail";
-          }
-          if (url) {
-            uni.navigateTo({
-              url: "/pages" + url + "?id=" + item.id,
-            });
-          }
-        }
-      }
-    },
-    goWork2(item) {
-      uni.navigateTo({
-        // url: "/pages/index/workDetail?id=" + item.id,
-        url: "/pages/index/articleDetail?id=" + item.id,
-      });
-    },
-    navigateToSettings() {
-      uni.$emit("check_login", () => {
-        uni.navigateTo({
-          url: "/pages/my/setting",
-        });
-      });
-    },
-    navigateToFollow() {
-      uni.navigateTo({
-        url: "/pages/my/follow",
-      });
-    },
-  },
-};
+						// 只有在"我的作品"标签下才更新data_list
+						if (this.activeTab === 0) {
+							this.updateDataList();
+						}
+						console.log("作品列表数据:", this.worksList);
+					},
+					complete: () => {
+						this.isLoading = false;
+					},
+					fail: (e) => {
+						console.log("请求列表失败:", e);
+						this.isLoading = false;
+					},
+				});
+			},
+			firstLevelNavActiveSwitch(n) {
+				this.firstLevelNavActive = n;
+				this.offset = 0;
+				this.hasMore = true;
+				this.worksList = [];
+				if (this.firstLevelNavActive == 0) {
+					this.activeTab = 0;
+				}
+				this.loadWorksList();
+			},
+
+			loadMoreWorks() {
+				if (this.hasMore && !this.isLoading) {
+					this.loadWorksList();
+				}
+			},
+			updateDataList() {
+				this.data_list = this.worksList.map((item) => {
+					return {
+						url: item.images || item.img_url || item.url || "../../static/logo.png",
+						title: item.title || item.description || "作品",
+						id: item.id,
+					};
+				});
+			},
+			goWork(item) {
+				uni.$emit("check_login", () => {});
+				// , //任务状态(1:排队中,3:生成失败,4:生成失败,9:创作完成)
+				if (this.activeTab == 0) {
+					uni.navigateTo({
+						// url: "/pages/index/workDetail?id=" + item.id,
+						url: "/pages/makedetail/makeDetail?id=" +
+							item.queue_id +
+							"&queueId=" +
+							item.id,
+					});
+				} else {
+					if (item.status >= 9) {
+						uni.navigateTo({
+							url: "/pages/makedetail/makeDetail?id=" + item.id,
+						});
+					}
+					if (item.status < 9 && item.status != 3 && item.status != 4) {
+						// <!-- <text v-if="item.task_type === 1">灵感创作</text>
+						// <text v-else-if="item.task_type === 2">音乐</text> -->
+						var url = "";
+						if (item.task_type === 1) {
+							url = "/makedetail/makeImgDetail";
+						}
+						if (item.task_type === 2) {
+							url = "/makedetail/makeMusicDetail";
+						}
+						if (url) {
+							uni.navigateTo({
+								url: "/pages" + url + "?id=" + item.id,
+							});
+						}
+					}
+				}
+			},
+			goWork2(item) {
+				uni.navigateTo({
+					// url: "/pages/index/workDetail?id=" + item.id,
+					url: "/pages/index/articleDetail?id=" + item.id,
+				});
+			},
+			navigateToSettings() {
+				uni.$emit("check_login", () => {
+					uni.navigateTo({
+						url: "/pages/my/setting",
+					});
+				});
+			},
+			navigateToFollow() {
+				uni.navigateTo({
+					url: "/pages/my/follow",
+				});
+			},
+		},
+	};
 </script>
 
 <style scoped lang="scss">
-@import "my.scss";
+	@import "my.scss";
+
+	.empty-state {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		padding: 60rpx 0;
+		margin-top: 40rpx;
+		background: #FFFFFF;
+		border-radius: 20rpx;
+		width: 710rpx;
+
+		.empty-image {
+			width: 240rpx;
+			height: 240rpx;
+			margin-bottom: 30rpx;
+		}
+
+		.empty-text {
+			font-size: 32rpx;
+			color: #333333;
+			margin-bottom: 16rpx;
+			font-weight: 500;
+		}
 
-.empty-state {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  padding: 60rpx 0;
-  margin-top: 40rpx;
-  background: #FFFFFF;
-  border-radius: 20rpx;
-  width: 710rpx;
-  .empty-image {
-    width: 240rpx;
-    height: 240rpx;
-    margin-bottom: 30rpx;
-  }
-  
-  .empty-text {
-    font-size: 32rpx;
-    color: #333333;
-    margin-bottom: 16rpx;
-    font-weight: 500;
-  }
-  
-  .empty-subtext {
-    font-size: 28rpx;
-    color: #999999;
-  }
-}
+		.empty-subtext {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
 </style>

+ 169 - 169
pages/my/myArticle.vue

@@ -2,19 +2,19 @@
 	<view class="page">
 		<view class="mainBody">
 			<view class="menu">
-				<view class="item" :class="{'active':tab===1}" @click="checkTab(1)">
+				<view class="item" :class="{ 'active': tab === 1 }" @click="checkTab(1)">
 					<text class="left">全部</text>
 					<view class="line"></view>
 				</view>
-				<view class="item" :class="{'active':tab===2}" @click="checkTab(2)">
+				<view class="item" :class="{ 'active': tab === 2 }" @click="checkTab(2)">
 					<text class="left">待审核</text>
 					<view class="line"></view>
 				</view>
-				<view class="item" :class="{'active':tab===3}" @click="checkTab(3)">
+				<view class="item" :class="{ 'active': tab === 3 }" @click="checkTab(3)">
 					<text class="left">审核通过</text>
 					<view class="line"></view>
 				</view>
-				<view class="item" :class="{'active':tab===4}" @click="checkTab(4)">
+				<view class="item" :class="{ 'active': tab === 4 }" @click="checkTab(4)">
 					<text class="left">审核拒绝</text>
 					<view class="line"></view>
 				</view>
@@ -22,7 +22,7 @@
 			</view>
 		</view>
 		<view class="list_info">
-			<block v-for="(item,index) in list" :key="index">
+			<block v-for="(item, index) in list" :key="index">
 				<view class="item">
 					<view class="avator">
 						<image class="icon" :src="item.avator" mode="aspectFill">
@@ -31,22 +31,22 @@
 					<view class="tit">
 						<view class="list1">
 							<view class="name">
-								{{item.nickname}}
+								{{ item.nickname }}
 							</view>
 							<view class="sex2" v-if="item.sex == 2">
 								<image class="icon" src="../../static/icon/woman.png" mode="widthFix">
 								</image>
-								{{item.age}}
+								{{ item.age }}
 							</view>
 							<view class="sex1" v-else>
 								<image class="icon" src="../../static/icon/man.png" mode="widthFix">
 								</image>
-								{{item.age}}
+								{{ item.age }}
 							</view>
-							<view class="xinzuo" v-if="item.xinzuo != ''">{{item.xinzuo}}</view>
+							<view class="xinzuo" v-if="item.xinzuo != ''">{{ item.xinzuo }}</view>
 						</view>
 
-						<view class="time">{{item.dtime}}</view>
+						<view class="time">{{ item.dtime }}</view>
 					</view>
 					<view class="state">
 						<view class="status_1" v-if="item.status == 1">已通过</view>
@@ -55,23 +55,23 @@
 					</view>
 				</view>
 				<view class="content">
-					{{item.content}}
+					{{ item.content }}
 				</view>
 				<view class="photo_list">
-					<view class="img" v-for="(item2,index2) in toArr(item.images)" :key="index2"
-						@click="previewOpen(item.images,index2)" v-if="item2 != ''">
+					<view class="img" v-for="(item2, index2) in toArr(item.images)" :key="index2"
+						@click="previewOpen(item.images, index2)" v-if="item2 != ''">
 						<image class="icon" :src="item2" mode="aspectFill"></image>
 					</view>
 				</view>
 				<view class="desc">
-					<view class="addr">{{item.city}}</view>
-					<view class="img" @click="ZhanTA(item,index)" v-if="item.is_like < 1">
+					<view class="addr">{{ item.city }}</view>
+					<view class="img" @click="ZhanTA(item, index)" v-if="item.is_like < 1">
 						<image class="icon" src="../../static/icon/zan.png" mode="widthFix"></image>
-						{{item.num_like}}
+						{{ item.num_like }}
 					</view>
 					<view class="img" v-else>
 						<image class="icon" src="../../static/icon/like.png" mode="widthFix"></image>
-						{{item.num_like}}
+						{{ item.num_like }}
 					</view>
 					<!-- <view class="img" >
 						<image class="icon" src="../../static/icon/reply.png" mode="widthFix"></image>
@@ -93,168 +93,98 @@
 </template>
 
 <script>
-	import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue'; //引用插件
-	export default {
-		components: {
-			previewImage
-		}, //注册插件
-		data() {
-			return {
-				tab: 1,
-				list: [],
-				stype: 'get',
-				imgs: ['../../static/a.jpg', '../../static/b.jpg', '../../static/c.jpg', '../../static/d.jpg',
-					'../../static/e.png'
-				],
-				descs: [
-					'人民大礼堂',
-					'菜园坝火车站',
-					'',
-					'重庆大剧院由设计了中央电视台新大楼的华东设计院和德国设计公司联合设计,大剧院的设计以“孤帆远影”为主题,其建筑表面选用浅绿色的有机玻璃',
-					'顶部底部数字都是1,超长的图片,看看能不能看到顶部和底部'
-				]
-			}
-		},
-		onLoad() {},
-		onShow() {
-			let that = this;
-			// uni.setNavigationBarTitle({
-			// 	titleNView: that.titleNView
-			// });
-			// this.setStyle(1, '我收到的')
-			this.loadData();
-		},
-		onNavigationBarButtonTap(e) {
-			if (e.index === 0) {
-				uni.navigateTo({
-					url: '/pages/article/addArticle'
-				})
-			}
+import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue'; //引用插件
+export default {
+	components: {
+		previewImage
+	}, //注册插件
+	data() {
+		return {
+			tab: 1,
+			list: [],
+			stype: 'get',
+			imgs: ['../../static/a.jpg', '../../static/b.jpg', '../../static/c.jpg', '../../static/d.jpg',
+				'../../static/e.png'
+			],
+			descs: [
+				'人民大礼堂',
+				'菜园坝火车站',
+				'',
+				'重庆大剧院由设计了中央电视台新大楼的华东设计院和德国设计公司联合设计,大剧院的设计以“孤帆远影”为主题,其建筑表面选用浅绿色的有机玻璃',
+				'顶部底部数字都是1,超长的图片,看看能不能看到顶部和底部'
+			]
+		}
+	},
+	onLoad() { },
+	onShow() {
+		let that = this;
+		// uni.setNavigationBarTitle({
+		// 	titleNView: that.titleNView
+		// });
+		// this.setStyle(1, '我收到的')
+		this.loadData();
+	},
+	onNavigationBarButtonTap(e) {
+		if (e.index === 0) {
+			uni.navigateTo({
+				url: '/pages/article/addArticle'
+			})
+		}
+	},
+	methods: {
+		setStyle(index, text) {
+			let pages = getCurrentPages();
+			let page = pages[pages.length - 1];
+			// if (text.length > 3) {
+			// 	text = text.substr(0, 3) + '...';
+			// }
+			// #ifdef APP-PLUS
+			let currentWebview = page.$getAppWebview();
+			let titleNView = currentWebview.getStyle().titleNView;
+			// 添加文字过长截取为3个字符,请根据自己业务需求更改
+			titleNView.buttons[0].text = text;
+			currentWebview.setStyle({
+				titleNView: titleNView
+			});
+			// #endif
+			// #ifdef H5
+			// h5 临时方案
+			const btn = document.getElementsByClassName('uni-btn-icon')[index]
+			btn.innerText = text;
+			// #endif
 		},
-		methods: {
-			setStyle(index, text) {
-				let pages = getCurrentPages();
-				let page = pages[pages.length - 1];
-				// if (text.length > 3) {
-				// 	text = text.substr(0, 3) + '...';
-				// }
-				// #ifdef APP-PLUS
-				let currentWebview = page.$getAppWebview();
-				let titleNView = currentWebview.getStyle().titleNView;
-				// 添加文字过长截取为3个字符,请根据自己业务需求更改
-				titleNView.buttons[0].text = text;
-				currentWebview.setStyle({
-					titleNView: titleNView
-				});
-				// #endif
-				// #ifdef H5
-				// h5 临时方案
-				const btn = document.getElementsByClassName('uni-btn-icon')[index]
-				btn.innerText = text;
-				// #endif
-			},
 
-			// 删除动态
+		// 删除动态
 
-			delArticle(article) {
-				console.log(article);
-				this.$refs['DialogBoxW3'].confirm({
-					title: '删除动态',
-					content: '请确认是否删除此条动态?',
-					DialogType: 'inquiry',
-					btn1: '取消',
-					btn2: '删除',
-					animation: 0
-				}).then((res) => {
+		delArticle(article) {
+			console.log(article);
+			this.$refs['DialogBoxW3'].confirm({
+				title: '删除动态',
+				content: '请确认是否删除此条动态?',
+				DialogType: 'inquiry',
+				btn1: '取消',
+				btn2: '删除',
+				animation: 0
+			}).then((res) => {
 
-					uni.request({
-						url: this.$apiHost + '/Article/doAct',
-						data: {
-							uuid: getApp().globalData.uuid,
-							act: 'del',
-							id: article.id
-						},
-						header: {
-							"content-type": "application/json",
-							'sign': getApp().globalData.headerSign
-						},
-						success: (res) => {
-							uni.showToast({
-								title: res.data.str,
-								icon: 'none'
-							});
-							if (res.data.success == 'yes') {
-								this.loadData();
-							}
-						},
-						complete: (com) => {
-							// uni.hideLoading();
-						},
-						fail: (e) => {
-							console.log("----e:", e);
-						}
-					});
-
-				})
-			},
-			onClickButton1() {
-				console.log('点击了按钮1')
-			},
-			onClickButton2() {
-				console.log('点击了按钮2')
-			},
-			onBack() {},
-			checkTab(tab) {
-				this.tab = tab;
-				this.loadData();
-			},
-			toArr(imgs) {
-				let arr = imgs.split("|");
-				return arr;
-			},
-			previewOpen(imgs1, index) {
-				this.imgs = imgs1.split("|");
-				// this.descs = [];
-				// for (var i = 0; i < this.imgs.length; i++) {
-				// 	this.descs.push(i + 1);
-				// }
-				// var param = e.currentTarget.dataset.src;
-				// console.log(param);
-				// this.imgs = ['../../static/home/avator.png', '../../static/me/sex_2.png', '../../static/home/avator.png'];
-				setTimeout(() => this.$refs.previewImage.open(index), 0) // 传入当前选中的图片地址或序号
-				return; //如需测试和uni原生预览差别可注释这两行
-			},
-			//长按事件
-			longPress(data) {
-				console.log(data);
-				uni.showModal({
-					showCancel: false,
-					title: '长按事件',
-					content: '已触发长按事件,你可以在这里做更多',
-					success: showResult => {
-
-					}
-				});
-			},
-			loadData() {
-				console.log("this.tab", this.tab)
 				uni.request({
-					url: this.$apiHost + '/Article/getlist',
+					url: this.$apiHost + '/Article/doAct',
 					data: {
 						uuid: getApp().globalData.uuid,
-						ismy: 1,
-						tab: this.tab
+						act: 'del',
+						id: article.id
 					},
 					header: {
 						"content-type": "application/json",
 						'sign': getApp().globalData.headerSign
 					},
 					success: (res) => {
-						console.log("----:", res.data);
-						if (res.data.list != null) {
-							this.list = res.data.list;
-						} else {
-							this.list = [];
+						uni.showToast({
+							title: res.data.str,
+							icon: 'none'
+						});
+						if (res.data.success == 'yes') {
+							this.loadData();
 						}
 					},
 					complete: (com) => {
@@ -264,11 +194,81 @@
 						console.log("----e:", e);
 					}
 				});
-			},
-		}
+
+			})
+		},
+		onClickButton1() {
+			console.log('点击了按钮1')
+		},
+		onClickButton2() {
+			console.log('点击了按钮2')
+		},
+		onBack() { },
+		checkTab(tab) {
+			this.tab = tab;
+			this.loadData();
+		},
+		toArr(imgs) {
+			let arr = imgs.split("|");
+			return arr;
+		},
+		previewOpen(imgs1, index) {
+			this.imgs = imgs1.split("|");
+			// this.descs = [];
+			// for (var i = 0; i < this.imgs.length; i++) {
+			// 	this.descs.push(i + 1);
+			// }
+			// var param = e.currentTarget.dataset.src;
+			// console.log(param);
+			// this.imgs = ['../../static/home/avator.png', '../../static/me/sex_2.png', '../../static/home/avator.png'];
+			setTimeout(() => this.$refs.previewImage.open(index), 0) // 传入当前选中的图片地址或序号
+			return; //如需测试和uni原生预览差别可注释这两行
+		},
+		//长按事件
+		longPress(data) {
+			console.log(data);
+			uni.showModal({
+				showCancel: false,
+				title: '长按事件',
+				content: '已触发长按事件,你可以在这里做更多',
+				success: showResult => {
+
+				}
+			});
+		},
+		loadData() {
+			console.log("this.tab", this.tab)
+			uni.request({
+				url: this.$apiHost + '/Article/getlist',
+				data: {
+					uuid: getApp().globalData.uuid,
+					ismy: 1,
+					tab: this.tab
+				},
+				header: {
+					"content-type": "application/json",
+					'sign': getApp().globalData.headerSign
+				},
+				success: (res) => {
+					console.log("----:", res.data);
+					if (res.data.list != null) {
+						this.list = res.data.list;
+					} else {
+						this.list = [];
+					}
+				},
+				complete: (com) => {
+					// uni.hideLoading();
+				},
+				fail: (e) => {
+					console.log("----e:", e);
+				}
+			});
+		},
 	}
+}
 </script>
 
 <style scoped lang="scss">
-	@import 'myArticle.scss';
+@import 'myArticle.scss';
 </style>

+ 136 - 94
pages/my/step copy.vue

@@ -4,11 +4,11 @@
 			<block v-if="step == 1">
 				<view class="name">请问你的性别是:</view>
 				<view class="itemSex">
-					<view class="sex2" :class="sex == 1 ? 'active' : ''" style="margin-right: 10rpx;" @click="chkSex(1)">
+					<view class="sex2" :class="sex == 1 ? 'active' : ''" style="margin-right: 10rpx" @click="chkSex(1)">
 						<image class="photo" src="../../static/me/sex_1.png" mode="widthFix" />
 						<text>男性</text>
 					</view>
-					<view class="sex2" :class="sex == 2 ? 'active' : ''" style="margin-left: 10rpx;" @click="chkSex(2)">
+					<view class="sex2" :class="sex == 2 ? 'active' : ''" style="margin-left: 10rpx" @click="chkSex(2)">
 						<image class="photo" src="../../static/me/sex_2.png" mode="widthFix" />
 						<text>女性</text>
 					</view>
@@ -71,7 +71,7 @@
 			</block>
 			<block v-if="step == 4">
 				<view class="name">兴趣爱好:
-					<view class="right" @click="showPop = true;">添加+</view>
+					<view class="right" @click="showPop = true">添加+</view>
 				</view>
 				<view class="item_tag">
 					<view class="tag" v-for="(item, index) in sel_tags" :key="index">
@@ -84,13 +84,13 @@
 			<view class="blankHeight"></view>
 		</view>
 
-		<view class="btn_submit" v-if="step == 1" @click="step++;">下一步</view>
+		<view class="btn_submit" v-if="step == 1" @click="step++">下一步</view>
 		<view class="btn_list" v-if="step == 2 || step == 3">
-			<view class="btn_submit1" @click="step--;">上一步</view>
-			<view class="btn_submit2" @click="step++;">下一步</view>
+			<view class="btn_submit1" @click="step--">上一步</view>
+			<view class="btn_submit2" @click="step++">下一步</view>
 		</view>
 		<view class="btn_list" v-if="step == 4">
-			<view class="btn_submit1" @click="step--;">上一步</view>
+			<view class="btn_submit1" @click="step--">上一步</view>
 			<view class="btn_submit2" @click="submitData()">完成</view>
 		</view>
 		<view class="popSel" v-if="showPop" @tap.stop="onPreview">
@@ -104,13 +104,13 @@
 					</view>
 				</view>
 			</view>
-			<view class="btn_submit" @click="showPop = false;">提交选择</view>
+			<view class="btn_submit" @click="showPop = false">提交选择</view>
 		</view>
 
 		<view class="tag_all_select">
 			<view class="tag_items">
 				<view v-for="(item, index) in tagList" :key="index" class="tag_item"
-					:class="[item.size, { 'active': selectedTags.includes(index) }]" @click="selectTag(index)">
+					:class="[item.size, { active: selectedTags.includes(index) }]" @click="selectTag(index)">
 					{{ item.name }}
 				</view>
 			</view>
@@ -122,12 +122,32 @@
 		<ToastW3 ref="ToastW3"></ToastW3>
 		<DialogBox ref="DialogBox"></DialogBox>
 
-		<view v-if="showRights"
-			style="width:100%;height:300rpx;background-color: rgba(255,255,255,0.9);position: fixed;top:0;display: flex;flex-direction: column;justify-content: center;align-items: center;">
-			<text
-				style="width:90%;color:#000000;font-size:38rpx;text-align: left;padding:10rpx 20rpx;padding-top:10rpx;">正在获取相机、存储权限</text>
-			<text
-				style="width:90%;color:#666666;font-size:28rpx;text-align: left;padding:10rpx 20rpx;">该权限用于获取设备拍摄或获取本地应用相册,进行头像或图片上传。</text>
+		<view v-if="showRights" style="
+        width: 100%;
+        height: 300rpx;
+        background-color: rgba(255, 255, 255, 0.9);
+        position: fixed;
+        top: 0;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+      ">
+			<text style="
+          width: 90%;
+          color: #000000;
+          font-size: 38rpx;
+          text-align: left;
+          padding: 10rpx 20rpx;
+          padding-top: 10rpx;
+        ">正在获取相机、存储权限</text>
+			<text style="
+          width: 90%;
+          color: #666666;
+          font-size: 28rpx;
+          text-align: left;
+          padding: 10rpx 20rpx;
+        ">该权限用于获取设备拍摄或获取本地应用相册,进行头像或图片上传。</text>
 		</view>
 	</view>
 </template>
@@ -135,50 +155,71 @@
 <script>
 import {
 	requestAndroidPermission,
-	gotoAppPermissionSetting
-} from '../index/permission.js'
+	gotoAppPermissionSetting,
+} from "../index/permission.js";
 export default {
 	components: {},
 	data() {
 		return {
 			showRights: false,
-			title: '',
+			title: "",
 			step: 1,
 			sel: 1,
 			info: {},
 			showPop: false,
-			nickname: '',
-			wechat: '',
+			nickname: "",
+			wechat: "",
 			sex: 1,
 			age: 18,
 			height: 160,
 			weight: 50,
-			avator: '../../static/me/avator.png',
-			ziye: '',
-			qianmin: '',
+			avator: "../../static/me/avator.png",
+			ziye: "",
+			qianmin: "",
 
-			xueli_sel: '',
-			xueli: ['初中', '初中', '中专', '高中', '专科', '本科', '研究生', '硕士', '博士'],
-			xinzuo_sel: '',
-			xinzuo: ['水瓶座', '双鱼座', '白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座'],
-
-			list_tag: [
-				'篮球', '排球', '足球', '羽毛球', '健身达人', '美食达人'
+			xueli_sel: "",
+			xueli: [
+				"初中",
+				"初中",
+				"中专",
+				"高中",
+				"专科",
+				"本科",
+				"研究生",
+				"硕士",
+				"博士",
+			],
+			xinzuo_sel: "",
+			xinzuo: [
+				"水瓶座",
+				"双鱼座",
+				"白羊座",
+				"金牛座",
+				"双子座",
+				"巨蟹座",
+				"狮子座",
+				"处女座",
+				"天秤座",
+				"天蝎座",
+				"射手座",
+				"摩羯座",
 			],
+
+			list_tag: ["篮球", "排球", "足球", "羽毛球", "健身达人", "美食达人"],
 			sel_tags: [],
 			selectedTags: [],
 			tagList: [
-				{ name: '游戏', size: 'large' },
-				{ name: '音乐', size: 'medium' },
-				{ name: '盲盒', size: 'large' },
-				{ name: '小可爱', size: 'small' },
-				{ name: '娃娃人', size: 'medium' },
-				{ name: '纹身', size: 'large' },
-				{ name: '洛丽塔', size: 'small' },
-				{ name: '女装', size: 'medium' },
-				{ name: '萌球', size: 'small' }
-			]
-		}
+				{ name: "游戏", size: "large" },
+				{ name: "音乐", size: "medium" },
+				{ name: "盲盒", size: "large" },
+				{ name: "小可爱", size: "small" },
+				{ name: "娃娃人", size: "medium" },
+				{ name: "纹身", size: "large" },
+				{ name: "洛丽塔", size: "small" },
+				{ name: "女装", size: "medium" },
+				{ name: "萌球", size: "small" },
+			],
+		};
 	},
 	onLoad() {
 		this.step = 1;
@@ -203,7 +244,7 @@ export default {
 		delTag(tg) {
 			let list_tag2 = [];
 			for (let i = 0; i < this.sel_tags.length; i++) {
-				if (this.sel_tags[i] != tg && this.sel_tags[i] != '') {
+				if (this.sel_tags[i] != tg && this.sel_tags[i] != "") {
 					list_tag2.push(this.sel_tags[i]);
 				}
 			}
@@ -226,16 +267,16 @@ export default {
 				let tmpTags = [];
 				for (let entry of this.sel_tags) {
 					// console.log(entry); // 1, "string", false
-					if (entry != itm && entry != '') {
+					if (entry != itm && entry != "") {
 						tmpTags.push(entry);
 					}
 				}
 				this.sel_tags = tmpTags;
 			} else {
 				if (this.sel_tags.length >= 10) {
-					this.$refs['ToastW3'].showToast({
+					this.$refs["ToastW3"].showToast({
 						title: "最多选择10个标签",
-						animation: 0
+						animation: 0,
 					});
 					return;
 				}
@@ -254,7 +295,7 @@ export default {
 		SetXueli() {
 			let that = this;
 			uni.showActionSheet({
-				itemColor: '#000000',
+				itemColor: "#000000",
 				itemList: this.xueli,
 				success: function (res) {
 					that.xueli_sel = that.xueli[res.tapIndex];
@@ -262,13 +303,13 @@ export default {
 				},
 				fail: function (res) {
 					console.log(res.errMsg);
-				}
+				},
 			});
 		},
 		SetXinzuo() {
 			let that = this;
 			uni.showActionSheet({
-				itemColor: '#000000',
+				itemColor: "#000000",
 				itemList: this.xinzuo,
 				success: function (res) {
 					that.xinzuo_sel = that.xinzuo[res.tapIndex];
@@ -276,21 +317,21 @@ export default {
 				},
 				fail: function (res) {
 					console.log(res.errMsg);
-				}
+				},
 			});
 		},
 		getInfoData() {
-			console.log(this.$apiHost + '/Member/getinfoData');
+			console.log(this.$apiHost + "/Member/getinfoData");
 			uni.request({
-				url: this.$apiHost + '/Member/getinfoData', //仅为示例,并非真实接口地址。
+				url: this.$apiHost + "/Member/getinfoData", //仅为示例,并非真实接口地址。
 				data: {
-					uuid: getApp().globalData.uuid
+					uuid: getApp().globalData.uuid,
 				},
 				header: {
-					'content-type': 'application/json' //自定义请求头信息
+					"content-type": "application/json", //自定义请求头信息
 				},
 				success: (res) => {
-					console.log("res", res.data)
+					console.log("res", res.data);
 					this.nickname = res.data.nickname;
 					this.wechat = res.data.wechat;
 					this.sex = res.data.sex || 2;
@@ -309,12 +350,12 @@ export default {
 							this.sel_tags = res.data.aihao.split(",");
 						}
 					}
-				}
+				},
 			});
 		},
 
 		submitData() {
-			let aihao = this.sel_tags.join(',')
+			let aihao = this.sel_tags.join(",");
 			let obj2 = {
 				uuid: getApp().globalData.uuid,
 				avator: this.avator,
@@ -328,34 +369,34 @@ export default {
 				xinzuo: this.xinzuo_sel,
 				ziye: this.ziye,
 				qianmin: this.qianmin,
-				aihao: aihao
-			}
+				aihao: aihao,
+			};
 			// console.log("obj2", obj2);
 			uni.request({
-				url: this.$apiHost + '/Member/setinfoData', //仅为示例,并非真实接口地址。
+				url: this.$apiHost + "/Member/setinfoData", //仅为示例,并非真实接口地址。
 				data: obj2,
-				method: 'POST',
+				method: "POST",
 				header: {
-					'Content-Type': 'application/x-www-form-urlencoded',
-					'sign': getApp().globalData.headerSign
+					"Content-Type": "application/x-www-form-urlencoded",
+					sign: getApp().globalData.headerSign,
 				},
-				dataType: 'json',
+				dataType: "json",
 				// header: {
 				// 	'content-type': 'application/json', //自定义请求头信息
 				// 	'Access-Control-Allow-Origin': '*'
 				// },
 				success: (res) => {
-					console.log("res", res.data)
-					this.$refs['ToastW3'].showToast({
+					console.log("res", res.data);
+					this.$refs["ToastW3"].showToast({
 						title: res.data.str,
-						animation: 0
+						animation: 0,
 					});
 					if (res.data.success == "yes") {
 						uni.switchTab({
 							url: "/pages/index/index",
 						});
 					}
-				}
+				},
 			});
 		},
 		// upload() {
@@ -377,56 +418,57 @@ export default {
 			var _self = this;
 			uni.chooseImage({
 				count: 1,
-				sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
-				sourceType: ['album', 'camera'], //从相册、相机选择
-				extension: ['.png', '.jpeg', '.jpg'],
+				sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
+				sourceType: ["album", "camera"], //从相册、相机选择
+				extension: [".png", ".jpeg", ".jpg"],
 				success: function (res) {
-					console.log('res:', res)
-					_self.imglocal = res.tempFilePaths[0]
+					console.log("res:", res);
+					_self.imglocal = res.tempFilePaths[0];
 					const tempFilePaths = res.tempFilePaths[0];
-					console.log('tempFilePaths:', tempFilePaths);
+					console.log("tempFilePaths:", tempFilePaths);
 					// 图片上传
 					const uploadTask = uni.uploadFile({
-						url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey, // post请求地址
+						url: _self.$apiHost + "/Xweb/upload_img?skey=" + _self.skey, // post请求地址
 						filePath: res.tempFilePaths[0],
-						name: 'file', // 待确认
+						name: "file", // 待确认
 						success: function (uploadFileRes) {
-							let resdata = JSON.parse(uploadFileRes.data)
-							console.log('Success11:', uploadFileRes);
-							console.log('Success21:', resdata);
-							if (resdata.success == 'yes') {
+							let resdata = JSON.parse(uploadFileRes.data);
+							console.log("Success11:", uploadFileRes);
+							console.log("Success21:", resdata);
+							if (resdata.success == "yes") {
 								_self.avator = resdata.url;
 							}
 						},
 						fail: function (uploadFileFail) {
-							console.log('Error:', uploadFileFail.data);
+							console.log("Error:", uploadFileFail.data);
 						},
 						complete: () => {
-							console.log('Complete:');
-						}
+							console.log("Complete:");
+						},
 					});
 				},
 				error: function (e) {
 					console.log(e);
-				}
+				},
 			});
 		},
 		checkRights() {
 			let that = this;
 			that.showRights = true;
-			requestAndroidPermission('android.permission.CAMERA')
-				.then(result => {
+			requestAndroidPermission("android.permission.CAMERA")
+				.then((result) => {
 					that.showRights = false;
 					// 根据返回的结果进行处理
-					if (result === 1) { } else if (result === 0) {
-						console.log('权限被拒绝');
+					if (result === 1) {
+					} else if (result === 0) {
+						console.log("权限被拒绝");
 					} else if (result === -1) {
-						console.log('权限被永久拒绝');
+						console.log("权限被永久拒绝");
 					}
 				})
-				.catch(error => {
+				.catch((error) => {
 					that.showRights = true;
-					console.log('权限申请失败:', error);
+					console.log("权限申请失败:", error);
 				});
 		},
 		selectTag(index) {
@@ -438,13 +480,13 @@ export default {
 				// 如果已选中,则从数组中移除
 				this.selectedTags.splice(tagIndex, 1);
 			}
-		}
-	}
-}
+		},
+	},
+};
 </script>
 
 <style scoped lang="scss">
-@import 'normal.scss';
+@import "normal.scss";
 
 .popSel {
 	position: fixed;

文件差異過大導致無法顯示
+ 747 - 807
pages/my/step.vue


部分文件因文件數量過多而無法顯示