success.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <div class="point-success">
  3. <div class="background">
  4. <span class="icon"></span>
  5. <span class="text">兑换成功</span>
  6. </div>
  7. <div class="container">
  8. <div class="menu">
  9. <nuxt-link class="text1" to="/point" tag="span">回到首页</nuxt-link>
  10. <nuxt-link class="text2" to="/point/list" tag="span"
  11. >查看订单</nuxt-link
  12. >
  13. </div>
  14. <div class="show">
  15. <product-list />
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import ProductList from "../../components/ProductList";
  22. import { mapState, mapActions } from "vuex";
  23. import wx from "weixin-js-sdk";
  24. export default {
  25. head() {
  26. return {
  27. title: "支付成功",
  28. };
  29. },
  30. data() {
  31. return {};
  32. },
  33. components: {
  34. ProductList,
  35. },
  36. mounted() {
  37. this.getSdkConfig(["openLocation", "getNetworkType"]).then((res) => {
  38. console.log("测试一下微信jdk");
  39. // wx.config(res);
  40. // wx.ready(function () {
  41. // console.log("成功了");
  42. // wx.getNetworkType({
  43. // success: function (res) {
  44. // var networkType = res.networkType; // 返回网络类型2g,3g,4g,wifi
  45. // console.log(networkType);
  46. // },
  47. // });
  48. // wx.openLocation({
  49. // latitude: 0, // 纬度,浮点数,范围为90 ~ -90
  50. // longitude: 0, // 经度,浮点数,范围为180 ~ -180。
  51. // name: "", // 位置名
  52. // address: "", // 地址详情说明
  53. // scale: 1, // 地图缩放级别,整型值,范围从1~28。默认为最大
  54. // infoUrl: "", // 在查看位置界面底部显示的超链接,可点击跳转
  55. // });
  56. // });
  57. // wx.error(function () {
  58. // console.log("失败了");
  59. // });
  60. });
  61. },
  62. methods: {
  63. ...mapActions({
  64. getSdkConfig: "authen/getSdkConfig",
  65. }),
  66. },
  67. };
  68. </script>
  69. <style>
  70. .point-success {
  71. position: relative;
  72. }
  73. .point-success .background {
  74. background-color: #f3b335;
  75. width: 100%;
  76. height: 3.8rem;
  77. position: relative;
  78. background: url("../../static/point/bj2@2x.png") no-repeat 0px 0px;
  79. background-size: 100% 100%;
  80. z-index: -1;
  81. position: relative;
  82. }
  83. .point-success .background .icon {
  84. display: inline-block;
  85. width: 0.48rem;
  86. height: 0.48rem;
  87. background: url("../../static/point/1_e10_cg@2x.png");
  88. background-size: 100% 100%;
  89. position: absolute;
  90. top: 1.13rem;
  91. left: 2.41rem;
  92. }
  93. .point-success .background .text {
  94. width: 2rem;
  95. height: 0.7rem;
  96. font-size: 0.5rem;
  97. font-family: PingFangSC-Regular, PingFang SC;
  98. font-weight: 400;
  99. color: #ffffff;
  100. line-height: 0.7rem;
  101. position: absolute;
  102. top: 1rem;
  103. left: 3.09rem;
  104. }
  105. .point-success .container {
  106. margin-top: -13.33vw;
  107. width: 100%;
  108. padding: 0 4vw;
  109. box-sizing: border-box;
  110. display: flex;
  111. flex-direction: column;
  112. z-index: 99;
  113. }
  114. .point-success .container .menu {
  115. width: 100%;
  116. height: 1.1rem;
  117. background: #ffffff;
  118. box-shadow: 0rem 0.02rem 0.1rem 0rem rgba(0, 0, 0, 0.1);
  119. border-radius: 0.1rem;
  120. display: flex;
  121. flex-direction: row;
  122. justify-content: space-around;
  123. align-items: center;
  124. }
  125. .point-success .container .menu span {
  126. height: 0.45rem;
  127. font-size: 0.32rem;
  128. font-family: PingFangSC-Regular, PingFang SC;
  129. font-weight: 400;
  130. color: #111111;
  131. line-height: 0.45rem;
  132. }
  133. </style>