success.vue 2.7 KB

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