liudan 1 year ago
parent 01a1e0d033
commit 0c7821eccc
  1. 20
      api/user.js
  2. 8
      components/orderCoupon/index.vue
  3. 42
      components/rightSlider.vue
  4. 62
      components/rightSlidera.vue
  5. 6
      pages.json
  6. 19
      pages/activity/collect_coupons/index.vue
  7. 287
      pages/huitong/huitongbao/index.vue
  8. 7
      pages/index/component/pictureCube.vue
  9. 24
      pages/user/index.vue
  10. 2
      pages/users/order_confirm/index.vue
  11. 196
      pages/users/user_integral/index.vue
  12. 511
      pages/users/user_integral1/fenhong.vue
  13. 61
      pages/users/user_integral1/index.vue
  14. 65
      pages/users/user_integral1/user_contribute.vue

@ -687,4 +687,24 @@ export function hasServiceApi(id) {
*/
export function getBankInfo() {
return request.get(`user/extract/history_bank`)
}
//获取用户资产明细
export function getassetsLog(data) {
return request.get(`user/assetsLog`,data)
}
//配置
export function getConfig() {
return request.get(`exchange/config`)
}
//转让惠通宝
export function changeHuitong(data) {
return request.post(`user/send/huitong`,data)
}
//惠通宝兑换消费积分
export function huitongToConsume(data) {
return request.post(`user/excange/consume`,data)
}
//消费积分兑分红点
export function jifenToShare(data) {
return request.post(`user/excange/share`,data)
}

@ -12,9 +12,11 @@
<view><text class='num'>{{item.coupon_price}}</text></view>
<view class="pic-num">{{item.use_min_price}}元可用</view>
</view>
<view v-else class='money acea-row row-column row-center-wrapper' :style="{ 'background-image': `url(${domain}/static/diy/couponBg${keyColor}.png)` }">
<view><text class='num'>{{item.coupon_price}}</text></view>
<view class="pic-num">{{item.use_min_price}}元可用</view>
<!-- :style="{ 'background-image': `url(${domain}/static/diy/couponBg${keyColor}.png)` }" -->
<view v-else class='money acea-row row-column row-center-wrapper' style="position: relative;">
<image src="/static/images/bg.png" mode="" style="z-index:1;position: absolute;top:0;left:0;width:100%;height:108%;"></image>
<view style="position: relative;z-index:2"><text class='num'>{{item.coupon_price}}</text></view>
<view class="pic-num" style="position: relative;z-index:2">{{item.use_min_price}}元可用</view>
</view>
<view class='text'>
<view class='condition line1'>

@ -182,7 +182,7 @@
height: 100%;
background-color: #F5F5F5;
.header{
padding: 50rpx 26rpx 40rpx;
padding: 120rpx 26rpx 40rpx;
background-color: #fff;
.title{
font-size: 26rpx;
@ -196,10 +196,10 @@
margin-top: 28rpx;
input{
width:260rpx;
height:56rpx;
height:70rpx;
padding: 0 10rpx;
background:rgba(242,242,242,1);
border-radius:28rpx;
border-radius:35px;
font-size: 22rpx;
text-align: center;
}
@ -236,21 +236,21 @@
.item{
display: block;
width:186rpx;
height:56rpx;
line-height: 56rpx;
height:70rpx;
line-height: 70rpx;
text-align: center;
background:rgba(242,242,242,1);
border-radius:28rpx;
margin-top: 25rpx;
background:#F2F2F2;
border-radius:35px;
margin-top: 35px;
padding: 0 10rpx;
margin-right: 12rpx;
&:nth-child(3n){
margin-right: 0;
}
&.on{
background: var(--view-minorColor);
border:1px solid var(--view-theme);
color: var(--view-theme);
background: #116636;
// border:1px solid var(--view-theme);
color:#fff;
}
}
.btns{
@ -277,15 +277,15 @@
align-items: center;
justify-content: center;
width:286rpx;
height:68rpx;
height:81rpx;
background:rgba(255,255,255,1);
border:1px solid rgba(170,170,170,1);
border-radius:34rpx;
border-radius:34px;
font-size: 26rpx;
color: #282828;
&.confirm{
background: var(--view-theme);
border-color: var(--view-theme);
background: $btn-color;
// border-color: var(--view-theme);
color: #fff;
}
}
@ -314,11 +314,11 @@
.item{
display: block;
width:186rpx;
height:56rpx;
line-height: 56rpx;
height:70rpx;
line-height: 70rpx;
text-align: center;
background:rgba(242,242,242,1);
border-radius:28rpx;
border-radius:35px;
margin-top: 25rpx;
padding: 0 10rpx;
margin-right: 12rpx;
@ -326,9 +326,9 @@
margin-right: 0;
}
&.on{
background: var(--view-minorColor);
border:1px solid var(--view-theme);
color: var(--view-theme);
background: #116636;
// border:1px solid var(--view-theme);
color:#fff;
}
}

@ -9,6 +9,16 @@
<input placeholder="最高价" v-model="max" type="number"/>
</view>
</view>
<view class="store_type">
<view class="title">店铺类型</view>
<view class="brand-wrapper">
<view class="wrapper">
<view class="item line1" v-for="(item,index) in storeTypeList" :key="index" :class="item.check?'on':''" @tap="bindChenckType(item,index)">
{{item.name}}
</view>
</view>
</view>
</view>
<view class="content-box">
<view class="title">品牌</view>
<view class="brand-wrapper">
@ -59,6 +69,10 @@
price_off:{
type:String,
default:''
},
activeIndex:{
type:Number,
default:0
}
},
computed: mapGetters(['viewColor']),
@ -72,9 +86,11 @@
storeTypeList: [
{name: '全部', value: '',check: true},
{name: '自营', value: 'trader',check: false},
{name: '非自营', value: 'trader',check: false},
],
activeList:[],
showBox:false
showBox:false,
index: this.activeIndex
}
},
mounted() {
@ -83,20 +99,28 @@
this.showBox = this.status
this.min = this.price_on
this.max = this.price_off
this.storeTypeList = [
{name: '全部', value: '',check: false},
{name: '自营', value: 'trader',check: false},
{name: '非自营', value: 'trader',check: false}
]
this.storeTypeList[this.index]['check'] = true
this.is_trader = this.storeTypeList[0]['check'] ? '' : this.storeTypeList[1]['check'] ? 1 : 0
},
methods:{
bindChenck(item){
item.check = !item.check
this.arrFilter()
},
bindChenckType(item,index){
bindChenckType(item,index){
this.storeTypeList = [
{name: '全部', value: '',check: false},
{name: '自营', value: 'trader',check: false},
{name: '非自营', value: 'trader',check: false},
]
this.storeTypeList[index]['check'] = true
this.is_trader = this.storeTypeList[0]['check'] ? '' : 1
this.is_trader = this.storeTypeList[0]['check'] ? '' : this.storeTypeList[1]['check'] ? 1 : 0
this.index = index
},
arrFilter(){
this.activeList = this.list.filter(item=>{
@ -109,14 +133,14 @@
})
this.storeTypeList = [
{name: '全部', value: '',check: true},
{name: '自营', value: 'trader',check: false}
{name: '自营', value: 'trader',check: false},
{name: '非自营', value: 'trader',check: false}
]
this.min = this.max = ''
this.arrFilter()
},
confirm(){
this.arrFilter()
console.log(this.activeList)
let obj = {
brandList:this.activeList,
price_on:this.min,
@ -125,13 +149,9 @@
is_trader: this.is_trader
}
this.showBox = false
this.$emit('confirm',obj)
this.$emit('confirm',obj,this.index)
},
close(){
// this.list.forEach((el,index)=>{
// el.check = false
// })
// this.arrFilter()
this.showBox = false
this.$emit('close')
},
@ -162,7 +182,7 @@
height: 100%;
background-color: #F5F5F5;
.header{
padding: 50rpx 26rpx 40rpx;
padding: 120rpx 26rpx 40rpx;
background-color: #fff;
.title{
font-size: 26rpx;
@ -176,10 +196,10 @@
margin-top: 28rpx;
input{
width:260rpx;
height:56rpx;
height:70rpx;
padding: 0 10rpx;
background:rgba(242,242,242,1);
border-radius:28rpx;
border-radius:35px;
font-size: 22rpx;
text-align: center;
}
@ -216,21 +236,21 @@
.item{
display: block;
width:186rpx;
height:56rpx;
line-height: 56rpx;
height:70rpx;
line-height: 70rpx;
text-align: center;
background:rgba(242,242,242,1);
background:#F2F2F2;
border-radius:28rpx;
margin-top: 25rpx;
margin-top: 35px;
padding: 0 10rpx;
margin-right: 12rpx;
&:nth-child(3n){
margin-right: 0;
}
&.on{
background: var(--view-minorColor);
border:1px solid var(--view-theme);
color: var(--view-theme);
background: #116636;
// border:1px solid var(--view-theme);
color:#fff;
}
}
.btns{

@ -236,6 +236,12 @@
"navigationBarTitleText": "福利积分"
}
},
{
"path": "user_integral1/fenhong",
"style": {
"navigationBarTitleText": "分红点"
}
},
{
"path": "user_integral1/user_contribute",
"style": {

@ -1,10 +1,11 @@
<template>
<view class='my-coupon' :style="viewColor">
<view class='header'>
<!-- <view class='header'>
<view class='nav acea-row row-around'>
<view class='item' :class='type==-1 ? "on": ""' @click="statusClick(-1)">
<view>全部</view>
</view>
<view class='item' :class='type==10 ? "on": ""' @click="statusClick(10)">
<view>通用券</view>
</view>
@ -18,7 +19,7 @@
<view>店铺券</view>
</view>
</view>
</view>
</view> -->
<view class="listBox">
<block v-for="(item) in list" :key='item.coupon_id'>
<view class="list acea-row row-around">
@ -44,10 +45,10 @@
</view>
</view>
<view class="right">
<view class="couponlogo" v-if="item.type == 10">通用券</view>
<!-- <view class="couponlogo" v-if="item.type == 10">通用券</view>
<view class="couponlogo" v-if="item.type == 11">品类券</view>
<view class="couponlogo" v-if="item.type == 12">跨店券</view>
<view class="couponlogo" v-if="item.type == 0">店铺券</view>
<view class="couponlogo" v-if="item.type == 0">店铺券</view> -->
<view class="title">
<view>
<p><text class='font1'>¥</text><text class='font2'>{{parsePrice(item.coupon_price)}}</text></p>
@ -129,7 +130,8 @@
this.loading = true;
getCouponLst({
product:1,
type: this.type == -1 ? '' : this.type,
// type: this.type == -1 ? '' : this.type,
type:1,
page: this.page,
limit: this.limit
}).then(res=>{
@ -190,8 +192,9 @@
}
}
.my-coupon .listBox {
margin: -73rpx auto 0 auto;
padding: 0 30rpx;
// margin: -73rpx auto 0 auto;
// padding: 0 30rpx;
margin:24rpx 24rpx 0 24rpx;
.list {
width: 100%;
height: 260rpx;
@ -300,7 +303,7 @@
.title{
width: 146rpx;
height:169rpx;
margin: 30rpx auto 0;
margin: 60rpx auto 0;
color: var(--view-priceColor);
font-weight: 600;
.font1{

@ -8,19 +8,19 @@
<view class='nav acea-row'>
<view class='item'>
<view>当前惠通宝/</view>
<view class='num'>{{userInfo.integral || 0}}</view>
<view class='num'>{{huitong || 0}}</view>
</view>
<view class='item'>
<view>冻结惠通宝/</view>
<view class='num'>{{userInfo.lockIntegral || 0}}</view>
<view class='num'>{{huitong_frozen || 0}}</view>
</view>
<view class='item'>
<!-- <view class='item'>
<view>当前惠通宝市值/消费积分</view>
<view class='num'>{{userInfo.lockIntegral || 0}}</view>
</view>
</view> -->
<!-- <view class='item'>
<view class='num'>{{userInfo.totalGainIntegral || 0}}</view>
<view>累计积分</view>
@ -40,6 +40,12 @@
<view class='item acea-row row-center-wrapper' :class='current==index?"on":""' v-for="(item,index) in navList" :key='index'
@click='nav(index)'><text class='iconfont' :class="item.icon"></text>{{item.name}}</view>
</view> -->
<view class="zhuanrang">
<text>惠通宝兑换消费积分</text>
<view class="zhuanrangBtn" @click="show1 = true">
立即兑换
</view>
</view>
<view class="zhuanrang">
<text>惠通宝转让</text>
<view class="zhuanrangBtn" @click="show = true">
@ -55,11 +61,11 @@
</view>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
<view>
<view class='state'>{{item.mark}}</view>
<view class='state'>{{item.type}}</view>
<view>{{item.create_time}}</view>
</view>
<view class='num p-color' v-if="item.pm">+{{item.number}}</view>
<view class='num' v-else>-{{item.number}}</view>
<view class='num p-color' v-if="item.count.indexOf('-')==-1">{{item.count}}</view>
<view class='num' v-if="item.count.indexOf('-')!=-1">{{item.count}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
@ -88,7 +94,7 @@
</view> -->
</view>
</view>
<view class="instructions" v-if="showProtocol">
<!-- <view class="instructions" v-if="showProtocol">
<view class="setAgCount">
<i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
<div class="title">积分说明</div>
@ -96,40 +102,83 @@
<jyf-parser :html="protocol" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
</view>
<u-popup :show="show">
</view> -->
<u-popup :show="show1" @close="show1=false">
<view class="popContent">
<view class="popTitle" style="display: flex;justify-content: space-between;">
<text>惠通宝:消费积分比值</text>
<text>{{huitongToConsume}}:1</text>
</view>
<view class="popTitle" style="margin-top:29rpx;">
兑换消费积分
</view>
<u--input
placeholder="请输入兑换消费积分"
border="surround"
type="number"
v-model="huitongToConsumeNum"
></u--input>
<view class="popTitle" style="margin-top: 15px;display: flex;justify-content: space-between;">
<text>需支付惠通宝</text>
<text>{{huitongToConsumeNum?Math.ceil((huitongToConsumeNum*huitongToConsume)):0}}</text>
</view>
<view class="submitBtn" @click="changeConsume">
立即兑换
</view>
</view>
</u-popup>
<u-popup :show="show" @close="show=false">
<view class="popContent">
<view class="popTitle">
转让惠通宝数量
</view>
<u--input
placeholder="请输入转让数量"
type="digit"
border="surround"
v-model="zhuanrang.count"
></u--input>
<view class="popTitle" style="margin-top:29rpx;">
收款人注册手机号
</view>
<u--input
placeholder="请输入内容"
placeholder="请输入收款人注册手机号"
border="surround"
v-model="value"
@change="change"
type="number"
v-model="zhuanrang.phoneTo"
></u--input>
<view class="popTitle" style="margin-top:29rpx;">
转让人手机验证码
</view>
<view class="code">
<u--input
placeholder="请输入内容"
placeholder="请输入验证码"
border="surround"
v-model="value"
@change="change"
v-model="zhuanrang.smsCode"
></u--input>
<text>获取验证码</text>
<!-- <text @click="getCode">获取验证码</text> -->
<button v-debounce class="codeText" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="getCode">
{{ text }}
</button>
</view>
<view class="submitBtn">
<view class="submitBtn" @click="submitHandle">
确定
</view>
</view>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
</u-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
<script>
import sendVerifyCode from "@/mixins/SendVerifyCode";
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
@ -139,32 +188,36 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { getIntegralInfo, getIntegralList, getAgreementApi } from '@/api/user.js';
import { getIntegralInfo, getassetsLog, getAgreementApi,huitongToConsume,getUserInfo,registerVerify,changeHuitong,getConfig} from '@/api/user.js';
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
import emptyPage from '@/components/emptyPage.vue';
import Verify from '@/components/verify/verify.vue';
import parser from "@/components/jyf-parser/jyf-parser";
const app = getApp();
export default {
components: {
authorize,
emptyPage,
Verify,
"jyf-parser": parser,
},
mixins: [sendVerifyCode],
data() {
return {
show:false,
navList: [{
'name': '分值明细',
'icon': 'icon-mingxi'
},
{
'name': '分值提升',
'icon': 'icon-tishengfenzhi'
}
],
show1:false,
// navList: [{
// 'name': '',
// 'icon': 'icon-mingxi'
// },
// {
// 'name': '',
// 'icon': 'icon-tishengfenzhi'
// }
// ],
current: 0,
page: 1,
limit: 10,
@ -182,6 +235,16 @@
video: 'width:100%;'
},
integral_status: true,
huitong:0,
huitong_frozen:0,
zhuanrang:{
count:0,
phoneTo:null,
smsCode:null,
type:'huitong',
},
huitongToConsume:1,
huitongToConsumeNum:0
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -193,6 +256,10 @@
this.isShowAuth = true
}
this.getAgreement();
getConfig().then(res=>{
this.huitongToConsume = res.data?res.data.huitongToConsume:1
})
},
/**
@ -202,6 +269,137 @@
this.getIntegralList();
},
methods: {
changeConsume(){
if(this.huitongToConsumeNum==0){
uni.showToast({
title: '兑换数量需大于0',
icon:'none'
});
return;
}
if(Math.ceil((this.huitongToConsumeNum*this.huitongToConsume))>this.huitong){
uni.showToast({
title: '惠通宝不足',
icon:'none'
});
return;
}
huitongToConsume({count:this.huitongToConsumeNum}).then(res=>{
if(res.status==200){
this.getUserInfo()
this.show1 = false;
}
}).catch(res => {
this.$util.Tips({
title: res
});
});
},
submitHandle(){
if(this.zhuanrang.count==0){
uni.showToast({
title: '转让数量需大于0',
icon:'none'
});
return;
}
if(this.zhuanrang.count>this.huitong){
uni.showToast({
title: '惠通宝不足',
icon:'none'
});
return;
}
if(!this.zhuanrang.phoneTo){
uni.showToast({
title: '请输入收款人注册手机号',
icon:'none'
});
return;
}
const regex =/^1(3|4|5|7|8|9|6)\d{9}$/i;
if(!regex.test(this.zhuanrang.phoneTo)){
uni.showToast({
title: '请输入正确的手机号',
icon:'none'
});
return;
}
if(!this.zhuanrang.smsCode){
uni.showToast({
title: '请输入验证码',
icon:'none'
});
return;
}
changeHuitong(this.zhuanrang).then(res=>{
if(res.status==200){
this.getUserInfo()
this.show = false;
}
}).catch(res => {
this.$util.Tips({
title: res
});
});
},
success(data) {
this.$refs.verify.hide();
this.code(data);
},
async getCode(data) {
let that = this;
if(!this.zhuanrang.phoneTo){
uni.showToast({
title: '请输入收款人注册手机号',
icon:'none'
});
return;
}
const regex =/^1(3|4|5|7|8|9|6)\d{9}$/i;
if(!regex.test(this.zhuanrang.phoneTo)){
uni.showToast({
title: '请输入正确的手机号',
icon:'none'
});
return;
}
this.$refs.verify.show();
},
async code(data) {
let that = this;
// if (that.formItem == 2) that.type = "register";
await registerVerify({
phone: this.zhuanrang.phoneTo,
type: 'huitong',
key: "",
// code: that.codeVal,
toke:data.token,
captchaType: 'blockPuzzle',
captchaVerification: data.captchaVerification
})
.then(res => {
that.$util.Tips({
title: res.message
});
that.sendCode();
})
.catch(res => {
that.$util.Tips({
title: res
});
});
},
/**
* 授权回调
*/
@ -213,17 +411,23 @@
authColse: function(e) {
this.isShowAuth = e
},
getUserInfo: function() {
getUserInfo() {
let that = this;
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
});
});
getUserInfo().then((res)=>{
this.huitong = res.data.assets.huitong
this.huitong_frozen = res.data.assets.huitong_frozen;
this.getIntegralList()
// getIntegralInfo().then(function(res) {
// that.$set(that,'userInfo',res.data);
// that.getIntegralList()
// }).catch(res => {
// this.integral_status = false
// return that.$util.Tips({
// title: res
// });
// });
})
},
/*获取积分说明*/
getAgreement() {
@ -241,9 +445,10 @@
if (that.loadend) return;
that.loading = true;
that.loadTitle = '';
getIntegralList({
getassetsLog({
page: that.page,
limit: that.limit
limit: that.limit,
asset_type:4
}).then(function(res) {
let list = res.data.list,
loadend = list.length < that.limit;
@ -583,7 +788,7 @@
.code{
display: flex;
align-items: center;
text{
.codeText{
font-family: Alibaba PuHuiTi;
font-weight: 400;

@ -109,6 +109,13 @@
},
goDetail(url) {
let urls = url.link
// console.log(urls,"jj")
// if(urls=='/pages/activity/collect_coupons/index'){
// uni.navigateTo({
// url: urls+'?type=-1'
// })
// return;
// }
urls = merPath(urls, this.merId)
if (urls.indexOf("http") != -1) {
// #ifdef H5

@ -78,23 +78,23 @@
</view> -->
<view class="num-wrapper skeleton-rect">
<view class="num-item" @click="goOtherPage('/pages/users/user_integral1/index')">
<text class="num">0</text>
<text class="num">{{assets.welfare}}</text>
<view class="txt">福利积分</view>
</view>
<view class="num-item" @click="goOtherPage('/pages/users/user_integral/index')">
<text class="num">0</text>
<text class="num">{{assets.consume}}</text>
<view class="txt">消费积分</view>
</view>
<view class="num-item">
<text class="num">20</text>
<view class="num-item" @click="goOtherPage('/pages/users/user_integral1/fenhong')">
<text class="num">{{assets.share_point}}</text>
<view class="txt">分红点</view>
</view>
<view class="num-item" @click="goOtherPage('/pages/users/user_integral1/user_contribute')">
<text class="num">3</text>
<text class="num">{{assets.contribution}}</text>
<view class="txt">贡献值</view>
</view>
<view class="num-item" @click="goOtherPage('/pages/huitong/huitongbao/index')">
<text class="num">6</text>
<text class="num">{{assets.huitong}}</text>
<view class="txt">惠通宝</view>
</view>
@ -386,6 +386,13 @@
newData: {},
activeRouter: '',
sysHeight: sysHeight,
assets:{
welfare:0,
consume:0,
share_point:0,
contribution:0,
huitong:0,
}
}
},
@ -561,6 +568,11 @@
that.userInfo.vip_status = 2;
that.is_promoter = res.data.is_promoter;
that.extension_status = res.data.extension_status;
Object.keys(res.data.assets).forEach(item=>{
that.$set(that.assets,item,res.data.assets[item])
})
that.getMyMenus();
});
},

@ -342,7 +342,7 @@
<view class='item acea-row row-between-wrapper' v-if="open_integral && userInfo.integral>0 && order_type == 0">
<view>积分抵扣</view>
<view class='money'>
<text v-if="!use_integral">当前积分<text class="pColor">{{userInfo.integral}}</text></text>
<text v-if="!use_integral">当前积分<text class="pColor">{{userInfo.assets.welfare}}</text></text>
<text v-else>使用了{{integral_count}}个积分抵扣<text
class="pColor">{{integral_price}}</text></text>
<checkbox-group class="checkbox integral_checked" name="isDefault" @change="changeIntegral">

@ -8,12 +8,12 @@
<view class='nav acea-row'>
<view class='item'>
<view>当前消费积分</view>
<view class='num'>{{userInfo.integral || 0}}</view>
<view class='num'>{{consume || 0}}</view>
</view>
<view class='item'>
<view>冻结消费积分</view>
<view class='num'>{{userInfo.lockIntegral || 0}}</view>
<view>冻结消费积分</view>
<view class='num'>{{consume_frozen || 0}}</view>
</view>
<!-- <view class='item'>
@ -35,20 +35,26 @@
<view class='item acea-row row-center-wrapper' :class='current==index?"on":""' v-for="(item,index) in navList" :key='index'
@click='nav(index)'><text class='iconfont' :class="item.icon"></text>{{item.name}}</view>
</view> -->
<view class="zhuanrang">
<text>惠通宝兑换消费积分</text>
<view class="zhuanrangBtn" @click="show1 = true">
立即兑换
</view>
</view>
<view class="scoreTitle">
分值明细
</view>
<view class='list' :hidden='current != 0' >
<view class='list'>
<view class='tip' v-if="userInfo.clear && userInfo.clear.status && userInfo.clear.nextClearIntegral > 0"><text class='iconfont icon-shuoming'></text>
<text class="tip-text">提示您有部分积分将于{{userInfo.clear.nextClearDay}}过期请尽快使用</text>
</view>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
<view>
<view class='state'>{{item.mark}}</view>
<view class='state'>{{item.type}}</view>
<view>{{item.create_time}}</view>
</view>
<view class='num p-color' v-if="item.pm">+{{item.number}}</view>
<view class='num' v-else>-{{item.number}}</view>
<view class='num p-color' v-if="item.status==1">+{{item.count}}</view>
<view class='num' v-else>-{{item.count}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
@ -86,6 +92,36 @@
</view>
</view>
</view>
<u-popup :show="show1" @close="show1=false">
<view class="popContent">
<view class="popTitle" style="display: flex;justify-content: space-between;">
<text>消费积分:分红点比值</text>
<text>{{consumeToShare}}:1</text>
</view>
<view class="popTitle" style="margin-top:29rpx;">
兑换分红点
</view>
<u--input
placeholder="请输入兑换分红点"
border="surround"
type="number"
v-model="consumeToShareNum"
></u--input>
<view class="popTitle" style="margin-top: 15px;display: flex;justify-content: space-between;">
<text>需支付积分</text>
<text>{{consumeToShareNum?Math.ceil((consumeToShareNum*consumeToShare)):0}}</text>
</view>
<view class="submitBtn" @click="changeConsume">
立即兑换
</view>
</view>
</u-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
@ -100,7 +136,7 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { getIntegralInfo, getIntegralList, getAgreementApi } from '@/api/user.js';
import { getIntegralInfo, getassetsLog, getAgreementApi,getUserInfo,getConfig,jifenToShare } from '@/api/user.js';
import {
mapGetters
} from "vuex";
@ -116,15 +152,15 @@
},
data() {
return {
navList: [{
'name': '分值明细',
'icon': 'icon-mingxi'
},
{
'name': '分值提升',
'icon': 'icon-tishengfenzhi'
}
],
// navList: [{
// 'name': '',
// 'icon': 'icon-mingxi'
// },
// {
// 'name': '',
// 'icon': 'icon-tishengfenzhi'
// }
// ],
current: 0,
page: 1,
limit: 10,
@ -142,6 +178,11 @@
video: 'width:100%;'
},
integral_status: true,
consume:0,
consume_frozen:0,
show1:false,
consumeToShare:1,
consumeToShareNum:0
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -153,6 +194,9 @@
this.isShowAuth = true
}
this.getAgreement();
getConfig().then(res=>{
this.consumeToShare = res.data?res.data.consumeToShare:1
})
},
/**
@ -162,6 +206,33 @@
this.getIntegralList();
},
methods: {
changeConsume(){
if(this.consumeToShareNum==0){
uni.showToast({
title: '兑换分红点需大于0',
icon:'none'
});
return;
}
if(Math.ceil((this.consumeToShareNum*this.consumeToShare))>this.consume){
uni.showToast({
title: '积分不足',
icon:'none'
});
return;
}
jifenToShare({count:this.consumeToShareNum}).then(res=>{
if(res.status==200){
this.getUserInfo()
this.show1 = false;
}
}).catch(res => {
this.$util.Tips({
title: res
});
});
},
/**
* 授权回调
*/
@ -175,15 +246,20 @@
},
getUserInfo: function() {
let that = this;
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
getUserInfo().then((res)=>{
this.consume = res.data.assets.consume
this.consume_frozen = res.data.assets.consume_frozen
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
});
});
});
})
},
/*获取积分说明*/
getAgreement() {
@ -201,10 +277,12 @@
if (that.loadend) return;
that.loading = true;
that.loadTitle = '';
getIntegralList({
getassetsLog({
page: that.page,
limit: that.limit
limit: that.limit,
asset_type:1
}).then(function(res) {
console.log(res,"---")
let list = res.data.list,
loadend = list.length < that.limit;
that.integralList = that.$util.SplitArray(list, that.integralList);
@ -504,4 +582,68 @@
height: 756rpx;
overflow-y: scroll;
}
.zhuanrang{
margin:20rpx 0rpx;
border-radius: 10px;
background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding:20rpx 30rpx;
text{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 30rpx;
color: #333333;
}
.zhuanrangBtn{
width: 230rpx;
height: 70rpx;
background: linear-gradient(-90deg, #89B929, #116636);
border-radius: 35px;
text-align: center;
line-height: 70rpx;
font-size: 28rpx;
color: #FFFFFF;
}
}
.popContent{
padding:40rpx 24rpx;
.popTitle{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 30rpx;
color: #333333;
margin-bottom: 29rpx;
}
.code{
display: flex;
align-items: center;
.codeText{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 30rpx;
color: #116636;
margin-left:58rpx;
}
}
.submitBtn{
width:100%;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: $btn-color;
border-radius: 45px;
color:#fff;
margin-top:36rpx;
}
/deep/.u-input{
background: #F6F6F6;
border-radius: 10px;
height: 90rpx;
border-radius: 0 !important;
}
}
</style>

File diff suppressed because one or more lines are too long

@ -8,12 +8,12 @@
<view class='nav acea-row'>
<view class='item'>
<view>当前福利积分</view>
<view class='num'>{{userInfo.integral || 0}}</view>
<view class='num'>{{welfare || 0}}</view>
</view>
<view class='item'>
<view>冻结福利积分</view>
<view class='num'>{{userInfo.lockIntegral || 0}}</view>
<view class='num'>{{welfare_frozen || 0}}</view>
</view>
<!-- <view class='item'>
@ -38,17 +38,17 @@
<view class="scoreTitle">
分值明细
</view>
<view class='list' :hidden='current != 0' >
<view class='list'>
<view class='tip' v-if="userInfo.clear && userInfo.clear.status && userInfo.clear.nextClearIntegral > 0"><text class='iconfont icon-shuoming'></text>
<text class="tip-text">提示您有部分积分将于{{userInfo.clear.nextClearDay}}过期请尽快使用</text>
</view>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
<view>
<view class='state'>{{item.mark}}</view>
<view class='state'>{{item.type}}</view>
<view>{{item.create_time}}</view>
</view>
<view class='num p-color' v-if="item.pm">+{{item.number}}</view>
<view class='num' v-else>-{{item.number}}</view>
<view class='num p-color' v-if="item.status==1">+{{item.count}}</view>
<view class='num' v-else>-{{item.count}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
@ -100,7 +100,7 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { getIntegralInfo, getIntegralList, getAgreementApi } from '@/api/user.js';
import { getIntegralInfo, getassetsLog, getAgreementApi,getUserInfo } from '@/api/user.js';
import {
mapGetters
} from "vuex";
@ -116,15 +116,15 @@
},
data() {
return {
navList: [{
'name': '分值明细',
'icon': 'icon-mingxi'
},
{
'name': '分值提升',
'icon': 'icon-tishengfenzhi'
}
],
// navList: [{
// 'name': '',
// 'icon': 'icon-mingxi'
// },
// {
// 'name': '',
// 'icon': 'icon-tishengfenzhi'
// }
// ],
current: 0,
page: 1,
limit: 10,
@ -142,6 +142,8 @@
video: 'width:100%;'
},
integral_status: true,
welfare:0,
welfare_frozen:0
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -175,15 +177,20 @@
},
getUserInfo: function() {
let that = this;
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
getUserInfo().then((res)=>{
this.welfare = res.data.assets.welfare
this.welfare_frozen = res.data.assets.welfare_frozen
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
});
});
});
})
},
/*获取积分说明*/
getAgreement() {
@ -201,10 +208,12 @@
if (that.loadend) return;
that.loading = true;
that.loadTitle = '';
getIntegralList({
getassetsLog({
page: that.page,
limit: that.limit
limit: that.limit,
asset_type:3
}).then(function(res) {
console.log(res,"---")
let list = res.data.list,
loadend = list.length < that.limit;
that.integralList = that.$util.SplitArray(list, that.integralList);

@ -8,10 +8,14 @@
<view class='nav acea-row'>
<view class='item'>
<view>当前贡献值</view>
<view class='num'>{{userInfo.integral || 0}}</view>
<view class='num'>{{contribution || 0}}</view>
</view>
<view class='item'>
<view>冻结贡献值</view>
<view class='num'>{{contribution_frozen || 0}}</view>
</view>
<!-- <view class='item'>
<view class='num'>{{userInfo.totalGainIntegral || 0}}</view>
<view>累计积分</view>
@ -34,17 +38,17 @@
<view class="scoreTitle">
分值明细
</view>
<view class='list' :hidden='current != 0' >
<view class='list'>
<view class='tip' v-if="userInfo.clear && userInfo.clear.status && userInfo.clear.nextClearIntegral > 0"><text class='iconfont icon-shuoming'></text>
<text class="tip-text">提示您有部分积分将于{{userInfo.clear.nextClearDay}}过期请尽快使用</text>
</view>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
<view>
<view class='state'>{{item.mark}}</view>
<view class='state'>{{item.type}}</view>
<view>{{item.create_time}}</view>
</view>
<view class='num p-color' v-if="item.pm">+{{item.number}}</view>
<view class='num' v-else>-{{item.number}}</view>
<view class='num p-color' v-if="item.status==1">+{{item.count}}</view>
<view class='num' v-else>-{{item.count}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
@ -96,7 +100,7 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { getIntegralInfo, getIntegralList, getAgreementApi } from '@/api/user.js';
import { getIntegralInfo, getassetsLog, getAgreementApi,getUserInfo } from '@/api/user.js';
import {
mapGetters
} from "vuex";
@ -112,15 +116,15 @@
},
data() {
return {
navList: [{
'name': '分值明细',
'icon': 'icon-mingxi'
},
{
'name': '分值提升',
'icon': 'icon-tishengfenzhi'
}
],
// navList: [{
// 'name': '',
// 'icon': 'icon-mingxi'
// },
// {
// 'name': '',
// 'icon': 'icon-tishengfenzhi'
// }
// ],
current: 0,
page: 1,
limit: 10,
@ -138,6 +142,8 @@
video: 'width:100%;'
},
integral_status: true,
contribution:0,
contribution_frozen:0
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -171,15 +177,20 @@
},
getUserInfo: function() {
let that = this;
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
getUserInfo().then((res)=>{
this.contribution = res.data.assets.contribution
this.contribution_frozen = res.data.assets.contribution_frozen
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
});
});
});
})
},
/*获取积分说明*/
getAgreement() {
@ -197,10 +208,12 @@
if (that.loadend) return;
that.loading = true;
that.loadTitle = '';
getIntegralList({
getassetsLog({
page: that.page,
limit: that.limit
limit: that.limit,
asset_type:5
}).then(function(res) {
console.log(res,"---")
let list = res.data.list,
loadend = list.length < that.limit;
that.integralList = that.$util.SplitArray(list, that.integralList);

Loading…
Cancel
Save