customerService.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="pages">
  3. <view class="top">
  4. <view class="image">
  5. <image src="../static/logo2.png" ></image>
  6. </view>
  7. <view class="">
  8. 欢迎拨打日月峡森林康养旅行客服电话
  9. </view>
  10. <view class="" style="font-size: 28rpx;margin: 20rpx 0 0;box-sizing: border-box;">
  11. 服务时间 9:00~18:00
  12. </view>
  13. </view>
  14. <view class="footer">
  15. <view class="number" v-for="item,index in list" :key="index" @click="toPhone(item)" >
  16. <view class="num" v-if="item.length>0">
  17. <image src="../static/mobile@2x.png" ></image>
  18. <text class="" style="margin-left: 20rpx;">
  19. {{item.length>0?item:''}}
  20. </text>
  21. </view>
  22. <view class="btn" v-if="item.length>0">
  23. 联系
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default{
  31. data(){
  32. return{
  33. list:[]
  34. }
  35. },
  36. onLoad() {
  37. this.init()
  38. },
  39. onShow() {
  40. this.initvist()
  41. },
  42. methods:{
  43. initvist(){
  44. let curPage = getCurrentPages();
  45. let route = curPage[curPage.length - 1].route; //获取当前页面的路由
  46. let code=uni.getStorageSync("code")
  47. let obj={
  48. page:route,
  49. code:code
  50. }
  51. if(code){
  52. uni.$u.http.post('/api/visit/add',obj,{
  53. custom: {
  54. auth: true
  55. }
  56. }).then((res) => {
  57. }).catch((err) => {
  58. })
  59. }
  60. },
  61. init(){
  62. let list=uni.getStorageSync("data")
  63. // console.log(list[5])
  64. this.list=list[5].value.phone
  65. },
  66. toPhone(item){
  67. uni.makePhoneCall({
  68. phoneNumber: item //仅为示例
  69. });
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="less">
  75. page{
  76. background-color: #F4F4F4 ;
  77. font-size: 32rpx;
  78. box-sizing: border-box;
  79. }
  80. .pages{
  81. width: 100%;
  82. height: 100%;
  83. box-sizing: border-box;
  84. }
  85. .top{
  86. height: 500rpx;
  87. box-sizing: border-box;
  88. padding: 108rpx 0 40rpx;
  89. text-align: center;
  90. .image{
  91. box-sizing: border-box;
  92. margin: 0 auto 60rpx;
  93. }
  94. image{
  95. width: 210rpx;
  96. height: 200rpx;
  97. }
  98. }
  99. .footer{
  100. box-sizing: border-box;
  101. height: calc(100vh - 500rpx);
  102. background: #FFFFFF;
  103. border-radius: 16rpx 56rpx 0px 0px;
  104. padding: 76rpx 30rpx 0;
  105. .number{
  106. box-sizing: border-box;
  107. display: flex;
  108. justify-content: space-between;
  109. align-items: center;
  110. margin-bottom: 30rpx;
  111. image{
  112. width: 26rpx;
  113. height: 34rpx;
  114. margin-bottom: -8rpx;
  115. }
  116. // .num{
  117. // display: flex;
  118. // align-items: center;
  119. // }
  120. }
  121. .btn{
  122. box-sizing: border-box;
  123. color: #1E9F6A;
  124. width: 154rpx;
  125. height: 60rpx;
  126. line-height: 60rpx;
  127. background: #FFFFFF;
  128. border-radius: 8rpx 24rpx 8rpx 24rpx;
  129. border: 1px solid #1E9F6A;
  130. text-align: center;
  131. }
  132. }
  133. </style>