This commit is contained in:
weipengfei 2024-01-21 18:59:41 +08:00
parent 0141fcc6b2
commit 51fc59d272
18 changed files with 799 additions and 196 deletions

View File

@ -289,3 +289,13 @@ export function storeActivityReceive(data) {
export function storeActivityRecord(data) {
return request.get(`storeActivity/record`, data);
}
// 红包余额统计
export function storeActivityTotal(data) {
return request.get(`storeActivity/total`, data);
}
// 生成二维码
export function storeActivityQrcode(data) {
return request.get(`qrcode`, data);
}

View File

@ -56,7 +56,7 @@
</view>
</scroll-view>
<view class="button">
<view class="b_icon" @click="navgo('/pages/order_addcart/order_addcart')">
<view class="b_icon" @click="navgoCart()">
<image src="@/static/images/icon/car.png"></image>
<view>购物车</view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
@ -252,7 +252,8 @@
changeCurrent(e){
this.current = e.detail.current;
},
navgo(url) {
navgoCart(url=null) {
if(!url && this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
uni.navigateTo({
url
})

View File

@ -11,8 +11,8 @@ let httpApiFive
let wsApi
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "1.7.3",
"versionCode" : 173,
"versionName" : "1.7.4",
"versionCode" : 174,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -242,6 +242,26 @@
"navigationBarTitleText" : "红包余额",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/newActivity/subsidy/subsidy2",
"style" :
{
"navigationBarTitleText" : "实物通用红包",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/subsidy/subsidy3",
"style" :
{
"navigationBarTitleText" : "现金抵扣红包",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
}
],
"subPackages": [{

View File

@ -679,6 +679,10 @@ import activityCard from "@/components/activityCard.vue"
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.street = res.data.address_reference.town.title;
this.$store.commit('setAddress', {
street_id: this.street_id,
townName: this.town
});
this.list(true, this.street_id)
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' + this
@ -719,6 +723,10 @@ import activityCard from "@/components/activityCard.vue"
this.street_id = e.street.code;
this.street = e.street.name;
this.town = e.street.name;
this.$store.commit('setAddress', {
street_id: this.street_id,
townName: this.town
});
if (e.longitude) {
this.longitude = e.longitude;
this.latitude = e.latitude;

View File

@ -2,179 +2,195 @@
<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/public/uploads/new_activity/detail.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<image class="bg_img" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail.webp"></image>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/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="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn1.webp"></image>
<image v-if="show_a2" @click="changeA(show_a2)" class="btn_image" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn2.webp"></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 class="btn_box">
<image v-if="show_a1" @click="changeA(show_a1)" class="btn_image" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn1.webp"></image>
<image v-if="show_a2" @click="changeA(show_a2)" class="btn_image" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn2.webp"></image>
</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>
</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=='用户消费补贴活动')
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
},
show_a2(){ //
return this.Alist.find(item=>item.title=='用户推荐拉新活动')
}
},
methods: {
consumption(){
consumption().then(res=>{
this.Alist = res.data;
})
data() {
return {
info: {},
userInfo: {},
Alist: [],
activity: {
title: ''
},
show: false,
isAuto: false, //
isShowAuth: false, //
is_join_activity: 0, //
}
},
back(){
uni.navigateBack()
onLoad() {
this.getArticleList();
this.is_join_activity = uni.getStorageSync('is_join_activity');
},
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) {
onShow() {
this.getUserInfo();
this.isShowAuth = false;
this.consumption();
},
//
openAuto() {
// console.log('hajhcdsohjcosvjco')
this.isAuto = true;
this.isShowAuth = true
computed: {
show_a1() { //
return this.Alist.find(item => item.title == '用户消费补贴活动')
},
show_a2() { //
return this.Alist.find(item => item.title == '用户推荐拉新活动')
}
},
//
authColse: function(e) {
this.isShowAuth = e
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/redpacket/redpack_type?type=1";
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() {
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #fff5dd;
}
.bg{
position: relative;
padding-bottom: 30rpx;
.bg_img{
width: 750rpx;
position: absolute;
top: 0;
left: 0;
page {
background-color: #fff5dd;
}
.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>
.bg {
position: relative;
padding-bottom: 300rpx;
.bg_img {
width: 750rpx;
height: 652rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: 30rpx;
left: 30rpx;
}
.b_body {
width: 710rpx;
margin-left: 21rpx;
margin-right: 19rpx;
height: auto;
background-color: #fff;
border-radius: 0 0 60rpx 60rpx;
padding: 28rpx;
padding-top: 680rpx;
margin-bottom: 30rpx;
.b_content {
width: 100%;
// height: 800rpx;
// background-color: #eee;
}
}
}
.btn_box {
position: fixed;
bottom: 30rpx;
left: 50%;
transform: translate(-50%);
width: 710rpx;
.btn_image {
width: 100%;
}
}
</style>

View File

@ -8,7 +8,7 @@
<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>
<image :src="qr_img"></image>
</view>
<view class="qr_text">扫一扫红包马上就到</view>
<view class="qr_tips">温馨提示邀请新用户才有机会获得红包哦</view>
@ -98,7 +98,7 @@
</template>
<script>
import { storeActivityStatus, storeActivityReceive } from "@/api/activity.js"
import { storeActivityStatus, storeActivityReceive, storeActivityQrcode } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
@ -112,14 +112,13 @@ export default {
end_time: ''
},
status: 0, //0 1 2
qr_img: ''
}
},
onLoad() {},
onShow() {
this.storeActivityQrcode();
this.loadInfo();
// this.$nextTick(()=>{
// this.open();
// })
},
methods: {
back(){
@ -137,6 +136,11 @@ export default {
close(){
this.$refs.redPacket.close();
},
storeActivityQrcode(){
storeActivityQrcode().then(res=>{
this.qr_img = res.data.url;
})
},
//
async openRedPacket(){
this.$refs.redPacket.close();
@ -190,7 +194,8 @@ page{
width: 710rpx;
height: 750rpx;
margin: 0 20rpx;
background: linear-gradient(to top, #FFE3AE 0%, #FFF6EB 100%);
// background: linear-gradient(to top, #FFE3AE 0%, #FFF6EB 100%);
background: #FFF6EB;
border-radius: 50rpx;
padding: 20rpx;
.qr_body{

View File

@ -4,6 +4,7 @@
<view class="bg">
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/subsidy.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">补贴记录</view>
<view class="b_title">
<view>总计获得</view> <view class="count">{{total_amount}}</view> <view>元补贴红包</view>
</view>
@ -84,6 +85,15 @@ page{
top: 30rpx;
left: 30rpx;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: 30rpx;
left: 50%;
transform: translate(-50%);
}
.b_title{
position: absolute;
width: 100%;

View File

@ -0,0 +1,184 @@
<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/public/uploads/new_activity/subsidy.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">无门槛实物通用红包</view>
<view class="b_title">
<view>总计剩余</view> <view class="count">{{total_amount}}</view> <view>元通用红包</view>
</view>
<view class="b_body">
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
<view class="b_head">
<view class="head_title">消费金额</view>
<view class="head_title">补贴金额</view>
<view class="head_title2">红包获得时间</view>
</view>
<view class="b_content">
<view class="content_list" v-for="(item, index) in list" :key="index">
<view class="content_item">{{item.order_amount}}<text class="mall"></text></view>
<view class="content_item">{{item.coupon_price}}<text class="mall"></text></view>
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
</view>
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { storeActivityRecord } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
total_amount: '0.00',
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityRecord();
},
methods: {
back(){
uni.navigateBack()
},
storeActivityRecord(){
storeActivityRecord({
type: 1
}).then(res=>{
this.list = res.data.record;
this.total_amount = res.data.total_amount || "0.00"
})
},
navTo(){
uni.switchTab({
url:'/pages/index/index'
})
}
},
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;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: 30rpx;
left: 50%;
transform: translate(-50%);
}
.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;
font-size: 28rpx;
padding: 20rpx 0;
.head_title{
padding-left: 20rpx;
width: 190rpx;
}
.head_title2{
padding-left: 20rpx;
width: 280rpx;
}
}
.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-left: 20rpx;
width: 190rpx;
}
.content_item2{
padding-left: 20rpx;
width: 280rpx;
}
}
.none{
text-align: center;
padding: 20rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,184 @@
<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/public/uploads/new_activity/subsidy.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">现金抵扣红包</view>
<view class="b_title">
<view>总计剩余</view> <view class="count">{{total_amount}}</view> <view>元抵扣红包</view>
</view>
<view class="b_body">
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
<view class="b_head">
<view class="head_title">消费金额</view>
<view class="head_title">补贴金额</view>
<view class="head_title2">红包获得时间</view>
</view>
<view class="b_content">
<view class="content_list" v-for="(item, index) in list" :key="index">
<view class="content_item">{{item.order_amount}}<text class="mall"></text></view>
<view class="content_item">{{item.coupon_price}}<text class="mall"></text></view>
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
</view>
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { storeActivityRecord } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
total_amount: '0.00',
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityRecord();
},
methods: {
back(){
uni.navigateBack()
},
storeActivityRecord(){
storeActivityRecord({
type: 2
}).then(res=>{
this.list = res.data.record;
this.total_amount = res.data.total_amount || "0.00"
})
},
navTo(){
uni.switchTab({
url:'/pages/index/index'
})
}
},
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;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: 30rpx;
left: 50%;
transform: translate(-50%);
}
.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;
font-size: 28rpx;
padding: 20rpx 0;
.head_title{
padding-left: 20rpx;
width: 190rpx;
}
.head_title2{
padding-left: 20rpx;
width: 280rpx;
}
}
.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-left: 20rpx;
width: 190rpx;
}
.content_item2{
padding-left: 20rpx;
width: 280rpx;
}
}
.none{
text-align: center;
padding: 20rpx;
}
}
}
}
</style>

View File

@ -1,25 +1,162 @@
<template>
<view class="">
<view style="height: 30rpx;"></view>
<view class="r_list" v-for="(item, index) in list" :key="index">
<view class="r_item" @click="navgo(item)">
<image class="r_bg" src="/static/active/red_packet.webp"></image>
<view class="r_body">
<view class="r_count">
<view class="rc_count">
<text class="rc_icon"></text>{{item.total_amount}}
</view>
</view>
<view class="r_content">
<view class="r_name">{{item.type_cn}}</view>
</view>
<view class="r_btn">
查看
</view>
</view>
</view>
</view>
<view class="activity">
<image mode="widthFix" @click="navTo()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/activity1.webp"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {},
onShow() {},
methods: {},
onPullDownRefresh() {
import { storeActivityTotal } from "@/api/activity.js"
export default {
data() {
return {
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityTotal();
},
methods: {
storeActivityTotal(){
storeActivityTotal().then(res=>{
this.list = res.data;
})
},
navgo(item){
if(item.type==1) uni.navigateTo({
url: '/pages/newActivity/subsidy/subsidy2'
})
else if(item.type==2) uni.navigateTo({
url: '/pages/newActivity/subsidy/subsidy3'
})
},
navTo(){
let address = this.$store.state.storage.address;
let location = this.$store.state.storage.location;
if(address.street_id){
uni.navigateTo({
url: `/pages/nongKe/cloud_entrepot/indexh?street_id=${address.street_id}&townName=${address.townName}&source=103&location=${location.lat},${location.long}`
})
}else uni.navigateTo({
url: `/pages/nongKe/cloud_entrepot/indexh`
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.r_list {
padding: 0 20rpx 20rpx 20rpx;
</style>
.r_item {
height: 156rpx;
width: 710rpx;
position: relative;
.r_bg {
width: 100%;
height: 100%;
}
.r_body {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
display: flex;
align-items: center;
.r_count {
flex: 2;
display: flex;
justify-content: center;
align-items: center;
color: #A46F32;
font-size: 44rpx;
font-weight: bold;
.rc_count {
display: flex;
align-items: flex-end;
}
.rc_icon {
font-size: 28rpx;
font-weight: 500;
margin-bottom: 8rpx;
}
}
.r_content {
flex: 4;
color: #FFF3CC;
font-size: 24rpx;
padding: 18rpx 10rpx 18rpx 40rpx;
display: flex;
flex-direction: column;
justify-content: center;
.r_name {
font-size: 32rpx;
font-weight: 500;
margin-bottom: 10rpx;
}
view {
width: 100%;
overflow: hidden;
/* 隐藏超出宽度的文本 */
white-space: nowrap;
/* 不换行 */
text-overflow: ellipsis;
/* 文本末尾显示省略号 */
}
}
.r_btn {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: #FFF3CC;
height: 59rpx;
border-radius: 28rpx 28rpx 28rpx 28rpx;
opacity: 1;
border: 1rpx solid #FFF3CC;
margin-right: 20rpx;
}
}
}
}
.activity{
image{
width: 750rpx;
}
}
</style>

View File

@ -53,7 +53,7 @@
<view class="r_body">
<view class="r_count">
<view class="rc_count">
<text class="rc_icon"></text>{{item.coupon_price}}
<text class="rc_icon"></text>{{item.balance}}
</view>
</view>
<view class="r_content">
@ -62,7 +62,7 @@
<view>有效期至 {{item.end_time}}</view>
</view>
<view class="r_icon">
<u-icon v-if="changeRed&&changeRed.uid==item.uid" name="checkmark-circle-fill" color="#FFF3CC" size="56rpx"></u-icon>
<u-icon v-if="changeRed&&changeRed.coupon_user_id==item.coupon_user_id" name="checkmark-circle-fill" color="#FFF3CC" size="56rpx"></u-icon>
<u-icon v-else name="checkmark-circle" color="#FFF3CC" size="56rpx"></u-icon>
</view>
</view>
@ -70,7 +70,11 @@
</view>
<view class="footer">
<view>已选 {{ changeRed?1:0 }} , 可减 <text class="red_i">¥</text> <text class="red_c">0</text></view>
<view>
<text>已选 {{ changeRed?1:0 }} </text>
<text v-if="changeRed&&changeRed.coupon_title" style="color: #7f7f7f;font-size: 24rpx;margin-left: 12rpx;">({{changeRed.coupon_title}})</text>
<!-- , 可减 <text class="red_i">¥</text> <text class="red_c">0</text> -->
</view>
<view class="btn" @click="comfirm">确定</view>
</view>
</view>
@ -113,11 +117,11 @@
methods: {
change(e, i) {
console.log(e, i);
if(this.changeRed&&this.changeRed.uid==e.uid)this.changeRed = null;
if(this.changeRed&&this.changeRed.coupon_user_id==e.coupon_user_id)this.changeRed = null;
else this.changeRed = e;
},
comfirm(){
uni.$emit('changeRedPacket', this.changeRed.uid);
uni.$emit('changeRedPacket', this.changeRed?.coupon_user_id||'');
uni.navigateBack()
}
},

View File

@ -85,17 +85,17 @@
</view>
</view> -->
<view class="packet_card">
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
<view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')">
<view class="p_d_count">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
20000
<view>{{userInfo.now_money||"0.00"}}</view>
</view>
<view>我的余额 ()</view>
</view>
<view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')">
<view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')" >
<view class="p_d_count">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d2868202401201750014779.png"></image>
200
<view>{{userInfo.red_pack_balance||"0.00"}}</view>
</view>
<view>红包余额 ()</view>
</view>
@ -1342,17 +1342,28 @@
margin: 0 auto;
border-radius: 20rpx 20rpx 0 0;
margin-top: 20rpx;
padding: 20rpx 40rpx;
position: relative;
color: #fff;
display: flex;
justify-content: space-between;
.p_d_item{
position: absolute;
font-size: 26rpx;
font-weight: bold;
flex: 1;
width: 300rpx;
height: 100rpx;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
&:nth-child(1){
top: 20rpx;
left: 30rpx;
}
&:nth-child(2){
top: 20rpx;
right: 30rpx;
}
.p_d_count{
display: flex;
align-items: center;

View File

@ -377,12 +377,11 @@
<view class='discount'>暂无优惠券</view>
</block>
</view> -->
<view class='item acea-row row-between-wrapper'
v-if="platformConsumption.length > 0">
<view class='item acea-row row-between-wrapper'>
<view>红包抵扣<!-- <text @tap="showCoupon" class="iconfont icon-wenhao1"></text> --></view>
<block v-if="platformConsumption.length > 0">
<view class='discount money red_packet' @tap='couponTap3()'>
<text v-if="total_platform_coupon_price>0">-{{total_platform_coupon_price}}</text>
<text v-if="consumption_id">-{{red_price}}</text>
<text v-else>有补贴红包未选</text>
<text class='iconfont icon-jiantou'></text>
</view>
@ -683,6 +682,9 @@
computed: {
...mapGetters(['isLogin', 'viewColor']),
...configMap(['hide_mer_status', 'alipay_open', 'yue_pay_status']),
red_price(){ //
return (this.proPrice - this.totalPrice).toFixed(2);
}
},
watch: {
alipay_open(n) {
@ -1657,6 +1659,7 @@
.Tips({
title: '余额不足!'
});
data.consumption_id = this.consumption_id;
//
// if (this.payType == 'creditBuy') {
@ -1705,7 +1708,8 @@
title: this.deliveryName,
check: true
}]
} else if (!item.allow_delivery && item.allow_take) {
}
else if (!item.allow_delivery && item.allow_take) {
this.radioList = [{
title: '到店核销',
check: false

View File

@ -10,18 +10,18 @@
<view class='money'>{{userInfo.now_money || 0}}</view>
</view>
<!-- #ifdef APP-PLUS || H5 -->
<navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<!-- <navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator> -->
<!-- #endif -->
<!-- #ifdef MP -->
<view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<!-- <view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view> -->
<!-- #endif -->
</view>
<view class='cumulative acea-row row-top'>
<!-- v-if="balance_func_status == 1" -->
<view class='item' >
<!-- <view class='item' >
<view>累计充值()</view>
<view class='money'>{{userInfo.total_recharge || 0}}</view>
</view>
</view> -->
<view class='item'>
@ -44,12 +44,12 @@
</view>
<view>消费记录</view>
</navigator>
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2'>
<!-- <navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2'>
<view class='pictrue'>
<image :src="domain+'/static/diy/record3'+keyColor+'.png'"></image>
</view>
<view>充值记录</view>
</navigator>
</navigator> -->
</view>
</view>
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>

View File

@ -14,6 +14,10 @@ const state = {
location:{
lat: null,
long: null,
},
address:{
street_id: '',
townName: ''
}
};
@ -24,6 +28,10 @@ const mutations = {
setLocation(state, data){
state.location.lat = data.lat;
state.location.long = data.long;
},
setAddress(state, data){
state.address.street_id = data.street_id;
state.address.townName = data.townName;
}
};

View File

@ -69,6 +69,7 @@ function baseRequest(url, method, data, {
reject(res.data.message || '系统错误');
},
fail: (message) => {
console.log('失败',message);
reject('请求失败');
}
})