index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="main main-bg">
  3. <view class="left">
  4. <image src="../../../../static/ing7.png"></image>
  5. </view>
  6. <view class="right">
  7. <view>您好,您可以联系我们的在线客服进行咨询,<button class="btn" type="primary" open-type="contact">[点击这里]</button>输入你想要咨询的内容,我们将马上为您服务!</view>
  8. <view>或者您可以<span class="text" @click="makePhone()">[点击这里]</span>直接为您拨打客服电话!</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import server from "@/api/index";
  14. export default {
  15. data() {
  16. return {
  17. }
  18. },
  19. methods:{
  20. makePhone(){
  21. server.getTelInfo().then(res =>{
  22. if(res){
  23. uni.makePhoneCall({
  24. phoneNumber:res,
  25. success: (res) => {
  26. console.log(res)
  27. },
  28. fail: (err) => {
  29. console.error(err)
  30. }
  31. })
  32. }else{
  33. this.$refs.uToast.show({
  34. title: '暂无热线电话!',
  35. type: 'default',
  36. })
  37. }
  38. })
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. .main{
  45. width: 100%;
  46. height: 100vh;
  47. min-height: 100vh;
  48. padding: 30rpx;
  49. display: flex;
  50. .left{
  51. width: 130rpx;
  52. padding-top: 75rpx;
  53. image{
  54. width: 100rpx;
  55. height: 100rpx;
  56. }
  57. }
  58. .right{
  59. width: calc(100% - 130rpx);
  60. height: 250rpx;
  61. background: #fff;
  62. border-radius: 16rpx;
  63. padding: 30rpx;
  64. }
  65. .btn{
  66. display: inline;
  67. width: 220rpx;
  68. height: 60rpx;
  69. line-height: 60rpx;
  70. background-color: #fff;
  71. color: #12C194;
  72. font-size: 26rpx;
  73. }
  74. .text{
  75. color: #12C194;
  76. }
  77. }
  78. </style>