乐于分享
好东西不私藏

雷达鸭App微信一键登录功能踩坑记录

雷达鸭App微信一键登录功能踩坑记录

作者:雷达鸭技术团队系列定位:时间线·项目启动期功能模块·架构设计关键词HarmonyOS NEXTuni-app、架构设计、条件编译、适配层模式、APP-HARMONY阅读时间:约20 分钟系列导航:上篇·架构设计→ 下篇·功能实现 | 微信一键登录功能开发 | 专题:华为登录 · 数据库与云开发· AI辅助开发实践雷达鸭App已首发华为应用商店

开篇:微信登录看起来简单,坑却不少

微信一键登录,表面上是调一个wx.login()就完事了。实际做起来你会发现:授权码5分钟过期且只能用一次、session_key绝对不能返回前端、getUserProfile已经废弃了、手机号解密要走服务端……每一个细节处理不好,轻则用户体验差,重则安全漏洞。

这篇文章把微信一键登录的完整实现方案摊开讲——从前端调用到云函数处理,从安全架构到微信审核合规,踩过的坑全部记录在案。

一、微信登录技术原理

1.1 核心流程

1.2 关键参数说明

参数

来源

生命周期

安全级别

说明

code

wx.login()返回

5分钟,一次性

临时凭证

仅用于换取openid,不可重复使用

appid

微信公众平台分配

永久

公开

小程序唯一标识

secret

微信公众平台分配

永久(可重置)

绝密

只能存在云函数环境变量,严禁前端暴露

openid

jscode2session返回

永久

敏感

用户在小程序的唯一标识

unionid

jscode2session返回

永久

敏感

开放平台下多应用统一标识

session_key

jscode2session返回

微信控制

绝密

解密手机号等敏感数据的密钥,严禁返回前端

token

开发者服务端生成

30分钟(滑动过期)

敏感

自定义登录凭证

1.3 微信API变更提醒

有几个接口已经被微信官方收回,别再用了:

已废弃接口

废弃时间

替代方案

wx.getUserProfile()

202210

头像昵称填写能力(<button   open-type="chooseAvatar">

wx.getUserInfo()获取真实信息

2024年全面下线

只返回默认灰色头像和"微信用户"

scope.userInfo授权

已失效

不再需要此授权

当前合规方案:

·登录鉴权:仅用wx.login() → jscode2session获取openid

·头像昵称:用微信官方"头像昵称填写能力",用户主动选择

·手机号:用<button open-type="getPhoneNumber"> + 服务端解密

二、安全架构设计

2.1 四层安全模型

第一层:传输安全• 全链路HTTPS(微信小程序强制)• uniCloud云函数内网通信• AppSecret仅存储在云函数环境变量第二层:凭证安全• code一次性使用,5分钟过期• session_key仅存服务端,永不返回前端• 自定义token 30分钟滑动过期• token绑定设备ID,支持远端踢下线第三层:数据安全• 手机号加密数据仅服务端用session_key解密• 敏感操作记录审计日志• 用户密码使用bcrypt哈希存储第四层:业务安全• 登录频率限制(同一IP/设备)• 多设备登录管理(踢下线机制)• 异常登录检测与告警

2.2 session_key管理规范

session_key是微信登录安全的核心,必须严格遵守:

✅ 正确做法:

·在云函数中调用jscode2session获取session_key

·存储到数据库user_sessions集合

·设置合理过期时间(建议与token一致)

·仅在需要解密手机号等敏感数据时读取使用

·定期清理过期记录

✗ 错误做法:

·session_key返回给前端

·在前端使用session_key解密数据

·session_key明文存储在客户端本地

·使用固定/硬编码的session_key

三、前端实现

3.1 登录页核心代码

实际项目的登录页支持多种登录方式,这里只展示微信登录部分。注意CSS类名采用BEM命名规范(login-page__method--wechat)。

<!-- pages/auth/login.vue(微信登录部分摘录) --><template><view class="login-page"><!-- 页面头部 --><view class="login-page__header"><text class="login-page__title">登录雷达鸭</text><text class="login-page__subtitle">发现优质小项目</text></view><!-- 登录方式选择 --><view class="login-page__methods"><!-- 微信一键登录 - 小程序 --><!-- #ifdef MP-WEIXIN --><buttonclass="login-page__method login-page__method--wechat"@click="HandleWechatLoginClick"><view class="login-page__method-icon">💚</view><text class="login-page__method-text">微信一键登录</text></button><!-- #endif --><!-- 微信一键登录 - App --><!-- #ifdef APP-PLUS --><buttonclass="login-page__method login-page__method--wechat"@click="HandleWechatLoginClick"><view class="login-page__method-icon">💚</view><text class="login-page__method-text">微信一键登录</text></button><!-- #endif --></view><!-- 用户协议 --><view class="login-page__agreement"><view class="login-page__agreement-checkbox-wrapper" @click="ToggleAgreementCheckbox"><view class="login-page__agreement-checkbox" :class="{ 'login-page__agreement-checkbox--checked': agreementChecked }"><text v-if="agreementChecked" class="login-page__agreement-checkmark">✓</text></view></view><text class="login-page__agreement-text-new">我已阅读并同意<text class="login-page__agreement-link" @click.stop="ShowUserAgreement">《用户协议》</text><text class="login-page__agreement-link" @click.stop="ShowPrivacyPolicy">《隐私政策》</text></text></view></view></template><script setup lang="ts">import { ref } from 'vue'import { AuthManager } from '@/utils/auth-manager'import { getDeviceInfo } from '@/utils/device-manager'const agreementChecked = ref(false)const ToggleAgreementCheckbox = (): void => {agreementChecked.value = !agreementChecked.value}// 微信一键登录// #ifdef MP-WEIXIN || APP-PLUSconst HandleWechatLoginClick = async (): Promise<void> => {const agreed = await CheckAgreementAndConfirm()if (!agreed) returntry {uni.showLoading({ title: '登录中...', mask: true })const loginRes = await uni.login({ provider: 'weixin' })if (loginRes.errMsg !== 'login:ok' || !loginRes.code) {uni.hideLoading()uni.showToast({ title: '微信登录失败', icon: 'none' })return}const deviceInfo = getDeviceInfo()const result = await uniCloud.callFunction({name: 'user-service',data: {action: 'wechat-login',data: {code: loginRes.code,userInfo: null}}})uni.hideLoading()if (result.result?.code === 0) {const success = await AuthManager.login(result.result)if (success) {uni.showToast({ title: '登录成功', icon: 'success', duration: 2000 })uni.setStorageSync('login-success-timestamp', Date.now())setTimeout(() => {uni.$emit('auth:login-success', result.result.data.userInfo)uni.switchTab({ url: '/pages/index/index' })}, 1500)} else {uni.showToast({ title: '登录状态保存失败', icon: 'none' })}} else {uni.showToast({title: result.result?.msg || '登录失败',icon: 'none',duration: 3000})}} catch (error: any) {uni.hideLoading()uni.showToast({ title: '登录失败,请重试', icon: 'none' })}}// #endif</script>

关键细节

1.隐私协议检查必须在登录之前——agreed复选框默认未勾选,未勾选时不能发起登录

2.防止重复点击——isLoggingIn标志位,避免用户连点导致多次请求

3.错误处理区分网络错误和业务错误——网络超时和接口失败给用户不同的提示

4.10秒超时——云函数调用设置timeout: 10000,避免无限等待

3.2 头像昵称填写(替代废弃的getUserProfile

<!-- components/profile-form.vue --><template><view class="profile-form"><button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"><image class="avatar" :src="avatarUrl" mode="aspectFill" /><text class="avatar-tip">点击更换头像</text></button><view class="nickname-input"><text class="label">昵称</text><inputtype="nickname"v-model="nickname"placeholder="请输入昵称"class="input"@blur="onNicknameBlur"/></view><button class="save-btn" @click="saveProfile">保存</button></view></template><script setup lang="ts">import { ref } from 'vue'const avatarUrl = ref('/static/default-avatar.png')const nickname = ref('')const tempAvatarPath = ref('')const onChooseAvatar = (e: any) => {const { avatarUrl: tempPath } = e.detailtempAvatarPath.value = tempPathavatarUrl.value = tempPath}const onNicknameBlur = (e: any) => {nickname.value = e.detail.value}const saveProfile = async () => {try {uni.showLoading({ title: '保存中...' })let finalAvatarUrl = avatarUrl.valueif (tempAvatarPath.value) {const uploadRes = await uniCloud.uploadFile({cloudPath: `avatars/${Date.now()}_${Math.random().toString(36).substr(2, 8)}.jpg`,filePath: tempAvatarPath.value})finalAvatarUrl = uploadRes.fileID}const result = await uniCloud.callFunction({name: 'user-service',data: {action: 'update-profile',data: { avatar: finalAvatarUrl, nickname: nickname.value }}})uni.hideLoading()if (result.result?.code === 0) {uni.showToast({ title: '保存成功', icon: 'success' })} else {uni.showToast({ title: result.result?.msg || '保存失败', icon: 'none' })}} catch (error) {uni.hideLoading()uni.showToast({ title: '保存失败,请重试', icon: 'none' })}}</script>

注意<button open-type="chooseAvatar"><input type="nickname">——这是微信官方提供的替代方案,用户主动选择头像和输入昵称,不需要额外授权。

四、云函数实现

4.1 微信登录核心函数

// uniCloud-aliyun/cloudfunctions/user-service/index.jsconst db = uniCloud.database()const dbCmd = db.commandconst TOKEN_EXPIRY = 30 * 60 * 1000async function wechatLogin(data, context) {const { code, userInfo } = dataif (!code) {return createResponse(40001, '授权码不能为空')}try {const { appid, secret } = getWechatConfig()if (!appid || !secret) {console.error('微信配置缺失:WECHAT_APPID  WECHAT_SECRET 未设置')return createResponse(50002, '服务配置异常,请联系管理员')}// 调用微信 jscode2session 接口const url = `https://api.weixin.qq.com/sns/jscode2session?appid=${appid}&secret=${secret}&js_code=${code}&grant_type=authorization_code`const res = await uniCloud.httpclient.request(url, {method: 'GET',dataType: 'json',timeout: 5000})const { openid, session_key, unionid, errcode, errmsg } = res.dataif (errcode && errcode !== 0) {console.error('jscode2session 失败:', errcode, errmsg)const errorMap = {40029: '无效的授权码(code已过期或已使用)',45011: 'API调用频率超限,请稍后重试',40125: 'AppSecret错误或已被重置','-1': '微信系统繁忙,请稍后重试'}return createResponse(40002, errorMap[errcode] || `微信服务异常(${errcode})`)}if (!openid) {return createResponse(40002, '获取微信授权失败,未返回openid')}// 关键安全步骤:存储 session_keyif (session_key) {await saveSessionKey(openid, session_key)}// 查找或创建用户const userCollection = db.collection('users')let user = await userCollection.where({ openid }).get()if (user.data.length === 0) {const userData = {openid,unionid: unionid || '',nickname: generateProjectNickname(),avatar: 'https://mp-11639816-19e7-45be-9d7d-5ede9af18c2c.cdn.bspapp.com/default-avatar.png',gender: 0,country: '中国',province: '',city: '',phone: '',account: '',role: 'user',create_time: Date.now(),last_login: Date.now(),status: 'active'}const addResult = await userCollection.add(userData)user = await userCollection.doc(addResult.id).get()} else {const updateData = { last_login: Date.now() }if (unionid && !user.data[0].unionid) {updateData.unionid = unionid}await userCollection.doc(user.data[0]._id).update(updateData)user = await userCollection.doc(user.data[0]._id).get()}const userId = user.data[0]._id// 设备登录检查const finalDeviceId = generateDeviceId(context, data)const finalDeviceType = getDeviceType(context, data)const deviceCheck = await checkAndRecordDevice(userId, finalDeviceId, finalDeviceType, user.data[0])if (!deviceCheck.allowed) {return createResponse(403, deviceCheck.message)}// 生成安全tokenconst token = generateSecureToken(userId)// 创建token记录const now = Date.now()await db.collection('user_tokens').add({token,user_id: userId,device_id: finalDeviceId,create_time: now,last_access_time: now,expire_time: now + TOKEN_EXPIRY})// 返回登录成功(不返回 session_keyreturn createResponse(0, '登录成功', {userInfo: user.data[0],token,expires_in: Math.floor(TOKEN_EXPIRY / 1000)})} catch (error) {console.error('微信登录异常:', error)return createResponse(50001, '登录服务异常,请稍后重试')}}

与文档初版的关键差异:

·函数签名增加了context参数,用于获取客户端IPUA信息

·解构参数从{ code, device_id, device_type }改为{ code, userInfo },设备信息由服务端从context中提取

·配置获取从process.env改为getWechatConfig()公共模块函数,更稳定可靠

·新用户默认头像使用CDN地址而非本地路径

4.2 session_key安全存储

async function saveSessionKey(openid, sessionKey) {try {const sessionCollection = db.collection('user_sessions')const now = Date.now()const existing = await sessionCollection.where({ openid }).get()if (existing.data.length > 0) {await sessionCollection.doc(existing.data[0]._id).update({session_key: sessionKey,update_time: now,expire_time: now + TOKEN_EXPIRY})} else {await sessionCollection.add({openid,session_key: sessionKey,create_time: now,expire_time: now + TOKEN_EXPIRY})}} catch (error) {console.error('存储 session_key 失败:', error)}}async function getSessionKey(openid) {try {const sessionCollection = db.collection('user_sessions')const result = await sessionCollection.where({openid,expire_time: dbCmd.gt(Date.now())}).orderBy('create_time', 'desc').limit(1).get()if (result.data.length > 0) {return result.data[0].session_key}return null} catch (error) {console.error('获取 session_key 失败:', error)return null}}

4.3 安全Token生成

function generateSecureToken(userId) {try {const crypto = require('crypto')const randomBytes = crypto.randomBytes(32).toString('hex')const payload = `${userId}_${Date.now()}_${randomBytes}`return crypto.createHash('sha256').update(payload).digest('hex')} catch (error) {console.warn('crypto模块不可用,使用降级token生成方案')return `${userId}_${Date.now()}_${Math.random().toString(36).substr(2, 16)}`}}

4.4 手机号解密登录

let cachedAccessToken = nulllet accessTokenExpireTime = 0async function getWechatAccessToken() {const now = Date.now()if (cachedAccessToken && now < accessTokenExpireTime - 5 * 60 * 1000) {return cachedAccessToken}const appid = process.env.WECHAT_APPIDconst secret = process.env.WECHAT_SECRETconst url = `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${appid}&secret=${secret}`const res = await uniCloud.httpclient.request(url, {method: 'GET',dataType: 'json'})const { access_token, expires_in, errcode } = res.dataif (errcode && errcode !== 0) {throw new Error(`获取access_token失败: ${res.data.errmsg}(${errcode})`)}cachedAccessToken = access_tokenaccessTokenExpireTime = now + (expires_in || 7200) * 1000return access_token}async function mpPhoneLogin(data) {const { phone_code, device_id, device_type } = dataif (!phone_code) {return createResponse(40001, '手机号授权码不能为空')}try {const accessToken = await getWechatAccessToken()const phoneUrl = `https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=${accessToken}`const phoneRes = await uniCloud.httpclient.request(phoneUrl, {method: 'POST',data: { code: phone_code },dataType: 'json',headers: { 'Content-Type': 'application/json' }})const { errcode, phone_info } = phoneRes.data// access_token过期时重试一次if (errcode === 40001 || errcode === 42001) {cachedAccessToken = nullaccessTokenExpireTime = 0const retryToken = await getWechatAccessToken()const retryUrl = `https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=${retryToken}`const retryRes = await uniCloud.httpclient.request(retryUrl, {method: 'POST',data: { code: phone_code },dataType: 'json',headers: { 'Content-Type': 'application/json' }})if (retryRes.data.errcode && retryRes.data.errcode !== 0) {return createResponse(40002, `获取手机号失败: ${retryRes.data.errmsg}`)}return await processPhoneLogin(retryRes.data.phone_info, device_id, device_type)}if (errcode && errcode !== 0) {return createResponse(40002, `获取手机号失败: ${phoneRes.data.errmsg}`)}if (!phone_info?.purePhoneNumber) {return createResponse(40003, '未获取到手机号信息')}return await processPhoneLogin(phone_info, device_id, device_type)} catch (error) {console.error('手机号登录异常:', error)return createResponse(50001, '登录服务异常,请稍后重试')}}

五、配置指南

5.1 微信公众平台配置

5.登录微信公众平台

6.进入"开发" → "开发管理" → "开发设置"

7.记录AppIDAppSecret

8.配置服务器域名(uniCloud云函数域名需加入安全域名列表)

5.2 云函数环境变量配置

uniCloud控制台为user-service云函数配置以下环境变量:

变量名

说明

WECHAT_APPID

wx_xxxxxxxx

微信小程序AppID

WECHAT_SECRET

xxxxxxxxxxxxxxxx

微信小程序AppSecret

绝对不能把AppSecret写进代码里。环境变量是云函数中最安全的配置方式,代码仓库里看不到,日志里也打印不出来。

5.3 数据库初始化

微信登录依赖以下数据库集合:

集合名

用途

必须字段

users

用户主表

openidnicknamecreate_time

user_sessions

session_key存储

openidsession_keyexpire_time

user_tokens

Token记录

tokenuser_iddevice_idexpire_time

user_devices

设备记录

user_iddevice_iddevice_type

六、常见问题排查

问题

原因

解决方案

jscode2session返回40029

code已过期或已使用

code只能用一次,5分钟过期,确保不重复使用

获取不到unionid

未绑定微信开放平台

如需跨应用统一用户,需在开放平台绑定小程序

手机号解密失败

session_key过期

用户重新登录获取新session_key

登录后token立即失效

设备ID不一致

确保token生成和验证使用同一device_id

getUserProfile返回默认数据

接口已废弃

使用头像昵称填写能力替代

七、微信审核合规清单

提交微信小程序审核前,逐项检查:

·[ ] 登录前必须展示隐私协议,且复选框默认未勾选

·[ ] 未勾选协议时登录按钮不可点击或点击后提示

·[ ] 不使用wx.getUserProfilewx.getUserInfo获取真实信息

·[ ] session_key不返回前端,不存储在客户端

·[ ] AppSecret不硬编码在代码中,使用环境变量

·[ ] 手机号获取使用getPhoneNumber+服务端解密

·[ ] 用户可随时退出登录并清除本地数据

写在最后

微信登录的代码量不大,但安全细节特别多。session_key管理、token安全生成、隐私合规——每一个点处理不好都可能成为安全隐患或审核被拒的原因。

实际做的时候,建议先把安全架构想清楚再动手写代码。我们最初把session_key返回了前端,后来安全审计发现才改过来,改的时候涉及前后端联动,比一开始就做对要麻烦得多。

参考资料

·微信小程序登录接口文档

·微信手机号快速验证

·uni-app微信登录指南

·微信开放平台unionid机制

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-06-04 09:49:18 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/708817.html
  2. 运行时间 : 0.151436s [ 吞吐率:6.60req/s ] 内存消耗:4,813.27kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=641cfd7dfa92e2b9d2ab3984f498a96e
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000611s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000980s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000350s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000269s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000654s ]
  6. SELECT * FROM `set` [ RunTime:0.000247s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000765s ]
  8. SELECT * FROM `article` WHERE `id` = 708817 LIMIT 1 [ RunTime:0.000615s ]
  9. UPDATE `article` SET `lasttime` = 1780537758 WHERE `id` = 708817 [ RunTime:0.041344s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000415s ]
  11. SELECT * FROM `article` WHERE `id` < 708817 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000592s ]
  12. SELECT * FROM `article` WHERE `id` > 708817 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002247s ]
  13. SELECT * FROM `article` WHERE `id` < 708817 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.011020s ]
  14. SELECT * FROM `article` WHERE `id` < 708817 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001230s ]
  15. SELECT * FROM `article` WHERE `id` < 708817 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002082s ]
0.155387s