|
|
@@ -1,44 +1,54 @@
|
|
|
<template>
|
|
|
<view class="page">
|
|
|
- <u-navbar title="点餐管理" :autoBack="true" :placeholder="true" :border-bottom="false"></u-navbar>
|
|
|
-
|
|
|
- <!-- 下单类型 -->
|
|
|
- <view class="mode-card">
|
|
|
- <text class="mode-label">下单类型</text>
|
|
|
- <u-radio-group v-model="orderMode" active-color="#5B9EFF" @change="onModeChange">
|
|
|
- <u-radio name="orderOnly" active-color="#5B9EFF">仅下单</u-radio>
|
|
|
- <u-radio name="orderPay" active-color="#5B9EFF">下单和支付</u-radio>
|
|
|
- </u-radio-group>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="table-card" :style="{ paddingBottom: tableList.length ? '24rpx' : '0' }">
|
|
|
- <view class="table-head">
|
|
|
- <text class="table-title">桌号·共{{ tableList.length }}桌</text>
|
|
|
- <view v-if="tableList.length" class="add-link" @click="openAdd">
|
|
|
- <u-icon name="plus" color="#5B9EFF" size="26"></u-icon>
|
|
|
- <text>添加桌号</text>
|
|
|
- </view>
|
|
|
+ <view class="page-content">
|
|
|
+ <u-navbar title="门店管理" :autoBack="true" :placeholder="true" :border-bottom="false"></u-navbar>
|
|
|
+
|
|
|
+ <!-- 下单类型 -->
|
|
|
+ <view class="mode-card">
|
|
|
+ <text class="mode-label">下单类型</text>
|
|
|
+ <u-radio-group v-model="orderMode" active-color="#5B9EFF" :disabled="modeSaving" @change="onModeChange">
|
|
|
+ <u-radio name="orderOnly" active-color="#3B4DF8" class="u-m-r-52">仅下单</u-radio>
|
|
|
+ <u-radio name="orderPay" active-color="#3B4DF8" class="radio-item">下单和支付</u-radio>
|
|
|
+ </u-radio-group>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 空态 -->
|
|
|
- <view v-if="!tableList.length" class="empty-box">
|
|
|
- <view class="empty-illust">
|
|
|
- <view class="box-lid"></view>
|
|
|
- <view class="box-body"></view>
|
|
|
+ <view class="table-card">
|
|
|
+ <view class="table-head">
|
|
|
+ <text class="table-title">桌号·共{{ total }}桌</text>
|
|
|
+ <view v-if="tableList.length" class="add-link" @click="openAdd">
|
|
|
+ <u-icon name="plus" color="#165DFF" size="26"></u-icon>
|
|
|
+ <text>添加桌号</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <text class="empty-text">您的门店暂无桌号哦~</text>
|
|
|
- <view class="empty-btn" @click="openAdd">去添加桌号</view>
|
|
|
- </view>
|
|
|
|
|
|
- <!-- 列表 -->
|
|
|
- <view v-else class="table-list">
|
|
|
- <view class="list-row" v-for="item in tableList" :key="item.no">
|
|
|
- <text class="no-text">{{ item.no }}-桌号</text>
|
|
|
- <view class="qr-entry" @click="openQr(item)">
|
|
|
- <image class="qr-ico" src="/static/scan/qrcode.png" mode="aspectFit"></image>
|
|
|
- <text>二维码</text>
|
|
|
+ <!-- 空态 -->
|
|
|
+ <view v-if="!tableList.length" class="empty-box">
|
|
|
+ <view class="empty-illust">
|
|
|
+ <u-image width="350rpx" height="350rpx" :src="`${$config.staticUrl}/static/common/empty.png`"></u-image>
|
|
|
</view>
|
|
|
+ <text class="empty-text">您的门店暂无桌号哦~</text>
|
|
|
+ <view class="empty-btn" @click="openAdd">去添加桌号</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 列表:仅此区域滚动 -->
|
|
|
+ <scroll-view
|
|
|
+ v-else
|
|
|
+ scroll-y
|
|
|
+ class="table-scroll"
|
|
|
+ :lower-threshold="80"
|
|
|
+ @scrolltolower="loadMore"
|
|
|
+ >
|
|
|
+ <view class="table-list">
|
|
|
+ <view class="list-row" v-for="item in tableList" :key="item.id || item.no">
|
|
|
+ <text class="no-text">{{ item.no }}-桌号</text>
|
|
|
+ <view class="qr-entry" @click="openQr(item)">
|
|
|
+ <image class="qr-ico" :src="`${$config.staticUrl}/static/order-food/icon-qrcode.png`" mode="aspectFit"></image>
|
|
|
+ <text>二维码</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-loadmore :status="loadStatus" margin-top="24" margin-bottom="24" />
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -50,24 +60,26 @@
|
|
|
<u-popup v-model="addVisible" mode="bottom" border-radius="24" :mask-close-able="true">
|
|
|
<view class="add-sheet">
|
|
|
<view class="sheet-title">门店桌号</view>
|
|
|
- <view class="sheet-sub">桌号·共{{ tableList.length }}桌</view>
|
|
|
- <view class="range-row">
|
|
|
- <input
|
|
|
- class="range-input"
|
|
|
- type="number"
|
|
|
- v-model="startNo"
|
|
|
- placeholder="请输入开始桌号"
|
|
|
- placeholder-class="ph"
|
|
|
- />
|
|
|
- <text class="range-dash">-</text>
|
|
|
- <input
|
|
|
- class="range-input"
|
|
|
- type="number"
|
|
|
- v-model="endNo"
|
|
|
- placeholder="请输入结束桌号"
|
|
|
- placeholder-class="ph"
|
|
|
- />
|
|
|
- </view>
|
|
|
+ <view class="sheet-card">
|
|
|
+ <view class="sheet-sub">桌号·共{{ total }}桌</view>
|
|
|
+ <view class="range-row">
|
|
|
+ <input
|
|
|
+ class="range-input"
|
|
|
+ type="number"
|
|
|
+ v-model="startNo"
|
|
|
+ placeholder="请输入开始桌号"
|
|
|
+ placeholder-class="ph"
|
|
|
+ />
|
|
|
+ <text class="range-dash"></text>
|
|
|
+ <input
|
|
|
+ class="range-input"
|
|
|
+ type="number"
|
|
|
+ v-model="endNo"
|
|
|
+ placeholder="请输入结束桌号"
|
|
|
+ placeholder-class="ph"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="btn primary sheet-btn" @click="confirmAdd">确认添加</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
@@ -82,36 +94,32 @@
|
|
|
</u-popup>
|
|
|
|
|
|
<!-- 查看二维码:底部弹层 -->
|
|
|
- <u-popup v-model="qrVisible" mode="bottom" border-radius="24" :mask-close-able="true">
|
|
|
- <view class="qr-sheet">
|
|
|
- <view class="sheet-title">{{ currentTable.no }}桌号二维码</view>
|
|
|
- <view class="qr-block">
|
|
|
- <image class="qr-img" :src="miniQrUrl" mode="aspectFit"></image>
|
|
|
- <text class="qr-label">小程序二维码</text>
|
|
|
- </view>
|
|
|
- <view class="qr-block" v-if="officialQrUrl">
|
|
|
- <image class="qr-img" :src="officialQrUrl" mode="aspectFit"></image>
|
|
|
- <text class="qr-label">公众号二维码</text>
|
|
|
- </view>
|
|
|
- <view class="btn primary sheet-btn" @click="saveQr">保存二维码</view>
|
|
|
- </view>
|
|
|
- </u-popup>
|
|
|
+ <QrCodePopup
|
|
|
+ v-model="qrVisible"
|
|
|
+ :table-no="currentTable.no"
|
|
|
+ :mini-qr-url="miniQrUrl"
|
|
|
+ :official-qr-url="officialQrUrl"
|
|
|
+ ></QrCodePopup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { USER_INFO } from '@/common/util/constants.js'
|
|
|
+ import QrCodePopup from './components/QrCodePopup.vue'
|
|
|
+ import {
|
|
|
+ batchCreateTables,
|
|
|
+ fetchDiningConfig,
|
|
|
+ fetchTableList,
|
|
|
+ getMerchantId,
|
|
|
+ mapDiningModeToOrderMode,
|
|
|
+ mapOrderModeToDiningMode,
|
|
|
+ normalizeTableList,
|
|
|
+ parseDiningConfigResponse,
|
|
|
+ parseTableListResponse,
|
|
|
+ saveDiningConfig
|
|
|
+ } from '@/api/diningTable.js'
|
|
|
|
|
|
- const STORAGE_LIST = 'ordering_table_list'
|
|
|
const STORAGE_MODE = 'ordering_order_mode'
|
|
|
|
|
|
- function padTableNo(num) {
|
|
|
- const intVal = parseInt(String(num).trim(), 10)
|
|
|
- if (Number.isNaN(intVal) || intVal < 1) return ''
|
|
|
- if (intVal >= 1 && intVal <= 99) return String(intVal).padStart(3, '0')
|
|
|
- return String(intVal)
|
|
|
- }
|
|
|
-
|
|
|
function buildQrContent(merchantId, tableNo) {
|
|
|
return `${merchantId || ''}桌号${tableNo}`
|
|
|
}
|
|
|
@@ -125,6 +133,11 @@
|
|
|
return {
|
|
|
orderMode: 'orderOnly',
|
|
|
tableList: [],
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ loadStatus: 'loadmore',
|
|
|
+ listLoading: false,
|
|
|
addVisible: false,
|
|
|
startNo: '',
|
|
|
endNo: '',
|
|
|
@@ -133,35 +146,128 @@
|
|
|
miniQrUrl: '',
|
|
|
officialQrUrl: '',
|
|
|
merchantId: '',
|
|
|
+ modeSaving: false,
|
|
|
tipVisible: false,
|
|
|
- tipMessage: ''
|
|
|
+ tipMessage: '',
|
|
|
+ submitting: false
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ QrCodePopup
|
|
|
+ },
|
|
|
onShow() {
|
|
|
- const info = uni.getStorageSync(USER_INFO) || {}
|
|
|
- this.merchantId = info.merchantId || ''
|
|
|
- this.loadData()
|
|
|
+ this.merchantId = getMerchantId()
|
|
|
+ this.loadDiningConfig()
|
|
|
+ this.loadData(true)
|
|
|
},
|
|
|
methods: {
|
|
|
storageKey(base) {
|
|
|
return `${base}_${this.merchantId || 'default'}`
|
|
|
},
|
|
|
- loadData() {
|
|
|
- const mode = uni.getStorageSync(this.storageKey(STORAGE_MODE))
|
|
|
- if (mode === 'orderOnly' || mode === 'orderPay') this.orderMode = mode
|
|
|
- const list = uni.getStorageSync(this.storageKey(STORAGE_LIST))
|
|
|
- this.tableList = Array.isArray(list) ? list : []
|
|
|
+ loadMore() {
|
|
|
+ this.loadData(false)
|
|
|
+ },
|
|
|
+ loadDiningConfig() {
|
|
|
+ if (!this.merchantId) return
|
|
|
+ fetchDiningConfig(this.merchantId).then(res => {
|
|
|
+ if (res.data.code !== 200 || !res.data.result) return
|
|
|
+ const cfg = parseDiningConfigResponse(res.data.result)
|
|
|
+ if (cfg.diningMode) {
|
|
|
+ this.orderMode = mapDiningModeToOrderMode(cfg.diningMode)
|
|
|
+ uni.setStorageSync(this.storageKey(STORAGE_MODE), this.orderMode)
|
|
|
+ }
|
|
|
+ }).catch(() => {})
|
|
|
},
|
|
|
- saveList() {
|
|
|
- uni.setStorageSync(this.storageKey(STORAGE_LIST), this.tableList)
|
|
|
+ loadData(refresh = true) {
|
|
|
+ if (!this.merchantId) {
|
|
|
+ this.tableList = []
|
|
|
+ this.total = 0
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.listLoading) return
|
|
|
+ if (!refresh && this.loadStatus === 'nomore') return
|
|
|
+
|
|
|
+ if (refresh) {
|
|
|
+ this.pageNo = 1
|
|
|
+ this.loadStatus = 'loadmore'
|
|
|
+ }
|
|
|
+
|
|
|
+ const requestPage = refresh ? 1 : this.pageNo
|
|
|
+ this.listLoading = true
|
|
|
+ if (!refresh) this.loadStatus = 'loading'
|
|
|
+
|
|
|
+ fetchTableList(this.merchantId, {
|
|
|
+ pageNo: requestPage,
|
|
|
+ pageSize: this.pageSize
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code !== 200) {
|
|
|
+ if (refresh) {
|
|
|
+ this.tableList = []
|
|
|
+ this.total = 0
|
|
|
+ }
|
|
|
+ this.showTip(res.data.message || '获取桌号列表失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const parsed = parseTableListResponse(res.data.result)
|
|
|
+ const newList = normalizeTableList(parsed.list)
|
|
|
+ this.tableList = refresh
|
|
|
+ ? newList
|
|
|
+ : normalizeTableList(this.tableList.concat(newList))
|
|
|
+ this.total = parsed.total
|
|
|
+ this.pageNo = parsed.current + 1
|
|
|
+ this.loadStatus = parsed.hasMore ? 'loadmore' : 'nomore'
|
|
|
+ }).catch(() => {
|
|
|
+ if (refresh) {
|
|
|
+ this.tableList = []
|
|
|
+ this.total = 0
|
|
|
+ }
|
|
|
+ this.loadStatus = 'loadmore'
|
|
|
+ this.showTip('获取桌号列表失败,请稍后重试')
|
|
|
+ }).finally(() => {
|
|
|
+ this.listLoading = false
|
|
|
+ })
|
|
|
},
|
|
|
showTip(msg) {
|
|
|
this.tipMessage = msg
|
|
|
this.tipVisible = true
|
|
|
},
|
|
|
onModeChange(val) {
|
|
|
- this.orderMode = val
|
|
|
- uni.setStorageSync(this.storageKey(STORAGE_MODE), val)
|
|
|
+ if (!this.merchantId) {
|
|
|
+ this.showTip('未获取到门店信息')
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.orderMode = val === 'orderPay' ? 'orderOnly' : 'orderPay'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.modeSaving) return
|
|
|
+
|
|
|
+ const prevMode = val === 'orderPay' ? 'orderOnly' : 'orderPay'
|
|
|
+ this.modeSaving = true
|
|
|
+ uni.showLoading({ title: '保存中', mask: true })
|
|
|
+
|
|
|
+ saveDiningConfig({
|
|
|
+ merchantId: this.merchantId,
|
|
|
+ diningMode: mapOrderModeToDiningMode(val),
|
|
|
+ enabled: true, // 是否启用线上扫码点餐
|
|
|
+ version: 0 // 版本号
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ const cfg = parseDiningConfigResponse(res.data.result || {})
|
|
|
+ if (cfg.diningMode) this.orderMode = mapDiningModeToOrderMode(cfg.diningMode)
|
|
|
+ uni.setStorageSync(this.storageKey(STORAGE_MODE), this.orderMode)
|
|
|
+ uni.showToast({ title: '设置成功', icon: 'success' })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.orderMode = prevMode
|
|
|
+ this.showTip(res.data.message || '保存失败')
|
|
|
+ }).catch((err) => {
|
|
|
+ this.orderMode = prevMode
|
|
|
+ const msg = (err && err.data && err.data.message) || '保存失败,请稍后重试'
|
|
|
+ this.showTip(msg)
|
|
|
+ }).finally(() => {
|
|
|
+ this.modeSaving = false
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
},
|
|
|
openAdd() {
|
|
|
this.startNo = ''
|
|
|
@@ -175,9 +281,13 @@
|
|
|
this.showTip('桌号不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (!/^[0-9]+$/.test(startRaw) || !/^[0-9]+$/.test(endRaw)) {
|
|
|
+ this.showTip('桌号仅支持正整数')
|
|
|
+ return
|
|
|
+ }
|
|
|
const start = parseInt(startRaw, 10)
|
|
|
const end = parseInt(endRaw, 10)
|
|
|
- if (Number.isNaN(start) || Number.isNaN(end) || start < 1 || end < 1) {
|
|
|
+ if (start < 1 || end < 1) {
|
|
|
this.showTip('桌号不能为空')
|
|
|
return
|
|
|
}
|
|
|
@@ -189,65 +299,53 @@
|
|
|
this.showTip('单次最多添加200个桌号')
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.merchantId) {
|
|
|
+ this.showTip('未获取到门店信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.submitting) return
|
|
|
|
|
|
- const existSet = new Set(this.tableList.map((i) => i.no))
|
|
|
- const toAdd = []
|
|
|
- for (let i = start; i <= end; i++) {
|
|
|
- const no = padTableNo(i)
|
|
|
- if (!no) continue
|
|
|
- if (existSet.has(no)) {
|
|
|
- this.showTip(`桌号${parseInt(no, 10)}已存在,请重新输入`)
|
|
|
- return
|
|
|
- }
|
|
|
- toAdd.push({ no, createTime: Date.now() })
|
|
|
+ const payload = {
|
|
|
+ merchantId: this.merchantId,
|
|
|
+ startTableCode: startRaw,
|
|
|
+ endTableCode: endRaw,
|
|
|
+ diningMode: mapOrderModeToDiningMode(this.orderMode)
|
|
|
}
|
|
|
- this.tableList = this.tableList.concat(toAdd).sort((a, b) => parseInt(a.no, 10) - parseInt(b.no, 10))
|
|
|
- this.saveList()
|
|
|
- this.addVisible = false
|
|
|
- uni.showToast({ title: '添加成功', icon: 'success' })
|
|
|
+
|
|
|
+ this.submitting = true
|
|
|
+ uni.showLoading({ title: '提交中', mask: true })
|
|
|
+ batchCreateTables(payload).then(res => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.addVisible = false
|
|
|
+ this.startNo = ''
|
|
|
+ this.endNo = ''
|
|
|
+ this.loadData(true)
|
|
|
+ uni.showToast({ title: '添加成功', icon: 'success' })
|
|
|
+ } else {
|
|
|
+ this.showTip(res.data.message || '添加失败')
|
|
|
+ }
|
|
|
+ }).catch((err) => {
|
|
|
+ const msg = (err && err.data && err.data.message) || '网络异常,请稍后重试'
|
|
|
+ this.showTip(msg)
|
|
|
+ }).finally(() => {
|
|
|
+ this.submitting = false
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
},
|
|
|
goDownload() {
|
|
|
uni.navigateTo({ url: '/pages/orderingSet/download' })
|
|
|
},
|
|
|
openQr(item) {
|
|
|
this.currentTable = item
|
|
|
- const content = buildQrContent(this.merchantId, item.no)
|
|
|
- this.miniQrUrl = buildQrImageUrl(content)
|
|
|
- this.officialQrUrl = ''
|
|
|
- this.qrVisible = true
|
|
|
- },
|
|
|
- saveQr() {
|
|
|
- const url = this.miniQrUrl
|
|
|
- if (!url) {
|
|
|
- uni.showToast({ title: '暂无二维码', icon: 'none' })
|
|
|
- return
|
|
|
+ if (item.miniQrUrl) {
|
|
|
+ this.miniQrUrl = item.miniQrUrl
|
|
|
+ this.officialQrUrl = item.officialQrUrl || ''
|
|
|
+ } else {
|
|
|
+ const content = buildQrContent(this.merchantId, item.no)
|
|
|
+ this.miniQrUrl = buildQrImageUrl(content)
|
|
|
+ this.officialQrUrl = ''
|
|
|
}
|
|
|
- uni.showLoading({ title: '保存中' })
|
|
|
- uni.downloadFile({
|
|
|
- url,
|
|
|
- success: (res) => {
|
|
|
- if (res.statusCode !== 200) {
|
|
|
- uni.hideLoading()
|
|
|
- uni.showToast({ title: '下载失败', icon: 'none' })
|
|
|
- return
|
|
|
- }
|
|
|
- uni.saveImageToPhotosAlbum({
|
|
|
- filePath: res.tempFilePath,
|
|
|
- success: () => {
|
|
|
- uni.hideLoading()
|
|
|
- uni.showToast({ title: '已保存到相册', icon: 'success' })
|
|
|
- },
|
|
|
- fail: () => {
|
|
|
- uni.hideLoading()
|
|
|
- uni.showToast({ title: '保存失败,请检查相册权限', icon: 'none' })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- fail: () => {
|
|
|
- uni.hideLoading()
|
|
|
- uni.showToast({ title: '下载失败', icon: 'none' })
|
|
|
- }
|
|
|
- })
|
|
|
+ this.qrVisible = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -255,45 +353,68 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
$theme: #5b9eff;
|
|
|
- $theme-soft: #eaf3ff;
|
|
|
- $page-bg: #f5f6f8;
|
|
|
+ $theme-soft: #E8F3FF;
|
|
|
+ $page-bg: #F7F7F7;
|
|
|
|
|
|
.page {
|
|
|
- min-height: 100vh;
|
|
|
+ height: 100vh;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ overflow: hidden;
|
|
|
background: $page-bg;
|
|
|
- padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 44rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .page-content {
|
|
|
+ flex: 1;
|
|
|
+ min-height: 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ overflow: hidden;
|
|
|
+ padding: 0 32rpx 5rpx;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.mode-card {
|
|
|
- margin: 24rpx 28rpx 0;
|
|
|
- padding: 32rpx 28rpx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin: 24rpx 0 32rpx;
|
|
|
+ padding: 32rpx;
|
|
|
background: #fff;
|
|
|
- border-radius: 20rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #1D2129;
|
|
|
|
|
|
.mode-label {
|
|
|
- font-size: 30rpx;
|
|
|
- color: #1d2129;
|
|
|
- font-weight: 500;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #1D2129;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.table-card {
|
|
|
- margin: 24rpx 28rpx 0;
|
|
|
- background: #fff;
|
|
|
- border-radius: 20rpx;
|
|
|
+ flex: 1;
|
|
|
+ min-height: 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
overflow: hidden;
|
|
|
- background-image: linear-gradient(180deg, #eef5ff 0%, #ffffff 120rpx);
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ background: linear-gradient( -216deg, #DEEEFF 0%, #FFFFFF 28%);
|
|
|
}
|
|
|
|
|
|
.table-head {
|
|
|
+ flex-shrink: 0;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- padding: 28rpx 28rpx 12rpx;
|
|
|
+ padding: 32rpx;
|
|
|
+ border-bottom: 1rpx solid #EEEEEE;
|
|
|
|
|
|
.table-title {
|
|
|
font-size: 30rpx;
|
|
|
@@ -304,79 +425,59 @@
|
|
|
.add-link {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- gap: 4rpx;
|
|
|
+ gap: 8rpx;
|
|
|
font-size: 28rpx;
|
|
|
- color: $theme;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #165DFF;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.empty-box {
|
|
|
+ flex: 1;
|
|
|
+ min-height: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
- padding: 80rpx 40rpx 72rpx;
|
|
|
-
|
|
|
- .empty-illust {
|
|
|
- width: 180rpx;
|
|
|
- height: 140rpx;
|
|
|
- position: relative;
|
|
|
- margin-bottom: 28rpx;
|
|
|
-
|
|
|
- .box-lid {
|
|
|
- position: absolute;
|
|
|
- left: 20rpx;
|
|
|
- top: 8rpx;
|
|
|
- width: 140rpx;
|
|
|
- height: 36rpx;
|
|
|
- border: 8rpx solid #d0d5dd;
|
|
|
- border-radius: 8rpx 8rpx 0 0;
|
|
|
- border-bottom: none;
|
|
|
- transform: rotate(-8deg);
|
|
|
- transform-origin: left bottom;
|
|
|
- }
|
|
|
-
|
|
|
- .box-body {
|
|
|
- position: absolute;
|
|
|
- left: 24rpx;
|
|
|
- bottom: 10rpx;
|
|
|
- width: 132rpx;
|
|
|
- height: 88rpx;
|
|
|
- border: 8rpx solid #d0d5dd;
|
|
|
- border-radius: 8rpx;
|
|
|
- background: linear-gradient(180deg, #f7f8fa 0%, #eef0f3 100%);
|
|
|
- }
|
|
|
- }
|
|
|
+ justify-content: center;
|
|
|
+ padding-bottom: 72rpx;
|
|
|
|
|
|
.empty-text {
|
|
|
- font-size: 28rpx;
|
|
|
- color: #86909c;
|
|
|
- margin-bottom: 40rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #86909C;
|
|
|
+ margin: 8rpx 0 48rpx;
|
|
|
}
|
|
|
|
|
|
.empty-btn {
|
|
|
- min-width: 280rpx;
|
|
|
- height: 72rpx;
|
|
|
- padding: 0 40rpx;
|
|
|
- border-radius: 40rpx;
|
|
|
- border: 2rpx solid #a8cbff;
|
|
|
- color: $theme;
|
|
|
- font-size: 28rpx;
|
|
|
+ width: 264rpx;
|
|
|
+ height: 72rpx;
|
|
|
+ background: #E8F3FF;
|
|
|
+ border-radius: 140rpx;
|
|
|
+ border: 1rpx solid #1C7CF9;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- background: #fff;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #165DFF;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .table-scroll {
|
|
|
+ flex: 1;
|
|
|
+ height: 0;
|
|
|
+ min-height: 0;
|
|
|
+ }
|
|
|
+
|
|
|
.table-list {
|
|
|
- padding: 0 8rpx 8rpx;
|
|
|
+ padding: 0 20rpx 10rpx 32rpx;
|
|
|
}
|
|
|
|
|
|
.list-row {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- padding: 34rpx 20rpx;
|
|
|
+ padding: 32rpx 8rpx;
|
|
|
margin: 0 12rpx;
|
|
|
border-bottom: 1rpx solid #f0f2f5;
|
|
|
|
|
|
@@ -391,14 +492,15 @@
|
|
|
}
|
|
|
|
|
|
.no-text {
|
|
|
- font-size: 30rpx;
|
|
|
- color: #1d2129;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #4E5969;
|
|
|
}
|
|
|
|
|
|
.qr-entry {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 8rpx;
|
|
|
+ font-weight: 500;
|
|
|
font-size: 26rpx;
|
|
|
color: #86909c;
|
|
|
|
|
|
@@ -410,10 +512,7 @@
|
|
|
}
|
|
|
|
|
|
.footer {
|
|
|
- position: fixed;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
+ flex-shrink: 0;
|
|
|
padding: 20rpx 40rpx calc(20rpx + env(safe-area-inset-bottom));
|
|
|
background: #fff;
|
|
|
z-index: 20;
|
|
|
@@ -421,74 +520,84 @@
|
|
|
|
|
|
.btn {
|
|
|
height: 88rpx;
|
|
|
- border-radius: 44rpx;
|
|
|
+ border-radius: 140rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- font-size: 30rpx;
|
|
|
font-weight: 500;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
|
|
|
&.soft {
|
|
|
- background: $theme-soft;
|
|
|
- color: $theme;
|
|
|
+ background: #E8F3FF;
|
|
|
+ border-radius: 140rpx;
|
|
|
+ border: 1rpx solid #1C7CF9;
|
|
|
+ color: #165DFF;
|
|
|
}
|
|
|
|
|
|
&.primary {
|
|
|
- background: $theme;
|
|
|
+ background: linear-gradient( 88deg, #0FB0FF 0%, #2260F6 100%);
|
|
|
color: #fff;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .add-sheet,
|
|
|
- .qr-sheet {
|
|
|
- padding: 36rpx 40rpx calc(40rpx + env(safe-area-inset-bottom));
|
|
|
+ .add-sheet {
|
|
|
+ padding: 0 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
|
|
background: #fff;
|
|
|
}
|
|
|
|
|
|
.sheet-title {
|
|
|
- text-align: center;
|
|
|
- font-size: 34rpx;
|
|
|
- font-weight: 600;
|
|
|
- color: #1d2129;
|
|
|
- }
|
|
|
+ text-align: center;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #1D2129;
|
|
|
+ padding: 56rpx 0 52rpx;
|
|
|
|
|
|
- .sheet-sub {
|
|
|
- margin-top: 28rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #1d2129;
|
|
|
- font-weight: 500;
|
|
|
}
|
|
|
|
|
|
- .range-row {
|
|
|
- margin-top: 28rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- gap: 16rpx;
|
|
|
-
|
|
|
- .range-input {
|
|
|
- flex: 1;
|
|
|
- height: 80rpx;
|
|
|
- padding: 0 24rpx;
|
|
|
- background: #f5f6f8;
|
|
|
- border-radius: 12rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #333;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
-
|
|
|
- .range-dash {
|
|
|
- color: #86909c;
|
|
|
- font-size: 32rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .ph {
|
|
|
- color: #c0c4cc;
|
|
|
- font-size: 26rpx;
|
|
|
- }
|
|
|
- }
|
|
|
+ .sheet-card {
|
|
|
+ background: linear-gradient( -216deg, #DEEEFF 0%, #FFFFFF 18%);
|
|
|
+ border-radius: 24rpx;
|
|
|
+ border: 1rpx solid #11ADFF;
|
|
|
+ margin-bottom: 598rpx;
|
|
|
+
|
|
|
+ .sheet-sub {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #1d2129;
|
|
|
+ font-weight: 500;
|
|
|
+ padding: 32rpx 32rpx 24rpx;
|
|
|
+ border-bottom: 1rpx solid #EEEEEE;
|
|
|
+ }
|
|
|
+
|
|
|
+ .range-row {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 94rpx;
|
|
|
+ padding: 32rpx;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .range-input {
|
|
|
+ flex: 1;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #165DFF;
|
|
|
+ }
|
|
|
+
|
|
|
+ .range-dash {
|
|
|
+ width: 40rpx;
|
|
|
+ height: 2rpx;
|
|
|
+ background: #C9CDD4;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ph {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #C9CDD4;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.sheet-btn {
|
|
|
- margin-top: 48rpx;
|
|
|
+ margin-top: 22rpx;
|
|
|
}
|
|
|
|
|
|
.tip-dialog {
|
|
|
@@ -496,54 +605,38 @@
|
|
|
background: #fff;
|
|
|
border-radius: 24rpx;
|
|
|
overflow: hidden;
|
|
|
+ padding: 48rpx;
|
|
|
|
|
|
.tip-title {
|
|
|
text-align: center;
|
|
|
- padding-top: 40rpx;
|
|
|
- font-size: 32rpx;
|
|
|
- font-weight: 600;
|
|
|
- color: #1d2129;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #000000;
|
|
|
}
|
|
|
|
|
|
.tip-content {
|
|
|
text-align: center;
|
|
|
- padding: 28rpx 40rpx 36rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #4e5969;
|
|
|
- line-height: 1.5;
|
|
|
+ padding: 68rpx 0 106rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #1D2129;
|
|
|
}
|
|
|
|
|
|
.tip-ok {
|
|
|
- height: 96rpx;
|
|
|
- border-top: 1rpx solid #f0f2f5;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- font-size: 30rpx;
|
|
|
- color: $theme;
|
|
|
font-weight: 500;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ height: 88rpx;
|
|
|
+ background: linear-gradient( 92deg, #0FB0FF 0%, #2260F6 100%);
|
|
|
+ border-radius: 140rpx;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .qr-block {
|
|
|
- margin-top: 28rpx;
|
|
|
- border: 1rpx solid #e5e6eb;
|
|
|
- border-radius: 16rpx;
|
|
|
- padding: 32rpx 24rpx;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .qr-img {
|
|
|
- width: 280rpx;
|
|
|
- height: 280rpx;
|
|
|
- background: #f5f6f8;
|
|
|
- }
|
|
|
-
|
|
|
- .qr-label {
|
|
|
- margin-top: 20rpx;
|
|
|
- font-size: 26rpx;
|
|
|
- color: #4e5969;
|
|
|
- }
|
|
|
- }
|
|
|
+ ::v-deep {
|
|
|
+ .u-radio__label {
|
|
|
+ margin: 0 0 0 16rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|