symx.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="" style="text-align: center;">
  3. <view v-for="(item,index) in list" style="border-bottom: solid 1px gainsboro;padding:30rpx 10rpx;color: #fff;font-size:28rpx;line-height: 150%;">
  4. <view style="width: 100%;display: table;">
  5. <view style="float: left;">
  6. <view>
  7. <text style="color: #fff;">+{{item.price}}</text>
  8. </view>
  9. </view>
  10. <view style="float: right;">
  11. <view>{{item.time}}</view>
  12. </view>
  13. </view>
  14. <view style="display: table;width: 100%;text-align: left;">{{item.content}}</view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. constants: {},
  23. userinfo: null,
  24. data:{
  25. _token:"",
  26. uid:0,
  27. },
  28. num:"",
  29. mobile:"",
  30. jymm:"",
  31. list:[],
  32. page:1,
  33. status: 'more',
  34. contentText: {
  35. contentdown: '上拉加载更多',
  36. contentrefresh: '加载中',
  37. contentnomore: '到底了'
  38. }
  39. };
  40. },
  41. onShow() {
  42. var user = this.$api.getUserinfo();
  43. if (user) {
  44. this.userinfo = user;
  45. this.data._token=user._token;
  46. this.data.uid=user.id;
  47. this.MhMyInteger();
  48. } else {
  49. this.userinfo = null;
  50. }
  51. },
  52. methods: {
  53. zhuanzhang(){
  54. //手动预约的 要求输入数量
  55. uni.navigateTo({
  56. url: 'zrlp'
  57. });
  58. },
  59. MhMyInteger(){
  60. var data = this.data;
  61. //data.uid=1000040
  62. this.$api
  63. .MhPostModel(data, 'user/symx')
  64. .then(res => {
  65. var shuju = res.data.data.data;
  66. this.list = this.list.concat(shuju)
  67. this.status = 'more';
  68. if (shuju.length == 0) {
  69. this.status = 'nomore';
  70. }
  71. })
  72. .catch(err => {
  73. // console.log('request fail', JSON.stringify(err));
  74. });
  75. },
  76. }
  77. }
  78. </script>
  79. <style>
  80. page{padding: 15rpx;background: #98a737;background-attachment: fixed !important;
  81. background-repeat: no-repeat !important;}
  82. .btn1{background: #f2a50b; width:150rpx;text-align: center;color: #fff;font-size: 30rpx;line-height: 200%;border-radius: 10rpx;}
  83. </style>