introduce.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="container">
  3. <view class="body">
  4. <image :src="imghos+nodeEl" class="img"></image>
  5. </view>
  6. <view class="footer">
  7. <view class="cu-bar bg-white tabbar border shop" style="width: 100%;">
  8. <button class="action" @click="show = true" style="width: 33%;">
  9. <view class="cuIcon-service text-green">
  10. </view>
  11. 客服
  12. </button>
  13. <view class="submit" @click="next" style="background-color: #0B73B9; color: #FFFFFF;">选购服务包</view>
  14. </view>
  15. </view>
  16. <u-popup v-model="show" mode="bottom" border-radius="14" height="300rpx">
  17. <u-button open-type="contact" :custom-style="customStyle">在线咨询</u-button>
  18. <u-button @click="playphone" :custom-style="customStyle">电话咨询</u-button>
  19. </u-popup>
  20. </view>
  21. </template>
  22. <script>
  23. import {
  24. mapState,
  25. mapMutations,
  26. mapGetters,
  27. mapActions
  28. } from 'vuex';
  29. export default {
  30. computed: {
  31. ...mapState(['user']),
  32. ...mapGetters({
  33. hasLogin: 'verifyJwt'
  34. })
  35. },
  36. data() {
  37. return {
  38. show: false,
  39. customStyle: {
  40. width: '600rpx',
  41. marginTop: "35rpx"
  42. },
  43. nodeEl: "",
  44. imghos: "",
  45. phone: ""
  46. }
  47. },
  48. onLoad() {
  49. this.imghos = this.$imgHost2
  50. this.$util.getAgreement().then(res => {
  51. this.nodeEl = res.data.poster
  52. this.phone = res.data.phone
  53. }).catch(err => {
  54. })
  55. },
  56. methods: {
  57. next(e) {
  58. if (this.hasLogin) {
  59. uni.navigateTo({
  60. url: '/pages/service_packs/choicepacks'
  61. });
  62. } else {
  63. uni.showModal({
  64. title: "提示",
  65. content: "暂未登录,请前往登录",
  66. success: (res) => {
  67. if (res.confirm) {
  68. uni.navigateTo({
  69. url: "../login/login"
  70. })
  71. }
  72. }
  73. })
  74. }
  75. },
  76. playphone() {
  77. uni.makePhoneCall({
  78. phoneNumber: this.phone
  79. })
  80. this.show = false
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss">
  86. .container {
  87. width: 100%;
  88. height: 100%;
  89. // min-height: 100vh;
  90. background-color: #F6F6F6;
  91. }
  92. .body {
  93. width: 100%;
  94. height: 100%;
  95. .img {
  96. width: 100%;
  97. height: 88vh;
  98. // margin: 3% 3%;
  99. }
  100. }
  101. .footer {
  102. width: 100%;
  103. height: auto;
  104. display: flex;
  105. position: fixed;
  106. bottom: 0;
  107. }
  108. </style>