diff --git a/app.js b/app.js index 645ef58..523528c 100644 --- a/app.js +++ b/app.js @@ -144,7 +144,8 @@ App({ code, data: res.encryptedData, iv: res.iv, - Options: this.globalData.launchOptions + Options: this.globalData.launchOptions, + inviter_nickname: wx.getStorageSync('inviter_nickname') }, success: res => resolve(res), fail: error => reject(error) @@ -162,6 +163,7 @@ App({ method: 'POST', data: { 'openid': wx.getStorageSync('openid'), + }, success: res => { console.log('获取信息成功', res); diff --git a/app.json b/app.json index ae6ab52..0c9ac9f 100644 --- a/app.json +++ b/app.json @@ -45,7 +45,7 @@ }, { "pagePath": "pages/video_list/video_list", - "text": "违规检测", + "text": "需求中心", "iconPath": "images/文案库.png", "selectedIconPath": "images/文案库点击.png" }, diff --git a/app.miniapp.json b/app.miniapp.json new file mode 100644 index 0000000..233f988 --- /dev/null +++ b/app.miniapp.json @@ -0,0 +1,5 @@ +{ + "adapteByMiniprogram": { + "userName": "gh_d6b54fcc1462" + } +} diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 5449f61..26710c7 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -20,7 +20,7 @@ Component({ pagePath: "/pages/video_list/video_list", iconPath: "/images/文案库.png", selectedIconPath: "/images/文案库点击.png", - text: "违规检测" + text: "需求中心" }, { pagePath: "/pages/mine/mine", diff --git a/i18n/base.json b/i18n/base.json new file mode 100644 index 0000000..5828202 --- /dev/null +++ b/i18n/base.json @@ -0,0 +1,11 @@ +{ + "ios": { + "name": "快影下载" + }, + "android": { + "name": "快影下载" + }, + "common": { + "name": "快影下载" + } +} diff --git a/images/qrcode_for_gh_e64390b2d04e_258.jpg b/images/qrcode_for_gh_e64390b2d04e_258.jpg new file mode 100644 index 0000000..b5d6a64 Binary files /dev/null and b/images/qrcode_for_gh_e64390b2d04e_258.jpg differ diff --git a/pages/bot-list/bot-list.js b/pages/bot-list/bot-list.js index ef6041f..a7dd463 100644 --- a/pages/bot-list/bot-list.js +++ b/pages/bot-list/bot-list.js @@ -141,6 +141,7 @@ Page({ }, copyAccount(e) { + console.log(e.currentTarget.dataset) const account = e.currentTarget.dataset.account; wx.setClipboardData({ data: account, diff --git a/pages/index/index.js b/pages/index/index.js index 3e1ed99..ac17437 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -14,7 +14,8 @@ Page({ page: 1, isLoading: false, hasMore: true, - externalOpenid:'' + externalOpenid: '', + showQrcodePopup: false, // 新增:二维码弹窗显示状态 }, // 切换单选框模式 @@ -169,8 +170,37 @@ goToExtract(e) { openid: wx.getStorageSync("openid") }, success: (res) => { - console.log("视频提取结果:", res); - if (res.data.data.medias[0]) { + // 新增额度判断 + if (res.data.success === false || res.data.code === 1000) { + let isIOS = false; + try { + const sysInfo = wx.getSystemInfoSync(); + isIOS = sysInfo.system.toLowerCase().indexOf('ios') !== -1; + } catch (e) { + console.error('获取系统信息失败'); + } + if (isIOS) { + this.setData({ showQrcodePopup: true }); + } else { + wx.showModal({ + title: "提取视频", + content:"哎呀!去开通会员不限次数使用哦", + confirmColor: "#00B269", + cancelColor: "#858585", + success: function(e) { + if (e.confirm) { + wx.navigateTo({ + url: "../vip_recharge/vip_recharge?show=true" + }); + } + } + }); + } + wx.hideLoading(); + return; + } + // 只有额度足够才执行下面 + if (res.data.data && res.data.data.medias && res.data.data.medias[0]) { const media = res.data.data.medias[0]; wx.navigateTo({ url: `../video/video?url=${encodeURIComponent(media.resource_url)}&image=${encodeURIComponent(media.preview_url)}&preview=${encodeURIComponent(res.data.data.text)}&type=index&read_count=0` @@ -181,6 +211,7 @@ goToExtract(e) { icon: "none" }); } + wx.hideLoading(); }, fail: (err) => { console.error("视频解析失败:", err); @@ -226,17 +257,31 @@ extractText() { }, success(res) { if (res.data.success === false) { - wx.showModal({ - title: "提取视频", - content: '哎呀!去开通会员不限次数使用哦', - confirmColor: "#00B269", - cancelColor: "#858585", - success: function(e) { - e.confirm ? (console.log("确定"), wx.navigateTo({ - url: "../vip_recharge/vip_recharge?show=true" - })) : e.cancel && console.log("取消"); - } - }); + // 判断系统类型(平台) + let isIOS = false; + try { + const sysInfo = wx.getSystemInfoSync(); + isIOS = sysInfo.system.toLowerCase().indexOf('ios') !== -1; + } catch (e) { + console.error('获取系统信息失败'); + } + if (isIOS) { + // iOS弹二维码弹窗 + that.setData({ showQrcodePopup: true }); + } else { + // 安卓弹原有会员弹窗 + wx.showModal({ + title: "提取视频", + content: '哎呀!去开通会员不限次数使用哦', + confirmColor: "#00B269", + cancelColor: "#858585", + success: function(e) { + e.confirm ? (console.log("确定"), wx.navigateTo({ + url: "../vip_recharge/vip_recharge?show=true" + })) : e.cancel && console.log("取消"); + } + }); + } wx.hideLoading(); return; } @@ -459,5 +504,10 @@ removeTimestampAndMergeLines: function(textWithTimestamp) { path: `/pages/index/index?uuid=${wx.getStorageSync("uuid")}`, imageUrl: "/images/share.jpg" }; - } + }, + + // 关闭二维码弹窗 + closeQrcodePopup() { + this.setData({ showQrcodePopup: false }); + }, }); diff --git a/pages/index/index.json b/pages/index/index.json index bdc9a71..5ec2ab9 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -2,7 +2,7 @@ "usingComponents": { "popup": "/popup/popup" }, - "navigationBarTitleText": "快影下载", + "navigationBarTitleText": "抖视下载", "navigationBarBackgroundColor": "#222238", "navigationBarTextStyle": "white" diff --git a/pages/index/index.wxml b/pages/index/index.wxml index e53a682..5d60663 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -116,3 +116,11 @@ buttonText="查看详情" targetUrl="/pages/details/details" /> + + + + + 长按识别二维码,前往公众号获取更多额度 + 关闭 + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 3573416..5907176 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -364,4 +364,57 @@ page { 40% { transform: translateY(-10rpx); } +} + +.qrcode-popup-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 2000; + display: flex; + align-items: center; + justify-content: center; +} +.qrcode-popup { + background: #fff; + border-radius: 18px; + box-shadow: 0 8px 32px rgba(0,0,0,0.25); + padding: 32px 24px 20px 24px; + display: flex; + flex-direction: column; + align-items: center; + min-width: 260px; + max-width: 80vw; +} +.qrcode-img { + width: 180px; + height: 180px; + border-radius: 12px; + margin-bottom: 18px; + box-shadow: 0 2px 12px rgba(0,0,0,0.10); +} +.qrcode-tip { + font-size: 16px; + color: #333; + margin-bottom: 18px; + text-align: center; + font-weight: 500; +} +.qrcode-close-btn { + margin-top: 8px; + padding: 8px 32px; + background: linear-gradient(90deg, #8d72d2, #7183f3); + color: #fff; + border: none; + border-radius: 24px; + font-size: 15px; + font-weight: bold; + box-shadow: 0 2px 8px rgba(0,0,0,0.10); + transition: background 0.2s; +} +.qrcode-close-btn:active { + background: linear-gradient(90deg, #7183f3, #8d72d2); } \ No newline at end of file diff --git a/pages/invite_incentive/invite_incentive.js b/pages/invite_incentive/invite_incentive.js index 45234f1..8ac9e44 100644 --- a/pages/invite_incentive/invite_incentive.js +++ b/pages/invite_incentive/invite_incentive.js @@ -33,7 +33,8 @@ Page({ n.setData({ inviteCount: wx.getStorageSync("invitees_count"), rewardCount: 10 * wx.getStorageSync("invitees_count"), - number: wx.getStorageSync("balance") + number: wx.getStorageSync("balance"), + uuid:wx.getStorageSync("uuid"), }); }).catch(function(e) { console.error("An error occurred:", e); diff --git a/pages/invite_incentive/invite_incentive.wxml b/pages/invite_incentive/invite_incentive.wxml index 7c72701..5915ff8 100644 --- a/pages/invite_incentive/invite_incentive.wxml +++ b/pages/invite_incentive/invite_incentive.wxml @@ -20,7 +20,7 @@ 禁止任何形式的作弊行为, 如发现使用外挂等违规行为, 将取消活动资格。 - 活动限时有效 + 本活动方式仅向合作者开放 /pages/index/index?uuid={{uuid}} diff --git a/pages/mine/mine.js b/pages/mine/mine.js index 6c6943c..d9f8ec2 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -46,7 +46,7 @@ Component({ var e = this.data.endTime; // 将秒时间戳转换为毫秒时间戳 var date = new Date(e * 1000); - + // 格式化为“YYYY年MM月DD日” var year = date.getFullYear(); var month = String(date.getMonth() + 1).padStart(2, "0"); // 月份从 0 开始,需要 +1 diff --git a/pages/video/video.js b/pages/video/video.js index 3c27a0f..1bddb36 100644 --- a/pages/video/video.js +++ b/pages/video/video.js @@ -13,6 +13,7 @@ Page({ totalLength: 0, isExtracting: false, read_count: 0, + showQrcodePopup: false, // 新增:二维码弹窗显示状态 }, onLoad: function (options) { @@ -131,6 +132,7 @@ Page({ // 扣除额度 CreditLimit() { + var that = this; return new Promise((resolve, reject) => { app.apiRequest({ url: '/myapp/increment-download-count/', @@ -143,17 +145,26 @@ Page({ console.log(e, !e.data.success) if (e.data.success === false) { wx.hideLoading() - wx.showModal({ - title: "提取视频", - content: '哎呀!去开通会员不限次数使用哦', - confirmColor: "#00B269", - cancelColor: "#858585", - success: function (e) { - e.confirm ? (console.log("确定"), wx.navigateTo({ - url: "../vip_recharge/vip_recharge?show=true" - })) : e.cancel && console.log("取消"); - } - }) + // 判断系统类型 + const systemInfo = wx.getSystemInfoSync(); + const isIOS = systemInfo.system.toLowerCase().indexOf('ios') !== -1; + if (isIOS) { + // iOS弹二维码弹窗 + that.setData({ showQrcodePopup: true }); + } else { + // 安卓弹原有会员弹窗 + wx.showModal({ + title: "提取视频", + content: '哎呀!去开通会员不限次数使用哦', + confirmColor: "#00B269", + cancelColor: "#858585", + success: function (e) { + e.confirm ? (console.log("确定"), wx.navigateTo({ + url: "../vip_recharge/vip_recharge?show=true" + })) : e.cancel && console.log("取消"); + } + }) + } resolve(false) } resolve(true) @@ -551,4 +562,9 @@ Page({ } }); }, + + // 关闭二维码弹窗 + closeQrcodePopup: function () { + this.setData({ showQrcodePopup: false }); + }, }); \ No newline at end of file diff --git a/pages/video/video.wxml b/pages/video/video.wxml index 2ca4915..6b400c0 100644 --- a/pages/video/video.wxml +++ b/pages/video/video.wxml @@ -26,3 +26,11 @@ buttonText="查看详情" targetUrl="/pages/details/details" /> + + + + + 长按识别二维码,前往公众号获取更多额度 + 关闭 + + diff --git a/pages/video/video.wxss b/pages/video/video.wxss index 32e0a2e..fab3130 100644 --- a/pages/video/video.wxss +++ b/pages/video/video.wxss @@ -86,4 +86,77 @@ page { .advertisement image { width: 100%; +} + +/* 二维码弹窗样式 */ +.qrcode-popup-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 2000; + display: flex; + align-items: center; + justify-content: center; +} + +.qrcode-popup { + background: #fff; + border-radius: 18px; + box-shadow: 0 8px 32px rgba(0,0,0,0.25); + padding: 32px 24px 20px 24px; + display: flex; + flex-direction: column; + align-items: center; + min-width: 260px; + max-width: 80vw; + animation: popupFadeIn 0.3s ease; +} + +@keyframes popupFadeIn { + from { + opacity: 0; + transform: scale(0.9); + } + to { + opacity: 1; + transform: scale(1); + } +} + +.qrcode-img { + width: 180px; + height: 180px; + border-radius: 12px; + margin-bottom: 18px; + box-shadow: 0 2px 12px rgba(0,0,0,0.10); +} + +.qrcode-tip { + font-size: 16px; + color: #333; + margin-bottom: 18px; + text-align: center; + font-weight: 500; + line-height: 1.4; +} + +.qrcode-close-btn { + margin-top: 8px; + padding: 8px 32px; + background: linear-gradient(90deg, #8d72d2, #7183f3); + color: #fff; + border: none; + border-radius: 24px; + font-size: 15px; + font-weight: bold; + box-shadow: 0 2px 8px rgba(0,0,0,0.10); + transition: all 0.2s ease; +} + +.qrcode-close-btn:active { + transform: scale(0.95); + background: linear-gradient(90deg, #7183f3, #8d72d2); } \ No newline at end of file diff --git a/pages/video_list/video_list.js b/pages/video_list/video_list.js index 7047737..ea3ab75 100644 --- a/pages/video_list/video_list.js +++ b/pages/video_list/video_list.js @@ -2,237 +2,212 @@ const app = getApp(); Page({ data: { - inputValue: '', // 输入框的内容 - detectResult: '', // 识别结果 - detectType: 'text', // 默认识别类型为文本 - maxLength: 20000, // 最大允许的字节数 - inputLength: 0, // 当前输入的字节数 - task_id: '', // 任务ID - detectButtonDisabled: false, // 文本检测按钮是否禁用 - modifyButtonDisabled: false // 智能修改按钮是否禁用 + requirementTypes: [ + { value: 'new_feature', label: '新功能需求' }, + { value: 'cooperation', label: '合作需求' }, + { value: 'advertising', label: '广告投放' }, + { value: 'miniapp_dev', label: '小程序开发' }, + { value: 'software_custom', label: '软件定制' }, + { value: 'other', label: '其他需求' } + ], + selectedType: '', // 选中的需求类型 + title: '', // 需求标题 + description: '', // 功能描述 + contactInfo: '', // 联系方式(微信号) + submitButtonDisabled: false, // 提交按钮是否禁用 + showTypeSelector: false // 是否显示类型选择器 }, onLoad: function(e) { - wx.showShareMenu({ - withShareTicket: true, - menus: ["shareAppMessage", "shareTimeline"] - }); }, onShow: function() { var t = this; - t.resetData() + t.resetData(); app.getCurrentTabbar(2, this); app.checkUpdateVersion(); app.getUserInfo().then(() => { console.log('获取用户信息完成'); - console.log(wx.getStorageSync('defaultDailyFreeParseNum')); - const rewrittenText = wx.getStorageSync('rewrittenText'); // 从缓存中获取存储的文案 - if (rewrittenText) { - this.setData({ - inputValue: rewrittenText // 设置到页面的数据中 - }); - wx.removeStorageSync('rewrittenText'); // 清除数据,避免下次重复加载 - wx.showToast({ - title: '点击开始检测按钮检测文本违规词。', - icon: 'none' - }); - } - }).catch(error => { console.error('获取用户信息失败:', error); }).finally(() => { console.log('getUserInfo调用完成'); }); }, + resetData: function() { // 重置页面数据为默认值 this.setData({ - inputValue: '', // 输入框的内容 - detectResult: '', // 识别结果 - detectType: 'text', // 默认识别类型为文本 - inputLength: 0, // 当前输入的字节数 - task_id: '', // 任务ID - detectButtonDisabled: false, // 文本检测按钮是否禁用 - modifyButtonDisabled: false // 智能修改按钮是否禁用 + selectedType: '', + title: '', + description: '', + contactInfo: '', + submitButtonDisabled: false, + showTypeSelector: false }); }, - // 切换识别类型 - switchDetectType(e) { - const detectType = e.currentTarget.dataset.type; - this.recordClick(detectType); + + // 显示需求类型选择器 + showTypeSelector() { this.setData({ - detectType, - detectResult: '' // 切换时清空结果 + showTypeSelector: true }); - - if (detectType === 'audio' || detectType === 'video') { - wx.showToast({ - title: '该功能正在开发中', - icon: 'none' - }); - } else { - wx.showToast({ - title: '切换到文本识别', - icon: 'none' - }); - } }, - // 文本识别函数 - detectText() { - const { inputValue, maxLength } = this.data; - const byteSize = this.getByteLength(inputValue); + // 隐藏需求类型选择器 + hideTypeSelector() { + this.setData({ + showTypeSelector: false + }); + }, - // 检查文本是否为空或长度过短 - if (!inputValue.trim() || this.getByteLength(inputValue) < 10) { + // 选择需求类型 + selectType(e) { + const type = e.currentTarget.dataset.type; + const label = e.currentTarget.dataset.label; + this.setData({ + selectedType: type, + selectedTypeLabel: label, + showTypeSelector: false + }); + }, + + // 处理标题输入 + onTitleInput(e) { + this.setData({ + title: e.detail.value + }); + }, + + // 处理描述输入 + onDescriptionInput(e) { + this.setData({ + description: e.detail.value + }); + }, + + // 处理联系方式输入 + onContactInput(e) { + this.setData({ + contactInfo: e.detail.value + }); + }, + + // 验证表单 + validateForm() { + const { selectedType, description, contactInfo } = this.data; + + if (!selectedType) { wx.showToast({ - title: '请输入有效的文本', + title: '请选择需求类型', icon: 'none' }); + return false; + } + + if (!description.trim()) { + wx.showToast({ + title: '请填写功能描述', + icon: 'none' + }); + return false; + } + + if (!contactInfo.trim()) { + wx.showToast({ + title: '请填写微信号', + icon: 'none' + }); + return false; + } + + return true; + }, + + // 提交需求 + submitRequirement() { + if (!this.validateForm()) { return; } - // 超出字节长度检测 - if (byteSize > maxLength) { - wx.showToast({ - title: `内容不能超过 ${maxLength} 字节`, - icon: 'none' - }); - return; - } - - // 禁用检测按钮 - this.setData({ detectButtonDisabled: true }); + // 禁用提交按钮 + this.setData({ submitButtonDisabled: true }); wx.showLoading({ - title: '正在检测...', + title: '正在提交...', }); - // 调用后端审核接口 + const { selectedType, title, description, contactInfo } = this.data; + + // 调用后端需求提交接口 app.apiRequest({ - url: '/myapp/text_review/', + url: '/myapp/submit_requirement/', method: 'POST', data: { - text: inputValue, openid: wx.getStorageSync('openid'), - nickname: wx.getStorageSync('uuid') + nickname: wx.getStorageSync('uuid'), + requirement_type: selectedType, + title: title, + description: description, + contact_info: contactInfo, + wechat_id: contactInfo // 使用同一个值作为微信号 }, success: (res) => { wx.hideLoading(); - this.setData({ detectButtonDisabled: false }); // 启用检测按钮 - if (res.data.code === 200) { - // 审核成功 - this.setData({ - detectResult: res.data.data.result, - task_id: res.data.task_id - }); - console.log(res.data.data.result); - wx.showToast({ - title: '检测成功', - icon: 'success' - }); - if (res.data.data.result.conclusion === '不合规') { - wx.showModal({ - title: "提示", - content: "检测结果不合规,是否使用智能合规功能一键修改文案?", - confirmText: "一键修改", - cancelText: "取消", - success: (modalRes) => { - if (modalRes.confirm) { - this.modifyContent(); // 调用一键合规函数 - } - } - }); - } - } else if (res.data.code === 400 && res.data.message === '余额不足') { - // 积分不足,提示充值 + this.setData({ submitButtonDisabled: false }); + + if (res.data.success) { wx.showModal({ - title: "检测文本", - content: '创意点不足!', - confirmColor: "#00B269", - cancelColor: "#858585", - success: function(e) { - if (e.confirm) { - console.log("确定"); - wx.navigateTo({ - url: "../vip_recharge/vip_recharge?show=true" - }); - } else { - console.log("取消"); - } + title: "提交成功", + content: res.data.message || "需求提交成功,我们会尽快处理您的需求", + showCancel: false, + confirmText: "确定", + success: () => { + // 重置表单 + this.resetData(); } }); } else { - // 其他失败情况 wx.showToast({ - title: res.data.message || '检测失败,请稍后重试', + title: res.data.error || '提交失败,请稍后重试', icon: 'none' }); } }, fail: (err) => { wx.hideLoading(); - this.setData({ detectButtonDisabled: false }); // 启用检测按钮 + this.setData({ submitButtonDisabled: false }); console.error('请求失败:', err); - wx.showToast({ - title: '网络异常,请稍后重试', - icon: 'none' - }); + + // 处理常见错误 + if (err.statusCode === 400) { + wx.showToast({ + title: '请检查填写信息', + icon: 'none' + }); + } else if (err.statusCode === 404) { + wx.showToast({ + title: '用户信息异常,请重新登录', + icon: 'none' + }); + } else { + wx.showToast({ + title: '网络异常,请稍后重试', + icon: 'none' + }); + } } }); }, - // 计算文本的字节长度(区分中英文) - getByteLength(text) { - return text.replace(/[^\x00-\xff]/g, 'aa').length; - }, - - // 处理输入框内容变化 - bindInput(e) { - const inputValue = e.detail.value; - const inputLength = this.getByteLength(inputValue); - - // 更新输入内容和字节长度 - this.setData({ - inputValue, - inputLength - }); - - // 如果字数超出最大限制,提示用户 - if (inputLength > this.data.maxLength) { - wx.showToast({ - title: `已超出 ${this.data.maxLength} 字节`, - icon: 'none' - }); - } - }, - - // 复制内容 - copyContent() { - wx.setClipboardData({ - data: this.data.inputValue, - success() { - wx.showToast({ - title: '内容已复制', - icon: 'none' - }); - } - }); - }, - - // 清空输入框内容 - clearInput() { + // 清空表单 + clearForm() { wx.showModal({ title: "提示", content: "确定要清空所有内容吗?", success: (res) => { if (res.confirm) { - this.setData({ - inputValue: '', - inputLength: 0, - detectResult: '' - }); + this.resetData(); wx.showToast({ title: '已清空内容', icon: 'none' @@ -240,89 +215,5 @@ Page({ } } }); - }, - - // 调用智能修改(AI合规) - modifyContent() { - // 禁用智能修改按钮 - this.setData({ modifyButtonDisabled: true }); - - wx.showLoading({ - title: '正在修改...', - }); - - app.apiRequest({ - url: '/myapp/ai_modify_text/', - method: 'POST', - data: { - task_id: this.data.task_id, - openid: wx.getStorageSync('openid') - }, - success: (res) => { - wx.hideLoading(); - this.setData({ modifyButtonDisabled: false }); // 启用智能修改按钮 - if (res.data.code === 200) { - // 修改成功 - this.setData({ - inputValue: res.data.data.modified_text, - detectResult: '' // 清空检测结果 - }); - wx.showToast({ - title: '修改成功', - icon: 'success' - }); - }else if (res.data.code === 400 && res.data.message === '积分不足,请充值') { - // 积分不足,提示用户充值并引导 - wx.showModal({ - title: "提示", - content: "您的积分不足,无法进行智能修改,请充值后再尝试。", - confirmText: "去充值", - cancelText: "取消", - success: (modalRes) => { - if (modalRes.confirm) { - wx.navigateTo({ - url: "../vip_recharge/vip_recharge?show=true" - }); - } - } - }); - } else { - // 其他失败情况 - wx.showToast({ - title: res.data.message || '修改失败,请稍后重试', - icon: 'none' - }); - } - }, - fail: (err) => { - wx.hideLoading(); - this.setData({ modifyButtonDisabled: false }); // 启用智能修改按钮 - console.error('请求失败:', err); - wx.showToast({ - title: '网络异常,请稍后重试', - icon: 'none' - }); - } - }); - }, - - // 记录点击的功能类型 - recordClick(functionClicked) { - app.apiRequest({ - url: `/myapp/record_click/`, // 点击统计接口 - method: 'POST', - data: { - openid: wx.getStorageSync('openid'), - nickname: wx.getStorageSync('uuid'), - function_clicked: functionClicked - }, - header: { - 'content-type': 'application/json' - }, - success: (res) => { - - } - }); } - }); diff --git a/pages/video_list/video_list.json b/pages/video_list/video_list.json index 45efe44..88546e0 100644 --- a/pages/video_list/video_list.json +++ b/pages/video_list/video_list.json @@ -1,5 +1,5 @@ { - "navigationBarTitleText": "违规词识别", + "navigationBarTitleText": "需求提交", "navigationBarBackgroundColor": "#222238", "navigationBarTextStyle": "white", "component": true, diff --git a/pages/video_list/video_list.wxml b/pages/video_list/video_list.wxml index 1721310..f8fbe3e 100644 --- a/pages/video_list/video_list.wxml +++ b/pages/video_list/video_list.wxml @@ -1,85 +1,90 @@ - + - - - - - + 提交您的需求 + 我们会认真考虑每一个建议 - - - - - - - - {{inputLength}} / {{maxLength}} - 内容不能超过 {{maxLength}} 字节 - - - - - - - - - - - - - - - 单次消耗3创意点。检测中请勿退出本页面,很快完成 - - - - - - 检测报告 - - - - - 检测结果: {{detectResult.conclusion}} - - - - - - - - 疑似命中 - 关键词 - 字符位置 - 置信度 - - - - - - {{item.reason}} - {{item.keyword}} - {{item.position}} - {{item.confidence}} + + + + + + 需求类型 * + + + {{selectedTypeLabel || '请选择需求类型'}} + + > - - + - - - - 功能介绍:本功能用于检测文本中可能存在的违规内容,帮助用户规避潜在风险。\n - 免责声明:本检测结果仅供参考,具体结果请以实际情况为准,平台不承担由此产生的任何法律责任。 + + + 需求标题 + + + + + + 功能描述 * + + + + + + 微信号 * + + + + + + + + + + + + • 请详细描述您的需求,便于我们更好地理解和评估 + - + + + + + + 选择需求类型 + × + + + + {{item.label}} + + + + diff --git a/pages/video_list/video_list.wxss b/pages/video_list/video_list.wxss index 6723c30..627c971 100644 --- a/pages/video_list/video_list.wxss +++ b/pages/video_list/video_list.wxss @@ -8,44 +8,28 @@ page { display: flex; flex-direction: column; padding: 20px; + min-height: 100vh; } .header { - display: flex; - justify-content: space-around; - margin-bottom: 20px; - width: 100%; -} - -.button-group { - display: flex; - width: 100%; - justify-content: space-around; -} - -.detect-button{ - width: 30%; - height: 35px; - font-size: 12px; - line-height: 35px; - background: linear-gradient(90deg, #8d72d2, #7183f3); - border-radius: 5px; text-align: center; - color: white; - box-shadow: 0 4px 10px rgba(141, 114, 210, 0.4); - transition: background 0.3s, transform 0.3s; + margin-bottom: 30px; + width: 100%; } -.detect-button:hover { - background: linear-gradient(90deg, #664da5, #4e66d8); - +.title { + font-size: 24px; + color: #fff; + font-weight: bold; + margin-bottom: 10px; } -.active { - border: 1px solid #fff; +.subtitle { + font-size: 14px; + color: #a790e2; } -.input-area { +.form-area { width: 100%; background-color: #222238; box-shadow: 0 4px 10px rgba(141, 114, 210, 0.4); @@ -55,150 +39,225 @@ page { margin-bottom: 20px; } +.form-item { + margin-bottom: 20px; +} + +.label { + font-size: 14px; + color: #fff; + margin-bottom: 8px; + display: block; +} + +.required { + color: #ff4d4f; +} + .input-field { background: #33334c; color: #a790e2; - padding: 15px; + padding: 12px 15px; box-sizing: border-box; border-radius: 5px; width: 100%; - height: 230px; + height: 40px; + border: 1px solid #a790e2; + outline: none; + font-size: 14px; +} + +.textarea-field { + background: #33334c; + color: #a790e2; + padding: 12px 15px; + box-sizing: border-box; + border-radius: 5px; + width: 100%; + height: 120px; border: 1px solid #a790e2; outline: none; resize: none; font-size: 14px; } -.input-field:hover { +.input-field:hover, .textarea-field:hover { border-color: #fff; } +.type-selector { + background: #33334c; + color: #a790e2; + padding: 0 15px; + box-sizing: border-box; + border-radius: 5px; + width: 100%; + height: 40px; + border: 1px solid #a790e2; + display: flex; + justify-content: space-between; + align-items: center; +} + +.type-selector:hover { + border-color: #fff; +} + +.placeholder { + color: #999; + line-height: 1; +} + +.selected { + color: #a790e2; + line-height: 0.2; +} + +.arrow { + color: #a790e2; + font-size: 16px; + line-height: 1; +} + .button-group { display: flex; justify-content: space-between; - margin-top: 10px; + margin-top: 20px; } -.copy-button, .modify-button ,.detect-button, .clear-button{ - width: 30%; - +.submit-button, .clear-button { + width: 48%; + height: 40px; box-sizing: border-box; - background: linear-gradient(90deg, #8d72d2, #7183f3); border-radius: 5px; text-align: center; color: white; font-size: 14px; - + line-height: 40px; box-shadow: 0 4px 10px rgba(141, 114, 210, 0.4); transition: background 0.3s, transform 0.3s; } -.copy-button:hover, .modify-button:hover { +.submit-button { + background: linear-gradient(90deg, #8d72d2, #7183f3); +} + +.submit-button:hover { background: linear-gradient(90deg, #664da5, #4e66d8); transform: translateY(-2px); } -.result-area { +.clear-button { + background: linear-gradient(90deg, #666, #888); +} + +.clear-button:hover { + background: linear-gradient(90deg, #555, #777); + transform: translateY(-2px); +} + +.disclaimer { margin-top: 20px; - background: linear-gradient(135deg, #a3a3df, #eaeaf5); /* 浅色渐变背景 */ - width: 90%; padding: 15px; - border-radius: 10px; - box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* 添加轻微阴影效果 */ - margin-bottom: 20px; - border: 1px solid #ddd; /* 增加边框 */ -} -.text-counter{ + background: rgba(167, 144, 226, 0.1); + border-radius: 5px; + color: #a790e2; font-size: 12px; - color: white; - text-align: left; - margin:2px; -} -.error-text { - color: red; - margin-left: 60px; + line-height: 1.5; } -/* 报告容器样式 */ -.report-container { - width: 95%; - background-color: #f5f8ff; - padding: 20rpx; - border-radius: 15rpx; - box-shadow: 0rpx 5rpx 15rpx rgba(0, 0, 0, 0.1); - margin-top: 20rpx; - margin-bottom: 45px; +.disclaimer text { + display: block; + margin-bottom: 5px; } -/* 标题样式 */ -.report-title { - font-size: 36rpx; - color: #333; - font-weight: bold; - text-align: center; - margin-bottom: 2rpx; -} - -/* 检测结果样式 */ -.result-summary { - font-size: 28rpx; - color: #666; - margin-bottom: 20rpx; - text-align: center; -} - -/* 合规与不合规文本样式 */ -.compliant { - color: #00b269; /* 绿色 */ -} - -.non-compliant { - color: #ff4d4f; /* 红色 */ -} - -/* 表格样式 */ -.result-table { +/* 弹窗样式 */ +.type-selector-modal { + position: fixed; + top: 0; + left: 0; width: 100%; - border-collapse: collapse; + height: 100%; + z-index: 1000; } -/* 表格行样式 */ -.table-row { +.modal-mask { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); +} + +.modal-content { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + background: #222238; + border-radius: 15px 15px 0 0; + padding: 20px; + box-sizing: border-box; + animation: slideUp 0.3s ease-out; +} + +@keyframes slideUp { + from { + transform: translateY(100%); + } + to { + transform: translateY(0); + } +} + +.modal-header { display: flex; justify-content: space-between; - padding: 10rpx 0; - border-bottom: 1rpx solid #eaeaea; + align-items: center; + margin-bottom: 20px; + border-bottom: 1px solid #a790e2; + padding-bottom: 15px; } -/* 表格头部样式 */ -.table-header { +.modal-title { + font-size: 16px; + color: #fff; font-weight: bold; - background-color: #eef1f8; - padding: 10rpx 0; - text-align: center; } -/* 表格单元格样式 */ -.table-cell { - flex: 1; - text-align: center; - font-size: 26rpx; - color: #333; - padding: 10rpx 0; +.modal-close { + font-size: 24px; + color: #a790e2; + cursor: pointer; } -/* 底部空白区 */ -.bottom-space { - height: 50rpx; +.type-list { + max-height: 300px; + overflow-y: auto; } -/* Disclaimer styling */ -.disclaimer { - margin-top: 20rpx; - padding: 10rpx; - color: #999; - font-size: 22rpx; /* 小号字体 */ - text-align: center; +.type-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px 0; + border-bottom: 1px solid rgba(167, 144, 226, 0.2); +} + +.type-item:last-child { + border-bottom: none; +} + +.type-label { + font-size: 14px; + color: #a790e2; +} + +.type-check { + font-size: 16px; + color: #00b269; + font-weight: bold; } diff --git a/pages/vip_recharge/vip_recharge.js b/pages/vip_recharge/vip_recharge.js index 57ce500..2bf10fe 100644 --- a/pages/vip_recharge/vip_recharge.js +++ b/pages/vip_recharge/vip_recharge.js @@ -8,47 +8,25 @@ Page({ selectedType: null, cards: [], isQuota: false, - show: false, + show: true, // 默认显示,前端判断 isIOS: false, // 是否为 iOS 系统 + showQrcodePopup: false, // 新增:二维码弹窗显示状态 }, onLoad: function (e) { const that = this; - getApp().check_status() - .then(function(res) { - that.setData({ - show: res.data.data.show - }); - if (!that.data.show) { - wx.showModal({ - title: "提示", - content: "iOS 暂时无法使用此功能,请稍后再试。", - showCancel: false, - confirmText: "知道了", - success: () => { - // 可选:用户确认后返回上一级页面 - wx.reLaunch({ - url: "/pages/index/index", - }) - } - }); - return; // 停止执行后续逻辑 - } - }) - .catch(function(err) { - console.error("获取文章信息失败:", err); - }) - .finally(function() { - console.log("check_status调用完成"); - }); - // 使用 wx.getDeviceInfo() 检测系统是否为 iOS - - - + // 前端判断系统类型 + const systemInfo = wx.getSystemInfoSync(); + const isIOS = systemInfo.system.toLowerCase().indexOf('ios') !== -1; + this.setData({ isIOS }); + if (isIOS) { + // iOS弹二维码弹窗 + this.setData({ showQrcodePopup: true, show: false }); + return; + } // 非 iOS 系统,继续加载页面逻辑 var t = wx.getStorageSync("cards").filter(function (t) { return t.is_quota === JSON.parse(e.isQuota || "false"); }); - console.log("renderCards", t); this.setData({ cards: t, @@ -169,7 +147,7 @@ Page({ // 将秒时间戳转换为毫秒时间戳 var date = new Date(e * 1000); - // 格式化为“YYYY年MM月DD日” + // 格式化为"YYYY年MM月DD日" var year = date.getFullYear(); var month = String(date.getMonth() + 1).padStart(2, "0"); // 月份从 0 开始,需要 +1 var day = String(date.getDate()).padStart(2, "0"); @@ -184,4 +162,15 @@ Page({ onPullDownRefresh: function () {}, onReachBottom: function () {}, onShareAppMessage: function () {}, + + // 关闭二维码弹窗 + closeQrcodePopup: function() { + this.setData({ showQrcodePopup: false }); + wx.navigateBack(); // 返回上一页 + }, + + // 阻止事件冒泡 + preventDefault: function(e) { + // 阻止点击弹窗内容时触发关闭 + } }); diff --git a/pages/vip_recharge/vip_recharge.wxml b/pages/vip_recharge/vip_recharge.wxml index 07cadec..532f64c 100644 --- a/pages/vip_recharge/vip_recharge.wxml +++ b/pages/vip_recharge/vip_recharge.wxml @@ -30,3 +30,11 @@ 成为会员,享受无限使用功能特权,体验更多专属内容! + + + + + IOS此功能暂不可用。长按识别二维码,前往公众号获取更多额度 + 关闭 + + diff --git a/pages/vip_recharge/vip_recharge.wxss b/pages/vip_recharge/vip_recharge.wxss index ed7167f..13ea4b8 100644 --- a/pages/vip_recharge/vip_recharge.wxss +++ b/pages/vip_recharge/vip_recharge.wxss @@ -130,4 +130,103 @@ page { .right { color: #fff; +} + +/* 二维码弹窗样式 */ +.qrcode-popup-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.7); + z-index: 2000; + display: flex; + align-items: center; + justify-content: center; + backdrop-filter: blur(4px); +} + +.qrcode-popup { + background: linear-gradient(145deg, #2f2f50, #383861); + border-radius: 24px; + box-shadow: 0 12px 36px rgba(0,0,0,0.3); + padding: 36px 28px 24px; + display: flex; + flex-direction: column; + align-items: center; + min-width: 280px; + max-width: 85vw; + animation: popupFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); + border: 1px solid rgba(255, 255, 255, 0.1); +} + +@keyframes popupFadeIn { + 0% { + opacity: 0; + transform: scale(0.95) translateY(10px); + } + 100% { + opacity: 1; + transform: scale(1) translateY(0); + } +} + +.qrcode-img { + width: 200px; + height: 200px; + border-radius: 16px; + margin-bottom: 24px; + box-shadow: 0 4px 16px rgba(0,0,0,0.15); + background: #fff; + padding: 8px; + transition: transform 0.3s ease; +} + +.qrcode-img:active { + transform: scale(0.98); +} + +.qrcode-tip { + font-size: 17px; + color: #a790e2; + margin-bottom: 24px; + text-align: center; + font-weight: 500; + line-height: 1.5; + padding: 0 12px; +} + +.qrcode-close-btn { + margin-top: 12px; + padding: 12px 36px; + background: linear-gradient(90deg, #8d72d2, #7183f3); + color: #fff; + border: none; + border-radius: 24px; + font-size: 16px; + font-weight: 600; + box-shadow: 0 4px 12px rgba(141, 114, 210, 0.3); + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +.qrcode-close-btn:active { + transform: scale(0.96); + background: linear-gradient(90deg, #7183f3, #8d72d2); + box-shadow: 0 2px 8px rgba(141, 114, 210, 0.2); +} + +.qrcode-close-btn::after { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%); + transform: scale(0); + opacity: 0; + transition: transform 0.6s, opacity 0.6s; } \ No newline at end of file diff --git a/project.config.json b/project.config.json index 6641e6b..e942864 100644 --- a/project.config.json +++ b/project.config.json @@ -28,7 +28,7 @@ "useCompilerPlugins": false, "minifyWXML": true, "ignoreUploadUnusedFiles": false, - "condition": false, + "condition": true, "ignoreDevUnusedFiles": false }, "condition": {}, @@ -41,5 +41,9 @@ "ignore": [], "include": [] }, - "appid": "wx80e72720be2de560" + "appid": "wx80e72720be2de560", + "projectArchitecture": "multiPlatform", + "simulatorPluginLibVersion": { + "wxext14566970e7e9f62": "3.6.5-29" + } } \ No newline at end of file diff --git a/project.miniapp.json b/project.miniapp.json new file mode 100644 index 0000000..ef17fa1 --- /dev/null +++ b/project.miniapp.json @@ -0,0 +1,65 @@ +{ + "miniVersion": "v2", + "name": "%name%", + "version": "0.0.1", + "versionCode": 100, + "i18nFilePath": "i18n", + "mini-android": { + "resourcePath": "miniapp/android/nativeResources", + "sdkVersion": "1.6.7", + "toolkitVersion": "0.11.0", + "useExtendedSdk": { + "media": false, + "bluetooth": false, + "network": false, + "scanner": false, + "xweb": false + }, + "icons": { + "hdpi": "", + "xhdpi": "", + "xxhdpi": "", + "xxxhdpi": "" + }, + "splashscreen": { + "hdpi": "", + "xhdpi": "", + "xxhdpi": "" + }, + "enableVConsole": "open", + "privacy": { + "enable": true + } + }, + "mini-ios": { + "sdkVersion": "1.6.10", + "toolkitVersion": "0.0.9", + "useExtendedSdk": { + "WeAppOpenFuns": true, + "WeAppNetwork": false, + "WeAppBluetooth": false, + "WeAppMedia": false, + "WeAppLBS": false, + "WeAppOthers": false + }, + "enableVConsole": "open", + "icons": { + "mainIcon120": "", + "mainIcon180": "", + "spotlightIcon80": "", + "spotlightIcon120": "", + "settingsIcon58": "", + "settingsIcon87": "", + "notificationIcon40": "", + "notificationIcon60": "", + "appStore1024": "" + }, + "splashScreen": { + "customImage": "" + }, + "privacy": { + "enable": false + }, + "enableOpenUrlNavigate": true + } +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 260c5b6..19daf66 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -3,13 +3,27 @@ "projectname": "wxb5a1857369e5809e", "setting": { "compileHotReLoad": true, - "urlCheck": false, + "urlCheck": true, "preloadBackgroundData": false }, - "libVersion": "development", + "libVersion": "3.8.11", "condition": { "miniprogram": { "list": [ + { + "name": "pages/video/video", + "pathName": "pages/video/video", + "query": "url=https%3A%2F%2Ffinder.video.qq.com%2F251%2F20302%2Fstodownload%3Fencfilekey%3DCvvj5Ix3eewK0tHtibORqcsqchXNh0Gf3sJcaYqC2rQCfmornp3whTPnj2l7Vq3ticgwramgKkTz36fGR1JqvG9bE4VgIVBhfxSPwRBWGvmCMtzCFbP5T3d1APsibaubkFK%26token%3DcztXnd9GyrHyDUNS08mucTAAeWm30HgicdEw44AV0iaVpjUkL6HGh3njcLvWYTesTwadriaTA7jBfBolPVfibmcHJEAa6D44kZjUEBqsPcZu9RV1c1lMn1M8mW5yYCZtKoLdaOTyRx9Yh8P0YuegDvdGDBTUskWaibB2O8LYfWD79vkc%26idx%3D1%26bizid%3D1023%26dotrans%3D0%26hy%3DSH%26m%3D%26uzid%3D1&type=weixin", + "launchMode": "default", + "scene": null + }, + { + "name": "邀请测试", + "pathName": "pages/index/index", + "query": "uuid=49810", + "launchMode": "default", + "scene": null + }, { "name": "pages/bot-list/bot-list", "pathName": "pages/bot-list/bot-list", @@ -31,13 +45,6 @@ "launchMode": "default", "scene": null }, - { - "name": "pages/video/video", - "pathName": "pages/video/video", - "query": "url=https%3A%2F%2Ffinder.video.qq.com%2F251%2F20302%2Fstodownload%3Fencfilekey%3DCvvj5Ix3eewK0tHtibORqcsqchXNh0Gf3sJcaYqC2rQCfmornp3whTPnj2l7Vq3ticgwramgKkTz36fGR1JqvG9bE4VgIVBhfxSPwRBWGvmCMtzCFbP5T3d1APsibaubkFK%26token%3DcztXnd9GyrHyDUNS08mucTAAeWm30HgicdEw44AV0iaVpjUkL6HGh3njcLvWYTesTwadriaTA7jBfBolPVfibmcHJEAa6D44kZjUEBqsPcZu9RV1c1lMn1M8mW5yYCZtKoLdaOTyRx9Yh8P0YuegDvdGDBTUskWaibB2O8LYfWD79vkc%26idx%3D1%26bizid%3D1023%26dotrans%3D0%26hy%3DSH%26m%3D%26uzid%3D1&type=weixin", - "launchMode": "default", - "scene": null - }, { "name": "pages/index/index", "pathName": "pages/index/index",