index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <view>
  3. <view v-for="(item, index) in qglist" class="list">
  4. <view class="a"><text class="tit">产品</text>:{{ item.name }}({{ item.cname }})</view>
  5. <view class="a"><text class="tit">实收款</text>:<text class="b">{{ item.price }}元</text></view>
  6. <view style="display: table;width: 100%;">
  7. <view style="float: left;">
  8. <view class="a"><text class="tit">利润周期</text>:{{ item.tianshu }}天/{{ item.shouyi }}%</view>
  9. <view class="a"><text class="tit">当前价格</text>:<text class="b">{{ item.price }}元</text></view>
  10. </view>
  11. <view style="float: right;background: #f4a612;color: #fff;font-size: 28rpx;padding:10rpx 20rpx;border-radius: 10rpx;" @click="ppb(item)" v-if="userinfo.quanxian==1 && (item.lx==0 || item.lx==2)">
  12. 转入拍拍宝
  13. </view>
  14. </view>
  15. <view class="a"><text class="tit">抢购时间</text>:{{ item.time }}</view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. constants: {},
  24. noimg: '/static/lanhu_record/ps3lynngrkw77ya7zb5jydv23q6xcffyj53c6fe453-54c4-4078-b021-8c1b292a08c2.png',
  25. data: {
  26. uid: '0',
  27. realname: '',
  28. idcard: '',
  29. idcardimg1: '',
  30. idcardimg2: ''
  31. },
  32. userinfo: null,
  33. qglist: []
  34. };
  35. },
  36. onShow() {
  37. var user = this.$api.getUserinfo();
  38. if (user) {
  39. this.userinfo = user;
  40. this.data.uid = this.userinfo.id;
  41. this.data.realname = this.userinfo.xm;
  42. this.data.idcard = this.userinfo.sfz;
  43. this.data.idcardimg1 = this.userinfo.idcardimg1;
  44. this.data.idcardimg2 = this.userinfo.idcardimg2;
  45. } else {
  46. this.userinfo = null;
  47. }
  48. this.getList();
  49. },
  50. methods: {
  51. ppb(item){
  52. uni.navigateTo({
  53. url: '/pages/ppb/zhuanru?id=' + item.id
  54. });
  55. },
  56. viewimg(path) {
  57. uni.previewImage({
  58. urls: [path],
  59. longPressActions: {
  60. itemList: ['发送给朋友', '保存图片', '收藏'],
  61. success: function(data) {
  62. // console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  63. },
  64. fail: function(err) {
  65. // console.log(err.errMsg);
  66. }
  67. }
  68. });
  69. },
  70. getList() {
  71. var data = new Object();
  72. data.uid = this.data.uid;
  73. //data.uid=1000006;
  74. if (data.uid == '0') {
  75. uni.showToast({
  76. title: '请重新登录',
  77. icon: 'none'
  78. });
  79. uni.switchTab({
  80. url: '/pages/my/index'
  81. });
  82. return;
  83. }
  84. this.$api
  85. .MhPostModel(data, 'user/zclist')
  86. .then(res => {
  87. // console.log('user/qglist信息', JSON.stringify(res.data.data.data));
  88. // console.log('抢购');
  89. this.qglist = res.data.data.data;
  90. })
  91. .catch(err => {
  92. // console.log('request fail', JSON.stringify(err));
  93. });
  94. }
  95. }
  96. };
  97. </script>
  98. <style lang="css">
  99. @import '../common/common.css';
  100. @import './assets/style/index.rpx.css';
  101. @import '../common/common.css';
  102. @import './assets/style/index.rpx.css';
  103. page {
  104. padding: 15rpx;
  105. background: #f2f2f6;
  106. padding: 0;
  107. margin: 0;
  108. }
  109. .a {
  110. color: #585858;
  111. font-size: 30rpx;
  112. line-height: 180%;
  113. }
  114. .tit{color: #a4a4a4;width: 130rpx;display: inline-block;text-align-last:justify}
  115. .a::before {
  116. content: '';
  117. width: 10rpx;display: inline-block;
  118. height: 10rpx;margin-right: 10rpx;position: relative;
  119. background: #aaaaaa;top: -5rpx;
  120. border-radius: 50%;
  121. }
  122. .b {
  123. color: #ED4545;
  124. font-weight: bold;
  125. }
  126. .mfxx {
  127. background: #faba25;
  128. color: #fff;
  129. font-size: 28rpx;
  130. padding: 5rpx 10rpx;
  131. border-radius: 5rpx;
  132. margin-left: 10rpx;
  133. }
  134. .srk {
  135. color: #000;
  136. height: 60rpx;
  137. line-height: 60rpx;
  138. background: #fff;
  139. border-radius: 10rpx;background: #f2f2f6;
  140. padding-left: 20rpx;
  141. font-size: 28rpx;
  142. }
  143. .list1 .a .tit{width: 180rpx;}
  144. .top {
  145. display: flex;
  146. justify-content: space-between;
  147. padding-bottom: 10rpx;
  148. background-image: linear-gradient(#829c52, #59723b);
  149. line-height: 60rpx;
  150. height: 90rpx;
  151. padding-top: 10rpx;
  152. }
  153. .xuanzhong {
  154. display: inline-block;
  155. text-align: center;
  156. width: 33%;
  157. color: #fff;
  158. }
  159. .xuanzhong::after {
  160. content: "";
  161. display: block;
  162. width: 30px;
  163. height: 5rpx;
  164. margin: auto;
  165. background: #fff;
  166. border-radius: 30rpx;
  167. }
  168. .wxz {
  169. color: #fff;
  170. display: inline-block;
  171. text-align: center;
  172. width: 33%;
  173. }
  174. .list {
  175. background: #fff;
  176. width: calc(100% - 40rpx);
  177. margin: auto;
  178. margin-top: 20rpx;
  179. padding: 20rpx;
  180. border-radius: 15rpx;
  181. }
  182. </style>