第一次上传
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="" style=" margin: 25rpx 0; padding: 0 20rpx; display: flex; align-items: center; justify-content: space-between;">
|
||||
<view @click="changetab(index)" v-for="(item,index) in tag" :key="index"
|
||||
:class="{active:index!=currentIndex,actived:index==currentIndex}" class="tag"
|
||||
style=" padding: 14rpx 36rpx; border-radius: 14rpx; ">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="type==0"class="" style=" margin:20rpx; margin-top: 30rpx; " >
|
||||
<view class="" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
|
||||
<view class="">
|
||||
<view class="" style="display: flex; align-items: center;" >
|
||||
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 10rpx; width: 60rpx; height: 60rpx;" alt="" />
|
||||
<text style="margin-left: 10rpx;" >星巴克咖啡</text>
|
||||
</view>
|
||||
<view class="" style="margin-top: 15rpx; color: #999999; " >
|
||||
今天 14:30
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="font-weight: 600; color: #666666;" >
|
||||
¥-38.00
|
||||
</view>
|
||||
</view>
|
||||
<up-loadmore :status="status" />
|
||||
</view>
|
||||
|
||||
<view v-else class="" style=" margin:20rpx; margin-top: 30rpx; " >
|
||||
<view class="" v-for="(item,index) in historyList" :key="index" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
|
||||
<view class="">
|
||||
<view class="" style="display: flex; align-items: center;" >
|
||||
<img :src="Service.GetMateUrlByImg(item.merchLogo)" style=" border-radius: 10rpx; width: 90rpx; height: 90rpx;" alt="" />
|
||||
<text style="margin-left: 10rpx;" >{{ item.merchName }}</text>
|
||||
</view>
|
||||
<view class="" style="margin-top: 15rpx; color: #999999; " >
|
||||
{{ item.payTime }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="font-weight: 600; color: #666666;" >
|
||||
¥-{{ item.amount }}
|
||||
</view>
|
||||
</view>
|
||||
<up-loadmore :status="status" />
|
||||
</view>
|
||||
|
||||
<up-calendar :show="showDate" :mode="mode" monthNum='5' minDate='2025-12-01' maxDate='2999-12-31' @close="showDate=false" @confirm="confirmDate"></up-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { ref } from "vue";
|
||||
import { Service } from '@/Service/Service'
|
||||
import { vpOrderService } from '@/Service/vp/vpOrderService'
|
||||
|
||||
let currentIndex=ref(0)
|
||||
let tag = ref([
|
||||
'全部',
|
||||
'今日',
|
||||
'本月',
|
||||
'自定义'
|
||||
])
|
||||
|
||||
// 日历管理
|
||||
const showDate = ref(false);
|
||||
const mode = ref('range');
|
||||
|
||||
let page=ref(1)
|
||||
let status=ref('nomore')
|
||||
let historyList=ref<Array<any>>([])
|
||||
|
||||
let type=ref(null)
|
||||
let time=ref('')
|
||||
|
||||
onLoad((data:any) => {
|
||||
type.value=data.type
|
||||
if(data.type==0){
|
||||
uni.setNavigationBarTitle({
|
||||
title:'交易明细'
|
||||
})
|
||||
}else{
|
||||
uni.setNavigationBarTitle({
|
||||
title:'交易记录'
|
||||
})
|
||||
}
|
||||
getData()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
|
||||
const getData=()=>{
|
||||
status.value='Loadmore'
|
||||
page.value=1
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList=()=>{
|
||||
if(status.value=='loading' || status.value=='loadmore' ){
|
||||
return
|
||||
}
|
||||
status.value='loading'
|
||||
vpOrderService.GetUserOrderList(String(currentIndex.value),page.value).then(res=>{
|
||||
if(res.code==0){
|
||||
historyList.value=[...historyList.value,...res.data.list]
|
||||
status.value=res.data.list.length==10?'loadmore':'nomore'
|
||||
page.value++
|
||||
}else{
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const changetab=(e:number)=>{
|
||||
if(e==3){
|
||||
showDate.value=true
|
||||
return
|
||||
}
|
||||
currentIndex.value=e
|
||||
}
|
||||
|
||||
const confirmDate = (e) => {
|
||||
console.log(e);
|
||||
currentIndex.value=3
|
||||
showDate.value=false
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.active{
|
||||
background-color: #F3F4F6;
|
||||
color: #4B5563;
|
||||
}
|
||||
.actived{
|
||||
background-color: #FF6B35;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tag{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: fit-content;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
1023
.svn/pristine/76/76b33fc1dbc89aabb6be2a5754111992b1c61b21.svn-base
Normal file
1023
.svn/pristine/76/76b33fc1dbc89aabb6be2a5754111992b1c61b21.svn-base
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,337 @@
|
||||
<template>
|
||||
<view class="alliance-card-page">
|
||||
<!-- 沉浸式状态栏 -->
|
||||
<view class="status-bar"></view>
|
||||
|
||||
<!-- 顶部导航 -->
|
||||
<view class="nav-bar">
|
||||
<image class="back-icon" src="/static/icons/back.svg" @click="goBack" mode="aspectFit" />
|
||||
<text class="nav-title">我的联盟卡</text>
|
||||
<view class="nav-placeholder"></view>
|
||||
</view>
|
||||
|
||||
<!-- 主要内容区域 -->
|
||||
<view class="content">
|
||||
<!-- 绑定表单区域 -->
|
||||
<view class="bind-section">
|
||||
<view class="bind-title">
|
||||
<text class="ri-ticket-line title-icon"></text>
|
||||
<text class="title-text">绑定联盟卡</text>
|
||||
</view>
|
||||
|
||||
<view class="bind-form">
|
||||
<!-- 卡号输入框 -->
|
||||
<view class="form-item">
|
||||
<text class="form-label">联盟卡号</text>
|
||||
<view class="input-wrapper">
|
||||
<input
|
||||
class="form-input"
|
||||
type="text"
|
||||
placeholder="请输入16位联盟卡号"
|
||||
placeholder-class="input-placeholder"
|
||||
v-model="cardNumber"
|
||||
maxlength="16"
|
||||
@input="formatCardNumber"
|
||||
/>
|
||||
<view class="scan-btn" @click="scanCard">
|
||||
<text class="ri-qr-scan-2-line scan-icon"></text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="form-tip">支持扫码或手动输入卡号</text>
|
||||
</view>
|
||||
|
||||
<!-- 绑定按钮 -->
|
||||
<view class="bind-btn" @click="bindCard">
|
||||
<text class="bind-btn-text">立即绑定</text>
|
||||
</view>
|
||||
|
||||
<!-- 温馨提示 -->
|
||||
<view class="tips-box">
|
||||
<view class="tips-header">
|
||||
<text class="ri-lightbulb-line tips-icon"></text>
|
||||
<text class="tips-title">温馨提示</text>
|
||||
</view>
|
||||
<view class="tips-list">
|
||||
<text class="tips-item">• 绑定后可享受联盟商家专属折扣</text>
|
||||
<text class="tips-item">• 消费可累积积分,积分可抵扣现金</text>
|
||||
<text class="tips-item">• 每张联盟卡仅可绑定一次</text>
|
||||
<text class="tips-item">• 如有疑问请联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
// 卡号输入
|
||||
const cardNumber = ref('')
|
||||
|
||||
// 格式化卡号输入
|
||||
const formatCardNumber = (e) => {
|
||||
// 只允许输入数字
|
||||
let value = e.detail.value.replace(/\D/g, '')
|
||||
cardNumber.value = value
|
||||
}
|
||||
|
||||
// 扫描卡号
|
||||
const scanCard = () => {
|
||||
uni.showToast({
|
||||
title: '扫码功能开发中',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
// 绑定卡号
|
||||
const bindCard = () => {
|
||||
// 验证卡号
|
||||
if (!cardNumber.value) {
|
||||
uni.showToast({
|
||||
title: '请输入联盟卡号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (cardNumber.value.length < 16) {
|
||||
uni.showToast({
|
||||
title: '请输入正确的16位卡号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 模拟绑定请求
|
||||
uni.showLoading({
|
||||
title: '绑定中...'
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '绑定成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
|
||||
// 2秒后返回
|
||||
setTimeout(() => {
|
||||
goBack()
|
||||
}, 2000)
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
// 返回我的页面
|
||||
const goBack = () => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.alliance-card-page {
|
||||
min-height: 100vh;
|
||||
background: #F5F5F5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 状态栏 */
|
||||
.status-bar {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 60rpx 24rpx 20rpx 24rpx;
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
padding: 8rpx;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.nav-placeholder {
|
||||
width: 48rpx;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
.content {
|
||||
flex: 1;
|
||||
padding: 32rpx 24rpx;
|
||||
}
|
||||
|
||||
/* 绑定表单区域 */
|
||||
.bind-section {
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding: 32rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.bind-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.title-icon {
|
||||
font-size: 36rpx;
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.bind-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 32rpx;
|
||||
}
|
||||
|
||||
/* 表单项 */
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #F5F5F5;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 88rpx;
|
||||
border: 2rpx solid transparent;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.input-wrapper:focus-within {
|
||||
background: #FFFFFF;
|
||||
border-color: #FF6B00;
|
||||
box-shadow: 0 0 0 4rpx rgba(255, 107, 0, 0.1);
|
||||
}
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #222222;
|
||||
height: 88rpx;
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.scan-btn {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.scan-icon {
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.form-tip {
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
padding-left: 4rpx;
|
||||
}
|
||||
|
||||
/* 绑定按钮 */
|
||||
.bind-btn {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
border-radius: 16rpx;
|
||||
height: 96rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 6rpx 20rpx rgba(255, 107, 0, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.bind-btn:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 4rpx 12rpx rgba(255, 107, 0, 0.3);
|
||||
}
|
||||
|
||||
.bind-btn-text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
/* 温馨提示 */
|
||||
.tips-box {
|
||||
background: #FFF9F0;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
border-left: 4rpx solid #FF9800;
|
||||
}
|
||||
|
||||
.tips-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.tips-icon {
|
||||
font-size: 28rpx;
|
||||
color: #FF9800;
|
||||
}
|
||||
|
||||
.tips-title {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #FF9800;
|
||||
}
|
||||
|
||||
.tips-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.tips-item {
|
||||
font-size: 22rpx;
|
||||
color: #666666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user