Compare commits

..

42 Commits
old ... master

Author SHA1 Message Date
mkm
d3c0eece63 Merge pull request 'new' (#3) from new into master
Reviewed-on: #3
2024-01-28 21:31:00 +08:00
weipengfei
39390d232a 更新 2024-01-27 18:42:08 +08:00
weipengfei
eae451bf17 Merge branch 'new' of https://gitea.lihaink.cn/mkm/nk-shop2.0 into new 2024-01-27 18:31:03 +08:00
weipengfei
4a305a8284 更新 2024-01-27 18:30:56 +08:00
weipengfei
4dab876322 更新 2024-01-27 18:25:33 +08:00
zmj
b963704657 农户信息表单收集 2024-01-27 18:23:47 +08:00
weipengfei
cc453c8d4e 更新 2024-01-27 15:43:36 +08:00
weipengfei
0c97fe7020 更新 2024-01-26 18:46:15 +08:00
weipengfei
3d983049e8 更新 2024-01-26 14:45:28 +08:00
weipengfei
9363d3a413 更新 2024-01-26 13:58:33 +08:00
weipengfei
881dbcc501 更新 2024-01-26 10:38:57 +08:00
weipengfei
38de673847 更新 2024-01-25 18:16:14 +08:00
weipengfei
81e4daacd5 更新 2024-01-25 16:42:46 +08:00
weipengfei
06b92e8206 更新 2024-01-25 11:01:27 +08:00
weipengfei
08742b5870 更新 2024-01-24 18:22:31 +08:00
weipengfei
8b147d461c 更新 2024-01-24 18:14:40 +08:00
weipengfei
28537e7181 更新 2024-01-24 17:58:31 +08:00
weipengfei
c1c342d504 更新 2024-01-24 16:44:33 +08:00
weipengfei
bcd7e001c4 更新活动 2024-01-23 19:58:11 +08:00
weipengfei
61083bc7b1 新增两元专区功能 2024-01-23 11:36:51 +08:00
weipengfei
ebb0a5462f 更新 2024-01-23 11:36:17 +08:00
weipengfei
94377b4afd 更新 2024-01-22 18:51:10 +08:00
weipengfei
f2940b9c8a 更新 2024-01-22 17:28:31 +08:00
weipengfei
1958afbda0 更新 2024-01-22 00:33:59 +08:00
weipengfei
0c03d067db 更新 2024-01-21 23:52:59 +08:00
weipengfei
a1fa0c4f15 更新 2024-01-21 23:52:07 +08:00
weipengfei
faf1d479ab 更新 2024-01-21 23:40:10 +08:00
weipengfei
072cdd2cec 更新 2024-01-21 23:22:39 +08:00
weipengfei
0930807eff 更新 2024-01-21 20:39:54 +08:00
weipengfei
d3bd273bdd 更新 2024-01-21 20:05:53 +08:00
weipengfei
b19256d9c8 更新 2024-01-21 19:58:09 +08:00
weipengfei
51fc59d272 更新 2024-01-21 18:59:41 +08:00
weipengfei
0141fcc6b2 更新 2024-01-20 18:39:15 +08:00
weipengfei
4d258a0c2e 更新 2024-01-20 18:27:30 +08:00
weipengfei
5ab6141612 更新订单结算页面 2024-01-20 11:13:01 +08:00
weipengfei
4ce99e4abf 更新图片 2024-01-20 10:45:44 +08:00
weipengfei
b0663749e4 更新 2024-01-19 18:40:55 +08:00
weipengfei
2755927c6d 更新 2024-01-19 18:10:45 +08:00
weipengfei
69ddd11bf7 更新 2024-01-19 17:40:30 +08:00
weipengfei
1ff8f6c355 图片 2024-01-19 17:33:44 +08:00
weipengfei
c360adf281 更新 2024-01-19 17:33:27 +08:00
weipengfei
8555bf884a 更新 2024-01-18 17:45:52 +08:00
77 changed files with 9592 additions and 892 deletions

23
App.vue
View File

@ -74,16 +74,23 @@
...uni.getStorageSync('GLOBAL_DATA') || {}
},
onLaunch: function(option) {
// #ifdef H5
uni.setTabBarItem({
index: 1,
visible: false
})
// #endif
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid;
let appkey = uni.getStorage({
key: 'launchFlag'
})
if (appkey) {
setTimeout(() => {
this.$store.dispatch('INIT_CONFIG');
}, 6000)
}
// let appkey = uni.getStorage({
// key: 'launchFlag'
// })
// if (appkey) {
// setTimeout(() => {
// this.$store.dispatch('INIT_CONFIG');
// }, 6000)
// }
this.$store.dispatch('INIT_CONFIG');
// #ifdef APP-PLUS
//uniMP

View File

@ -261,4 +261,53 @@ 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);
}
// 拉新红包活动完成状态
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);
}
// 活动商品专区
export function storeActivityProduct(data) {
return request.get(`storeActivity/product`, data, {
noAuth: true
});
}
// 活动区域列表
export function storeActivityDistrict(data) {
return request.get(`storeActivity/district`, data);
}

102
components/activityCard.vue Normal file
View 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="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn1.webp"></image>
<image class="btn_img" @click="open()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn2.webp"></image>
</view>
</view>
<image class="head_img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_head.webp" info="活动标题"></image>
<image class="close_img" @click="close" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/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: 90vh;
// 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>

View File

@ -0,0 +1,62 @@
<template>
<view class="a_h_home">
<view class="a_h_body" v-if="show">
<image @click.stop="open()" class="a_h_bg" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_card.webp"></image>
<image v-if="showClose" @click.stop="close()" class="a_h_close" src="../static/images/wt_close.png"></image>
</view>
</view>
</template>
<script>
export default {
props:{
showClose: {
type: Boolean,
default: true
}
},
data(){
return {
show: true
}
},
methods:{
open(){
this.$emit('click');
},
close(){
this.show = false;
}
}
}
</script>
<style lang="scss">
.a_h_home{
position: fixed;
bottom: 25vh;
right: 30rpx;
z-index: 10;
width: 180rpx;
// height: 150rpx;
.a_h_bg{
height: 100%;
width: 100%;
}
.a_h_body{
width: 100%;
height: 100%;
// background-color: #eee;
position: relative;
.a_h_close{
position: absolute;
right: 5rpx;
top: 5rpx;
width: 30rpx;
height: 30rpx;
background-color: rgba(#000, 0.4);
border-radius: 50%;
}
}
}
</style>

View File

@ -22,7 +22,7 @@
<view class="flex flex_end">
<view class="price"><text class="pro">{{leftPrice}}.</text>{{rightPrice}}
</view>
<view>订货价</view>
<!-- <view>订货价</view> -->
</view>
<view class="short_name">{{datas.store_name}}</view>
<view class="flex">
@ -56,12 +56,12 @@
</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>
</view>
<view class="btn" @click.stop="$u.throttle(addcart, 1500)">加入购物车</view>
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
</view>
</view>
</uni-popup>
@ -79,6 +79,10 @@
source:{
type: Number,
default: null
},
isBuy: {
type: Boolean,
default: false
}
},
data() {
@ -234,6 +238,9 @@
})
this.$emit('addCart');
this.close();
if(this.isBuy){
this.navgoCart();
}
}).catch(err => {
uni.showToast({
title: err,
@ -252,7 +259,11 @@
changeCurrent(e){
this.current = e.detail.current;
},
navgo(url) {
navgoCart(url=null) {
if(!url) {
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
else url = '/pages/order_addcart/order_addcart';
}
uni.navigateTo({
url
})

View File

@ -0,0 +1,534 @@
<template>
<view>
<uni-popup ref="popupRef" type="bottom" @change="changeShow">
<view class="pop">
<scroll-view scroll-y class="scroll">
<view class="image">
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
<block v-if="product.slider_image && product.slider_image.length>0">
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
<image class="img" :src="item"></image>
</swiper-item>
</block>
<swiper-item v-else>
<image class="img" :src="datas.image||defualtImg"></image>
</swiper-item>
</swiper>
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
<view class="border"></view>
</view>
<view class="white_card">
<view class="flex flex_end">
<block v-if="datas.limited_price">
<view class="price"><text class="pro">{{leftPrice2}}.</text>{{rightPrice2}}
</view>
<view class="price" style="text-decoration: line-through;color: #999;font-weight: 400;font-size: 28rpx;">原价: <text>{{leftPrice}}.</text>{{rightPrice}}</view>
</block>
<view v-else class="price"><text>{{leftPrice}}.</text>{{rightPrice}}</view>
<!-- <view>订货价</view> -->
</view>
<view class="short_name">{{datas.store_name}}</view>
<view class="flex">
<view class="shop_name">
<image class="icon" src="@/static/images/icon/short.png"></image>
<view>{{datas.merchant.mer_name}}</view>
</view>
</view>
<u-line></u-line>
<block name="规格选中" v-for="(att, indexw) in attr" :key="indexw">
<view class="m_title">{{att.attr_name}}</view>
<view class="flex" style="flex-wrap: wrap;">
<view class="attr" :class="{'attr_active': item.check}"
v-for="(item, indexn) in att.attr_value" :key="indexn"
@click="changeAttr(indexw, indexn)">
{{item.attr}}
</view>
</view>
</block>
<view class="m_title num">
<view>购买数量</view>
<view class="input">
<view class="input_item sub" @click="subCartNum">-</view>
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
<view class="input_item plus" @click="plusCartNum">+</view>
</view>
</view>
<view>
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
</view>
</view>
</scroll-view>
<view class="button">
<!-- <view class="b_icon" @click="navgoCart()">
<image src="@/static/images/icon/car.png"></image>
<view>购物车</view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
</view> -->
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
postCartAdd,
getProductDetail
} from '@/api/store.js';
import { Toast } from '../libs/uniApi';
import { data } from '../uni_modules/uview-ui/libs/mixin/mixin';
export default {
name: "shortPopup",
props: {
source:{
type: Number,
default: null
},
isBuy: {
type: Boolean,
default: false
}
},
data() {
return {
isShow: false, //
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
datas: {
image: '',
store_name: '',
merchant: {
mer_name: ''
},
price: '',
},
product: {},
attrValue: [],
attr: [], //
changeSkuKey: '', //key
sku: {}, //
sku_key_list: [], //
changeSkuKey: '', //
change: {
stock: ''
},
cart_num: 1, //
goodsNum: 0, //
current: 0, //
};
},
mounted() {},
computed:{
leftPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[0]||'0';
},
rightPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[1]||'00';
},
leftPrice2(){
return this.datas.limited_price.split('.')[0]||'0';
},
rightPrice2(){
return this.datas.limited_price.split('.')[1]||'00';
}
},
methods: {
// ,
setDatas(datas, goodsNum) {
getProductDetail(datas.product_id).then((res)=>{
this.attr = res.data.attr;
if(this.attr.length>0) this.attr.forEach((item, index)=>{
this.changeAttr(index, 0);
})
else this.changeSkuKey = '';
})
this.goodsNum = goodsNum;
this.datas = datas;
this.product = datas.product;
this.attrValue = datas.product?.attrValue;
this.change = this.attrValue[0];
this.cart_num = 1;
this.sku = datas.sku||{};
this.sku_key_list = Object.keys(this.sku);
},
//
inputCartNum(e) {
if(this.sku){
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.sku[this.changeSkuKey].stock;
})
}
}else if (this.change.stock <= this.cart_num) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.change.stock;
})
}
},
//
subCartNum() {
if (this.cart_num <= 1) {
return uni.showToast({
icon: 'none',
title: '最少要买一件哦'
})
}
this.cart_num--;
},
//
plusCartNum() {
return Toast('最多购买一件哦');
if(this.sku){
if (this.sku[this.changeSkuKey].stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
}else if (this.change.stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
this.cart_num++;
},
changeAttr: function(indexw, indexn) {
let that = this;
this.$set(this.attr[indexw], 'index', this.attr[indexw].attr_values[indexn]);
this.attr[indexw].attr_value.forEach((item, index)=>{
if(index==indexn)item.check = true;
else item.check = false;
})
let value = that.getCheckedValue().join(",");
this.changeSkuKey = value;
},
//
getCheckedValue: function() {
let productAttr = this.attr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
if (productAttr[i].index === productAttr[i].attr_values[j]) {
value.push(productAttr[i].attr_values[j]);
}
}
}
return value;
},
//
addcart() {
if (this.sku[this.changeSkuKey]) {
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
let data = {
cart_num: this.cart_num,
is_new: 0,
product_attr_unique: this.sku[this.changeSkuKey].unique,
product_id: this.datas.product_id,
product_type: this.datas.product_type,
source: this.source,
spread_id: "",
}
let that = this
let res = postCartAdd({
...data
}).then((res, err) => {
if(this.isBuy) return uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&type_id=${this.datas.merchant.type_id}&source=${this.source}`
});
uni.showToast({
title: "加入成功",
duration: 1000,
})
this.$emit('addCart');
this.close();
if(this.isBuy){
this.navgoCart();
}
}).catch(err => {
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
} else {
uni.showToast({
icon: 'none',
title: '商品规格不存在'
})
}
},
//
changeCurrent(e){
this.current = e.detail.current;
},
navgoCart(url=null) {
if(!url) {
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
else url = '/pages/order_addcart/order_addcart';
}
uni.navigateTo({
url
})
},
open() {
this.$refs.popupRef.open();
},
close() {
this.$refs.popupRef.close();
},
changeShow(e) {
this.isShow = e.show;
}
}
}
</script>
<style lang="scss">
.pop {
background-color: #fff;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
position: relative;
.scroll{
height: calc(90vh - 150rpx);
}
.flex_end {
align-items: flex-end;
}
.image {
height: 750rpx;
width: 750rpx;
position: relative;
.current{
position: absolute;
bottom: 70rpx;
left: 30rpx;
width: 67rpx;
height: 37rpx;
background: rgba(#333, 0.2);
border-radius: 11rpx 11rpx 11rpx 11rpx;
text-align: center;
color: #fff;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
.img {
width: 100%;
height: 100%;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
}
.close {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 50.82rpx;
height: 50.82rpx;
}
.border {
position: absolute;
bottom: -1rpx;
left: 0;
background-color: #fff;
height: 40rpx;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
}
}
.white_card {
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
background-color: #fff;
margin: 0 28rpx;
padding-bottom: 30rpx;
color: #737373;
font-size: 26.29rpx;
.price {
font-size: 35rpx;
font-family: SF Pro Display-Semibold, SF Pro Display;
font-weight: 600;
color: #F84221;
padding-right: 30rpx;
.pro {
font-size: 49.07rpx;
}
}
.short_name {
font-size: 33rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
}
.shop_name {
display: flex;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 26rpx 26rpx 26rpx 26rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
align-items: center;
.icon {
width: 31.54rpx;
height: 31.54rpx;
margin-right: 10rpx;
}
}
.m_title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 31rpx;
margin-bottom: 21rpx;
}
.attr {
opacity: 1;
border: 1rpx solid #F84221;
color: #333333;
padding: 15rpx 30rpx;
margin-right: 20rpx;
height: 63rpx;
line-height: 60rpx;
border-radius: 63rpx;
display: flex;
align-items: center;
justify-content: center;
}
.attr_active{
// background-color: #FEF5F3;
// color: #F84221;
background-color: #F84221;
color: #fff;
}
.num {
display: flex;
justify-content: space-between;
align-items: center;
.input {
display: flex;
align-items: center;
height: 48rpx;
.input_item {
width: 44rpx;
height: 44rpx;
text-align: center;
line-height: 40rpx;
border: 2rpx solid #fff;
font-size: 26rpx;
color: #333;
}
.input_view {
width: 60rpx;
}
.sub {
border: 2rpx solid #FCB9AD;
border-radius: 7rpx 0rpx 0rpx 7rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
.plus {
border: 2rpx solid #FCB9AD;
border-radius: 0rpx 7rpx 7rpx 0rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
}
}
}
.button {
padding: 28rpx;
margin-bottom: 28rpx;
background-color: #fff;
display: flex;
justify-content: space-around;
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
.b_icon {
display: flex;
flex-direction: column;
align-items: center;
font-size: 19rpx;
font-weight: 400;
color: #333333;
position: relative;
image {
width: 50.82rpx;
height: 50.82rpx;
}
.badge {
position: absolute;
top: -5rpx;
right: -10rpx;
color: #fff;
min-width: 28rpx;
height: 28rpx;
text-align: center;
line-height: 24rpx;
background: #F84221;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FFFFFF;
}
}
.btn {
width: 575rpx;
height: 84rpx;
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
}
}
</style>

View File

@ -8,6 +8,7 @@ let httpApiTwo
let httpApiThree
let httpApiFour
let httpApiFive
let httpApiSix
let wsApi
// 在打包之前请检查当前环境是否正确
@ -21,6 +22,7 @@ switch (env) {
httpApiTwo = 'https://nk.lihaink.cn'
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://worker-task.lihaink.cn'
httpApiSix = 'https://new-worker.lihaink.cn'
wsApi = 'wss://shop.lihaink.cn'
break;
case 'prew':
@ -28,6 +30,7 @@ switch (env) {
httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://preview-worker-task.lihaink.cn'
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
wsApi = 'wss://test.shop.lihaink.cn'
break;
default:
@ -36,9 +39,11 @@ switch (env) {
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://ceshi-worker-task.lihaink.cn'
httpApiFive = 'https://ceshi-zhibo.lihaink.cn'
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
}
const ossUrl = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public'
// httpApi=''
// 聊天接口修改此字符 小程序聊天要求wss 例如wss://mer.crmeb.net
@ -54,6 +59,7 @@ module.exports = {
HTTP_REQUEST_URL_THREE: httpApiThree,
HTTP_REQUEST_URL_FOUR: httpApiFour,
HTTP_REQUEST_URL_FIVE: httpApiFive,
HTTP_REQUEST_URL_SIX: httpApiSix,
VUE_APP_WS_URL: `${wsApi}?type=user`,
VUE_APP_WS_URL_ONE:wsApi_one,
// #endif
@ -63,6 +69,7 @@ module.exports = {
HTTP_REQUEST_URL: process.env.NODE_ENV == 'development'? httpApi : window.location.protocol + "//" + window.location.host,
HTTP_REQUEST_URL_TWO: httpApiTwo,
HTTP_REQUEST_URL_FIVE: httpApiFive,
HTTP_REQUEST_URL_SIX: httpApiSix,
HTTP_REQUEST_URL_FOUR: window.location.host == 'shop.lihaink.cn' ?'https://worker-task.lihaink.cn':window.location.host == 'test.shop.lihaink.cn'?'https://preview-worker-task.lihaink.cn':'https://ceshi-worker-task.lihaink.cn',
// 聊天长连接地址
@ -70,6 +77,7 @@ module.exports = {
// #endif
openPlantGrass: openPlantGrass,
ENV: env,
OSS_URL: ossUrl,
HEADER: {
'content-type': 'application/json',

View File

@ -18,11 +18,13 @@ import {
import skeleton from './components/skeleton/index.vue'
import BaseMoney from './components/BaseMoney.vue';
import Loading from './components/Loading.vue';
import activityHome from './components/activityHome.vue';
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.component('skeleton', skeleton)
Vue.component('BaseMoney', BaseMoney)
Vue.component('Loading', Loading)
Vue.component('activityHome', activityHome)
Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "1.7.2",
"versionCode" : 172,
"versionName" : "1.8.0",
"versionCode" : 180,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -84,7 +84,9 @@
},
"permissionPhoneState" : {
"request" : "none" //
}
},
"targetSdkVersion" : 30,
"minSdkVersion" : 23
},
/* ios */
"ios" : {

View File

@ -1,20 +1,30 @@
{
"pages": [
//pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 300,
// #ifdef APP-PLUS
// #ifdef APP-PLUS
"enablePullDownRefresh": true,
// #endif
"app-plus": {
"scrollIndicator": false //
}
}
},
{
"path": "pages/supply_chains/supply_chains",
"style": {
"navigationBarTitleText": "供应",
"enablePullDownRefresh": true,
// #endif
"app-plus": {
"scrollIndicator": false //
}
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
//#ifdef APP-PLUS
//
@ -135,16 +145,8 @@
"style": {
"navigationBarTitleText": "支付提示"
}
}, {
"path": "pages/supply_chains/supply_chains",
"style": {
"navigationBarTitleText": "供应",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
}, {
},
{
"path": "pages/moreProject/moreProject",
"style": {
"navigationBarTitleText": "商户平台",
@ -194,6 +196,122 @@
"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
}
},
{
"path" : "pages/redpacket/redpacket",
"style" :
{
"navigationBarTitleText" : "红包",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/redpacket/redpack_type",
"style" :
{
"navigationBarTitleText" : "红包余额",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/subsidy/subsidy2",
"style" :
{
"navigationBarTitleText" : "实物通用红包",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/subsidy/subsidy3",
"style" :
{
"navigationBarTitleText" : "现金抵扣红包",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/towPrice/towPrice",
"style" :
{
"navigationBarTitleText" : "两元专区",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/order_addcart/order_addcart_t",
"style" :
{
"navigationBarTitleText" : "购物车",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/newActivity/giftBag/giftBag",
"style" :
{
"navigationBarTitleText" : "新人礼包",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/helpPeople/helpPeople",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/helpPeople/formTable",
"style" :
{
"navigationBarTitleText" : "信息收集",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
}
],
"subPackages": [{
@ -550,6 +668,14 @@
"navigationBarTitleText": "我的账户"
}
},
{
"path" : "user_money/money",
"style" :
{
"navigationBarTitleText" : "我的余额",
"enablePullDownRefresh" : false
}
},
{
"path": "user_bill/index",
"style": {
@ -1714,39 +1840,47 @@
"selectedColor": "#E93323",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"iconWidth": "36",
"list": [{
"list": [
// {
// "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": "泸州"
"selectedIconPath": "static/tabbar_icon/a-a.png"
// "text": "泸州"
// "text": "供销"
},
{
"pagePath": "pages/gather/gather",
"iconPath": "static/tabbar_icon/b.png",
"selectedIconPath": "static/tabbar_icon/b-a.png",
"text": "生产"
"selectedIconPath": "static/tabbar_icon/b-a.png"
// "text": "生产"
},
{
"pagePath": "pages/plant_release/index",
"iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/c-a.png",
"text": "发布"
// {
// "pagePath": "pages/plant_release/index",
// "iconPath": "static/tabbar_icon/c.png",
// "selectedIconPath": "static/tabbar_icon/c-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/order_addcart/order_addcart_t",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png"
// "text": "购物车"
},
{
"pagePath": "pages/user/index",
"iconPath": "static/tabbar_icon/e.png",
"selectedIconPath": "static/tabbar_icon/e-a.png",
"text": "我的"
"selectedIconPath": "static/tabbar_icon/e-a.png"
// "text": "我的"
}
]

View File

@ -231,7 +231,7 @@
}
},
navigatorBack(){
if(this.searchValue!==''&&this.searchValue!==undefined&&this.searchValue!==null){
if(this.searchValue!==undefined&&this.searchValue!==null){
uni.navigateBack({
success:()=> {
uni.$emit('searchValue', this.searchValue);

View File

@ -17,8 +17,8 @@
<view class="place_wrapper flex_a_c" @click="changeMap">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street||'定位中' }}</view>
<view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop"
color="#fff"></uni-icons></view>
<!-- <view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop"
color="#fff"></uni-icons></view> -->
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color: #fff"> </view>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,84 @@
<template>
<view class="box" style="position: relative;">
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="li" @click="navSw('/pages/index/index')">
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/edf53202401271436507555.png" width="690rpx"
height="200rpx" style="position: absolute;" />
<view class="btn">
我是居民用户
</view>
</view>
<view class="li" style="margin-top: 50rpx;" @click="navgo('/pages/helpPeople/formTable')">
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/8489c202401271437055619.png" width="690rpx"
height="200rpx" style="position: absolute;" />
<view class="btn">
我是农民用户
</view>
</view>
</view>
</template>
<script>
export default {
methods: {
back(){
uni.navigateBack();
},
navgo(url) {
uni.navigateTo({
url
})
},
navSw(url){
uni.switchTab({
url:url
})
}
}
}
</script>
<style lang='scss' scoped>
.box {
width: 750rpx;
height: 1624rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9c4b4202401271437449183.png');
background-size: 100% 100%;
padding-top: 500rpx;
}
.li {
margin: 0rpx auto;
width: 690rpx;
height: 200rpx;
background-size: 100% 100%;
position: relative;
.btn {
z-index: 999;
position: absolute;
width: 287rpx;
height: 76rpx;
border-radius: 40rpx 40rpx 40rpx 40rpx;
opacity: 1;
border: 2rpx solid #FF5E0C;
text-align: center;
line-height: 76rpx;
color: #FF5E0C;
font-size: 34rpx;
right: 50rpx;
bottom: 50rpx;
}
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
</style>

File diff suppressed because it is too large Load Diff

1413
pages/index/index_old.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,195 @@
<template>
<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>
<view class="b_body">
<view class="b_content">
<view v-if="info.content" v-html="info.content.content"></view>
</view>
</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>
</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/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() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
background-color: #fff5dd;
}
.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: calc(var(--status-bar-height) + 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

@ -0,0 +1,909 @@
<template>
<view class="m_body">
<view class="bg">
<view class="bg_box">
<image class="bg_img" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/recharge.webp"></image>
<view class="bg_border"></view>
</view>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="body_card">
<view class="card1">
<view class="change_list">
<view class="change_item" @click="changeItem(item, index)"
v-for="(item, index) in changeList" :key="index">
<image class="item_pic" :src="item.pic"></image>
<view class="item_content">
<view class="top">
<view class="top_left"><text class="c_icon">¥</text> <text class="c_content">{{item.count}}</text> <text class="tips">现在购买礼包即送</text></view>
<view class="top_right">
<text>数量: </text>
<view @click="reduce(item)">- </view>
<view>{{item.num}} </view>
<view @click="append(item)">+ </view>
</view>
</view>
<view class="bottom">
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red1}}</view>
</view>
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red2}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="footer">
<view class="f_tip">
总计购买礼包金额:
<view class="price">
<text>{{total}}</text>
</view>
</view>
<view class="primary_btn" @click="$u.throttle(submitSub, 1500)">立即购买</view>
</view>
<uni-popup ref="redTipsRef">
<view class="ref_ref">
<view class="ref_top">
购买礼包金额达到
<text v-if="red_type==0">100-2000</text>
<text v-if="red_type==1">2001-4000</text>
<text v-if="red_type==2">4001-20000</text>
!
</view>
<view class="ref_center">
赠送红包变为
</view>
<view class="ref_bottom">
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red1}}</view>
</view>
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red2}}</view>
</view>
</view>
</view>
</uni-popup>
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
:totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
<script>
import { getCommissionInfo } from "@/api/user.js"
import { Toast } from "../../../libs/uniApi";
import {
mapGetters
} from "vuex";
import {
getUserInfo,
spreadInfo,
rechargeWechat
} from '@/api/user.js';
import authorize from '@/components/Authorize';
import payment from '@/components/payment';
export default {
components: {
authorize,
payment
},
data() {
return {
userInfo: {},
curNow: 0,
list1: [{
name: '余额购买'
}, {
name: '购买记录'
}],
changeList: [
{
count: 100, //
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item1.webp',
num: 0, //
},
{
count: 200,
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item2.webp',
num: 0, //
},
{
count: 500,
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item3.webp',
num: 0, //
},
{
count: 1000,
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item4.webp',
num: 0, //
}
],
nowChange: 0,
nowPrice: 0,
priceCount: 1,
isAuto: false, //
isShowAuth: false, //
recordList: [],
tipType: [
{
red1: '8%无门槛红包',
red2: '42%现金抵扣红包'
},
{
red1: '12%无门槛红包',
red2: '68%现金抵扣红包'
},
{
red1: '15%无门槛红包',
red2: '85%现金抵扣红包'
},
],
red_type: 0,
where: {
page: 1,
limit: 15,
type: 2
},
otherValue: '其他',
now_money: 0,
navRecharge: ['账户购买', '佣金转入'],
active: 0,
number: '',
from: '',
placeholder: "0.00",
picList: [],
activePic: 0,
money: "",
numberPic: '',
rechar_id: '0',
rechargeAttention: [],
pay_close: false,
totalPrice: '0',
payMode: [{
name: '微信支付',
icon: 'icon-weixinzhifu',
// #ifdef H5
value: 'h5',
// #endif
// #ifdef MP
value: 'routine',
// #endif
// #ifdef APP-PLUS
value: 'weixin',
// #endif
title: '微信快捷支付',
payStatus: true
}],
}
},
onLoad() {
if (this.isLogin) {
this.getUserInfo()
} else {
this.isAuto = true;
this.isShowAuth = true
}
},
onShow() {
},
computed: {
...mapGetters(['isLogin', 'viewColor', 'keyColor']),
total() {
return this.changeList.reduce((t, obj)=>{
return t + (obj.count * obj.num);
}, 0);
}
},
onReachBottom() {
this.getCommissionInfo();
},
methods: {
back(){
uni.navigateBack();
},
clickTab1(e) {
this.curNow = e.index;
if (e.index == 1) {
this.recordList = [];
this.where.page = 1;
this.getCommissionInfo();
}
},
changeItem(e, index) {
this.nowPrice = e;
this.nowChange = index;
if (this.priceCount * this.nowPrice > 20000) {
this.priceCount = Math.floor(20000 / this.nowPrice);
return Toast('不可超过2万元');
}
},
append(item) {
if(this.total + item.count >=2001 && this.total + item.count <=4000 && this.red_type != 1){
this.red_type = 1;
this.$refs.redTipsRef.open();
}else if(this.total + item.count >=4001 && this.total + item.count <=20000 && this.red_type != 2){
this.red_type = 2;
this.$refs.redTipsRef.open();
}
if (this.total + item.count > 20000 || this.total>=20000) {
return Toast('不可超过2万元');
} else item.num++;
},
reduce(item) {
if(this.total - item.count >=100 && this.total - item.count <=2000 && this.red_type != 0){
this.red_type = 0;
this.$refs.redTipsRef.open();
}else if(this.total - item.count >=2001 && this.total - item.count <=4000 && this.red_type != 1){
this.red_type = 1;
this.$refs.redTipsRef.open();
}
if (this.total==0||item.num==0) return Toast('不能再少啦');
else item.num--;
},
getCommissionInfo() {
getCommissionInfo(this.where).then((res) => {
if (res.data.list.length > 0) {
this.recordList = [...this.recordList, ...res.data.list];
if (res.data.list.length >= 15) this.where.page++;
}
})
},
/**
* 选择金额
*/
picCharge(idx, item) {
this.activePic = idx;
if (item === undefined) {
this.rechar_id = '0';
this.numberPic = "";
this.otherValue = ''
} else {
this.otherValue = '其他'
this.total = "";
this.rechar_id = item.id.toString();
this.numberPic = item.data.price;
}
},
/**
* 购买额度选择
*/
getRecharge() {
getRechargeApi()
.then(res => {
this.picList = res.data.recharge_quota;
if (this.picList[0]) {
this.rechar_id = this.picList[0].id.toString();
this.numberPic = this.picList[0].data.price;
}
this.rechargeAttention = res.data.recharge_attention || [];
})
.catch(res => {
this.$dialog.toast({
mes: res
});
});
},
onLoadFun: function() {
this.isShowAuth = false;
this.getUserInfo();
this.getRecharge();
},
//
authColse: function(e) {
this.isShowAuth = e
},
navRecharges: function(index) {
this.active = index;
},
/**
* 获取用户信息
*/
getUserInfo: function() {
let that = this;
spreadInfo().then(res => {
that.$set(that, 'userInfo', res.data);
})
},
payClose: function() {
this.pay_close = false;
},
payCheck: function(type) {
this.createOrder(type);
},
/*
* 用户购买
*/
submitSub: function(e) {
let that = this
let value = this.total;
//
if (that.active) {
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
return that.$util.Tips({
title: '请输入金额'
});
}
uni.showModal({
title: '转入余额',
content: '转入余额后无法再次转出,确认是否转入余额',
success(res) {
if (res.confirm) {
rechargeBrokerage({
brokerage: parseFloat(value),
}).then(res => {
// that.$set(that, 'userInfo.now_money', that.$util.$h.Add(value, that.userInfo.now_money))
uni.showToast({
icon: 'success',
title: '转入成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: '/pages/users/user_money/index'
// });
}).catch(err => {
return that.$util.Tips({
title: err
})
});
} else if (res.cancel) {
return that.$util.Tips({
title: '已取消'
});
}
},
})
} else {
if (this.rechar_id == 0) {
if (parseFloat(that.total) === 0) {
return that.$util.Tips({
title: '购买金额金额不能为0'
});
}
if (!that.total) {
return that.$util.Tips({
title: '请填写购买金额!'
});
}
if (!Number(that.total)) {
return that.$util.Tips({
title: '请填写正确的金额!'
});
}
}
this.pay_close = true
}
},
createOrder(type) {
let that = this;
let query = {
price: that.rechar_id == 0 ? that.total : that.numberPic,
recharge_id: that.rechar_id,
type: type,
// #ifdef H5
return_url: location.port ? location.protocol + '//' + location.hostname + ':' + location.port +
'/pages/users/user_money/money' : location.protocol + '//' + location.hostname +
'/pages/users/user_money/money'
// #endif
};
// #ifdef MP
// openPaySubscribe().then(() => {
rechargeWechat(query).then(res => {
that.callPay(res);
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
});
});
// });
// #endif
// #ifndef MP
rechargeWechat(query).then(res => {
console.log('res', res);
that.callPay(res);
}).catch(err => {
console.log('err', err);
uni.showToast({
title: err,
icon: 'none'
});
});
// #endif
},
//
callPay(res) {
let that = this,
status = res.data.type,
orderId = res.data.recharge_id,
callback_key = res.data.pay_key,
jsConfig = res.data.config,
goPages = '/pages/users/user_money/money';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
case 'error':
uni.hideLoading();
Toast(res.message)
// return that.$util.Tips({
// title: res.message
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'success':
uni.hideLoading();
uni.showToast({
icon: 'success',
title: res.message
})
// if (that.seckillId)
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'alipay':
case "alipayQr":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' + jsConfig + '&type=10'
})
return;
break;
// #ifndef MP
case "wechat":
case "weixin":
case "weixinApp":
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
uni.showToast({
icon: 'success',
title: res.message
})
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
}).catch(res => {
uni.showToast({
icon: 'success',
title: '取消支付'
})
// if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
})
// #endif
// #ifdef APP-PLUS
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
}
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon: 'success',
title: '支付成功'
})
// let url = '/pages/users/user_money/money';
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 4,
// url: url
// });
},
fail: (e) => {
console.log(e);
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
}
})
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
// #endif
// #ifdef MP
case "routine":
jsConfig.timeStamp = jsConfig.timestamp;
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
}
uni[mp_pay_name]({
...jsConfig,
success: function(res) {
uni.hideLoading();
that.getUserInfo();
that.getRecharge();
// console.log('12323424')
uni.showToast({
icon: 'success',
title: '支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: function(e) {
uni.hideLoading();
Toast('取消支付')
// return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
},
})
break;
// #endif
case "balance":
uni.hideLoading();
//
Toast(res.msg)
// return that.$util.Tips({
// title: res.msg
// }, {
// tab: 5,
// url: goPages
// });
break;
// #ifdef H5
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url = `${host}/pages/users/user_money/money`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
setTimeout(() => {
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS
case 'alipayApp':
uni.requestPayment({
provider: 'alipay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon: 'success',
title: '支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: (e) => {
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
uni.redirectTo({
url: goPages
})
}
})
},
complete: () => {
uni.hideLoading();
},
});
break;
// #endif
}
},
onChangeFun: function(e) {
let opt = e;
let action = opt.action || null;
let value = opt.value != undefined ? opt.value : null;
action && this[action] && this[action](value);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.bg {
position: relative;
padding-bottom: 300rpx;
.bg_box{
height: 486rpx;
position: relative;
overflow: hidden;
.bg_img {
width: 750rpx;
height: 652rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_border{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 30rpx;
border-radius: 60rpx 60rpx 0 0;
background-color: #fff;
}
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.body_card {
color: #333;
.card1 {
background-color: #fff;
.change_list {
width: 700rpx;
margin: 0 auto;
display: flex;
flex-direction: column;
.change_item {
width: 700rpx;
height: 172rpx;
text-align: center;
background-color: #f7f7f7;
border-radius: 20rpx 20rpx 20rpx 20rpx;
font-size: 40rpx;
position: relative;
margin-bottom: 30rpx;
.item_pic{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.item_content{
padding: 26rpx;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.top{
display: flex;
justify-content: space-between;
align-items: center;
height: 70rpx;
.top_left{
font-size: 58rpx;
color: #ffc53d;
display: flex;
align-content: center;
.tips{
font-size: 24rpx;
border: 5rpx solid #ffc53d;
margin-left: 20rpx;
padding: 5rpx 15rpx;
border-radius: 60rpx;
color: #7C5906;
}
.c_content{
padding-top: 10rpx;
}
.c_icon {
padding-top: 15rpx;
font-size: 36rpx;
}
}
.top_right{
display: flex;
align-items: center;
color: #FF3A32;
text{
font-size: 28rpx;
}
view{
height: 60rpx;
width: 40rpx;
text-align: center;
line-height: 60rpx;
}
}
}
.bottom{
font-size: 28rpx;
display: flex;
align-items: center;
color: #FF3A32;
.bottom_item{
flex: 1;
display: flex;
align-items: center;
image{
width: 32rpx;
height: 40rpx;
}
.text{
padding-left: 15rpx;
}
}
}
}
}
.change_item_active {
background: rgba(#FF8056, 0.2);
border: 5rpx solid #FF8056;
color: #FF8056;
}
}
}
}
}
.m_body {
.footer {
position: fixed;
left: 0;
bottom: 0;
height: 120rpx;
width: 100vw;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
.f_tip {
display: flex;
align-items: flex-end;
font-style: 26rpx;
.price {
color: #FF8056;
text {
font-size: 44rpx;
margin-left: 20rpx;
margin-right: 5rpx;
}
}
}
.primary_btn {
background-color: #fa8147;
height: 80rpx;
border-radius: 80rpx;
width: 180rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
}
}
.ref_ref{
width: 630rpx;
height: 200rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 20rpx 10rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.ref_top{
color: #ffc53d;
}
.ref_center{
font-size: 24rpx;
border: 5rpx solid #ffc53d;
margin-left: 20rpx;
padding: 5rpx 15rpx;
border-radius: 60rpx;
color: #7C5906;
}
.ref_bottom{
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
color: #FF3A32;
.bottom_item{
width: 280rpx;
display: flex;
align-items: center;
image{
width: 32rpx;
height: 40rpx;
}
.text{
padding-left: 15rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,384 @@
<template>
<view>
<view class="bg">
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/invitation.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_body">
<view class="b_qr">
<view class="qr_body">
<view class="qr_code">
<image :src="qr_img"></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/public/uploads/new_activity/ibtn1.webp"></image>
<image v-if="status==1" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn2.webp"></image>
<image v-if="status==2" class="btn_image" @click="opened" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn3.webp"></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/public/uploads/new_activity/red_packet1.webp"></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/public/uploads/new_activity/close.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/public/uploads/new_activity/red_packet2.webp"></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/public/uploads/new_activity/close.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/public/uploads/new_activity/red_packet3.webp"></image>
<view class="p_text" style="bottom: 60rpx;">
<view class="smoll">恭喜你成功获得</view>
<view class="smoll red_count"><text class="count">{{red_packet.amount}}</text></view>
<view class="big2">购买指定商品可直接抵扣使用</view>
<view class="smoll">{{red_packet.end_time}}过期</view>
<image @click="close()" class="btn_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/put.webp"></image>
</view>
</view>
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.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/public/uploads/new_activity/irecoed.webp"></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, storeActivityQrcode } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
info: {
user_info: []
},
red_packet: {
amount: '0.00',
end_time: ''
},
status: 0, //0 1 2
qr_img: ''
}
},
onLoad() {},
onShow() {
this.storeActivityQrcode();
this.loadInfo();
},
methods: {
back(){
uni.navigateBack()
},
loadInfo(){
storeActivityStatus().then(res=>{
this.info = res.data;
if(res.data.allow_receive) this.status = 1;
})
},
opened(){
Toast('已经领取过啦!');
},
open(){
this.$refs.redPacket.open();
},
close(){
this.$refs.redPacket.close();
},
storeActivityQrcode(){
storeActivityQrcode().then(res=>{
this.qr_img = res.data.url;
})
},
//
async openRedPacket(){
this.$refs.redPacket.close();
try{
let {data} = await storeActivityReceive();
this.$nextTick(()=>{
this.red_packet = data;
this.$u.sleep(800).then(()=>{
this.status = 2;
this.$u.sleep(100).then(()=>{
this.open();
})
})
})
}catch(e){
Toast(e)
}
}
},
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: calc(var(--status-bar-height) + 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%);
background: #FFF6EB;
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>

View File

@ -0,0 +1,182 @@
<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().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,183 @@
<template>
<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: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 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,183 @@
<template>
<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: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 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,336 @@
<template>
<view>
<view class="bg">
<image class="bg_img" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_bg.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 style="padding-bottom: 16rpx;">
<picker :range="addressList" range-key="street_name" @change="changeAddress">
<block v-if="address.street_id">
当前活动区域为 <text style="color: #f84221;margin-left: 5rpx;">[ {{address.townName}} ] , 点击切换</text>
</block>
<block v-else>
<text style="color: #f84221;margin-left: 5rpx;">当前区域 [ {{address.townName}} ] 没有活动 , 点击切换</text>
</block>
</picker>
</view>
<block v-if="goodsList.length>0">
<view v-if="item.product" v-for="(item, index) in goodsList" class="short_item" @click="clickProduct(item)">
<image class="image" :src="item.product.image"></image>
<view class="short_item_right">
<view class="r_name">
<text v-if="item.mer_labels_name" class="mer-labels">{{item.mer_labels_name}}</text>{{item.product.store_name}}
</view>
<view style="display: flex;justify-content: flex-start;margin-top: 5rpx;">
<view class="r_street" v-if="item.merchant">{{item.merchant.street_name}}</view>
<view class="r_type" v-if="item.product.store_info||getSkuName(item)||item.unit_name">
<view v-if="getSkuName(item)">{{getSkuName(item)}}</view>
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
</view>
</view>
<view class="r_btn" v-if="item.product && item.product.price">
<view style="color: #7f7f7f;"><text style="font-size: 33rpx;">{{ item.product.price.split('.')[0] }}.</text>{{item.product.price.split('.')[1]}} 限时特惠</view>
<view class="qiang" :class="{'no_qiang': !can_buy}">{{item.limited_price}} </view>
<!-- <image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image> -->
</view>
</view>
</view>
</block>
<block v-else>
<image style="width: 100%;" mode="widthFix" src="/static/img/no_short.f2ffcd1c.png"></image>
<view style="text-align: center;color: #999;">此区域没有找到活动商品切换其他地方试试呢</view>
</block>
</view>
</view>
</view>
<shortPopupActive ref="shortPopupRef" @addCart="loadCart" :source="105" isBuy></shortPopupActive>
<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 { getArticleList } from "@/api/api.js"
import { Toast } from "../../../libs/uniApi";
import authorize from "@/components/Authorize.vue";
import { getUserInfo } from '@/api/user.js';
import shortPopupActive from "@/components/shortPopupActive.vue"
import { storeActivityProduct, storeActivityDistrict } from "@/api/activity.js"
import {
cloudWarehouse
} from '@/api/requesta.js'
import {
getCartCounts,
getCartList,
} from '@/api/requesta.js';
export default {
components: {
authorize,
shortPopupActive
},
data() {
return {
info: {},
userInfo: {},
Alist: [],
activity: {
title: ''
},
address: {
townName: '',
street_id: ''
},
show: false,
isAuto: false, //
isShowAuth: false, //
addressList: [],
goodsList: [],
goodsNum: 0,
can_buy: 0, // , 0, 1
}
},
onLoad(options) {
this.address = {
street_id: options.street_id,
townName: options.townName
}
},
onShow() {
this.getUserInfo();
this.loadList();
this.cartFn();
this.loadAddressList();
},
methods: {
changeAddress(e){
this.address = {
street_id: this.addressList[e.detail.value].street_code,
townName: this.addressList[e.detail.value].street_name
}
this.loadList();
},
back() {
uni.navigateBack()
},
getUserInfo() {
getUserInfo().then(res => {
this.userInfo = res.data;
}).catch(err => {
console.log(err);
})
},
loadList(){
let location = '';
if(this.$store.state.storage.location.lat) location = this.$store.state.storage.location.lat + ',' + this.$store.state.storage.location.long;
storeActivityProduct({
street_code: this.address.street_id,
activity_id: 2, //2
location: location,
source: 105
}).then(res => {
this.can_buy = res.data.can_buy;
this.goodsList = res.data.list;
}).catch(e=>{
Toast(e.msg||e.message||e)
})
},
loadAddressList(){
storeActivityDistrict().then(res=>{
this.addressList = res.data;
if(!this.addressList.find(item=>item.street_code==this.address.street_id)){
this.address.street_id = ''
}
})
},
//
getSkuName(item){
return Object.keys(item.sku).join('/')||null;
},
//
clickProduct(data){
if(!this.address.townName) return Toast('请先选择活动区域')
if(!this.can_buy){
return Toast('活动限购一件, 您已经买过了哦~')
}
this.$refs.shortPopupRef.setDatas(data, this.goodsNum);
this.$refs.shortPopupRef.open();
},
//
loadCart(){
this.cartFn();
},
//
cartFn() {
getCartCounts({
source: 105,
// product_type: 98
}).then(res => {
this.goodsNum = res.data[0].count
})
},
//
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: #fff5dd;
}
.bg {
position: relative;
padding-bottom: 30rpx;
.bg_img {
width: 750rpx;
height: 652rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 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;
.short_item {
// padding: 20rpx;
padding-bottom: 30rpx;
display: flex;
justify-content: space-between;
.image {
height: 200rpx;
width: 200rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.short_item_right {
width: 430rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.r_name {
width: 100%;
height: 80rpx;
font-size: 28rpx;
line-height: 40rpx;
text-overflow: ellipsis;
display: -webkit-box; /* 使用弹性盒子布局 */
-webkit-box-orient: vertical; /* 设置为垂直方向布局 */
overflow: hidden; /* 隐藏超出部分 */
-webkit-line-clamp: 2; /* 限制显示两行文本 */
.mer-labels{
background-color: #f84221;
color: #fff;
font-size: 18rpx;
padding: 4rpx 8rpx;
border-radius: 5rpx;
margin-right: 8rpx;
}
}
.r_type {
font-size: 22.78rpx;
color: #737373;
flex: 1;
overflow: hidden;
display: flex;
view {
height: 39rpx;
line-height: 39rpx;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 39rpx;
text-overflow: ellipsis;
}
}
.r_btn {
display: flex;
justify-content: space-between;
font-size: 22.78rpx;
color: #F84221;
align-items: center;
background-color: rgba(#F84221, 0.1);
padding-left: 15rpx;
border-radius: 0 60rpx 60rpx 0;
.qiang{
width: 160rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #F84221;
color: #fff;
border-radius: 60rpx;
font-weight: bold;
font-size: 28rpx;
}
.no_qiang{
background-color: #7f7f7f;
}
}
.r_street{
font-size: 24rpx;
height: 39rpx;
line-height: 39rpx;
color: #7f7f7f;
padding-right: 10rpx;
}
}
}
}
}
}
</style>

View File

@ -11,7 +11,7 @@
<view style="display: flex;align-items: center;">
<i class="iconfont icon-xiangzuo" style="font-size: 31.54rpx;text-align: left;" @click='backjJump'></i>
<view class=""
@click="navGoto(`/pages/nongKe/supply_chain/supplierB?type_id=10,17&street_id=${street_id}&townName=${street}&location=${latitude},${longitude}`)"
@click='backjJump'
style="font-size: 31.54rpx;font-weight: 700;margin-left: 10rpx;">
里海云仓
</view>
@ -102,10 +102,12 @@
<view class="r_name">
<text v-if="item.mer_labels_name" class="mer-labels">{{item.mer_labels_name}}</text>{{item.product.store_name}}
</view>
<view class="r_type">
<view v-if="item.product.store_info">{{item.product.store_info}}</view>
<view v-else-if="getSkuName(item)">{{getSkuName(item)}}</view>
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
<view style="display: flex;justify-content: flex-start;margin-top: 5rpx;">
<view class="r_street" v-if="item.merchant">{{item.merchant.street_name}}</view>
<view class="r_type" v-if="item.product.store_info||getSkuName(item)||item.unit_name">
<view v-if="getSkuName(item)">{{getSkuName(item)}}</view>
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
</view>
</view>
<view class="r_btn" v-if="item.product && item.product.price">
<view><text style="font-size: 33rpx;">{{ item.product.price.split('.')[0] }}.</text>{{item.product.price.split('.')[1]}}</view>
@ -174,6 +176,13 @@
</uni-popup>
<shortPopup ref="shortPopupRef" @addCart="loadCart" :source="103"></shortPopup>
<uni-popup ref="activityRef">
<view style="padding-bottom: 10vh;display: flex;flex-direction: column;align-items: center;" @click="closeAcvtivity">
<image style="width: 560rpx;" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/activity_card.webp"></image>
<image style="width: 60rpx" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png"></image>
</view>
</uni-popup>
</view>
</template>
@ -368,9 +377,9 @@
})
.exec();
}, 100)
// this.$nextTick(()=>{
// this.$refs.shortPopupRef.open();
// })
this.$nextTick(()=>{
this.$refs.activityRef.open();
})
},
computed: {
downMenus: function() {
@ -391,6 +400,9 @@
}, mapGetters(['viewColor', 'keyColor'])),
},
methods: {
closeAcvtivity(){
this.$refs.activityRef.close();
},
async getCloundShop() {
const {
data
@ -745,6 +757,7 @@
}
else if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // pid
else query.cate_id = this.storeParam.category_id; //
console.log('参数', {...query});
cloudWarehouse(query).then(res => {
// res.data.list = res.data.list.map(item=>{
// item.product = item;
@ -1172,18 +1185,16 @@
.r_type {
font-size: 22.78rpx;
color: #737373;
width: 300rpx;
flex: 1;
overflow: hidden;
display: flex;
view {
height: 39rpx;
line-height: 39rpx;
background: #FEF5F3;
display: inline-block;
padding: 0 16rpx;
border-radius: 39rpx;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
@ -1195,6 +1206,13 @@
color: #F84221;
align-items: center;
}
.r_street{
font-size: 24rpx;
height: 39rpx;
line-height: 39rpx;
color: #7f7f7f;
padding-right: 10rpx;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,220 @@
<template>
<view class="red_body">
<view class="bg">
<image mode="widthFix" src="/static/active/redpack_type_img.webp"></image>
<view class="border"></view>
</view>
<view class="bg_back">
<image @click="back" class="bc_image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="title">红包余额</view>
</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 style="width: 100%;height: 260rpx;"></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>
import { storeActivityTotal } from "@/api/activity.js"
export default {
data() {
return {
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityTotal();
},
methods: {
storeActivityTotal(){
storeActivityTotal().then(res=>{
this.list = res.data;
})
},
back(){
uni.navigateBack();
},
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">
.red_body{
position: relative;
background: linear-gradient(to top, rgb(255,231,185), rgb(255,249,231) 480rpx);
min-height: calc(100vh);
.bg{
width: 750rpx;
height: 480rpx;
overflow: hidden;
position: relative;
image{
width: 100%;
height: 100%;
}
.border{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 30rpx;
border-radius: 30rpx 30rpx 0 0;
background-color: rgb(255,249,231);
}
}
.bg_back{
position: absolute;
top: var(--status-bar-height);
left: 0;
width: 100%;
padding: 30rpx;
color: #fff;
display: flex;
text-align: center;
.bc_image{
height: 34rpx;
width: 20rpx;
}
.title{
position: absolute;
top: 30rpx;
left: 50%;
transform: translate(-50%);
}
}
}
.r_list {
padding: 0 20rpx 20rpx 20rpx;
.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{
position: fixed;
bottom: 100rpx;
padding: 20rpx;
image{
width: 710rpx;
}
}
</style>

View File

@ -0,0 +1,313 @@
<template>
<view class="">
<!-- <block v-for="(item, index) in info">
<block v-if="item.type==1">
<view class="type_name">无门槛实物通用红包<text class="n_count">(2)</text></view>
<view class="r_list" v-for="(e, i) in item.list">
<view class="r_item" @click="change(index, i)">
<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>240
</view>
</view>
<view class="r_content">
<view class="r_name">现金抵扣红包</view>
<view>仅限平台指定商家商品可使用</view>
<view>有效期至 2026.01.15 24:00:00</view>
</view>
<view class="r_icon">
<u-icon v-if="changeRed.type == index && changeRed.id == i" 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>
</view>
</view>
</block>
<block v-if="item.type==2">
<view class="type_name">不可使用红包<text class="n_count">(2)</text></view>
<view class="none_list" v-for="(e, i) in item.list">
<view class="r_body">
<view class="r_count">
<view class="rc_count">
<text class="rc_icon"></text>200
</view>
</view>
<view class="r_content">
<view class="r_name">现金抵扣红包</view>
<view>仅限平台指定商家商品可使用</view>
<view>有效期至 2026.01.15 24:00:00</view>
</view>
</view>
<u-line dashed color="#999999"></u-line>
<view class="n_tips">本单不可用原因未在平台指定店铺使用</view>
</view>
</block>
</block> -->
<view style="height: 30rpx;"></view>
<view class="r_list" v-for="(item, i) in list" :key="i">
<view class="r_item" @click="change(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.balance}}
</view>
</view>
<view class="r_content">
<view class="r_name">{{item.coupon_title}}</view>
<view>{{item.describe}}</view>
<view>有效期至 {{item.end_time}}</view>
</view>
<view class="r_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 v-else style="height: 50rpx;width: 50rpx;border-radius: 50%;border: 5rpx solid #FFF3CC;"></view>
</view>
</view>
</view>
</view>
<view class="footer">
<view>
<text>已选 {{ changeRed?1:0 }} </text>
<view v-if="changeRed&&changeRed.coupon_title.includes('抵扣红包')" style="font-size: 24rpx;margin-left: 10rpx;color: #ed4c3a;">(使用红包后此订单将不参与任何补贴活动)</view>
<view v-if="changeRed&&changeRed.coupon_title.includes('通用红包')" style="font-size: 24rpx;margin-left: 10rpx;color: #ed4c3a;">(使用红包后此订单将不参与用户消费补贴活动)</view>
<!-- , 可减 <text class="red_i">¥</text> <text class="red_c">0</text> -->
</view>
<view class="btn" @click="comfirm">确定</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: [
{
type: 1, // 使
name: '无门槛实物通用红包',
list: [1, 2]
},
{
type: 1, // 使
name: '现金抵扣红包',
list: [1,2,3]
},
{
type: 2, // 使, 2使
name: '不可使用红包',
list: [1]
}
],
list: [],
changeRed: null,
}
},
onLoad(option) {
const eventChannel = this.getOpenerEventChannel();
// acceptDataFromOpenerPageeventChannel
eventChannel.on('changeRedPacketInfo', (data) => {
console.log(data);
this.list = data;
})
},
onShow() {},
methods: {
change(e, i) {
console.log(e, i);
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?.coupon_user_id||'');
uni.navigateBack()
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #fff;
}
.type_name{
padding: 20rpx;
font-size: 28rpx;
.n_count{
color: #7A7A7A;
font-size: 24rpx;
margin-left: 10rpx;
}
}
.r_list {
padding: 0 20rpx 20rpx 20rpx;
.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;
.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: space-between;
.r_name {
font-size: 32rpx;
font-weight: 500;
margin-bottom: 10rpx;
}
view{
width: 100%;
overflow: hidden; /* 隐藏超出宽度的文本 */
white-space: nowrap; /* 不换行 */
text-overflow: ellipsis; /* 文本末尾显示省略号 */
}
}
.r_icon {
flex: 1;
display: flex;
align-items: center;
}
}
}
}
.none_list{
margin: 0 20rpx 20rpx 20rpx;
background-color: #E2E2E2;
border-radius: 20rpx;
.r_body {
height: 156rpx;
width: 710rpx;
display: flex;
.r_count {
flex: 2;
display: flex;
justify-content: center;
align-items: center;
color: #333;
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: 5;
color: #333;
font-size: 24rpx;
padding: 18rpx 10rpx 18rpx 40rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.r_name {
font-size: 32rpx;
font-weight: 500;
margin-bottom: 10rpx;
}
view{
width: 100%;
overflow: hidden; /* 隐藏超出宽度的文本 */
white-space: nowrap; /* 不换行 */
text-overflow: ellipsis; /* 文本末尾显示省略号 */
}
}
}
.n_tips{
padding: 10rpx 30rpx 20rpx 30rpx;
color: #333;
font-size: 24rpx;
}
}
.footer{
height: 130rpx;
padding: 30rpx;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
background-color: #F6F6F6;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
.red_i{
color: #FF421D;
margin-left: 20rpx;
}
.red_c{
color: #FF421D;
font-size: 44rpx;
}
.btn{
width: 128rpx;
height: 68rpx;
background-color: #EC693F;
border-radius: 34rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
}
</style>

View File

@ -215,7 +215,7 @@
</view> -->
<view class="item no-border">
<view class='acea-row row-middle'>
<text class="item-title">请上传营业执照及行业相关资质证明图片</text>
<text class="item-title">请上传行业相关其他资质证明图片</text>
<text class="item-desc">(图片最多可上传10张,图片格式支持JPGPNGJPEG)</text>
<view class="upload">
<view class='pictrue' v-for="(item,index) in pics" :key="index" :data-index="index"

View File

@ -7,7 +7,7 @@
class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i></view>
<view class=""
style="position: absolute;left: 30rpx;bottom: 15rpx;width: 120rpx; left:50%;margin-left:-60rpx;">
商家入驻
个人入驻
</view>
</view>
<view :style="'height:'+statusBarHeight+'px'"></view>
@ -17,7 +17,7 @@
<form report-submit='true'>
<view class='merchantsSettled'>
<view class="merchantBgCount">
<image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'"
<image mode="widthFix" class="merchantBg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d8208202401171727545921.png"
alt="">
</view>
<view class="application-record" @click="jumpToList" v-if="!mer_i_id">

View File

@ -160,6 +160,12 @@
<view class="locationb"> 用于向你推荐最近门店 </view>
<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>
<view class="custom_style">
@ -209,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)'
@ -331,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();
})
@ -354,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

View File

@ -17,7 +17,7 @@
<!-- 自定义顶部背景颜色 -->
<view class="new-users skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
<view class="head">
<view class="user-card" :class="userInfo.svip_open && svip_switch_status == 1 ? 'svip-card' : ''">
<view class="user-card" style="padding-bottom: 0;" :class="userInfo.svip_open && svip_switch_status == 1 ? 'svip-card' : ''">
<view class="bg"></view>
<view class="user-info">
<view class="avatar-box" :class="{on:userInfo.is_svip > 0 && svip_switch_status == 1}">
@ -61,7 +61,7 @@
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view>
</view>
</view>
<view class="num-wrapper skeleton-rect">
<!-- <view class="num-wrapper skeleton-rect">
<view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
<text class="num">{{userInfo.total_collect_product || 0}}</text>
<view class="txt">我的收藏</view>
@ -79,7 +79,27 @@
<text class="num">{{userInfo.total_coupon || 0}}</text>
<view class="txt">优惠券</view>
</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.total_coupon || 0}}</text>
<view class="txt">购物券</view>
</view>
</view> -->
<view class="packet_card">
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
<view class="p_d_count">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
<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_count">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d2868202401201750014779.png"></image>
<view>{{userInfo.red_pack_balance||"0.00"}}</view>
</view>
<view>红包余额 ()</view>
</view>
</view>
<navigator hover-class="none"
:url="userInfo.is_svip > 0 ? '/pages/annex/vip_center/index' : '/pages/annex/vip_paid/index'"
class="cardVipA acea-row row-between-wrapper"
@ -1315,4 +1335,44 @@
font-size: 24rpx;
}
}
.packet_card{
height: 140rpx;
width: 710rpx;
background-color: rgba(#fff, 0.3);
margin: 0 auto;
border-radius: 20rpx 20rpx 0 0;
margin-top: 20rpx;
position: relative;
color: #fff;
display: flex;
justify-content: space-between;
.p_d_item{
position: absolute;
font-size: 26rpx;
font-weight: bold;
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;
font-size: 38rpx;
image{
width: 53rpx;
height: 53rpx;
}
}
}
}
</style>

View File

@ -32,7 +32,8 @@
</div>
</form>
<div class="tip">
<span @click="formItem = 2" class="font-color-red">立即注册</span>
<!-- <span @click="formItem = 2" class="font-color-red">立即注册</span> -->
<span> </span>
<navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
忘记密码
</navigator>
@ -655,7 +656,13 @@
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user){
return uni.navigateTo({
url: '/pages/helpPeople/helpPeople'
})
}
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
@ -818,6 +825,12 @@
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user){
return uni.navigateTo({
url: '/pages/helpPeople/helpPeople'
})
}
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
@ -828,6 +841,7 @@
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'

View File

@ -363,7 +363,7 @@
</checkbox-group>
</view>
</view>
<view class='item acea-row row-between-wrapper'
<!-- <view class='item acea-row row-between-wrapper'
v-if="!seckillId && order_type != 3 && order_type != 4 && enabledPlatformCoupon">
<view>平台优惠券<text @tap="showCoupon" class="iconfont icon-wenhao1"></text></view>
<block v-if="platformCoupon.length > 0">
@ -376,7 +376,20 @@
<block v-else>
<view class='discount'>暂无优惠券</view>
</block>
</view>
</view> -->
<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="consumption_id">-{{consumption_money||'0.00'}}</text>
<text v-else>有补贴红包未选</text>
<text class='iconfont icon-jiantou'></text>
</view>
</block>
<block v-else>
<view class='discount'>暂无可用红包</view>
</block>
</view>
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
<view>运费</view>
<view class='money'>+{{priceGroup.storePostage}}</view>
@ -503,6 +516,7 @@
//
msgObj: {},
textareaStatus: true,
platformConsumption: [],
deliveryName: '快递配送',
//
cartArr: [{
@ -662,11 +676,16 @@
interest_rate: '', //
settle_cycle: '', //
type_id: '', //
consumption_id: '', //id
consumption_money: '', //
};
},
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) {
@ -1030,6 +1049,7 @@
cart_id: that.cartId.split(","),
address_id: address_id,
takes: that.take,
consumption_id: this.consumption_id,
use_coupon: that.subCoupon,
use_integral: that.use_integral,
product_type: that.product_type,
@ -1037,7 +1057,8 @@
}).then(res => {
//
that.product_type=res.data.order_type
that.is_take = false
that.is_take = false;
that.platformConsumption = res.data.platformConsumption;
res.data.order.forEach(el => {
if (el.order.isTake == 1) that.is_take = true
el.isTake = 0
@ -1057,6 +1078,7 @@
}
})
}else res.data.platformCoupon = [];
that.consumption_money = res.data.consumption_money;
that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
.order[that.couponIndex].coupon);
that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds
@ -1183,6 +1205,17 @@
this.$set(this, "coupon_number", this.subCoupon['0'].length);
this.$set(this, "coupon_amount", this.plant_coupon_amount);
},
couponTap3: function(item, index) {
uni.navigateTo({
url: '/pages/redpacket/redpacket',
success:(res)=> {
res.eventChannel.emit('changeRedPacketInfo', this.platformConsumption)
uni.$once('changeRedPacket', (data)=>{
this.consumption_id = data;
})
}
})
},
car: function() {
let that = this;
that.animated = false;
@ -1627,6 +1660,7 @@
.Tips({
title: '余额不足!'
});
data.consumption_id = this.consumption_id;
//
// if (this.payType == 'creditBuy') {
@ -1675,7 +1709,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
@ -2583,4 +2618,12 @@
height: 756rpx;
overflow-y: scroll;
}
.red_packet{
color: #ff5c2d !important;
background-color: rgba(#ff5c2d, 0.3);
border-radius: 60rpx;
padding: 5rpx 10rpx;
padding-left: 20rpx;
font-size: 25rpx;
}
</style>

View File

@ -253,7 +253,7 @@
<view v-if="!item.receipt && item.status != -1 && (item.status != 0)" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id, item )'>查看详情</view>
<view class='bnt b-color' @click='goOrderDetails(item.order_id, item)'>查看详情</view>
</block>
<block v-if="item.status == 1">
<view class='bnt cancelBnt'

View File

@ -4,7 +4,7 @@
<view class='nav acea-row'>
<view class='item' :class='type==0 ? "on":""' @click='changeType(0)'>全部</view>
<view class='item' :class='type==1 ? "on":""' @click='changeType(1)'>消费</view>
<view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>充值</view>
<!-- <view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>充值</view> -->
</view>
<view class='sign-record'>
<view class='list' v-for="(item,index) in userBillList" :key="index">

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

@ -0,0 +1,816 @@
<template>
<view class="m_body">
<view class="head_card">
<view class="card_img">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/22c6320240125134855740.png"></image>
<view class="c_content">
<view class="c_title">当前余额</view>
<view class="c_count"> <text class="c_icon">¥</text> {{userInfo.now_money||'0.00'}}</view>
</view>
</view>
<view class="c_tab">
<u-tabs :list="list1" :current="curNow" @click="clickTab1" lineWidth="60rpx" lineColor="#FF8056"
:itemStyle="{width: '200rpx', height: '80rpx'}"></u-tabs>
</view>
</view>
<view class="body_card">
<view class="card1" v-if="curNow==0">
<view class="change_list">
<view class="change_item" :class="{'change_item_active': nowChange==index}" @click="changeItem(item, index)"
v-for="(item, index) in changeList" :key="index">
<text class="c_icon">¥</text> {{item}}
</view>
</view>
<view class="c_tab">
<u-tabs :list="[{name: '充值数量'}]" lineWidth="60rpx" lineColor="#FF8056"
:itemStyle="{width: '200rpx', height: '80rpx'}"></u-tabs>
</view>
<view class="change_count">
<view>当前选择面额 ¥{{nowPrice}}</view>
<view class="c_btn">
<view @click="reduce">-</view>
<view>{{priceCount}}</view>
<view @click="append">+</view>
</view>
</view>
<view class="c_tips">
<view class="tips_title">注意事项:</view>
<view>充值后金额不能提现仅可用于商城商品消费</view>
</view>
</view>
<view class="card2" v-if="curNow==1">
<view class="record" v-for="(item, index) in recordList" :key="index">
<view class="left">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e807a202401251520462666.png"></image>
<view>
<view>{{item.title}}</view>
<view class="tips">{{item.create_time}}</view>
</view>
</view>
<view class="right">{{item.number}}</view>
</view>
<view class="no_data" v-if="recordList.length==0">暂无充值记录</view>
</view>
</view>
<view class="footer" v-if="curNow==0">
<view class="f_tip">
总计充值金额:
<view class="price">
<text>{{total}}</text>
</view>
</view>
<view class="primary_btn" @click="$u.throttle(submitSub, 1500)">确认充值</view>
</view>
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
:totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
<script>
import { getCommissionInfo } from "@/api/user.js"
import { Toast } from "../../../libs/uniApi";
import {
mapGetters
} from "vuex";
import {
getUserInfo,
spreadInfo,
rechargeWechat
} from '@/api/user.js';
import authorize from '@/components/Authorize';
import payment from '@/components/payment';
export default {
components:{
authorize,
payment
},
data() {
return {
userInfo: {},
curNow: 0,
list1: [{
name: '余额充值'
}, {
name: '充值记录'
}],
changeList: [0.01, 15, 20, 50, 100],
nowChange: 0,
nowPrice: 0,
priceCount: 1,
isAuto: false, //
isShowAuth: false, //
recordList: [],
where: {
page: 1,
limit: 15,
type: 2
},
otherValue: '其他',
now_money: 0,
navRecharge: ['账户充值', '佣金转入'],
active: 0,
number: '',
from: '',
placeholder: "0.00",
picList: [],
activePic: 0,
money: "",
numberPic: '',
rechar_id: '0',
rechargeAttention: [],
pay_close: false,
totalPrice: '0',
payMode: [{
name: '微信支付',
icon: 'icon-weixinzhifu',
// #ifdef H5
value: 'h5',
// #endif
// #ifdef MP
value: 'routine',
// #endif
// #ifdef APP-PLUS
value: 'weixin',
// #endif
title: '微信快捷支付',
payStatus: true
}
],
}
},
onLoad() {
this.nowPrice = this.changeList[0];
if (this.isLogin) {
this.getUserInfo()
} else {
this.isAuto = true;
this.isShowAuth = true
}
},
onShow() {},
computed: {
...mapGetters(['isLogin', 'viewColor', 'keyColor']),
total() {
return this.nowPrice * this.priceCount;
}
},
onReachBottom() {
this.getCommissionInfo();
},
methods: {
clickTab1(e) {
this.curNow = e.index;
if (e.index == 1) {
this.recordList = [];
this.where.page = 1;
this.getCommissionInfo();
}
},
changeItem(e, index) {
this.nowPrice = e;
this.nowChange = index;
if (this.priceCount * this.nowPrice > 20000) {
this.priceCount = Math.floor(20000 / this.nowPrice);
return Toast('不可充值超过2万元');
}
},
append() {
if (this.priceCount * this.nowPrice > 20000) {
this.priceCount = Math.floor(20000 / this.nowPrice);
return Toast('不可充值超过2万元');
} else this.priceCount++;
},
reduce() {
if (this.priceCount <= 1) return Toast('最少充值一份');
else this.priceCount--;
},
getCommissionInfo() {
getCommissionInfo(this.where).then((res) => {
if(res.data.list.length>0) {
this.recordList = [...this.recordList, ...res.data.list];
if(res.data.list.length>=15) this.where.page++;
}
})
},
/**
* 选择金额
*/
picCharge(idx, item) {
this.activePic = idx;
if (item === undefined) {
this.rechar_id = '0';
this.numberPic = "";
this.otherValue = ''
} else {
this.otherValue = '其他'
this.total = "";
this.rechar_id = item.id.toString();
this.numberPic = item.data.price;
}
},
/**
* 充值额度选择
*/
getRecharge() {
getRechargeApi()
.then(res => {
this.picList = res.data.recharge_quota;
if (this.picList[0]) {
this.rechar_id = this.picList[0].id.toString();
this.numberPic = this.picList[0].data.price;
}
this.rechargeAttention = res.data.recharge_attention || [];
})
.catch(res => {
this.$dialog.toast({
mes: res
});
});
},
onLoadFun: function() {
this.isShowAuth = false;
this.getUserInfo();
this.getRecharge();
},
//
authColse: function(e) {
this.isShowAuth = e
},
navRecharges: function(index) {
this.active = index;
},
/**
* 获取用户信息
*/
getUserInfo: function() {
let that = this;
spreadInfo().then(res => {
that.$set(that, 'userInfo', res.data);
})
},
payClose: function() {
this.pay_close = false;
},
payCheck: function(type) {
this.createOrder(type);
},
/*
* 用户充值
*/
submitSub: function(e) {
let that = this
let value = this.total;
//
if (that.active) {
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
return that.$util.Tips({
title: '请输入金额'
});
}
uni.showModal({
title: '转入余额',
content: '转入余额后无法再次转出,确认是否转入余额',
success(res) {
if (res.confirm) {
rechargeBrokerage({
brokerage: parseFloat(value),
}).then(res => {
// that.$set(that, 'userInfo.now_money', that.$util.$h.Add(value, that.userInfo.now_money))
uni.showToast({
icon:'success',
title:'转入成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: '/pages/users/user_money/index'
// });
}).catch(err => {
return that.$util.Tips({
title: err
})
});
} else if (res.cancel) {
return that.$util.Tips({
title: '已取消'
});
}
},
})
} else {
if (this.rechar_id == 0) {
if (parseFloat(that.total)=== 0) {
return that.$util.Tips({
title: '充值金额金额不能为0'
});
}
if (!that.total) {
return that.$util.Tips({
title: '请填写充值金额!'
});
}
if (!Number(that.total)) {
return that.$util.Tips({
title: '请填写正确的金额!'
});
}
}
this.pay_close = true
}
},
createOrder(type) {
let that = this;
let query = {
price: that.rechar_id == 0 ? that.total : that.numberPic,
recharge_id: that.rechar_id,
type: type,
// #ifdef H5
return_url: location.port ? location.protocol + '//' + location.hostname + ':' + location.port +
'/pages/users/user_money/money' : location.protocol + '//' + location.hostname +
'/pages/users/user_money/money'
// #endif
};
// #ifdef MP
// openPaySubscribe().then(() => {
rechargeWechat(query).then(res => {
that.callPay(res);
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
});
});
// });
// #endif
// #ifndef MP
rechargeWechat(query).then(res => {
console.log('res', res);
that.callPay(res);
}).catch(err => {
console.log('err', err);
uni.showToast({
title: err,
icon: 'none'
});
});
// #endif
},
//
callPay(res) {
let that = this, status = res.data.type,
orderId = res.data.recharge_id,
callback_key = res.data.pay_key,
jsConfig = res.data.config,
goPages = '/pages/users/user_money/money';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
case 'error':
uni.hideLoading();
Toast(res.message)
// return that.$util.Tips({
// title: res.message
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'success':
uni.hideLoading();
uni.showToast({
icon:'success',
title:res.message
})
// if (that.seckillId)
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'alipay':
case "alipayQr":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig+'&type=10'
})
return;
break;
// #ifndef MP
case "wechat":
case "weixin":
case "weixinApp":
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
uni.showToast({
icon:'success',
title:res.message
})
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
}).catch(res => {
uni.showToast({
icon:'success',
title: '取消支付'
})
// if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
})
// #endif
// #ifdef APP-PLUS
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon: 'success',
title: '支付成功'
})
// let url = '/pages/users/user_money/money';
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 4,
// url: url
// });
},
fail: (e) => {
console.log(e);
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
}
})
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
// #endif
// #ifdef MP
case "routine":
jsConfig.timeStamp = jsConfig.timestamp;
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
uni[mp_pay_name]({
...jsConfig,
success: function(res) {
uni.hideLoading();
that.getUserInfo();
that.getRecharge();
// console.log('12323424')
uni.showToast({
icon:'success',
title:'支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: function(e) {
uni.hideLoading();
Toast('取消支付')
// return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
},
})
break;
// #endif
case "balance":
uni.hideLoading();
//
Toast(res.msg)
// return that.$util.Tips({
// title: res.msg
// }, {
// tab: 5,
// url: goPages
// });
break;
// #ifdef H5
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url = `${host}/pages/users/user_money/money`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
setTimeout(() => {
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS
case 'alipayApp':
uni.requestPayment({
provider: 'alipay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon:'success',
title:'支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: (e) => {
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
uni.redirectTo({
url: goPages
})
}
})
},
complete: () => {
uni.hideLoading();
},
});
break;
// #endif
}
},
onChangeFun: function(e) {
let opt = e;
let action = opt.action || null;
let value = opt.value != undefined ? opt.value : null;
action && this[action] && this[action](value);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.m_body {
.head_card {
position: relative;
height: 430rpx;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: #fff;
.card_img {
width: 724rpx;
height: 362rpx;
position: relative;
.image {
width: 100%;
height: 100%;
}
.c_content {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 110rpx 60rpx;
color: #fff;
display: flex;
flex-direction: column;
justify-content: space-around;
.c_title {
font-size: 32rpx;
}
.c_count {
font-size: 50rpx;
font-weight: bold;
.c_icon {
font-size: 32rpx;
}
}
}
}
.c_tab {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 130rpx;
padding: 20rpx 0;
background-color: #fff;
border-radius: 60rpx 60rpx 0 0;
}
}
.body_card {
color: #333;
.card1 {
background-color: #fff;
.change_list {
width: 720rpx;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
.change_item {
width: 220rpx;
margin: 10rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background-color: #f7f7f7;
border-radius: 20rpx 20rpx 20rpx 20rpx;
font-size: 40rpx;
.c_icon {
font-size: 28rpx;
}
}
.change_item_active {
background: rgba(#FF8056, 0.2);
border: 5rpx solid #FF8056;
color: #FF8056;
}
}
.change_count {
width: 700rpx;
margin: 0 auto;
border-radius: 20rpx;
border: 5rpx solid #FF8056;
color: #FF8056;
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 30rpx;
margin-top: 30rpx;
margin-bottom: 50rpx;
.c_btn {
display: flex;
view {
height: 80rpx;
width: 60rpx;
text-align: center;
line-height: 80rpx;
}
}
}
.c_tips {
width: 700rpx;
margin: 0 auto;
font-size: 26rpx;
color: #616161;
padding-bottom: 30rpx;
.tips_title {
font-size: 30rpx;
}
}
}
.card2 {
background-color: #fff;
.record {
display: flex;
justify-content: space-between;
align-items: center;
padding: 26rpx 20rpx;
border-bottom: 1rpx solid #f7f7f7;
.left {
display: flex;
image {
height: 76rpx;
width: 76rpx;
margin-right: 20rpx;
}
.tips {
font-size: 26rpx;
color: #616161;
}
}
.right {
font-size: 36rpx;
}
}
.no_data{
padding: 60rpx 0;
text-align: center;
border-top: 1rpx solid #f7f7f7;
color: #999;
font-size: 26rpx;
}
}
}
.footer {
position: fixed;
left: 0;
bottom: 0;
height: 120rpx;
width: 100vw;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
.f_tip {
display: flex;
align-items: flex-end;
font-style: 26rpx;
.price {
color: #FF8056;
text {
font-size: 44rpx;
margin-left: 20rpx;
margin-right: 5rpx;
}
}
}
.primary_btn {
background-color: #fa8147;
height: 80rpx;
border-radius: 80rpx;
width: 180rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
static/images/f8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 922 B

View File

@ -160,7 +160,6 @@ const actions = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
brand:res.data.appInfo.phone_brand,
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新

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('请求失败');
}
})