liudan 8 months ago
parent ffb868ce05
commit a5a79c1718
  1. 26
      api/user.js
  2. 52
      pages.json
  3. 59
      pages/huitong/huitongbao/index.vue
  4. 1
      pages/index/component/menus.vue
  5. 6
      pages/user/index.vue
  6. 2
      pages/users/user_integral1/benpiao.vue
  7. 535
      pages/users/user_integral1/fenhong.vue
  8. 381
      pages/users/user_integral1/index.vue
  9. 146
      pages/users/user_payment/index.vue
  10. BIN
      static/images/images.lnk
  11. BIN
      static/images/stop.png

@ -354,6 +354,10 @@ export function getAddressDefault() {
export function getRechargeApi() {
return request.get("common/recharge_quota");
}
export function depositData() {
return request.get("deposit/data");
}
/**
* 登陆记录
*/
@ -775,6 +779,11 @@ export function systemFormData(id) {
export function getassetsLog(data) {
return request.get(`user/assetsLog`,data)
}
// 积分
//赠送积分
export function changeHuitong(data) {
return request.post(`user/send/integral`,data)
}
//配置
export function getConfig() {
return request.get(`exchange/config`)
@ -783,12 +792,21 @@ export function getConfig() {
export function scoreToDiamond(data) {
return request.post(`user/exchange/diamond`,data)
}
// 钻石
// 赠送钻石
export function sendDiamond(data) {
return request.post(`user/send/diamond`,data)
}
// 钻石兑换本票
export function DiamondTostock(data) {
return request.post(`user/exchange/stock`,data)
}
//转让惠通宝
export function changeHuitong(data) {
return request.post(`user/send/huitong`,data)
}
//消费积分兑分红点
export function jifenToShare(data) {

@ -101,24 +101,8 @@
"navigationBarTitleText": "网站已关闭"
}
},
{
"path": "pages/order_details/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "pages/order_details/stay",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "pages/order_details/delivery",
"style": {
"navigationBarTitleText": "配送详情"
}
},
{
"path": "pages/order_pay_back/index",
"style": {
@ -127,6 +111,31 @@
}
],
"subPackages": [{
"root": "pages/order_details",
"name": "order_details",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "stay",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "delivery",
"style": {
"navigationBarTitleText": "配送详情"
}
}
]
},{
"root": "pages/huitong",
"name": "huitong",
"pages": [
@ -228,11 +237,12 @@
}
},
{
"path": "user_integral/index",
"path": "user_integral1/index",
"style": {
"navigationBarTitleText": "积分详情"
"navigationBarTitleText": "账户钻石数"
}
},
{
"path": "user_integral1/benpiao",
"style": {
@ -330,7 +340,7 @@
{
"path": "user_payment/index",
"style": {
"navigationBarTitleText": "余额充值"
"navigationBarTitleText": "预存金额"
}
},
{

@ -7,12 +7,12 @@
<view class='line'></view> -->
<view class='nav acea-row'>
<view class='item'>
<view>当前惠通宝/</view>
<view>账户复购积分数</view>
<view class='num'>{{huitong || 0}}</view>
</view>
<view class='item'>
<view>冻结惠通宝/</view>
<view>账户提现积分数</view>
<view class='num'>{{huitong_frozen || 0}}</view>
</view>
@ -41,17 +41,18 @@
@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">
立即兑换
<text>提现积分转让</text>
<view class="zhuanrangBtn" @click="show = true">
立即转让
</view>
</view>
<view class="zhuanrang">
<text>惠通宝转让</text>
<view class="zhuanrangBtn" @click="show = true">
立即转让
<text>提现积分兑换钻石</text>
<view class="zhuanrangBtn" @click="show1 = true">
立即兑换
</view>
</view>
<view class="scoreTitle">
分值明细
</view>
@ -115,22 +116,22 @@
<u-popup :show="show1" @close="show1=false">
<view class="popContent">
<view class="popTitle" style="display: flex;justify-content: space-between;">
<text>惠通宝:消费积分比值</text>
<text>积分 : 钻石比值</text>
<text>1:{{huitongToConsume}}</text>
</view>
<view class="popTitle" style="margin-top:29rpx;">
兑换惠通宝
兑换钻石数
</view>
<u--input
placeholder="请输入惠通宝个数"
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>需支付积分</text>
<text>{{huitongToConsumeNum?(huitongToConsumeNum*huitongToConsume).toFixed(2):0}}</text>
</view>
@ -145,10 +146,10 @@
<u-popup :show="show" @close="show=false">
<view class="popContent">
<view class="popTitle">
转让惠通宝数量
转让积分数量
</view>
<u--input
placeholder="请输入转让数量"
placeholder="请输入积分数量"
type="digit"
border="surround"
v-model="zhuanrang.count"
@ -176,6 +177,9 @@
{{ text }}
</button>
</view>
<view class="msg">
积分互转平台收取3%钻石手续费
</view>
<view class="submitBtn" @click="submitHandle">
确定
</view>
@ -197,7 +201,7 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { getIntegralInfo, getassetsLog, getAgreementApi,huitongToConsume,getUserInfo,registerVerify,changeHuitong,getConfig} from '@/api/user.js';
import { getIntegralInfo, getassetsLog,scoreToDiamond, getAgreementApi,getUserInfo,registerVerify,changeHuitong,getConfig} from '@/api/user.js';
import {
mapGetters
} from "vuex";
@ -250,7 +254,7 @@
count:0,
phoneTo:null,
smsCode:null,
type:'huitong',
type:'integral',
},
huitongToConsume:1,
huitongToConsumeNum:0,
@ -275,7 +279,7 @@
}
this.getAgreement();
getConfig().then(res=>{
this.huitongToConsume = res.data?res.data.huitongToConsume:1
this.huitongToConsume = res.data?res.data.integralToDiamond:1
})
},
@ -307,12 +311,12 @@
}
if(this.huitongToConsumeNum>this.huitong){
uni.showToast({
title: '惠通宝不足',
title: '积分不足',
icon:'none'
});
return;
}
huitongToConsume({count:Number(this.huitongToConsumeNum).toFixed(2)}).then(res=>{
scoreToDiamond({count:Number(this.huitongToConsumeNum).toFixed(2)}).then(res=>{
if(res.status==200){
this.getUserInfo()
@ -334,7 +338,7 @@
}
if(this.zhuanrang.count>this.huitong){
uni.showToast({
title: '惠通宝不足',
title: '积分不足',
icon:'none'
});
return;
@ -443,8 +447,8 @@
getUserInfo() {
let that = this;
getUserInfo().then((res)=>{
this.huitong = res.data.assets.huitong
this.huitong_frozen = res.data.assets.huitong_frozen;
this.huitong = res.data.assets.integral_buy
this.huitong_frozen = res.data.assets.integral_withdraw;//
this.mobilePhoneNum = res.data.phone
this.getIntegralList()
// getIntegralInfo().then(function(res) {
@ -478,7 +482,7 @@
getassetsLog({
page: that.page,
limit: that.limit,
asset_type:4
asset_type:1
}).then(function(res) {
let list = res.data.list,
loadend = list.length < that.limit;
@ -844,4 +848,13 @@
border-radius: 0 !important;
}
}
.msg{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 24rpx;
margin:31rpx 0;
text-align: center;
color: #999999;
}
</style>

@ -63,6 +63,7 @@
mounted() {},
methods: {
menusTap(url) {
let data = this.$util.stringIntercept(url, 1, '\?');
data = this.$util.stringIntercept(data, 1, '\=');
uni.setStorageSync('storeIndex', data);

@ -84,7 +84,7 @@
<text class="num">{{assets.integral_buy}}</text>
<view class="txt">积分</view>
</view>
<view class="num-item" @click="goOtherPage('/pages/users/user_integral/index')">
<view class="num-item" @click="goOtherPage('/pages/users/user_integral1/index')">
<text class="num">{{assets.diamond}}</text>
<view class="txt">钻石</view>
</view>
@ -92,8 +92,8 @@
<text class="num">{{assets.stock}}</text>
<view class="txt">本票</view>
</view>
<view class="num-item" @click="goOtherPage('/pages/huitong/huitongbao/index')">
<text class="num">{{assets.integral_withdraw}}</text>
<view class="num-item" @click="goOtherPage('/pages/users/user_payment/index')">
<text class="num">{{assets.deposit_total}}</text>
<view class="txt">预存金额</view>
</view>

@ -235,7 +235,7 @@
getassetsLog({
page: that.page,
limit: that.limit,
asset_type:5
asset_type:3
}).then(function(res) {
console.log(res,"---")
let list = res.data.list,

File diff suppressed because one or more lines are too long

@ -7,15 +7,16 @@
<view class='line'></view> -->
<view class='nav acea-row'>
<view class='item'>
<view>当前福利积分</view>
<view class='num'>{{welfare || 0}}</view>
<view>账户钻石数</view>
<view class='num'>{{huitong || 0}}</view>
</view>
<view class='item'>
<view>冻结福利积分</view>
<view class='num'>{{welfare_frozen || 0}}</view>
<!-- <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>
@ -35,16 +36,32 @@
<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">
立即转让
</view>
</view>
<view class="scoreTitle">
分值明细
</view>
<view class='list'>
<view class='list' :hidden='current != 0' >
<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.type}}</view>
<view class='state'>{{item.type}}
<text style="margin-left:10rpx;">{{(item.ext != null&&item.ext.from_phone)?`来自${item.ext.from_phone}`:(item.ext !== null&&item.ext.to_phone)?`转给${item.ext.to_phone}`:''}}</text>
</view>
<view>{{item.create_time}}</view>
</view>
<view>
@ -55,6 +72,7 @@
<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>
<view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
@ -83,7 +101,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>
@ -91,12 +109,86 @@
<jyf-parser :html="protocol" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> -->
<u-popup :show="show1" @close="show1=false">
<view class="popContent">
<view class="popTitle" style="display: flex;justify-content: space-between;">
<text>钻石 : 本票比值</text>
<text>1:{{huitongToConsume}}</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?(huitongToConsumeNum*huitongToConsume).toFixed(2):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="请输入收款人注册手机号"
border="surround"
type="number"
v-model="zhuanrang.phoneTo"
></u--input>
<view class="popTitle" style="margin-top:29rpx;">
转让人手机验证码
</view>
<view class="code">
<u--input
placeholder="请输入验证码"
border="surround"
v-model="zhuanrang.smsCode"
></u--input>
<!-- <text @click="getCode">获取验证码</text> -->
<button v-debounce class="codeText" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="getCode">
{{ text }}
</button>
</view>
<view class="msg">
钻石互转平台收取3%钻石手续费
</view>
<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 ]
// +----------------------------------------------------------------------
@ -106,22 +198,27 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { getIntegralInfo, getassetsLog, getAgreementApi,getUserInfo } from '@/api/user.js';
import { getIntegralInfo, getassetsLog,DiamondTostock, getAgreementApi,getUserInfo,registerVerify,sendDiamond,getConfig} from '@/api/user.js';
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
// 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,
// authorize,
emptyPage,
Verify,
"jyf-parser": parser,
},
mixins: [sendVerifyCode],
data() {
return {
show:false,
show1:false,
// navList: [{
// 'name': '',
// 'icon': 'icon-mingxi'
@ -148,8 +245,16 @@
video: 'width:100%;'
},
integral_status: true,
welfare:0,
welfare_frozen:0,
huitong:0,
// huitong_frozen:0,
zhuanrang:{
count:0,
phoneTo:null,
smsCode:null,
type:'integral',
},
huitongToConsume:1,
huitongToConsumeNum:0,
statusList:[
{key:0,value:'获取冻结'},
@ -157,7 +262,8 @@
{key:2,value:'退款'},
{key:3,value:'支付'},
]
],
mobilePhoneNum:''
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -169,6 +275,10 @@
this.isShowAuth = true
}
this.getAgreement();
getConfig().then(res=>{
this.huitongToConsume = res.data?res.data.diamondToStock:1
})
},
/**
@ -179,17 +289,147 @@
},
methods: {
getLable(val){
let arr = this.statusList.filter(item=>{
return item.key==val
})
if(arr.length>0){
return arr[0].value
}else{
return '-'
}
},
changeConsume(){
if(this.huitongToConsumeNum==0){
uni.showToast({
title: '兑换数量需大于0',
icon:'none'
});
return;
}
if(this.huitongToConsumeNum>this.huitong){
uni.showToast({
title: '积分不足',
icon:'none'
});
return;
}
DiamondTostock({count:Number(this.huitongToConsumeNum).toFixed(2)}).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;
}
this.zhuanrang.count = Number(this.zhuanrang.count).toFixed(2)
sendDiamond(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.mobilePhoneNum,
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
});
});
},
/**
* 授权回调
*/
@ -201,20 +441,22 @@
authColse: function(e) {
this.isShowAuth = e
},
getUserInfo: function() {
getUserInfo() {
let that = this;
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
});
});
this.huitong = res.data.assets.diamond;
this.mobilePhoneNum = res.data.phone
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
// });
// });
})
},
@ -237,9 +479,8 @@
getassetsLog({
page: that.page,
limit: that.limit,
asset_type:3 //
asset_type:2
}).then(function(res) {
console.log(res,"---")
let list = res.data.list,
loadend = list.length < that.limit;
that.integralList = that.$util.SplitArray(list, that.integralList);
@ -426,6 +667,7 @@
.integral-details .wrapper .list .item .state {
margin-bottom: 24rpx;
font-family: Alibaba PuHuiTi;
font-size: 30rpx;
color: #333333;
}
@ -539,4 +781,77 @@
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: linear-gradient(-90deg, #89B929, #116636);
border-radius: 45px;
color:#fff;
margin-top:36rpx;
}
/deep/.u-input{
background: #F6F6F6;
border-radius: 10px;
height: 90rpx;
border-radius: 0 !important;
}
}
.msg{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 24rpx;
margin:31rpx 0;
text-align: center;
color: #999999;
}
</style>

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Loading…
Cancel
Save