加油站付款小程序,打印小票
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.2 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="weddingCelebration">
  3. <uni-nav-bar dark :fixed="true" background-color="#00aaff" :border="false" status-bar title="婚庆服务" @clickLeft="back" left-icon="left"/>
  4. <uni-section title="婚庆服务" type="line" titleFontSize="34rpx">
  5. <uni-card :is-shadow="false">
  6. <view class="weixin-top">
  7. <view class="title">微信号:</view>
  8. <view @click="copy(wx.keyCentent)" class="copy icon">
  9. <image src="@/static/weddingCelebration/copy.png" mode="widthFix"></image>
  10. </view>
  11. </view>
  12. <view class="number">{{ wx.keyCentent }}</view>
  13. </uni-card>
  14. <uni-card :is-shadow="false">
  15. <view class="weixin-top">
  16. <view class="title">手机号:</view>
  17. <view @click="clickService(phone.keyCentent)" class="copy icon">
  18. <image src="@/static/weddingCelebration/phone.png" mode="widthFix"></image>
  19. </view>
  20. </view>
  21. <view class="number">{{ phone.keyCentent }}</view>
  22. </uni-card>
  23. </uni-section>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. name : 'weddingCelebration',
  29. data(){
  30. return {
  31. wx : {},
  32. phone : {},
  33. classifyKey : [ 'wx' , 'phone' ]
  34. }
  35. },
  36. onShow(){
  37. this.getData()
  38. },
  39. methods : {
  40. back(){
  41. uni.switchTab({
  42. url: '/pages/payment/payment'
  43. })
  44. },
  45. //获取微信号,手机号
  46. getWxPhoneNumber(keyValue){
  47. this.$api('getConfig',{ keyValue }, res => {
  48. this[keyValue] = res.result
  49. })
  50. },
  51. //获取数据
  52. getData(){
  53. let dataList = [ 'wx' , 'phone' ]
  54. dataList.forEach(item => {
  55. this.getWxPhoneNumber(item)
  56. })
  57. },
  58. //复制内容
  59. copy(content) {
  60. uni.setClipboardData({
  61. data: content,
  62. success: () => {
  63. uni.showToast({
  64. title: '复制成功',
  65. icon: 'none'
  66. })
  67. }
  68. })
  69. },
  70. //拨打电话
  71. clickService(phoneNumber) {
  72. uni.makePhoneCall({
  73. phoneNumber,
  74. success: () => {},
  75. fail: () => {}
  76. });
  77. },
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .weddingCelebration{
  83. min-height: 100vh;
  84. width: 750rpx;
  85. margin: 0rpx auto;
  86. .weixin-top{
  87. display: flex;
  88. justify-content: space-between;
  89. .title{
  90. font-size: 34rpx;
  91. }
  92. image{
  93. width: 45rpx;
  94. }
  95. }
  96. }
  97. </style>