第一次提交:小程序前端最新版本

This commit is contained in:
XingQue
2026-06-14 02:38:05 +08:00
commit 5e90f7c87c
677 changed files with 153758 additions and 0 deletions

618
pages/jisufd/jisufd.js Normal file
View File

@@ -0,0 +1,618 @@
// pages/jisufd/jisufd.js
import request from '../../utils/request.js'
const PAGE_SIZE = 50
const LINK_PAGE_SIZE = 5
Page({
data: {
sjyue: '0.00',
shangpinList: [], // 最终展示的商品类型列表(已倒序)
selectedTypeId: null,
selectedHuiyuanId: null,
selectedYaoqiuleixing: null,
currentTypeChenghaoList: [],
searchParams: { keyword: '', minPrice: '', labelId: '' },
searchLabelName: '',
isSearchMode: false,
templateList: [],
currentPage: 1,
hasMoreData: true,
isLoadingMore: false,
linkMap: {},
showDetailModal: false,
showAddModal: false,
showDeleteConfirm: false,
showNewLinkConfirm: false,
currentTemplate: null,
currentTemplateIndex: -1,
isEditing: false,
editJieshao: '',
editJiage: '',
editLabelId: '',
editLabelName: '',
editCommissionEnabled: false,
editCommissionValue: '',
addJieshao: '',
addJiage: '',
addLabelId: '',
addLabelName: '',
addCommissionEnabled: false,
addCommissionValue: '',
detailLinkFilter: 0,
detailLinkList: [],
detailLinkPage: 1,
detailLinkHasMore: true,
isLoadingLinks: false,
isLoading: false
},
onLoad() {
this.loadShangjiaYue()
this.loadShangpinTypes()
},
onShow() {
this.registerNotificationComponent()
this.loadShangjiaYue()
},
registerNotificationComponent() {
const app = getApp()
const comp = this.selectComponent('#global-notification')
if (comp && comp.showNotification) {
app.globalData.globalNotification = {
show: data => comp.showNotification(data),
hide: () => comp.hideNotification()
}
}
},
loadShangjiaYue() {
const app = getApp()
const data = app.globalData.shangjia || {}
this.setData({ sjyue: data.sjyue || '0.00' })
},
async loadShangpinTypes() {
this.setData({ isLoading: true })
try {
const res = await request({ url: '/dingdan/sjspleixing', method: 'POST' })
if (res && res.data.code === 200) {
let list = res.data.data || []
// 强制倒序排列
list.reverse()
this.setData({ shangpinList: list, isLoading: false })
if (list.length > 0) {
this.setSelectedType(list[0])
}
}
} catch (e) {
console.error(e)
this.setData({ isLoading: false })
wx.showToast({ title: '加载类型失败', icon: 'error' })
}
},
setSelectedType(item) {
this.setData({
selectedTypeId: item.id,
selectedHuiyuanId: item.huiyuan_id,
selectedYaoqiuleixing: item.yaoqiuleixing,
currentTypeChenghaoList: item.chenghaoList || []
}, () => {
this.resetAndLoadTemplates()
})
},
resetAndLoadTemplates() {
this.setData({
templateList: [],
currentPage: 1,
hasMoreData: true,
isSearchMode: false,
searchParams: { keyword: '', minPrice: '', labelId: '' },
searchLabelName: ''
})
this.loadTemplates()
},
async loadTemplates() {
const { selectedTypeId, currentPage, isSearchMode, searchParams, linkMap } = this.data
if (!selectedTypeId) {
wx.showToast({ title: '请先选择订单类型', icon: 'none' })
return
}
if (currentPage === 1) this.setData({ isLoading: true })
else this.setData({ isLoadingMore: true })
try {
const postData = {
shangpinTypeId: selectedTypeId,
page: currentPage,
pageSize: PAGE_SIZE,
getType: isSearchMode ? 1 : 2
}
if (isSearchMode) {
if (searchParams.keyword) postData.keyword = searchParams.keyword.trim()
if (searchParams.minPrice) postData.minPrice = searchParams.minPrice
if (searchParams.labelId) postData.labelId = searchParams.labelId
}
const res = await request({ url: '/peizhi/sjddmblb', method: 'POST', data: postData })
if (res && res.data.code === 200) {
const data = res.data.data || {}
const newTemplates = data.list || []
const existingIds = new Set(this.data.templateList.map(item => item.mobanId))
const uniqueNew = newTemplates.filter(item => !existingIds.has(item.mobanId))
const processed = uniqueNew.map(item => {
const mobanId = item.mobanId || item.id
const cached = linkMap[mobanId] || {}
return {
...item,
hasGenerated: cached.hasGenerated || !!item.linkUrl,
isCopied: cached.isCopied || false,
linkUrl: cached.linkUrl || item.linkUrl || '',
mobanId: mobanId,
jieshao: item.jieshao || item.moban_jieshao,
jiage: item.jiage || item.price,
fabushuliang: item.fabushuliang || item.fabu_shuliang || 0,
labelId: item.labelId,
labelName: item.labelName || '',
commissionEnabled: item.commissionEnabled,
commissionValue: item.commissionValue
}
})
this.setData({
templateList: currentPage === 1 ? processed : [...this.data.templateList, ...processed],
hasMoreData: data.hasMore !== false && processed.length === PAGE_SIZE,
isLoading: false,
isLoadingMore: false
})
} else {
this.setData({ isLoading: false, isLoadingMore: false, hasMoreData: false })
}
} catch (e) {
console.error(e)
this.setData({ isLoading: false, isLoadingMore: false })
wx.showToast({ title: '加载模板失败', icon: 'error' })
}
},
// ---------- 搜索相关 ----------
onSearchKeywordInput(e) { this.setData({ 'searchParams.keyword': e.detail.value }) },
onSearchMinPriceInput(e) { this.setData({ 'searchParams.minPrice': e.detail.value }) },
onSearchLabelChange(e) {
const idx = e.detail.value
const label = this.data.currentTypeChenghaoList[idx]
this.setData({
'searchParams.labelId': label ? label.id : '',
searchLabelName: label ? label.mingcheng : ''
})
},
onSearchConfirm() {
const { searchParams } = this.data
if (!searchParams.keyword && !searchParams.minPrice && !searchParams.labelId) {
this.resetAndLoadTemplates()
return
}
this.setData({
isSearchMode: true,
currentPage: 1,
templateList: [],
hasMoreData: true
}, () => this.loadTemplates())
},
onClearSearch() { this.resetAndLoadTemplates() },
// ---------- 卡片生成链接 ----------
async onGenerateLink(e) {
const { id } = e.currentTarget.dataset
const idx = this.data.templateList.findIndex(item => item.mobanId === id)
if (idx === -1) return
await this.generateLinkForTemplate(this.data.templateList[idx], idx)
},
onCopyLink(e) {
const { id } = e.currentTarget.dataset
const idx = this.data.templateList.findIndex(item => item.mobanId === id)
if (idx === -1) return
const template = this.data.templateList[idx]
if (!template.linkUrl) {
wx.showToast({ title: '请先生成链接', icon: 'none' })
return
}
wx.setClipboardData({
data: template.linkUrl,
success: () => {
const { linkMap } = this.data
const mobanId = template.mobanId
const updatedLinkMap = { ...linkMap }
if (updatedLinkMap[mobanId]) updatedLinkMap[mobanId].isCopied = true
const updatedList = [...this.data.templateList]
updatedList[idx].isCopied = true
this.setData({ linkMap: updatedLinkMap, templateList: updatedList })
wx.showToast({ title: '链接已复制', icon: 'success' })
}
})
},
async generateLinkForTemplate(template, templateIndex) {
const { selectedTypeId, linkMap } = this.data
if (!selectedTypeId) {
wx.showToast({ title: '请选择订单类型', icon: 'none' })
return
}
wx.showLoading({ title: '生成中...', mask: true })
try {
const res = await request({
url: '/peizhi/sjljhq',
method: 'POST',
data: { mobanId: template.mobanId, shangpinTypeId: selectedTypeId }
})
if (res && res.data.code === 200) {
const data = res.data.data || {}
const mobanId = template.mobanId
const updatedLinkMap = { ...linkMap }
updatedLinkMap[mobanId] = {
hasGenerated: true,
linkUrl: data.linkUrl || '',
isCopied: false,
newBalance: data.newBalance
}
const updatedList = [...this.data.templateList]
updatedList[templateIndex] = {
...updatedList[templateIndex],
hasGenerated: true,
linkUrl: data.linkUrl || '',
isCopied: false,
newBalance: data.newBalance
}
if (data.newBalance) {
const app = getApp()
if (app.globalData.shangjia) app.globalData.shangjia.sjyue = data.newBalance
this.setData({ sjyue: data.newBalance })
}
this.setData({ linkMap: updatedLinkMap, templateList: updatedList })
wx.showToast({ title: '链接生成成功', icon: 'success' })
} else {
wx.showToast({ title: res.data.msg || '生成失败', icon: 'error' })
}
} catch (e) {
wx.showToast({ title: '生成失败', icon: 'error' })
} finally {
wx.hideLoading()
}
},
onCardTap(e) {
const { target } = e
if (target.className && (target.className.includes('btn') || target.className.includes('action'))) return
const { item } = e.currentTarget.dataset
if (!item) return
const idx = this.data.templateList.findIndex(t => t.mobanId === item.mobanId)
this.setData({
currentTemplate: item,
currentTemplateIndex: idx,
showDetailModal: true,
isEditing: false,
editJieshao: item.jieshao || '',
editJiage: item.jiage || '',
editLabelId: item.labelId || '',
editLabelName: item.labelName || '',
editCommissionEnabled: item.commissionEnabled || false,
editCommissionValue: item.commissionValue || '',
detailLinkFilter: 0,
detailLinkList: [],
detailLinkPage: 1,
detailLinkHasMore: true
})
this.loadDetailLinks()
},
hideDetailModal() { this.setData({ showDetailModal: false, isEditing: false }) },
showAddModal() {
this.setData({
showAddModal: true,
addJieshao: '', addJiage: '', addLabelId: '', addLabelName: '',
addCommissionEnabled: false, addCommissionValue: ''
})
},
hideAddModal() { this.setData({ showAddModal: false }) },
hideDeleteConfirm() { this.setData({ showDeleteConfirm: false }) },
hideNewLinkConfirm() { this.setData({ showNewLinkConfirm: false }) },
// ---------- 链接筛选与加载 ----------
onToggleLinkFilter() {
const newFilter = this.data.detailLinkFilter === 0 ? 1 : 0
this.setData({
detailLinkFilter: newFilter,
detailLinkList: [],
detailLinkPage: 1,
detailLinkHasMore: true
}, () => this.loadDetailLinks())
},
async loadDetailLinks() {
const { currentTemplate, detailLinkFilter, detailLinkPage, isLoadingLinks } = this.data
if (!currentTemplate || isLoadingLinks) return
this.setData({ isLoadingLinks: true })
try {
const res = await request({
url: '/peizhi/hqsjlslj',
method: 'POST',
data: {
mobanId: currentTemplate.mobanId,
used: detailLinkFilter,
page: detailLinkPage,
pageSize: LINK_PAGE_SIZE
}
})
if (res && res.data.code === 200) {
const data = res.data.data || {}
const newLinks = data.list || []
const merged = detailLinkPage === 1 ? newLinks : [...this.data.detailLinkList, ...newLinks]
this.setData({
detailLinkList: merged,
detailLinkHasMore: newLinks.length === LINK_PAGE_SIZE,
isLoadingLinks: false
})
} else {
this.setData({ isLoadingLinks: false })
}
} catch (e) {
this.setData({ isLoadingLinks: false })
wx.showToast({ title: '加载链接失败', icon: 'error' })
}
},
onLoadMoreLinks() {
if (!this.data.detailLinkHasMore || this.data.isLoadingLinks) return
this.setData({ detailLinkPage: this.data.detailLinkPage + 1 }, () => this.loadDetailLinks())
},
onCopyLinkItem(e) {
const url = e.currentTarget.dataset.url
if (!url) return
wx.setClipboardData({ data: url, success: () => wx.showToast({ title: '已复制', icon: 'success' }) })
},
// ---------- 弹窗内操作 ----------
onGenerateLinkModal() {
const { currentTemplate, currentTemplateIndex } = this.data
if (!currentTemplate) return
if (currentTemplate.hasGenerated && !currentTemplate.isCopied) {
this.setData({ showNewLinkConfirm: true })
return
}
this.generateLinkForTemplate(currentTemplate, currentTemplateIndex)
},
onCopyLinkModal() {
const { currentTemplate, linkMap } = this.data
if (!currentTemplate || !currentTemplate.linkUrl) {
wx.showToast({ title: '请先生成链接', icon: 'none' })
return
}
wx.setClipboardData({
data: currentTemplate.linkUrl,
success: () => {
const mobanId = currentTemplate.mobanId
const updatedLinkMap = { ...linkMap }
if (updatedLinkMap[mobanId]) updatedLinkMap[mobanId].isCopied = true
const updatedList = [...this.data.templateList]
if (this.data.currentTemplateIndex !== -1) {
updatedList[this.data.currentTemplateIndex].isCopied = true
}
const updatedCurrent = { ...currentTemplate, isCopied: true }
this.setData({ linkMap: updatedLinkMap, templateList: updatedList, currentTemplate: updatedCurrent })
wx.showToast({ title: '链接已复制', icon: 'success' })
}
})
},
// ---------- 编辑 ----------
onEditTemplate() {
if (!this.data.isEditing) this.setData({ isEditing: true })
else this.saveTemplateEdit()
},
onEditJieshaoInput(e) { this.setData({ editJieshao: e.detail.value }) },
onEditJiageInput(e) { this.setData({ editJiage: e.detail.value }) },
onEditLabelChange(e) {
const idx = e.detail.value
const label = this.data.currentTypeChenghaoList[idx]
this.setData({ editLabelId: label ? label.id : '', editLabelName: label ? label.mingcheng : '' })
},
onEditCommissionToggle() { this.setData({ editCommissionEnabled: !this.data.editCommissionEnabled }) },
onEditCommissionValueInput(e) { this.setData({ editCommissionValue: e.detail.value }) },
async saveTemplateEdit() {
const { currentTemplate, selectedTypeId, editJieshao, editJiage, editLabelId, editCommissionEnabled, editCommissionValue } = this.data
if (!currentTemplate || !selectedTypeId) return
if (editCommissionEnabled && (!editCommissionValue || isNaN(parseFloat(editCommissionValue)))) {
wx.showToast({ title: '请输入有效佣金金额', icon: 'none' })
return
}
wx.showLoading({ title: '保存中...', mask: true })
try {
const res = await request({
url: '/peizhi/sjddmbgx',
method: 'POST',
data: {
mobanId: currentTemplate.mobanId,
shangpinTypeId: selectedTypeId,
jieshao: editJieshao,
jiage: editJiage,
labelId: editLabelId || '',
commissionEnabled: editCommissionEnabled,
commissionValue: editCommissionValue
}
})
if (res && res.data.code === 200) {
const updatedList = [...this.data.templateList]
const idx = this.data.currentTemplateIndex
if (idx !== -1) {
updatedList[idx] = {
...updatedList[idx],
jieshao: editJieshao,
jiage: editJiage,
labelId: editLabelId,
labelName: this.getLabelNameById(editLabelId),
commissionEnabled: editCommissionEnabled,
commissionValue: editCommissionValue
}
this.setData({ templateList: updatedList, currentTemplate: updatedList[idx], isEditing: false })
}
wx.showToast({ title: '修改成功', icon: 'success' })
} else {
wx.showToast({ title: res.data.msg || '修改失败', icon: 'error' })
}
} catch (e) {
wx.showToast({ title: '修改失败', icon: 'error' })
} finally { wx.hideLoading() }
},
onDeleteTemplate() { this.setData({ showDeleteConfirm: true }) },
async confirmDeleteTemplate() {
const { currentTemplate, selectedTypeId, linkMap } = this.data
if (!currentTemplate || !selectedTypeId) return
wx.showLoading({ title: '删除中...', mask: true })
try {
const res = await request({
url: '/peizhi/sjddmbsc',
method: 'POST',
data: { mobanId: currentTemplate.mobanId, shangpinTypeId: selectedTypeId }
})
if (res && res.data.code === 200) {
const updatedLinkMap = { ...linkMap }
delete updatedLinkMap[currentTemplate.mobanId]
const updatedList = [...this.data.templateList]
updatedList.splice(this.data.currentTemplateIndex, 1)
this.setData({
linkMap: updatedLinkMap,
templateList: updatedList,
showDetailModal: false,
showDeleteConfirm: false,
currentTemplate: null,
currentTemplateIndex: -1
})
wx.showToast({ title: '删除成功', icon: 'success' })
} else {
wx.showToast({ title: res.data.msg || '删除失败', icon: 'error' })
}
} catch (e) {
wx.showToast({ title: '删除失败', icon: 'error' })
} finally { wx.hideLoading() }
},
async confirmNewLink() {
const { currentTemplate, currentTemplateIndex } = this.data
if (!currentTemplate) return
this.setData({ showNewLinkConfirm: false })
await this.generateLinkForTemplate(currentTemplate, currentTemplateIndex)
},
// ---------- 添加模板 ----------
onAddJieshaoInput(e) { this.setData({ addJieshao: e.detail.value }) },
onAddJiageInput(e) { this.setData({ addJiage: e.detail.value }) },
onAddLabelChange(e) {
const idx = e.detail.value
const label = this.data.currentTypeChenghaoList[idx]
this.setData({ addLabelId: label ? label.id : '', addLabelName: label ? label.mingcheng : '' })
},
onAddCommissionToggle() { this.setData({ addCommissionEnabled: !this.data.addCommissionEnabled }) },
onAddCommissionValueInput(e) { this.setData({ addCommissionValue: e.detail.value }) },
async onAddTemplate() {
const { selectedTypeId, addJieshao, addJiage, addLabelId, addCommissionEnabled, addCommissionValue } = this.data
if (!selectedTypeId) {
wx.showToast({ title: '请选择订单类型', icon: 'none' })
return
}
if (!addJieshao.trim()) {
wx.showToast({ title: '请输入订单介绍', icon: 'none' })
return
}
if (!addJiage || isNaN(parseFloat(addJiage)) || parseFloat(addJiage) <= 0) {
wx.showToast({ title: '请输入有效的价格', icon: 'none' })
return
}
if (addCommissionEnabled && (!addCommissionValue || isNaN(parseFloat(addCommissionValue)))) {
wx.showToast({ title: '请输入有效的佣金金额', icon: 'none' })
return
}
wx.showLoading({ title: '添加中...', mask: true })
try {
const res = await request({
url: '/peizhi/sjtjddmb',
method: 'POST',
data: {
shangpinTypeId: selectedTypeId,
jieshao: addJieshao.trim(),
jiage: addJiage,
labelId: addLabelId || '',
commissionEnabled: addCommissionEnabled,
commissionValue: addCommissionValue
}
})
if (res && res.data.code === 200) {
const data = res.data.data || {}
const newTemplate = {
mobanId: data.mobanId,
jieshao: addJieshao,
jiage: addJiage,
fabushuliang: 0,
hasGenerated: false,
isCopied: false,
linkUrl: '',
labelId: addLabelId,
labelName: this.getLabelNameById(addLabelId),
commissionEnabled: addCommissionEnabled,
commissionValue: addCommissionValue
}
this.setData({
templateList: [newTemplate, ...this.data.templateList],
showAddModal: false,
addJieshao: '', addJiage: '', addLabelId: '', addLabelName: '',
addCommissionEnabled: false, addCommissionValue: ''
})
wx.showToast({ title: '添加成功', icon: 'success' })
} else {
wx.showToast({ title: res.data.msg || '添加失败', icon: 'error' })
}
} catch (e) {
wx.showToast({ title: '添加失败', icon: 'error' })
} finally { wx.hideLoading() }
},
getLabelNameById(labelId) {
if (!labelId) return ''
const list = this.data.currentTypeChenghaoList
const found = list.find(item => item.id == labelId)
return found ? found.mingcheng : ''
},
onScrollToLower() {
const { hasMoreData, isLoadingMore, isSearchMode } = this.data
if (!hasMoreData || isLoadingMore || isSearchMode) return
this.setData({ currentPage: this.data.currentPage + 1 }, () => this.loadTemplates())
},
onSelectType(e) {
const { id, item } = e.currentTarget.dataset
this.setSelectedType(item)
}
})

12
pages/jisufd/jisufd.json Normal file
View File

@@ -0,0 +1,12 @@
{
"usingComponents": {
"global-notification": "/components/global-notification/global-notification",
"chenghao-tag": "/components/chenghao-tag/chenghao-tag"
},
"backgroundTextStyle": "dark",
"navigationBarBackgroundColor": "#0a0a0f",
"navigationBarTitleText": "极速派单",
"navigationBarTextStyle": "white",
"backgroundColor": "#0a0a0f",
"enablePullDownRefresh": false
}

230
pages/jisufd/jisufd.wxml Normal file
View File

@@ -0,0 +1,230 @@
<!-- pages/jisufd/jisufd.wxml -->
<view class="page-container">
<!-- 余额卡片 -->
<view class="balance-card">
<text class="balance-label">可用余额</text>
<view class="balance-amount">
<text class="amount-value">{{sjyue}}</text>
<text class="amount-unit">元</text>
</view>
<text class="balance-tip">生成链接将从此余额扣除</text>
</view>
<!-- 商品类型选择 -->
<view class="section">
<text class="section-title">选择订单类型</text>
<scroll-view class="type-scroll" scroll-x="true" enable-flex>
<block wx:for="{{shangpinList}}" wx:key="id">
<view class="type-item {{selectedTypeId === item.id ? 'type-active' : ''}}"
data-id="{{item.id}}" data-item="{{item}}" bindtap="onSelectType">
<text class="type-text">{{item.jieshao}}</text>
</view>
</block>
</scroll-view>
</view>
<!-- 搜索区域 -->
<view class="search-section">
<view class="search-box">
<text class="search-icon">🔍</text>
<input class="search-input" placeholder="输入模板ID/介绍..." value="{{searchParams.keyword}}"
bindinput="onSearchKeywordInput" bindconfirm="onSearchConfirm"/>
<view class="search-btn" bindtap="onSearchConfirm">
<text class="search-btn-text">搜索</text>
</view>
</view>
<view class="filter-row">
<view class="filter-item">
<text class="filter-label">金额≥</text>
<input class="filter-input" type="digit" placeholder="元" value="{{searchParams.minPrice}}" bindinput="onSearchMinPriceInput"/>
</view>
<view class="filter-item">
<text class="filter-label">标签</text>
<picker mode="selector" range="{{currentTypeChenghaoList}}" range-key="mingcheng" bindchange="onSearchLabelChange">
<view class="picker-view">
<text>{{searchLabelName || '全部'}}</text>
</view>
</picker>
</view>
<view class="clear-search" bindtap="onClearSearch"><text>清空</text></view>
</view>
</view>
<!-- 模板卡片网格 -->
<view class="template-section">
<scroll-view class="template-scroll" scroll-y="true" scroll-with-animation="true" bindscrolltolower="onScrollToLower">
<view class="template-grid">
<block wx:for="{{templateList}}" wx:key="mobanId">
<view class="template-card" bindtap="onCardTap" data-item="{{item}}">
<view class="template-intro">
<text class="intro-text">{{item.jieshao || '无介绍'}}</text>
</view>
<view class="template-label" wx:if="{{item.labelName}}">
<chenghao-tag mingcheng="{{item.labelName}}" texiaoJson="{{''}}"/>
</view>
<view class="template-price-row">
<text class="template-price-label">价格:</text>
<text class="template-price-value">{{item.jiage || '0.00'}}元</text>
</view>
<view class="template-actions-grid">
<view class="action-grid-btn generate-grid-btn {{item.hasGenerated ? 'generated' : ''}}"
data-id="{{item.mobanId}}" catchtap="onGenerateLink">
{{item.hasGenerated ? '获取新链接' : '生成链接'}}
</view>
<view class="action-grid-btn copy-grid-btn {{item.isCopied ? 'copied' : ''}}"
data-id="{{item.mobanId}}" catchtap="onCopyLink">
{{item.isCopied ? '已复制' : '一键复制'}}
</view>
</view>
</view>
</block>
<view class="template-card add-card" bindtap="showAddModal">
<view class="add-icon"></view>
<text class="add-text">添加模板</text>
<text class="add-subtext">点击创建新模板</text>
</view>
</view>
<view class="load-more" wx:if="{{isLoadingMore}}">...</view>
<view class="no-more" wx:if="{{!hasMoreData && templateList.length > 0}}">没有更多模板了</view>
<view class="empty-state" wx:if="{{templateList.length === 0 && !isLoading}}">暂无模板</view>
</scroll-view>
</view>
</view>
<!-- 详情弹窗 -->
<view class="modal-overlay" wx:if="{{showDetailModal}}" bindtap="hideDetailModal">
<view class="modal-content detail-modal" catchtap="stopPropagation">
<view class="modal-close" bindtap="hideDetailModal">×</view>
<view class="modal-header"><text class="modal-title">模板详情</text></view>
<view class="detail-info" wx:if="{{currentTemplate}}">
<view class="detail-item">
<text class="detail-label">订单介绍</text>
<view class="detail-value intro-value"><text>{{currentTemplate.jieshao || '无介绍'}}</text></view>
</view>
<view class="detail-item" wx:if="{{currentTemplate.labelName}}">
<text class="detail-label">关联标签</text>
<chenghao-tag mingcheng="{{currentTemplate.labelName}}" texiaoJson="{{currentTemplate.texiaoJson}}"/>
</view>
<view class="detail-meta-row">
<view class="meta-item"><text class="meta-label">价格</text><text class="meta-value price-meta">{{currentTemplate.jiage || '0.00'}}元</text></view>
<view class="meta-divider">|</view>
<view class="meta-item"><text class="meta-label">发布数量</text><text class="meta-value count-meta">{{currentTemplate.fabushuliang || 0}}次</text></view>
<view class="meta-divider">|</view>
<view class="meta-item"><text class="meta-label">模板ID</text><text class="meta-value id-meta">{{currentTemplate.mobanId || 'N/A'}}</text></view>
</view>
<view class="detail-item" wx:if="{{currentTemplate.commissionEnabled}}">
<text class="detail-label">佣金要求</text>
<text class="detail-value">{{currentTemplate.commissionValue}}元建议≤50</text>
</view>
<!-- 链接筛选 -->
<view class="link-filter-bar">
<text class="filter-label">链接状态:</text>
<view class="filter-switch {{detailLinkFilter === 0 ? 'active' : ''}}" bindtap="onToggleLinkFilter">未使用</view>
<view class="filter-switch {{detailLinkFilter === 1 ? 'active' : ''}}" bindtap="onToggleLinkFilter">已使用</view>
</view>
<scroll-view class="link-list" scroll-y="true" style="max-height: 300rpx;">
<block wx:for="{{detailLinkList}}" wx:key="id">
<view class="link-item">
<text class="link-url" selectable="true">{{item.lianjie}}</text>
<text class="link-status">{{item.is_used ? '已使用' : '未使用'}}</text>
<view wx:if="{{!item.is_used}}" class="copy-link-btn" bindtap="onCopyLinkItem" data-url="{{item.lianjie}}">复制</view>
</view>
</block>
<view class="load-more-links" wx:if="{{detailLinkHasMore}}">
<view class="load-more-btn" bindtap="onLoadMoreLinks">获取更多链接</view>
</view>
<view wx:if="{{isLoadingLinks}}" class="link-loading">加载中...</view>
<view wx:if="{{detailLinkList.length === 0 && !isLoadingLinks}}" class="link-empty">暂无链接</view>
</scroll-view>
</view>
<view class="modal-actions-grid">
<view class="modal-grid-btn generate-modal-grid-btn" bindtap="onGenerateLinkModal">{{currentTemplate.hasGenerated ? '获取新链接' : '生成链接'}}</view>
<view class="modal-grid-btn copy-modal-grid-btn {{currentTemplate.isCopied ? 'copied' : ''}}" bindtap="onCopyLinkModal">{{currentTemplate.isCopied ? '已复制' : '复制链接'}}</view>
<view class="modal-grid-btn edit-modal-grid-btn" bindtap="onEditTemplate">{{isEditing ? '保存修改' : '立即修改'}}</view>
<view class="modal-grid-btn delete-modal-grid-btn" bindtap="onDeleteTemplate">删除模板</view>
</view>
<!-- 编辑区 -->
<view class="edit-section" wx:if="{{isEditing}}">
<view class="edit-item">
<text class="edit-label">订单介绍</text>
<textarea class="edit-input intro-edit" value="{{editJieshao}}" maxlength="100" placeholder="请输入订单介绍100字以内" bindinput="onEditJieshaoInput" auto-height/>
<text class="word-count">{{editJieshao.length}}/100</text>
</view>
<view class="edit-item">
<text class="edit-label">价格(元)</text>
<input class="edit-input price-edit" type="digit" value="{{editJiage}}" placeholder="0.1 - 10000" bindinput="onEditJiageInput"/>
</view>
<view class="edit-item">
<text class="edit-label">标签</text>
<picker mode="selector" range="{{currentTypeChenghaoList}}" range-key="mingcheng" bindchange="onEditLabelChange">
<view class="picker-view"><text>{{editLabelName || '无'}}</text></view>
</picker>
</view>
<view class="edit-item commission-item">
<text class="edit-label">佣金要求建议≤50</text>
<switch checked="{{editCommissionEnabled}}" bindchange="onEditCommissionToggle"/>
<input wx:if="{{editCommissionEnabled}}" class="commission-input" type="digit" placeholder="佣金金额" value="{{editCommissionValue}}" bindinput="onEditCommissionValueInput"/>
</view>
</view>
</view>
</view>
<!-- 添加模板弹窗 -->
<view class="modal-overlay" wx:if="{{showAddModal}}" bindtap="hideAddModal">
<view class="modal-content add-modal" catchtap="stopPropagation">
<view class="modal-close" bindtap="hideAddModal">×</view>
<view class="modal-header"><text class="modal-title">添加模板</text></view>
<view class="add-form">
<view class="form-item">
<text class="form-label">订单介绍</text>
<textarea class="form-input intro-input" value="{{addJieshao}}" maxlength="100" placeholder="请输入订单介绍(必填)" bindinput="onAddJieshaoInput" auto-height/>
<text class="word-count">{{addJieshao.length}}/100</text>
</view>
<view class="form-item">
<text class="form-label">价格(元)</text>
<input class="form-input price-input" type="digit" value="{{addJiage}}" placeholder="0.1 - 10000" bindinput="onAddJiageInput"/>
</view>
<view class="form-item">
<text class="form-label">标签</text>
<picker mode="selector" range="{{currentTypeChenghaoList}}" range-key="mingcheng" bindchange="onAddLabelChange">
<view class="picker-view"><text>{{addLabelName || '可选'}}</text></view>
</picker>
</view>
<view class="form-item commission-item">
<text class="form-label">佣金要求建议≤50</text>
<switch checked="{{addCommissionEnabled}}" bindchange="onAddCommissionToggle"/>
<input wx:if="{{addCommissionEnabled}}" class="commission-input" type="digit" placeholder="佣金金额" value="{{addCommissionValue}}" bindinput="onAddCommissionValueInput"/>
</view>
</view>
<view class="modal-actions-grid add-actions-grid">
<view class="modal-grid-btn cancel-grid-btn" bindtap="hideAddModal">取消</view>
<view class="modal-grid-btn confirm-add-grid-btn" bindtap="onAddTemplate">确认添加</view>
</view>
</view>
</view>
<!-- 删除确认弹窗 -->
<view class="modal-overlay confirm-overlay" wx:if="{{showDeleteConfirm}}" bindtap="hideDeleteConfirm">
<view class="confirm-content" catchtap="stopPropagation">
<text class="confirm-title">确认删除</text>
<text class="confirm-text">确定要删除这个模板吗?此操作不可恢复。</text>
<view class="confirm-actions-grid">
<view class="confirm-grid-btn cancel-confirm-grid-btn" bindtap="hideDeleteConfirm">取消</view>
<view class="confirm-grid-btn delete-confirm-grid-btn" bindtap="confirmDeleteTemplate">确定删除</view>
</view>
</view>
</view>
<!-- 获取新链接确认弹窗 -->
<view class="modal-overlay confirm-overlay" wx:if="{{showNewLinkConfirm}}" bindtap="hideNewLinkConfirm">
<view class="confirm-content" catchtap="stopPropagation">
<text class="confirm-title">获取新链接</text>
<text class="confirm-text">{{currentTemplate.isCopied ? '确定要获取新链接吗?旧链接将失效。' : '您还没有复制当前链接,确定要获取新链接吗?'}}</text>
<view class="confirm-actions-grid">
<view class="confirm-grid-btn cancel-confirm-grid-btn" bindtap="hideNewLinkConfirm">取消</view>
<view class="confirm-grid-btn confirm-new-link-grid-btn" bindtap="confirmNewLink">确定</view>
</view>
</view>
</view>
<global-notification id="global-notification" />

222
pages/jisufd/jisufd.wxss Normal file
View File

@@ -0,0 +1,222 @@
/* pages/jisufd/jisufd.wxss - 增强版,包含标签展示 */
.page-container {
min-height: 100vh;
background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
padding: 30rpx;
box-sizing: border-box;
padding-bottom: 40rpx;
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}
.balance-card {
background: linear-gradient(135deg, rgba(20,20,30,0.9), rgba(30,30,50,0.9));
border-radius: 24rpx;
padding: 36rpx;
margin-bottom: 40rpx;
color: #fff;
box-shadow: 0 15rpx 35rpx rgba(0,0,0,0.4), 0 0 40rpx rgba(0,150,255,0.15);
text-align: center;
border: 1.5rpx solid rgba(0,180,255,0.2);
backdrop-filter: blur(10rpx);
position: relative;
overflow: hidden;
}
.balance-card::before {
content: '';
position: absolute;
top: -50%; left: -50%;
width: 200%; height: 200%;
background: linear-gradient(45deg, transparent 30%, rgba(0,180,255,0.1) 50%, transparent 70%);
animation: cardShine 6s infinite linear;
z-index: 1;
}
@keyframes cardShine {
0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}
.balance-label { font-size: 28rpx; color: rgba(255,255,255,0.8); margin-bottom: 18rpx; font-weight: 500; position: relative; z-index: 2; }
.balance-amount { display: flex; align-items: baseline; justify-content: center; margin-bottom: 15rpx; position: relative; z-index: 2; }
.amount-value { font-size: 64rpx; font-weight: bold; color: #00B4FF; text-shadow: 0 0 20rpx rgba(0,180,255,0.7), 0 0 40rpx rgba(0,180,255,0.4); animation: amountGlow 3s infinite alternate; }
@keyframes amountGlow {
0% { color: #00B4FF; text-shadow: 0 0 15rpx rgba(0,180,255,0.6); }
100% { color: #00E0FF; text-shadow: 0 0 25rpx rgba(0,180,255,0.8), 0 0 50rpx rgba(0,180,255,0.5); }
}
.amount-unit { font-size: 36rpx; color: #00B4FF; margin-left: 12rpx; font-weight: 500; z-index: 2; }
.balance-tip { font-size: 24rpx; color: rgba(255,255,255,0.6); z-index: 2; }
.section { margin-bottom: 35rpx; }
.section-title { font-size: 32rpx; font-weight: 700; color: #FFFFFF; margin-bottom: 25rpx; padding-left: 12rpx; border-left: 6rpx solid #9C27B0; text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.3); }
.type-scroll { white-space: nowrap; display: flex; height: 90rpx; }
.type-item {
display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center;
height: 85rpx; padding: 0 40rpx; margin-right: 20rpx;
background: rgba(255,255,255,0.08); border-radius: 45rpx; border: 2rpx solid rgba(255,255,255,0.15);
font-size: 28rpx; color: rgba(255,255,255,0.8);
transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
backdrop-filter: blur(10rpx);
}
.type-active {
background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
border-color: #9C27B0; color: white; transform: scale(1.05);
box-shadow: 0 10rpx 25rpx rgba(156,39,176,0.4), 0 0 30rpx rgba(156,39,176,0.3);
}
.type-text { max-width: 220rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
/* 搜索区域 */
.search-section { margin-bottom: 35rpx; }
.search-box {
display: flex; align-items: center;
background: rgba(255,255,255,0.1); border-radius: 50rpx;
padding: 20rpx 30rpx; border: 2rpx solid rgba(255,255,255,0.2);
backdrop-filter: blur(10rpx); transition: all 0.3s ease;
}
.search-box:focus-within { border-color: #9C27B0; background: rgba(255,255,255,0.15); box-shadow: 0 0 25rpx rgba(156,39,176,0.3); }
.search-icon { font-size: 32rpx; color: rgba(255,255,255,0.7); margin-right: 20rpx; flex-shrink: 0; }
.search-input { flex: 1; font-size: 28rpx; color: #FFFFFF; background: transparent; border: none; outline: none; min-height: 40rpx; }
.search-input::placeholder { color: rgba(255,255,255,0.4); }
.search-btn { background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%); border-radius: 40rpx; padding: 15rpx 30rpx; margin-left: 20rpx; flex-shrink: 0; box-shadow: 0 8rpx 20rpx rgba(156,39,176,0.3); }
.search-btn:active { transform: scale(0.95); }
.search-btn-text { font-size: 26rpx; color: white; font-weight: 600; }
.filter-row { display: flex; align-items: center; margin-top: 20rpx; gap: 15rpx; }
.filter-item { display: flex; align-items: center; background: rgba(255,255,255,0.08); border-radius: 30rpx; padding: 10rpx 20rpx; border: 1rpx solid rgba(255,255,255,0.15); }
.filter-label { font-size: 24rpx; color: rgba(255,255,255,0.7); margin-right: 10rpx; }
.filter-input { width: 120rpx; height: 50rpx; background: transparent; color: #fff; font-size: 26rpx; }
.picker-view { padding: 10rpx 0; color: rgba(255,255,255,0.9); font-size: 26rpx; max-width: 160rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clear-search { margin-left: auto; padding: 10rpx 20rpx; background: rgba(255,255,255,0.1); border-radius: 20rpx; color: rgba(255,255,255,0.7); font-size: 24rpx; }
/* 模板区域 */
.template-section { height: calc(100vh - 600rpx); position: relative; }
.template-scroll { height: 100%; }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25rpx; padding-bottom: 30rpx; }
.template-card {
background: linear-gradient(145deg, rgba(30,30,45,0.9), rgba(40,40,60,0.9));
border-radius: 20rpx; padding: 25rpx;
border: 1.5rpx solid rgba(255,255,255,0.1);
box-shadow: 0 10rpx 30rpx rgba(0,0,0,0.3), 0 0 25rpx rgba(0,180,255,0.1);
transition: all 0.3s ease; backdrop-filter: blur(10rpx);
display: flex; flex-direction: column; min-height: 280rpx; position: relative; overflow: hidden;
}
.template-card::before { content: ''; position: absolute; top:0; left:0; right:0; height:4rpx; background: linear-gradient(90deg, #9C27B0, #00B4FF, #9C27B0); opacity:0.6; }
.template-intro { flex:1; margin-bottom:10rpx; min-height:70rpx; overflow:hidden; }
.intro-text { font-size:24rpx; line-height:1.4; color:rgba(255,255,255,0.9); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; font-weight:500; }
.template-label { margin-bottom: 10rpx; }
.template-price-row { display:flex; align-items:center; margin-bottom:20rpx; padding:10rpx 0; border-bottom:1rpx solid rgba(255,255,255,0.1); }
.template-price-label { font-size:22rpx; color:rgba(255,255,255,0.7); margin-right:10rpx; }
.template-price-value { font-size:26rpx; font-weight:bold; color:#FFD700; text-shadow:0 0 10rpx rgba(255,215,0,0.3); flex:1; }
.template-actions-grid { display:flex; flex-direction:column; gap:12rpx; margin-top:10rpx; }
.action-grid-btn {
height:65rpx; border-radius:32rpx; font-size:24rpx; font-weight:600; transition:all 0.3s ease;
border:none; padding:0 20rpx; box-shadow:0 4rpx 12rpx rgba(0,0,0,0.2), inset 0 1rpx 0 rgba(255,255,255,0.1);
display:flex !important; align-items:center !important; justify-content:center !important; text-align:center !important;
}
.generate-grid-btn { background:linear-gradient(135deg, #00B4FF, #0091EA); color:white; }
.generate-grid-btn.generated { background:linear-gradient(135deg, #4CAF50, #2E7D32); }
.copy-grid-btn { background:linear-gradient(135deg, #9C27B0, #673AB7); color:white; }
.copy-grid-btn.copied { background:linear-gradient(135deg, #FF9800, #F57C00); }
.add-card { background: linear-gradient(145deg, rgba(40,40,60,0.7), rgba(60,60,80,0.7)); border:2rpx dashed rgba(255,255,255,0.3); display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:280rpx; }
.add-icon { font-size:60rpx; color:rgba(255,255,255,0.6); margin-bottom:20rpx; }
.add-text { font-size:30rpx; color:rgba(255,255,255,0.8); font-weight:600; margin-bottom:8rpx; }
.add-subtext { font-size:24rpx; color:rgba(255,255,255,0.5); }
/* 弹窗通用 */
.modal-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.75); display:flex; align-items:center; justify-content:center; z-index:9999; padding:30rpx; backdrop-filter:blur(10rpx); animation:fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.modal-content {
background:linear-gradient(145deg, rgba(30,30,45,0.95), rgba(40,40,60,0.95));
border-radius:30rpx; width:100%; max-width:700rpx; max-height:85vh; overflow-y:auto;
border:1.5rpx solid rgba(255,255,255,0.15);
box-shadow:0 25rpx 80rpx rgba(0,0,0,0.6), 0 0 60rpx rgba(0,180,255,0.2);
animation:slideUp 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
position:relative;
}
@keyframes slideUp { from{transform:translateY(100rpx) scale(0.9); opacity:0;} to{transform:translateY(0) scale(1); opacity:1;} }
.modal-close { position:absolute; top:25rpx; right:25rpx; width:60rpx; height:60rpx; border-radius:50%; background:rgba(255,255,255,0.1); display:flex; align-items:center; justify-content:center; font-size:40rpx; color:rgba(255,255,255,0.7); z-index:10; }
.modal-header { padding:40rpx 40rpx 20rpx; text-align:center; }
.modal-title { font-size:36rpx; font-weight:bold; color:#FFFFFF; }
.detail-info { padding:30rpx 40rpx; }
.detail-item { margin-bottom:30rpx; }
.detail-label { font-size:26rpx; color:rgba(255,255,255,0.7); margin-bottom:10rpx; font-weight:500; }
.detail-value { font-size:28rpx; color:#FFFFFF; word-break:break-word; }
.intro-value { background:rgba(255,255,255,0.05); border-radius:15rpx; padding:20rpx; border:1rpx solid rgba(255,255,255,0.1); max-height:200rpx; overflow-y:auto; }
.detail-meta-row { display:flex; align-items:center; justify-content:space-between; padding:25rpx 0; margin:20rpx 0; border-top:1rpx solid rgba(255,255,255,0.1); border-bottom:1rpx solid rgba(255,255,255,0.1); }
.meta-item { display:flex; flex-direction:column; align-items:center; flex:1; }
.meta-label { font-size:22rpx; color:rgba(255,255,255,0.6); margin-bottom:8rpx; }
.meta-value { font-size:26rpx; font-weight:600; }
.price-meta { color:#FFD700; text-shadow:0 0 10rpx rgba(255,215,0,0.3); }
.count-meta { color:#00B4FF; }
.id-meta { color:#4CAF50; font-family:'Courier New',monospace; font-size:24rpx; }
.meta-divider { color:rgba(255,255,255,0.2); font-size:24rpx; margin:0 15rpx; }
.link-filter-bar { display:flex; align-items:center; margin-top:30rpx; margin-bottom:20rpx; }
.filter-switch {
padding:10rpx 25rpx; margin-left:10rpx; border-radius:20rpx; background:rgba(255,255,255,0.1);
font-size:24rpx; color:rgba(255,255,255,0.7); transition:all 0.3s;
}
.filter-switch.active { background:linear-gradient(135deg, #00B4FF, #0091EA); color:white; }
.link-list { background:rgba(0,0,0,0.2); border-radius:15rpx; padding:15rpx; }
.link-item { display:flex; align-items:center; justify-content:space-between; padding:15rpx 0; border-bottom:1rpx solid rgba(255,255,255,0.1); }
.link-url { flex:1; font-size:22rpx; color:rgba(255,255,255,0.8); word-break:break-all; margin-right:15rpx; }
.link-status { font-size:20rpx; color:rgba(255,255,255,0.5); margin-right:15rpx; }
.copy-link-btn { padding:8rpx 20rpx; background:#00B4FF; color:white; border-radius:15rpx; font-size:22rpx; }
.load-more-links { text-align:center; padding:20rpx 0; }
.load-more-btn { display:inline-block; padding:15rpx 40rpx; background:linear-gradient(135deg, #9C27B0, #673AB7); border-radius:30rpx; color:white; font-size:26rpx; }
.link-loading, .link-empty { text-align:center; padding:30rpx; color:rgba(255,255,255,0.5); font-size:24rpx; }
/* 弹窗按钮 */
.modal-actions-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18rpx; padding:30rpx 40rpx 40rpx; border-top:1rpx solid rgba(255,255,255,0.1); }
.modal-grid-btn {
height:85rpx; border-radius:42rpx; font-size:28rpx; font-weight:600; transition:all 0.3s;
border:none; padding:0 20rpx; box-shadow:0 8rpx 25rpx rgba(0,0,0,0.3), inset 0 1rpx 0 rgba(255,255,255,0.2);
display:flex !important; align-items:center !important; justify-content:center !important;
}
.generate-modal-grid-btn { background:linear-gradient(145deg, #00B4FF, #0091EA); color:white; }
.copy-modal-grid-btn { background:linear-gradient(145deg, #9C27B0, #673AB7); color:white; }
.copy-modal-grid-btn.copied { background:linear-gradient(145deg, #FF9800, #F57C00); }
.edit-modal-grid-btn { background:linear-gradient(145deg, #4CAF50, #2E7D32); color:white; }
.delete-modal-grid-btn { background:linear-gradient(145deg, #FF4444, #CC0000); color:white; }
/* 编辑区 */
.edit-section { padding:30rpx 40rpx 20rpx; border-top:1rpx solid rgba(255,255,255,0.1); margin-top:20rpx; }
.edit-item { margin-bottom:30rpx; }
.edit-label { font-size:26rpx; color:rgba(255,255,255,0.8); margin-bottom:15rpx; font-weight:600; }
.edit-input { width:100%; background:rgba(255,255,255,0.08); border:1.5rpx solid rgba(255,255,255,0.2); border-radius:15rpx; padding:25rpx; font-size:28rpx; color:#FFFFFF; }
.intro-edit { min-height:150rpx; }
.price-edit { text-align:center; font-size:32rpx; font-weight:600; height:90rpx; line-height:90rpx; }
.picker-view { padding:25rpx; background:rgba(255,255,255,0.08); border-radius:15rpx; border:1.5rpx solid rgba(255,255,255,0.2); color:#fff; }
.commission-item { display:flex; align-items:center; gap:20rpx; }
.commission-input { flex:1; background:rgba(255,255,255,0.08); border-radius:15rpx; padding:20rpx; color:#fff; }
/* 添加表单 */
.add-form { padding:30rpx 40rpx 20rpx; }
.form-item { margin-bottom:35rpx; }
.form-label { font-size:28rpx; color:rgba(255,255,255,0.8); margin-bottom:18rpx; font-weight:600; }
.intro-input, .price-input { width:100%; background:rgba(255,255,255,0.08); border:1.5rpx solid rgba(255,255,255,0.2); border-radius:15rpx; padding:25rpx; font-size:28rpx; color:#FFFFFF; }
.intro-input { min-height:180rpx; }
.price-input { height:90rpx; line-height:90rpx; text-align:center; font-weight:600; }
.add-actions-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:25rpx; padding:30rpx 40rpx 40rpx; border-top:1rpx solid rgba(255,255,255,0.1); }
.cancel-grid-btn { background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.8); border:1.5rpx solid rgba(255,255,255,0.2); }
.confirm-add-grid-btn { background:linear-gradient(145deg, #9C27B0, #673AB7); color:white; }
/* 确认弹窗 */
.confirm-content {
background:linear-gradient(145deg, rgba(40,40,60,0.95), rgba(50,50,70,0.95));
border-radius:25rpx; padding:50rpx 40rpx 40rpx; width:85%; max-width:550rpx;
border:1.5rpx solid rgba(255,255,255,0.15); box-shadow:0 30rpx 90rpx rgba(0,0,0,0.7); text-align:center;
animation:scaleIn 0.3s ease;
}
@keyframes scaleIn { from{transform:scale(0.8); opacity:0;} to{transform:scale(1); opacity:1;} }
.confirm-title { font-size:34rpx; font-weight:bold; color:#FFFFFF; margin-bottom:25rpx; }
.confirm-text { font-size:28rpx; color:rgba(255,255,255,0.8); margin-bottom:40rpx; }
.confirm-actions-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:25rpx; }
.confirm-grid-btn { height:85rpx; border-radius:42rpx; font-size:28rpx; font-weight:600; display:flex; align-items:center; justify-content:center; }
.cancel-confirm-grid-btn { background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.8); border:1.5rpx solid rgba(255,255,255,0.2); }
.delete-confirm-grid-btn { background:linear-gradient(145deg, #FF4444, #CC0000); color:white; }
.confirm-new-link-grid-btn { background:linear-gradient(145deg, #00B4FF, #0091EA); color:white; }
.loading-mask { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(18,18,24,0.95); display:flex; align-items:center; justify-content:center; z-index:10000; }
.loading-content { background:rgba(40,40,60,0.95); padding:60rpx 80rpx; border-radius:30rpx; display:flex; flex-direction:column; align-items:center; box-shadow:0 25rpx 70rpx rgba(0,0,0,0.6); }
.loading-spinner { width:90rpx; height:90rpx; border:8rpx solid rgba(0,180,255,0.2); border-top:8rpx solid #00B4FF; border-radius:50%; animation:spin 1.2s linear infinite; margin-bottom:35rpx; }
.loading-text { font-size:30rpx; color:#00B4FF; font-weight:600; }
@keyframes spin { 0%{transform:rotate(0deg);} 100%{transform:rotate(360deg);} }