index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <view>
  3. <!-- 非H5撑高元素 -->
  4. <view class="status_bar"></view>
  5. <view class="box">
  6. <view class="box-top">
  7. <view class="box-top-action">
  8. <view class="box-top-action-item">
  9. <view class="flex box-top-action-item-cir">
  10. <u-icon name="scan" color="#fff" size="45"></u-icon>
  11. </view>
  12. <view class="box-top-action-item-txt">扫一扫</view>
  13. </view>
  14. <view class="box-top-action-item">
  15. <view class="flex box-top-action-item-cir">
  16. <u-icon name="gift" color="#fff" size="45"></u-icon>
  17. </view>
  18. <view class="box-top-action-item-txt">奖品库</view>
  19. </view>
  20. </view>
  21. <view class="box-top-tip">
  22. <view class="flex box-top-tip-txt">
  23. <u-icon name="file-text" color="#fff" size="20"></u-icon>
  24. <text>规则说明</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="box-ticket">
  29. <carousel :img-list="imgList" url-key="url" @selected="selectedBanner" />
  30. </view>
  31. <view class="box-ticket-tip">100%保底必中</view>
  32. <view class="box-start flex">
  33. <view class="flex box-start-action" @click="exchange">
  34. <text>立即</text>
  35. <text>开刮</text>
  36. </view>
  37. <view class="box-start-all">所有盲票</view>
  38. </view>
  39. </view>
  40. <custom-tab-bar :activeValue="'index'" />
  41. <u-popup :show="payShow" mode="bottom" @close="close" :closeable="true">
  42. <view class="choiceShow-wrap">
  43. <view class="flex goods">
  44. <view class="flex image-wrap">
  45. <image src="../../static/logo.png" mode="aspectFill"></image>
  46. </view>
  47. <view class="info">
  48. <view class="info-title">Apple iPhone 13 (A2634) 128GB 星光色 支持移动联通电信5G 双卡双待手机</view>
  49. <view class="info-stock">¥10.00</view>
  50. </view>
  51. </view>
  52. <view class="flex coupon" @click="toCoupon">
  53. <view class="flex coupon-left">
  54. <u-icon name="coupon" size="26" color="#333"></u-icon>
  55. <view class="txt">代金券</view>
  56. </view>
  57. <view class="flex coupon-right">
  58. <view class="txt">选择代金券</view>
  59. <u-icon name="arrow-right" size="16" color="#333"></u-icon>
  60. </view>
  61. </view>
  62. <view class="flex agreement">
  63. <view class="txt">同意<text>《盲票购买须知》</text></view>
  64. <view class="checked">
  65. <u-checkbox-group>
  66. <u-checkbox :value="checked" :checked="checked" shape="circle" activeColor="#E96737"
  67. @change="changeChecked"></u-checkbox>
  68. </u-checkbox-group>
  69. </view>
  70. </view>
  71. <view class="flex btn">
  72. <view class="flex btn-left">
  73. <view class="title">应付:</view>
  74. <view class="flex coin">¥10.00</view>
  75. </view>
  76. <view class="btn-right">
  77. <view class="confirm">立即支付</view>
  78. </view>
  79. </view>
  80. </view>
  81. </u-popup>
  82. </view>
  83. </template>
  84. <script>
  85. import env from '../../config/env.js'
  86. import $http from '@/utils/request.js'
  87. import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
  88. import carousel from '@/components/vear-carousel/vear-carousel'
  89. export default {
  90. components: {
  91. CustomTabBar,
  92. carousel
  93. },
  94. data() {
  95. return {
  96. imgList: [{
  97. url: 'https://z3.ax1x.com/2021/03/05/6ehghR.jpg',
  98. id: 1
  99. }, {
  100. url: 'https://z3.ax1x.com/2021/03/05/6ehnfI.jpg',
  101. id: 2
  102. }, {
  103. url: 'https://z3.ax1x.com/2021/03/05/6ehfc6.jpg',
  104. id: 3
  105. }, {
  106. url: 'https://z3.ax1x.com/2021/03/05/6efCqg.jpg',
  107. id: 4
  108. }, ],
  109. id: '',
  110. value: 1,
  111. payShow: false,
  112. checked: false
  113. };
  114. },
  115. onLoad(opthios) {
  116. this.id = opthios.id
  117. },
  118. methods: {
  119. selectedBanner(item, index) {
  120. console.log('馃', item, index)
  121. },
  122. close() {
  123. this.payShow = false
  124. },
  125. exchange() {
  126. this.payShow = true
  127. },
  128. changeChecked(e) {
  129. console.log(e);
  130. },
  131. toCoupon() {
  132. uni.navigateTo({
  133. url: '/pages/coupon/index'
  134. })
  135. }
  136. }
  137. }
  138. </script>
  139. <style lang="scss" scoped>
  140. .status_bar {
  141. width: 100%;
  142. height: var(--status-bar-height);
  143. }
  144. /deep/ .u-tabbar__placeholder {
  145. display: none;
  146. }
  147. </style>
  148. <style lang="scss" scoped>
  149. .box {
  150. width: 100%;
  151. height: calc(100vh - 50px);
  152. background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2F50%2Fv2-a6f5c8b5b66fe87e4e79c1fc82a61a36_hd.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649658373&t=f216ee4825d5b36e62aa3a490516bfb1) center center;
  153. &-top {
  154. display: flex;
  155. justify-content: space-between;
  156. padding: 80rpx 40rpx 0;
  157. &-action {
  158. display: flex;
  159. &-item {
  160. margin-right: 76rpx;
  161. &-cir {
  162. width: 104rpx;
  163. height: 104rpx;
  164. background-color: #FCB824;
  165. border-radius: 50%;
  166. margin-bottom: 14rpx;
  167. }
  168. &-txt {
  169. text-align: center;
  170. color: #FFFFFF;
  171. }
  172. }
  173. }
  174. &-tip {
  175. display: flex;
  176. flex-direction: column;
  177. align-items: flex-end;
  178. justify-content: flex-end;
  179. color: #FFFFFF;
  180. }
  181. }
  182. &-ticket {
  183. margin: 200rpx 0 0;
  184. height: 480rpx;
  185. }
  186. &-ticket-tip {
  187. margin-top: 20rpx;
  188. line-height: 40rpx;
  189. text-align: center;
  190. font-size: 24rpx;
  191. color: #F44200;
  192. }
  193. &-start {
  194. position: relative;
  195. margin-top: 60rpx;
  196. &-action {
  197. flex-direction: column;
  198. width: 226rpx;
  199. height: 226rpx;
  200. border-radius: 50%;
  201. background-color: #EB7009;
  202. box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
  203. text {
  204. display: inline-block;
  205. color: #FFFFFF;
  206. line-height: 50rpx;
  207. }
  208. }
  209. &-all {
  210. position: absolute;
  211. right: 50rpx;
  212. text-align: center;
  213. width: 156rpx;
  214. height: 156rpx;
  215. line-height: 156rpx;
  216. border-radius: 50%;
  217. background-color: #FFFFFF;
  218. }
  219. }
  220. }
  221. .choiceShow-wrap {
  222. min-height: 400rpx;
  223. padding: 80rpx 0 60rpx;
  224. .goods {
  225. padding: 0 20rpx;
  226. justify-content: space-between;
  227. margin-bottom: 20rpx;
  228. .image-wrap {
  229. width: 220rpx;
  230. height: 220rpx;
  231. border: 1px solid rgba(236, 236, 236, 100);
  232. border-radius: 10rpx;
  233. image {
  234. width: 174rpx;
  235. height: 174rpx;
  236. }
  237. }
  238. .info {
  239. flex: 1;
  240. display: flex;
  241. height: 220rpx;
  242. flex-direction: column;
  243. justify-content: space-between;
  244. padding-left: 26rpx;
  245. &-title {
  246. font-size: 32rpx;
  247. line-height: 44rpx;
  248. font-weight: bold;
  249. }
  250. &-coin {
  251. display: flex;
  252. align-items: center;
  253. font-size: 32rpx;
  254. line-height: 44rpx;
  255. color: rgba(235, 112, 9, 100);
  256. font-weight: bold;
  257. image {
  258. width: 42rpx;
  259. height: 42rpx;
  260. margin-right: 20rpx;
  261. }
  262. }
  263. &-stock {
  264. line-height: 44rpx;
  265. }
  266. }
  267. }
  268. .coupon {
  269. justify-content: space-between;
  270. padding: 30rpx 40rpx;
  271. border-top: 1px solid rgba(187, 187, 187, 100);
  272. border-bottom: 1px solid rgba(187, 187, 187, 100);
  273. .txt {
  274. margin: 0 24rpx;
  275. }
  276. }
  277. .agreement {
  278. justify-content: space-between;
  279. padding: 50rpx 40rpx;
  280. border-bottom: 1px solid rgba(187, 187, 187, 100);
  281. .txt text {
  282. color: #007aff;
  283. }
  284. }
  285. .btn {
  286. justify-content: space-between;
  287. padding: 20rpx 20rpx;
  288. &-left {
  289. .coin {
  290. display: flex;
  291. align-items: center;
  292. font-size: 32rpx;
  293. line-height: 44rpx;
  294. color: rgba(235, 112, 9, 100);
  295. margin-left: 20rpx;
  296. }
  297. }
  298. &-right {
  299. .confirm {
  300. width: 250rpx;
  301. height: 60rpx;
  302. line-height: 60rpx;
  303. border-radius: 8px;
  304. background-color: rgba(235, 112, 9, 100);
  305. color: rgba(255, 255, 255, 100);
  306. font-size: 28rpx;
  307. text-align: center;
  308. }
  309. }
  310. }
  311. }
  312. </style>