therapist.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <template>
  2. <view class="">
  3. <view v-if="orderList.length">
  4. <view class="flex align-center margin-bottom-sm bg padding-sm radius margin-sm"
  5. v-for="(item,index) in orderList" :key='index' @click="goOrder(item)"
  6. style="box-shadow: 6rpx 10rpx 4px #F5F5F5;position: relative;">
  7. <view style="position: absolute;z-index: 99;top: 0rpx;left: 0;" v-if="item.isGoods == 1">
  8. <image
  9. src="/static/image/text_you.png"
  10. style="width: 42rpx;height: 36rpx;"></image>
  11. </view>
  12. <view style="width:130upx;height:190upx;border-radius: 10rpx;">
  13. <image :src="item.artificerImg?item.artificerImg: '../../static/logo.png'"
  14. @click.stop="saveImgs(item.artificerImg)"
  15. style="width: 130upx;height: 130upx;border-radius: 50%;" mode="aspectFill"></image>
  16. <image v-if="item.isHot == 1"
  17. src="/static/image/icon_fire.png"
  18. style="width: 30rpx;height: 36rpx;position: absolute;z-index: 99;top: 40rpx;left: 110rpx;">
  19. </image>
  20. <!-- <view class="kyy_view" v-if="item.status == 1">可预约</view>
  21. <view class="byy_view" v-else>休息中</view> -->
  22. </view>
  23. <view class="margin-left flex flex-direction" style="width: 85%;">
  24. <view class="flex align-center justify-between">
  25. <view class="flex align-center">
  26. <view class="text-bold text-30 margin-right-xs">{{item.artificerName}}</view>
  27. <image
  28. src="/static/image/icon_pao.png"
  29. style="width: 40rpx;height:40rpx;">
  30. </image>
  31. </view>
  32. </view>
  33. <view class="flex justify-between " style="margin:15rpx 0rpx 20rpx">
  34. <view class="flex align-center">
  35. <view v-if="item.ordersScore" class="margin-right-sm">
  36. <image src="../../static/images/start.png" style="width: 24upx;height: 22upx;">
  37. </image>
  38. <text class="margin-left-xs" style="color: #FF1200;">{{item.ordersScore}}</text>
  39. </view>
  40. <view style="color: #999999;">已服务:{{item.ordersCount}}单</view>
  41. </view>
  42. </view>
  43. <view style="width: 100%;display: flex;justify-content: space-between;align-items: center;"
  44. v-if="XCXIsSelect !='否'">
  45. <view class="flex flex-wrap align-center" style="margin-top: 10rpx;">
  46. <image
  47. src="/static/image/icon_shang.png"
  48. style="width: 34rpx;height: 36rpx;"></image>
  49. <view style="margin-left: 10rpx;color: #999;font-size: 26rpx;">商家</view>
  50. <image
  51. src="/static/image/icon_ping.png"
  52. style="width: 40rpx;height: 32rpx;margin-left: 20rpx;"></image>
  53. <view style="margin-left: 10rpx;color: #999;font-size: 26rpx;">
  54. {{item.commentCount ? item.commentCount : 0}}
  55. </view>
  56. <image
  57. src="/static/image/icon_cang.png"
  58. style="width: 40rpx;height: 36rpx;margin-left: 20rpx;"></image>
  59. <view style="margin-left: 10rpx;color: #999;font-size: 26rpx;">
  60. {{item.collectCount ? item.collectCount : 0}}
  61. </view>
  62. </view>
  63. <view class="text-center text-sm"
  64. style="color: #2FB57A;font-size: 28rpx;"
  65. @click.stop="goOrder(item)">
  66. ¥{{item.money}}
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <empty v-if="orderList.length == 0"></empty>
  73. </view>
  74. </template>
  75. <script>
  76. import empty from '@/components/empty.vue'
  77. export default {
  78. components: {
  79. empty
  80. },
  81. data() {
  82. return {
  83. consortiaId: '',
  84. loading: true, // 是否显示骨架屏组件
  85. orderList: [],
  86. page: 1,
  87. limit: 10,
  88. token: '',
  89. XCXIsSelect: '否',
  90. isVip: false,
  91. myId: uni.getStorageSync('userId') ? uni.getStorageSync('userId') : '',
  92. }
  93. },
  94. onLoad(e) {
  95. this.consortiaId = e.consortiaId;
  96. let that = this
  97. that.page = 1
  98. that.getlist()
  99. },
  100. onShow() {
  101. let that = this
  102. that.XCXIsSelect = this.$queue.getData("XCXIsSelect");
  103. that.token = uni.getStorageSync('token')
  104. that.myId = uni.getStorageSync('userId')
  105. },
  106. methods: {
  107. saveImgss(imgs, index) {
  108. console.log(imgs, index)
  109. let imgArr = imgs
  110. // //预览图片
  111. uni.previewImage({
  112. urls: imgArr,
  113. current: imgArr[index]
  114. });
  115. },
  116. saveImgs(imgs) {
  117. let imgArr = [];
  118. imgArr.push(imgs);
  119. // //预览图片
  120. uni.previewImage({
  121. urls: imgArr,
  122. current: 0
  123. });
  124. },
  125. getIsVip() {
  126. this.$Request.get("/app/UserVip/isUserVip").then(res => {
  127. if (res.code == 0) {
  128. this.isVip = res.data
  129. uni.setStorageSync('isVIP', res.data)
  130. }
  131. });
  132. },
  133. getlist() {
  134. let userId = this.$queue.getData('userId');
  135. let index = 2
  136. let data = {
  137. page: this.page,
  138. limit: this.limit,
  139. consortiaId: this.consortiaId,
  140. shopId: userId
  141. }
  142. this.$Request.get("/app/consortia/selectUserListByConsortiaId", data).then(res => {
  143. this.loading = false;
  144. if (res.code == 0) {
  145. if (this.page == 1) {
  146. this.orderList = res.data.list
  147. } else {
  148. this.orderList = [...this.orderList, ...res.data.list]
  149. }
  150. }
  151. uni.stopPullDownRefresh();
  152. })
  153. },
  154. // 跳转游戏列表
  155. goNav(url) {
  156. if (uni.getStorageSync('sendMsg')) {
  157. console.log('授权+1')
  158. wx.requestSubscribeMessage({
  159. tmplIds: this.arr,
  160. success(re) {
  161. console.log(JSON.stringify(re), 111111111111)
  162. var datas = JSON.stringify(re);
  163. if (datas.indexOf("accept") != -1) {
  164. console.log(re)
  165. }
  166. },
  167. fail: (res) => {
  168. console.log(res)
  169. }
  170. })
  171. }
  172. if (url.indexOf('/pages/') !== -1) {
  173. uni.navigateTo({
  174. url
  175. });
  176. } else {
  177. //#ifndef H5
  178. uni.navigateTo({
  179. url: '/pages/index/webView?url=' + url
  180. });
  181. //#endif
  182. //#ifdef H5
  183. window.location.href = url;
  184. //#endif
  185. }
  186. },
  187. // 跳转订单
  188. goOrder(e) {
  189. console.log('授权', uni.getStorageSync('sendMsg'))
  190. if (uni.getStorageSync('sendMsg')) {
  191. console.log('授权+1')
  192. wx.requestSubscribeMessage({
  193. tmplIds: this.arr,
  194. success(re) {
  195. console.log(JSON.stringify(re), 111111111111)
  196. var datas = JSON.stringify(re);
  197. if (datas.indexOf("accept") != -1) {
  198. console.log(re)
  199. }
  200. },
  201. fail: (res) => {
  202. console.log(res)
  203. }
  204. })
  205. }
  206. if (this.token) {
  207. uni.navigateTo({
  208. url: '/pages/therapist/orderDetail?artificerId=' + e.artificerId
  209. });
  210. } else {
  211. uni.navigateTo({
  212. url: '/pages/public/login'
  213. });
  214. }
  215. },
  216. },
  217. onReachBottom: function() {
  218. this.page = this.page + 1;
  219. this.getlist()
  220. },
  221. onPullDownRefresh: function() {
  222. this.page = 1;
  223. this.getlist()
  224. },
  225. }
  226. </script>
  227. <style lang="scss">
  228. page {
  229. background-color: #F7F7F7;
  230. }
  231. .zz_view {
  232. // width: 220upx;
  233. background: #e8fdf6;
  234. color: #73c2a2;
  235. font-size: 24rpx;
  236. padding: 6rpx 10rpx;
  237. border-radius: 10rpx;
  238. }
  239. .zpmore_view {
  240. background: #2FB57A;
  241. width: 120upx;
  242. text-align: center;
  243. border-radius: 10rpx;
  244. height: 42rpx;
  245. line-height: 42rpx;
  246. font-size: 24rpx;
  247. color: #FFFFFF;
  248. margin-left: 10rpx;
  249. }
  250. .byy_view {
  251. // background: #2FB57A;
  252. width: 120upx;
  253. text-align: center;
  254. border-radius: 50rpx;
  255. height: 46rpx;
  256. line-height: 46rpx;
  257. font-size: 24rpx;
  258. color: #999999;
  259. border: 3upx solid #999999;
  260. margin-top: 6rpx;
  261. }
  262. .kyy_view {
  263. background: #2FB57A;
  264. width: 120upx;
  265. text-align: center;
  266. border-radius: 50rpx;
  267. height: 46rpx;
  268. line-height: 46rpx;
  269. font-size: 24rpx;
  270. color: #FFFFFF;
  271. margin-top: 6rpx;
  272. }
  273. .bg {
  274. background: #FFFFFF;
  275. }
  276. .ytp_view {
  277. background: #e3e3e3;
  278. width: 400rpx;
  279. border-radius: 10rpx;
  280. font-size: 28rpx;
  281. text-align: center;
  282. height: 80rpx;
  283. line-height: 80rpx;
  284. color: #848484;
  285. margin-top: 40rpx;
  286. }
  287. .tp_view {
  288. background: #ee6c54;
  289. width: 400rpx;
  290. border-radius: 10rpx;
  291. font-size: 28rpx;
  292. text-align: center;
  293. height: 80rpx;
  294. line-height: 80rpx;
  295. color: #FFFFFF;
  296. margin-top: 40rpx;
  297. }
  298. .sticky-tabs {
  299. z-index: 990;
  300. position: sticky;
  301. top: var(--window-top);
  302. // background-color: #fff;
  303. }
  304. /* // 使用mescroll-uni,则top为0 */
  305. .mescroll-uni,
  306. /deep/.mescroll-uni {
  307. .sticky-tabs {
  308. top: 0;
  309. }
  310. }
  311. .demo-tip {
  312. padding: 18upx;
  313. font-size: 24upx;
  314. text-align: center;
  315. }
  316. .line_s {
  317. display: inline-flex;
  318. width: 10rpx;
  319. height: 10rpx;
  320. background: #1AD566;
  321. border-radius: 50%;
  322. margin-right: 10rpx;
  323. }
  324. .line_x {
  325. display: inline-flex;
  326. width: 10rpx;
  327. height: 10rpx;
  328. background: #000000;
  329. border-radius: 50%;
  330. margin-right: 10rpx;
  331. }
  332. .box {
  333. // border: 3rpx solid #005dff;
  334. background: #E8FAE1;
  335. color: #2FB57A;
  336. padding: 5rpx 15rpx;
  337. font-size: 26rpx;
  338. letter-spacing: 2rpx;
  339. border-radius: 8rpx;
  340. // margin-top: 10rpx;
  341. margin-right: 8upx;
  342. }
  343. .actve {
  344. font-size: 30rpx;
  345. font-family: PingFang SC;
  346. font-weight: 800;
  347. color: #20C675;
  348. }
  349. .tabview1 {
  350. padding: 20rpx 20rpx;
  351. // width: 686upx;
  352. // height: 100upx;
  353. background: #FFFFFF;
  354. margin-top: 60upx;
  355. // z-index: 99;
  356. // display: flex;
  357. // line-height: 100upx;
  358. .tabview {
  359. // width: 686upx;
  360. // // height: 100upx;
  361. background: #F2FFF9;
  362. border-radius: 24rpx 24rpx 0 0;
  363. // margin-top: -50upx;
  364. // z-index: 99;
  365. display: flex;
  366. line-height: 100upx;
  367. .tabItem_sel {
  368. font-size: 30upx;
  369. font-family: PingFang SC;
  370. font-weight: 800;
  371. color: #20C675;
  372. flex: 1;
  373. text-align: center;
  374. }
  375. .tabItem {
  376. font-size: 26upx;
  377. font-family: PingFang SC;
  378. font-weight: 500;
  379. color: #333333;
  380. flex: 1;
  381. text-align: center;
  382. }
  383. }
  384. .tabsx {
  385. width: 686upx;
  386. border-radius: 24rpx;
  387. padding-bottom: 10rpx;
  388. display: flex;
  389. align-items: center;
  390. justify-content: space-between;
  391. padding: 20rpx 30rpx;
  392. font-size: 26rpx;
  393. .active {
  394. color: #20C675;
  395. font-size: 30rpx;
  396. font-weight: bold;
  397. }
  398. }
  399. }
  400. </style>