123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <view>
- <view class="text-top">
- <view class="text">奖项</view>
- <view class="text">共{{ total }}个</view>
- </view>
- <My_listbox ref="List" @getlist="getList">
- <view class="list-box">
- <navigator class="item" v-for="(item, index) in list" :key="item.sa_awardmxid"
- :url="'/cloud/winningNews/detail?data=' + JSON.stringify(item)" @click="toDetail(index)">
- <view class="text">
- <view class="title u-line-2">{{ item.awardname || '--' }}</view>
- <view class="count u-line-1">
- <text style="margin-right: 118px">类型:{{ item.type || '--' }}</text>
- <text>金额:{{ CNY(item.price, '', false) || '--' }}元</text>
- </view>
- <view class="count u-line-1">来源:{{ item.awardheadname || '--' }}</view>
- </view>
- </navigator>
- </view>
- </My_listbox>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list: [],
- total: 0,
- "content": {
- },
- }
- },
- onLoad(options) {
- this.getList(true)
- uni.setNavigationBarTitle({
- title: '我的中奖信息'
- });
- },
- methods: {
- getList(init = false) {
- if (this.paging(this.content, init)) return;
- this.$Http.basic({
- "id": 20240515140302,
- content: this.content
- }).then(res => {
- this.$refs.List.RefreshToComplete()
- console.log("中奖信息", res)
- if (this.cutoff(res.msg)) return;
- this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
- this.total = res.total
- this.content = this.$refs.List.paging(this.content, res)
- })
- },
- toDetail(index) {
- this.$Http.changeItem = function (item) {
- this.$set(this.list, index, item)
- }.bind(this)
- }
- }
- }
- </script>
- <style lang="scss">
- .text-top {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- padding: 10px;
- .text {
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-weight: 400;
- font-size: 12px;
- color: #666666;
- line-height: 0px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-top: 10px;
- }
- }
- .list-box {
- width: 100vw;
- box-sizing: border-box;
- .item {
- display: flex;
- width: 100vw;
- border-radius: 5px;
- overflow: hidden;
- margin-top: 10px;
- background: #FFFFFF;
- padding: 10px;
- .text {
- flex: 1;
- font-family: Source Han Sans SC, Source Han Sans SC;
- .title {
- font-weight: bold;
- font-size: 14px;
- color: #333333;
- line-height: 24px;
- }
- .count {
- font-size: 12px;
- color: #999999;
- line-height: 17px;
- margin-top: 8px;
- }
- }
- }
- }
- </style>
|