myOrder.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <template>
  2. <view class="u-skeleton">
  3. <view class="bg">
  4. <view class="padding" style="width: 100%;height: 347px;">
  5. <image class="" style="width: 100%;height: 100%;border-radius: 30rpx;" :src="order.massageImg"></image>
  6. </view>
  7. <view class="padding-lr">
  8. <view class="margin-right-xs text-df"
  9. style="width: 400rpx; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  10. {{order.title}}
  11. </view>
  12. <view class="text-xs margin-top-sm" style="color: #26C278;">
  13. <!-- ¥<text class="text-df">{{isVip? order.memberMoney :order.money}}/</text>60分钟 -->
  14. ¥<text class="text-df">{{order.price}}/</text>{{order.duration}}分钟
  15. </view>
  16. <!-- <view class="margin-top-xs ">
  17. <text class="padding-xs margin-right-xs text-sm" style="color: #26C278;background-color: #FFEBF0;"
  18. v-for="(item,index) in order.gameName" :key="index">{{item}}</text>
  19. </view> -->
  20. <view class="margin-top-sm padding-bottom-sm" style="border-top: 2rpx solid #F5F5F2;">
  21. <view class="text-bold text-df padding-tb-xs">适用说明</view>
  22. <view class="text-sm " style="color: #666666;">
  23. {{order.content}}
  24. </view>
  25. </view>
  26. <view class="flex align-center padding-tb-sm " style="border-top: 2rpx solid #F5F5F2;">
  27. <view class="flex align-center" style="margin-right: 39upx;">
  28. <image src="../../../static/images/index/renz1.png" style="width: 32upx;height: 28upx;"></image>
  29. <text class="margin-left-xs">实名认证</text>
  30. </view>
  31. <view class="flex align-center" style="margin-right: 39upx;">
  32. <image src="../../../static/images/index/renz2.png" style="width:28upx;height: 33upx;"></image>
  33. <text class="margin-left-xs">资质认证</text>
  34. </view>
  35. <view class="flex align-center">
  36. <image src="../../../static/images/index/renz3.png" style="width: 28upx;height: 32upx;"></image>
  37. <text class="margin-left-xs">平台担保</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="margin-top-sm bg radius u-skeleton-fillet">
  43. <view class="text-center padding">服务详情</view>
  44. <view v-for="(item,index) in order.contentImg" :key="index" style="width: 100%;height: 80vh;">
  45. <image :src="item" style="width: 100%;height: 100%;"></image>
  46. </view>
  47. </view>
  48. <!-- <u-picker v-model="show" mode="time" :params="params" @confirm="statusChange"></u-picker> -->
  49. <u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. game: [],
  57. loading: true, // 是否显示骨架屏组件
  58. customStyle: {
  59. width: '400upx',
  60. color: '#FFFFFF',
  61. background: "#005DFF",
  62. border: 0
  63. },
  64. id: '',
  65. orderDet: {},
  66. page: 1,
  67. limit: 10,
  68. order: {},
  69. commentList: [],
  70. isFollow: false,
  71. myId: '',
  72. isVip: false,
  73. AUDIO: uni.createInnerAudioContext(),
  74. isPlay: false,
  75. show: false,
  76. params: {
  77. year: false,
  78. month: true,
  79. day: true,
  80. hour: true,
  81. minute: true,
  82. second: true,
  83. timestamp: true
  84. },
  85. startTime: '',
  86. mobile: '',
  87. name: '',
  88. cityaddress: '',
  89. detailaddress: '',
  90. latitude: '',
  91. longitude: '',
  92. province: '',
  93. city: '',
  94. district: '',
  95. age: 0
  96. }
  97. },
  98. onLoad(option) {
  99. // this.$queue.showLoading("加载中...");
  100. this.id = option.id
  101. this.getDet()
  102. this.getOrderComment()
  103. this.myId = uni.getStorageSync('userId')
  104. this.isVip = uni.getStorageSync('isVIP')
  105. console.log(this.isVip)
  106. },
  107. onShow() {
  108. },
  109. onReady() {
  110. this.AUDIO.onEnded(function(res) {
  111. this.isPlay = false;
  112. });
  113. },
  114. methods: {
  115. bindTophoto(index, id) {
  116. console.log(index, id)
  117. if (index == 1) {
  118. uni.navigateTo({
  119. url: './detailphoto?id=' + id
  120. })
  121. } else if (index == 2) {
  122. uni.navigateTo({
  123. url: './workphoto?id=' + id
  124. })
  125. }
  126. },
  127. // 详情
  128. getDet() {
  129. uni.showLoading({
  130. title: '加载中...'
  131. });
  132. this.$Request.get("/app/artificer/selectMassageTypeById", {
  133. massageTypeId: this.id,
  134. }).then(res => {
  135. this.loading = false;
  136. uni.hideLoading();
  137. if (res.code == 0) {
  138. this.order = res.data
  139. // this.order.gameName = this.order.gameName.split(",");
  140. this.order.contentImg = this.order.contentImg.split(",");
  141. // this.order.certificateImg = this.order.certificateImg.split(",");
  142. // this.order.headImg = this.order.headImg.split(",");
  143. // this.order.workImg = this.order.workImg.split(",");
  144. // this.selectFollow()
  145. // if (this.order.region) {
  146. // let region = this.order.region.split(",");
  147. // this.order.region = region[1]
  148. // } else {
  149. // this.order.region = '不限地区'
  150. // }
  151. // uni.hideLoading();
  152. } else {
  153. // this.loading = false;
  154. // uni.hideLoading();
  155. }
  156. });
  157. },
  158. // 评论
  159. // getOrderComment() {
  160. // this.$Request.get("/app/takingComment/selectOrderTakingComment", {
  161. // id: this.id,
  162. // page: this.page,
  163. // limit: this.limit
  164. // }).then(res => {
  165. // if (res.code == 0) {
  166. // this.commentList = [...this.commentList, ...res.data.list]
  167. // }
  168. // });
  169. // },
  170. // 是否关注
  171. selectFollow() {
  172. this.$Request.get("/app/userFollow/selectFollowUser", {
  173. followUserId: this.order.userId
  174. }).then(res => {
  175. if (res.data == true) {
  176. this.isFollow = true
  177. } else {
  178. this.isFollow = false
  179. }
  180. });
  181. },
  182. playVoice() {
  183. console.log(this.isPlay)
  184. this.AUDIO.src = this.order.voiceIntroduce;
  185. if (this.isPlay) {
  186. this.AUDIO.stop();
  187. } else {
  188. this.AUDIO.play();
  189. }
  190. this.isPlay = !this.isPlay;
  191. },
  192. goNav() {
  193. // if (this.startTime == '') {
  194. // uni.showToast({
  195. // icon: 'none',
  196. // title: '请选择上门时间'
  197. // });
  198. // return;
  199. // }
  200. uni.navigateTo({
  201. url: "/pages/index/game/orderDet?id=" + this.id
  202. })
  203. },
  204. goMsg() {
  205. let data = {
  206. userId: this.myId,
  207. focusedUserId: this.order.userId
  208. }
  209. this.$Request.postJson('/app/chat/insertChatConversation ', data).then(res => {
  210. if (res.code == 0) {
  211. let id = this.order.userId == res.data.userId ? res.data.focusedUserId : this.order.userId
  212. uni.navigateTo({
  213. url: '/pages/msg/im?chatConversationId=' + res.data.chatConversationId +
  214. '&byUserId=' + id
  215. })
  216. }
  217. })
  218. },
  219. // 关注
  220. follow() {
  221. let that = this
  222. that.$Request.get("/app/userFollow/insert", {
  223. followUserId: that.order.userId
  224. }).then(res => {
  225. uni.showToast({
  226. title: res.msg,
  227. icon: 'none'
  228. })
  229. setTimeout(function() {
  230. that.selectFollow()
  231. }, 500)
  232. });
  233. }
  234. }
  235. }
  236. </script>
  237. <style>
  238. page {
  239. background-color: #F7F7F7;
  240. }
  241. .bgs {
  242. background-color: #FFFFFF;
  243. }
  244. .bg {
  245. background-color: #FFFFFF;
  246. }
  247. .line_s {
  248. display: inline-flex;
  249. width: 14rpx;
  250. height: 14rpx;
  251. background: #1AD566;
  252. border-radius: 50%;
  253. margin-right: 10rpx;
  254. }
  255. .line_x {
  256. display: inline-flex;
  257. width: 14rpx;
  258. height: 14rpx;
  259. background: #000000;
  260. border-radius: 50%;
  261. margin-right: 10rpx;
  262. }
  263. </style>