about.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <view v-if="isShowPage">
  3. <view class="ttop" :style="'height:' + systems.barHeight + 'rpx;'">
  4. <view class="back"
  5. :style="'margin-top:' + systems.ktxStatusHeight + 'rpx;height:' + systems.navigationHeight + 'rpx;'"
  6. @click="back()">
  7. <image :src="picUrlss+'back_black.png'"></image>
  8. </view>
  9. </view>
  10. <view class="top">
  11. <!-- <swiper class="swiper" @change="swiperChange" autoplay="true" interval="5000" duration="300">
  12. <block v-for="(item, index) in info.images" :key="index">
  13. <swiper-item><image lazy-load="true" :src="item" mode="aspectFill"></image></swiper-item>
  14. </block>
  15. </swiper>
  16. <view class="dots ddflex">
  17. <block v-for="(item, index) in info.images" :key="index"><view :class="['dot', index == swiperCurrent ? 'active' : '']"></view></block>
  18. </view> -->
  19. <image :src="params.mainGraph" mode="aspectFill"></image>
  20. </view>
  21. <view class="infos">
  22. <view class="title ddflex">
  23. <image :src="params.logo" mode="aspectFill"></image>
  24. <view class="fflex">{{params.title}}</view>
  25. </view>
  26. <!-- <view class="brief">
  27. <rich-text :nodes="params.briefIntroduction"></rich-text>
  28. </view> -->
  29. <view class="http ddflex" v-if="params.website">
  30. <image src="../../static/pages/images/http.png"></image>
  31. <view class="fflex">{{params.website}}</view>
  32. <view class="copy" @click="copy(params.website)">复制</view>
  33. </view>
  34. <view class="area ddflex">
  35. <view class="addr fflex">
  36. <view>{{params.address}}</view>
  37. <text>{{params.title}}</text>
  38. </view>
  39. <view class="aico" @click="location()">
  40. <image src="../../static/pages/images/a_ico1.png"></image>导航
  41. </view>
  42. <view class="aico call" @click="call()">
  43. <image src="../../static/pages/images/a_ico2.png"></image>致电
  44. </view>
  45. </view>
  46. </view>
  47. <view class="intro">
  48. <view class="a-tit">简介</view>
  49. <view class="con">
  50. <mp-html :content="params.briefIntroduction" :lazy-load="true"></mp-html>
  51. </view>
  52. </view>
  53. <view class="intro" v-if="doctorList&&doctorList.length>0">
  54. <navigator :url="'/topic/teacher/teacher?id='+opt.id" hover-class="none" class="a-tit ddflex">专家团队<image
  55. src="../../static/pages/images/crico1.png" class="rico"></image>
  56. </navigator>
  57. <view class="tea ddflex">
  58. <navigator :url="'/topic/teacherDet/teacherDet?id=' + item.id" hover-class="none" class="li"
  59. v-for="(item,index) in doctorList" :key="index">
  60. <view class="lis">
  61. <image :src="item.headUrl" mode="aspectFill"></image>
  62. <view class="tea-tit tover">{{item.realName}}</view>
  63. <view class="rec-tag ddflex" v-if="item.userExtend && item.userExtend.label">
  64. <text class="ddflex" v-for="(it,idx) in item.userExtend.label.split(',')" :key="idx"
  65. v-if="idx == 0">{{it}}</text>
  66. </view>
  67. <view class="tea-bri tovers" v-if="item.userExtend.brief&&item.userExtend.brief!='<p><br></p>'">
  68. <rich-text :nodes="item.userExtend.brief"></rich-text>
  69. </view>
  70. </view>
  71. </navigator>
  72. </view>
  73. </view>
  74. <view class="intro" v-if="params.environment.length > 0">
  75. <view class="a-tit">环境设施</view>
  76. <view class="eviron ddflex">
  77. <view class="li" v-for="(item,index) in params.environment" :key="index"
  78. @click="preview(params.environment,index)">
  79. <image :src="item" mode="aspectFill"></image>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- <view class="intro" v-if="honor.images && honor.images.length > 0">
  84. <view class="a-tit">{{honor.title}}</view>
  85. <view class="eviron ddflex">
  86. <view class="li" v-for="(item,index) in honor.images" :key="index" @click="preview(honor.images,index)"><image :src="item" mode="aspectFill"></image></view>
  87. </view>
  88. </view> -->
  89. </view>
  90. </template>
  91. <script>
  92. const req = require('../../utils/request.js');
  93. const api = require('../../utils/api.js');
  94. const util = require('../../utils/util.js');
  95. const app = getApp();
  96. import mpHtml from "../../components/mp-html/components/mp-html/mp-html.vue"
  97. export default {
  98. components: {
  99. mpHtml
  100. },
  101. data() {
  102. return {
  103. picUrlss: req.public.picUrls,
  104. isShowPage: false,
  105. systems: {},
  106. opt: {},
  107. params: {},
  108. swiperCurrent: 0,
  109. info: '',
  110. environment: '',
  111. merchant: {},
  112. doctorList: []
  113. };
  114. },
  115. onLoad(options) {
  116. this.opt = options;
  117. // this.getTeacherList();
  118. this.getDoctorList();
  119. this.getParams();
  120. },
  121. onShow() {},
  122. methods: {
  123. getParams() {
  124. req.getRequest('/api/merchant/detail', {
  125. id: this.opt.id
  126. }, data => {
  127. if (data.environment) {
  128. data.environment = JSON.parse(data.environment);
  129. }
  130. this.params = data;
  131. this.isShowPage = true;
  132. })
  133. },
  134. getDoctorList() {
  135. let form = {
  136. merchantId: this.opt.id,
  137. page: 1,
  138. limit: 3,
  139. status: 1,
  140. }
  141. return new Promise((resolve, reject) => {
  142. req.getRequest('/api/v3/sysUser/getDoctorV2', form, data => {
  143. if (data && data.length > 0) {
  144. data.map(it => {
  145. if (it.userExtend.brief && it.userExtend.brief != '<p><br></p>')
  146. it.userExtend.brief =
  147. '<div style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;word-break: break-all;">' +
  148. it.userExtend.brief + '</div>'
  149. })
  150. }
  151. this.doctorList = data;
  152. resolve();
  153. })
  154. })
  155. },
  156. back() {
  157. uni.navigateBack();
  158. },
  159. swiperChange(e) {
  160. this.swiperCurrent = e.detail.current;
  161. },
  162. splitLabel(label) {
  163. if (!label) {
  164. return false;
  165. } else {
  166. if (label.indexOf(",") > 0) {
  167. return label.split(',');
  168. } else {
  169. return label.split(',');
  170. }
  171. }
  172. },
  173. getTeacherList() {
  174. let that = this;
  175. let form = {
  176. page: 1,
  177. limit: 6,
  178. code: req.public.teacherCode,
  179. merchantId: this.opt.id
  180. }
  181. req.getRequest('/api/content/list', form, data => {
  182. if (data) {
  183. data.map(it => {
  184. if (it.fieldValues && it.fieldValues.label) {
  185. it.fieldValues.label = that.splitLabel(it.fieldValues.label)
  186. }
  187. return it;
  188. })
  189. that.teacherList = data;
  190. }
  191. });
  192. },
  193. preview(list, index) {
  194. uni.previewImage({
  195. urls: list,
  196. current: list[index]
  197. })
  198. },
  199. copy(content) {
  200. uni.setClipboardData({
  201. data: content,
  202. success: function(res) {
  203. req.msg('复制成功')
  204. }
  205. })
  206. },
  207. call() {
  208. uni.makePhoneCall({
  209. phoneNumber: this.params.phone
  210. })
  211. },
  212. location() {
  213. let that = this;
  214. // #ifdef MP-WEIXIN
  215. let plugin = requirePlugin('routePlan');
  216. let key = req.public.mapLBSKEY; //使用在腾讯位置服务申请的key
  217. let referer = '绿萝云'; //调用插件的app的名称
  218. let themeColor = '#F06520';
  219. let endPoint = JSON.stringify({ //终点
  220. 'name': that.params.title,
  221. 'latitude': that.params.lat,
  222. 'longitude': that.params.lng
  223. });
  224. wx.navigateTo({
  225. url: 'plugin://routePlan/index?key=' + key + '&referer=' + referer + '&endPoint=' + endPoint +
  226. '&themeColor=' + themeColor
  227. });
  228. // #endif
  229. // #ifdef H5
  230. util.openMapNavigation(that.params.lat, that.params.lng, that.params.title, that.params.address ? that
  231. .params.address : '');
  232. // #endif
  233. }
  234. },
  235. mounted() {
  236. const systemInfo = uni.getSystemInfoSync();
  237. // px转换到rpx的比例
  238. let pxToRpxScale = 750 / systemInfo.windowWidth;
  239. let systems = {
  240. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  241. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  242. };
  243. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  244. this.systems = systems;
  245. }
  246. };
  247. </script>
  248. <style>
  249. @import "./about.css";
  250. </style>