从 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>
67 lines
1.7 KiB
Vue
67 lines
1.7 KiB
Vue
<template>
|
|
<view class="u-td" :style="[tdStyle]">
|
|
<slot></slot>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
/**
|
|
* td td单元格
|
|
* @description 表格组件一般用于展示大量结构化数据的场景(搭配u-table使用)
|
|
* @tutorial https://www.uviewui.com/components/table.html#td-props
|
|
* @property {String Number} width 单元格宽度百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比,单元格宽度默认为均分tr的长度(默认auto)
|
|
* @example <u-td>二年级</u-td>
|
|
*/
|
|
export default {
|
|
name: "u-td",
|
|
props: {
|
|
// 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比
|
|
width: {
|
|
type: [Number, String],
|
|
default: 'auto'
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
tdStyle: {
|
|
|
|
}
|
|
}
|
|
},
|
|
created() {
|
|
this.parent = false;
|
|
},
|
|
mounted() {
|
|
this.parent = this.$u.$parent.call(this, 'u-table');
|
|
if (this.parent) {
|
|
// 将父组件的相关参数,合并到本组件
|
|
let style = {};
|
|
if (this.width != "auto") style.flex = `0 0 ${this.width}`;
|
|
style.textAlign = this.parent.align;
|
|
style.fontSize = this.parent.fontSize + 'rpx';
|
|
style.padding = this.parent.padding;
|
|
style.borderBottom = `solid 1px ${this.parent.borderColor}`;
|
|
style.borderRight = `solid 1px ${this.parent.borderColor}`;
|
|
style.color = this.parent.color;
|
|
this.tdStyle = style;
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
@import "../../libs/css/style.components.scss";
|
|
|
|
.u-td {
|
|
@include vue-flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
justify-content: center;
|
|
font-size: 28rpx;
|
|
color: $u-content-color;
|
|
align-self: stretch;
|
|
box-sizing: border-box;
|
|
height: 100%;
|
|
}
|
|
</style>
|