Commit 92111a25 authored by 罗超's avatar 罗超

增加页面

parent 3bc75e2d
......@@ -487,6 +487,8 @@
"path":"medynamic"//我的互动消息
},{
"path":"activitylist"//活动列表 不想多建一个分包就放在朋友圈里了
},{
"path":"myreward" //活动列表 我的奖励
}]
},
//抖音商品短视频
......
......@@ -5,7 +5,7 @@
<text style="font-weight: bold;">
推荐优惠活动
</text>
<view class="a-top-r" style="display: flex;flex-direction: row;align-items: center;">
<view class="a-top-r" style="display: flex;flex-direction: row;align-items: center;" @click="goMyReward">
<text style="margin-right: 5px;">我的奖励</text>
<u-icon name="arrow" :size="20" color="#A5A4AC"></u-icon>
</view>
......@@ -176,6 +176,12 @@
percent.toFixed(2)
}
return percent
},
//跳转至我的奖励
goMyReward(){
uni.navigateTo({
url: 'myreward',
});
}
},
};
......
<style>
.myRewardContent{
height:auto;
display: flex;
margin:10px;
}
.reward_ImgDiv{
width:120px;
height:70px;
}
.reward_ImgDiv img{
width:100%;
height:100%;
}
.rewardTop{
width:130px;
color:#111111;
font-size:13px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.reDuihuan{
color:#888888;
font-size:12px;
}
.rewardStatus{
padding:5px 10px;
border:1px solid #999999;
color:#999999;
border-radius: 20%;
}
</style>
<template>
<view class="myVipList" :style="{ height: contentHeight }">
<!-- <u-empty v-if="dataList.length == 0" text="暂无奖励" mode="coupon"></u-empty> -->
<view
style="
height: calc(100vh );
width: calc(100vw);
overflow: hidden;
padding-bottom: 10px;
"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<!-- <view class="details" v-for="(x, i) in dataList" :key="i"> -->
<view class="myRewardContent">
<view class="reward_ImgDiv">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/studycardgq.png" alt="">
</view>
<view style="margin-left:15px;">
<view class="rewardTop">智慧改变生活阿萨德</view>
<view class="reDuihuan">剩余20天兑换</view>
</view>
<view>
<view class="rewardStatus">未兑换</view>
</view>
</view>
<!-- </view> -->
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
<!-- <view v-if="show==true" class="pu" @click="show=false">
<view class="pu-box">
<image mode="widthFix" :src="selectobj.CardBagIco" style="width: 100%;height: 100%;"></image>
<view class="pu-btoom">
<view>{{selectobj.CardNo}}</view>
<view style="margin-top: 12px;font-size: 12px;display: flex;flex-direction: row;align-items: center;">
<view style="margin-right: 10px;max-width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{useName}}</view>
{{selectobj.EndDate.split('T')[0].split('-')[1]+'/'+selectobj.EndDate.split('T')[0].split('-')[0].toString().substr(2, 2)}}
</view>
</view>
</view>
</view> -->
<!-- 取消提示 -->
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view>
</template>
<script>
import auth from "@/components/auth/index.vue";
export default {
components: {
auth
},
data() {
return {
pageTitle: "我的奖励",
showAuth:false,
u:{},
show:false,
mainColor: "",
contentHeight: 0,
msg:{
pageIndex: 1,
pageSize:10,
State:0 //状态 1未兑换 2已兑换 3已过期
},
page_count: 1,
dataList: [],
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
selectobj:{},
useName:'',
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
this.useName = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").Name:''
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad: function (option) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.init();
}
},
methods: {
init() {
this.request2(
{
url: '/api/AppletOrder/GetGoodsMyActivityPrizeList',
data: this.msg
},
res => {
if(res.resultCode==1){
console.log(res,'数据');
this.loading = false;
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.init();
},
//关闭登录窗口
gbAuth(){
uni.navigateBack()
},
},
};
</script>
<style>
.myVipList {
width: 100%;
height: 100%;
background: #FFF;
position: relative;
}
.myVipList .loading {
width: 180rpx;
height: 180rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top: 30%;
margin-left: -100rpx;
z-index: 999;
}
.myVipList .details{
width: 100%;
padding:0 15px;
margin-top: 15px;
display: flex;
flex-direction: column;
align-items: center;
}
.d-t-box{
width: 100%;
height: 83px;
border-radius: 6px;
overflow: hidden;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
.bj {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.2);
border-radius: 6px;
}
.btext{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
font-size: 12px;
padding: 15px;
color: #FFF;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.bj2{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: rgba(153, 153, 153, 0.6);
border-radius: 6px;
}
.btext-l{
width: 1;
flex:1;
margin-right: 20px;
font-size: 18px;
}
.btext-r{
width: 100px;
text-align: right;
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}
.myVipList .pu{
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.9);
position: fixed;
left: 0;
top: 0;
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
}
.pu-box{
width: 100%;
/* height: 230px; */
position: relative;
}
.pu-btoom{
width: 100%;
height: 100%;
color: #FFF;font-size: 15px;
position: absolute;
padding: 15px;
left: 0;
top: 0;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
</style>
......@@ -70,7 +70,8 @@
<Text style='font-size: 12px;margin-top: 5px;'>{{sharedata.CustomModel.ReferrerName}}{{sharedata.UserInfo.SuperiorName!=''&&sharedata.UserInfo.SuperiorName!=null?sharedata.UserInfo.SuperiorName:'总部'}}</Text>
<view style="display:flex;align-items: center;margin-top: 5px;">
<Text style='font-size: 12px;'>等级:</Text>
<image :src="sharedata.UserInfo.GradeIcon" style="width:67px;height:22px;"></image>
<image v-if="sharedata.UserInfo.GradeIcon!=''" :src="sharedata.UserInfo.GradeIcon" style="width:67px;height:22px;"></image>
<text v-else>{{sharedata.UserInfo.GradeName}}</text>
</view>
<Text style='font-size: 12px;margin-top: 5px;height:19px;'>{{sharedata.UserInfo.IsEnableFXGrade==1 && sharedata.UserInfo.IsVip==1?'会员日期:'+ sharedata.UserInfo.VipExpiryDate:''}}</Text>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment