景徳镇旅游微信小程序
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.

274 lines
4.9 KiB

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