appzf.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">会员开通</block>
  6. </cu-custom>
  7. <scroll-view scroll-y class="page">
  8. <image src="/static/bj001.jpeg " mode="widthFix" class="response">
  9. </image>
  10. <view class="nav-list" >
  11. <navigator hover-class="none" class="nav-li" navigateTo :class="'bg-'+item.color"
  12. :style="[{width:'100%',animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
  13. <view class="nav-name">{{item.title}}<view class="cu-avatar round" :style="{margin:'20px',backgroundImage: 'url(' + item.cuIcon + ')'}"></view></view>
  14. <ul>
  15. <!-- <li>
  16. <div class="card" @click="ts()">
  17. <h2 style="color: #000000;text-align: center;margin-top: 15px;">半年vip</h2>
  18. <div>
  19. <h2 style="color: red;text-align: center;margin-top: 20px;">299元/半年</h2>
  20. </div>
  21. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 25px;"></div>
  22. <div>
  23. <h3 style="color: red;text-align: center;margin-top: 20px;">50万套皮肤免费使用</h3>
  24. </div>
  25. </div>
  26. </li>
  27. <li>
  28. <div class="card" @click="tss()">
  29. <h2 style="color: #000000;text-align: center;margin-top: 15px;">永久vip</h2>
  30. <div>
  31. <h2 style="color: red;text-align: center;margin-top: 20px;">499元/终身</h2>
  32. </div>
  33. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 25px;"></div>
  34. <div>
  35. <h3 style="color: red;text-align: center;margin-top: 20px;">百万套皮肤免费使用</h3>
  36. </div>
  37. </div>
  38. </li> -->
  39. <li>
  40. <div class="tt">
  41. <view style="margin-left: 20px;margin-top: 25px;">
  42. <canvas canvas-id="myQrcode"></canvas>
  43. </view>
  44. </div>
  45. </li>
  46. </ul>
  47. <view style="margin-left: 80px;margin-top: 10px;"><image src="../../static/zfb.png" style="width: 30px;height: 30px;"></image>
  48. </view>
  49. <view style="margin-left: 130px;margin-top: -35px;"><h3><span style="color: #0081FF;">支付宝支付</span></h3>
  50. </view>
  51. </navigator>
  52. </view>
  53. </scroll-view>
  54. </view>
  55. </template>
  56. <script>
  57. const qrCode = require('../../common/util/weapp-qrcode')
  58. import api from '@/api/api'
  59. export default {
  60. name: 'user',
  61. data() {
  62. return {
  63. elements: [{
  64. title: '开通账号: ',
  65. name: 'exit',
  66. color: 'cyan',
  67. cuIcon: '',
  68. }
  69. ],
  70. ul:'/sys/test/toPay',
  71. ulr:'/sys/test/notify_url'
  72. }
  73. },
  74. created() {
  75. let avatar=(this.$store.getters.avatar && this.$store.getters.avatar.length > 0)? api.getFileAccessHttpUrl(this.$store.getters.avatar):'/static/avatar_boy.png'
  76. this.elements[0].title+=this.$store.getters.realname;
  77. this.elements[0].cuIcon=avatar;
  78. this.appzf(3);
  79. window.setInterval(() => {
  80. this.hd();
  81. setTimeout(fun, 0)
  82. }, 30000)
  83. },
  84. methods: {
  85. ts:function(){
  86. this.appzf(3);
  87. },
  88. tss:function(){
  89. this.appzf(2);
  90. },
  91. initQrCode:function(s){
  92. new qrCode('myQrcode', {
  93. text: s,
  94. width: 160,
  95. height: 160,
  96. colorDark: "#333333",
  97. colorLight: "#FFFFFF",
  98. correctLevel: qrCode.CorrectLevel.H
  99. })
  100. },
  101. appzf:function(){
  102. var obj="终身vip";
  103. var jg="0.01";
  104. this.$http.get(this.ul,{params:{subject:obj,money:jg}}).then(res=>{
  105. console.log(res)
  106. this.initQrCode(res.data.qrCode)
  107. }).catch(err => {
  108. console.log(err);
  109. });
  110. },
  111. hd:function(){
  112. this.$http.post(this.ulr,{params:{}}).then(res=>{
  113. console.log(res)
  114. }).catch(err => {
  115. console.log(err);
  116. });
  117. }
  118. }
  119. }
  120. </script>
  121. <style>
  122. .card{
  123. background-color: #FFFFFF;
  124. width: 150px;
  125. height: 200px;
  126. border-radius:10px 10px 10px 10px;
  127. border:3px solid red;
  128. margin-top: 10px;
  129. box-shadow:0 4px 8px 0 rgba(255, 255, 255, 0.2),0 6px 20px 0 rgba(255, 255, 255, 0.2);
  130. }
  131. .tt{
  132. margin-left: 20px;
  133. margin-top: 70px;
  134. width: 200px;
  135. height: 200px;
  136. background-color: #FFFFFF;
  137. border-radius: 5px 5px 5px 5px;
  138. border:1px solid #0081FF;
  139. }
  140. ul li{
  141. list-style-type:none;
  142. }
  143. </style>