miningRecord.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="page">
  3. <view class="list_info">
  4. <view class="item" v-for="(item,index) in 3">
  5. <view class="left">
  6. <view class="name">探索奖励</view>
  7. <view class="desc">2023-10-10 15:00</view>
  8. </view>
  9. <text class="right">
  10. <view class="num">+100</view>
  11. </text>
  12. </view>
  13. <view class="blankHeight"></view>
  14. </view>
  15. <DialogBox ref="DialogBox"></DialogBox>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. components: {},
  21. data() {
  22. return {
  23. tab: 1,
  24. scrollTop: 0,
  25. old: {
  26. scrollTop: 0
  27. },
  28. list: [{
  29. name: '实名认证',
  30. 'desc': '',
  31. 'path': ''
  32. }]
  33. }
  34. },
  35. onLoad() {
  36. // setTimeout(function() {
  37. // uni.setNavigationBarColor({
  38. // frontColor: '#ffffff',
  39. // backgroundColor: '#00000000',
  40. // animation: {
  41. // duration: 400,
  42. // timingFunc: 'easeIn'
  43. // }
  44. // })
  45. // }, 200);
  46. },
  47. onShow() {
  48. this.loadData();
  49. },
  50. methods: {
  51. onBack() {},
  52. checkTab(tab) {
  53. this.tab = tab;
  54. // this.loadData();
  55. },
  56. onLinqu() {
  57. this.$refs['DialogBox'].confirm({
  58. title: '',
  59. content: '你还没有维护收货地址,请先维护收货地址!',
  60. DialogType: 'inquiry',
  61. btn1: '我知道了',
  62. btn2: '编辑地址',
  63. animation: 0
  64. }).then(() => {
  65. // getApp().globalData.skey = "";
  66. // uni.removeStorageSync("wapptoken")
  67. // uni.redirectTo({
  68. // url: '/pages/index/login',
  69. // })
  70. // uni.navigateBack();
  71. // uni.sendNativeEvent("logout","tt", function(e){
  72. // //关闭当前小程序
  73. // console.log("sendNativeEvent-----------回调"+JSON.stringify(e));
  74. // });
  75. })
  76. },
  77. scroll: function(e) {
  78. console.log(e)
  79. this.old.scrollTop = e.detail.scrollTop
  80. },
  81. loadData() {
  82. console.log("this.globalData", getApp().globalData);
  83. let obj2 = {
  84. is_first: 0
  85. }
  86. const postData = Object.assign({}, getApp().globalData.postHeader, obj2);
  87. console.log(postData);
  88. uni.request({
  89. url: this.$apiHost + '/Gushi/getmyinfo', //仅为示例,并非真实接口地址。
  90. data: postData,
  91. method: 'POST',
  92. header: {
  93. 'content-type': 'application/json', //自定义请求头信息
  94. 'Access-Control-Allow-Origin': '*'
  95. },
  96. success: (res) => {
  97. console.log('data:', res.data);
  98. this.myinfo = res.data;
  99. }
  100. });
  101. },
  102. }
  103. }
  104. </script>
  105. <style scoped lang="scss">
  106. @import 'miningRecord.scss';
  107. </style>