index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="body">
  3. <!-- 头像 -->
  4. <view class="head-portrait">
  5. <img :src="info.avatar" alt="" class="img">
  6. <view class="name">
  7. {{info.staff_name}}
  8. </view>
  9. </view>
  10. <!-- 具体介绍 -->
  11. <view class="content">
  12. <view class="title">
  13. {{info.store_name}}
  14. </view>
  15. <view class="address">
  16. <text class="iconfont icon-dizhi1" />
  17. {{info.detailed_address}}
  18. </view>
  19. <view class="address">
  20. <text class="iconfont icon-shijian1"></text> 营业时间:{{info.day_start}}-{{info.day_end}}
  21. </view>
  22. </view>
  23. <!-- 分割线 -->
  24. <view class="line" />
  25. <!-- 企业微信图片 -->
  26. <view class="weixin-img">
  27. <!-- <view class="img"></view> -->
  28. <image :show-menu-by-longpress="true" :src="info.customer_url" alt="" class="img" @click="previewImage"></image>
  29. <view class="text">
  30. 长按识别二维码
  31. </view>
  32. <view class="text">
  33. 添加我的企业微信
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import {getCustomerInfo} from '@/api/new_store.js'
  40. export default {
  41. data() {
  42. return {
  43. info:{},
  44. id:0,
  45. };
  46. },
  47. onShow() {
  48. this.getInfo()
  49. },
  50. onLoad(options){
  51. this.id = options.id
  52. },
  53. methods:{
  54. getInfo() {
  55. getCustomerInfo(this.id).then(res=>{
  56. this.info = res.data
  57. })
  58. },
  59. previewImage(){
  60. uni.previewImage({
  61. // 需要预览的图片链接列表
  62. urls: [],
  63. // 为当前显示图片的链接/索引值
  64. current: this.info.customer_url,
  65. // 图片指示器样式
  66. indicator:'default',
  67. // 是否可循环预览
  68. loop:false,
  69. // 长按图片显示操作菜单,如不填默认为保存相册
  70. // longPressActions:{
  71. // itemList:[this.l('发送给朋友'),this.l]
  72. // },
  73. success: res => {},
  74. fail: err => {}
  75. });
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss">
  81. page {
  82. background-color: #fff;
  83. }
  84. .head-portrait {
  85. margin-top: 40rpx;
  86. width: 100%;
  87. display: flex;
  88. flex-direction: column;
  89. align-items: center;
  90. .img {
  91. width: 140rpx;
  92. height: 140rpx;
  93. border-radius: 50%;
  94. }
  95. .name {
  96. font-size: 30rpx;
  97. font-weight: 400;
  98. color: #282828;
  99. }
  100. }
  101. .content {
  102. margin-top: 74rpx;
  103. padding-left: 60rpx;
  104. .title {
  105. margin-left: 10rpx;
  106. font-size: 34rpx;
  107. font-weight: 500;
  108. color: #333333;
  109. }
  110. .address {
  111. margin-top: 16rpx;
  112. font-size: 26rpx;
  113. font-weight: 400;
  114. color: #888888;
  115. .icon-dizhi1 {
  116. font-size: 26rpx;
  117. margin-right: 12rpx;
  118. }
  119. .icon-shijian1 {
  120. font-size: 26rpx;
  121. margin-right: 12rpx;
  122. }
  123. }
  124. }
  125. .body {
  126. padding: 0 30rpx;
  127. }
  128. .line {
  129. margin-top: 56rpx;
  130. width: 100%;
  131. height: 1px;
  132. background-color: #eee;
  133. margin-top: #eee;
  134. }
  135. .weixin-img {
  136. margin-top: 54rpx;
  137. width: 100%;
  138. display: flex;
  139. flex-direction: column;
  140. align-items: center;
  141. .img {
  142. width: 290rpx;
  143. height: 290rpx;
  144. margin-bottom: 38rpx;
  145. }
  146. .text {
  147. margin-top: 10rpx;
  148. font-size: 28rpx;
  149. font-weight: 500;
  150. color: #333333;
  151. }
  152. }
  153. </style>