Browse Source

新增积分页面

新增钱包页面
master
杜叶春 2 years ago
parent
commit
92d5e9ff79
  1. BIN
      images/search_no.png
  2. 4
      pages/collection/collection.wxml
  3. 2
      pages/group_buy/group.wxml
  4. 7
      pages/member/member.wxml
  5. 24
      pages/member/member.wxss
  6. 1
      pages/order/pay.js
  7. 9
      pages/order/pay.wxml
  8. 2
      pages/set/set.wxss
  9. 70
      pages/user/score.js
  10. 141
      pages/user/score.wxml
  11. 84
      pages/user/score.wxss
  12. 3
      pages/user/user.wxml
  13. 45
      pages/user/wallet.js
  14. 213
      pages/user/wallet.wxml
  15. 41
      pages/user/wallet.wxss
  16. 6
      utils/server.js

BIN
images/search_no.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

4
pages/collection/collection.wxml

@ -31,12 +31,12 @@
</view>
<view class="shop df" wx:for="{{list}}" >
<navigator url="../product/detail?productId={{item.pid}}">
<navigator url="/pages/product/detail?productId={{item.p_id}}">
<image class="sh_slt" src="{{item.imgurl}}"></image>
</navigator>
<view class="df_1">
<view class="sp_text">
<navigator class="sp_tit ovh1" style='height:50%;' url="../product/detail?productId={{item.pid}}">
<navigator class="sp_tit ovh1" style='height:50%;' url="/pages/product/detail?productId={{item.p_id}}">
{{item.product_title}}
</navigator>
<!-- <view class="sp_tit ovh1" style='height:50%;'>{{item.product_title}}</view> -->

2
pages/group_buy/group.wxml

@ -45,7 +45,7 @@
<view class="list">
<view class="search_no" wx:if="{{!list.length}}">
<view class="font_14">
<image class="scimg" src="/images/kdd.png"></image>
<image class="scimg" src="/images/icon-no.png"></image>
</view>
<text>暂无拼团活动/(ㄒoㄒ)/~~</text>
</view>

7
pages/member/member.wxml

@ -1,2 +1,7 @@
<!--pages/member/member.wxml-->
<text>pages/member/member.wxml</text>
<view class="container">
<view class="card">
<view class="detail" style="color:#356386;">当前积分0,充值会员即可拥有积分特权</view>
<image class="card_bg" src="/images/member/component_lv_1.png" mode="aspectFit"></image>
</view>
</view>

24
pages/member/member.wxss

@ -1 +1,23 @@
/* pages/member/member.wxss */
/* pages/member/member.wxss */
page {
background-color:#f4f5f6;
}
.card{
padding-top: 30rpx;
/* margin-left: 25rpx;
display: flex;
align-items: center; */
position: relative;
}
.card .detail {
margin-top: 130rpx;
margin-left: 60rpx;
font-size: 24rpx;
position: absolute;
color: #356386;
}
.card .card_bg {
margin-left: 25rpx;
width: 700rpx;
height: 229rpx;
}

1
pages/order/pay.js

@ -213,6 +213,7 @@ Page({
money: data.reduce_money, // 优惠券金额
coupon_money: Number(parseFloat(data.coupon_money).toFixed(3).slice(0, -1)), // 优惠后金额
user_money: data.user_money, // 用户余额
// user_score: data.user_score, // 用户积分
coupon_id: data.coupon_id, // 优惠券id
discount: data.discount, //控制优惠方式
scorebuy: data.grade_rate_amount, //积分消费规则

9
pages/order/pay.wxml

@ -91,7 +91,7 @@
<text class="left"></text>
<text class="right">小计:{{total}}</text>
</view>
<view wx:if="{{discount}}" bindtap="setModalStatus" data-type="" data-status="1" style='border-bottom:1px solid #eee;padding:10px;'>
<!-- <view wx:if="{{discount}}" bindtap="setModalStatus" data-type="" data-status="1" style='border-bottom:1px solid #eee;padding:10px;'>
<view style='float:left;font-size:16px;'>优惠券</view>
<view style='float:right'>
<text wx:if="{{money}}" class="right" style="font-size: 16px;">使用优惠券:{{money}}</text>
@ -102,7 +102,12 @@
<view class="pay_zf pd" wx:if="{{name}}">
<text class="left">活动</text>
<text class="right" style='color:{{bgcolor}};'>{{name}}</text>
</view>
</view> -->
<!-- <view class="pay_qb pd" style='border-bottom:1px solid #eee;'>
<text class="left">我的积分</text>
<text wx:if="{{d_score}}" class="right">积分抵扣{{d_score}}</text>
<text wx:else class="right">{{user_score}}元</text>
</view> -->
<view class="pay_qb pd" style='border-bottom:1px solid #eee;'>
<text class="left">钱包余额</text>
<text wx:if="{{d_yuan}}" class="right">余额抵扣{{d_yuan}}</text>

2
pages/set/set.wxss

@ -12,8 +12,6 @@
display:flex;
justify-content:space-between;
background:#fff;
/* margin:0;
padding:0; */
padding:0;
color:#666;
}

70
pages/user/score.js

@ -12,6 +12,8 @@ Page({
addscore: [],
fuscore: [],
remind: '加载中',
type: '',
bgcolor: 'https://mall.gylservice.com/pic/images/icon1/sign_bg.png'
},
//页面加载完成函数
onReady: function () {
@ -22,22 +24,7 @@ Page({
},
onLoad: function () {
var that = this;
wx.setNavigationBarTitle({
title: '个人积分中心',
})
that.getRequest();
/**
* 获取系统信息
*/
wx.getSystemInfo({
success: function (res) {
that.setData({
winWidth: res.windowWidth,
winHeight: res.windowHeight
});
}
});
},
onPullDownRefresh: function () {
wx.showNavigationBarLoading() //在标题栏中显示加载
@ -50,7 +37,11 @@ Page({
bindChange: function (e) {
console.log(e)
var that = this;
that.setData({ currentTab: e.detail.current });
that.setData({
currentTab: e.detail.current,
type: e.detail.current==0?'':e.detail.current
});
that.getRequest();
},
/**
* 点击tab切换
@ -62,42 +53,33 @@ Page({
return false;
} else {
that.setData({
currentTab: e.target.dataset.current
currentTab: e.target.dataset.current,
type: e.target.dataset.current==0?'':e.target.dataset.current
})
that.getRequest();
}
},
// 进入我的积分
getRequest: function () {
var that = this
wx.request({
url: app.d.ceshiUrl + '&index.php?module=api&action=pi&p=sign&c=Home&m=integral',
method: 'post',
data: {
openid: app.globalData.userInfo.openid,
},
header: { //请求头
'Content-Type': 'application/x-www-form-urlencoded'
},
success: function (res) {
var content = res.data.rule;
WxParse.wxParse('content', 'html', content, that, 5);
WXAPI.getIntegral({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
type: that.data.type,
pageno: 1,
pageSize: 100,
}).then(res => {
if (res.code == 200) {
var data = res.data;
that.setData({
score: res.data.score, // 积分
logo: res.data.logo,
sign: res.data.sign, // 获取记录
consumption: res.data.consumption, // 使用记录
switch: res.data.switch//转账按钮(0 关闭 1.开启)
score: data.score, // 当前可用积分
scoreNum: data.score-data.FrozenScore, // 积分
frozenScore: data.FrozenScore, // 冻结积分
sign: data.sign, // 全部明细
list: data.list, // 获取明细
})
console.log(res.data.sign);
},
error: function (e) {
wx.showToast({
title: '网络异常!',
duration: 2000,
});
},
}
});
}
})

141
pages/user/score.wxml

@ -1,6 +1,6 @@
<view class="body" wx:if="{{remind}}">
<view class='zong'>
<view class="spinner" >
<view class="spinner">
<view class="spinner-container container1">
<view class="circle1"></view>
<view class="circle2"></view>
@ -24,71 +24,86 @@
</view>
<!-- 加载页面结束 -->
<block wx:else>
<view class='score' style='display: flex;flex-direction: column;justify-content:center;'>
<view class="myscore" style='background:{{bgcolor}};height:170px;'>
<view class='jf_box'>
<view style='color:#fff;text-align:center;line-height:100px;'>
<text style='font-size:36px'>{{score}}</text>
<view class='score' style='display: flex;flex-direction: column;justify-content:center;'>
<view class="myscore" style='background-image:url({{bgcolor}});'>
<view class='scoreData'>
<view class='scoreNum'>{{score | 0}}</view>
<view class="yh-kyjf">当前可用积分</view>
</view>
<view class='scoreData'>
<view class='scoreNum'>{{scoreNum | 0}}</view>
<view class="yh-kyjf">当前积分</view>
</view>
<view class='scoreData'>
<view class='scoreNum'>{{frozenScore | 0}}</view>
<view class="yh-kyjf">当前冻结积分</view>
</view>
<view class='useExp' bindtap='_toGradeUse(true)'>
<image src="/images/sign_rule.png" mode=""/>
<view>使用说明</view>
</view>
</view>
</view>
<view class="use_detail" style="width:95%;height:800rpx;margin:0 auto;">
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">使用规则</view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">获取记录</view>
<view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">使用记录</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 31}}px" bindchange="bindChange">
<swiper-item>
<scroll-view scroll-y="true" >
<view class='detail'>
<import src="../../wxParse/wxParse.wxml" />
<view class="wxParse" style='padding:0;'>
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y="true" >
<view class="search_no" wx:if="{{!sign.length}}">
<view class="font_14"><image class="scimg" src="/images/search_no.png"></image></view>
<text>暂无积分获取记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_box' wx:for="{{sign}}" wx:for-item="itemadd">
<view class='jf_obtain' style='color:#777;margin-top:10px;height:40px;'>
<view class='obtain_bt'>{{itemadd.sign_time}}</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemadd.type == 0}}">签到</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemadd.type == 2}}">首次关注得积分</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemadd.type == 4}}">好友转账</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemadd.type == 6}}">赠送</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemadd.type == 7}}">抽奖</view>
<view class='obtain_bt' style='line-height:40px;'>+{{itemadd.sign_score}}</view>
<view style='clear:both;'></view>
<view class="use_detail" style="width:95%;height:800rpx;margin:0 auto;">
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">全部明细</view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">获取明细</view>
<view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">使用明细</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 31}}px" bindchange="bindChange">
<swiper-item>
<scroll-view scroll-y="true">
<view class="search_no" wx:if="{{!sign.length}}">
<text>暂无积分记录/(ㄒoㄒ)/~~</text>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y="true" >
<view class="search_no" wx:if="{{!consumption.length}}">
<view class="font_14"><image class="scimg" src="/images/search_no.png"></image></view>
<text>暂无积分使用记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_box' wx:for="{{consumption}}" wx:for-item="itemfu">
<view class='jf_obtain' style='color:#777;margin-top:10px;'>
<view class='obtain_bt'>{{itemfu.sign_time}}</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemfu.type == 1}}">消费</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemfu.type == 3}}">转账给好友</view>
<view class='obtain_bt' style='line-height:40px;' wx:if="{{itemfu.type == 5}}">系统扣除</view>
<view class='obtain_bt' style='line-height:40px;'>-{{itemfu.sign_score}}</view>
<view class='obtain_box' wx:for="{{sign}}" wx:key="key">
<view class='jf_obtain'>
<view class="left">
<view class='obtain_bt'>{{item.name}}</view>
<view class='obtain_bt' style='color:#777;font-size:24rpx;'>{{item.sign_time}}</view>
</view>
<view class='obtain_bt' style='position:absolute;right:20rpx;'>+{{item.sign_score}}</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y="true">
<view class="search_no" wx:if="{{!list.length}}">
<!-- <view class="font_14"><image class="scimg" src="/images/search_no.png"></image></view> -->
<text>暂无积分记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_box' wx:for="{{list}}" wx:key="key">
<view class='jf_obtain'>
<view class="left">
<view class='obtain_bt'>{{item.name}}</view>
<view class='obtain_bt' style='color:#777;font-size:24rpx;'>{{item.sign_time}}</view>
</view>
<view class='obtain_bt' style='position:absolute;right:20rpx;'>+{{item.sign_score}}</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y="true">
<view class="search_no" wx:if="{{!list.length}}">
<text>暂无积分记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_box' wx:for="{{list}}" wx:key="key">
<view class='jf_obtain'>
<view class="left">
<view class='obtain_bt'>{{item.name}}</view>
<view class='obtain_bt' style='color:#777;font-size:24rpx;'>{{item.sign_time}}</view>
</view>
<view class='obtain_bt' style='position:absolute;right:20rpx;'>+{{item.sign_score}}</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</view>
</block>

84
pages/user/score.wxss

@ -1,21 +1,28 @@
/* pages/user/score.wxss */
.swiper-tab{
width: 100%;
text-align: center;
line-height: 80rpx;
}
padding-left: 9%;
padding-right: 9%;
width: 82%;
text-align: center;
line-height: 80rpx;
display: flex;
justify-content: space-between;
}
.swiper-tab-list{
font-size: 30rpx;
display: inline-block;
width: 33.33%;
color: #777777;
font-size: 30rpx;
/* display: inline-block; */
width: 20%;
color: #333333;
}
.on{
color: #7a896c;
border-bottom: 5rpx solid #7a896c;
}
color: #FA5151;
border-bottom: 5rpx solid #FA5151;
}
.swiper-box{
display: block; height: 100%; width: 100%; overflow: hidden;
display: block;
height: 100%;
width: 100%;
overflow: hidden;
}
.scoreuse{
text-align: justify;
@ -25,7 +32,6 @@
.detail{
display: flex;
flex-direction: column;
margin-top: 10px;
border-top:1px solid #eee;
}
.scoreuse{
@ -40,18 +46,20 @@
}
.jf_obtain{
width:100%;
text-align:center;
display: flex;
align-items: center;
margin-top:10px;
height:50px;
}
.obtain_bt{
color: #000;
font-size:30rpx;
display:inline-block;
width:33.33%;
height:25px;
}
.obtain_box{
width:95%;
margin:0 auto;
border-top: 1px solid #eee;
margin-top: 10px;
margin:0 auto;
border-top: 1px solid #eee;
}
.detail image{
width: 100px;
@ -59,8 +67,44 @@ margin-top: 10px;
margin: auto;
}
.myscore{
background: #ec635d;
background:#015051;
color: #fff;
height:200px;
display: flex;
align-items: center;
justify-content: center;
}
.scoreData {
color: white;
text-align: center;
z-index: 1;
width: 30%;
}
.scoreNum {
font-size: 55rpx;
height: 88rpx;
}
.yh-kyjf {
font-size: 26rpx;
opacity: 0.6;
margin: 10rpx 0;
}
.useExp {
z-index: 2;
position: absolute;
right: 31rpx;
top: 20rpx;
font-size: 24rpx;
color: #99B4B4;
display: flex;
align-items: center;
}
.useExp image {
width: 24rpx;
height: 24rpx;
margin-right: 7rpx;
position: initial;
}
.jf_box{
width: 100px;

3
pages/user/user.wxml

@ -63,7 +63,8 @@
</view>
<view class="card_bottom">
<view bindtap="navToCoupon">
<!-- bindtap="navToCoupon" -->
<view>
<view>{{user.coupon_num?user.coupon_num:'—'}}</view>
<text>优惠券</text>
</view>

45
pages/user/wallet.js

@ -49,39 +49,20 @@ Page({
// 请求我的数据
requestMyData: function () {
var that = this;
wx.request({
url: app.d.ceshiUrl + '&action=user&m=details',
method: 'post',
data: {
openid: app.globalData.userInfo.openid
},
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: function (res) {
var status = res.data.status;
if (status == 1) {
var user = res.data.user;
that.setData({
user: user,
list_1: res.data.list_1,
list_2: res.data.list_2,
list_3: res.data.list_3,
detailed_commission: res.data.detailed_commission ? res.data.detailed_commission : 0
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
},
error: function (e) {
wx.showToast({
title: '网络异常!',
duration: 2000
WXAPI.getWallet({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
}).then(res => {
if (res.code == 200) {
var data = res.data;
that.setData({
user: data,
list: data.list,
// list_2: data.list_2,
// list_3: data.list_3,
});
}
}
});
},
})

213
pages/user/wallet.wxml

@ -1,145 +1,108 @@
<!--pages/wallet/wallet.wxml-->
<view class="body" wx:if="{{remind}}">
<view class='zong'>
<view class="spinner" >
<view class="spinner-container container1">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container2">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container3">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
</view>
<view class='zong'>
<view class="spinner">
<view class="spinner-container container1">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container2">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container3">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
</view>
</view>
</view>
<!-- 加载页面结束 -->
<block wx:else>
<view class="page">
<view class="sc mt10" style='background-color:{{ bgcolor }};'>
<view class="df_1 df">
<text class="qb_02">{{user.money}}</text>
<text class="qb_01">账户余额({{user.unit}})</text>
</view>
</view>
<view class="use_detail" style="width: 100%;margin: 0 auto;position: relative;height:55%;">
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">交易明细</view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">充值明细</view>
<view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">提现明细</view>
<view class="page">
<view class="sc mt10">
<view class="df_1 df">
<text class="qb_02">{{user.user_money}}</text>
<text class="qb_01">账户余额({{user.unit}})</text>
</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="position:relative;" bindchange="bindChange">
<swiper-item >
<view class="search_no" style='padding-top:60px' wx:if="{{list_3.length < 1}}">
<view class="font_14" style='padding-bottom:2%;'><image class="scimg" src="/images/search_no.png"></image></view>
<text>暂时还没入账记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_box'>
<scroll-view scroll-y="true" style='height:100%;overflow:auto;padding-bottom:45px;'>
<view class='jf_obtain' wx:for="{{list_3}}">
<view class='obtain_bt_3'>
<view style='color: #999;font-size: 30rpx;'>{{item.time}}</view>
</view>
<view class='obtain_bt_2' wx:if="{{item.type == 2 || item.type == 4 || item.type == 6 || item.type == 11 || item.type == 12 || item.type == 21 }}">
-{{item.money}}
<text class='my_money' wx:if="{{item.type == 4}}">(消费)</text>
<text class='my_money' wx:if="{{item.type == 6}}">(红包)</text>
<text class='my_money' wx:if="{{item.type == 11}}">(系统扣款)</text>
<text class='my_money' wx:if="{{item.type == 12}}">(转好友)</text>
<text class='my_money' wx:if="{{item.type == 21}}">(提现成功)</text>
<view class="use_detail" style="width: 100%;margin: 0 auto;position: relative;height:55%;">
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">交易明细</view>
<!-- <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">充值明细</view>
<view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">提现明细</view> -->
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="position:relative;" bindchange="bindChange">
<swiper-item>
<scroll-view scroll-y="true">
<view class="search_no" wx:if="{{!list.length}}">
<text>暂时还没交易记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_bt_2' wx:if="{{item.type == 1 || item.type == 5 || item.type == 13 || item.type == 7|| item.type == 14 || item.type == 22 || item.type == 23 || item.type == 24}}">
+{{item.money}}
<text class='my_money' wx:if="{{item.type == 1}}">(充值)</text>
<text class='my_money' wx:if="{{item.type == 5}}">(退款)</text>
<text class='my_money' wx:if="{{item.type == 7}}">(返佣)</text>
<text class='my_money' wx:if="{{item.type == 13}}">(转入)</text>
<text class='my_money' wx:if="{{item.type == 14}}">(系统充值)</text>
<text class='my_money' wx:if="{{item.type == 22}}">(提现失败)</text>
<text class='my_money' wx:if="{{item.type == 23}}">(取消订单)</text>
<text class='my_money' wx:if="{{item.type == 24}}">(分享)</text>
<view class='obtain_box' wx:for="{{list}}" wx:key="key">
<view class='jf_obtain'>
<view class="left">
<!-- 1:充值4:余额消费 5:退款7:佣金 8:管理佣金 11:系统扣款14:系统充值28 售后(仅退款)29 售后(退货退款)30 会员返现 -->
<view class='obtain_bt' wx:if="{{item.type==1}}">充值</view>
<view class='obtain_bt' wx:elif="{{item.type==4}}">余额消费</view>
<view class='obtain_bt' wx:elif="{{item.type==5}}">退款</view>
<view class='obtain_bt' wx:elif="{{item.type==7}}">佣金</view>
<view class='obtain_bt' wx:elif="{{item.type==8}}">管理佣金</view>
<view class='obtain_bt' wx:elif="{{item.type==11}}">系统扣款</view>
<view class='obtain_bt' wx:elif="{{item.type==14}}">系统充值</view>
<view class='obtain_bt' wx:elif="{{item.type==28}}">售后(仅退款</view>
<view class='obtain_bt' wx:elif="{{item.type==29}}">售后(退货退款)</view>
<view class='obtain_bt' wx:elif="{{item.type==30}}">会员返现</view>
<view class='obtain_bt' style='color:#777;font-size:24rpx;'>{{item.add_date}}</view>
</view>
<view class='obtain_bt' style='position:absolute;right:40rpx;' wx:if="{{item.type==4}}">-{{item.money}}</view>
<view class='obtain_bt' style='position:absolute;right:40rpx;' wx:elif="{{item.type==11}}">-{{item.money}}</view>
<view class='obtain_bt' style='position:absolute;right:40rpx;' wx:else>+{{item.money}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</swiper-item>
<swiper-item >
<view class="search_no" style='padding-top:60px' wx:if="{{list_1.length < 1}}">
<view class="font_14" style='padding-bottom:2%;'><image class="scimg" src="/images/search_no.png"></image></view>
<text>暂时还没消费记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_box'>
<scroll-view scroll-y="true" style='height:100%;overflow:auto;padding-bottom:45px;'>
<view class='jf_obtain' style='color:#777;' wx:for="{{list_1}}">
<view class='obtain_bt_3'>
<view style='color: #999;font-size: 30rpx;'>{{item.time}}</view>
</view>
<view class='obtain_bt_2' wx:if="{{item.type == 2 || item.type == 4 || item.type == 6 || item.type == 11 || item.type == 12 || item.type == 21 }}">
-{{item.money}}
<text class='my_money' wx:if="{{item.type == 4}}">(消费)</text>
<text class='my_money' wx:if="{{item.type == 6}}">(红包)</text>
<text class='my_money' wx:if="{{item.type == 11}}">(系统扣款)</text>
<text class='my_money' wx:if="{{item.type == 12}}">(转好友)</text>
</swiper-item>
<!-- <swiper-item >
<scroll-view scroll-y="true">
<view class="search_no" wx:if="{{!list.length}}">
<text>暂时还没充值记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_bt_2' wx:if="{{item.type == 1 || item.type == 5 || item.type == 13 || item.type == 7|| item.type == 14 || item.type == 22 || item.type == 23 || item.type == 24}}">
+{{item.money}}
<text class='my_money' wx:if="{{item.type == 1}}">(充值)</text>
<text class='my_money' wx:if="{{item.type == 5}}">(退款)</text>
<text class='my_money' wx:if="{{item.type == 7}}">(返佣)</text>
<text class='my_money' wx:if="{{item.type == 13}}">(转入)</text>
<text class='my_money' wx:if="{{item.type == 14}}">(系统充值)</text>
<text class='my_money' wx:if="{{item.type == 23}}">(取消订单)</text>
<text class='my_money' wx:if="{{item.type == 24}}">(分享)</text>
<view class='obtain_box' wx:for="{{list}}" wx:key="key">
<view class='jf_obtain'>
<view class="left">
<view class='obtain_bt'>{{item.type}}</view>
<view class='obtain_bt' style='color:#777;font-size:24rpx;'>{{item.add_date}}</view>
</view>
<view class='obtain_bt' style='position:absolute;right:20rpx;'>+{{item.money}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view class="search_no" style='padding-top:50px;' wx:if="{{list_2.length < 1}}">
<view class="font_14" style='padding-bottom:2%;'><image class="scimg" src="/images/search_no.png"></image></view>
<text>暂时还没提现记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_box'>
<scroll-view scroll-y="true" style="height:100%;overflow:auto;padding-bottom:45px;">
<view class='jf_obtain' style='color:#777;' wx:for="{{list_2}}">
<view class='obtain_bt_3'>
<!-- <view style='color:#333;'>{{item.user_name}} -->
<view style='color: #999;font-size: 30rpx;'>{{item.time}}</view>
<!-- </view> -->
</view>
<view class='obtain_bt_2' wx:if="{{item.type == 21}}">
-{{item.money}}
<text class='my_money' >(成功)</text>
</view>
<view class='obtain_bt_2' wx:if="{{item.type == 22}}">
+{{item.money}}
<text class='my_money' >(失败)</text>
<scroll-view scroll-y="true">
<view class="search_no" wx:if="{{!list.length}}">
<text>暂时还没提现记录/(ㄒoㄒ)/~~</text>
</view>
<view class='obtain_bt_2' wx:if="{{item.type == 2}}">
-{{item.money}}
<text class='my_money' >(申请)</text>
<view class='obtain_box' wx:for="{{list}}" wx:key="key">
<view class='jf_obtain'>
<view class="left">
<view class='obtain_bt'>{{item.type}}</view>
<view class='obtain_bt' style='color:#777;font-size:24rpx;'>{{item.add_date}}</view>
</view>
<view class='obtain_bt' style='position:absolute;right:20rpx;'>-{{item.money}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</swiper-item>
</swiper>
</view>
<view class="dibu" style='background-color:{{bgcolor}};'>
</swiper-item> -->
</swiper>
</view>
<!-- <view class="dibu" style='background-color:{{bgcolor}};'>
<navigator class="dibu_1" url="../user/recharge">
<view>
<span class="dibu_t">充值</span>
@ -156,6 +119,6 @@
<view>
<text class="dibu_3">|</text>
</view>
</view> -->
</view>
</view>
</block>

41
pages/user/wallet.wxss

@ -1,9 +1,9 @@
/* pages/wallet/wallet.wxss */
.sc{
width: 100%;
height: 311rpx;
height: 310rpx;
background-size:100% auto;
/* background-image: url('https://xiaochengxu.laiketui.com/duan/LKT/images/bgm.png'); */
background-image: url('https://mall.gylservice.com/pic/images/icon/myyxbj.png');
text-align: center;
display: flex;
flex-direction: column;
@ -36,14 +36,13 @@ contact-button{
}
.df_1{
position: absolute;
top: 45%;
transform: translateY(-50%);
width: 100%;
height: 221rpx;
height: 220rpx;
margin: 0px auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content:center
}
.df_2{
width: 100%;
@ -63,16 +62,13 @@ contact-button{
flex-direction: column;
}
.qb_01{
float: left;
color: #fff;
font-size: 13px;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
margin-left: 8px;
line-height: 25px;
opacity:0.8;
}
.qb_02{
float: left;
color: #fff;
font-size: 28px;
margin-left: 8px;
@ -143,7 +139,7 @@ contact-button{
line-height: 80rpx;
left:0;
background-color: #FFFFFF;
border-bottom:2rpx solid #EAE9EC;
/* border-bottom:2rpx solid #EAE9EC; */
}
.swiper-tab-list{
font-size: 30rpx;
@ -157,25 +153,24 @@ contact-button{
width: 100%;
overflow: hidden;
}
.obtain_box{
width:100%;
width:90%;
margin:0 auto;
height:100%;
text-align:center;
overflow: auto
border-top: 1px solid #eee;
}
.obtain_bt{
color: #000;
font-size:30rpx;
height:25px;
}
.jf_obtain{
width:100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size:30rpx;
height: 120rpx;
border-bottom:1px solid #eee;
padding: 0rpx 30rpx;
margin-top:10px;
height:50px;
}
.on{
color:#020202;
font-weight:bold;

6
utils/server.js

@ -123,6 +123,12 @@ module.exports = {
couponList: (data) => { //修改密码
return requestServer('app.coupon.index', 'post', data)
},
getIntegral: (data) => { //我的积分
return requestServer('app.sign.integral', 'post', data)
},
getWallet: (data) => { //我的钱包
return requestServer('app.user.details', 'post', data)
},
/* 商品 */
mchClass: (data) => { //店铺分类
return requestServer('app.index.mchClass', 'post', data)

Loading…
Cancel
Save