inquirySelect.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <view class="content">
  3. <view class="bg">
  4. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f06ec63771984f3b9f9aa65eb0c17eeb.png"></image>
  5. </view>
  6. <view class="title">20秒快速匹配{{inquiryType==1?"专家医生":"执业药师"}}</view>
  7. <view class="cont" >
  8. <view class="inquiry-item" v-if="price1!=null" @click="doInquiryForm(price1)">
  9. <view class="left" >
  10. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/939cf3ad7d1a4186a7195e84a1db84bf.png"></image>
  11. <view class="inquiry-cont" v-if="inquiryType==1">
  12. <view class="name">图文问诊 {{price1.price}}/次</view>
  13. <view class="desc">和医生1对1在线图文问诊</view>
  14. </view>
  15. <view class="inquiry-cont" v-if="inquiryType==3">
  16. <view class="name">图文咨询 {{price1.price}}/次</view>
  17. <view class="desc">和药师1对1在线图文咨询</view>
  18. </view>
  19. </view>
  20. <view class="right">
  21. <image src="/static/images/icon_arrow_r.png"></image>
  22. </view>
  23. </view>
  24. <view class="inquiry-item" v-if="price2!=null&&inquiryType==1" @click="doInquiryForm(price2)">
  25. <view class="left" >
  26. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/cf80011807af45c9af1bea6c4cf4bb3a.png"></image>
  27. <view class="inquiry-cont" v-if="inquiryType==1">
  28. <view class="name">视频问诊 {{price2.price}}/次</view>
  29. <view class="desc">和医生1对1在线视频问诊</view>
  30. </view>
  31. <view class="inquiry-cont" v-if="inquiryType==3">
  32. <view class="name">图文咨询 {{price2.price}}/次</view>
  33. <view class="desc">和药师1对1在线视频咨询</view>
  34. </view>
  35. </view>
  36. <view class="right">
  37. <image src="/static/images/icon_arrow_r.png"></image>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import {getConfigByKey} from '@/api/common.js'
  45. export default {
  46. data() {
  47. return {
  48. isShare:null,
  49. companyId:null,
  50. companyUserId:null,
  51. inquiryType:null,
  52. price1:null,
  53. price2:null,
  54. }
  55. },
  56. onLoad(options) {
  57. if(!this.$isEmpty(options.isShare)){
  58. this.isShare=options.isShare
  59. }
  60. else{
  61. uni.hideShareMenu()
  62. }
  63. this.inquiryType=options.inquiryType;
  64. if(this.inquiryType==3){
  65. uni.setNavigationBarTitle({
  66. title:"药师咨询"
  67. })
  68. this.typeText="药师"
  69. }
  70. this.companyId=options.companyId;
  71. this.companyUserId=options.companyUserId;
  72. },
  73. onShow() {
  74. this.getConfigByKey();
  75. },
  76. onShareAppMessage(res) {
  77. //禁止二次转发--
  78. uni.showShareMenu({
  79. withShareTicket: true
  80. });
  81. wx.updateShareMenu({
  82. isPrivateMessage: true,
  83. withShareTicket: false,
  84. success(res) {
  85. console.log('updateShareMenu: ', res);
  86. },
  87. fail() {}
  88. }); //禁止二次转发--end
  89. return {
  90. title: "御君方互联网医院--健康会诊",
  91. path: "/pages_order/inquirySelect?inquiryType=3&companyId="+this.companyId+"&companyUserId="+this.companyUserId
  92. }
  93. },
  94. methods: {
  95. getConfigByKey(){
  96. let data = {key:"his.inquiryConfig"};
  97. getConfigByKey(data).then(
  98. res => {
  99. if(res.code==200){
  100. var data=JSON.parse(res.data);
  101. this.price1 = data.prices.find((item,index)=>item.type=== 1)
  102. this.price2 = data.prices.find((item,index)=>item.type=== 2)
  103. }else{
  104. uni.showToast({
  105. icon:'none',
  106. title: "请求失败",
  107. });
  108. }
  109. },
  110. rej => {}
  111. );
  112. },
  113. doInquiryForm(price){
  114. this.$isLogin().then(
  115. res => {
  116. console.log(res)
  117. if(res){
  118. if(this.inquiryType==1){
  119. uni.navigateTo({
  120. url: "/pages_order/inquiryForm1?inquiryType="+this.inquiryType+"&orderType="+price.type
  121. })
  122. }
  123. else if(this.inquiryType==3){
  124. uni.navigateTo({
  125. url: "/pages_order/inquiryForm3?inquiryType="+this.inquiryType+"&orderType="+price.type+"&companyId="+this.companyId+'&companyUserId='+this.companyUserId
  126. })
  127. }
  128. }
  129. else{
  130. uni.navigateTo({
  131. url:'/pages/auth/login'
  132. })
  133. }
  134. }
  135. );
  136. }
  137. }
  138. }
  139. </script>
  140. <style lang="scss">
  141. page{
  142. background: #f1f6fc;
  143. }
  144. </style>
  145. <style scoped lang="scss">
  146. .content{
  147. position: relative;
  148. .bg{
  149. display: flex;
  150. align-items: center;
  151. justify-content: center;
  152. width: 100%;
  153. }
  154. .title{
  155. margin: 30rpx;
  156. display: flex;
  157. align-items: center;
  158. justify-content: center;
  159. font-size: 32upx;
  160. font-family: PingFang SC;
  161. font-weight: bold;
  162. color: #111111;
  163. }
  164. .cont{
  165. margin: 30rpx;
  166. display: flex;
  167. flex-direction: column;
  168. align-items: center;
  169. justify-content: center;
  170. .inquiry-item{
  171. margin: 15rpx 0rpx;
  172. padding: 50rpx 30rpx;
  173. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  174. background-color: #fff;
  175. border-radius: 15rpx;
  176. width: 100%;
  177. display: flex;
  178. align-items: center;
  179. justify-content: space-between;
  180. .left{
  181. display: flex;
  182. align-items: center;
  183. justify-content: flex-start;
  184. image{
  185. width: 100rpx;
  186. height:100rpx;
  187. }
  188. .inquiry-cont{
  189. margin-left: 20rpx;
  190. display: flex;
  191. flex-direction: column;
  192. align-items: flex-start;
  193. justify-content: flex-start;
  194. .name{
  195. font-size: 32upx;
  196. font-family: PingFang SC;
  197. font-weight: bold;
  198. color: #111111;
  199. }
  200. .desc{
  201. margin-top: 15rpx;
  202. font-size: 28upx;
  203. font-family: PingFang SC;
  204. color: #9a9a9c;
  205. }
  206. }
  207. }
  208. .right{
  209. image{
  210. width: 30rpx;
  211. height:30rpx;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. </style>