统一排行榜对齐星雀UI,页面资源后台配置实时刷新
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
363
miniprogram/pages/sjpaidan/sjpaidan.js
Normal file
363
miniprogram/pages/sjpaidan/sjpaidan.js
Normal file
@@ -0,0 +1,363 @@
|
||||
// pages/sjpaidan/sjpaidan.js
|
||||
import request from '../../utils/request.js'
|
||||
import PopupService from '../../services/popupService.js'
|
||||
import { showConfirmByScene } from '../../utils/scriptService.js'
|
||||
|
||||
Page({
|
||||
data: {
|
||||
sjyue: '0.00',
|
||||
shangpinList: [],
|
||||
selectedTypeId: null,
|
||||
selectedHuiyuanId: null,
|
||||
selectedYaoqiuleixing: null,
|
||||
currentTypeChenghaoList: [],
|
||||
|
||||
dingdanJieshao: '',
|
||||
dingdanBeizhu: '',
|
||||
laobanName: '',
|
||||
zhidingUid: '',
|
||||
jiage: '',
|
||||
|
||||
selectedLabelId: '',
|
||||
selectedLabelName: '',
|
||||
|
||||
commissionEnabled: false,
|
||||
commissionValue: '',
|
||||
|
||||
isSpecialType: false,
|
||||
currentTypeGoodsList: [],
|
||||
selectedGoodsId: null,
|
||||
selectedGoodsTitle: '',
|
||||
commissionLocked: false,
|
||||
|
||||
isLoading: false,
|
||||
isSubmitting: false,
|
||||
tutorialBtnHidden: false,
|
||||
bgImageUrl: ''
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.loadBgImage()
|
||||
this.loadShangjiaYue()
|
||||
this.loadShangpinTypes()
|
||||
this.startTutorialBtnTimer()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.loadShangjiaYue()
|
||||
this.loadBgImage()
|
||||
this.registerNotificationComponent()
|
||||
this.startTutorialBtnTimer()
|
||||
},
|
||||
|
||||
onHide() {
|
||||
PopupService.reset()
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
if (this.tutorialTimer) clearTimeout(this.tutorialTimer)
|
||||
PopupService.reset()
|
||||
},
|
||||
|
||||
loadBgImage() {
|
||||
const app = getApp()
|
||||
const ossBase = app.globalData.ossImageUrl || 'https://your-oss-bucket.oss-cn-region.aliyuncs.com'
|
||||
const bgUrl = ossBase.replace(/\/$/, '') + '/beijing/shangjiapaidan/bg.jpg'
|
||||
this.setData({ bgImageUrl: bgUrl })
|
||||
},
|
||||
|
||||
loadShangjiaYue() {
|
||||
const app = getApp()
|
||||
const shangjiaData = app.globalData.shangjia || {}
|
||||
this.setData({ sjyue: shangjiaData.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])
|
||||
}
|
||||
} else {
|
||||
throw new Error(res.data.msg || '加载失败')
|
||||
}
|
||||
} catch (error) {
|
||||
this.setData({ isLoading: false })
|
||||
wx.showToast({ title: '加载类型失败', icon: 'error' })
|
||||
}
|
||||
},
|
||||
|
||||
// 🔴 切换类型时清空订单介绍、备注、标签、商品模板和押金
|
||||
setSelectedType(item) {
|
||||
const isSpecial = item.is_special_type || false
|
||||
|
||||
this.setData({
|
||||
selectedTypeId: item.id,
|
||||
selectedHuiyuanId: item.huiyuan_id,
|
||||
selectedYaoqiuleixing: item.yaoqiuleixing,
|
||||
currentTypeChenghaoList: item.chenghaoList || [],
|
||||
selectedLabelId: '',
|
||||
selectedLabelName: '',
|
||||
selectedGoodsId: null,
|
||||
selectedGoodsTitle: '',
|
||||
isSpecialType: isSpecial,
|
||||
currentTypeGoodsList: item.goodsList || [],
|
||||
// 清空订单介绍和备注
|
||||
dingdanJieshao: '',
|
||||
dingdanBeizhu: '',
|
||||
// 重置押金,等用户选商品再设置
|
||||
commissionEnabled: false,
|
||||
commissionValue: '',
|
||||
commissionLocked: false
|
||||
})
|
||||
},
|
||||
|
||||
onGoodsItemTap(e) {
|
||||
const goodsId = e.currentTarget.dataset.id
|
||||
if (!goodsId) return
|
||||
|
||||
const goods = this.data.currentTypeGoodsList.find(item => item.id == goodsId)
|
||||
if (!goods) {
|
||||
wx.showToast({ title: '商品数据异常', icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
const hasYongjin = goods.yongjin && parseFloat(goods.yongjin) > 0
|
||||
this.setData({
|
||||
selectedGoodsId: goods.id,
|
||||
selectedGoodsTitle: goods.biaoqian || '',
|
||||
dingdanJieshao: goods.jieshao || '',
|
||||
dingdanBeizhu: '',
|
||||
commissionEnabled: hasYongjin,
|
||||
commissionValue: hasYongjin ? goods.yongjin : '',
|
||||
commissionLocked: true
|
||||
})
|
||||
},
|
||||
|
||||
onDingdanJieshaoInput(e) {
|
||||
if (this.data.isSpecialType) return
|
||||
this.setData({ dingdanJieshao: e.detail.value })
|
||||
},
|
||||
onDingdanBeizhuInput(e) {
|
||||
if (this.data.isSpecialType) return
|
||||
this.setData({ dingdanBeizhu: e.detail.value })
|
||||
},
|
||||
onLaobanNameInput(e) { this.setData({ laobanName: e.detail.value }) },
|
||||
onZhidingUidInput(e) { this.setData({ zhidingUid: e.detail.value }) },
|
||||
onJiageInput(e) {
|
||||
let value = e.detail.value
|
||||
if (value === '' || /^\d+(\.\d{0,2})?$/.test(value)) {
|
||||
this.setData({ jiage: value })
|
||||
}
|
||||
},
|
||||
|
||||
onLabelChange(e) {
|
||||
const idx = e.detail.value
|
||||
const label = this.data.currentTypeChenghaoList[idx]
|
||||
if (label) {
|
||||
this.setData({ selectedLabelId: label.id, selectedLabelName: label.mingcheng })
|
||||
} else {
|
||||
this.setData({ selectedLabelId: '', selectedLabelName: '' })
|
||||
}
|
||||
},
|
||||
|
||||
onCommissionToggle() {
|
||||
if (this.data.commissionLocked) return
|
||||
this.setData({ commissionEnabled: !this.data.commissionEnabled })
|
||||
},
|
||||
onCommissionValueInput(e) {
|
||||
if (this.data.commissionLocked) return
|
||||
let value = e.detail.value
|
||||
if (value === '' || /^\d+(\.\d{0,2})?$/.test(value)) {
|
||||
this.setData({ commissionValue: value })
|
||||
}
|
||||
},
|
||||
|
||||
validateForm() {
|
||||
const {
|
||||
selectedTypeId, dingdanJieshao, laobanName, jiage,
|
||||
sjyue, commissionEnabled, commissionValue,
|
||||
isSpecialType, selectedGoodsId
|
||||
} = this.data
|
||||
|
||||
if (!selectedTypeId) {
|
||||
wx.showToast({ title: '请选择订单类型', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
if (isSpecialType && !selectedGoodsId) {
|
||||
wx.showToast({ title: '请选择一个商品模板', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
if (!dingdanJieshao.trim()) {
|
||||
wx.showToast({ title: '请输入订单介绍', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
if (!laobanName.trim()) {
|
||||
wx.showToast({ title: '请输入老板游戏昵称', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
if (!jiage) {
|
||||
wx.showToast({ title: '请输入订单价格', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
|
||||
const price = parseFloat(jiage)
|
||||
if (isNaN(price) || price < 0.1 || price > 10000) {
|
||||
wx.showToast({ title: '价格需在0.1-10000元之间', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
if (jiage.includes('.') && jiage.split('.')[1].length > 2) {
|
||||
wx.showToast({ title: '最多支持两位小数', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
|
||||
if (commissionEnabled) {
|
||||
const com = parseFloat(commissionValue)
|
||||
if (isNaN(com) || com <= 0) {
|
||||
wx.showToast({ title: '请输入有效的佣金金额', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
if (com > 50000) {
|
||||
wx.showToast({ title: '佣金建议不超过50000元', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const balance = parseFloat(sjyue)
|
||||
if (price > balance) {
|
||||
wx.showModal({
|
||||
title: '余额不足',
|
||||
content: `当前余额${sjyue}元,需要${jiage}元。请先充值。`,
|
||||
confirmText: '去充值',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({ url: '/pages/sjchongzhi/sjchongzhi' })
|
||||
}
|
||||
}
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
resetForm() {
|
||||
this.setData({
|
||||
dingdanJieshao: '',
|
||||
dingdanBeizhu: '',
|
||||
laobanName: '',
|
||||
zhidingUid: '',
|
||||
jiage: '',
|
||||
selectedLabelId: '',
|
||||
selectedLabelName: '',
|
||||
selectedGoodsId: null,
|
||||
selectedGoodsTitle: '',
|
||||
commissionEnabled: false,
|
||||
commissionValue: ''
|
||||
})
|
||||
const currentType = this.data.shangpinList.find(t => t.id === this.data.selectedTypeId)
|
||||
if (currentType) this.setSelectedType(currentType)
|
||||
},
|
||||
|
||||
async onSubmit() {
|
||||
if (this.data.isSubmitting) return
|
||||
if (!this.validateForm()) return
|
||||
showConfirmByScene('merchant_dispatch_confirm', () => this.doSubmit())
|
||||
},
|
||||
|
||||
async doSubmit() {
|
||||
if (this.data.isSubmitting) return
|
||||
this.setData({ isSubmitting: true })
|
||||
|
||||
const postData = {
|
||||
shangpinTypeId: this.data.selectedTypeId,
|
||||
huiyuanId: this.data.selectedHuiyuanId,
|
||||
yaoqiuleixing: this.data.selectedYaoqiuleixing,
|
||||
dingdanJieshao: this.data.dingdanJieshao.trim(),
|
||||
dingdanBeizhu: this.data.dingdanBeizhu.trim() || '',
|
||||
laobanName: this.data.laobanName.trim(),
|
||||
zhidingUid: this.data.zhidingUid.trim() || '',
|
||||
jiage: this.data.jiage,
|
||||
labelId: this.data.selectedLabelId || '',
|
||||
labelName: this.data.selectedLabelName || '',
|
||||
commissionEnabled: this.data.commissionEnabled,
|
||||
commissionValue: this.data.commissionEnabled ? this.data.commissionValue : '',
|
||||
goodsId: this.data.selectedGoodsId || ''
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await request({
|
||||
url: '/dingdan/sjpaifa',
|
||||
method: 'POST',
|
||||
data: postData
|
||||
})
|
||||
if (res && res.data.code === 200) {
|
||||
wx.showToast({ title: '派单成功', icon: 'success' })
|
||||
const orderAmount = parseFloat(this.data.jiage)
|
||||
const app = getApp()
|
||||
if (app.globalData.shangjia) {
|
||||
const newBalance = parseFloat(app.globalData.shangjia.sjyue || '0') - orderAmount
|
||||
app.globalData.shangjia.sjyue = newBalance.toFixed(2)
|
||||
app.globalData.shangjia.fadanzong = (parseInt(app.globalData.shangjia.fadanzong || '0') + 1).toString()
|
||||
app.globalData.shangjia.riliushui = (parseFloat(app.globalData.shangjia.riliushui || '0') + orderAmount).toFixed(2)
|
||||
app.globalData.shangjia.yueliushui = (parseFloat(app.globalData.shangjia.yueliushui || '0') + orderAmount).toFixed(2)
|
||||
this.setData({ sjyue: app.globalData.shangjia.sjyue })
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.resetForm()
|
||||
this.setData({ isSubmitting: false })
|
||||
}, 1500)
|
||||
} else {
|
||||
wx.showModal({ title: '派单失败', content: res.data.msg || '请稍后重试', showCancel: false })
|
||||
this.setData({ isSubmitting: false })
|
||||
}
|
||||
} catch (error) {
|
||||
wx.showModal({ title: '请求失败', content: error.message || '网络错误', showCancel: false })
|
||||
this.setData({ isSubmitting: false })
|
||||
}
|
||||
},
|
||||
|
||||
onSelectType(e) {
|
||||
const { item } = e.currentTarget.dataset
|
||||
this.setSelectedType(item)
|
||||
},
|
||||
|
||||
registerNotificationComponent() {
|
||||
const app = getApp()
|
||||
const notificationComp = this.selectComponent('#global-notification')
|
||||
if (notificationComp && notificationComp.showNotification) {
|
||||
app.globalData.globalNotification = {
|
||||
show: (data) => notificationComp.showNotification(data),
|
||||
hide: () => notificationComp.hideNotification()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
startTutorialBtnTimer() {
|
||||
if (this.tutorialTimer) clearTimeout(this.tutorialTimer)
|
||||
this.tutorialTimer = setTimeout(() => {
|
||||
this.setData({ tutorialBtnHidden: true })
|
||||
}, 5000)
|
||||
},
|
||||
|
||||
resetTutorialBtn() {
|
||||
if (this.data.tutorialBtnHidden) this.setData({ tutorialBtnHidden: false })
|
||||
if (this.tutorialTimer) clearTimeout(this.tutorialTimer)
|
||||
this.tutorialTimer = setTimeout(() => {
|
||||
this.setData({ tutorialBtnHidden: true })
|
||||
}, 5000)
|
||||
},
|
||||
|
||||
async onTutorialBtnTap() {
|
||||
this.resetTutorialBtn()
|
||||
PopupService.checkAndShow(this, 'sjpd1')
|
||||
}
|
||||
})
|
||||
7
miniprogram/pages/sjpaidan/sjpaidan.json
Normal file
7
miniprogram/pages/sjpaidan/sjpaidan.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"global-notification": "/components/global-notification/global-notification"
|
||||
},
|
||||
"navigationBarTitleText": "商家派单"
|
||||
|
||||
}
|
||||
164
miniprogram/pages/sjpaidan/sjpaidan.wxml
Normal file
164
miniprogram/pages/sjpaidan/sjpaidan.wxml
Normal file
@@ -0,0 +1,164 @@
|
||||
<!-- pages/sjpaidan/sjpaidan.wxml -->
|
||||
<view class="page-container" style="background-image: url('{{bgImageUrl}}');">
|
||||
<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="section" wx:if="{{isSpecialType && currentTypeGoodsList.length > 0}}">
|
||||
<text class="section-title">选择商品模板(点击直接选中)</text>
|
||||
<scroll-view class="goods-scroll" scroll-x="true" enable-flex>
|
||||
<block wx:for="{{currentTypeGoodsList}}" wx:key="id">
|
||||
<view
|
||||
class="goods-item {{selectedGoodsId === item.id ? 'goods-selected' : ''}}"
|
||||
data-id="{{item.id}}"
|
||||
bindtap="onGoodsItemTap"
|
||||
>
|
||||
<text class="goods-title">{{item.biaoqian}}</text>
|
||||
<text class="goods-detail-hint">点击选中</text>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="form-container">
|
||||
<view class="form-item">
|
||||
<text class="form-label required">订单介绍</text>
|
||||
<scroll-view wx:if="{{isSpecialType}}" class="form-input form-input-scroll" scroll-y="true">
|
||||
<text>{{dingdanJieshao}}</text>
|
||||
</scroll-view>
|
||||
<input wx:else
|
||||
class="form-input"
|
||||
placeholder="请输入订单主要内容(必填,最多50字)"
|
||||
maxlength="50"
|
||||
value="{{dingdanJieshao}}"
|
||||
bindinput="onDingdanJieshaoInput"
|
||||
/>
|
||||
<text class="word-count">{{dingdanJieshao.length}}/50</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item" wx:if="{{!isSpecialType}}">
|
||||
<text class="form-label">订单备注(选填)</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="填写或补充其他信息"
|
||||
maxlength="50"
|
||||
value="{{dingdanBeizhu}}"
|
||||
bindinput="onDingdanBeizhuInput"
|
||||
/>
|
||||
<text class="word-count">{{dingdanBeizhu.length}}/50</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label required">老板昵称/ID</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入(必填,最多15字)"
|
||||
maxlength="15"
|
||||
value="{{laobanName}}"
|
||||
bindinput="onLaobanNameInput"
|
||||
/>
|
||||
<text class="word-count">{{laobanName.length}}/15</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">指定UID(选填)</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入指定UID"
|
||||
maxlength="10"
|
||||
value="{{zhidingUid}}"
|
||||
bindinput="onZhidingUidInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label required">订单价格(元)</text>
|
||||
<input
|
||||
class="form-input"
|
||||
type="digit"
|
||||
placeholder="0.1 - 10000,支持两位小数"
|
||||
value="{{jiage}}"
|
||||
bindinput="onJiageInput"
|
||||
/>
|
||||
<text class="price-tip">范围:0.1 - 10000元</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item" wx:if="{{currentTypeChenghaoList.length > 0}}">
|
||||
<text class="form-label">要求打手标签*如金牌打手(选填)</text>
|
||||
<picker
|
||||
mode="selector"
|
||||
range="{{currentTypeChenghaoList}}"
|
||||
range-key="mingcheng"
|
||||
bindchange="onLabelChange"
|
||||
>
|
||||
<view class="picker-view">
|
||||
<text>{{selectedLabelName || '无'}}</text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view class="form-item commission-item">
|
||||
<text class="form-label">要求打手押金(建议≤50元)</text>
|
||||
<switch checked="{{commissionEnabled}}" disabled="{{commissionLocked}}" bindchange="onCommissionToggle"/>
|
||||
<input
|
||||
wx:if="{{commissionEnabled}}"
|
||||
class="commission-input {{commissionLocked ? 'input-disabled' : ''}}"
|
||||
type="digit"
|
||||
placeholder="押金金额"
|
||||
value="{{commissionValue}}"
|
||||
disabled="{{commissionLocked}}"
|
||||
bindinput="onCommissionValueInput"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn-container">
|
||||
<view
|
||||
class="submit-btn {{isSubmitting ? 'btn-disabled' : ''}}"
|
||||
bindtap="onSubmit"
|
||||
hover-class="btn-hover"
|
||||
>
|
||||
<text class="btn-text">{{isSubmitting ? '派发中...' : '立即派发'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="loading-mask" wx:if="{{isLoading}}">
|
||||
<view class="loading-content">
|
||||
<view class="loading-spinner"></view>
|
||||
<text class="loading-text">加载中...</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<global-notification id="global-notification" />
|
||||
|
||||
<view
|
||||
class="tutorial-btn {{tutorialBtnHidden ? 'tutorial-btn-hidden' : ''}}"
|
||||
bindtap="onTutorialBtnTap"
|
||||
hover-class="tutorial-btn-hover"
|
||||
>
|
||||
<text class="tutorial-btn-text">教程</text>
|
||||
</view>
|
||||
|
||||
<popup-notice id="popupNotice" />
|
||||
</view>
|
||||
437
miniprogram/pages/sjpaidan/sjpaidan.wxss
Normal file
437
miniprogram/pages/sjpaidan/sjpaidan.wxss
Normal file
@@ -0,0 +1,437 @@
|
||||
/* pages/sjpaidan/sjpaidan.wxss - 黑金升级版 + 背景图由js动态拼接 */
|
||||
page {
|
||||
background-color: #0a0a0f;
|
||||
}
|
||||
|
||||
.page-container {
|
||||
min-height: 100vh;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
position: relative;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
|
||||
.page-container::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(10, 10, 15, 0.75);
|
||||
backdrop-filter: blur(6rpx);
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.balance-card,
|
||||
.section,
|
||||
.form-container,
|
||||
.btn-container,
|
||||
.loading-mask {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.balance-card {
|
||||
background: linear-gradient(135deg, rgba(20,20,30,0.95), rgba(30,30,50,0.95));
|
||||
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,180,255,0.15);
|
||||
text-align: center;
|
||||
border: 1.5rpx solid rgba(0,180,255,0.2);
|
||||
backdrop-filter: blur(10rpx);
|
||||
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: #FFD700;
|
||||
text-shadow: 0 0 20rpx rgba(255,215,0,0.7);
|
||||
animation: amountGlow 3s infinite alternate;
|
||||
}
|
||||
@keyframes amountGlow {
|
||||
0% { color: #FFD700; text-shadow: 0 0 15rpx rgba(255,215,0,0.6); }
|
||||
100% { color: #FFE44D; text-shadow: 0 0 25rpx rgba(255,215,0,0.9); }
|
||||
}
|
||||
.amount-unit {
|
||||
font-size: 36rpx;
|
||||
color: #FFD700;
|
||||
margin-left: 12rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.balance-tip {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255,255,255,0.6);
|
||||
position: relative;
|
||||
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);
|
||||
}
|
||||
.type-text {
|
||||
max-width: 220rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 特殊商品模板 */
|
||||
.goods-scroll {
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
height: 160rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.goods-item {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
width: 200rpx;
|
||||
height: 140rpx;
|
||||
margin-right: 20rpx;
|
||||
background: rgba(255,255,255,0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(255,255,255,0.15);
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
transition: all 0.3s;
|
||||
backdrop-filter: blur(10rpx);
|
||||
}
|
||||
.goods-item:active {
|
||||
background: rgba(255,255,255,0.15);
|
||||
transform: scale(0.96);
|
||||
}
|
||||
.goods-selected {
|
||||
border-color: #FFD700;
|
||||
background: rgba(255,215,0,0.15);
|
||||
box-shadow: 0 0 20rpx rgba(255,215,0,0.3);
|
||||
}
|
||||
.goods-title {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
margin-bottom: 6rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.goods-detail-hint {
|
||||
font-size: 20rpx;
|
||||
color: rgba(255,255,255,0.5);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
background: rgba(30,30,45,0.85);
|
||||
backdrop-filter: blur(20rpx);
|
||||
border-radius: 30rpx;
|
||||
padding: 30rpx;
|
||||
box-shadow: 0 10rpx 30rpx rgba(0,0,0,0.3);
|
||||
border: 1.5rpx solid rgba(255,255,255,0.1);
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.form-item {
|
||||
margin-bottom: 35rpx;
|
||||
position: relative;
|
||||
}
|
||||
.form-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.form-label {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: rgba(255,255,255,0.9);
|
||||
display: block;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.form-label.required::after {
|
||||
content: '*';
|
||||
color: #ff4444;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
.form-input {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-radius: 16rpx;
|
||||
padding: 0 25rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
border: 2rpx solid rgba(255,255,255,0.2);
|
||||
box-sizing: border-box;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.form-input:focus {
|
||||
border-color: #9C27B0;
|
||||
background: rgba(255,255,255,0.15);
|
||||
}
|
||||
.input-disabled {
|
||||
background: rgba(255,255,255,0.05);
|
||||
color: rgba(255,255,255,0.6);
|
||||
border-color: rgba(255,255,255,0.08);
|
||||
}
|
||||
.word-count {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 24rpx;
|
||||
color: rgba(255,255,255,0.5);
|
||||
}
|
||||
.price-tip {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255,255,255,0.5);
|
||||
margin-top: 10rpx;
|
||||
display: block;
|
||||
}
|
||||
.picker-view {
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx 25rpx;
|
||||
border: 2rpx solid rgba(255,255,255,0.2);
|
||||
color: rgba(255,255,255,0.9);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.commission-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.commission-item .form-label {
|
||||
width: 100%;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.commission-input {
|
||||
flex: 1;
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
color: #fff;
|
||||
border: 2rpx solid rgba(255,255,255,0.2);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.commission-input.input-disabled {
|
||||
background: rgba(255,255,255,0.05);
|
||||
color: rgba(255,255,255,0.6);
|
||||
}
|
||||
|
||||
.btn-container {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: linear-gradient(to top, rgba(10,10,15,0.95), transparent);
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 9999;
|
||||
}
|
||||
.submit-btn {
|
||||
background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
|
||||
border-radius: 50rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 10rpx 30rpx rgba(255,68,68,0.3);
|
||||
transition: all 0.3s;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.submit-btn::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
|
||||
animation: shine 2s infinite;
|
||||
}
|
||||
.btn-hover {
|
||||
transform: translateY(-2rpx);
|
||||
box-shadow: 0 15rpx 40rpx rgba(255,68,68,0.4);
|
||||
}
|
||||
.btn-disabled {
|
||||
opacity: 0.6;
|
||||
filter: grayscale(0.3);
|
||||
pointer-events: none;
|
||||
}
|
||||
.btn-text {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
letter-spacing: 4rpx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
@keyframes shine {
|
||||
0% { left: -100%; }
|
||||
100% { left: 100%; }
|
||||
}
|
||||
|
||||
.loading-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0,0,0,0.8);
|
||||
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); }
|
||||
}
|
||||
|
||||
.tutorial-btn {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 20%;
|
||||
transform: translateY(-50%);
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
backdrop-filter: blur(15rpx);
|
||||
border-radius: 60rpx 0 0 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 10001;
|
||||
box-shadow: -8rpx 0 20rpx rgba(0,0,0,0.3);
|
||||
transition: right 0.3s ease-out;
|
||||
border: 2rpx solid rgba(255,215,0,0.5);
|
||||
border-right: none;
|
||||
}
|
||||
.tutorial-btn-text {
|
||||
color: #FFD700;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
writing-mode: vertical-rl;
|
||||
letter-spacing: 6rpx;
|
||||
}
|
||||
.tutorial-btn-hidden {
|
||||
right: -80rpx;
|
||||
}
|
||||
.tutorial-btn-hover {
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
transform: translateY(-50%) scale(1.05);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.form-input-scroll {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
padding: 0 25rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
Reference in New Issue
Block a user