orderX.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view class="content">
  3. <!-- 套餐内容 -->
  4. <view class="neirong">
  5. <view class="title title1">套餐内容</view>
  6. <view class="title title2" style="margin-top: 23rpx">
  7. <view class="cicle"></view>
  8. <view style="margin-left: 16rpx">创海便利店(二食堂1楼) 13267827921</view>
  9. </view>
  10. <view class="xiangnei" v-for="(item, index) in 2" :key="index">例假期每天一杯红糖姜茶 x1</view>
  11. </view>
  12. <!-- 例假设置 -->
  13. <view class="neirong">
  14. <view class="title title1">例假设置</view>
  15. <view class="lijia_ques" style="margin-top: 27rpx">您的月经大概持续几天?</view>
  16. <view class="custom-item">
  17. <view class="item-label">经期长度</view>
  18. <view class="item-value">
  19. <picker @change="bindPickerChange" :value="index" :range="array">
  20. <view class="uni-input">{{ array[index] }}</view>
  21. </picker>
  22. <!-- 箭头图标,可使用 uni-app 内置图标或自定义图片 -->
  23. <uni-icons type="right" color="#808080" />
  24. </view>
  25. </view>
  26. <view class="lijia_ques" style="margin-top: 27rpx">您的月经开始日大概间隔多久?</view>
  27. <view class="custom-item">
  28. <view class="item-label">周期长度</view>
  29. <view class="item-value">
  30. <picker @change="bindPickerChange2" :value="index2" :range="array2">
  31. <view class="uni-input">{{ array2[index2] }}</view>
  32. </picker>
  33. <!-- 箭头图标,可使用 uni-app 内置图标或自定义图片 -->
  34. <uni-icons type="right" color="#808080" />
  35. </view>
  36. </view>
  37. <view class="lijia_ques" style="margin-top: 27rpx">您的另一半上一次月经的开始结束时间是什么时候?</view>
  38. <view class="custom-item">
  39. <view class="item-label">
  40. <uni-datetime-picker v-model="datetimerange" :border="false" type="daterange" rangeSeparator="~" />
  41. </view>
  42. <view class="item-value">
  43. <!-- 箭头图标,可使用 uni-app 内置图标或自定义图片 -->
  44. <uni-icons type="calendar" color="#000000" />
  45. </view>
  46. </view>
  47. <view class="lijia_ques" style="margin-top: 27rpx">下次生理期?</view>
  48. <view class="custom-item">
  49. <view class="item-label">
  50. <uni-datetime-picker v-model="datetimerange" :border="false" type="daterange" rangeSeparator="~" />
  51. </view>
  52. <view class="item-value">
  53. <!-- 箭头图标,可使用 uni-app 内置图标或自定义图片 -->
  54. <uni-icons type="calendar" color="#000000" />
  55. </view>
  56. </view>
  57. <view style="width: 100%; height: 30rpx"></view>
  58. </view>
  59. <!-- 配送信息 -->
  60. <view class="neirong">
  61. <view class="title title1">配送信息</view>
  62. <view class="lijia_ques" style="margin-top: 27rpx">您的另一半姓名</view>
  63. <view class="custom-item">
  64. <input class="uni-input" focus type="text" v-model="name" placeholder="请输入姓名" />
  65. </view>
  66. <view class="lijia_ques" style="margin-top: 27rpx">联系电话</view>
  67. <view class="custom-item">
  68. <input class="uni-input" focus type="tel" v-model="phone" placeholder="请输入姓名" />
  69. </view>
  70. <view style="width: 100%; height: 52px"></view>
  71. </view>
  72. <!-- 提交订单 -->
  73. <view class="goorder">
  74. <view class="goorder_but" @click="toSettlement_throttle">提交订单</view>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. export default {
  80. data() {
  81. return {
  82. array: ['3天', '4天', '5天', '6天', '7天', '8天', '9天', '10天', '11天', '11天', '13天', '14天', '15天'], //经期长度
  83. index: 0,
  84. array2: [
  85. '17天',
  86. '18天',
  87. '19天',
  88. '20天',
  89. '21天',
  90. '22天',
  91. '23天',
  92. '24天',
  93. '25天',
  94. '26天',
  95. '27天',
  96. '28天',
  97. '29天',
  98. '30天',
  99. '31天',
  100. '32天',
  101. '33天',
  102. '34天',
  103. '35天',
  104. '36天',
  105. '37天',
  106. '38天',
  107. '39天',
  108. '40天',
  109. '41天',
  110. '42天',
  111. '43天',
  112. '44天',
  113. '45天',
  114. '46天',
  115. '47天',
  116. '48天',
  117. '49天',
  118. '50天',
  119. '51天',
  120. '52天',
  121. '53天',
  122. '54天',
  123. '55天',
  124. '56天',
  125. '57天',
  126. '58天',
  127. '59天',
  128. '60天'
  129. ], //月经周期
  130. index2: 0,
  131. datetimerange: [],
  132. // 配送信息
  133. name: '',
  134. phone: ''
  135. }
  136. },
  137. onLoad() {},
  138. methods: {
  139. //经期长度
  140. bindPickerChange: function (e) {
  141. console.log('picker发送选择改变,携带值为', e.detail.value)
  142. this.index = e.detail.value
  143. },
  144. //月经周期
  145. bindPickerChange2: function (e) {
  146. this.index2 = e.detail.value
  147. },
  148. toSettlement_throttle() {
  149. console.log(1)
  150. }
  151. }
  152. }
  153. </script>
  154. <style>
  155. .content {
  156. width: 100%;
  157. height: 100%;
  158. background-color: #f2f2f2;
  159. }
  160. .title {
  161. padding: 13rpx 0 0 23rpx;
  162. font-size: 32rpx;
  163. font-weight: 500;
  164. color: rgba(0, 0, 0, 1);
  165. }
  166. /* //套餐内容 */
  167. .neirong {
  168. width: 100%;
  169. height: 100%;
  170. background-color: #ffffff;
  171. }
  172. .title1 {
  173. margin: 14rpx 0 0 19rpx;
  174. }
  175. .cicle {
  176. margin: 12rpx 0 0 0;
  177. width: 10rpx;
  178. height: 10rpx;
  179. background: #cccccc;
  180. border-radius: 50%;
  181. }
  182. .title2 {
  183. display: flex;
  184. font-size: 28rpx;
  185. }
  186. .xiangnei {
  187. width: 633rpx;
  188. display: flex;
  189. /* 让子元素两端对齐,价格居左,按钮居右 */
  190. justify-content: space-between;
  191. /* 垂直方向居中(可选,根据需求调整) */
  192. margin: 0 0 0 45rpx;
  193. padding-bottom: 10rpx;
  194. font-size: 24rpx;
  195. color: rgba(102, 102, 102, 1);
  196. }
  197. /* 例假设置 */
  198. .lijia_ques {
  199. margin: 21rpx 0 0 45rpx;
  200. font-size: 28rpx;
  201. color: rgba(102, 102, 102, 1);
  202. }
  203. .custom-item {
  204. margin: 17rpx 0 0 42rpx;
  205. display: flex;
  206. align-items: center;
  207. justify-content: space-between;
  208. padding: 12rpx 16rpx;
  209. width: 671rpx;
  210. height: 83rpx;
  211. opacity: 1;
  212. border-radius: 130rpx;
  213. background: rgba(242, 242, 242, 1);
  214. }
  215. .item-label {
  216. font-size: 28rpx;
  217. color: rgba(0, 0, 0, 1);
  218. }
  219. .item-value {
  220. display: flex;
  221. font-size: 28rpx;
  222. color: rgba(0, 0, 0, 1);
  223. }
  224. .arrow-icon {
  225. width: 20px;
  226. height: 20px;
  227. }
  228. /* 配送信息 */
  229. /* 提交订单 */
  230. .goorder {
  231. width: 100%;
  232. padding: 2% 7%;
  233. position: fixed;
  234. bottom: 0;
  235. z-index: 3;
  236. }
  237. .goorder_but {
  238. width: 626rpx;
  239. height: 90rpx;
  240. opacity: 1;
  241. border-radius: 117rpx;
  242. background: rgba(241, 135, 49, 1);
  243. line-height: 90rpx;
  244. text-align: center;
  245. font-size: 32rpx;
  246. color: rgba(255, 255, 255, 1);
  247. }
  248. </style>