order.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  1. <template>
  2. <view class="content">
  3. <view class="navbar">
  4. <view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{current: tabCurrentIndex === index}"
  5. @click="tabClick(index)">
  6. {{item.text}}
  7. </view>
  8. </view>
  9. <swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
  10. <swiper-item class="tab-content" v-for="(tabItem,tabIndex) in navList" :key="tabIndex">
  11. <scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
  12. <!-- 空白页 -->
  13. <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
  14. <!-- 订单列表 -->
  15. <view v-for="(item,index) in tabItem.orderList" :key="index" class="order-item" @click="navTo('/pages/order/orderDetail?order_id='+item.order_id)">
  16. <view class="i-top b-b">
  17. <text class="time">{{item.createtime}}</text>
  18. <text class="state" :style="{color: item.stateTipColor}">{{item.stateTip + (item.refund_status_text ? ':'+item.refund_status_text : '')}} </text>
  19. <text v-if="item.state===9" class="del-btn yticon icon-lajitong" @click.stop="deleteOrder(index)"></text>
  20. </view>
  21. <view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.products"
  22. :key="goodsIndex">
  23. <image class="goods-img" :src="goodsItem.image" mode="aspectFill"></image>
  24. <view class="right">
  25. <text class="refund" v-if="goodsItem.refund">退款成功</text>
  26. <text class="title clamp">{{goodsItem.title}}</text>
  27. <text class="attr-box">{{goodsItem.spec}} x {{goodsItem.number}}</text>
  28. <text class="price">{{goodsItem.price}}</text>
  29. <button class="action-btn" v-if="item.have_received != 0 && goodsItem.evaluate == false && goodsItem.refund==false" @click.stop="button('evaluate', {order_id:item.order_id,id:goodsItem.id,image:goodsItem.image,title:goodsItem.title,spec:goodsItem.spec})">评价</button>
  30. </view>
  31. </view>
  32. <view class="price-box">
  33. <text class="num">{{quantity(item.products)}}</text>
  34. 件商品 合计
  35. <text class="price">{{item.total_price}}</text>
  36. <text v-if="item.discount_price > 0">(已优惠¥{{item.discount_price}})</text>
  37. <text v-if="item.delivery_price > 0">(含运费¥{{item.delivery_price}})</text>
  38. </view>
  39. <view class="action-box b-t" v-if="item.state != 9">
  40. <button class="action-btn" v-if="item.state == 1" @click.stop="button('cancel',item)">取消订单</button>
  41. <button class="action-btn recom" v-if="item.have_paid == 0" @click.stop="button('pay',item)">立即支付</button>
  42. <!-- <button class="action-btn" v-if="item.have_paid != 0 && item.have_delivered == 0">提醒发货</button> -->
  43. <button class="action-btn" v-if="item.have_paid != 0 && item.extend.express_number != ''" @click.stop="button('delivery',item)">查看物流</button>
  44. <button class="action-btn" @click.stop="writeOff(item)" v-if="item.status == 2 && item.have_paid != 0 && item.have_received == 0">核销</button>
  45. <button class="action-btn" v-if="item.status == 1 && item.have_paid != 0 && item.have_received == 0" @click.stop="button('recerved',item)">确认收货</button>
  46. <!-- <button class="action-btn" v-if="item.have_received != 0 && item.have_commented != 0">追加评价</button> -->
  47. <!--<button class="action-btn" v-if="item.have_paid != 0" @click.stop="button('refund', item)">申请售后</button>-->
  48. </view>
  49. <view class="action-box b-t" v-if="item.state == 9 && item.status == -1">
  50. <button class="action-btn" v-if="item.have_paid != 0" @click.stop="button('refund', item)">查看售后</button>
  51. </view>
  52. </view>
  53. <uni-load-more :status="tabItem.loadingType"></uni-load-more>
  54. </scroll-view>
  55. </swiper-item>
  56. </swiper>
  57. <view class="write_off_image_panel" v-if="isShowWriteOffImage" @click="hideWriteOffImage">
  58. <image :src="writeOffImage"></image>
  59. <button>关闭</button>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  65. import empty from "@/components/empty";
  66. export default {
  67. components: {
  68. uniLoadMore,
  69. empty
  70. },
  71. data() {
  72. return {
  73. tabCurrentIndex: 0,
  74. isShowWriteOffImage: false,
  75. writeOffImage: '',
  76. navList: [{
  77. state: 0,
  78. text: '全部',
  79. loadingType: 'more',
  80. orderList: [],
  81. page: 1
  82. },
  83. {
  84. state: 1,
  85. text: '待付款',
  86. loadingType: 'more',
  87. orderList: [],
  88. page: 1
  89. },
  90. {
  91. state: 2,
  92. text: '待发货',
  93. loadingType: 'more',
  94. orderList: [],
  95. page: 1
  96. },
  97. {
  98. state: 3,
  99. text: '待收货',
  100. loadingType: 'more',
  101. orderList: [],
  102. page: 1
  103. },
  104. {
  105. state: 4,
  106. text: '评价',
  107. loadingType: 'more',
  108. orderList: [],
  109. page: 1
  110. },
  111. /*
  112. {
  113. state: 5,
  114. text: '售后',
  115. loadingType: 'more',
  116. orderList: [],
  117. page: 1
  118. }
  119. */
  120. ],
  121. pageSize: 10
  122. };
  123. },
  124. onLoad(options) {
  125. /**
  126. * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
  127. * 替换onLoad下代码即可
  128. */
  129. this.tabCurrentIndex = +options.state;
  130. // #ifndef MP
  131. this.loadData()
  132. // #endif
  133. // #ifdef MP
  134. if (options.state == 0) {
  135. this.loadData()
  136. }
  137. // #endif
  138. },
  139. onPullDownRefresh() {
  140. this.pullDownRefresh()
  141. },
  142. methods: {
  143. //获取订单列表
  144. async loadData(source) {
  145. //这里是将订单挂载到tab列表下
  146. let index = this.tabCurrentIndex;
  147. let navItem = this.navList[index];
  148. let state = navItem.state;
  149. if (source === 'tabChange' && navItem.loaded === true) {
  150. //tab切换只有第一次需要加载数据
  151. return;
  152. }
  153. if (navItem.loadingType === 'loading') {
  154. //防止重复加载
  155. return;
  156. }
  157. if (navItem.loadingType == 'noMore') {
  158. //没有更多数据
  159. return;
  160. }
  161. navItem.loadingType = 'loading';
  162. let result = await this.$api.request('/order/getOrders', 'GET', {
  163. type:0,
  164. state: state,
  165. page: navItem.page,
  166. pagesize: this.pageSize
  167. });
  168. uni.stopPullDownRefresh();
  169. if (!result) {
  170. navItem.loadingType = 'more';
  171. } else {
  172. //console.log(result)
  173. if (result.length >= this.pageSize) {
  174. //判断是否还有数据, 有改为 more, 没有改为noMore
  175. navItem.loadingType = 'more';
  176. } else {
  177. navItem.loadingType = 'noMore';
  178. }
  179. // 页数加一
  180. navItem.page++;
  181. result.forEach(item => {
  182. item = Object.assign(item, this.orderStateExp(item.state));
  183. navItem.orderList.push(item);
  184. });
  185. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  186. this.$set(navItem, 'loaded', true);
  187. }
  188. },
  189. //swiper 切换
  190. changeTab(e) {
  191. this.tabCurrentIndex = e.target.current;
  192. this.loadData('tabChange');
  193. },
  194. //顶部tab点击
  195. tabClick(index) {
  196. this.tabCurrentIndex = index;
  197. },
  198. async writeOff(item){
  199. const order_id = item.order_id;
  200. let access_token = uni.getStorageSync('access_token');
  201. let result = await this.$api.request('/order/writeOff', 'POST', {order_id: order_id, access_token: access_token})
  202. if(result) {
  203. this.isShowWriteOffImage = true;
  204. this.writeOffImage = result.base64;
  205. }
  206. },
  207. //删除订单
  208. async deleteOrder(index) {
  209. let [error, res] = await uni.showModal({
  210. title: '确认删除订单'
  211. });
  212. if (res.confirm) {
  213. let order_id = this.navList[this.tabCurrentIndex].orderList[index].order_id;
  214. let result = await this.$api.request('/order/delete?order_id=' + order_id)
  215. if (result) {
  216. this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
  217. }
  218. }
  219. },
  220. //取消订单
  221. async cancelOrder(item) {
  222. let that = this;
  223. let [error, res] = await uni.showModal({
  224. title: '确认取消订单',
  225. content: '取消之后不可恢复',
  226. });
  227. if (res.confirm) {
  228. let result = await that.$api.request('/order/cancel?order_id=' + item.order_id);
  229. if (result) {
  230. let {
  231. stateTip,
  232. stateTipColor
  233. } = that.orderStateExp(9);
  234. item = Object.assign(item, {
  235. state: 9,
  236. stateTip,
  237. stateTipColor
  238. });
  239. // 更新全部订单里面的状态
  240. let position = that.navList[0].orderList.findIndex(val => val.order_id === item.order_id);
  241. if (position !== -1) {
  242. that.navList[0].orderList[position] = item;
  243. }
  244. //取消订单后删除待付款中该项
  245. let list = that.navList[1].orderList;
  246. let index = list.findIndex(val => val.order_id === item.order_id);
  247. index !== -1 && list.splice(index, 1);
  248. }
  249. return true;
  250. }
  251. //this.$api.msg('取消失败');
  252. return false;
  253. },
  254. // 收货
  255. async receivedOrder(item) {
  256. let that = this;
  257. let [error, res] = await uni.showModal({
  258. title: '确认收货'
  259. });
  260. if (res.confirm == true) {
  261. let res = await that.$api.request('/order/received', 'GET', {
  262. order_id: item.order_id
  263. });
  264. if (res) {
  265. // 已确认收货
  266. let {
  267. stateTip,
  268. stateTipColor
  269. } = that.orderStateExp(4);
  270. // 更新全部订单里面的状态
  271. let position = that.navList[0].orderList.findIndex(val => val.order_id === item.order_id);
  272. if (position !== -1) {
  273. let item = that.navList[0].orderList[position];
  274. console.log(item);
  275. that.navList[0].orderList[position] = Object.assign(item, {
  276. state: 4,
  277. stateTip,
  278. stateTipColor,
  279. have_received: 1
  280. });
  281. }
  282. //收货订单后删除待收货中该项
  283. let list = that.navList[3].orderList;
  284. let index = list.findIndex(val => val.order_id === item.order_id);
  285. index !== -1 && list.splice(index, 1);
  286. }
  287. return true;
  288. }
  289. this.$api.msg('收货失败');
  290. return false;
  291. },
  292. // 订单状态文字和颜色
  293. orderStateExp(state) {
  294. let stateTip = '',
  295. stateTipColor = '#fa436a';
  296. switch (+state) {
  297. case 0:
  298. stateTip = '交易成功';
  299. break;
  300. case 1:
  301. stateTip = '待付款';
  302. break;
  303. case 2:
  304. stateTip = '待发货';
  305. break;
  306. case 3:
  307. stateTip = '待收货';
  308. break;
  309. case 4:
  310. stateTip = '待评价';
  311. break;
  312. case 5:
  313. stateTip = '售后';
  314. break;
  315. case 6:
  316. stateTip = '拒绝退款';
  317. break;
  318. case 9:
  319. stateTip = '订单已关闭';
  320. stateTipColor = '#909399';
  321. break;
  322. //更多自定义
  323. }
  324. return {
  325. stateTip,
  326. stateTipColor
  327. };
  328. },
  329. // 计算当前订单有多少个商品
  330. quantity(products) {
  331. let number = 0;
  332. for (let i in products) {
  333. number += parseInt(products[i].number);
  334. }
  335. return number;
  336. },
  337. navTo(url) {
  338. this.$api.navTo(url);
  339. },
  340. // 下面的一排按钮
  341. button(action, item) {
  342. switch (action) {
  343. case 'cancel':
  344. this.cancelOrder(item);
  345. break;
  346. case 'pay':
  347. this.navTo('/pages/money/pay?order_id=' + item.order_id + '&total=' + item.total_price);
  348. break;
  349. case 'delivery':
  350. this.navTo('/pages/order/express?expresssn=' + item.extend.express_number + '&express=' + item.extend.express_company);
  351. break;
  352. case 'recerved':
  353. this.receivedOrder(item);
  354. break;
  355. case 'evaluate':
  356. this.$api.navTo('/pages/order/evaluate?product_id='+item.id+'&order_id='+item.order_id+'&image='+item.image+'&title='+item.title+'&spec='+item.spec);
  357. break;
  358. case 'refund':
  359. this.$api.navTo('/pages/order/refund?order_id=' + item.order_id);
  360. break;
  361. }
  362. },
  363. pullDownRefresh() {
  364. this.navList = [];
  365. this.navList = [{
  366. state: 0,
  367. text: '全部',
  368. loadingType: 'more',
  369. orderList: [],
  370. page: 1
  371. },
  372. {
  373. state: 1,
  374. text: '待付款',
  375. loadingType: 'more',
  376. orderList: [],
  377. page: 1
  378. },
  379. {
  380. state: 2,
  381. text: '待发货',
  382. loadingType: 'more',
  383. orderList: [],
  384. page: 1
  385. },
  386. {
  387. state: 3,
  388. text: '待收货',
  389. loadingType: 'more',
  390. orderList: [],
  391. page: 1
  392. },
  393. {
  394. state: 4,
  395. text: '评价',
  396. loadingType: 'more',
  397. orderList: [],
  398. page: 1
  399. },
  400. {
  401. state: 5,
  402. text: '售后',
  403. loadingType: 'more',
  404. orderList: [],
  405. page: 1
  406. }
  407. ];
  408. this.loadData();
  409. },
  410. hideWriteOffImage () {
  411. this.isShowWriteOffImage = false;
  412. }
  413. },
  414. }
  415. </script>
  416. <style lang="scss">
  417. page,
  418. .content {
  419. background: $page-color-base;
  420. height: 100%;
  421. }
  422. .swiper-box {
  423. height: calc(100% - 40px);
  424. }
  425. .list-scroll-content {
  426. height: 100%;
  427. }
  428. .navbar {
  429. display: flex;
  430. height: 40px;
  431. padding: 0 5px;
  432. background: #fff;
  433. box-shadow: 0 1px 5px rgba(0, 0, 0, .06);
  434. position: relative;
  435. z-index: 10;
  436. .nav-item {
  437. flex: 1;
  438. display: flex;
  439. justify-content: center;
  440. align-items: center;
  441. height: 100%;
  442. font-size: 15px;
  443. color: $font-color-dark;
  444. position: relative;
  445. &.current {
  446. color: $base-color;
  447. &:after {
  448. content: '';
  449. position: absolute;
  450. left: 50%;
  451. bottom: 0;
  452. transform: translateX(-50%);
  453. width: 44px;
  454. height: 0;
  455. border-bottom: 2px solid $base-color;
  456. }
  457. }
  458. }
  459. }
  460. .uni-swiper-item {
  461. height: auto;
  462. }
  463. .order-item {
  464. display: flex;
  465. flex-direction: column;
  466. padding-left: 30upx;
  467. background: #fff;
  468. margin-top: 16upx;
  469. .i-top {
  470. display: flex;
  471. align-items: center;
  472. height: 80upx;
  473. padding-right: 30upx;
  474. font-size: $font-base;
  475. color: $font-color-dark;
  476. position: relative;
  477. .time {
  478. flex: 1;
  479. }
  480. .state {
  481. color: $base-color;
  482. }
  483. .del-btn {
  484. padding: 10upx 0 10upx 36upx;
  485. font-size: $font-lg;
  486. color: $font-color-light;
  487. position: relative;
  488. &:after {
  489. content: '';
  490. width: 0;
  491. height: 30upx;
  492. border-left: 1px solid $border-color-dark;
  493. position: absolute;
  494. left: 20upx;
  495. top: 50%;
  496. transform: translateY(-50%);
  497. }
  498. }
  499. }
  500. /* 多条商品 */
  501. .goods-box {
  502. height: 160upx;
  503. padding: 20upx 0;
  504. white-space: nowrap;
  505. .goods-item {
  506. width: 120upx;
  507. height: 120upx;
  508. display: inline-block;
  509. margin-right: 24upx;
  510. }
  511. .goods-img {
  512. display: block;
  513. width: 100%;
  514. height: 100%;
  515. }
  516. }
  517. /* 单条商品 */
  518. .goods-box-single {
  519. display: flex;
  520. padding: 20upx 0;
  521. .goods-img {
  522. display: block;
  523. width: 120upx;
  524. height: 120upx;
  525. }
  526. .right {
  527. flex: 1;
  528. display: flex;
  529. flex-direction: column;
  530. padding: 0 30upx 0 24upx;
  531. overflow: hidden;
  532. position: relative;
  533. .title {
  534. font-size: $font-base + 2upx;
  535. color: $font-color-dark;
  536. line-height: 1;
  537. }
  538. .attr-box {
  539. font-size: $font-sm + 2upx;
  540. color: $font-color-light;
  541. padding: 10upx 12upx;
  542. }
  543. .price {
  544. font-size: $font-base + 2upx;
  545. color: $font-color-dark;
  546. &:before {
  547. content: '¥';
  548. font-size: $font-sm;
  549. margin: 0 2upx 0 8upx;
  550. }
  551. }
  552. .action-btn{
  553. width: 160rpx;
  554. height: 60rpx;
  555. padding: 0;
  556. text-align: center;
  557. line-height: 60rpx;
  558. font-size: 26rpx;
  559. color: #303133;
  560. background: #fff;
  561. border-radius: 100px;
  562. float: right;
  563. position: absolute;
  564. right: 30rpx;
  565. bottom: 0;
  566. }
  567. .refund{
  568. position: absolute;
  569. right: 30rpx;
  570. font-size: 28rpx;
  571. color: #fa436a;
  572. top: 35rpx;
  573. }
  574. }
  575. }
  576. .price-box {
  577. display: flex;
  578. justify-content: flex-end;
  579. align-items: baseline;
  580. padding: 20upx 30upx;
  581. font-size: $font-sm + 2upx;
  582. color: $font-color-light;
  583. .num {
  584. margin: 0 8upx;
  585. color: $font-color-dark;
  586. }
  587. .price {
  588. font-size: $font-lg;
  589. color: $font-color-dark;
  590. &:before {
  591. content: '¥';
  592. font-size: $font-sm;
  593. margin: 0 2upx 0 8upx;
  594. }
  595. }
  596. }
  597. .action-box {
  598. display: flex;
  599. justify-content: flex-end;
  600. align-items: center;
  601. height: 100upx;
  602. position: relative;
  603. padding-right: 30upx;
  604. }
  605. .action-btn {
  606. width: 160upx;
  607. height: 60upx;
  608. margin: 0;
  609. margin-left: 24upx;
  610. padding: 0;
  611. text-align: center;
  612. line-height: 60upx;
  613. font-size: $font-sm + 2upx;
  614. color: $font-color-dark;
  615. background: #fff;
  616. border-radius: 100px;
  617. &:after {
  618. border-radius: 100px;
  619. }
  620. &.recom {
  621. background: #fff9f9;
  622. color: $base-color;
  623. &:after {
  624. border-color: #f7bcc8;
  625. }
  626. }
  627. }
  628. }
  629. /* load-more */
  630. .uni-load-more {
  631. display: flex;
  632. flex-direction: row;
  633. height: 80upx;
  634. align-items: center;
  635. justify-content: center
  636. }
  637. .uni-load-more__text {
  638. font-size: 28upx;
  639. color: #999
  640. }
  641. .uni-load-more__img {
  642. height: 24px;
  643. width: 24px;
  644. margin-right: 10px
  645. }
  646. .uni-load-more__img>view {
  647. position: absolute
  648. }
  649. .uni-load-more__img>view view {
  650. width: 6px;
  651. height: 2px;
  652. border-top-left-radius: 1px;
  653. border-bottom-left-radius: 1px;
  654. background: #999;
  655. position: absolute;
  656. opacity: .2;
  657. transform-origin: 50%;
  658. animation: load 1.56s ease infinite
  659. }
  660. .uni-load-more__img>view view:nth-child(1) {
  661. transform: rotate(90deg);
  662. top: 2px;
  663. left: 9px
  664. }
  665. .uni-load-more__img>view view:nth-child(2) {
  666. transform: rotate(180deg);
  667. top: 11px;
  668. right: 0
  669. }
  670. .uni-load-more__img>view view:nth-child(3) {
  671. transform: rotate(270deg);
  672. bottom: 2px;
  673. left: 9px
  674. }
  675. .uni-load-more__img>view view:nth-child(4) {
  676. top: 11px;
  677. left: 0
  678. }
  679. .load1,
  680. .load2,
  681. .load3 {
  682. height: 24px;
  683. width: 24px
  684. }
  685. .load2 {
  686. transform: rotate(30deg)
  687. }
  688. .load3 {
  689. transform: rotate(60deg)
  690. }
  691. .load1 view:nth-child(1) {
  692. animation-delay: 0s
  693. }
  694. .load2 view:nth-child(1) {
  695. animation-delay: .13s
  696. }
  697. .load3 view:nth-child(1) {
  698. animation-delay: .26s
  699. }
  700. .load1 view:nth-child(2) {
  701. animation-delay: .39s
  702. }
  703. .load2 view:nth-child(2) {
  704. animation-delay: .52s
  705. }
  706. .load3 view:nth-child(2) {
  707. animation-delay: .65s
  708. }
  709. .load1 view:nth-child(3) {
  710. animation-delay: .78s
  711. }
  712. .load2 view:nth-child(3) {
  713. animation-delay: .91s
  714. }
  715. .load3 view:nth-child(3) {
  716. animation-delay: 1.04s
  717. }
  718. .load1 view:nth-child(4) {
  719. animation-delay: 1.17s
  720. }
  721. .load2 view:nth-child(4) {
  722. animation-delay: 1.3s
  723. }
  724. .load3 view:nth-child(4) {
  725. animation-delay: 1.43s
  726. }
  727. @-webkit-keyframes load {
  728. 0% {
  729. opacity: 1
  730. }
  731. 100% {
  732. opacity: .2
  733. }
  734. }
  735. .write_off_image_panel {
  736. position: fixed;
  737. left: 0px;
  738. top: 0px;
  739. width: 100%;
  740. height: 100%;
  741. background: #00000080;
  742. image {
  743. width: 16em;
  744. height: 16em;
  745. position: absolute;
  746. left: 50%;
  747. top: 50%;
  748. margin-left: -8em;
  749. margin-top: -10em;
  750. border-radius: 8px;
  751. }
  752. button {
  753. position: absolute;
  754. left: 50%;
  755. top: 50%;
  756. margin-left: -8em;
  757. margin-top: 8em;
  758. width: 16em;
  759. height: 3em;
  760. line-height: 3em;
  761. background: #fffff;
  762. text-align: center;
  763. display: block;
  764. }
  765. }
  766. </style>