加油站付款小程序,打印小票
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.

110 lines
2.3 KiB

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