inquirySelectType.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <template>
  2. <view class="content">
  3. <view class="cont-bg">
  4. <image src="../../static/images/inquiry_bg.png"></image>
  5. </view>
  6. <u-navbar
  7. :bgColor="bgColor"
  8. leftIconColor="#FFFFFF"
  9. title="会诊通道"
  10. :autoBack="true"
  11. > </u-navbar>
  12. <!-- <view class="bg">
  13. <view></view>
  14. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/65d12607ca874b0d8536c7201a0dfa97.png"></image>
  15. </view> -->
  16. <view class="cont" >
  17. <view class="inquiry-item" v-for="(item) in inquirySubTypes" @click="doInquiryForm(item)" >
  18. <view class="emptyBox"></view>
  19. <view class="left" >
  20. <image mode="aspectFit" src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png"></image>
  21. <view class="rightContent">
  22. <view class="inquiry-cont">
  23. <view class="name ellipsis">{{item.lable}}</view>
  24. <view class="desc">医疗专家团队会诊咨询</view>
  25. </view>
  26. <view v-if="isShare" class="btn share" @click.stop="doShare(item)">分享</view>
  27. <view v-else class="btn share" @click.stop="sendIM(item)">发送</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <u-modal @cancel="showTips = false" @confirm="showTips = false" :show="showTips" title="温馨提示" content='按配置上限无法下单的时候,用户点击通道提示【当日预约已满】'></u-modal>
  33. <u-popup :show="showShare" @close="showShare = false" >
  34. <share-box :shareItem="shareItem" @closeShare='showShare = false' ></share-box>
  35. </u-popup>
  36. </view>
  37. </template>
  38. <script>
  39. import {getInquiryConfig} from '@/api/common.js'
  40. export default {
  41. data() {
  42. return {
  43. inquirySubTypes:[],
  44. companyId:null,
  45. companyUserId:null,
  46. isShare:null,
  47. isH5:false,
  48. showShare:false,
  49. shareItem:{ imageUrl:"",title:"",path:"",isMini:true },
  50. isIM:false,
  51. bgColor:'transparent',
  52. showTips: false
  53. }
  54. },
  55. onPageScroll(e) {
  56. if(e.scrollTop > 30){
  57. this.bgColor = '#FF5701'
  58. }else{
  59. this.bgColor = 'transparent'
  60. }
  61. },
  62. onLoad(options) {
  63. this.isShare=options.isShare;
  64. if(!this.$isEmpty(options.companyId)){
  65. this.companyId=options.companyId == 'undefined' || options.companyId == 'null' ? null: options.companyId
  66. }
  67. if(!this.$isEmpty(options.companyUserId)){
  68. this.companyUserId=options.companyUserId == 'undefined' || options.companyUserId == 'null'? null: options.companyUserId
  69. }
  70. if(!!options.isIM){
  71. this.isIM=options.isIM;
  72. }
  73. this.getConfig();
  74. //#ifdef H5
  75. this.isH5=true;
  76. //#endif
  77. },
  78. onShow() {
  79. if(!this.$isLogin()) {
  80. uni.navigateTo({
  81. url: '/pages/auth/loginIndex'
  82. })
  83. return
  84. }
  85. },
  86. methods: {
  87. getConfig(){
  88. getInquiryConfig().then(
  89. res => {
  90. if(res.code==200){
  91. this.inquirySubTypes=JSON.parse(res.data).inquirySubType;
  92. }
  93. },
  94. rej => {}
  95. );
  96. },
  97. doInquiryForm(item){
  98. let type = item.value
  99. if(item.isCanBuy!=1) {
  100. this.showTips = true
  101. return
  102. }
  103. if(this.$isLogin()){
  104. if(type==3){
  105. uni.navigateTo({
  106. url: "/pages/store/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
  107. })
  108. } else if(type==4){
  109. } else {
  110. uni.navigateTo({
  111. url: "/pages/store/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
  112. })
  113. }
  114. }
  115. },
  116. doShare(item){
  117. if(this.isH5){
  118. return;
  119. }
  120. this.shareItem.title=item.lable;
  121. this.shareItem.imageUrl="https://cos.his.cdwjyyh.com/fs/20250730/186f5f22c89f46d29882227f199ab673.png"; // logo;
  122. this.shareItem.isMini=true;
  123. let type=item.value;
  124. let url = ''
  125. if(type==3){
  126. this.shareItem.path="/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  127. url = "/pages/store/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  128. } else if(type==4){
  129. }else {
  130. this.shareItem.path="/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  131. url = "/pages/store/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare;
  132. }
  133. let cdn=uni.getStorageSync('h5Path');
  134. this.shareItem.url=cdn+url;
  135. this.showShare=true;
  136. },
  137. sendIM(item){
  138. item.companyId=uni.getStorageSync('companyId');
  139. item.companyUserId=uni.getStorageSync('companyUserId');
  140. item.type="inquirySelect";
  141. uni.$emit("sendIMCts",item);
  142. uni.navigateBack({
  143. delta: 1
  144. });
  145. },
  146. }
  147. }
  148. </script>
  149. <style lang="scss">
  150. page{
  151. background: #f1f6fc;
  152. }
  153. </style>
  154. <style scoped lang="scss">
  155. .content{
  156. background: #FFF3F1;
  157. position: relative;
  158. .cont-bg{
  159. z-index: 0;
  160. position: fixed;
  161. display: flex;
  162. align-items: center;
  163. justify-content: center;
  164. width: 100%;
  165. height:100%;
  166. image{
  167. width: 100%;
  168. height:100%
  169. }
  170. }
  171. .bg{
  172. position: relative;
  173. z-index: 999;
  174. display: flex;
  175. align-items: center;
  176. justify-content: center;
  177. width: 100%;
  178. image{
  179. width:350rpx;
  180. height:350rpx;
  181. }
  182. }
  183. .cont{
  184. position: relative;
  185. z-index: 1;
  186. padding: 10rpx;
  187. padding-top: 560rpx;
  188. display: flex;
  189. flex-direction: column;
  190. align-items: center;
  191. justify-content: center;
  192. margin: 0 32rpx;
  193. .inquiry-item{
  194. background: #FFFFFF;
  195. border-radius: 16rpx;
  196. margin-top: 34rpx;
  197. padding: 32rpx;
  198. width: 100%;
  199. box-sizing: border-box;
  200. display: flex;
  201. align-items: center;
  202. justify-content: space-between;
  203. position: relative;
  204. .emptyBox{
  205. width: 160rpx;
  206. height: 60rpx;
  207. background: #FF5C03;
  208. border-radius: 12rpx;
  209. position: absolute;
  210. top: -12rpx;
  211. left: 0;
  212. z-index: -1;
  213. }
  214. .left{
  215. display: flex;
  216. align-items: center;
  217. justify-content: flex-start;
  218. width: 100%;
  219. box-sizing: border-box;
  220. height: 216rpx;
  221. image{
  222. background-color: #fff;
  223. width: 216rpx;
  224. height: 216rpx;
  225. margin-right: 30rpx;
  226. border-radius: 12rpx
  227. }
  228. .inquiry-cont{
  229. margin-left: 20rpx;
  230. display: flex;
  231. flex-direction: column;
  232. align-items: flex-start;
  233. justify-content: flex-start;
  234. flex: 1;
  235. .name{
  236. width: 100%;
  237. font-family: PingFang SC;
  238. font-weight: bold;
  239. font-size: 34rpx;
  240. color: #222222;
  241. }
  242. .desc{
  243. margin-top: 10rpx;
  244. font-family: PingFang SC;
  245. font-size: 24rpx;
  246. color: #FF5C03;
  247. }
  248. }
  249. }
  250. .rightContent{
  251. width: calc(100% - 246rpx);
  252. display: flex;
  253. flex-direction: column;
  254. justify-content: space-between;
  255. height: 100%;
  256. }
  257. .btn{
  258. width: 100upx;
  259. height: 64upx;
  260. line-height: 64upx;
  261. font-size: 26upx;
  262. font-family: PingFang SC;
  263. font-weight: 500;
  264. text-align: center;
  265. border-radius: 30upx;
  266. margin-right: 20rpx;
  267. font-size: 28rpx;
  268. color: #FFFFFF;
  269. width: 200rpx;
  270. height: 72rpx;
  271. background: linear-gradient( 90deg, #FF5701 0%, #FFB501 100%);
  272. box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(238,124,80,0.2);
  273. border-radius: 36rpx;
  274. }
  275. }
  276. }
  277. }
  278. ::v-deep .u-navbar__content__title{
  279. color: #FFFFFF !important;
  280. }
  281. </style>