wdcp.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view>
  3. <view class="" v-for="(item,index) in list" :key="index">
  4. <view class="fzctob sclixmy" @click="todetail(item.id,item.state,item.data)" >
  5. <view class="sckjert" style="overflow: hidden;">
  6. <image :src="item.imglist" style="width: 100%; height: 100%;" mode="aspectFill"></image>
  7. </view>
  8. <view class="fsxto" style="width: 100%;margin-left: 24rpx;">
  9. <view class="cphrry"><text>{{item.title}}</text></view>
  10. <view class="cptxtyra"><text>下单时间:{{item.create_time | date('yyyy-mm-dd hh:MM')}}</text></view>
  11. <view class="flztoa">
  12. <text class="cpkkry">数量: 1</text>
  13. <text class="cpkkrya">总价¥{{item.price}}</text>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. background: {
  25. backgroundColor: '#ffffff',
  26. },
  27. hhyanm: {
  28. color: '#FFFFFF',
  29. },
  30. list:[]
  31. }
  32. },
  33. onLoad() {
  34. this.getList()
  35. },
  36. methods:{
  37. getList(){
  38. this.$post({
  39. data:{
  40. do:'MyExamination',
  41. data:{
  42. user_id:uni.getStorageSync('id')
  43. }
  44. }
  45. }).then(res=>{
  46. res.data.map(item=>{
  47. item.data = JSON.parse(item.data)
  48. item.result = JSON.parse(item.result)
  49. })
  50. this.list = res.data
  51. console.log(this.list)
  52. })
  53. },
  54. todetail(id,state,list){
  55. if(state==1){
  56. uni.navigateTo({
  57. url:'/pages/user/cp-jg?id='+id+'&state='+state+'&list='+encodeURIComponent(JSON.stringify(list))
  58. })
  59. }else{
  60. uni.navigateTo({
  61. url:'/pages/user/cp-fa?id='+id
  62. })
  63. }
  64. }
  65. }
  66. }
  67. </script>
  68. <style>
  69. page {
  70. background: #FAFAFA;
  71. }
  72. </style>
  73. <style lang="scss" scoped>
  74. </style>