Commit 1a4ab40ae3c8b850e9f0726c5624f1b2cf55c1fc
1 parent
203588fd
新增抽奖记录页
Showing
4 changed files
with
332 additions
and
4 deletions
src/components/goodsItem_7/goodsItem_7.less
src/pages/ExchangeRecords/ExchangeRecords.less
0 → 100644
| 1 | +.ExchangeRecords_box{ | |
| 2 | + width: 100%; | |
| 3 | + min-height: 100vh; | |
| 4 | + background: rgb(241,46,50,1) url("../../../static/img/pointsMall/ExchangeRecords.jpg") no-repeat | |
| 5 | + center bottom; | |
| 6 | + background-size: 100%; | |
| 7 | + padding: 1px 0 0 0; | |
| 8 | + .top_back{ | |
| 9 | + height: 60px; | |
| 10 | + display: flex; | |
| 11 | + justify-content: flex-start; | |
| 12 | + padding: 0 0 40px 40px; | |
| 13 | + img{ | |
| 14 | + width: 60px; | |
| 15 | + height: 60px; | |
| 16 | + } | |
| 17 | + } | |
| 18 | + .drawRecord_title{ | |
| 19 | + width: 588px; | |
| 20 | + height: 390px; | |
| 21 | + //background: url("../../../static/img/pointsMall/title.png") no-repeat center top; | |
| 22 | + background-size: 100%; | |
| 23 | + margin: 2px 81px 64px 81px; | |
| 24 | + } | |
| 25 | + .title_t{ | |
| 26 | + height:53px; | |
| 27 | + font-size:34px; | |
| 28 | + font-weight:400; | |
| 29 | + color:rgba(249,249,249,1); | |
| 30 | + line-height:53px; | |
| 31 | + text-align: center; | |
| 32 | + margin: 49px 0; | |
| 33 | + } | |
| 34 | + .content_box{ | |
| 35 | + width:670px; | |
| 36 | + height:669px; | |
| 37 | + background:rgba(241,46,50,1); | |
| 38 | + border-radius:16px; | |
| 39 | + margin: auto; | |
| 40 | + padding-top: 1px; | |
| 41 | + .tip{ | |
| 42 | + text-align: center; | |
| 43 | + } | |
| 44 | + ul{ | |
| 45 | + height: 540px; | |
| 46 | + overflow-y: auto; | |
| 47 | + } | |
| 48 | + div{ | |
| 49 | + //display: flex; | |
| 50 | + //justify-content: space-between; | |
| 51 | + color: #fff; | |
| 52 | + } | |
| 53 | + .content_top{ | |
| 54 | + width:580px; | |
| 55 | + height:60px; | |
| 56 | + line-height: 60px; | |
| 57 | + background:rgba(232,28,32,1); | |
| 58 | + border-radius:12px; | |
| 59 | + margin: 20px auto; | |
| 60 | + font-size: 30px; | |
| 61 | + font-weight: 600; | |
| 62 | + padding: 0 27px; | |
| 63 | + display: flex; | |
| 64 | + justify-content: space-between; | |
| 65 | + div{ | |
| 66 | + color:rgba(255,202,40,1); | |
| 67 | + } | |
| 68 | + } | |
| 69 | + .item{ | |
| 70 | + padding: 20px 34px 20px 20px; | |
| 71 | + font-size:28px; | |
| 72 | + font-weight:400; | |
| 73 | + color:rgba(255,255,255,1); | |
| 74 | + line-height:40px; | |
| 75 | + position: relative; | |
| 76 | + display: flex; | |
| 77 | + align-items: center; | |
| 78 | + .adderss{ | |
| 79 | + position: absolute; | |
| 80 | + right:72px; | |
| 81 | + top:48px; | |
| 82 | + width:100px; | |
| 83 | + height:34px; | |
| 84 | + line-height: 34px; | |
| 85 | + border-radius:18px; | |
| 86 | + border:1px solid rgba(244,195,47,1); | |
| 87 | + color: #F4C32F; | |
| 88 | + font-size: 22px; | |
| 89 | + display: flex; | |
| 90 | + justify-content: center !important; | |
| 91 | + } | |
| 92 | + div:nth-child(1){ | |
| 93 | + float: left; | |
| 94 | + display: flex; | |
| 95 | + justify-content: flex-start; | |
| 96 | + flex: 1; | |
| 97 | + text-overflow: ellipsis; | |
| 98 | + overflow: hidden; | |
| 99 | + display: -webkit-box; | |
| 100 | + -webkit-box-orient:vertical; | |
| 101 | + -webkit-line-clamp:2; | |
| 102 | + -ms-word-wrap:break-word; | |
| 103 | + word-wrap:break-word; | |
| 104 | + } | |
| 105 | + div:nth-child(2){ | |
| 106 | + float: left; | |
| 107 | + width: 280px; | |
| 108 | + display: flex; | |
| 109 | + justify-content: flex-start; | |
| 110 | + } | |
| 111 | + div:nth-child(3){ | |
| 112 | + width: 80px; | |
| 113 | + text-align: center; | |
| 114 | + } | |
| 115 | + } | |
| 116 | + } | |
| 117 | + .btn{ | |
| 118 | + width:520px; | |
| 119 | + height:88px; | |
| 120 | + background:linear-gradient(180deg,rgba(241,205,59,1) 0%,rgba(254,155,2,1) 100%); | |
| 121 | + border-radius:44px; | |
| 122 | + border:1px solid rgba(151,151,151,1); | |
| 123 | + margin: 64px auto; | |
| 124 | + text-align: center; | |
| 125 | + line-height: 88px; | |
| 126 | + font-size: 34px; | |
| 127 | + color: #0A0741; | |
| 128 | + } | |
| 129 | +} | ... | ... |
src/pages/ExchangeRecords/ExchangeRecords.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div> | |
| 3 | + <div class="ExchangeRecords_box"> | |
| 4 | + <!--<div v-if="this.isCNLive.value&&this.$parent.isBackIcon" class="top_back" :style="'padding-top: ' + (($parent.top.value)+8) + 'px'">--> | |
| 5 | + <!--<img v-if="this.isAndroid.value" @click="$parent.back()" src="static/img/go_back.png" alt="">--> | |
| 6 | + <!--<img v-else="this.isiPhone.value" @click="goLucky()" src="static/img/go_back.png" alt="">--> | |
| 7 | + <!--</div>--> | |
| 8 | + <div class="top_back" :style="'margin-top: ' + (($parent.top.value)+8) + 'px'"> | |
| 9 | + <img @click="goointsMall()" src="static/img/pointsMall/go_back.png" alt=""> | |
| 10 | + </div> | |
| 11 | + <div class="drawRecord_title" :style="{backgroundImage: 'url('+ titleImg +')',marginTop:+($parent.top.value)+'px'}"></div> | |
| 12 | + <div class="title_t">兑换记录</div> | |
| 13 | + <div class="content_box"> | |
| 14 | + <div class="content_top"> | |
| 15 | + <div>兑换名称</div> | |
| 16 | + <div>兑换时间</div> | |
| 17 | + <div>数量</div> | |
| 18 | + </div> | |
| 19 | + <div class="tip" v-if="list&&list.length==0"> | |
| 20 | + 暂无兑换记录 | |
| 21 | + </div> | |
| 22 | + <ul | |
| 23 | + v-if="list" | |
| 24 | + v-infinite-scroll="loadMore" | |
| 25 | + infinite-scroll-disabled="loading" | |
| 26 | + :infinite-scroll-distance="list.length"> | |
| 27 | + <li v-for="(item,index) in list" :key="index"> | |
| 28 | + <div class="item"> | |
| 29 | + <div v-if="item&&item.title" class="item.title"> | |
| 30 | + {{item.title}} | |
| 31 | + </div> | |
| 32 | + <div v-if="item&&item.create_time">{{item.create_time*1000 | datetime('yyyy-MM-dd hh:mm:ss')}}</div> | |
| 33 | + <div>{{item.num}}个</div> | |
| 34 | + </div> | |
| 35 | + </li> | |
| 36 | + </ul> | |
| 37 | + </div> | |
| 38 | + </div> | |
| 39 | + | |
| 40 | + </div> | |
| 41 | +</template> | |
| 42 | + | |
| 43 | +<script> | |
| 44 | + // 引入组件 | |
| 45 | + import { Toast, Indicator } from 'mint-ui'; | |
| 46 | + export default { | |
| 47 | + name: 'ExchangeRecords', | |
| 48 | + data () { | |
| 49 | + return { | |
| 50 | + list:[], | |
| 51 | + page:1, | |
| 52 | + titleImg:null // 标题图片 | |
| 53 | + } | |
| 54 | + }, | |
| 55 | + created(){ | |
| 56 | + document.title="兑奖记录" | |
| 57 | + this.getmyLuckIntegralOrder(this.page) | |
| 58 | + }, | |
| 59 | + mounted(){ | |
| 60 | + let activeId = this.$route.query.activeId | |
| 61 | + this.getShareData(activeId) | |
| 62 | + }, | |
| 63 | + methods: { | |
| 64 | + // 跳转到积分商城首页 | |
| 65 | + goointsMall(){ | |
| 66 | + this.$router.push({ | |
| 67 | + path:'/pointsMall', | |
| 68 | + query:{ | |
| 69 | + uid: this.getStore("uid") || 0, | |
| 70 | + } | |
| 71 | + }) | |
| 72 | + }, | |
| 73 | + // 抽奖记录 | |
| 74 | + /** | |
| 75 | + * 获取活动详情页信息 | |
| 76 | + * @param {string} id [活动id] | |
| 77 | + * * @param {string} uid [用户id] | |
| 78 | + */ | |
| 79 | + getmyLuckIntegralOrder(page) { | |
| 80 | + | |
| 81 | + // 加载中提示 | |
| 82 | + Indicator.open('加载中...'); | |
| 83 | + | |
| 84 | + // 请求接口 | |
| 85 | + this.http("/Api/" + (this.getApiVersion().LuckDraw) + "/myLuckIntegralOrder", { | |
| 86 | + uid: this.getStore("uid"), | |
| 87 | + page: page | |
| 88 | + }, this.getmyLuckIntegralOrderCallback, { | |
| 89 | + method: "POST" | |
| 90 | + }); | |
| 91 | + }, | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 获取抽奖记录信息回调 | |
| 95 | + * @param {object} res [服务器返回数据] | |
| 96 | + * @param {object} ext [扩展参数] | |
| 97 | + */ | |
| 98 | + getmyLuckIntegralOrderCallback(res, ext) { | |
| 99 | + this.loading = false; | |
| 100 | + // 加载完成 | |
| 101 | + Indicator.close(); | |
| 102 | + | |
| 103 | + // 返回处理 | |
| 104 | + if (res.code == 200) { | |
| 105 | + | |
| 106 | + // 解构数据 | |
| 107 | + let {data: datas} = res; | |
| 108 | + /* 获取活动详情页数据 开始 */ | |
| 109 | + for (let i = 1; i <= datas.list.length; i++) { | |
| 110 | + this.list.push(datas.list[i-1]); | |
| 111 | + } | |
| 112 | + // 抽奖记录标题 | |
| 113 | + this.titleImg = datas.luck_title_img | |
| 114 | + /* 获取抽奖记录 结束 */ | |
| 115 | + } else if (res.code == 400) { | |
| 116 | + // 获取抽奖记录失败 | |
| 117 | + Toast(res.message); | |
| 118 | + } else { | |
| 119 | + // 获取抽奖记录失败 | |
| 120 | + Toast("获取抽奖记录失败"); | |
| 121 | + } | |
| 122 | + }, | |
| 123 | + // 下拉刷新 | |
| 124 | + loadMore() { | |
| 125 | + this.loading = true; | |
| 126 | + this.page++ | |
| 127 | + this.getmyLuckIntegralOrder(this.page) | |
| 128 | + }, | |
| 129 | + // 获取并设置分享参数 | |
| 130 | + getShareData(activeId){ | |
| 131 | + this.$parent.getShareData({ | |
| 132 | + type: 14, | |
| 133 | + id: activeId, | |
| 134 | + url: "" | |
| 135 | + }); | |
| 136 | + } | |
| 137 | + } | |
| 138 | + } | |
| 139 | +</script> | |
| 140 | +<style rel="stylesheet/less" lang="less"> | |
| 141 | + @import "./ExchangeRecords"; | |
| 142 | +</style> | ... | ... |
src/pages/pointsMall/pointsMall.vue
| ... | ... | @@ -28,15 +28,15 @@ |
| 28 | 28 | <!-- 商品类型 --> |
| 29 | 29 | <div class="item_box"> |
| 30 | 30 | <div class="item"> |
| 31 | - <img src="static/img/1.png" alt=""/> | |
| 31 | + <img src="static/img/points_item01.png" alt=""/> | |
| 32 | 32 | <div class="text">实物商品</div> |
| 33 | 33 | </div> |
| 34 | 34 | <div class="item"> |
| 35 | - <img src="static/img/1.png" alt=""/> | |
| 35 | + <img src="static/img/points_item02.png" alt=""/> | |
| 36 | 36 | <div class="text">虚拟商品</div> |
| 37 | 37 | </div> |
| 38 | 38 | <div class="item"> |
| 39 | - <img src="static/img/1.png" alt=""/> | |
| 39 | + <img src="static/img/points_item03.png" alt=""/> | |
| 40 | 40 | <div class="text">满减红包</div> |
| 41 | 41 | </div> |
| 42 | 42 | </div> |
| ... | ... | @@ -110,6 +110,7 @@ |
| 110 | 110 | </template> |
| 111 | 111 | |
| 112 | 112 | <script> |
| 113 | +import { Toast, Indicator } from "mint-ui"; | |
| 113 | 114 | import goodsItem2 from "@/components/goodsItem_2/goodsItem_2"; |
| 114 | 115 | import columnListBox from "@/components/columnListBox/columnListBox"; |
| 115 | 116 | export default { |
| ... | ... | @@ -183,7 +184,60 @@ export default { |
| 183 | 184 | // 后退 |
| 184 | 185 | window.history.go(-1); |
| 185 | 186 | } |
| 186 | - } | |
| 187 | + }, | |
| 188 | + // 积分商场首页 | |
| 189 | + /** | |
| 190 | + * 获取积分商场首页信息 | |
| 191 | + * * @param {string} uid [用户id] | |
| 192 | + */ | |
| 193 | + integralMallIndex () { | |
| 194 | + | |
| 195 | + // 加载中提示 | |
| 196 | + Indicator.open('加载中...'); | |
| 197 | + | |
| 198 | + // 请求接口 | |
| 199 | + this.http("/Api/" + (this.getApiVersion().LuckDraw) + "/integralMallIndex", { | |
| 200 | + uid: this.getStore("uid"), | |
| 201 | + }, this.integralMallIndexCallback, { | |
| 202 | + method: "POST" | |
| 203 | + }); | |
| 204 | + }, | |
| 205 | + | |
| 206 | + /** | |
| 207 | + * 获取积分商场首页信息 | |
| 208 | + * @param {object} res [服务器返回数据] | |
| 209 | + * @param {object} ext [扩展参数] | |
| 210 | + */ | |
| 211 | + integralMallIndexCallback (res, ext) { | |
| 212 | + | |
| 213 | + // 加载完成 | |
| 214 | + Indicator.close(); | |
| 215 | + | |
| 216 | + // 返回处理 | |
| 217 | + if (res.code == 200) { | |
| 218 | + | |
| 219 | + // 解构数据 | |
| 220 | + let { data: datas } = res; | |
| 221 | + this.info = datas | |
| 222 | + /* 积分商场首页信息 开始 */ | |
| 223 | + /*用户信息 */ | |
| 224 | + /*为你推荐 */ | |
| 225 | + this.$set(this, "goodsLists", datas.goods); | |
| 226 | + /*实物商品 */ | |
| 227 | + this.$set(this, "phyicalGoods", datas.goods); | |
| 228 | + /*虚拟商品 */ | |
| 229 | + this.$set(this, "virtualGoods", datas.goods); | |
| 230 | + /*满减红包商品 */ | |
| 231 | + this.$set(this, "redEnvelopeFull", datas.goods); | |
| 232 | + } else if (res.code == 400) { | |
| 233 | + | |
| 234 | + // 获取积分商场首页信息失败 | |
| 235 | + Toast(res.message || "获取积分商场首页信息失败"); | |
| 236 | + } else { | |
| 237 | + // 获取积分商场首页信息失败 | |
| 238 | + Toast(res.message); | |
| 239 | + } | |
| 240 | + }, | |
| 187 | 241 | }, |
| 188 | 242 | head: { |
| 189 | 243 | title () { |
| ... | ... | @@ -229,6 +283,8 @@ export default { |
| 229 | 283 | // 设置标题 |
| 230 | 284 | this.$set(this.backs, 'title', '优选'); |
| 231 | 285 | } |
| 286 | + // 获取商品信息接口 | |
| 287 | + // this.integralMallIndex(); | |
| 232 | 288 | // 临时,为你推荐商品数据 |
| 233 | 289 | this.$set(this, 'goodsLists', [ |
| 234 | 290 | { | ... | ... |