Commit 39a51a8d by zhangzhen

细节优化

parent 9f3b9078
......@@ -34,11 +34,18 @@ export const balanceLog=(data)=>{
return http.get(url,data)
}
// 已入账记录
export const equityFundLog=(data)=>{
let url=`/equityFundLog/list`
return http.get(url,data)
}
// 待入账记录
export const equityFundExcess=(data)=>{
let url=`/equityFundExcess/list`
return http.get(url,data)
}
export const equityBindUser=(data)=>{
let url=`/activities/list`
......
......@@ -207,7 +207,7 @@
</view>
<view class="prefer-box-list">
<view v-for="(item,k) in preferList" :key="k" class="list-item">
<view v-for="(item,k) in preferList" :key="k" class="list-item" @tap="onNavToRule3(item)">
<image class="img" :src="item.iconUrl" mode="widthFix"></image>
<text class="text-title">{{item.title}}</text>
<text class="text-slogan">{{item.slogan}}</text>
......@@ -441,52 +441,62 @@
preferList: [{
iconUrl: config.assetsPath + "/vip/p_1.png",
title: "会员价",
slogan: "最低享98折"
slogan: "最低享98折",
value:0
},
{
iconUrl: config.assetsPath + "/vip/p_2.png",
title: "专属礼物",
slogan: "好礼享不停"
slogan: "好礼享不停",
value:1
},
{
iconUrl: config.assetsPath + "/vip/p_3.png",
title: "会员日",
slogan: "半价活动"
slogan: "半价活动",
value:2
},
{
iconUrl: config.assetsPath + "/vip/p_4.png",
title: "特定活动",
slogan: "免报名费"
slogan: "免报名费",
value:3
},
{
iconUrl: config.assetsPath + "/vip/p_5.png",
title: "邀请有礼",
slogan: "推荐返利"
slogan: "推荐返利",
value:4
},
{
iconUrl: config.assetsPath + "/vip/p_6.png",
title: "专属储物柜",
slogan: "一年使用期限"
title: "专享礼物",
slogan: "一年使用期限",
value:5
},
{
iconUrl: config.assetsPath + "/vip/p_7.png",
title: "专属客服",
slogan: "一对一服务"
},
{
iconUrl: config.assetsPath + "/vip/p_8.png",
title: "联营开店",
slogan: "共享资源"
slogan: "一对一服务",
value:6
},
{
iconUrl: config.assetsPath + "/vip/p_9.png",
title: "商城",
slogan: "会员折扣"
slogan: "会员折扣",
value:7
},
{
iconUrl: config.assetsPath + "/vip/p_10.png",
title: "次卡",
slogan: "特惠购"
slogan: "特惠购",
value:8
},
{
iconUrl: config.assetsPath + "/vip/p_8.png",
title: "联营开店",
slogan: "共享资源",
value:9
}
]
};
......@@ -630,9 +640,10 @@
url: "/setting/rule/rule?keyData=user_pay_protocol"
})
},
onNavToRule3() {
onNavToRule3(val) {
let current = val.value || 0
uni.navigateTo({
url: "/setting/equityDetail/equityDetail"
url: `/setting/equityDetail/equityDetail?current=${current}`
})
},
......
......@@ -4,7 +4,7 @@
bgColor="transparent"></f-navbar>
<view class="">
<swiper class="swiper-box" :indicator-dots="false" :circular="true" previous-margin="8px" next-margin="30px" :autoplay="false"
<swiper class="swiper-box" :indicator-dots="false" :current="index" :circular="true" previous-margin="8px" next-margin="30px" :autoplay="false"
:duration="1000" @change="onChange">
<swiper-item>
<view class="swiper-item">
......@@ -640,10 +640,13 @@
userInfo:''
}
},
onLoad() {
onLoad(option) {
if(uni.getStorageSync('userInfo')){
this.userInfo = uni.getStorageSync('userInfo');
}
if(option && option.current){
this.index = Number(option.current)
}
},
onShareAppMessage() {
return {
......
......@@ -41,11 +41,14 @@
</view>
</view>
<!-- <text class="text-bold text-white">{{ userInfo && userInfo.consumerWallet && userInfo.consumerWallet.equityFund? (userInfo.consumerWallet.equityFund).toFixed(2) : '0.00' }}</text> -->
<!-- <text class="text-bold text-white text-xl">{{userInfo && userInfo.consumerWallet && userInfo.consumerWallet.accumulateEquityFund? (userInfo.consumerWallet.accumulateEquityFund).toFixed(2) : '0.00' }}</text> -->
<view class="content-list">
<view class="padding-sm">
<view class="flex-between padding-sm part-top">
<text class="text-title text-lg text-black">权益金入账信息</text>
<view class="flex-row-center">
<button v-for="(item,k) in tabList" :key="k" class="cu-btn sm" :class="tabIndex ===k?'bg-blue':'bg-white'" @tap="onTabChange(k)">{{item.name}}</button>
</view>
</view>
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
......@@ -98,6 +101,7 @@
} from "@/api/index.js"
import {
equityFundLog,
equityFundExcess,
equityBindUser
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
......@@ -142,7 +146,16 @@
userInfo: uni.getStorageSync('userInfo'),
listBlankImage: config.assetsPath + '/no_data_icon.png',
countNum: 0,
userName:''
userName:'',
tabIndex:0,
tabList:[
{
name:"已入账"
},
{
name:"待入账"
}
]
};
},
onLoad() {
......@@ -197,17 +210,27 @@
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.equityFundTypeEnum = getDictItem(dicts, "equity_fund_type");
this.queryParams.pageNum = 1
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.equityFundTypeEnum = getDictItem(dicts, "equity_fund_type");
this.queryParams.pageNum = 1
this.onLoading()
})
}
},
onLoading() {
if(this.tabIndex ===1){
this.onEquityFundExcess()
}else{
this.onEquityFundLog()
}
},
onEquityFundLog(){
uni.showLoading({
title: '加载中'
})
......@@ -241,6 +264,40 @@
}
})
},
onEquityFundExcess(){
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
equityFundExcess(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
if (res.data.code == 200) {
let list = res.data.rows.map(item => {
return {
...item,
phone4Last: item.newPhone.slice(-4)
}
})
if (this.queryParams.pageNum === 1) {
this.list = list
} else {
this.list.push(...list);
}
if (this.list.length < res.data.total) {
this.status = "loadmore"
} else {
this.status = "nomore"
}
} else if (res.data.code == 401) {
this.loginStatus = false
}
})
},
onEquityBindUser() {
equityBindUser().then(res => {
console.log(res, 999999)
......@@ -263,6 +320,12 @@
uni.navigateTo({
url:"/setting/equityFundLog/list"
})
},
onTabChange(e){
if(this.tabIndex === e) return;
this.tabIndex = e
this.queryParams.pageNum = 1;
this.onLoading();
}
}
}
......@@ -498,7 +561,9 @@
width: 100%;
flex-direction: column;
margin: 12upx 0 0 0;
.part-top{
align-items: center;
}
.list-content {
display: flex;
flex-direction: column;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment