order.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  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', {
  202. order_id: order_id,
  203. access_token: access_token,
  204. });
  205. if(result) {
  206. this.isShowWriteOffImage = true;
  207. this.writeOffImage = result.base64;
  208. }
  209. },
  210. //删除订单
  211. async deleteOrder(index) {
  212. let [error, res] = await uni.showModal({
  213. title: '确认删除订单'
  214. });
  215. if (res.confirm) {
  216. let order_id = this.navList[this.tabCurrentIndex].orderList[index].order_id;
  217. let result = await this.$api.request('/order/delete?order_id=' + order_id)
  218. if (result) {
  219. this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
  220. }
  221. }
  222. },
  223. //取消订单
  224. async cancelOrder(item) {
  225. let that = this;
  226. let [error, res] = await uni.showModal({
  227. title: '确认取消订单',
  228. content: '取消之后不可恢复',
  229. });
  230. if (res.confirm) {
  231. let result = await that.$api.request('/order/cancel?order_id=' + item.order_id);
  232. if (result) {
  233. let {
  234. stateTip,
  235. stateTipColor
  236. } = that.orderStateExp(9);
  237. item = Object.assign(item, {
  238. state: 9,
  239. stateTip,
  240. stateTipColor
  241. });
  242. // 更新全部订单里面的状态
  243. let position = that.navList[0].orderList.findIndex(val => val.order_id === item.order_id);
  244. if (position !== -1) {
  245. that.navList[0].orderList[position] = item;
  246. }
  247. //取消订单后删除待付款中该项
  248. let list = that.navList[1].orderList;
  249. let index = list.findIndex(val => val.order_id === item.order_id);
  250. index !== -1 && list.splice(index, 1);
  251. }
  252. return true;
  253. }
  254. //this.$api.msg('取消失败');
  255. return false;
  256. },
  257. // 收货
  258. async receivedOrder(item) {
  259. let that = this;
  260. let [error, res] = await uni.showModal({
  261. title: '确认收货'
  262. });
  263. if (res.confirm == true) {
  264. let res = await that.$api.request('/order/received', 'GET', {
  265. order_id: item.order_id
  266. });
  267. if (res) {
  268. // 已确认收货
  269. let {
  270. stateTip,
  271. stateTipColor
  272. } = that.orderStateExp(4);
  273. // 更新全部订单里面的状态
  274. let position = that.navList[0].orderList.findIndex(val => val.order_id === item.order_id);
  275. if (position !== -1) {
  276. let item = that.navList[0].orderList[position];
  277. console.log(item);
  278. that.navList[0].orderList[position] = Object.assign(item, {
  279. state: 4,
  280. stateTip,
  281. stateTipColor,
  282. have_received: 1
  283. });
  284. }
  285. //收货订单后删除待收货中该项
  286. let list = that.navList[3].orderList;
  287. let index = list.findIndex(val => val.order_id === item.order_id);
  288. index !== -1 && list.splice(index, 1);
  289. }
  290. return true;
  291. }
  292. this.$api.msg('收货失败');
  293. return false;
  294. },
  295. // 订单状态文字和颜色
  296. orderStateExp(state) {
  297. let stateTip = '',
  298. stateTipColor = '#fa436a';
  299. switch (+state) {
  300. case 0:
  301. stateTip = '交易成功';
  302. break;
  303. case 1:
  304. stateTip = '待付款';
  305. break;
  306. case 2:
  307. stateTip = '待发货';
  308. break;
  309. case 3:
  310. stateTip = '待收货';
  311. break;
  312. case 4:
  313. stateTip = '待评价';
  314. break;
  315. case 5:
  316. stateTip = '售后';
  317. break;
  318. case 6:
  319. stateTip = '拒绝退款';
  320. break;
  321. case 9:
  322. stateTip = '订单已关闭';
  323. stateTipColor = '#909399';
  324. break;
  325. //更多自定义
  326. }
  327. return {
  328. stateTip,
  329. stateTipColor
  330. };
  331. },
  332. // 计算当前订单有多少个商品
  333. quantity(products) {
  334. let number = 0;
  335. for (let i in products) {
  336. number += parseInt(products[i].number);
  337. }
  338. return number;
  339. },
  340. navTo(url) {
  341. this.$api.navTo(url);
  342. },
  343. // 下面的一排按钮
  344. button(action, item) {
  345. switch (action) {
  346. case 'cancel':
  347. this.cancelOrder(item);
  348. break;
  349. case 'pay':
  350. this.navTo('/pages/money/pay?order_id=' + item.order_id + '&total=' + item.total_price);
  351. break;
  352. case 'delivery':
  353. this.navTo('/pages/order/express?expresssn=' + item.extend.express_number + '&express=' + item.extend.express_company);
  354. break;
  355. case 'recerved':
  356. this.receivedOrder(item);
  357. break;
  358. case 'evaluate':
  359. this.$api.navTo('/pages/order/evaluate?product_id='+item.id+'&order_id='+item.order_id+'&image='+item.image+'&title='+item.title+'&spec='+item.spec);
  360. break;
  361. case 'refund':
  362. this.$api.navTo('/pages/order/refund?order_id=' + item.order_id);
  363. break;
  364. }
  365. },
  366. pullDownRefresh() {
  367. this.navList = [];
  368. this.navList = [{
  369. state: 0,
  370. text: '全部',
  371. loadingType: 'more',
  372. orderList: [],
  373. page: 1
  374. },
  375. {
  376. state: 1,
  377. text: '待付款',
  378. loadingType: 'more',
  379. orderList: [],
  380. page: 1
  381. },
  382. {
  383. state: 2,
  384. text: '待发货',
  385. loadingType: 'more',
  386. orderList: [],
  387. page: 1
  388. },
  389. {
  390. state: 3,
  391. text: '待收货',
  392. loadingType: 'more',
  393. orderList: [],
  394. page: 1
  395. },
  396. {
  397. state: 4,
  398. text: '评价',
  399. loadingType: 'more',
  400. orderList: [],
  401. page: 1
  402. },
  403. {
  404. state: 5,
  405. text: '售后',
  406. loadingType: 'more',
  407. orderList: [],
  408. page: 1
  409. }
  410. ];
  411. this.loadData();
  412. },
  413. hideWriteOffImage () {
  414. this.isShowWriteOffImage = false;
  415. }
  416. },
  417. }
  418. </script>
  419. <style lang="scss">
  420. page,
  421. .content {
  422. background: $page-color-base;
  423. height: 100%;
  424. }
  425. .swiper-box {
  426. height: calc(100% - 40px);
  427. }
  428. .list-scroll-content {
  429. height: 100%;
  430. }
  431. .navbar {
  432. display: flex;
  433. height: 40px;
  434. padding: 0 5px;
  435. background: #fff;
  436. box-shadow: 0 1px 5px rgba(0, 0, 0, .06);
  437. position: relative;
  438. z-index: 10;
  439. .nav-item {
  440. flex: 1;
  441. display: flex;
  442. justify-content: center;
  443. align-items: center;
  444. height: 100%;
  445. font-size: 15px;
  446. color: $font-color-dark;
  447. position: relative;
  448. &.current {
  449. color: $base-color;
  450. &:after {
  451. content: '';
  452. position: absolute;
  453. left: 50%;
  454. bottom: 0;
  455. transform: translateX(-50%);
  456. width: 44px;
  457. height: 0;
  458. border-bottom: 2px solid $base-color;
  459. }
  460. }
  461. }
  462. }
  463. .uni-swiper-item {
  464. height: auto;
  465. }
  466. .order-item {
  467. display: flex;
  468. flex-direction: column;
  469. padding-left: 30upx;
  470. background: #fff;
  471. margin-top: 16upx;
  472. .i-top {
  473. display: flex;
  474. align-items: center;
  475. height: 80upx;
  476. padding-right: 30upx;
  477. font-size: $font-base;
  478. color: $font-color-dark;
  479. position: relative;
  480. .time {
  481. flex: 1;
  482. }
  483. .state {
  484. color: $base-color;
  485. }
  486. .del-btn {
  487. padding: 10upx 0 10upx 36upx;
  488. font-size: $font-lg;
  489. color: $font-color-light;
  490. position: relative;
  491. &:after {
  492. content: '';
  493. width: 0;
  494. height: 30upx;
  495. border-left: 1px solid $border-color-dark;
  496. position: absolute;
  497. left: 20upx;
  498. top: 50%;
  499. transform: translateY(-50%);
  500. }
  501. }
  502. }
  503. /* 多条商品 */
  504. .goods-box {
  505. height: 160upx;
  506. padding: 20upx 0;
  507. white-space: nowrap;
  508. .goods-item {
  509. width: 120upx;
  510. height: 120upx;
  511. display: inline-block;
  512. margin-right: 24upx;
  513. }
  514. .goods-img {
  515. display: block;
  516. width: 100%;
  517. height: 100%;
  518. }
  519. }
  520. /* 单条商品 */
  521. .goods-box-single {
  522. display: flex;
  523. padding: 20upx 0;
  524. .goods-img {
  525. display: block;
  526. width: 120upx;
  527. height: 120upx;
  528. }
  529. .right {
  530. flex: 1;
  531. display: flex;
  532. flex-direction: column;
  533. padding: 0 30upx 0 24upx;
  534. overflow: hidden;
  535. position: relative;
  536. .title {
  537. font-size: $font-base + 2upx;
  538. color: $font-color-dark;
  539. line-height: 1;
  540. }
  541. .attr-box {
  542. font-size: $font-sm + 2upx;
  543. color: $font-color-light;
  544. padding: 10upx 12upx;
  545. }
  546. .price {
  547. font-size: $font-base + 2upx;
  548. color: $font-color-dark;
  549. &:before {
  550. content: '¥';
  551. font-size: $font-sm;
  552. margin: 0 2upx 0 8upx;
  553. }
  554. }
  555. .action-btn{
  556. width: 160rpx;
  557. height: 60rpx;
  558. padding: 0;
  559. text-align: center;
  560. line-height: 60rpx;
  561. font-size: 26rpx;
  562. color: #303133;
  563. background: #fff;
  564. border-radius: 100px;
  565. float: right;
  566. position: absolute;
  567. right: 30rpx;
  568. bottom: 0;
  569. }
  570. .refund{
  571. position: absolute;
  572. right: 30rpx;
  573. font-size: 28rpx;
  574. color: #fa436a;
  575. top: 35rpx;
  576. }
  577. }
  578. }
  579. .price-box {
  580. display: flex;
  581. justify-content: flex-end;
  582. align-items: baseline;
  583. padding: 20upx 30upx;
  584. font-size: $font-sm + 2upx;
  585. color: $font-color-light;
  586. .num {
  587. margin: 0 8upx;
  588. color: $font-color-dark;
  589. }
  590. .price {
  591. font-size: $font-lg;
  592. color: $font-color-dark;
  593. &:before {
  594. content: '¥';
  595. font-size: $font-sm;
  596. margin: 0 2upx 0 8upx;
  597. }
  598. }
  599. }
  600. .action-box {
  601. display: flex;
  602. justify-content: flex-end;
  603. align-items: center;
  604. height: 100upx;
  605. position: relative;
  606. padding-right: 30upx;
  607. }
  608. .action-btn {
  609. width: 160upx;
  610. height: 60upx;
  611. margin: 0;
  612. margin-left: 24upx;
  613. padding: 0;
  614. text-align: center;
  615. line-height: 60upx;
  616. font-size: $font-sm + 2upx;
  617. color: $font-color-dark;
  618. background: #fff;
  619. border-radius: 100px;
  620. &:after {
  621. border-radius: 100px;
  622. }
  623. &.recom {
  624. background: #fff9f9;
  625. color: $base-color;
  626. &:after {
  627. border-color: #f7bcc8;
  628. }
  629. }
  630. }
  631. }
  632. /* load-more */
  633. .uni-load-more {
  634. display: flex;
  635. flex-direction: row;
  636. height: 80upx;
  637. align-items: center;
  638. justify-content: center
  639. }
  640. .uni-load-more__text {
  641. font-size: 28upx;
  642. color: #999
  643. }
  644. .uni-load-more__img {
  645. height: 24px;
  646. width: 24px;
  647. margin-right: 10px
  648. }
  649. .uni-load-more__img>view {
  650. position: absolute
  651. }
  652. .uni-load-more__img>view view {
  653. width: 6px;
  654. height: 2px;
  655. border-top-left-radius: 1px;
  656. border-bottom-left-radius: 1px;
  657. background: #999;
  658. position: absolute;
  659. opacity: .2;
  660. transform-origin: 50%;
  661. animation: load 1.56s ease infinite
  662. }
  663. .uni-load-more__img>view view:nth-child(1) {
  664. transform: rotate(90deg);
  665. top: 2px;
  666. left: 9px
  667. }
  668. .uni-load-more__img>view view:nth-child(2) {
  669. transform: rotate(180deg);
  670. top: 11px;
  671. right: 0
  672. }
  673. .uni-load-more__img>view view:nth-child(3) {
  674. transform: rotate(270deg);
  675. bottom: 2px;
  676. left: 9px
  677. }
  678. .uni-load-more__img>view view:nth-child(4) {
  679. top: 11px;
  680. left: 0
  681. }
  682. .load1,
  683. .load2,
  684. .load3 {
  685. height: 24px;
  686. width: 24px
  687. }
  688. .load2 {
  689. transform: rotate(30deg)
  690. }
  691. .load3 {
  692. transform: rotate(60deg)
  693. }
  694. .load1 view:nth-child(1) {
  695. animation-delay: 0s
  696. }
  697. .load2 view:nth-child(1) {
  698. animation-delay: .13s
  699. }
  700. .load3 view:nth-child(1) {
  701. animation-delay: .26s
  702. }
  703. .load1 view:nth-child(2) {
  704. animation-delay: .39s
  705. }
  706. .load2 view:nth-child(2) {
  707. animation-delay: .52s
  708. }
  709. .load3 view:nth-child(2) {
  710. animation-delay: .65s
  711. }
  712. .load1 view:nth-child(3) {
  713. animation-delay: .78s
  714. }
  715. .load2 view:nth-child(3) {
  716. animation-delay: .91s
  717. }
  718. .load3 view:nth-child(3) {
  719. animation-delay: 1.04s
  720. }
  721. .load1 view:nth-child(4) {
  722. animation-delay: 1.17s
  723. }
  724. .load2 view:nth-child(4) {
  725. animation-delay: 1.3s
  726. }
  727. .load3 view:nth-child(4) {
  728. animation-delay: 1.43s
  729. }
  730. @-webkit-keyframes load {
  731. 0% {
  732. opacity: 1
  733. }
  734. 100% {
  735. opacity: .2
  736. }
  737. }
  738. .write_off_image_panel {
  739. position: fixed;
  740. left: 0px;
  741. top: 0px;
  742. width: 100%;
  743. height: 100%;
  744. background: #00000080;
  745. image {
  746. width: 16em;
  747. height: 16em;
  748. position: absolute;
  749. left: 50%;
  750. top: 50%;
  751. margin-left: -8em;
  752. margin-top: -10em;
  753. border-radius: 8px;
  754. }
  755. button {
  756. position: absolute;
  757. left: 50%;
  758. top: 50%;
  759. margin-left: -8em;
  760. margin-top: 8em;
  761. width: 16em;
  762. height: 3em;
  763. line-height: 3em;
  764. background: #fffff;
  765. text-align: center;
  766. display: block;
  767. }
  768. }
  769. </style>