添加页面

This commit is contained in:
wangxiaowei
2025-12-13 17:15:30 +08:00
parent 0ab8464612
commit 775a93f766
22 changed files with 1329 additions and 432 deletions

View File

@ -0,0 +1,73 @@
<route lang="jsonc" type="page">{
"layout": "default",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#F6F7F9"
}
}</route>
<template>
<view class="mx-30rpx">
<view>
<navbar :title="storeName" custom-class='!bg-[#F6F7F8]' :leftArrow="false"></navbar>
</view>
<view class="mt-76rpx">
<view class="font-bold text-44rpx text-[#303133] leading-60rpx text-center">输入验券</view>
</view>
<wd-form ref="form" :model="model">
<view>
<view class="mt-20rpx">
<wd-input
v-model="model.code"
type="text"
placeholder="请输入券码"
inputmode="numeric"
no-border
custom-class="!bg-[#fff] !rounded-16rpx"
custom-input-class="!px-32rpx !h-104rpx"
/>
</view>
</view>
</wd-form>
<view class="w-630rpx h-90rpx text-center leading-90rpx mx-auto rounded-8rpx bg-[#4C9F44] text-[#fff] mt-112rpx" @click="VerifyCode.handleVerifyCode">
验券
</view>
</view>
</template>
<script lang="ts" setup>
import { toast } from '@/utils/toast'
const storeName = ref<string>('')
// 表单相关
const model = reactive<{
code: string
}>({
code: ''
})
onLoad((args) => {
storeName.value = args.storeName || ''
})
const VerifyCode = {
// 验券
handleVerifyCode() {
if (!model.code) {
return
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: $cz-page-background;
}
</style>

View File

@ -0,0 +1,79 @@
<route lang="jsonc" type="page">{
"layout": "default",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#F6F7F8"
}
}</route>
<template>
<view>
<view>
<navbar title="验券记录" custom-class='!bg-[#F6F7F8]' :leftArrow="false"></navbar>
</view>
<view class="bg-white rounded-16rpx px-30rpx py-28rpx">
<view>
<mescroll-body ref="mescrollItem0" @init="mescrollInit" @down="downCallback" @up="VerifyRecord.upCallback" :down="downOption" :up="upOption">
<view v-for="i in 4" :key="i">
<view class="flex items-center justify-between">
<view class="mr-26rpx">
<view class="font-400 text-26rpx text-[#303133] leading-40rpx w-440rpx line-2">这是团购套餐的名字</view>
<view class="font-400 text-22rpx text-[#909399] leading-32rpx">2025-08-09 17:21</view>
</view>
<view>
<price-format color="#303133" :first-size="36" :second-size="36" :subscript-size="36" :price="23.02"></price-format>
</view>
</view>
<view class="mt-22rpx mb-30rpx">
<wd-gap bg-color="#F6F7F9" height="2rpx"></wd-gap>
</view>
</view>
</mescroll-body>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
const OSS = inject('OSS')
// mescroll相关
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
const downOption = {
auto: true
}
const upOption = {
auto: true,
textNoMore: '~ 已经到底啦 ~', //无更多数据的提示
}
const list = ref<Array<any>>([]) // 茶艺师列表
onLoad((args) => {
})
const VerifyRecord = {
// 上拉加载的回调: 其中num:当前页 从1开始, size:每页数据条数,默认10
upCallback: (mescroll) => {
// getTeaSpecialistOrderList(filter).then((res) => {
// const curPageData = res.list || [] // 当前页数据
// if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表
// list.value = list.value.concat(curPageData) //追加新数据
// mescroll.endSuccess(curPageData.length, Boolean(res.more))
// }).catch(() => {
mescroll.endErr() // 请求失败, 结束加载
// })
},
}
</script>
<style lang="scss" scoped>
page {
background-color: #fff;
}
</style>