wishDetail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="page">
  3. <view class="list_info">
  4. <view class="item">
  5. <view class="avator">
  6. <image class="icon" src="../../static/me/sex_2.png" mode="widthFix">
  7. </image>
  8. </view>
  9. <view class="tit">
  10. <view class="name">2023季迪奥限量款背包</view>
  11. <view class="desc">市场价:¥10,000.00</view>
  12. </view>
  13. <view class="jindu">
  14. <view class="bord">
  15. <view class="active" style="width:50%;"></view>
  16. </view>
  17. <text class="tips">50%</text>
  18. </view>
  19. <view class="title">助力好友</view>
  20. <view class="list_mem">
  21. <view class="mem" v-for="(item,index) in 12">
  22. <image class="icon" src="../../static/me/sex_2.png" mode="widthFix" />
  23. <text>冷桂霞</text>
  24. </view>
  25. </view>
  26. <view class="title">助力记录</view>
  27. <view class="list_record">
  28. <view class="record" v-for="(item,index) in 3">
  29. <view class="left">
  30. <image class="icon" src="../../static/me/sex_2.png" mode="widthFix" />
  31. <text>冷桂霞</text>
  32. </view>
  33. <text class="right">贡献助力值:+10</text>
  34. </view>
  35. </view>
  36. <!-- <view class="btn_submit">加入心愿</view> -->
  37. </view>
  38. <view class="blankHeight"></view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. components: {},
  45. data() {
  46. return {
  47. tab: 1,
  48. scrollTop: 0,
  49. old: {
  50. scrollTop: 0
  51. },
  52. list: [{
  53. name: '实名认证',
  54. 'desc': '',
  55. 'path': ''
  56. }]
  57. }
  58. },
  59. onLoad() {
  60. // setTimeout(function() {
  61. // uni.setNavigationBarColor({
  62. // frontColor: '#ffffff',
  63. // backgroundColor: '#00000000',
  64. // animation: {
  65. // duration: 400,
  66. // timingFunc: 'easeIn'
  67. // }
  68. // })
  69. // }, 200);
  70. },
  71. onShow() {
  72. this.loadData();
  73. },
  74. methods: {
  75. onBack() {},
  76. checkTab(tab) {
  77. this.tab = tab;
  78. // this.loadData();
  79. },
  80. scroll: function(e) {
  81. console.log(e)
  82. this.old.scrollTop = e.detail.scrollTop
  83. },
  84. loadData() {
  85. console.log("this.globalData", getApp().globalData);
  86. let obj2 = {
  87. is_first: 0
  88. }
  89. const postData = Object.assign({}, getApp().globalData.postHeader, obj2);
  90. console.log(postData);
  91. uni.request({
  92. url: this.$apiHost + '/Gushi/getmyinfo', //仅为示例,并非真实接口地址。
  93. data: postData,
  94. method: 'POST',
  95. header: {
  96. 'content-type': 'application/json', //自定义请求头信息
  97. 'Access-Control-Allow-Origin': '*'
  98. },
  99. success: (res) => {
  100. console.log('data:', res.data);
  101. this.myinfo = res.data;
  102. }
  103. });
  104. },
  105. EditNickname() {
  106. let that = this;
  107. this.$refs['DialogBox'].confirm({
  108. title: '更改昵称',
  109. placeholder: '请输入修改的昵称',
  110. value: that.myinfo.nickname,
  111. DialogType: 'input',
  112. animation: 0
  113. }).then((res) => {
  114. if (res.value.length < 1) {
  115. uni.showToast({
  116. title: "请输入有效的昵称",
  117. icon: 'none'
  118. });
  119. return;
  120. }
  121. that.myinfo.nickname = res.value;
  122. let obj2 = {
  123. nickname: res.value
  124. }
  125. const postData = Object.assign({}, getApp().globalData.postHeader, obj2);
  126. uni.request({
  127. url: that.$apiHost + '/Gushi/editinfo', //检测是否已绑定
  128. data: postData,
  129. method: 'POST',
  130. header: {
  131. 'content-type': 'application/json', //自定义请求头信息
  132. 'Access-Control-Allow-Origin': '*'
  133. },
  134. success: (res) => {
  135. uni.showToast({
  136. title: res.data.str,
  137. icon: 'none'
  138. });
  139. }
  140. });
  141. })
  142. },
  143. }
  144. }
  145. </script>
  146. <style scoped lang="scss">
  147. @import 'wishDetail.scss';
  148. </style>