goodsCatList.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <view class="container">
  3. <view class="list">
  4. <navigator :url="`/saomaDiancan/goodsCatDetail/goodsCatDetail?id=${item.id}`" class="item" v-for="(item,index) in list" :key="index">
  5. <view class="name">{{item.title}}</view>
  6. <view class="content flex flex-y-center">
  7. <view class="cell flex flex-y-center arr-r">
  8. <view class="title">分类描述:</view>
  9. <view class="desc text-1">{{item.keywords}}</view>
  10. </view>
  11. </view>
  12. </navigator>
  13. <view class="no-more">没有更多内容了~</view>
  14. </view>
  15. <view class="footer-bar">
  16. <view class="content flex flex-center">
  17. <navigator url="/saomaDiancan/editGoodsCat/editGoodsCat" class="btn">+新增分类</navigator>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. list:[],
  27. }
  28. },
  29. onLoad() {
  30. },
  31. onShow() {
  32. this.cygoods_category_index();
  33. },
  34. methods: {
  35. cygoods_category_index(e) {
  36. this.request({
  37. url: "Smdcshop/cygoods_category_index",
  38. data: {
  39. store_id: uni.getStorageSync("store_id")
  40. },
  41. }).then(res => {
  42. console.log(res, "res")
  43. if (res.code === '200') {
  44. this.list = res.data;
  45. }
  46. });
  47. },
  48. },
  49. }
  50. </script>
  51. <style>
  52. @import url("../static/css/common.css");
  53. page{
  54. background-color: #F4F5F7;
  55. }
  56. .list{
  57. padding:30rpx 25rpx;
  58. }
  59. .list .item{
  60. border-radius: 8rpx;
  61. overflow: hidden;
  62. padding-left: 30rpx;
  63. border-left: 8rpx solid #247EFF;
  64. background-color: #fff;
  65. margin-bottom: 30rpx;
  66. }
  67. .list .item .name{
  68. height: 80rpx;
  69. border-bottom: 1rpx solid #f5f5f5;
  70. font-size: 30rpx;
  71. line-height: 80rpx;
  72. font-weight: bold;
  73. }
  74. .list .item .content{
  75. padding:20rpx 0 24rpx;
  76. }
  77. .list .item .content .cell{
  78. flex:none;
  79. width: 100%;
  80. box-sizing: border-box;
  81. padding-right: 30rpx;
  82. font-size: 26rpx;
  83. line-height: 37rpx;
  84. color: #666;
  85. }
  86. .list .item .content .cell .title{
  87. color: #99A0AD;
  88. flex:none;
  89. }
  90. </style>