已领商品及已领dt积分同步

This commit is contained in:
2022-08-31 17:07:26 +08:00
parent a6ec9a8d45
commit d34745adc2
8 changed files with 988 additions and 426 deletions

View File

@@ -9,8 +9,8 @@ import router from '../router'
// 基础配置
const config = {
apiUrl : 'https://api.gongli.vip/api/', // 正式环境
// apiUrl: 'http://api.gl.shangkelian.cn/api/', // 测试
// apiUrl : 'https://api.gongli.vip/api/', // 正式环境
apiUrl: 'http://api.gl.shangkelian.cn/api/', // 测试
timeout: 60000
}

View File

@@ -0,0 +1,146 @@
<template>
<view class="goods-item">
<image src="/static/background/supplier_back.png" mode="aspectFill" class="goods-cover" />
<view class="goods-info">
<view class="_title">京东直营电脑类商品 mac 笔记本 鼠标键盘</view>
<view class="_des">店铺名称 </view>
<view class="_pin">
<view class="_has" > <image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已免费领取 12 </view>
<!-- <view class="tuan">11人参与活动</view> -->
</view>
<view class="price">
<view class="money">110 <span>DT积分</span> </view>
<view class="now-pin" @click="goPin('11')">查看详情</view>
</view>
<view class="pin"> 奖励 </view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
props: {
item: {
type: Object,
default: {},
}
},
methods: {
goPin(id) {
this.$emit('goPin',id)
}
},
};
</script>
<style lang="scss" scoped>
.goods-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
background-color: white;
border-radius: 10rpx;
padding: $padding;
margin-bottom: 20rpx;
position: relative;
.pin{
position: absolute;
background-color: #e74a45;
border-radius:0 0 30rpx 0 ;
padding: 2rpx 30rpx 2rpx 30rpx;
color: #fff;
left: 0;
top: 0;
font-size: 28rpx;
font-weight: bold;
}
.goods-cover {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
.goods-info {
width: calc(100% - 160rpx - 30rpx);
padding-left: $padding;
._title {
overflow: hidden;
font-size: 30rpx;
font-weight: 600;
white-space: nowrap;
text-overflow: ellipsis;
}
._des {
font-size: 28rpx;
padding: 6rpx 0;
color: #4f300a;
}
._pin {
font-size: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: $text-gray;
._has {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
color: #e74a45;
background-color: rgba($color: $text-price, $alpha: 0.1);
padding: 4rpx 10rpx;
border-radius: 30rpx;
margin-right: $margin;
image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
}
.price {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: 20rpx;
.money {
font-size: 34rpx;
font-weight: 600;
color: #e74a45;
span{
font-size: 24rpx;
margin-left: 10rpx;
font-weight: normal;
}
}
.now-pin {
border: solid #cacaca 1rpx;
font-size: 26rpx;
font-weight: bold;
padding: 6rpx 20rpx;
border-radius: 20rpx;
color: #999;
}
}
}
}
</style>

View File

@@ -79,8 +79,8 @@
<image src="../../static/img/house_back.jpg" mode="aspectFill"></image>
</view>
<view class="life-flex-item both">
<!-- <view class="both-item team" @click="onNav({name: 'Mission'}, '')"> -->
<view class="both-item team" @click="onToast('努力开发中~')">
<view class="both-item team" @click="onNav({name: 'Mission'}, '')">
<!-- <view class="both-item team" @click="onToast('努力开发中~')"> -->
<view class="team-content">
<view class="team-title">奖励任务</view>
<view class="team-subtitle">完成任务可获DT积分/奖励</view>

View File

@@ -2,44 +2,87 @@
<view class="content">
<view class="dt-header">
<view class="title">已领取商品数量</view>
<view class="num">{{glz}}</view>
<view class="num">{{glz}}<span></span></view>
</view>
<view class="logs-title">账户记录</view>
<block v-if="log.length > 0">
<view class="logs-item" v-for="(item, index) in log" :key="index">
<view class="logs-item-title">{{item.remark}}</view>
<view class="logs-item-time">{{item.created_at}}</view>
<view class="logs-item-price" :class="item.amount > 0 ? 'add': 'remove'">{{item.amount}}</view>
</view>
<view class="logs-title">领取记录</view>
<block v-if="array.length >= 1">
<view style="padding: 0 30rpx;">
<!-- 订单列表 -->
<missionsGoodsItem v-for="(item, arrayIndex) in array" :order-info="item" :key="arrayIndex"
@onBtn="onType" />
<!-- 加载更多 -->
<view class="pages-load">
<u-loadmore :status="status" />
</view>
</view>
</block>
<block v-else>
<view class="vertical pages-empty">
<u-empty icon="http://cdn.uviewui.com/uview/empty/list.png" textColor="#999" text="暂无领取记录~" />
<view class="vertical order-null">
<u-empty mode="order" icon="http://cdn.uviewui.com/uview/empty/order.png" text="暂无领取记录"
textColor="#999" />
</view>
</block>
</view>
</template>
<script>
import { integral } from '@/apis/interfaces/account.js'
import missionsGoodsItem from '@/components/missions-goods-item/index.vue'
import {myPinList} from '@/apis/interfaces/pin'
export default {
components:{
missionsGoodsItem
},
data() {
return {
status: "loading",
glz: '0.00',
log: []
array: []
};
},
created() {
integral().then(res => {
this.glz = res.glz
this.log = res.lists.data
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
onLoad() {
this.getOrder()
},
onReachBottom() {
if (this.status === 'loadmore') {
this.page += 1
this.status = 'loading'
this.getOrder()
}
},
methods:{
getOrder() {
myPinList({
page: this.page
}).then(res => {
console.log(res)
if (res.page.current === 1) {
this.array = []
}
let ordersArr = res.data.map(val => {
return {
no: val.order_no,
cover: val.item.cover,
name: val.item.name,
price: val.item.price,
sum: 1,
collage: val.collage,
shop: val.shop,
goods_id: val.item.goods_id,
unit: val.item.unit,
users: val.users,
invite: val.invite,
order: val.order,
url: val.url
}
})
this.array = this.array.concat(ordersArr)
this.status = res.page.has_more ? 'loadmore' : 'nomore'
})
},
onType(item){
console.log(item);
}
}
}
</script>
@@ -62,6 +105,12 @@
font-size: 60rpx;
padding-top: 10rpx;
color: white;
span{
font-size:26rpx;
padding-left: 20rpx;
padding-bottom: 10rpx;
font-weight: normal;
}
}
}
// 账户记录

View File

@@ -86,8 +86,8 @@
export default {
data() {
return {
videos: [1, 2, 3, 4],
missions: [1, 2, 3, 4],
videos: [1, 2, 3],
missions: [1, 2, 3],
canRotate0: false,
canRotate1: false,
};
@@ -250,12 +250,12 @@
.rotateChange {
animation: fadenum1;
animation-duration: 2s;
animation-duration: 1s;
}
@keyframes fadenum1 {
100% {
transform: rotate(360deg);
transform: rotate(180deg);
}
}
}
@@ -310,7 +310,7 @@
background-color: #e74a45;
color: #fff;
border-radius: 40rpx;
padding: 10rpx $padding;
padding: 12rpx $padding;
font-size: 26rpx;
}

View File

@@ -3,16 +3,12 @@
<view class="rank_top">
<view class="rank_top_left">
<image class="rank_title" src="../../static/rank/rank_txt.png" mode="widthFix" />
<view class="rank_sub_title" @click="toHelp"> 共力家族 周会员邀请
<image src="/static/rank/help.png" mode="widthFix" />
</view>
<view class="rank_sub_title" @click="toHelp"> 共力家族 周会员邀请 <image src="/static/rank/help.png" mode="widthFix" /> </view>
</view>
<image class="rank_top_right" src="../../static/rank/rank.png" mode="widthFix" />
</view>
<u-sticky bgColor="#34CE98">
<u-tabs :list="tabs" lineColor="white" :activeStyle="{color: 'white', fontWeight: 'bold', fontSize: '15px'}"
:inactiveStyle="{color: 'rgba(255,255,255,.6)', fontSize: '15px'}" :itemStyle="{'height': '50px'}"
@click="onTabs" />
<u-tabs :list="tabs" lineColor="white" :activeStyle="{color: 'white', fontWeight: 'bold', fontSize: '15px'}" :inactiveStyle="{color: 'rgba(255,255,255,.6)', fontSize: '15px'}" :itemStyle="{'height': '50px'}" @click="onTabs" />
</u-sticky>
<view class="rank_update_time" v-if="type != '3' && type != '4' && end_timestamp">
@@ -20,22 +16,10 @@
<u-count-down ref="countDown" format="DD:HH:mm:ss" :time="end_timestamp" :autoStart="false"
@change="downTime">
<view class="time">
<view class="time__item">
<text class="time__item_no">{{ timeData.days > 9 ? timeData.days: '0' + timeData.days }}
</text>
</view>
<view class="time__item">
<text
class="time__item_no">{{ timeData.hours > 9 ? timeData.hours : '0' + timeData.hours}}</text>
</view>
<view class="time__item">
<text
class="time__item_no">{{ timeData.minutes > 9 ? timeData.minutes : '0' + timeData.minutes}}</text>
</view>
<view class="time__item">
<text
class="time__item_no">{{ timeData.seconds > 9 ? timeData.seconds : '0' + timeData.seconds}}</text>
</view>
<view class="time__item"> <text class="time__item_no">{{ timeData.days > 9 ? timeData.days: '0' + timeData.days }} </text> </view>
<view class="time__item"> <text class="time__item_no">{{ timeData.hours > 9 ? timeData.hours : '0' + timeData.hours}}</text> </view>
<view class="time__item"> <text class="time__item_no">{{ timeData.minutes > 9 ? timeData.minutes : '0' + timeData.minutes}}</text> </view>
<view class="time__item"> <text class="time__item_no">{{ timeData.seconds > 9 ? timeData.seconds : '0' + timeData.seconds}}</text> </view>
</view>
</u-count-down>
</view>
@@ -57,8 +41,7 @@
<block v-if="lists.length>0">
<view class="list_item" v-for="(item,index) in lists" :keys='index'>
<view class="no">
<image v-if="index < 3" class="image" :src="'/static/rank/rank-'+(index+1)+'.png'"
mode="widthFix" />
<image v-if="index < 3" class="image" :src="'/static/rank/rank-'+(index+1)+'.png'" mode="widthFix" />
<view v-else class="txt"> {{index + 1}} </view>
</view>
<view class="user_info">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long