更新
This commit is contained in:
parent
0141fcc6b2
commit
51fc59d272
@ -289,3 +289,13 @@ export function storeActivityReceive(data) {
|
|||||||
export function storeActivityRecord(data) {
|
export function storeActivityRecord(data) {
|
||||||
return request.get(`storeActivity/record`, 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);
|
||||||
|
}
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="button">
|
<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>
|
<image src="@/static/images/icon/car.png"></image>
|
||||||
<view>购物车</view>
|
<view>购物车</view>
|
||||||
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
|
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
|
||||||
@ -252,7 +252,8 @@
|
|||||||
changeCurrent(e){
|
changeCurrent(e){
|
||||||
this.current = e.detail.current;
|
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({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
})
|
})
|
||||||
|
@ -11,8 +11,8 @@ let httpApiFive
|
|||||||
let wsApi
|
let wsApi
|
||||||
|
|
||||||
// 在打包之前请检查当前环境是否正确
|
// 在打包之前请检查当前环境是否正确
|
||||||
const env = 'dev'; // 开发
|
// const env = 'dev'; // 开发
|
||||||
// const env = 'prod'; // 生产
|
const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "惠农生活",
|
"name" : "惠农生活",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.7.3",
|
"versionName" : "1.7.4",
|
||||||
"versionCode" : 173,
|
"versionCode" : 174,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
20
pages.json
20
pages.json
@ -242,6 +242,26 @@
|
|||||||
"navigationBarTitleText" : "红包余额",
|
"navigationBarTitleText" : "红包余额",
|
||||||
"enablePullDownRefresh" : false
|
"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": [{
|
"subPackages": [{
|
||||||
|
@ -679,6 +679,10 @@ import activityCard from "@/components/activityCard.vue"
|
|||||||
this.town = res.data.address_reference.town.title
|
this.town = res.data.address_reference.town.title
|
||||||
this.street_id = res.data.address_reference.town.id
|
this.street_id = res.data.address_reference.town.id
|
||||||
this.street = res.data.address_reference.town.title;
|
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.list(true, this.street_id)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$bus.$emit('value-updated', this.street + ',' + this
|
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_id = e.street.code;
|
||||||
this.street = e.street.name;
|
this.street = e.street.name;
|
||||||
this.town = e.street.name;
|
this.town = e.street.name;
|
||||||
|
this.$store.commit('setAddress', {
|
||||||
|
street_id: this.street_id,
|
||||||
|
townName: this.town
|
||||||
|
});
|
||||||
if (e.longitude) {
|
if (e.longitude) {
|
||||||
this.longitude = e.longitude;
|
this.longitude = e.longitude;
|
||||||
this.latitude = e.latitude;
|
this.latitude = e.latitude;
|
||||||
|
@ -2,179 +2,195 @@
|
|||||||
<view>
|
<view>
|
||||||
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
|
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
|
||||||
<view class="bg">
|
<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 class="bg_img" mode="widthFix"
|
||||||
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
|
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_body">
|
||||||
<view class="b_content">
|
<view class="b_content">
|
||||||
<view v-if="info.content" v-html="info.content.content"></view>
|
<view v-if="info.content" v-html="info.content.content"></view>
|
||||||
</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>
|
</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>
|
||||||
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { consumption, chooseConsumption } from "@/api/activity.js"
|
import { consumption, chooseConsumption } from "@/api/activity.js"
|
||||||
import { getArticleList } from "@/api/api.js"
|
import { getArticleList } from "@/api/api.js"
|
||||||
import { Toast } from "../../../libs/uniApi";
|
import { Toast } from "../../../libs/uniApi";
|
||||||
import authorize from "@/components/Authorize.vue";
|
import authorize from "@/components/Authorize.vue";
|
||||||
import { getUserInfo } from '@/api/user.js';
|
import { getUserInfo } from '@/api/user.js';
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components: {
|
||||||
authorize
|
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(){ //显示活动二
|
data() {
|
||||||
return this.Alist.find(item=>item.title=='用户推荐拉新活动')
|
return {
|
||||||
}
|
info: {},
|
||||||
},
|
userInfo: {},
|
||||||
methods: {
|
Alist: [],
|
||||||
consumption(){
|
activity: {
|
||||||
consumption().then(res=>{
|
title: ''
|
||||||
this.Alist = res.data;
|
},
|
||||||
})
|
show: false,
|
||||||
|
isAuto: false, //没有授权的不会自动授权
|
||||||
|
isShowAuth: false, //是否隐藏授权
|
||||||
|
is_join_activity: 0, //是否已确认参加活动
|
||||||
|
}
|
||||||
},
|
},
|
||||||
back(){
|
onLoad() {
|
||||||
uni.navigateBack()
|
this.getArticleList();
|
||||||
|
this.is_join_activity = uni.getStorageSync('is_join_activity');
|
||||||
},
|
},
|
||||||
changeA(item){
|
onShow() {
|
||||||
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.getUserInfo();
|
||||||
this.isShowAuth = false;
|
this.consumption();
|
||||||
},
|
},
|
||||||
// 打开授权
|
computed: {
|
||||||
openAuto() {
|
show_a1() { //显示活动一
|
||||||
// console.log('hajhcdsohjcosvjco')
|
return this.Alist.find(item => item.title == '用户消费补贴活动')
|
||||||
this.isAuto = true;
|
},
|
||||||
this.isShowAuth = true
|
show_a2() { //显示活动二
|
||||||
|
return this.Alist.find(item => item.title == '用户推荐拉新活动')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 授权关闭
|
methods: {
|
||||||
authColse: function(e) {
|
consumption() {
|
||||||
this.isShowAuth = e
|
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()
|
uni.stopPullDownRefresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page{
|
page {
|
||||||
background-color: #fff5dd;
|
background-color: #fff5dd;
|
||||||
}
|
|
||||||
.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>
|
.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>
|
@ -8,7 +8,7 @@
|
|||||||
<view class="b_qr">
|
<view class="b_qr">
|
||||||
<view class="qr_body">
|
<view class="qr_body">
|
||||||
<view class="qr_code">
|
<view class="qr_code">
|
||||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a7f40202401191635272620.png"></image>
|
<image :src="qr_img"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="qr_text">扫一扫,红包马上就到</view>
|
<view class="qr_text">扫一扫,红包马上就到</view>
|
||||||
<view class="qr_tips">温馨提示:邀请新用户才有机会获得红包哦</view>
|
<view class="qr_tips">温馨提示:邀请新用户才有机会获得红包哦</view>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeActivityStatus, storeActivityReceive } from "@/api/activity.js"
|
import { storeActivityStatus, storeActivityReceive, storeActivityQrcode } from "@/api/activity.js"
|
||||||
import { Toast } from "../../../libs/uniApi";
|
import { Toast } from "../../../libs/uniApi";
|
||||||
import { getUserInfo } from '@/api/user.js';
|
import { getUserInfo } from '@/api/user.js';
|
||||||
export default {
|
export default {
|
||||||
@ -112,14 +112,13 @@ export default {
|
|||||||
end_time: ''
|
end_time: ''
|
||||||
},
|
},
|
||||||
status: 0, //0不可开, 1可开, 2已开
|
status: 0, //0不可开, 1可开, 2已开
|
||||||
|
qr_img: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.storeActivityQrcode();
|
||||||
this.loadInfo();
|
this.loadInfo();
|
||||||
// this.$nextTick(()=>{
|
|
||||||
// this.open();
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
back(){
|
back(){
|
||||||
@ -137,6 +136,11 @@ export default {
|
|||||||
close(){
|
close(){
|
||||||
this.$refs.redPacket.close();
|
this.$refs.redPacket.close();
|
||||||
},
|
},
|
||||||
|
storeActivityQrcode(){
|
||||||
|
storeActivityQrcode().then(res=>{
|
||||||
|
this.qr_img = res.data.url;
|
||||||
|
})
|
||||||
|
},
|
||||||
// 打开红包
|
// 打开红包
|
||||||
async openRedPacket(){
|
async openRedPacket(){
|
||||||
this.$refs.redPacket.close();
|
this.$refs.redPacket.close();
|
||||||
@ -190,7 +194,8 @@ page{
|
|||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
height: 750rpx;
|
height: 750rpx;
|
||||||
margin: 0 20rpx;
|
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;
|
border-radius: 50rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
.qr_body{
|
.qr_body{
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<view class="bg">
|
<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 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>
|
<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 class="b_title">
|
||||||
<view>总计获得</view> <view class="count">{{total_amount}}</view> <view>元补贴红包</view>
|
<view>总计获得</view> <view class="count">{{total_amount}}</view> <view>元补贴红包</view>
|
||||||
</view>
|
</view>
|
||||||
@ -84,6 +85,15 @@ page{
|
|||||||
top: 30rpx;
|
top: 30rpx;
|
||||||
left: 30rpx;
|
left: 30rpx;
|
||||||
}
|
}
|
||||||
|
.bg_title{
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 500;
|
||||||
|
position: absolute;
|
||||||
|
top: 30rpx;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%);
|
||||||
|
}
|
||||||
.b_title{
|
.b_title{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
184
pages/newActivity/subsidy/subsidy2.vue
Normal file
184
pages/newActivity/subsidy/subsidy2.vue
Normal 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>
|
184
pages/newActivity/subsidy/subsidy3.vue
Normal file
184
pages/newActivity/subsidy/subsidy3.vue
Normal 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>
|
@ -1,25 +1,162 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import { storeActivityTotal } from "@/api/activity.js"
|
||||||
data() {
|
export default {
|
||||||
return {
|
data() {
|
||||||
|
return {
|
||||||
}
|
list: []
|
||||||
},
|
}
|
||||||
onLoad() {},
|
},
|
||||||
onShow() {},
|
onLoad() {},
|
||||||
methods: {},
|
onShow() {
|
||||||
onPullDownRefresh() {
|
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()
|
uni.stopPullDownRefresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<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>
|
@ -53,7 +53,7 @@
|
|||||||
<view class="r_body">
|
<view class="r_body">
|
||||||
<view class="r_count">
|
<view class="r_count">
|
||||||
<view class="rc_count">
|
<view class="rc_count">
|
||||||
<text class="rc_icon">¥</text>{{item.coupon_price}}
|
<text class="rc_icon">¥</text>{{item.balance}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="r_content">
|
<view class="r_content">
|
||||||
@ -62,7 +62,7 @@
|
|||||||
<view>有效期至 {{item.end_time}}</view>
|
<view>有效期至 {{item.end_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="r_icon">
|
<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>
|
<u-icon v-else name="checkmark-circle" color="#FFF3CC" size="56rpx"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -70,7 +70,11 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="footer">
|
<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 class="btn" @click="comfirm">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -113,11 +117,11 @@
|
|||||||
methods: {
|
methods: {
|
||||||
change(e, i) {
|
change(e, i) {
|
||||||
console.log(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;
|
else this.changeRed = e;
|
||||||
},
|
},
|
||||||
comfirm(){
|
comfirm(){
|
||||||
uni.$emit('changeRedPacket', this.changeRed.uid);
|
uni.$emit('changeRedPacket', this.changeRed?.coupon_user_id||'');
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -85,17 +85,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="packet_card">
|
<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">
|
<view class="p_d_count">
|
||||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
|
<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>我的余额 (元)</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">
|
<view class="p_d_count">
|
||||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d2868202401201750014779.png"></image>
|
<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>
|
<view>红包余额 (元)</view>
|
||||||
</view>
|
</view>
|
||||||
@ -1342,17 +1342,28 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
padding: 20rpx 40rpx;
|
position: relative;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.p_d_item{
|
.p_d_item{
|
||||||
|
position: absolute;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
flex: 1;
|
width: 300rpx;
|
||||||
|
height: 100rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
&:nth-child(1){
|
||||||
|
top: 20rpx;
|
||||||
|
left: 30rpx;
|
||||||
|
}
|
||||||
|
&:nth-child(2){
|
||||||
|
top: 20rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
}
|
||||||
.p_d_count{
|
.p_d_count{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -377,12 +377,11 @@
|
|||||||
<view class='discount'>暂无优惠券</view>
|
<view class='discount'>暂无优惠券</view>
|
||||||
</block>
|
</block>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class='item acea-row row-between-wrapper'
|
<view class='item acea-row row-between-wrapper'>
|
||||||
v-if="platformConsumption.length > 0">
|
|
||||||
<view>红包抵扣<!-- <text @tap="showCoupon" class="iconfont icon-wenhao1"></text> --></view>
|
<view>红包抵扣<!-- <text @tap="showCoupon" class="iconfont icon-wenhao1"></text> --></view>
|
||||||
<block v-if="platformConsumption.length > 0">
|
<block v-if="platformConsumption.length > 0">
|
||||||
<view class='discount money red_packet' @tap='couponTap3()'>
|
<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 v-else>有补贴红包未选</text>
|
||||||
<text class='iconfont icon-jiantou'></text>
|
<text class='iconfont icon-jiantou'></text>
|
||||||
</view>
|
</view>
|
||||||
@ -683,6 +682,9 @@
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['isLogin', 'viewColor']),
|
...mapGetters(['isLogin', 'viewColor']),
|
||||||
...configMap(['hide_mer_status', 'alipay_open', 'yue_pay_status']),
|
...configMap(['hide_mer_status', 'alipay_open', 'yue_pay_status']),
|
||||||
|
red_price(){ // 计算红包抵扣了多少钱
|
||||||
|
return (this.proPrice - this.totalPrice).toFixed(2);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
alipay_open(n) {
|
alipay_open(n) {
|
||||||
@ -1657,6 +1659,7 @@
|
|||||||
.Tips({
|
.Tips({
|
||||||
title: '余额不足!'
|
title: '余额不足!'
|
||||||
});
|
});
|
||||||
|
data.consumption_id = this.consumption_id;
|
||||||
|
|
||||||
// 先货后款暂不可用
|
// 先货后款暂不可用
|
||||||
// if (this.payType == 'creditBuy') {
|
// if (this.payType == 'creditBuy') {
|
||||||
@ -1705,7 +1708,8 @@
|
|||||||
title: this.deliveryName,
|
title: this.deliveryName,
|
||||||
check: true
|
check: true
|
||||||
}]
|
}]
|
||||||
} else if (!item.allow_delivery && item.allow_take) {
|
}
|
||||||
|
else if (!item.allow_delivery && item.allow_take) {
|
||||||
this.radioList = [{
|
this.radioList = [{
|
||||||
title: '到店核销',
|
title: '到店核销',
|
||||||
check: false
|
check: false
|
||||||
|
@ -10,18 +10,18 @@
|
|||||||
<view class='money'>{{userInfo.now_money || 0}}</view>
|
<view class='money'>{{userInfo.now_money || 0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef APP-PLUS || H5 -->
|
<!-- #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 -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP -->
|
<!-- #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 -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
<view class='cumulative acea-row row-top'>
|
<view class='cumulative acea-row row-top'>
|
||||||
<!-- v-if="balance_func_status == 1" -->
|
<!-- v-if="balance_func_status == 1" -->
|
||||||
<view class='item' >
|
<!-- <view class='item' >
|
||||||
<view>累计充值(元)</view>
|
<view>累计充值(元)</view>
|
||||||
<view class='money'>{{userInfo.total_recharge || 0}}</view>
|
<view class='money'>{{userInfo.total_recharge || 0}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
<view class='item'>
|
<view class='item'>
|
||||||
@ -44,12 +44,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>消费记录</view>
|
<view>消费记录</view>
|
||||||
</navigator>
|
</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'>
|
<view class='pictrue'>
|
||||||
<image :src="domain+'/static/diy/record3'+keyColor+'.png'"></image>
|
<image :src="domain+'/static/diy/record3'+keyColor+'.png'"></image>
|
||||||
</view>
|
</view>
|
||||||
<view>充值记录</view>
|
<view>充值记录</view>
|
||||||
</navigator>
|
</navigator> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
|
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
|
||||||
|
@ -14,6 +14,10 @@ const state = {
|
|||||||
location:{
|
location:{
|
||||||
lat: null,
|
lat: null,
|
||||||
long: null,
|
long: null,
|
||||||
|
},
|
||||||
|
address:{
|
||||||
|
street_id: '',
|
||||||
|
townName: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -24,6 +28,10 @@ const mutations = {
|
|||||||
setLocation(state, data){
|
setLocation(state, data){
|
||||||
state.location.lat = data.lat;
|
state.location.lat = data.lat;
|
||||||
state.location.long = data.long;
|
state.location.long = data.long;
|
||||||
|
},
|
||||||
|
setAddress(state, data){
|
||||||
|
state.address.street_id = data.street_id;
|
||||||
|
state.address.townName = data.townName;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ function baseRequest(url, method, data, {
|
|||||||
reject(res.data.message || '系统错误');
|
reject(res.data.message || '系统错误');
|
||||||
},
|
},
|
||||||
fail: (message) => {
|
fail: (message) => {
|
||||||
|
console.log('失败',message);
|
||||||
reject('请求失败');
|
reject('请求失败');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user