This commit is contained in:
zpc 2025-03-22 16:46:02 +08:00
parent d7816a2bb7
commit 4b7a94a46f
6 changed files with 1128 additions and 1098 deletions

View File

@ -1,220 +1,278 @@
<!--
* @Date: 2023-11-16 19:08:42
* @LastEditTime: 2023-11-30 18:30:38
* @Description: content
-->
<template> <template>
<view class="content"> <view class="content">
<uni-nav-bar left-icon="left" title="我的收藏" color="#000000" backgroundColor="transparent" :fixed="true" <uni-nav-bar
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar> left-icon="left"
title="我的收藏"
color="#000000"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
></uni-nav-bar>
<!-- 顶部标签栏 -->
<scroll-view class="tab" scroll-x> <scroll-view class="tab" scroll-x>
<view class="tab-item flex center" v-for="(item, i) in tabList" :key="i" :class="{act: tabCur == i}" <view
@click="tabChange(i)"> class="tab-item"
v-for="(item, i) in tabList"
:key="i"
:class="{ active: tabCur === i }"
@click="tabChange(i)"
>
{{ item.title }} {{ item.title }}
</view> </view>
</scroll-view> </scroll-view>
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="getList" :down="downOption" <!-- 列表区域 -->
:up="upOption"> <mescroll-body
<view class="list"> ref="mescrollRef"
<view class="list-item common_bg" v-for="(item, i) in listData" :key="i" @click="toDetail(item)"> @init="mescrollInit"
<view class="pic center center"> @down="downCallback"
<image class="pic-img" :src="item.imgurl" lazy-load></image> @up="getList"
:down="downOption"
:up="upOption"
>
<view class="list" v-if="listData.length > 0">
<view
class="list-item"
v-for="(item, i) in listData"
:key="i"
@click="toDetail(item)"
>
<view class="pic">
<image
class="pic-img"
:src="item.imgurl"
mode="aspectFill"
lazy-load
></image>
</view> </view>
<view class="image3 common_bg" :style="{ backgroundImage: `url(${$img1('common/label1.png')})`}"> <view
<text> class="tag"
{{ tabList[tabCur].title }} :style="{ backgroundImage: `url(${$img1('common/label1.png')})` }"
</text> >
<text>{{ tabList[tabCur].title }}</text>
</view> </view>
<view class="title hang1"> <view class="title ellipsis">{{ item.goods_title }}</view>
{{ item.goods_title }}
</view>
<!-- <view class="redu" v-if="item.join_count">
<text>{{ item.join_count }}次参与</text>
</view>
<view class="redu" v-else>快去参与吧</view> -->
<view class="price-box"> <view class="price-box">
<view class="price"> <view class="price">
¥ ¥<text>{{ item.goods_price }}</text>
<text>{{ item.goods_price }}</text>
</view> </view>
<view v-if="item.stock" class="num-box"> <view v-if="item.stock" class="stock">
<view class="num">{{ item.surplus_stock }}/{{ item.stock }}</view> <view class="stock-num"
<view class="box icon"> >{{ item.surplus_stock }}/{{ item.stock }}</view
<image :src="$img1('index/box.png')" lazy-load></image> >
<image
class="stock-icon"
:src="$img1('index/box.png')"
lazy-load
></image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 空状态 -->
<view class="empty-state" v-if="listData.length === 0 && !isLoading">
<image
class="empty-image"
:src="$img1('common/empty.png')"
mode="aspectFit"
></image>
<text class="empty-text">暂无收藏内容</text>
</view> </view>
</mescroll-body> </mescroll-body>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
// (, ) //
downOption: { downOption: {
auto: false auto: false,
}, },
// (, ) //
upOption: { upOption: {
auto: true, auto: true,
page: { page: {
size: 10 // ,10 size: 10, //
}
}, },
tabList: [{ noMoreSize: 5, // ,5
id: 2, empty: {
title: '无限赏', use: false, // 使
label: '/static/img/bq1.png',
}, },
{
id: 8,
title: '领主赏',
label: '/static/img/bq5.png',
}, },
{ tabList: [], //
id: 9, tabCur: 0, //
title: '连击赏', listData: [], //
label: '/static/img/bq4.png', isLoading: true, //
}, };
// {
// id: 2,
// title: '',
// label:'/static/img/bq2.png',
// },
{
id: 1,
title: '一番赏',
label: '/static/img/bq3.png',
},
{
id: 6,
title: '全局赏'
}, },
// { created() {
// id: 3, //
// title: '' this.initTabList();
// },
// {
// id: 4,
// title: ''
// },
// {
// id: 5,
// title: ''
// },
// {
// id: 7,
// title: ''
// },
],
tabCur: 0,
listData: []
}
}, },
methods: { methods: {
toDetail(e) { /**
// * 初始化标签列表
let url = '/pages/shouye/detail' */
initTabList() {
const tabList = this.$config.getGoodType();
// id0
this.tabList = tabList.filter((item) => item.id !== 0);
},
if (e.type == 2 || e.type == 8) { /**
url = '/pages/shouye/detail_wuxian' * 初始化mescroll对象
} * @param {Object} mescroll mescroll实例
*/
mescrollInit(mescroll) {
this.mescroll = mescroll;
},
if (e.type == 9) { /**
url = '/package/index/lian-ji' * 下拉刷新回调
*/
downCallback() {
this.mescroll.resetUpScroll();
},
/**
* 跳转到详情页
* @param {Object} item 商品项
*/
toDetail(item) {
let url = "/pages/shouye/detail";
//
if (item.type === 2 || item.type === 8) {
url = "/pages/shouye/detail_wuxian";
} else if (item.type === 9) {
url = "/package/index/lian-ji";
} }
this.$c.to({ this.$c.to({
url, url,
query: { query: {
goods_id: e.goods_id, goods_id: item.goods_id,
type_text: this.tabList[this.tabCur].title type_text: this.tabList[this.tabCur].title,
} },
}) });
}, },
tabChange(i) {
this.tabCur = i
this.listData = []
this.mescroll.resetUpScroll()
this.mescroll.scrollTo(0, 0)
},
/** /**
* @description: 获取列表 * 切换标签
* @param {*} num * @param {Number} index 标签索引
* @param {*} size
* @return {*}
*/ */
getList({ tabChange(index) {
num, if (this.tabCur === index) return;
size
}) { this.tabCur = index;
this.req({ this.listData = [];
url: 'listCollect', this.isLoading = true;
data: {
page: num, //
type: this.tabList[this.tabCur].id this.mescroll.resetUpScroll();
this.mescroll.scrollTo(0, 0);
}, },
success: res => {
if (res.status == 1) { /**
if (num == 1) { * 获取收藏列表数据
this.listData = [] * @param {Object} params 分页参数
} */
this.listData = this.listData.concat(res.data.data) getList({ num, size }) {
this.mescroll.endByPage(res.data.data.length, res.data.last_page) this.isLoading = true;
// 使PromiseAPI
this.$request
.post("listCollect", {
page: num,
type: this.tabList[this.tabCur].id,
})
.then((res) => {
this.isLoading = false;
if (res.status === 1) {
//
if (num === 1) {
this.listData = [];
} }
//
this.listData = this.listData.concat(res.data.data || []);
//
this.mescroll.endByPage(
res.data.data ? res.data.data.length : 0,
res.data.last_page || 1
);
} else {
this.mescroll.endErr();
uni.showToast({
title: res.msg || "加载失败",
icon: "none",
});
} }
}) })
} .catch((err) => {
} this.isLoading = false;
} this.mescroll.endErr();
uni.showToast({
title: "网络请求失败",
icon: "none",
});
console.error(err);
});
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
.content { .content {
background-color: #F7F7F7; background-color: #f7f7f7;
min-height: 100vh;
//
.tab { .tab {
white-space: nowrap; white-space: nowrap;
padding: 15rpx 0;
.tab-item { .tab-item {
width: 88rpx; width: 88rpx;
height: 40rpx; height: 40rpx;
position: relative;
display: inline-flex; display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 30rpx; margin-left: 30rpx;
background-color: #FFFFFF; background-color: #ffffff;
font-size: 20rpx; font-size: 20rpx;
border-radius: 8rpx; border-radius: 8rpx;
color: #333333;
transition: all 0.2s;
&:last-child { &:last-child {
margin-right: 30rpx; margin-right: 30rpx;
} }
font-weight: 400; &.active {
color: #333333; background-color: #e6f791;
font-weight: 500;
&.act {
background-color: #E6F791;
} }
} }
} }
//
.list { .list {
padding: 1rpx 30rpx 30rpx; padding: 15rpx 30rpx 30rpx;
display: flex; display: flex;
flex-flow: row wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
.list-item { .list-item {
@ -222,8 +280,10 @@
height: 487rpx; height: 487rpx;
margin-top: 30rpx; margin-top: 30rpx;
position: relative; position: relative;
background-color: #FFFFFF; background-color: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
.pic { .pic {
width: 100%; width: 100%;
@ -231,21 +291,18 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #D8D8D8; background-color: #f5f5f5;
border-radius: 16rpx 16rpx 0rpx 0rpx; border-radius: 16rpx 16rpx 0 0;
// overflow: hidden; overflow: hidden;
.pic-img { .pic-img {
// width: 290rpx;
// height: 290rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 16rpx 16rpx 0 0;
}
} }
} .tag {
.image3 {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
top: 12rpx; top: 12rpx;
@ -255,75 +312,88 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-size: 100% 100%;
text { text {
font-size: 14rpx; font-size: 14rpx;
font-weight: 400; color: #ffffff;
color: #FFFFFF;
} }
} }
.title { .title {
padding: 20rpx 20rpx 0; padding: 20rpx 20rpx 0;
font-size: 20rpx; font-size: 20rpx;
font-weight: 400;
color: #333333;
}
.redu {
margin-top: 10rpx;
padding-left: 20rpx;
font-size: 24rpx;
font-weight: 400;
color: #cccccc;
}
.hot-num {
padding: 10rpx 20rpx 0;
font-size: 24rpx;
font-weight: 400;
color: #333333; color: #333333;
line-height: 1.4;
height: 56rpx;
} }
.price-box { .price-box {
padding: 64rpx 20rpx 10rpx; padding: 20rpx 20rpx 10rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
position: absolute;
bottom: 0;
left: 0;
right: 0;
.price { .price {
font-size: 16rpx; font-size: 16rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333; color: #333333;
text { text {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500;
} }
} }
.num-box { .stock {
display: flex; display: flex;
align-items: center; align-items: center;
.num { .stock-num {
font-size: 24rpx; font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #cccccc; color: #cccccc;
} }
.box { .stock-icon {
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;
margin-left: 6rpx; margin-left: 6rpx;
} }
}
}
}
}
.icon {} //
} .empty-state {
} display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
.empty-image {
width: 200rpx;
height: 200rpx;
margin-bottom: 20rpx;
}
.empty-text {
font-size: 28rpx;
color: #999;
} }
} }
//
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
}
</style> </style>

View File

@ -1,157 +1,138 @@
<template> <template>
<view class="content"> <view class="content">
<uni-nav-bar left-icon="left" title="币记录" color="#000000" backgroundColor="transparent" :fixed="true" <uni-nav-bar
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar> left-icon="left"
:title="$config.getAppSetting('currency1_name') + '记录'"
<!-- <view class="tab-list"> color="#000000"
<view backgroundColor="transparent"
@click="getlist(i)" :fixed="true"
v-for="(item, i) in arr" :statusBar="true"
:key="i" :border="false"
class="tab-list-item" @clickLeft="$c.back"
:class="{ ></uni-nav-bar>
active: show == i
}"
>
{{ item }}
<view v-if="show == i" class="arrow"></view>
</view>
</view> -->
<!-- <view class="head">
<view
class="status_bar"
:style="'height:' + statusBarHeight + 'px;'"
></view>
<view class="header_title">
<view @click="back()">
返回
</view>
<view class="hang1">星钻记录</view>
</view>
<view class="qiehuan">
<view @click="getlist(i)" v-for="(v, i) in arr" :key="i">
<view :class="show == i ? 'xzs' : 'wzs'">{{ v }}</view>
<view class="qiehuan_line" v-if="show == i">
</view>
</view>
</view>
</view> -->
<!-- <view class="header">
</view> -->
<!-- 内容 --> <!-- 内容 -->
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> <mescroll-body
ref="mescrollRef"
@init="mescrollInit"
:down="downOption"
@down="downCallback"
@up="upCallback"
>
<view class="coupon flex column"> <view class="coupon flex column">
<view v-for="(item, index) in aixuanArr" :key="index" class="coupon_item" <view
:style="'border:' + (index == aixuanArr.length - 1 ? 'none' : '')"> v-for="(item, index) in aixuanArr"
:key="index"
<view class="coupon_item_1" style="margin-left: 32rpx;"> class="coupon_item"
:style="'border:' + (index == aixuanArr.length - 1 ? 'none' : '')"
>
<view class="coupon_item_1" style="margin-left: 32rpx">
<view>{{ item.content }}</view> <view>{{ item.content }}</view>
<view>{{ item.addtime }}</view> <view>{{ item.addtime }}</view>
</view> </view>
<view class="coupon_r flex_center" style="margin-right: 32rpx;"> <view class="coupon_r flex_center" style="margin-right: 32rpx">
<text>{{ item.change_money }}</text> <text>{{ item.change_money }}</text>
<!-- <image src="../../static/mine/$.png"></image> -->
</view> </view>
<view <view
style="width: 622rpx; height: 2rpx; background-color: #F3F3F3; position: absolute; bottom: 2rpx; left: 32rpx;"> style="
width: 622rpx;
height: 2rpx;
background-color: #f3f3f3;
position: absolute;
bottom: 2rpx;
left: 32rpx;
"
>
</view> </view>
</view> </view>
</view> </view>
</mescroll-body> </mescroll-body>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
z_imgPath: this.$z_img2 + 'mine/', z_imgPath: this.$z_img2 + "mine/",
statusBarHeight: uni.getSystemInfoSync().statusBarHeight, statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
arr: ['全部', '收入', '支出'], arr: ["全部", "收入", "支出"],
show: 0, show: 0,
aixuanArr: [], aixuanArr: [],
downOption: { downOption: {
auto: false auto: false,
}
}
}, },
onLoad(e) { };
}, },
onLoad(e) {},
methods: { methods: {
back() { back() {
uni.navigateBack() uni.navigateBack();
}, },
getlist(v) { getlist(v) {
this.show = v this.show = v;
this.aixuanArr = [] this.aixuanArr = [];
this.mescroll.resetUpScroll() this.mescroll.resetUpScroll();
}, },
/*下拉刷新的回调 */ /*下拉刷新的回调 */
downCallback() { downCallback() {
this.mescroll.resetUpScroll() this.mescroll.resetUpScroll();
}, },
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */ /*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) { upCallback(page) {
// //
this.loadData(page.num) this.loadData(page.num);
}, },
loadData(pageNo) { loadData(pageNo) {
// //
let that = this let that = this;
that.req({ that.req({
url: 'profitIntegral', url: "profitIntegral",
Loading: true, Loading: true,
data: { data: {
page: pageNo, page: pageNo,
type: that.show type: that.show,
}, },
success(res) { success(res) {
that.mescroll.endByPage(res.data.data.length, res.data.last_page) that.mescroll.endByPage(res.data.data.length, res.data.last_page);
if (pageNo == 1) { if (pageNo == 1) {
that.aixuanArr = res.data.data that.aixuanArr = res.data.data;
} else { } else {
that.aixuanArr = that.aixuanArr.concat(res.data.data) that.aixuanArr = that.aixuanArr.concat(res.data.data);
}
}
})
}
}
} }
},
});
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
.coupon_r>image { .coupon_r > image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
.coupon_r { .coupon_r {
font-size: 32rpx; font-size: 32rpx;
/* font-family: 'zcq'; */ /* font-family: 'zcq'; */
color: #333333; color: #333333;
} }
.coupon_item_1>view:nth-of-type(2) { .coupon_item_1 > view:nth-of-type(2) {
font-size: 24rpx; font-size: 24rpx;
color: #676767; color: #676767;
margin-top: 10rpx; margin-top: 10rpx;
} }
.coupon_item_1>view:nth-of-type(1) { .coupon_item_1 > view:nth-of-type(1) {
font-size: 28rpx; font-size: 28rpx;
// font-weight: bold; // font-weight: bold;
color: #333333; color: #333333;
} }
.coupon_item { .coupon_item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -161,56 +142,56 @@
// margin-top: 20rpx; // margin-top: 20rpx;
// border-radius: 10rpx; // border-radius: 10rpx;
position: relative; position: relative;
} }
.coupon { .coupon {
width: 686rpx; width: 686rpx;
margin: 20rpx auto; margin: 20rpx auto;
/* background: #11141D; /* background: #11141D;
box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7); box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7);
padding: 0 30rpx; */ padding: 0 30rpx; */
box-sizing: border-box; box-sizing: border-box;
background-color: #FFFFFF; background-color: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
} }
.qiehuan { .qiehuan {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 16rpx; margin-top: 16rpx;
width: 400rpx; width: 400rpx;
} }
.qiehuan_line { .qiehuan_line {
margin: -10rpx auto; margin: -10rpx auto;
width: 30rpx; width: 30rpx;
height: 20rpx; height: 20rpx;
border-bottom: 4rpx solid #70ede8; border-bottom: 4rpx solid #70ede8;
border-radius: 2rpx; border-radius: 2rpx;
} }
.qiehuan_line>image { .qiehuan_line > image {
width: 30rpx; width: 30rpx;
height: 20rpx; height: 20rpx;
} }
.qiehuan>view { .qiehuan > view {
flex: 1; flex: 1;
text-align: center; text-align: center;
} }
.wzs { .wzs {
font-size: 34rpx; font-size: 34rpx;
color: rgba(255, 255, 255, 0.6); color: rgba(255, 255, 255, 0.6);
} }
.xzs { .xzs {
font-size: 34rpx; font-size: 34rpx;
color: #ffffff; color: #ffffff;
} }
.header { .header {
width: 750rpx; width: 750rpx;
/* height: 176rpx; */ /* height: 176rpx; */
padding-bottom: 30rpx; padding-bottom: 30rpx;
@ -226,14 +207,14 @@
top: 88rpx; top: 88rpx;
/* #endif */ /* #endif */
z-index: 15; z-index: 15;
} }
.content { .content {
width: 100vw; width: 100vw;
min-height: 100vh; min-height: 100vh;
box-sizing: border-box; box-sizing: border-box;
// color: #fff; // color: #fff;
background-color: #F7F7F7; background-color: #f7f7f7;
.head { .head {
position: fixed; position: fixed;
@ -251,12 +232,12 @@
padding-left: 30rpx; padding-left: 30rpx;
box-sizing: border-box; box-sizing: border-box;
>view:nth-of-type(1) { > view:nth-of-type(1) {
display: flex; display: flex;
align-items: center; align-items: center;
} }
>view:nth-of-type(2) { > view:nth-of-type(2) {
width: 520rpx; width: 520rpx;
text-align: center; text-align: center;
/* margin: auto; */ /* margin: auto; */
@ -268,9 +249,9 @@
} }
} }
} }
} }
.tab-list { .tab-list {
display: flex; display: flex;
padding: 30rpx; padding: 30rpx;
@ -300,5 +281,5 @@
background-clip: text; background-clip: text;
} }
} }
} }
</style> </style>

View File

@ -89,6 +89,7 @@ export default {
*/ */
back() { back() {
uni.navigateBack(); uni.navigateBack();
}, },
/** /**

View File

@ -1,49 +1,31 @@
<template> <template>
<view class="content"> <view class="content">
<uni-nav-bar left-icon="left" title="兑换记录" color="#000000" backgroundColor="transparent" :fixed="true" <uni-nav-bar
:statusBar="true" :border="false" @clickLeft="back"></uni-nav-bar> left-icon="left"
title="兑换记录"
color="#000000"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="back"
></uni-nav-bar>
<!-- <view class="tab-list"> <mescroll-body
<view ref="mescrollRef"
@click="getlist(i + 1)" @init="mescrollInit"
v-for="(item, i) in arr" :down="downOption"
:key="i" @down="downCallback"
class="tab-list-item" @up="upCallback"
:class="{
active: show == i + 1
}"
> >
{{ item }}
<image
v-if="show == i + 1"
class="arrow"
:src="$img('/static/img/tab_arrow.png')"
mode="scaleToFill"
/>
</view>
</view> -->
<!-- <view class="head">
<view
class="status_bar"
:style="'height:' + statusBarHeight + 'px;'"
></view>
<view class="header_title">
<view @click="back()">
返回
</view>
<view class="hang1">打包记录</view>
</view>
</view> -->
<!-- 内容 -->
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
<view class="xuyuan br20" v-for="(v, i) in listData" :key="i"> <view class="xuyuan br20" v-for="(v, i) in listData" :key="i">
<view class="xuyuan_head"> <view class="xuyuan_head">
<view style="opacity: 1; color: #8A8A8A; font-size: 20rpx;">打包时间{{ v.addtime }}</view> <view style="opacity: 1; color: #8a8a8a; font-size: 20rpx"
<view style="font-size: 20rpx; color: #8A8A8A;"> >打包时间{{ v.addtime }}</view
>
<view style="font-size: 20rpx; color: #8a8a8a">
<text style="margin: 0 4rpx; color: #333333;">{{ v.count }}</text> <text style="margin: 0 4rpx; color: #333333">{{ v.count }}</text>
</view> </view>
</view> </view>
@ -51,34 +33,23 @@
<view class="xuyuan_item" v-for="(a, b) in v.order_list" :key="b"> <view class="xuyuan_item" v-for="(a, b) in v.order_list" :key="b">
<view class="list_img"> <view class="list_img">
<image :src="a.goodslist_imgurl"></image> <image :src="a.goodslist_imgurl"></image>
<!-- <view class="shang_title center"> <view class="allNum">{{ a.prize_num }}</view>
<view class="num">×{{ a.prize_num }}</view>
</view> -->
<view class="allNum">{{a.prize_num}}</view>
</view> </view>
<view class="xuyuan_item_2 column center"> <view class="xuyuan_item_2 column center">
<view class="hang1 mt10" style="width: 180rpx;">{{ a.goodslist_title }}</view> <view class="hang1 mt10" style="width: 180rpx">{{
<view class="hang1 mt10">兑换价{{ a.goodslist_money }}</view> a.goodslist_title
}}</view>
<view class="hang1 mt10"
>兑换价{{ a.goodslist_money * 100 }}</view
>
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="xuyuan_con">
<view class="xuyuan_item" v-for="(a, b) in v.order_list" :key="b">
<view class="list_img">
<image :src="a.goodslist_imgurl"></image>
<view class="shang_title">
{{ a.shang_title }} X{{ a.prize_num }}
</view>
</view>
<view class="xuyuan_item_2 flex_center">
<view class="hang1">{{ a.goodslist_title }}</view>
</view>
</view>
</view> -->
<view class="xuyuan_foot"> <view class="xuyuan_foot">
<view> <view>
共计兑换星钻 共计兑换{{ $config.getAppSetting("currency2_name") }}
<text style="color: #333333">{{ v.money }}</text> <text style="color: #333333">{{ v.money * 100 }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -87,79 +58,79 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
z_imgPath: this.$z_img2 + 'mine/', z_imgPath: this.$z_img2 + "mine/",
statusBarHeight: uni.getSystemInfoSync().statusBarHeight, statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
downOption: { downOption: {
auto: false auto: false,
}, },
listData: [] listData: [],
} };
}, },
onLoad(e) {}, onLoad(e) {},
methods: { methods: {
back() { back() {
uni.navigateBack() uni.navigateBack();
}, },
/*下拉刷新的回调 */ /*下拉刷新的回调 */
downCallback() { downCallback() {
this.mescroll.resetUpScroll() this.mescroll.resetUpScroll();
}, },
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */ /*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) { upCallback(page) {
// //
this.loadData(page.num) this.loadData(page.num);
}, },
loadData(pageNo) { loadData(pageNo) {
// //
let that = this let that = this;
that.req({ that.req({
url: 'warehouse_recovery_record', url: "warehouse_recovery_record",
Loading: true, Loading: true,
data: { data: {
page: pageNo page: pageNo,
}, },
success(res) { success(res) {
that.mescroll.endByPage(res.data.data.length, res.data.last_page) that.mescroll.endByPage(res.data.data.length, res.data.last_page);
if (pageNo == 1) { if (pageNo == 1) {
that.listData = res.data.data that.listData = res.data.data;
} else { } else {
that.listData = that.listData.concat(res.data.data) that.listData = that.listData.concat(res.data.data);
}
}
})
}
}
} }
},
});
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
.xuyuan_foot { .xuyuan_foot {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
padding: 30rpx; padding: 30rpx;
font-size: 20rpx; font-size: 20rpx;
color: #333333; color: #333333;
} }
.xuyuan_item_2 { .xuyuan_item_2 {
color: #333333; color: #333333;
font-size: 20rpx; font-size: 20rpx;
width: 100%; width: 100%;
margin-top: 4rpx; margin-top: 4rpx;
padding: 0 10rpx; padding: 0 10rpx;
>view:nth-child(2) { > view:nth-child(2) {
font-weight: 400; font-weight: 400;
font-size: 16rpx; font-size: 16rpx;
color: #8A8A8A; color: #8a8a8a;
}
} }
}
.allNum { .allNum {
position: absolute; position: absolute;
bottom: 10rpx; bottom: 10rpx;
left: 50%; left: 50%;
@ -169,9 +140,9 @@
border-radius: 20rpx; border-radius: 20rpx;
color: #fff; color: #fff;
padding: 5rpx 20rpx; padding: 5rpx 20rpx;
} }
.list_img .shang_title { .list_img .shang_title {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
@ -203,14 +174,14 @@
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
} }
} }
.list_img>image { .list_img > image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.list_img { .list_img {
width: 100%; width: 100%;
height: 180rpx; height: 180rpx;
position: relative; position: relative;
@ -218,9 +189,9 @@
background: #333333; background: #333333;
border-radius: 20rpx; border-radius: 20rpx;
position: relative; position: relative;
} }
.xuyuan_item { .xuyuan_item {
width: 180rpx; width: 180rpx;
box-sizing: border-box; box-sizing: border-box;
margin-right: 20rpx; margin-right: 20rpx;
@ -228,20 +199,19 @@
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.xuyuan_con { .xuyuan_con {
display: flex; display: flex;
margin: 14rpx auto 0; margin: 14rpx auto 0;
width: 630rpx; width: 630rpx;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1rpx solid #F3F3F3; border-bottom: 1rpx solid #f3f3f3;
padding-bottom: 20rpx; padding-bottom: 20rpx;
overflow-x: scroll; overflow-x: scroll;
}
} .xuyuan_head {
.xuyuan_head {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -252,20 +222,20 @@
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
} }
.xuyuan { .xuyuan {
width: 690rpx; width: 690rpx;
margin: 20rpx auto; margin: 20rpx auto;
padding-top: 10rpx; padding-top: 10rpx;
background: #FFFFFF; background: #ffffff;
} }
.content { .content {
width: 100vw; width: 100vw;
min-height: 100vh; min-height: 100vh;
box-sizing: border-box; box-sizing: border-box;
background-color: #F7F7F7; background-color: #f7f7f7;
.head { .head {
position: fixed; position: fixed;
@ -283,12 +253,12 @@
padding-left: 30rpx; padding-left: 30rpx;
box-sizing: border-box; box-sizing: border-box;
>view:nth-of-type(1) { > view:nth-of-type(1) {
display: flex; display: flex;
align-items: center; align-items: center;
} }
>view:nth-of-type(2) { > view:nth-of-type(2) {
width: 520rpx; width: 520rpx;
text-align: center; text-align: center;
/* margin: auto; */ /* margin: auto; */
@ -300,9 +270,9 @@
} }
} }
} }
} }
.tab-list { .tab-list {
display: flex; display: flex;
padding: 30rpx; padding: 30rpx;
@ -328,5 +298,5 @@
text-shadow: 0 0 10rpx #ba39ff; text-shadow: 0 0 10rpx #ba39ff;
} }
} }
} }
</style> </style>

View File

@ -39,19 +39,6 @@
<image style="width: 206rpx; height: 206rpx; position: absolute; top: -40rpx; right: 8rpx;" <image style="width: 206rpx; height: 206rpx; position: absolute; top: -40rpx; right: 8rpx;"
:src="$img1('my/ou.png')"></image> :src="$img1('my/ou.png')"></image>
</view> </view>
<!-- <view class="rbtn flex" @click="$c.to({ url: '/pages/user/vip' })">
<image class="img100" :src="$img1('my/huiyuan.png')"></image>
</view> -->
<!-- <view class="rbtn btn1 flex" @click="$c.to({ url: '/package/index/sign' })">
<image class="img100" :src="$img1('my/sign.png')"></image>
</view> -->
<!-- <view class="rbtn btn1 flex">
<button class="hide" open-type="contact"></button>
<image class="img100" :src="$img1('my/kefu.png')"></image>
</view> -->
</view> </view>
<view class=""> <view class="">
@ -61,12 +48,12 @@
<view class="other-num"> <view class="other-num">
<view class="other-item" @click="$c.to({ url: '/pages/user/bi_jl' })"> <view class="other-item" @click="$c.to({ url: '/pages/user/bi_jl' })">
<view class="num" style="color: #333333;">{{ userinfo.integral || 0 }}</view> <view class="num" style="color: #333333;">{{ userinfo.integral || 0 }}</view>
<view class="title">吧唧币</view> <view class="title">{{$config.getAppSetting('currency1_name')}}</view>
</view> </view>
<view class="other-item" @click="$c.to({ url: '/pages/user/jf_jl' })"> <view class="other-item" @click="$c.to({ url: '/pages/user/jf_jl' })">
<view class="num" style="color: #333333;">{{ userinfo.score || 0 }}</view> <view class="num" style="color: #333333;">{{ userinfo.score || 0 }}</view>
<view class="title">积分</view> <view class="title">{{$config.getAppSetting('currency2_name')}}</view>
</view> </view>
<!-- <view class="other-item" @click="$c.to({ url: '/pages/user/my_coupon' })"> <!-- <view class="other-item" @click="$c.to({ url: '/pages/user/my_coupon' })">
@ -77,7 +64,7 @@
<view class="money align-center justify-between br20"> <view class="money align-center justify-between br20">
<view class="align-center" style="margin-left: 32rpx;"> <view class="align-center" style="margin-left: 32rpx;">
<text style="color: #333333; font-size: 28rpx;">星钻</text> <text style="color: #333333; font-size: 28rpx;">{{$config.getAppSetting('balance_name')}}</text>
</view> </view>
<view class="money-detail" @click="$c.to({ url: '/pages/user/yetx' })"> <view class="money-detail" @click="$c.to({ url: '/pages/user/yetx' })">
<text>{{ userinfo.money || '0.00' }}</text> <text>{{ userinfo.money || '0.00' }}</text>

View File

@ -1,11 +1,24 @@
<template> <template>
<view class="content"> <view class="content">
<uni-nav-bar left-icon="left" title="我的星钻" color="#000000" backgroundColor="transparent" :fixed="true" <uni-nav-bar
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar> left-icon="left"
:title="$config.getAppSetting('balance_name') + '记录'"
color="#000000"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
></uni-nav-bar>
<view class="tab-list align-center"> <view class="tab-list align-center">
<view @click="getlist(i)" v-for="(item, i) in arr" :key="i" class="tab-list-item" <view
:class="{active: show == i}"> @click="getlist(i)"
v-for="(item, i) in arr"
:key="i"
class="tab-list-item"
:class="{ active: show == i }"
>
{{ item }} {{ item }}
<view v-if="show == i" class="arrow"></view> <view v-if="show == i" class="arrow"></view>
@ -22,9 +35,19 @@
</view> </view>
</view> --> </view> -->
<!-- 内容 --> <!-- 内容 -->
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> <mescroll-body
ref="mescrollRef"
@init="mescrollInit"
:down="downOption"
@down="downCallback"
@up="upCallback"
>
<view class="coupon"> <view class="coupon">
<view v-for="(item, index) in listData" :key="index" class="coupon_item"> <view
v-for="(item, index) in listData"
:key="index"
class="coupon_item"
>
<view class="coupon_item_1"> <view class="coupon_item_1">
<view>{{ item.content }}</view> <view>{{ item.content }}</view>
<view>{{ item.addtime }}</view> <view>{{ item.addtime }}</view>
@ -37,20 +60,20 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
z_imgPath: this.$z_img2 + 'mine/', z_imgPath: this.$z_img2 + "mine/",
statusBarHeight: uni.getSystemInfoSync().statusBarHeight, statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
arr: ['全部', '收入', '支出', '兑换'], arr: ["全部", "收入", "支出", "兑换"],
show: 0, show: 0,
listData: [], listData: [],
// //
downOption: { downOption: {
auto: false auto: false,
} },
} };
}, },
onLoad(e) { onLoad(e) {
// setTimeout(() => { // setTimeout(() => {
@ -65,73 +88,73 @@
}, },
methods: { methods: {
back() { back() {
uni.navigateBack() uni.navigateBack();
}, },
getlist(v) { getlist(v) {
this.show = v this.show = v;
this.aixuanArr = [] this.aixuanArr = [];
this.mescroll.resetUpScroll() this.mescroll.resetUpScroll();
}, },
/*下拉刷新的回调 */ /*下拉刷新的回调 */
downCallback() { downCallback() {
this.mescroll.resetUpScroll() this.mescroll.resetUpScroll();
}, },
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */ /*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) { upCallback(page) {
// //
this.loadData(page.num) this.loadData(page.num);
}, },
loadData(pageNo) { loadData(pageNo) {
// //
let that = this let that = this;
that.req({ that.req({
url: 'profitMoney', url: "profitMoney",
Loading: true, Loading: true,
data: { data: {
page: pageNo, page: pageNo,
type: that.show type: that.show,
}, },
success(res) { success(res) {
that.mescroll.endByPage(res.data.data.length, res.data.last_page) that.mescroll.endByPage(res.data.data.length, res.data.last_page);
if (pageNo == 1) { if (pageNo == 1) {
that.listData = res.data.data that.listData = res.data.data;
} else { } else {
that.listData = that.listData.concat(res.data.data) that.listData = that.listData.concat(res.data.data);
}
}
})
}
}
} }
},
});
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
.coupon_r>image { .coupon_r > image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
.coupon_r { .coupon_r {
font-size: 24rpx; font-size: 24rpx;
/* font-family: 'zcq'; */ /* font-family: 'zcq'; */
color: #333333; color: #333333;
} }
.coupon_item_1>view:nth-of-type(2) { .coupon_item_1 > view:nth-of-type(2) {
font-size: 16rpx; font-size: 16rpx;
color: #676767; color: #676767;
margin-top: 10rpx; margin-top: 10rpx;
} }
.coupon_item_1>view:nth-of-type(1) { .coupon_item_1 > view:nth-of-type(1) {
font-size: 20rpx; font-size: 20rpx;
// font-weight: bold; // font-weight: bold;
color: #333333; color: #333333;
} }
.coupon_item { .coupon_item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -141,59 +164,59 @@
// margin-top: 20rpx; // margin-top: 20rpx;
// border-radius: 10rpx; // border-radius: 10rpx;
position: relative; position: relative;
border-bottom: 1px solid #F3F3F3; border-bottom: 1px solid #f3f3f3;
} }
.coupon { .coupon {
width: 690rpx; width: 690rpx;
margin: 20rpx auto; margin: 20rpx auto;
/* background: #11141D; /* background: #11141D;
box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7); box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7);
padding: 0 30rpx; */ padding: 0 30rpx; */
box-sizing: border-box; box-sizing: border-box;
background-color: #FFFFFF; background-color: #ffffff;
padding: 0 32rpx; padding: 0 32rpx;
border-radius: 16rpx; border-radius: 16rpx;
/* border-radius: 20rpx; */ /* border-radius: 20rpx; */
} }
.qiehuan { .qiehuan {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 16rpx; margin-top: 16rpx;
width: 400rpx; width: 400rpx;
} }
.qiehuan_line { .qiehuan_line {
margin: -10rpx auto; margin: -10rpx auto;
width: 30rpx; width: 30rpx;
height: 20rpx; height: 20rpx;
border-bottom: 4rpx solid #70ede8; border-bottom: 4rpx solid #70ede8;
border-radius: 2rpx; border-radius: 2rpx;
} }
.qiehuan_line>image { .qiehuan_line > image {
width: 30rpx; width: 30rpx;
height: 20rpx; height: 20rpx;
} }
.qiehuan>view { .qiehuan > view {
flex: 1; flex: 1;
text-align: center; text-align: center;
} }
.wzs { .wzs {
font-size: 34rpx; font-size: 34rpx;
color: rgba(255, 255, 255, 0.6); color: rgba(255, 255, 255, 0.6);
} }
.xzs { .xzs {
font-size: 34rpx; font-size: 34rpx;
color: #ffffff; color: #ffffff;
} }
.header { .header {
width: 750rpx; width: 750rpx;
/* height: 176rpx; */ /* height: 176rpx; */
padding-bottom: 30rpx; padding-bottom: 30rpx;
@ -209,13 +232,13 @@
top: 88rpx; top: 88rpx;
/* #endif */ /* #endif */
z-index: 15; z-index: 15;
} }
.content { .content {
width: 100vw; width: 100vw;
min-height: 100vh; min-height: 100vh;
box-sizing: border-box; box-sizing: border-box;
background-color: #F7F7F7; background-color: #f7f7f7;
.head { .head {
position: fixed; position: fixed;
@ -233,12 +256,12 @@
padding-left: 30rpx; padding-left: 30rpx;
box-sizing: border-box; box-sizing: border-box;
>view:nth-of-type(1) { > view:nth-of-type(1) {
display: flex; display: flex;
align-items: center; align-items: center;
} }
>view:nth-of-type(2) { > view:nth-of-type(2) {
width: 520rpx; width: 520rpx;
text-align: center; text-align: center;
/* margin: auto; */ /* margin: auto; */
@ -250,9 +273,9 @@
} }
} }
} }
} }
.tab-list { .tab-list {
display: flex; display: flex;
padding: 30rpx; padding: 30rpx;
@ -264,19 +287,17 @@
font-size: 20rpx; font-size: 20rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
background-color: #FFFFFF; background-color: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 8rpx; border-radius: 8rpx;
&.active { &.active {
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
background-color: #E6F791; background-color: #e6f791;
}
} }
} }
}
</style> </style>