123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <template>
- <view class="container">
- <view class="list">
- <view @click="nav(index,item.id)" class="item" v-for="(item,index) in list" :key="index">
- <view class="name">{{item.name}}</view>
- <view class="content flex flex-y-center">
- <view class="cell flex flex-y-center arr-r">
- <view class="title">添加时间:</view>
- <view class="desc text-1">{{item.create_time}}</view>
- </view>
- </view>
- </view>
- <view class="no-more">没有更多内容了~</view>
- </view>
- <view class="footer-bar">
- <view class="content flex flex-center">
- <navigator url="./editGoodsCat" class="btn">+新增分类</navigator>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list: [],
- }
- },
- onLoad(e) {
- },
- onShow() {
- this.cygoods_category_index();
- },
- methods: {
-
- nav(index,id) {
- let obj = this.list[index];
- uni.setStorageSync("category_info", obj);
- uni.navigateTo({
- url: `./goodsCatDetail?id=${id}`
- })
- },
-
- cygoods_category_index(e) {
- this.request({
- url: "Smdcshop/jftype_index",
- data: {
- admin_id: uni.getStorageSync("admin_id")
- },
- }).then(res => {
- console.log(res, "res")
- if (res.code === '200') {
- this.list = res.data;
- }
- });
- },
- },
- }
- </script>
- <style>
- @import url("../static/css/common.css");
- page {
- background-color: #F4F5F7;
- }
- .list {
- padding: 30rpx 25rpx;
- }
- .list .item {
- border-radius: 8rpx;
- overflow: hidden;
- padding-left: 30rpx;
- border-left: 8rpx solid #247EFF;
- background-color: #fff;
- margin-bottom: 30rpx;
- }
- .list .item .name {
- height: 80rpx;
- border-bottom: 1rpx solid #f5f5f5;
- font-size: 30rpx;
- line-height: 80rpx;
- font-weight: bold;
- }
- .list .item .content {
- padding: 20rpx 0 24rpx;
- }
- .list .item .content .cell {
- flex: none;
- width: 100%;
- box-sizing: border-box;
- padding-right: 30rpx;
- font-size: 26rpx;
- line-height: 37rpx;
- color: #666;
- }
- .list .item .content .cell .title {
- color: #99A0AD;
- flex: none;
- }
- </style>
|