更新
This commit is contained in:
parent
8555bf884a
commit
c360adf281
@ -261,4 +261,26 @@ export function spuTopList(data) {
|
||||
return request.get(`product/spu/get_hot_ranking`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 活动列表
|
||||
export function consumption(data) {
|
||||
return request.get(`storeActivity/consumption`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
// 参加活动
|
||||
export function chooseConsumption(data) {
|
||||
return request.post(`storeActivity/choose`, data);
|
||||
}
|
||||
|
||||
// 拉新红包活动完成状态
|
||||
export function storeActivityStatus(data) {
|
||||
return request.get(`storeActivity/status`, data);
|
||||
}
|
||||
|
||||
// 拉新红包活动完成状态
|
||||
export function storeActivityReceive(data) {
|
||||
return request.post(`storeActivity/receive`, data);
|
||||
}
|
||||
|
102
components/activityCard.vue
Normal file
102
components/activityCard.vue
Normal file
@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<view class="a_c_home">
|
||||
<view class="c_card">
|
||||
<view class="c_content">
|
||||
<scroll-view style="height: 100%;" scroll-y>
|
||||
<view v-if="info.content" v-html="info.content.content"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="btn_box">
|
||||
<image class="btn_img" @click="open()" src="/static/new_activity/card_btn1.png"></image>
|
||||
<image class="btn_img" @click="open()" src="/static/new_activity/card_btn2.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<image class="head_img" src="/static/new_activity/card_head.png" info="活动标题"></image>
|
||||
<image class="close_img" @click="close" src="/static/new_activity/close.png" info="关闭按钮"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getArticleList } from "@/api/api.js"
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
info: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getArticleList();
|
||||
},
|
||||
methods:{
|
||||
close(){
|
||||
this.$emit('close');
|
||||
},
|
||||
open(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/newActivity/activityDetail/activityDetail'
|
||||
})
|
||||
},
|
||||
getArticleList(){
|
||||
getArticleList(25).then(res=>{
|
||||
this.info = res.data.list[0]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.a_c_home{
|
||||
width: 600rpx;
|
||||
height: 80vh;
|
||||
// border: 1px solid red;
|
||||
position: relative;
|
||||
.head_img{
|
||||
width: 568rpx;
|
||||
height: 207rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
.c_card{
|
||||
height: calc(100% - 300rpx);
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
position: absolute;
|
||||
border-radius: 50rpx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 30rpx;
|
||||
padding-top: 70rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.c_content{
|
||||
height: calc(100% - 220rpx);
|
||||
width: 100%;
|
||||
// background-color: #eee;
|
||||
}
|
||||
.btn_box{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.btn_img{
|
||||
width: 461rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.close_img{
|
||||
position: absolute;
|
||||
bottom: 60rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
83
pages.json
83
pages.json
@ -1,6 +1,21 @@
|
||||
{
|
||||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 300,
|
||||
// #ifdef APP-PLUS
|
||||
"enablePullDownRefresh": true,
|
||||
// #endif
|
||||
"app-plus": {
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/supply_chains/supply_chains",
|
||||
"style": {
|
||||
@ -10,20 +25,6 @@
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
|
||||
},{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 300,
|
||||
// #ifdef APP-PLUS
|
||||
"enablePullDownRefresh": true,
|
||||
// #endif
|
||||
"app-plus": {
|
||||
"scrollIndicator": false //禁用原生导航栏
|
||||
}
|
||||
}
|
||||
},
|
||||
//#ifdef APP-PLUS
|
||||
//启动页
|
||||
@ -195,6 +196,36 @@
|
||||
"navigationBarTitleText" : "选择位置",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/activityDetail/activityDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "活动",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/subsidy/subsidy",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "补贴记录",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/newActivity/invitation/invitation",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "拉新活动",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
@ -1718,19 +1749,19 @@
|
||||
|
||||
"list": [
|
||||
|
||||
// {
|
||||
// "pagePath": "pages/supply_chains/supply_chains",
|
||||
// "iconPath": "static/tabbar_icon/d.png",
|
||||
// "selectedIconPath": "static/tabbar_icon/d-a.png",
|
||||
// "text": "供销"
|
||||
// },
|
||||
{
|
||||
"pagePath": "pages/supply_chains/supply_chains",
|
||||
"iconPath": "static/tabbar_icon/d.png",
|
||||
"selectedIconPath": "static/tabbar_icon/d-a.png",
|
||||
"text": "供销"
|
||||
},
|
||||
// {
|
||||
// "pagePath": "pages/index/index",
|
||||
// "iconPath": "static/tabbar_icon/a.png",
|
||||
// "selectedIconPath": "static/tabbar_icon/a-a.png",
|
||||
// "text": "泸州"
|
||||
|
||||
// },
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar_icon/a.png",
|
||||
"selectedIconPath": "static/tabbar_icon/a-a.png",
|
||||
// "text": "泸州"
|
||||
"text": "供销"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/gather/gather",
|
||||
"iconPath": "static/tabbar_icon/b.png",
|
||||
|
File diff suppressed because it is too large
Load Diff
1413
pages/index/index_old.vue
Normal file
1413
pages/index/index_old.vue
Normal file
File diff suppressed because it is too large
Load Diff
180
pages/newActivity/activityDetail/activityDetail.vue
Normal file
180
pages/newActivity/activityDetail/activityDetail.vue
Normal file
@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<view>
|
||||
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix" src="/static/new_activity/detail.png"></image>
|
||||
<image @click="back" class="bg_back" src="/static/new_activity/back.png"></image>
|
||||
<view class="b_body">
|
||||
<view class="b_content">
|
||||
<view v-if="info.content" v-html="info.content.content"></view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<image v-if="show_a1" @click="changeA(show_a1)" class="btn_image" mode="widthFix" src="/static/new_activity/detail_btn1.png"></image>
|
||||
<image v-if="show_a2" @click="changeA(show_a2)" class="btn_image" mode="widthFix" src="/static/new_activity/detail_btn2.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal :show="show" :closeOnClickOverlay="true" :title="`[${activity.title}]`" content="选择活动后只有完成活动任务后才可参加另一个活动, 确定要参与这个活动吗" cancelText="我再想想" confirmText="参加活动" confirmColor="#e54841" @cancel="show = false" @confirm="joinA()" showCancelButton></u-modal>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
:isGoIndex="false"></authorize>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { consumption, chooseConsumption } from "@/api/activity.js"
|
||||
import { getArticleList } from "@/api/api.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import authorize from "@/components/Authorize.vue";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
components:{
|
||||
authorize
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
userInfo: {},
|
||||
Alist: [],
|
||||
activity: {
|
||||
title: ''
|
||||
},
|
||||
show: false,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
is_join_activity: 0, //是否已确认参加活动
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getArticleList();
|
||||
this.is_join_activity = uni.getStorageSync('is_join_activity');
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo();
|
||||
this.consumption();
|
||||
},
|
||||
computed: {
|
||||
show_a1(){ //显示活动一
|
||||
return this.Alist.find(item=>item.title=='用户消费补贴活动')
|
||||
},
|
||||
show_a2(){ //显示活动二
|
||||
return this.Alist.find(item=>item.title=='用户推荐拉新活动')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
consumption(){
|
||||
consumption().then(res=>{
|
||||
this.Alist = res.data;
|
||||
})
|
||||
},
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
changeA(item){
|
||||
if(!this.userInfo.account) return this.openAuto();
|
||||
this.activity = item;
|
||||
if(this.is_join_activity) return this.joinA();
|
||||
this.show = true;
|
||||
},
|
||||
getArticleList(){
|
||||
getArticleList(25).then(res=>{
|
||||
this.info = res.data.list[0]
|
||||
})
|
||||
},
|
||||
// 参加活动
|
||||
joinA(){
|
||||
chooseConsumption({
|
||||
coupon_id: this.activity.coupon_id,
|
||||
activity_id: 1, //活动默认传1即可
|
||||
}).then(res=>{
|
||||
this.show = false;
|
||||
let url = '';
|
||||
if(this.activity.title=='用户消费补贴活动') url = "/pages/newActivity/subsidy/subsidy";
|
||||
if(this.activity.title=='用户推荐拉新活动') url = "/pages/newActivity/invitation/invitation";
|
||||
if(url) uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}).catch(err=>{
|
||||
this.show = false;
|
||||
this.$nextTick(()=>{
|
||||
Toast('您正在参与活动,暂时不支持切换');
|
||||
})
|
||||
})
|
||||
uni.setStorageSync('is_join_activity', 1);
|
||||
this.is_join_activity = 1;
|
||||
},
|
||||
getUserInfo(){
|
||||
getUserInfo().then(res=>{
|
||||
this.userInfo = res.data;
|
||||
}).catch(err=>{
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun(data) {
|
||||
this.getUserInfo();
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
// 打开授权
|
||||
openAuto() {
|
||||
// console.log('hajhcdsohjcosvjco')
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ffebc5;
|
||||
}
|
||||
.bg{
|
||||
position: relative;
|
||||
padding-bottom: 30rpx;
|
||||
.bg_img{
|
||||
width: 750rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_back{
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
.b_body{
|
||||
position: absolute;
|
||||
width: 710rpx;
|
||||
margin-left: 21rpx;
|
||||
margin-right: 19rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
top: 652rpx;
|
||||
left: 0;
|
||||
border-radius: 0 0 60rpx 60rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 30rpx;
|
||||
.b_content{
|
||||
width: 100%;
|
||||
// height: 800rpx;
|
||||
// background-color: #eee;
|
||||
}
|
||||
.btn{
|
||||
padding-top: 30rpx;
|
||||
.btn_image{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
367
pages/newActivity/invitation/invitation.vue
Normal file
367
pages/newActivity/invitation/invitation.vue
Normal file
@ -0,0 +1,367 @@
|
||||
<template>
|
||||
<view>
|
||||
<view style="height: var(--status-bar-height);background-color: #f44e35;"></view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/504c2202401191135064361.png"></image>
|
||||
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/59275202401190916492722.png"></image>
|
||||
<view class="bg_body">
|
||||
<view class="b_qr">
|
||||
<view class="qr_body">
|
||||
<view class="qr_code">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a7f40202401191635272620.png"></image>
|
||||
</view>
|
||||
<view class="qr_text">扫一扫,红包马上就到</view>
|
||||
<view class="qr_tips">温馨提示:邀请新用户才有机会获得红包哦</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b_user">
|
||||
<view class="users">
|
||||
<image v-for="(item, index) in info.user_info" :key="item.uid" class="avatar" :src="item.avatar||'/static/images/f.png'"></image>
|
||||
<block v-if="info.user_info.length<4">
|
||||
<view v-for="item in 4-info.user_info.length" :key="item+'n'" class="avatar_no">
|
||||
<u-icon name="plus" color="#fff" size="40rpx"></u-icon>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="u_tips">邀请新用户消费达目标金额,有机会领取红包哦~</view>
|
||||
<view class="u_btn">
|
||||
<image v-if="status==0" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/cac75202401191409552244.png"></image>
|
||||
<image v-if="status==1" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/ebce5202401191548504267.png"></image>
|
||||
<image v-if="status==2" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/5f193202401191549184834.png"></image>
|
||||
</view>
|
||||
<uni-popup ref="redPacket">
|
||||
<view class="red_packet">
|
||||
<block v-if="status==0">
|
||||
<view class="packet_img">
|
||||
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/01d9a202401191502382479.png"></image>
|
||||
<view class="p_text">
|
||||
<view class="big">抱歉!</view>
|
||||
<view class="smoll">邀请新用户未达3人及以上</view>
|
||||
<view class="smoll">无法领红包哦~</view>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/19cb0202401181803559223.png"></image>
|
||||
</block>
|
||||
<block v-if="status==1">
|
||||
<view class="packet_img" @click="openRedPacket()">
|
||||
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e2efc202401191524578096.png"></image>
|
||||
<view class="p_text">
|
||||
<view class="big">恭喜!</view>
|
||||
<view class="smoll">成功获得实物通用红包</view>
|
||||
<view class="smoll">赶快打开吧~</view>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/19cb0202401181803559223.png"></image>
|
||||
</block>
|
||||
<block v-if="status==2">
|
||||
<view class="packet_img">
|
||||
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9bafd202401191526406639.png"></image>
|
||||
<view class="p_text" style="bottom: 60rpx;">
|
||||
<view class="smoll">恭喜你!成功获得</view>
|
||||
<view class="smoll red_count"><text class="count">500</text>元</view>
|
||||
<view class="big2">购买指定商品可直接抵扣使用</view>
|
||||
<view class="smoll">2024-10-10 18:00:00过期</view>
|
||||
<image @click="close()" class="btn_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/385f4202401191532068870.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/19cb0202401181803559223.png"></image>
|
||||
</block>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
<view class="b_in_list">
|
||||
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/890be202401191416543168.png"></image>
|
||||
<view class="b_head">
|
||||
<view style="width: 120rpx;"></view>
|
||||
<view class="head_title" style="width: 200rpx;">名称</view>
|
||||
<view class="head_title" style="width: 130rpx;">ID</view>
|
||||
<view class="head_title" style="width: 120rpx;">目标金额</view>
|
||||
<view class="head_title" style="width: 120rpx;">状态</view>
|
||||
</view>
|
||||
<view class="b_content">
|
||||
<view class="content_list" v-for="(item, index) in info.user_info" :key="item.uid">
|
||||
<image class="avatar" :src="item.avatar||'/static/images/f.png'"></image>
|
||||
<view class="content_item" style="width: 180rpx;margin: 0 10rpx;">{{item.nickname}}</view>
|
||||
<view class="content_item" style="width: 130rpx;">{{item.uid}}</view>
|
||||
<view class="content_item" style="width: 120rpx;">{{item.target_amount}}<text class="mall">元</text></view>
|
||||
<view class="content_item" style="width: 120rpx;">
|
||||
<text v-if="item.is_finish" style="color: #18CE61;">已完成</text>
|
||||
<text v-else style="color: #FA5A29;">未完成</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mall none">暂无记录</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeActivityStatus, storeActivityReceive } from "@/api/activity.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
user_info: []
|
||||
},
|
||||
status: 1, //0不可开, 1可开, 2已开
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.loadInfo();
|
||||
// this.$nextTick(()=>{
|
||||
// this.open();
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
loadInfo(){
|
||||
storeActivityStatus().then(res=>{
|
||||
this.info = res.data;
|
||||
if(res.data.allow_receive) this.status = 1;
|
||||
})
|
||||
},
|
||||
open(){
|
||||
this.$refs.redPacket.open();
|
||||
},
|
||||
close(){
|
||||
this.$refs.redPacket.close();
|
||||
},
|
||||
// 打开红包
|
||||
openRedPacket(){
|
||||
this.$refs.redPacket.close();
|
||||
this.$nextTick(()=>{
|
||||
this.$u.sleep(800).then(()=>{
|
||||
this.status = 2;
|
||||
this.$u.sleep(100).then(()=>{
|
||||
this.open();
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ff864d;
|
||||
}
|
||||
.bg{
|
||||
position: relative;
|
||||
height: auto;
|
||||
.bg_img{
|
||||
width: 750rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_back{
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
.bg_body{
|
||||
position: absolute;
|
||||
top: 414rpx;
|
||||
left: 0;
|
||||
.b_qr{
|
||||
width: 710rpx;
|
||||
height: 750rpx;
|
||||
margin: 0 20rpx;
|
||||
background: linear-gradient(to top, #FFE3AE 0%, #FFF6EB 100%);
|
||||
border-radius: 50rpx;
|
||||
padding: 20rpx;
|
||||
.qr_body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 5rpx solid #ffd588;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
flex-direction: column;
|
||||
.qr_code{
|
||||
width: 510rpx;
|
||||
height: 510rpx;
|
||||
// background-color: #f8962e;
|
||||
margin: 0 auto;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.qr_text{
|
||||
font-size: 36rpx;
|
||||
color: #C44100;
|
||||
font-weight: 500;
|
||||
}
|
||||
.qr_tips{
|
||||
font-size: 26rpx;
|
||||
color: #C44100;
|
||||
}
|
||||
}
|
||||
}
|
||||
.b_user{
|
||||
margin-top: 30rpx;
|
||||
.users{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.avatar{
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin: 15rpx;
|
||||
}
|
||||
.avatar_no{
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
font-weight: 200;
|
||||
border-radius: 50%;
|
||||
border: 2rpx dashed #fff;
|
||||
margin: 15rpx;
|
||||
background-color: rgba(#fff, 0.3);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.u_tips{
|
||||
color: #FFE5B3;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.u_btn{
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.btn_image{
|
||||
width: 403rpx;
|
||||
height: 113rpx;
|
||||
}
|
||||
}
|
||||
.red_packet{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.packet_img{
|
||||
width: 750rpx;
|
||||
position: relative;
|
||||
.img{
|
||||
width: 100%;
|
||||
}
|
||||
.p_text{
|
||||
position: absolute;
|
||||
bottom: 120rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
.big{
|
||||
font-size: 38rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.smoll{
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.big2{
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.btn_img{
|
||||
width: 310rpx;
|
||||
}
|
||||
.red_count{
|
||||
margin-top: 80rpx;
|
||||
margin-bottom: 40rpx;
|
||||
.count{
|
||||
font-size: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.close_img{
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.b_in_list{
|
||||
width: 710rpx;
|
||||
margin: 0 20rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
|
||||
border-radius: 50rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
.body_head_img{
|
||||
width: 253rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.b_head{
|
||||
background-color: #fff2ed;
|
||||
border-radius: 20rpx;
|
||||
color: #854116;
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
text-align: center;
|
||||
.head_title{
|
||||
width: 150rpx;
|
||||
padding: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.b_content{
|
||||
.mall{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.content_list{
|
||||
background-color: #FFF6E9;
|
||||
border-radius: 20rpx;
|
||||
color: #C44100;
|
||||
padding-top: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 20rpx;
|
||||
text-align: center;
|
||||
.content_item{
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
}
|
||||
.none{
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
150
pages/newActivity/subsidy/subsidy.vue
Normal file
150
pages/newActivity/subsidy/subsidy.vue
Normal file
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<view>
|
||||
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
|
||||
<view class="bg">
|
||||
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/09c95202401191053435021.png"></image>
|
||||
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/59275202401190916492722.png"></image>
|
||||
<view class="b_title">
|
||||
<view>总计获得</view> <view class="count">580</view> <view>元补贴红包</view>
|
||||
</view>
|
||||
<view class="b_body">
|
||||
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0720d202401191138543586.png"></image>
|
||||
<view class="b_head">
|
||||
<view class="head_title">消费金额</view>
|
||||
<view class="head_title">补贴金额</view>
|
||||
<view class="head_title">红包获得时间</view>
|
||||
</view>
|
||||
<view class="b_content">
|
||||
<view class="content_list" v-for="(item, index) in 3">
|
||||
<view class="content_item">200<text class="mall">元</text></view>
|
||||
<view class="content_item">110<text class="mall">元</text></view>
|
||||
<view class="content_item">2024-01-20</view>
|
||||
</view>
|
||||
<view class="mall none">暂无记录</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { consumption, chooseConsumption } from "@/api/activity.js"
|
||||
import { Toast } from "../../../libs/uniApi";
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ffe3bd;
|
||||
}
|
||||
.bg{
|
||||
position: relative;
|
||||
height: auto;
|
||||
.bg_img{
|
||||
width: 750rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.bg_back{
|
||||
height: 34rpx;
|
||||
width: 20rpx;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
.b_title{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
top: 225rpx;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #F1503F;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
.count{
|
||||
// height: 100%;
|
||||
font-size: 66rpx;
|
||||
font-weight: bold;
|
||||
margin: 10rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.b_body{
|
||||
position: absolute;
|
||||
width: 710rpx;
|
||||
margin-left: 21rpx;
|
||||
margin-right: 19rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
top: 534rpx;
|
||||
left: 0;
|
||||
border-radius: 50rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
.body_head_img{
|
||||
width: 253rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.b_head{
|
||||
background-color: #FFF2E0;
|
||||
border-radius: 20rpx;
|
||||
color: #C44100;
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
.head_title{
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.b_content{
|
||||
background-color: #fff2ed;
|
||||
border-radius: 20rpx;
|
||||
color: #FF5A3A;
|
||||
padding-top: 20rpx;
|
||||
margin-top: 28rpx;
|
||||
font-size: 32rpx;
|
||||
.mall{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.content_list{
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
.content_item{
|
||||
padding: 0 20rpx;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.none{
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -161,6 +161,10 @@
|
||||
<view class="locationx" @click.stop="isshow=false">x</view>
|
||||
</view>
|
||||
|
||||
<uni-popup ref="activityPopup" :is-mask-click="false">
|
||||
<activityCard @close="closeActivityCard"></activityCard>
|
||||
</uni-popup>
|
||||
|
||||
<!-- <activityHome></activityHome> -->
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
@ -211,17 +215,18 @@
|
||||
Toast
|
||||
} from '@/libs/uniApi'
|
||||
import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
|
||||
import activityCard from "@/components/activityCard.vue"
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper,
|
||||
easyLoadimage,
|
||||
WaterfallsFlow
|
||||
WaterfallsFlow,
|
||||
activityCard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeStyle: {
|
||||
|
||||
color: '#333333',
|
||||
fontWeight: 'bold',
|
||||
transform: 'scale(1.04)'
|
||||
@ -333,7 +338,10 @@ import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
|
||||
this.street_id = newValue.split(',')[1]
|
||||
|
||||
});
|
||||
|
||||
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.activityPopup.open();
|
||||
})
|
||||
|
||||
|
||||
|
||||
@ -356,6 +364,9 @@ import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
|
||||
},
|
||||
// #endif
|
||||
methods: {
|
||||
closeActivityCard(){
|
||||
this.$refs.activityPopup.close();
|
||||
},
|
||||
navaction(val) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/nongKe/supply_chain/suppliers?id=' + val
|
||||
|
BIN
static/new_activity/back.png
Normal file
BIN
static/new_activity/back.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.5 KiB |
BIN
static/new_activity/card_btn1.png
Normal file
BIN
static/new_activity/card_btn1.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 151 KiB |
BIN
static/new_activity/card_btn2.png
Normal file
BIN
static/new_activity/card_btn2.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 149 KiB |
Loading…
x
Reference in New Issue
Block a user