123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <div class="xf_detail">
- <!-- <div class="card">
- <image src="../../static/images/xitong.png" mode="" class="item_icon"></image>
- <div class="middle">
- <div class="name">系统奖励(翻倍)</div>
- <div class="time">{{formatTime(detail.order_time)}}</div>
- </div>
- <div class="total_nums">+{{detail.xuefen}}</div>
- </div> -->
- <div class="table">
- <div class="t_header">
- <div class="item">商品名称</div>
- <div class="item">数量</div>
- <div class="item">学分</div>
- </div>
- <div class="list" v-for="item in detail.goods" :key="item.id">
- <div class="item">{{item.good ? item.good.name :''}}</div>
- <div class="item">{{item.nums}}</div>
- <div class="item">{{item.xuefen}}</div>
- </div>
-
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- detail: {}
- }
- },
- onLoad(options) {
- this.getDetail(options.id)
- },
- methods: {
- getDetail(id) {
- this.$u.get('/dwbs/order', {
- id: id
- }).then(res => {
- console.log(res)
- this.detail = res.data
- })
- },
- //格式化时间
- formatTime(time) {
- return time.replace(/-/g, '/');
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .xf_detail {
- padding: 14px;
- }
- .card {
- display: flex;
- align-items: center;
- padding: 16px 0;
- .item_icon {
- width: 40px;
- height: 40px;
- margin-right: 10px;
- }
- .middle {
- flex: 1;
- .name {
- font-size: 15px;
- color: #333333;
- }
- .time {
- margin-top: 8px;
- font-size: 14px;
- color: #999999;
- }
- }
- .total_nums {
- font-size: 18px;
- font-weight: 500;
- color: #FB231F;
- }
- }
- .table {
- margin-top: 20px;
- .t_header,
- .list {
- display: flex;
- height: 44px;
- line-height: 44px;
- border-radius: 5px;
- font-size: 17px;
- .item {
- flex: 1;
- text-align: center;
- }
- }
- .t_header {
- background: linear-gradient(90deg, #FFA267 0%, #FF7B3A 100%);
- color: #FFF5F5;
- }
- .list {
- color: #3D3D3D;
- background: #F9F9FB;
- margin-top: 8px;
- }
- }
- </style>
|