inquirySelectType.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view class="content">
  3. <view class="cont-bg">
  4. <image src="../../static/images/inquiry_bg.jpg"></image>
  5. </view>
  6. <view class="bg">
  7. <view></view>
  8. <image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/appimgs/65d12607ca874b0d8536c7201a0dfa97.png"></image>
  9. </view>
  10. <view class="cont" >
  11. <view class="inquiry-item" v-for="(item) in inquirySubTypes" @click="doInquiryForm(item.value)" >
  12. <view class="left" >
  13. <image mode="aspectFit" src="/static/logo.png"></image>
  14. <view class="inquiry-cont">
  15. <view class="name">{{item.lable}}</view>
  16. <view class="desc">医疗专家团队远程咨询</view>
  17. </view>
  18. </view>
  19. <view v-if="isShare" class="btn share" @click.stop="doShare(item)">分享</view>
  20. <view v-else class="btn share" @click.stop="sendIM(item)">发送</view>
  21. </view>
  22. </view>
  23. <u-popup :show="showShare" @close="showShare = false" >
  24. <share-box :shareItem="shareItem" @closeShare='showShare = false' ></share-box>
  25. </u-popup>
  26. </view>
  27. </template>
  28. <script>
  29. import {getConfigByKey} from '@/api/common.js'
  30. export default {
  31. data() {
  32. return {
  33. inquirySubTypes:[],
  34. companyId:null,
  35. companyUserId:null,
  36. isShare:null,
  37. isH5:false,
  38. showShare:false,
  39. shareItem:{ imageUrl:"",title:"",path:"",isMini:true },
  40. isIM:false,
  41. }
  42. },
  43. onLoad(options) {
  44. this.isShare=options.isShare;
  45. if(!this.$isEmpty(options.companyId)){
  46. this.companyId=options.companyId == 'undefined' || options.companyId == 'null' ? null: options.companyId
  47. }
  48. if(!this.$isEmpty(options.companyUserId)){
  49. this.companyUserId=options.companyUserId == 'undefined' || options.companyUserId == 'null'? null: options.companyUserId
  50. }
  51. if(!!options.isIM){
  52. this.isIM=options.isIM;
  53. }
  54. this.getConfig();
  55. //#ifdef H5
  56. this.isH5=true;
  57. //#endif
  58. },
  59. onShow() {
  60. if(!this.$isLogin()) {
  61. uni.navigateTo({
  62. url: '/pages/auth/loginIndex'
  63. })
  64. return
  65. }
  66. },
  67. methods: {
  68. getConfig(){
  69. var data={key:"his.inquiryConfig"}
  70. getConfigByKey(data).then(
  71. res => {
  72. if(res.code==200){
  73. this.inquirySubTypes=JSON.parse(res.data).inquirySubType;
  74. }
  75. },
  76. rej => {}
  77. );
  78. },
  79. doInquiryForm(type){
  80. if(this.$isLogin()){
  81. if(type==3){
  82. uni.navigateTo({
  83. url: "/pages/store/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
  84. })
  85. } else if(type==4){
  86. } else {
  87. uni.navigateTo({
  88. url: "/pages/store/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
  89. })
  90. }
  91. }
  92. },
  93. doShare(item){
  94. if(this.isH5){
  95. return;
  96. }
  97. this.shareItem.title=item.lable;
  98. this.shareItem.imageUrl="../../static/logo.png";
  99. this.shareItem.isMini=true;
  100. let type=item.value;
  101. let url = ''
  102. if(type==3){
  103. this.shareItem.path="/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  104. url = "/pages/store/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  105. } else if(type==4){
  106. }else {
  107. this.shareItem.path="/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  108. url = "/pages/store/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  109. }
  110. let cdn=uni.getStorageSync('h5Path');
  111. this.shareItem.url=cdn+url;
  112. this.showShare=true;
  113. },
  114. sendIM(item){
  115. item.companyId=uni.getStorageSync('companyId');
  116. item.companyUserId=uni.getStorageSync('companyUserId');
  117. item.type="inquirySelect";
  118. uni.$emit("sendIMCts",item);
  119. uni.navigateBack({
  120. delta: 1
  121. });
  122. },
  123. }
  124. }
  125. </script>
  126. <style lang="scss">
  127. page{
  128. background: #f1f6fc;
  129. }
  130. </style>
  131. <style scoped lang="scss">
  132. .content{
  133. position: relative;
  134. .cont-bg{
  135. z-index: 0;
  136. position: fixed;
  137. display: flex;
  138. align-items: center;
  139. justify-content: center;
  140. width: 100%;
  141. height:100%;
  142. image{
  143. width: 100%;
  144. height:100%
  145. }
  146. }
  147. .bg{
  148. position: relative;
  149. z-index: 999;
  150. display: flex;
  151. align-items: center;
  152. justify-content: center;
  153. width: 100%;
  154. image{
  155. width:350rpx;
  156. height:350rpx;
  157. }
  158. }
  159. .cont{
  160. position: relative;
  161. z-index: 1;
  162. padding: 10rpx;
  163. padding-top: 0;
  164. display: flex;
  165. flex-direction: column;
  166. align-items: center;
  167. justify-content: center;
  168. .inquiry-item{
  169. background: linear-gradient(0deg, #ffffff, #FFFBF5);
  170. border: 5rpx solid rgba(247,201,162,0.25);
  171. box-shadow: 0px 5rpx 20rpx 3rpx rgba(0,0,0,0.61);
  172. border-radius: 120rpx;
  173. margin-bottom: 28rpx;
  174. padding: 10rpx;
  175. width: 100%;
  176. display: flex;
  177. align-items: center;
  178. justify-content: space-between;
  179. .left{
  180. display: flex;
  181. align-items: center;
  182. justify-content: flex-start;
  183. image{
  184. border: 10rpx solid #fff;
  185. border-radius: 50%;
  186. background-color: #fff;
  187. width: 150rpx;
  188. height:150rpx;
  189. }
  190. .inquiry-cont{
  191. margin-left: 20rpx;
  192. display: flex;
  193. flex-direction: column;
  194. align-items: flex-start;
  195. justify-content: flex-start;
  196. .name{
  197. font-size: 30upx;
  198. font-family: PingFang SC;
  199. font-weight: bold;
  200. color: #76491C;
  201. }
  202. .desc{
  203. margin-top: 15rpx;
  204. font-size: 28upx;
  205. font-family: PingFang SC;
  206. color: #6F471E;
  207. }
  208. }
  209. }
  210. .right{
  211. }
  212. .btn{
  213. width: 100upx;
  214. height: 64upx;
  215. line-height: 64upx;
  216. font-size: 26upx;
  217. font-family: PingFang SC;
  218. font-weight: 500;
  219. text-align: center;
  220. border-radius: 30upx;
  221. margin-right: 20rpx;
  222. }
  223. .share{
  224. border:2rpx solid #2583EB;
  225. color: #2583EB;
  226. margin-top: 10rpx;
  227. }
  228. }
  229. }
  230. }
  231. </style>