orderX.vue 6.0 KB

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