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. 22
      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. 89
      pages/user/score.wxml
  11. 70
      pages/user/score.wxss
  12. 3
      pages/user/user.wxml
  13. 41
      pages/user/wallet.js
  14. 137
      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>
<view class="shop df" wx:for="{{list}}" > <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> <image class="sh_slt" src="{{item.imgurl}}"></image>
</navigator> </navigator>
<view class="df_1"> <view class="df_1">
<view class="sp_text"> <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}} {{item.product_title}}
</navigator> </navigator>
<!-- <view class="sp_tit ovh1" style='height:50%;'>{{item.product_title}}</view> --> <!-- <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="list">
<view class="search_no" wx:if="{{!list.length}}"> <view class="search_no" wx:if="{{!list.length}}">
<view class="font_14"> <view class="font_14">
<image class="scimg" src="/images/kdd.png"></image> <image class="scimg" src="/images/icon-no.png"></image>
</view> </view>
<text>暂无拼团活动/(ㄒoㄒ)/~~</text> <text>暂无拼团活动/(ㄒoㄒ)/~~</text>
</view> </view>

7
pages/member/member.wxml

@ -1,2 +1,7 @@
<!--pages/member/member.wxml--> <!--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>

22
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, // 优惠券金额 money: data.reduce_money, // 优惠券金额
coupon_money: Number(parseFloat(data.coupon_money).toFixed(3).slice(0, -1)), // 优惠后金额 coupon_money: Number(parseFloat(data.coupon_money).toFixed(3).slice(0, -1)), // 优惠后金额
user_money: data.user_money, // 用户余额 user_money: data.user_money, // 用户余额
// user_score: data.user_score, // 用户积分
coupon_id: data.coupon_id, // 优惠券id coupon_id: data.coupon_id, // 优惠券id
discount: data.discount, //控制优惠方式 discount: data.discount, //控制优惠方式
scorebuy: data.grade_rate_amount, //积分消费规则 scorebuy: data.grade_rate_amount, //积分消费规则

9
pages/order/pay.wxml

@ -91,7 +91,7 @@
<text class="left"></text> <text class="left"></text>
<text class="right">小计:{{total}}</text> <text class="right">小计:{{total}}</text>
</view> </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:left;font-size:16px;'>优惠券</view>
<view style='float:right'> <view style='float:right'>
<text wx:if="{{money}}" class="right" style="font-size: 16px;">使用优惠券:{{money}}</text> <text wx:if="{{money}}" class="right" style="font-size: 16px;">使用优惠券:{{money}}</text>
@ -102,7 +102,12 @@
<view class="pay_zf pd" wx:if="{{name}}"> <view class="pay_zf pd" wx:if="{{name}}">
<text class="left">活动</text> <text class="left">活动</text>
<text class="right" style='color:{{bgcolor}};'>{{name}}</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;'> <view class="pay_qb pd" style='border-bottom:1px solid #eee;'>
<text class="left">钱包余额</text> <text class="left">钱包余额</text>
<text wx:if="{{d_yuan}}" class="right">余额抵扣{{d_yuan}}</text> <text wx:if="{{d_yuan}}" class="right">余额抵扣{{d_yuan}}</text>

2
pages/set/set.wxss

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

70
pages/user/score.js

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

89
pages/user/score.wxml

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

70
pages/user/score.wxss

@ -1,21 +1,28 @@
/* pages/user/score.wxss */ /* pages/user/score.wxss */
.swiper-tab{ .swiper-tab{
width: 100%; padding-left: 9%;
padding-right: 9%;
width: 82%;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;
display: flex;
justify-content: space-between;
} }
.swiper-tab-list{ .swiper-tab-list{
font-size: 30rpx; font-size: 30rpx;
display: inline-block; /* display: inline-block; */
width: 33.33%; width: 20%;
color: #777777; color: #333333;
} }
.on{ .on{
color: #7a896c; color: #FA5151;
border-bottom: 5rpx solid #7a896c; border-bottom: 5rpx solid #FA5151;
} }
.swiper-box{ .swiper-box{
display: block; height: 100%; width: 100%; overflow: hidden; display: block;
height: 100%;
width: 100%;
overflow: hidden;
} }
.scoreuse{ .scoreuse{
text-align: justify; text-align: justify;
@ -25,7 +32,6 @@
.detail{ .detail{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 10px;
border-top:1px solid #eee; border-top:1px solid #eee;
} }
.scoreuse{ .scoreuse{
@ -40,18 +46,20 @@
} }
.jf_obtain{ .jf_obtain{
width:100%; width:100%;
text-align:center; display: flex;
align-items: center;
margin-top:10px;
height:50px;
} }
.obtain_bt{ .obtain_bt{
color: #000;
font-size:30rpx; font-size:30rpx;
display:inline-block; height:25px;
width:33.33%;
} }
.obtain_box{ .obtain_box{
width:95%; width:95%;
margin:0 auto; margin:0 auto;
border-top: 1px solid #eee; border-top: 1px solid #eee;
margin-top: 10px;
} }
.detail image{ .detail image{
width: 100px; width: 100px;
@ -59,8 +67,44 @@ margin-top: 10px;
margin: auto; margin: auto;
} }
.myscore{ .myscore{
background: #ec635d; background:#015051;
color: #fff; 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{ .jf_box{
width: 100px; width: 100px;

3
pages/user/user.wxml

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

41
pages/user/wallet.js

@ -49,37 +49,18 @@ Page({
// 请求我的数据 // 请求我的数据
requestMyData: function () { requestMyData: function () {
var that = this; var that = this;
wx.request({ WXAPI.getWallet({
url: app.d.ceshiUrl + '&action=user&m=details', accessId: app.globalData.accessId,
method: 'post', storeId: 239,
data: { storeType: 1,
openid: app.globalData.userInfo.openid }).then(res => {
}, if (res.code == 200) {
header: { var data = res.data;
'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({ that.setData({
user: user, user: data,
list_1: res.data.list_1, list: data.list,
list_2: res.data.list_2, // list_2: data.list_2,
list_3: res.data.list_3, // list_3: 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
}); });
} }
}); });

137
pages/user/wallet.wxml

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

41
pages/user/wallet.wxss

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

6
utils/server.js

@ -123,6 +123,12 @@ module.exports = {
couponList: (data) => { //修改密码 couponList: (data) => { //修改密码
return requestServer('app.coupon.index', 'post', 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) => { //店铺分类 mchClass: (data) => { //店铺分类
return requestServer('app.index.mchClass', 'post', data) return requestServer('app.index.mchClass', 'post', data)

Loading…
Cancel
Save