Commit d5409100 by zhangzhen

页面内容新增

parent 231f4926
...@@ -84,3 +84,21 @@ export const createSecondaryCardOrder=(data)=>{ ...@@ -84,3 +84,21 @@ export const createSecondaryCardOrder=(data)=>{
let url=`/secondaryCardOrder/createSecondaryCardOrder` let url=`/secondaryCardOrder/createSecondaryCardOrder`
return http.post(url,data) return http.post(url,data)
} }
export const monthlyCardRecord=(data)=>{
let url=`/monthlyCardOrder/list`
return http.get(url,data)
}
export const secondaryCardRecord=(data)=>{
let url=`/secondaryCardOrder/list`
return http.get(url,data)
}
export const getShareList=(data)=>{
let url=`/durationLog/shareList`
return http.get(url,data)
}
...@@ -286,6 +286,13 @@ ...@@ -286,6 +286,13 @@
} }
}, },
{ {
"path": "cardPackageRecord/record",
"style": {
"navigationBarTitleText": "卡包-购买记录",
"enablePullDownRefresh" : false
}
},
{
"path" : "publicize/index", "path" : "publicize/index",
"style" : "style" :
{ {
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<view v-if="monthlyCard.status" class="flex-row-center"> <view v-if="monthlyCard.status" class="flex-row-center">
<text class="text-1">月卡</text> <text class="text-1">月卡</text>
<view class="flex-row"> <view class="flex-row">
<text v-if="monthlyCard.status==1" class="text-3">今日待使用</text> <text v-if="monthlyCard.status==1" class="text-3">今日{{monthlyCard.num}}小时</text>
<text v-else-if="monthlyCard.status==2" class="text-3">明日待使用</text> <text v-else-if="monthlyCard.status==2" class="text-3">明日待使用</text>
</view> </view>
</view> </view>
...@@ -574,6 +574,7 @@ import moment from "../../common/moment"; ...@@ -574,6 +574,7 @@ import moment from "../../common/moment";
loginStatus: uni.getStorageSync('loginStatus') == 'login'? true: false, loginStatus: uni.getStorageSync('loginStatus') == 'login'? true: false,
monthlyCard:{ monthlyCard:{
status: 0, status: 0,
num: 0
}, },
secondaryCard:{ secondaryCard:{
status: 0, status: 0,
...@@ -670,6 +671,7 @@ import moment from "../../common/moment"; ...@@ -670,6 +671,7 @@ import moment from "../../common/moment";
}) })
if(obj){ if(obj){
this.monthlyCard.status = 1; this.monthlyCard.status = 1;
this.monthlyCard.num = obj.freeDuration
if(obj.freeDuration<=0){ if(obj.freeDuration<=0){
this.monthlyCard.status = 2; this.monthlyCard.status = 2;
} }
...@@ -1542,7 +1544,7 @@ import moment from "../../common/moment"; ...@@ -1542,7 +1544,7 @@ import moment from "../../common/moment";
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 102rpx; width: 106rpx;
height: 32rpx; height: 32rpx;
background: #FFEED9; background: #FFEED9;
border-radius: 4rpx; border-radius: 4rpx;
......
<template> <template>
<view class="order-record"> <view class="order-record">
<view class="flex-between header-content">
<text class="text-title text-black text-bold text-xl">我的权益卡</text>
<view class="flex-row-center" @tap="onNavTo">
<text class="text-title text-gray">购买记录</text>
<text class="cuIcon-right text-gray"></text>
</view>
</view>
<view class="content-box"> <view class="content-box">
<view class="list-content"> <view class="list-content">
<view v-for="(item,index) in secondaryCardList" :key="index" class="relative list-item" @tap="onNavToOrderInfo(item)"> <view v-for="(item,index) in secondaryCardList" :key="index" class="relative list-item" @tap="onNavToOrderInfo(item)">
...@@ -43,6 +52,9 @@ ...@@ -43,6 +52,9 @@
<u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage"> <u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage">
</u-empty> </u-empty>
</view> </view>
</view> </view>
</template> </template>
...@@ -141,6 +153,11 @@ ...@@ -141,6 +153,11 @@
} }
} }
}) })
},
onNavTo(){
uni.navigateTo({
url:'/setting/cardPackageRecord/record'
})
} }
} }
} }
...@@ -154,7 +171,10 @@ ...@@ -154,7 +171,10 @@
.order-record { .order-record {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.header-content{
padding: 30upx 30upx 12upx;
align-items: center;
}
.content-box { .content-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -184,6 +204,7 @@ ...@@ -184,6 +204,7 @@
margin: 0 12upx; margin: 0 12upx;
image{ image{
width: 64%; width: 64%;
max-height: 104upx;
} }
} }
.text-2{ .text-2{
......
<template>
<view class="order-record">
<view>
<u-tabs :list="tabList" @change="onTabChange"></u-tabs>
</view>
<view v-if="loginStatus" class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between">
<text class="">支付金额</text>
<text class="text-bold text-pink text-lg">{{ item.secondaryCardAmount || item.monthlyCardAmount}}</text>
</view>
<view class="flex-between">
<text class="">支付方式</text>
<text>{{payTypeEnum[item.payType]}}</text>
</view>
<view class="flex-between">
<text class="">订单编号</text>
<text class="text-black">{{item.secondaryCardNo ||item.monthlyCardNo}}</text>
</view>
<view class="flex-between">
<text class="">操作日期</text>
<text>{{item.createTime}}</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<NoLogin v-model="loginStatus" />
</view>
</template>
<script>
import config from "@/config/index.config"
import {
monthlyCardRecord,
secondaryCardRecord
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components: {
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
tabIndex:0,
tabList:[
{
name: "次卡",
value: secondaryCardRecord,
},
{
name: "月卡",
value: monthlyCardRecord,
}
],
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 100
},
loginStatus: true,
orderStatusEnum: {},
payTypeEnum: {
1: "微信支付",
2: "支付宝支付",
3: "余额支付"
},
payStatus: {
expenditure: '-',
income: '+'
},
listBlankImage: config.assetsPath + '/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onTabChange(val){
this.tabIndex = val.index;
this.queryParams.pageNum = 1;
this.onLoading();
},
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
this.queryParams.status = this.statusList[this.statusIndex].value;
this.tabList[this.tabIndex].value(this.queryParams).then(res => {
uni.hideLoading()
this.status = "nomore"
if (res.data.code == 200) {
this.list = res.data.rows
}
})
},
tabSelect(i) {
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val) {
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// })
}
}
}
</script>
<style>
page {
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content {
display: flex;
flex-direction: column;
align-items: center;
.list-item {
display: flex;
flex-direction: column;
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1 {
display: flex;
.flex-row {
display: flex;
flex-direction: row;
}
}
}
}
}
}
</style>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<image class="logo-bg" :src="assetsPath +'/publicize/logo.png'" mode="widthFix"></image> <image class="logo-bg" :src="assetsPath +'/publicize/logo.png'" mode="widthFix"></image>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<button class="cu-btn"> <button class="cu-btn" @tap="onNavToRule('share_and_register')">
活动规则 活动规则
</button> </button>
</view> </view>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<text class="text-gray">入账时间 {{item.createTime}}</text> <text class="text-gray">入账时间 {{item.createTime}}</text>
<view class="flex-row-center"> <view class="flex-row-center">
<text class="text-gray margin-right-sm">奖励来源</text> <text class="text-gray margin-right-sm">奖励来源</text>
<text class="text-black">好友「凑角用户 1001」注册成功</text> <text class="text-black">好友「{{item.newNickName}}」注册成功</text>
</view> </view>
</view> </view>
<view class="time-box"> <view class="time-box">
...@@ -190,7 +190,8 @@ ...@@ -190,7 +190,8 @@
import { import {
equityBindUser, equityBindUser,
equityDuration, equityDuration,
equityDurationList equityDurationList,
getShareList
} from "@/api/recharge.js" } from "@/api/recharge.js"
import { import {
getUserInfo getUserInfo
...@@ -250,19 +251,18 @@ ...@@ -250,19 +251,18 @@
} }
}, },
onLoading(){ onLoading(){
equityDurationList(this.queryParams).then(res => { getShareList(this.queryParams).then(res => {
console.log(res,99999) let list = res.data.rows.map(item => {
// let list = res.data.rows.map(item => {
// this.userInfo.phone.slice(-4)
// return {
// ...item,
// } return {
// }) ...item,
newNickName: item.newNickName? item.newNickName: '凑角用户_'+ item.newPhone.slice(-4)
}
})
if(this.queryParams.pageNum ===1){ if(this.queryParams.pageNum ===1){
this.list = res.data.rows this.list = list
}else{ }else{
this.list.push(...res.data.rows) this.list.push(...list)
} }
if(this.list.length >= res.data.total){ if(this.list.length >= res.data.total){
...@@ -323,6 +323,11 @@ ...@@ -323,6 +323,11 @@
}, },
qrR(r) { qrR(r) {
this.qrPath = r; this.qrPath = r;
},
onNavToRule(val){
uni.navigateTo({
url:'/setting/rule/rule?keyData='+val
})
} }
} }
} }
......
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