feat: 质惠游 H5 一期 —— 门票模块全链路(微信公众号版)
从 xghmall(云闪付版湘工游)迁移民票模块,改造为微信公众号 H5: - 技术栈沿用 uni-app + Vue2 + uView(含定制版日历组件) - 登录/支付独立成层(common/auth.js、common/pay.js): 一期假登录(测试手机号)+ 模拟支付,后端微信接口就绪后只换这两处 - 登录页重写:短信验证码 + 公众号网页授权(code 换用户信息)预留 - 门票列表页为入口页(进页必须登录),加订单悬浮按钮 - 支付成功页接通:查看订单/继续逛逛 + 订单状态轮询 - 详情页定位导航改用 uni.openLocation + 高德网页兜底 - 出行人页:身份证 18 位格式校验,删除死的删除按钮,修正证件类型回显笔误 - 清理云闪付 SDK、支付宝授权、死页面引用等残留 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view
|
||||
class="u-steps"
|
||||
:style="{
|
||||
flexDirection: direction
|
||||
}"
|
||||
>
|
||||
<view class="u-steps__item"
|
||||
:class="['u-steps__item--' + direction]"
|
||||
v-for="(item, index) in list" :key="index"
|
||||
>
|
||||
|
||||
<view v-if="index > current&&mode == 'dot'" class="u-steps__item__dot"
|
||||
style="width: 10rpx;height: 10rpx;margin-left: 28.5rpx;margin-right: 28rpx;background-color: #D8D8D8;"></view>
|
||||
|
||||
<image v-else src="http://cdn.hntgov.net/online/static/vertical_icon.png" style="width: 64rpx;height: 64rpx;"></image>
|
||||
<view style="display: flex;flex-direction: column;align-items: flex-start;">
|
||||
<text :style="{
|
||||
color: index <= current ? activeColor : unActiveColor,marginBottom: index <= current ? '10rpx' : '0rpx'
|
||||
}" >
|
||||
{{ item.name }}
|
||||
<text style="font-size: 22rpx;" :style="{color:index <= current ? '#DB9566' : '#3D3D3D'}">{{ item.equity }}</text>
|
||||
</text>
|
||||
<text style="padding-left: 15rpx;">{{ item.time}}</text>
|
||||
</view>
|
||||
<!-- <view style="width: 1rpx;background-color:#909399;height: 100%;position: absolute;left: 32rpx;top: 55%;z-index: 0;" v-if="index < list.length - 1"></view> -->
|
||||
<view :class="index == list.length-2?'u-steps__item__line1':'u-steps__item__line'" v-if="index < list.length - 1">
|
||||
<u-line :direction="direction" length="100%" :hair-line="false" color="#E5E5E5"></u-line>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* steps 步骤条
|
||||
* @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
|
||||
* @tutorial https://www.uviewui.com/components/steps.html
|
||||
* @property {String} mode 设置模式(默认dot)
|
||||
* @property {Array} list 数轴条数据,数组。具体见上方示例
|
||||
* @property {String} type type主题(默认primary)
|
||||
* @property {String} direction row-横向,column-竖向(默认row)
|
||||
* @property {Number String} current 设置当前处于第几步
|
||||
* @property {String} active-color 已完成步骤的激活颜色,如设置,type值会失效
|
||||
* @property {String} un-active-color 未激活的颜色,用于表示未完成步骤的颜色(默认#606266)
|
||||
* @example <u-steps :list="numList" active-color="#fa3534"></u-steps>
|
||||
*/
|
||||
export default {
|
||||
name: 'u-steps',
|
||||
props: {
|
||||
// 步骤条的类型,dot|number
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'dot'
|
||||
},
|
||||
// 步骤条的数据
|
||||
list: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 主题类型, primary|success|info|warning|error
|
||||
type: {
|
||||
type: String,
|
||||
default: 'primary'
|
||||
},
|
||||
// 当前哪一步是激活的
|
||||
current: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
// 激活步骤的颜色
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: '#DB9566'
|
||||
},
|
||||
// 未激活的颜色
|
||||
unActiveColor: {
|
||||
type: String,
|
||||
default: '#3D3D3D'
|
||||
},
|
||||
// 自定义图标
|
||||
icon: {
|
||||
type: String,
|
||||
default: 'wifi'
|
||||
},
|
||||
// step的排列方向,row-横向,column-竖向
|
||||
direction: {
|
||||
type: String,
|
||||
default: 'column'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '../../libs/css/style.components.scss';
|
||||
|
||||
$u-steps-item-number-width: 44rpx;
|
||||
$u-steps-item-dot-width: 24rpx;
|
||||
|
||||
.u-steps {
|
||||
@include vue-flex;
|
||||
|
||||
.u-steps__item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
min-width: 100rpx;
|
||||
font-size: 26rpx;
|
||||
color: #8799a3;
|
||||
@include vue-flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
&--row {
|
||||
@include vue-flex;
|
||||
flex-direction: column;
|
||||
|
||||
.u-steps__item__line {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
left: 75%;
|
||||
width: 50%;
|
||||
|
||||
&--dot {
|
||||
top: calc(#{$u-steps-item-dot-width} / 2);
|
||||
}
|
||||
|
||||
&--number {
|
||||
top: calc(#{$u-steps-item-number-width} / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--column {
|
||||
@include vue-flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
min-height: 120rpx;
|
||||
|
||||
.u-steps__item__line {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
left:32rpx !important;
|
||||
height: 100%;
|
||||
top: 60%;
|
||||
|
||||
&--dot {
|
||||
left: calc(#{$u-steps-item-dot-width} / 2);
|
||||
}
|
||||
|
||||
&--number {
|
||||
left: calc(#{$u-steps-item-number-width} / 2);
|
||||
}
|
||||
}
|
||||
|
||||
.u-steps__item__line1 {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
left:32rpx !important;
|
||||
height: 92%;
|
||||
top: 55%;
|
||||
|
||||
&--dot {
|
||||
left: calc(#{$u-steps-item-dot-width} / 2);
|
||||
}
|
||||
|
||||
&--number {
|
||||
left: calc(#{$u-steps-item-number-width} / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__num {
|
||||
@include vue-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: $u-steps-item-number-width;
|
||||
height: $u-steps-item-number-width;
|
||||
border: 1px solid #8799a3;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__dot {
|
||||
width: $u-steps-item-dot-width;
|
||||
height: $u-steps-item-dot-width;
|
||||
@include vue-flex;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&__text--row {
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
&__text--column {
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user