diff --git a/app.json b/app.json index 0f8e064..892bb5b 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,8 @@ "pages": [ "pages/index/index", "pages/explore/index", - "pages/my/index" + "pages/my/index", + "pages/OrderConfirmation/index" ], "window": { "backgroundTextStyle": "light", diff --git a/custom-tab-bar/index.json b/custom-tab-bar/index.json index df5bd1d..31f8169 100644 --- a/custom-tab-bar/index.json +++ b/custom-tab-bar/index.json @@ -2,6 +2,6 @@ "component": true, "usingComponents": { "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar", - "t-tab-bar-item": "tdesign-miniprogram/tab-bar/tab-bar-item" + "t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item" } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b0dbc76..3e17ae2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,17 @@ { "name": "miniprogram-starter", + "version": "0.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { + "name": "miniprogram-starter", + "version": "0.0.2", + "license": "MIT", "dependencies": { - "tdesign-miniprogram": "^0.12.1" - } + "tdesign-miniprogram": "^1.1.15" + }, + "devDependencies": {} }, "node_modules/dayjs": { "version": "1.11.2", @@ -14,9 +19,9 @@ "integrity": "sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw==" }, "node_modules/tdesign-miniprogram": { - "version": "0.12.1", - "resolved": "https://registry.npmmirror.com/tdesign-miniprogram/-/tdesign-miniprogram-0.12.1.tgz", - "integrity": "sha512-nRQu3us411XbFz7AFa1o/ZffZtc+jxRLYhLCALzivsqFDQt0YaxBQbtRNxg7fwKtaKezg/wl+IFSymm4OfgiCQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tdesign-miniprogram/-/tdesign-miniprogram-1.2.0.tgz", + "integrity": "sha512-/qy8LiOH/GFItEcLXIYixgUXclLNxcPTZgEZJ3PeDWIVBkbtoffT66N21LVm/q9atlNfncEGHQAaCOxyfroLfw==", "dependencies": { "dayjs": "^1.10.7" } @@ -29,9 +34,9 @@ "integrity": "sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw==" }, "tdesign-miniprogram": { - "version": "0.12.1", - "resolved": "https://registry.npmmirror.com/tdesign-miniprogram/-/tdesign-miniprogram-0.12.1.tgz", - "integrity": "sha512-nRQu3us411XbFz7AFa1o/ZffZtc+jxRLYhLCALzivsqFDQt0YaxBQbtRNxg7fwKtaKezg/wl+IFSymm4OfgiCQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tdesign-miniprogram/-/tdesign-miniprogram-1.2.0.tgz", + "integrity": "sha512-/qy8LiOH/GFItEcLXIYixgUXclLNxcPTZgEZJ3PeDWIVBkbtoffT66N21LVm/q9atlNfncEGHQAaCOxyfroLfw==", "requires": { "dayjs": "^1.10.7" } diff --git a/package.json b/package.json index fa434e8..5063cf1 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "license": "MIT", "description": "a start-kit for wechat miniprogram powerby TDesign miniprogram", "dependencies": { - "tdesign-miniprogram": "^0.12.1" + "tdesign-miniprogram": "^1.1.15" }, "devDependencies": {} } diff --git a/pages/OrderConfirmation/index.js b/pages/OrderConfirmation/index.js new file mode 100644 index 0000000..8beff99 --- /dev/null +++ b/pages/OrderConfirmation/index.js @@ -0,0 +1,68 @@ +// pages/OrderConfirmation/index.js +Page({ + /** + * 页面的初始数据 + */ + data: { + value:[0,1], + title:'2021 SICC服务设计创新大会', + date:'2021年3月6日', + address:'深圳市腾讯滨海大厦', + current_name:[], + current_time:[], + current_ticket:[], + all_price:0, + member_message:[{ + id:0, + name:'蔡宣轩', + },{ + id:1, + name:'蔡晓萱' + }], + ticket_time:[{ + time:'2021年3月16日', + } + ], + ticket_price:[{ + project:'早鸟价-单人票', + now_price:88, + before_price:'128' + }, + { + project:'早鸟价-双人票', + now_price:168, + before_price:228 + }, + { + project:'正价-单人票', + now_price:128, + before_price:'' + }, + { + project:'正价-双人票', + now_price:228, + before_price:'' + } + ] + }, + + computed:{ + }, + memberChange(e){ + this.setData({ current_name: e.detail.value }); + }, + timeChange(e){ + this.setData({current_time:e.detail.value}); + }, + ticketChange(e) { + this.setData({ current_ticket: e.detail.value }); + this.getPrice(); + }, + getPrice(){ + console.log() + let price = this.data.ticket_price.find((item,index)=>{ + return index === this.data.current_ticket[0]; + }) + this.setData({all_price:price.now_price}) + } +}) \ No newline at end of file diff --git a/pages/OrderConfirmation/index.json b/pages/OrderConfirmation/index.json new file mode 100644 index 0000000..4a39666 --- /dev/null +++ b/pages/OrderConfirmation/index.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "购买确认", + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-divider": "tdesign-miniprogram/divider/divider", + "t-button": "tdesign-miniprogram/button/button", + "t-checkbox": "tdesign-miniprogram/checkbox/checkbox", + "t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group" + } +} \ No newline at end of file diff --git a/pages/OrderConfirmation/index.less b/pages/OrderConfirmation/index.less new file mode 100644 index 0000000..6a3d471 --- /dev/null +++ b/pages/OrderConfirmation/index.less @@ -0,0 +1,148 @@ +.order-sure { + box-sizing: border-box; + background: #ffffff; + padding: 24rpx 32rpx calc(env(safe-area-inset-bottom) + 136rpx); + min-height: 100vh; + font-family: "PingFang SC"; + + .top-message-card{ + height: 144rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + + .top-title text{ + font-size: 40rpx; + font-weight: 600; + } + .date-address{ + font-size: 28rpx; + display: flex; + + view{ + display: flex; + justify-content: center; + align-items: center; + } + } + } + .order-wrapper{ + padding-top: 32rpx; + + .content-detail{ + margin-bottom: 48rpx; + + .title-bar{ + font-size: 32rpx; + line-height: 56rpx; + font-weight: 600; + display: flex; + justify-content: space-between; + + .addMember{ + width: 188rpx; + margin:0; + } + } + } + } + // 下方悬浮 + .wx-pay-cover { + position: fixed; + left: 0; + bottom: 0; + right: 0; + background: #fff; + padding-bottom: env(safe-area-inset-bottom); + border-top: 0.5px solid #e7e7e7; + + .wx-pay { + height: 160rpx; + box-sizing: border-box; + padding: 0rpx 32rpx; + display: flex; + justify-content: space-between; + align-items: center; + font-size: 28rpx; + .all-money{ + font-size:40rpx; + color:#0052D9; + font-weight: 600; + } + .pay-button{ + width: 400rpx; + height: 96rpx; + margin-right:0; + } + } + } + + +} +/* 组件样式 */ +.card { + position: relative; + margin: 24rpx 0 24rpx 0; + border-radius: 12rpx; + overflow: hidden; + box-sizing: border-box; + border: 3rpx solid #DCDCDC; +} + +.card--active { + border-color: #0052d9; +} + +.card--active::after { + content: ''; + display: block; + position: absolute; + left: 0; + top: 0; + width: 0; + border: 14px solid #0052d9; + border-bottom-color: transparent; + border-right-color: transparent; +} + +.card__icon { + color: #fff; + position: absolute; + left: 1.5px; + top: 1.5px; + z-index: 1; +} + +/* 横向布局 */ +.horizontal-box { + display: flex; + align-items: center; + margin: 32rpx 0 24rpx 0; +} + +.horizontal-box .card { + width: 214rpx; + margin: 0; +} + +.horizontal-box .card + .card { + margin-left: 24rpx; +} + +.horizontal-box .card::after { + border-width: 12px; +} + +.horizontal-box .card__icon { + font-size: 12px; +} +.money-show{ + text-decoration:line-through; + margin-left: 8rpx; + color:rgba(0, 0, 0, 0.6) +} + + + + + diff --git a/pages/OrderConfirmation/index.wxml b/pages/OrderConfirmation/index.wxml new file mode 100644 index 0000000..870206e --- /dev/null +++ b/pages/OrderConfirmation/index.wxml @@ -0,0 +1,72 @@ + + + module.exports = { + contain: function (arr, key) { return arr.indexOf(key) > -1 } + } + + + + + {{title}} + + + + + {{date}} + + + + {{address}} + + + + + + + + 人员信息 + + 增加人员 + + + + + + + + + + + 票类场次 + + + + + + + + + + + 票类价格 + + + + + + + {{tag.now_price}}元 + {{tag.before_price}}元 + + + + + + + + + 待支付: + ¥{{all_price}} + 确认购买 + + + \ No newline at end of file diff --git a/project.config.json b/project.config.json index 6f5b5d1..77a5056 100644 --- a/project.config.json +++ b/project.config.json @@ -43,7 +43,8 @@ "disableUseStrict": false, "useCompilerPlugins": [ "less" - ] + ], + "condition": false }, "compileType": "miniprogram", "libVersion": "2.19.4",