景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

299 lines
5.7 KiB

9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="提交预约" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="box">
  5. <view class="info">
  6. <view class="title">
  7. {{ title }}
  8. </view>
  9. <view class="tips">
  10. 项目/负责人{{ detailTitle }}
  11. </view>
  12. <view class="tips">
  13. 开放时间{{ detail.openTime }}
  14. </view>
  15. <view class="tips">
  16. 联系电话{{ detail.phone }}
  17. </view>
  18. <view class="tips"
  19. v-if="price">
  20. 价格 {{ price }}
  21. </view>
  22. </view>
  23. <view class="form-time">
  24. <!-- 预约日期 -->
  25. <view class="title">
  26. 预约日期
  27. </view>
  28. <view class="line"
  29. @click="$refs.calendars.open()">
  30. <view class="">
  31. {{ selectDate.split('-')[0] }}
  32. <view class="icon">
  33. <uv-icon
  34. name="arrow-down"
  35. size="26rpx">
  36. </uv-icon>
  37. </view>
  38. </view>
  39. <view class="">
  40. {{ selectDate.split('-')[1] }}
  41. <view class="icon">
  42. <uv-icon
  43. name="arrow-down"
  44. size="26rpx">
  45. </uv-icon>
  46. </view>
  47. </view>
  48. <view class="">
  49. {{ selectDate.split('-')[2] }}
  50. <view class="icon">
  51. <uv-icon
  52. name="arrow-down"
  53. size="26rpx">
  54. </uv-icon>
  55. </view>
  56. </view>
  57. </view>
  58. <!-- 预约时间 -->
  59. <view class="title">
  60. 预约时间
  61. </view>
  62. <view class="line"
  63. @click="$refs.picker.open()">
  64. <view class="">
  65. 08:00
  66. <view class="icon">
  67. <uv-icon
  68. name="arrow-down"
  69. size="26rpx">
  70. </uv-icon>
  71. </view>
  72. </view>
  73. <view class="">
  74. 14:00
  75. <view class="icon">
  76. <uv-icon
  77. name="arrow-down"
  78. size="26rpx">
  79. </uv-icon>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="box">
  86. <view class="form-input">
  87. <view class="title">
  88. 游客信息
  89. </view>
  90. <view class="input">
  91. <view class="label">
  92. 姓名
  93. </view>
  94. <input type="text"
  95. placeholder="请输入姓名"
  96. v-model="form.name"/>
  97. </view>
  98. <view class="input">
  99. <view class="label">
  100. 联系方式
  101. </view>
  102. <input type="text"
  103. placeholder="请输入联系方式"
  104. v-model="form.phone"/>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 选择日期 -->
  109. <uv-calendars
  110. color="#B12026"
  111. :date="selectDate"
  112. confirmColor="#B12026"
  113. :clearDate="false"
  114. ref="calendars" @confirm="confirmDate" />
  115. <!-- 选择时间 -->
  116. <uv-picker ref="picker"
  117. :columns="timeColumns"
  118. confirmColor="#B12026"
  119. keyName="timeDot"
  120. @confirm="confirmTime"></uv-picker>
  121. </view>
  122. </template>
  123. <script>
  124. export default {
  125. data() {
  126. return {
  127. tabs: [{
  128. name: '路径定制'
  129. },
  130. {
  131. name: '遗产讲述'
  132. },
  133. {
  134. name: '达人同游'
  135. },
  136. {
  137. name: '我要跟拍'
  138. },
  139. {
  140. name: '非遗体验'
  141. },
  142. // {
  143. // name: '遗产路径'
  144. // },
  145. {
  146. name: '我要研学'
  147. },
  148. ],
  149. title : '',
  150. form : {
  151. name : '',
  152. phone : '',
  153. },
  154. selectDate : this.$dayjs().format('YYYY-MM-DD'),
  155. timeColumns : [],
  156. id : 0,
  157. payType : 0,
  158. detail : {},
  159. //订单类型(0-路径定制 1-遗产讲述 2-达人同游 3-我要跟拍 4-非遗体验 5-我要研学)
  160. // 5-遗产路径待定
  161. api : {
  162. 0 : 'queryAmusementById',//路径定制
  163. 1 : 'queryRoleInfoById',//遗产讲述
  164. 2 : 'queryRoleInfoById',//达人同游
  165. 3 : 'queryRoleInfoById',//我要跟拍
  166. 4 : 'queryExperienceById',//非遗体验
  167. 5 : 'queryAmusementById',//我要研学
  168. // 6 : 'queryAmusementById',
  169. },
  170. }
  171. },
  172. computed : {
  173. detailTitle(){
  174. return this.detail.roleName ||
  175. this.detail.amusementTitle ||
  176. this.detail.experienceTitle
  177. },
  178. price(){
  179. return this.detail.price ||
  180. this.detail.amusementPrice
  181. }
  182. },
  183. onLoad(args) {
  184. this.payType = args.payType
  185. this.title = this.tabs[args.payType].name
  186. this.id = args.id
  187. },
  188. onShow() {
  189. this.getData()
  190. this.getDataTime(0)
  191. this.getDataTime(1)
  192. },
  193. methods: {
  194. // 获取预约信息
  195. getData(){
  196. this.$api(this.api[this.payType], {
  197. roleInfoId : this.id,
  198. amusementId : this.id,
  199. experienceId : this.id,
  200. }, res => {
  201. uni.stopPullDownRefresh()
  202. if(res.code == 200){
  203. this.detail = res.result
  204. }
  205. })
  206. },
  207. // 获取预约信息
  208. getDataTime(timeType){
  209. this.$api('queryOrderTime', {
  210. timeType
  211. }, res => {
  212. if(res.code == 200){
  213. this.timeColumns.splice(timeType, 0, res.result)
  214. }
  215. })
  216. },
  217. // 选择日期
  218. confirmDate(e){
  219. this.selectDate = e.fulldate
  220. },
  221. // 选择时间
  222. confirmTime(e){
  223. console.log(e);
  224. },
  225. }
  226. }
  227. </script>
  228. <style scoped lang="scss">
  229. .page{
  230. .box{
  231. border-radius: 20rpx;
  232. margin: 20rpx;
  233. background-color: #fff;
  234. box-shadow: 0 0 16rpx 6rpx #00000011;
  235. .info{
  236. padding: 40rpx;
  237. border-bottom: 1rpx dashed #000;
  238. .title{
  239. font-size: 34rpx;
  240. font-weight: 900;
  241. padding-bottom: 20rpx;
  242. }
  243. .tips{
  244. font-size: 26rpx;
  245. color: #666666;
  246. padding: 10rpx 0;
  247. }
  248. }
  249. .form-time{
  250. padding: 40rpx;
  251. .title{
  252. font-weight: 900;
  253. padding-bottom: 20rpx;
  254. margin-top: 10rpx;
  255. }
  256. .line{
  257. display: flex;
  258. align-items: center;
  259. >view{
  260. border: 1rpx solid #333;
  261. padding: 6rpx 20rpx;
  262. margin: 10rpx;
  263. border-radius: 10rpx;
  264. font-size: 26rpx;
  265. display: flex;
  266. align-items: center;
  267. justify-content: center;
  268. .icon{
  269. padding: 0 10rpx;
  270. }
  271. }
  272. }
  273. }
  274. .form-input{
  275. padding: 40rpx;
  276. .input{
  277. display: flex;
  278. padding-top: 30rpx;
  279. .label{
  280. width: 200rpx;
  281. }
  282. input{
  283. font-size: 26rpx;
  284. }
  285. }
  286. }
  287. }
  288. }
  289. </style>