| | |
| | | const minutes = date.getMinutes().toString().padStart(2, '0'); |
| | | const seconds = date.getSeconds().toString().padStart(2, '0'); |
| | | return `${hours}:${minutes}:${seconds}`; |
| | | }, |
| | | onShareAppMessage: function (options) { |
| | | // 设置分享内容 |
| | | return { |
| | | title: '大禹灌溉助手', // 分享标题 |
| | | path: '/pages/home/home', // 分享路径,该路径需要是当前小程序存在的页面路径 |
| | | imageUrl: '/images/logo2.jpg', // 分享图标,可以是网络图片路径或本地图片路径 |
| | | success: function (res) { |
| | | // 分享成功的回调函数 |
| | | }, |
| | | fail: function (res) { |
| | | // 分享失败的回调函数 |
| | | } |
| | | }; |
| | | } |
| | | }) |
| | |
| | | "scope.camera": { |
| | | "desc": "使用摄像头扫描二维码" |
| | | } |
| | | } |
| | | }, |
| | | "enableShareAppMessage":true |
| | | } |
| | |
| | | "vcNum": "200030000000" |
| | | }], |
| | | showDialog: false, |
| | | isWXRefreshing: false |
| | | isWXRefreshing: false, |
| | | isAddCardDialog:false |
| | | }, |
| | | // 切换 Tabs |
| | | switchTab: function (e) { |
| | |
| | | showDialog: false |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | //添加虚拟卡 |
| | | handleClick() { |
| | | this.setData({ |
| | | isAddCardDialog: true |
| | | }) |
| | | }, |
| | | cancelDialog(){ |
| | | this.setData({ |
| | | isAddCardDialog: false |
| | | }) |
| | | }, |
| | | addCardPost(){ |
| | | this.setData({ |
| | | isAddCardDialog: false |
| | | }) |
| | | wx.showLoading({ |
| | | title: '正在添加请稍候...', // 加载提示文字 |
| | | mask: true // 是否显示透明蒙层,防止触摸穿透,默认为 false |
| | |
| | | </view> |
| | | <t-fab icon="gesture-add" text="添加虚拟卡" bind:click="handleClick" bind:move="handleMove" aria-label="增加" usingCustomNavbar draggable y-bounds="{{[0, 32]}}" style="--td-primary-color-7:#2D8BF7"></t-fab> |
| | | <t-dialog visible="{{showDialog}}" content="您还有余额未使用,如需销卡,请先使用完或退款后才可操作。" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog" /> |
| | | <t-dialog class="dialog" visible="{{isAddCardDialog}}" content="确认添加虚拟卡吗?" confirm-btn="{{ { content: '确认', variant: 'base', theme: 'danger' } }}" close-on-overlay-click="false" cancel-btn="取消" bind:confirm="addCardPost" bind:cancel="cancelDialog" /> |
| | | </view> |