list.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <!-- 订单 -->
  6. <block v-if="type=='delivery'">
  7. <view class="kdlists flexc" v-for="(ite,idx) in datainfo" :key="idx">
  8. <view class="kdll">
  9. <image :src="deva" class="limg"></image>
  10. <view class="tit pr35">运输中</view>
  11. <view class="over tit">陕西老潼关肉…</view>
  12. <view class="time">12-03 22:05 </view>
  13. </view>
  14. <view class="kdlr">
  15. <image :src="cirimg" class="limg"></image>
  16. <view>
  17. <view class="txt">运输中</view>
  18. <view class="tit overtwo">【沧州市】快件已发往 蚌埠转运中心</view>
  19. <view class="time">12-03 22:05 </view>
  20. </view>
  21. </view>
  22. </view>
  23. </block>
  24. <!-- 优惠券 -->
  25. <view v-if="type=='coupon'" class="coubox">
  26. <view class="coulists flexc" v-for="(ite,idx) in datainfo" :key="idx">
  27. <image :src="yhbg" class="yhbg"></image>
  28. <view class="coulist flexc">
  29. <view class="cltl flexccc">
  30. <view class="tit">30<text>元</text></view>
  31. <view class="txt">满100减30</view>
  32. </view>
  33. <view class="line"></view>
  34. <view class="cltr">
  35. <view class="over tit">合家福商品优惠券满100…</view>
  36. <view class="btns">
  37. <image :src="jfico" class="jfimg"></image>
  38. <view class="txt">1000<text>积分</text></view>
  39. <view class="btn flex0 flexcc">兑换</view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 资讯 -->
  46. <block v-if="type=='news'">
  47. <view class="newslists flexc" v-for="(ite,idx) in datainfo" :key="idx">
  48. <image :src="jfico" class="newsll"></image>
  49. <view class="newslr over flex1">
  50. <view class="flexc mb8">
  51. <view class="over tit flex1">合肥市跌幅最大的小区房价公布</view>
  52. <view class="num flexc"><image :src="eye"></image>1361</view>
  53. </view>
  54. <view class="overtwo txt">对于合肥市这座城来说,可供选择的项目太多了,合肥市的购房者买房一定要三思而后行,货比三…</view>
  55. </view>
  56. </view>
  57. </block>
  58. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  59. </block>
  60. <!-- 无数据 -->
  61. <view class="nodata" v-else>
  62. <image :src="noiconpimg"></image>
  63. <view>暂无数据</view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  69. import config from '@/config'
  70. export default{
  71. props:{
  72. datainfo: {
  73. type: Array,
  74. default () {
  75. return []
  76. }
  77. },
  78. wtdt:{
  79. type:String,
  80. default () {
  81. return ''
  82. }
  83. },
  84. wtdtfalg:{
  85. type:Boolean,
  86. default () {
  87. return true
  88. }
  89. },
  90. type:{
  91. type:String,
  92. default () {
  93. return 0
  94. }
  95. },
  96. topval:{
  97. type:String,
  98. default () {
  99. return ''
  100. }
  101. }
  102. },
  103. data(){
  104. return{
  105. noiconpimg:require("@/static/images/nodata.png"),
  106. yhbg:require("@/static/images/home/yhbg.png"),
  107. cirimg:require("@/static/images/home/cir.png"),
  108. deva:require("@/static/images/home/deva.png"),
  109. jfico:require("@/static/images/home/jfico.png"),
  110. eye:require("@/static/images/home/eye.png"),
  111. baseUrl:config.baseUrl,
  112. delBtnWidth:66,//左滑默认宽度
  113. }
  114. },
  115. mounted() {
  116. },
  117. methods:{
  118. checkPermi, checkRole,
  119. getDetail(e){
  120. this.$emit('getDetail',e)
  121. },
  122. getAddFn(e){
  123. this.$emit('getAddFn',e)
  124. },
  125. getReadlist(e){
  126. this.$emit('getReadlist',e)
  127. },
  128. getBtnFn(e){
  129. this.$emit('getBtnFn',e)
  130. },
  131. getZhan(idx){
  132. console.log(idx,1)
  133. // var obj=JSON.parse(JSON.stringify(this.datainfo))[idx]
  134. // obj.zhanflag=!obj.zhanflag;
  135. // this.datainfo.splice(idx,1,obj);
  136. this.datainfo[idx].zhanflag=!this.datainfo[idx].zhanflag
  137. },
  138. getPreview(idx,arr) {
  139. var newArr=[];
  140. arr.forEach(ite=>{
  141. var ds=this.baseUrl+ite
  142. newArr.push(ds)
  143. })
  144. uni.previewImage({
  145. urls: newArr,
  146. current:idx,
  147. success: function(data) {},
  148. fail: function(err) {}
  149. });
  150. },
  151. }
  152. }
  153. </script>
  154. <style lang="scss" scoped>
  155. .flex{display: flex;}
  156. .flexc{display: flex;align-items: center;}
  157. .mb10{margin-bottom: 20rpx;}
  158. .kdlists{background: #FFFFFF;box-shadow: 0px 0px 8rpx 0px #CDCDCD;border-radius: 20rpx;margin-bottom: 24rpx;
  159. .kdll{background: #E4EDFF;width: 220rpx;border-radius:20rpx 0 0 20rpx;flex: 0 0 auto;height: 160rpx;position: relative;padding: 30rpx 0 0 24rpx;
  160. .limg{width: 42rpx;height: 42rpx;position: absolute;right: 20rpx;top: 24rpx;}
  161. }
  162. .tit{font-weight: 500;font-size: 24rpx;color: #000000;margin-bottom: 8rpx;}
  163. .time{font-weight: 500;font-size:20rpx;color: #AAAAAA;}
  164. .kdlr{flex: 1;height: 160rpx;padding-left: 20rpx;padding-top: 30rpx;display: flex;
  165. .limg{width: 24rpx;height: 24rpx;margin-right: 16rpx;flex: 0 0 auto;margin-top: 5rpx;}
  166. .txt{font-size: 26rpx;font-weight: 500;color: #000000;margin-bottom: 6rpx;}
  167. }
  168. }
  169. //优惠券
  170. .coubox{display: flex;flex-wrap: nowrap;overflow: auto;padding-left: 24rpx;}
  171. .coulists{width:524rpx;height: 156rpx;margin-right: 24rpx;
  172. position: relative;
  173. .yhbg{position: absolute;left: 0;top: 0;width:524rpx;height: 156rpx;z-index: 0;}
  174. .coulist{width:100%;height: 100%;z-index: 1;
  175. .cltl{width: 156rpx;flex: 0 0 auto;
  176. .tit{font-weight: bold;font-size: 44rpx;color: #FE5A0E;margin-bottom: 2rpx;
  177. text{font-size: 24rpx;}
  178. }
  179. .txt{font-weight: bold;font-size: 20rpx;color: #979797;}
  180. }
  181. .line{width: 2rpx;height: 80rpx;background: #ECD19D;flex: 0 0 auto;}
  182. .cltr{height: 156rpx;padding:24rpx 20rpx 0 16rpx;
  183. .tit{font-size: 28rpx;color: #272727;font-weight: bold;padding-left: 2rpx;margin-bottom: 26rpx;}
  184. .btns{display: flex;align-items: center;
  185. .jfimg{width: 28rpx;height: 28rpx;margin-right: 10rpx;flex: 0 0 auto;}
  186. .txt{font-size: 40rpx;color: #FE5A0E;font-weight: bold;flex: 1;
  187. text{margin-left: 12rpx;font-size: 24rpx;}
  188. }
  189. .btn{min-width: 92rpx;font-weight: bold;font-size: 24rpx;color: #FFFFFF;height:42rpx;background: linear-gradient(129deg, #FFB132, #FE5A0E);border-radius: 11px;}
  190. }
  191. }
  192. }
  193. }
  194. // 资讯
  195. .newslists{border-bottom: 2rpx solid #E5E5E5;padding: 30rpx 0;
  196. .newsll{width: 136rpx;height: 136rpx;border-radius: 24rpx;margin-right: 22rpx;flex: 0 0 auto;}
  197. .newslr{
  198. .tit{font-size: 26rpx;color: #272727;font-weight: bold;}
  199. .num{font-weight: 500;font-size:22rpx;color: #666666;margin-left: 24rpx;flex: 0 0 auto;
  200. image{width: 24rpx;height: 18rpx;margin-right: 10rpx;}
  201. }
  202. .txt{font-weight: 500;font-size: 24rpx;color: #8F8F8F;line-height: 36rpx;}
  203. }
  204. }
  205. // 无数据
  206. .nodata{display: flex;flex-direction: column;align-items: center;
  207. image{width: 440rpx;height: 440rpx;}
  208. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  209. }
  210. </style>