order.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. <template>
  2. <view>
  3. <view class="bg ">
  4. <view class="" style="width: 100%;text-align: center;position: relative;" @click="saveImgs(order.massageImg)">
  5. <image class="" style="width: 750upx;height: 480upx;" mode="widthFix" :src="order.massageImg"></image>
  6. <view class="govip_view" v-if="!isVip && hyCheck != '否'">
  7. <view class="icon-box">
  8. <image style="width: 48rpx;height: 48rpx;"
  9. src="/static/image/vip.png">
  10. </image>
  11. <view style="font-weight: bold;font-size: 32rpx;color: #975A0B;">开通会员立享会员折扣价</view>
  12. </view>
  13. <view class="btn-box" @tap="goVip">
  14. <view class="btn">去开通</view>
  15. <image style="width: 30rpx;height: 30rpx;margin-left: 20rpx;"
  16. src="/static/image/vip_btn.png">
  17. </image>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="padding-lr padding-top-sm padding-bottom" style="background: #fff;position: relative;margin-top:20rpx;z-index: 9;border-radius: 32rpx 32rpx 0rpx 0rpx;">
  22. <view class="margin-right-xs text-bold padding-bottom-sm"
  23. style="letter-spacing: 3rpx; font-size: 35rpx;">
  24. {{order.title}}
  25. </view>
  26. <view class="padding-bottom flex justify-between ">
  27. <view class="flex align-center" v-if="!isVip">
  28. <view style="color:#FF6E98;font-size:28rpx;font-weight: bold;">
  29. ¥<text style="font-size: 40upx;">{{order.price}}</text>
  30. <text class="oldPrice_view">¥{{order.oldPrice}}</text>
  31. </view>
  32. <view class="flex align-center margin-left-sm">
  33. <image src="../../../static/time.png"
  34. style="width: 24rpx;height: 24rpx;margin-right: 5rpx;"></image>
  35. <view style="color: #999999;font-size: 26rpx;">{{order.duration}}分钟</view>
  36. </view>
  37. </view>
  38. <view class="flex align-center" style="color:#26C278;font-size: 24upx;" v-else>
  39. <view class="box">会员价</view>
  40. <view style="color:#FF1200;font-size:26upx;font-weight: bold;">
  41. ¥<text style="font-size: 40upx;">{{order.memberPrice}}</text>
  42. </view>
  43. <view class="flex align-center margin-left-sm">
  44. <image src="../../../static/time.png"
  45. style="width: 24rpx;height: 24rpx;margin-right: 5rpx;"></image>
  46. <view style="color: #999999;font-size: 26rpx;">{{order.duration}}分钟</view>
  47. </view>
  48. </view>
  49. <view style="color: #999999;font-size: 26rpx;">已售{{order.sales}}</view>
  50. </view>
  51. <view class="flex align-center padding-tb-sm padding-lr "
  52. style="background: #EDFAF7;border-radius: 24rpx;">
  53. <view class="rir">
  54. <!-- 安心购 -->
  55. <image
  56. src="/static/image/text_axg.png"
  57. style="width: 87rpx;height:29rpx;"></image>
  58. </view>
  59. <view class="flex align-center" style="margin-right: 30upx;">
  60. <image src="../../../static/images/index/renz1.png" style="width: 24rpx;height: 24rpx;"></image>
  61. <text class="margin-left-xs" style="font-size: 24rpx;color: #222222;">实名认证</text>
  62. </view>
  63. <view class="flex align-center" style="margin-right: 30upx;">
  64. <image src="../../../static/images/index/renz2.png" style="width: 24rpx;height: 24rpx;"></image>
  65. <text class="margin-left-xs" style="font-size: 24rpx;color: #222222;">资质认证</text>
  66. </view>
  67. <view class="flex align-center">
  68. <image src="../../../static/images/index/renz3.png" style="width: 24rpx;height: 24rpx;"></image>
  69. <text class="margin-left-xs" style="font-size: 24rpx;color: #222222;">平台担保</text>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="bg padding margin-top-sm">
  75. <view class=" text-bold padding-bottom" style="font-size: 34rpx;">
  76. 适用说明
  77. </view>
  78. <view class="flex padding-bottom-sm">
  79. <view style="color: #666666;">性别限制</view>
  80. <view class="margin-left">{{order.isSex}}</view>
  81. </view>
  82. <view class="flex padding-bottom-xs">
  83. <view style="color: #666666;">适用人群</view>
  84. <view class="margin-left">{{order.applyPeople}}</view>
  85. </view>
  86. </view>
  87. <view class="bg padding margin-top-sm" v-if="order.content">
  88. <view class=" text-bold padding-bottom" style="font-size: 34rpx;">
  89. 服务内容:
  90. </view>
  91. <view v-html="order.content"></view>
  92. </view>
  93. <view class="margin-top-sm bg radius ">
  94. <view class="padding text-bold" style="font-size: 34rpx;">项目详情</view>
  95. <view v-for="(item,index) in order.contentImg" :key="index" style="width: 100%;"
  96. @click="saveImg(order.contentImg,index)">
  97. <image :src="item" style="width: 750upx;height: 963upx;" mode="widthFix"></image>
  98. </view>
  99. </view>
  100. <view class=" padding bg u-skeleton-fillet margin-top-sm" style="padding-bottom: 100rpx;">
  101. <view class=" text-bold padding-bottom-sm" style="font-size: 34rpx;">
  102. 用户评价({{commentList.length}})
  103. </view>
  104. <view v-if="commentList.length<=0" class=""> 暂无评价</view>
  105. <view class="margin-bottom-sm padding-tb-sm" style="border-bottom: 1upx solid #f0f0f0;"
  106. v-for="(item, index) in commentList" :key='index' v-else>
  107. <view class="flex justify-between">
  108. <u-avatar src="/static/logo.png" size="48"></u-avatar>
  109. <view class="flex-sub margin-left-sm" style="line-height: 46upx;">匿名</view>
  110. <view class="flex">
  111. <u-icon v-for="ite in item.score" :key='ite' color="#FFAA01" name="star-fill"></u-icon>
  112. </view>
  113. </view>
  114. <view class="margin-top-sm">{{item.content}}</view>
  115. </view>
  116. </view>
  117. <view class=" text-lg cu-bar foot bg padding-lr" v-if="XCXIsSelect !='否'">
  118. <view class="text-center" v-if="order.classifyName === '足浴按摩'"
  119. style="width: 686upx;line-height: 100rpx;background: linear-gradient( 143deg, #FFE6EE 0%, #FF9AB2 100%);border-radius: 86rpx;margin: 0 auto;font-weight: bold;font-size: 32rpx;color: #222222;"
  120. @click="goNav(order.massageTypeId,order.classifyId)">
  121. 选择技师
  122. </view>
  123. <view class="text-center" v-if="order.classifyName === '健身私教'"
  124. style="width: 665upx;line-height: 78upx;background: #2FB57A;border-radius: 39upx;margin: 0 auto;color: #FFFFFF;"
  125. @click="goNav(order.massageTypeId,order.classifyId)">
  126. 选择教练
  127. </view>
  128. <view class="text-center" v-if="order.classifyName != '健身私教' && order.classifyName != '足浴按摩'"
  129. style="width: 665upx;line-height: 78upx;background: #2FB57A;border-radius: 39upx;margin: 0 auto;color: #FFFFFF;"
  130. @click="goNav(order.massageTypeId,order.classifyId)">
  131. 选择师傅
  132. </view>
  133. </view>
  134. <!-- <u-picker v-model="show" mode="time" :params="params" @confirm="statusChange"></u-picker> -->
  135. </view>
  136. </template>
  137. <script>
  138. export default {
  139. data() {
  140. return {
  141. game: [],
  142. customStyle: {
  143. width: '400upx',
  144. color: '#FFFFFF',
  145. background: "#005DFF",
  146. border: 0
  147. },
  148. massageTypeId: '',
  149. orderDet: {},
  150. page: 1,
  151. limit: 10,
  152. order: {},
  153. isFollow: false,
  154. myId: '',
  155. isVip: false,
  156. AUDIO: uni.createInnerAudioContext(),
  157. isPlay: false,
  158. show: false,
  159. params: {
  160. year: false,
  161. month: true,
  162. day: true,
  163. hour: true,
  164. minute: true,
  165. second: true,
  166. timestamp: true
  167. },
  168. startTime: '',
  169. mobile: '',
  170. name: '',
  171. cityaddress: '',
  172. detailaddress: '',
  173. latitude: '',
  174. longitude: '',
  175. province: '',
  176. city: '',
  177. district: '',
  178. age: '',
  179. tabs: [{
  180. name: '服务',
  181. status: 0
  182. }, {
  183. name: '评价',
  184. status: 1
  185. }, {
  186. name: '资质证书',
  187. status: 2
  188. }],
  189. tabIndex: 0, // tab下标
  190. fwIndex: 0,
  191. fw: [],
  192. count: 5,
  193. value: 4,
  194. XCXIsSelect: '否',
  195. hyCheck:'否',
  196. commentList: [],
  197. page: 1,
  198. limit: 10,
  199. imgArr:[]
  200. }
  201. },
  202. onLoad(option) {
  203. console.log(option)
  204. this.$queue.showLoading("加载中...");
  205. this.massageTypeId = option.massageTypeId
  206. this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
  207. this.getDet()
  208. this.getOrderComment()
  209. this.myId = uni.getStorageSync('userId')
  210. this.hyCheck = this.$queue.getData('hyCheck');
  211. if(this.hyCheck != '否'){
  212. this.isVip = uni.getStorageSync('isVIP')
  213. }
  214. },
  215. onShow() {
  216. if(this.massageTypeId){
  217. this.getDet()
  218. this.hyCheck = this.$queue.getData('hyCheck');
  219. if(this.hyCheck != '否'){
  220. this.isVip = uni.getStorageSync('isVIP')
  221. }
  222. this.myId = uni.getStorageSync('userId')
  223. this.getDet()
  224. }
  225. },
  226. onReady() {
  227. this.AUDIO.onEnded(function(res) {
  228. this.isPlay = false;
  229. });
  230. },
  231. methods: {
  232. goVip(){
  233. uni.navigateTo({
  234. url: '/my/vip/index'
  235. });
  236. },
  237. // 评价
  238. getOrderComment() {
  239. this.$Request.get("/app/takingComment/selectOrderTakingComment", {
  240. massageTypeId: this.massageTypeId,
  241. page: this.page,
  242. limit: this.limit
  243. }).then(res => {
  244. if (res.code == 0) {
  245. this.commentList = [...this.commentList, ...res.data.list]
  246. }
  247. });
  248. },
  249. // 切换菜单
  250. tabChange(index) {
  251. this.tabIndex = index
  252. this.fwIndex = index
  253. },
  254. // 详情
  255. getDet() {
  256. this.$Request.get("/app/artificer/selectMassageTypeById", {
  257. massageTypeId: this.massageTypeId,
  258. }).then(res => {
  259. if (res.code == 0) {
  260. this.order = res.data
  261. if (this.order.isSex == 1) {
  262. this.order.isSex = '男';
  263. } else if (this.order.isSex == 2) {
  264. this.order.isSex = '女';
  265. } else {
  266. this.order.isSex = '不限性别';
  267. }
  268. this.order.contentImg = this.order.contentImg.split(",");
  269. this.selectFollow()
  270. }
  271. uni.hideLoading();
  272. });
  273. },
  274. // 是否关注
  275. selectFollow() {
  276. this.$Request.get("/app/userFollow/selectFollowUser", {
  277. followUserId: this.order.userId
  278. }).then(res => {
  279. if (res.data == true) {
  280. this.isFollow = true
  281. } else {
  282. this.isFollow = false
  283. }
  284. });
  285. },
  286. playVoice() {
  287. console.log(this.isPlay)
  288. this.AUDIO.src = this.order.voiceIntroduce;
  289. if (this.isPlay) {
  290. this.AUDIO.stop();
  291. } else {
  292. this.AUDIO.play();
  293. }
  294. this.isPlay = !this.isPlay;
  295. },
  296. goNav(massageTypeId, classifyId) {
  297. uni.navigateTo({
  298. url: '/pages/therapist/therapistList?massageTypeId=' + massageTypeId + '&classifyId=' +
  299. classifyId
  300. })
  301. },
  302. goMsg() {
  303. let data = {
  304. userId: this.myId,
  305. focusedUserId: this.order.userId
  306. }
  307. this.$Request.postJson('/app/chat/insertChatConversation ', data).then(res => {
  308. if (res.code == 0) {
  309. let id = this.order.userId == res.data.userId ? res.data.focusedUserId : this.order.userId
  310. uni.navigateTo({
  311. url: '/pages/msg/im?chatConversationId=' + res.data.chatConversationId +
  312. '&byUserId=' + id
  313. })
  314. }
  315. })
  316. },
  317. // 关注
  318. follow() {
  319. let that = this
  320. that.$Request.get("/app/userFollow/insert", {
  321. followUserId: that.order.userId
  322. }).then(res => {
  323. uni.showToast({
  324. title: res.msg,
  325. icon: 'none'
  326. })
  327. setTimeout(function() {
  328. that.selectFollow()
  329. }, 500)
  330. });
  331. },
  332. saveImg(imgs, index) {
  333. let that = this;
  334. let imgArr = imgs
  335. // imgArr.push(imgs);
  336. // //预览图片
  337. uni.previewImage({
  338. urls: imgArr,
  339. current: imgArr[index]
  340. });
  341. },
  342. saveImgs(imgs) {
  343. console.log(imgs,this.imgArr)
  344. // let that = this
  345. // let imgArr = imgs
  346. this.imgArr.push(imgs);
  347. console.log(this.imgArr)
  348. // //预览图片
  349. uni.previewImage({
  350. urls: this.imgArr,
  351. current: this.imgArr[0]
  352. });
  353. },
  354. }
  355. }
  356. </script>
  357. <style lang="scss">
  358. page {
  359. background-color: #F7F7F7;
  360. }
  361. .bgs {
  362. background-color: #FFFFFF;
  363. }
  364. .bg {
  365. background-color: #FFFFFF;
  366. }
  367. .govip_view {
  368. width: 750rpx;
  369. height: 148rpx;
  370. background: linear-gradient( 104deg, #FFEDC4 0%, #FFD061 100%);
  371. border-radius: 32rpx 32rpx 0rpx 0rpx;
  372. position: absolute;
  373. bottom: -80rpx;
  374. left: 0;
  375. display: flex;
  376. justify-content: space-between;
  377. padding: 24rpx 32rpx;
  378. .icon-box{
  379. display: flex;
  380. align-items: center;
  381. height: 44rpx;
  382. }
  383. .btn-box{
  384. display: flex;
  385. align-items: center;
  386. height: 44rpx;
  387. .btn{
  388. font-weight: bold;
  389. font-size: 32rpx;
  390. color: #975A0B;
  391. }
  392. }
  393. }
  394. .wrap {
  395. padding: 20upx 23upx;
  396. }
  397. .oldPrice_view {
  398. font-family: PingFang SC;
  399. text-decoration: line-through;
  400. margin-left: 8rpx;
  401. font-size: 24rpx;
  402. color: #AAAAAA;
  403. }
  404. .rir {
  405. font-size: 30upx;
  406. font-family: DFZongYi-Bd-80-Win-GB;
  407. font-weight: 800;
  408. color: #30B47A;
  409. margin-right: 30rpx;
  410. }
  411. .line_s {
  412. display: inline-flex;
  413. width: 14rpx;
  414. height: 14rpx;
  415. background: #1AD566;
  416. border-radius: 50%;
  417. margin-right: 10rpx;
  418. }
  419. .line_x {
  420. display: inline-flex;
  421. width: 14rpx;
  422. height: 14rpx;
  423. background: #000000;
  424. border-radius: 50%;
  425. margin-right: 10rpx;
  426. }
  427. .tab>view {
  428. border-bottom: 2upx solid #F5F5F2;
  429. }
  430. .tab>view:last-of-type {
  431. border: none;
  432. }
  433. .box {
  434. background: #E8FAE1;
  435. color: #2FB57A;
  436. padding: 5rpx 15rpx;
  437. font-size: 26rpx;
  438. letter-spacing: 2rpx;
  439. border-radius: 8rpx;
  440. // margin-top: 10rpx;
  441. margin-right: 8upx;
  442. }
  443. </style>