更新
This commit is contained in:
parent
3d983049e8
commit
0c97fe7020
@ -55,7 +55,6 @@ module.exports = {
|
|||||||
HTTP_REQUEST_URL_THREE: httpApiThree,
|
HTTP_REQUEST_URL_THREE: httpApiThree,
|
||||||
HTTP_REQUEST_URL_FOUR: httpApiFour,
|
HTTP_REQUEST_URL_FOUR: httpApiFour,
|
||||||
HTTP_REQUEST_URL_FIVE: httpApiFive,
|
HTTP_REQUEST_URL_FIVE: httpApiFive,
|
||||||
OSS_URL: ossUrl,
|
|
||||||
VUE_APP_WS_URL: `${wsApi}?type=user`,
|
VUE_APP_WS_URL: `${wsApi}?type=user`,
|
||||||
VUE_APP_WS_URL_ONE:wsApi_one,
|
VUE_APP_WS_URL_ONE:wsApi_one,
|
||||||
// #endif
|
// #endif
|
||||||
@ -72,6 +71,7 @@ module.exports = {
|
|||||||
// #endif
|
// #endif
|
||||||
openPlantGrass: openPlantGrass,
|
openPlantGrass: openPlantGrass,
|
||||||
ENV: env,
|
ENV: env,
|
||||||
|
OSS_URL: ossUrl,
|
||||||
|
|
||||||
HEADER: {
|
HEADER: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
|
12
pages.json
12
pages.json
@ -240,7 +240,9 @@
|
|||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "红包余额",
|
"navigationBarTitleText" : "红包余额",
|
||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh": true,
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"onReachBottomDistance": 300
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -280,6 +282,14 @@
|
|||||||
"navigationBarTitleText" : "购物车",
|
"navigationBarTitleText" : "购物车",
|
||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh" : false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/newActivity/giftBag/giftBag",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "新人礼包",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
|
819
pages/newActivity/giftBag/giftBag.vue
Normal file
819
pages/newActivity/giftBag/giftBag.vue
Normal file
@ -0,0 +1,819 @@
|
|||||||
|
<template>
|
||||||
|
<view class="m_body">
|
||||||
|
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
|
||||||
|
<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> <text class="c_icon">¥</text> {{item.count}}</view>
|
||||||
|
</view>
|
||||||
|
</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>
|
||||||
|
</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>
|
||||||
|
<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'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
count: 200,
|
||||||
|
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item2.webp'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
count: 500,
|
||||||
|
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item3.webp'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
count: 1000,
|
||||||
|
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item4.webp'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
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">
|
||||||
|
page {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.bg {
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 300rpx;
|
||||||
|
|
||||||
|
.bg_box{
|
||||||
|
height: 520rpx;
|
||||||
|
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: 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{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="red_body">
|
||||||
<view style="height: 30rpx;"></view>
|
<image class="bg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_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 style="height: 160rpx;padding-top: var(--status-bar-height);"></view>
|
||||||
<view class="r_list" v-for="(item, index) in list" :key="index">
|
<view class="r_list" v-for="(item, index) in list" :key="index">
|
||||||
<view class="r_item" @click="navgo(item)">
|
<view class="r_item" @click="navgo(item)">
|
||||||
<image class="r_bg" src="/static/active/red_packet.webp"></image>
|
<image class="r_bg" src="/static/active/red_packet.webp"></image>
|
||||||
@ -70,6 +72,27 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
page{
|
||||||
|
background-color: #fff3da;
|
||||||
|
}
|
||||||
|
.red_body{
|
||||||
|
position: relative;
|
||||||
|
.bg{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
.bg_back{
|
||||||
|
height: 34rpx;
|
||||||
|
width: 20rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: var(--status-bar-height);
|
||||||
|
left: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.r_list {
|
.r_list {
|
||||||
padding: 0 20rpx 20rpx 20rpx;
|
padding: 0 20rpx 20rpx 20rpx;
|
||||||
|
|
||||||
@ -155,8 +178,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.activity{
|
.activity{
|
||||||
|
padding: 20rpx;
|
||||||
image{
|
image{
|
||||||
width: 750rpx;
|
width: 710rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -85,7 +85,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="packet_card">
|
<view class="packet_card">
|
||||||
<view class="p_d_item" @click="authTo('/pages/users/user_money/money')">
|
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
|
||||||
<view class="p_d_count">
|
<view class="p_d_count">
|
||||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
|
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
|
||||||
<view>¥{{userInfo.now_money||"0.00"}}</view>
|
<view>¥{{userInfo.now_money||"0.00"}}</view>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<view class='nav acea-row'>
|
<view class='nav acea-row'>
|
||||||
<view class='item' :class='type==0 ? "on":""' @click='changeType(0)'>全部</view>
|
<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==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>
|
||||||
<view class='sign-record'>
|
<view class='sign-record'>
|
||||||
<view class='list' v-for="(item,index) in userBillList" :key="index">
|
<view class='list' v-for="(item,index) in userBillList" :key="index">
|
||||||
|
@ -10,18 +10,18 @@
|
|||||||
<view class='money'>{{userInfo.now_money || 0}}</view>
|
<view class='money'>{{userInfo.now_money || 0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef APP-PLUS || H5 -->
|
<!-- #ifdef APP-PLUS || H5 -->
|
||||||
<navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
|
<!-- <navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
|
<!-- <view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
<view class='cumulative acea-row row-top'>
|
<view class='cumulative acea-row row-top'>
|
||||||
<!-- v-if="balance_func_status == 1" -->
|
<!-- v-if="balance_func_status == 1" -->
|
||||||
<view class='item' >
|
<!-- <view class='item' >
|
||||||
<view>累计充值(元)</view>
|
<view>累计充值(元)</view>
|
||||||
<view class='money'>{{userInfo.total_recharge || 0}}</view>
|
<view class='money'>{{userInfo.total_recharge || 0}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
<view class='item'>
|
<view class='item'>
|
||||||
@ -44,12 +44,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>消费记录</view>
|
<view>消费记录</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2'>
|
<!-- <navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2'>
|
||||||
<view class='pictrue'>
|
<view class='pictrue'>
|
||||||
<image :src="domain+'/static/diy/record3'+keyColor+'.png'"></image>
|
<image :src="domain+'/static/diy/record3'+keyColor+'.png'"></image>
|
||||||
</view>
|
</view>
|
||||||
<view>充值记录</view>
|
<view>充值记录</view>
|
||||||
</navigator>
|
</navigator> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
|
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user