Commit d5483ea6 authored by Mac's avatar Mac

1

parent 888a3173
...@@ -511,7 +511,11 @@ ...@@ -511,7 +511,11 @@
"path":"personal/studentAppointmentList" //学生约课列表 "path":"personal/studentAppointmentList" //学生约课列表
},{ },{
"path":"personal/studentAppointmentInfo" //学生约课详情 "path":"personal/studentAppointmentInfo" //学生约课详情
} },{
"path": "appointmentList"//约课列表
},{
"path": "confirmAppointment"//预约课程
}
] ]
}, },
//抖音商品短视频 //抖音商品短视频
......
This diff is collapsed.
<template>
<view class="appointmentList">
<u-empty v-if="g.length == 0" text="暂无相关数据" mode="list"></u-empty>
<view class="listbox" v-if="g.length > 0" v-for="(x, i) in g" :key="i" >
<div class="title">
{{x.StudentNumTypeStr}}
</div>
<view class="itemlist">
<view class="items" v-for="(item, index) in x.ClassList" :key="index" @click="goappointment(item)">
<div >{{item.ClassName}}<text>{{item.IsFree==1?'(免)':''}}</text></div>
<div style="font-size: 12px;color: #999999;margin-top: 10px;">{{item.Title}}</div>
<image :src="item.ClassPic" style="width: 63%;height: 53%;position: absolute;right: 0;bottom: 0;border-bottom-right-radius: 6px;" mode="aspectFill"></image>
</view>
</view>
</view>
<view style="width: 100%;height: 100px;"></view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<tabbars></tabbars>
</view>
</template>
<script>
import tabbars from '@/components/tabbar/index';
import auth from '@/components/auth/index.vue';
export default{
components: {
tabbars,
auth
},
data(){
return{
pageTitle:'约课1',
mainColor: '',
secondary: '',
showAuth: false,
u:{},
g:[],
}
},
onLoad() {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}else{
this.getPointCourseClassList()
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
methods:{
getPointCourseClassList(){
this.request2({
url: '/api/AppletPoint/GetPointCourseClassList',
data: {}
},
res => {
this.g = res.data
}
);
},
reloadUserinfo() {
this.getPointCourseClassList();
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
},
goappointment(item){
uni.navigateTo({
url: '/pages/appointment/appointment?CourseClassId='+item.ID
});
}
}
}
</script>
<style>
.appointmentList{
width: 100%;
height: 100vh;
background: #FFF;
}
.appointmentList .listbox{
}
.appointmentList .title{
font-size: 17px;
color: #1B1D1E;
padding: 0px 15px 10px;
}
.appointmentList .itemlist{
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.appointmentList .items{
width: 44%;
height: 210px;
box-shadow:0 0px 10px 6px #F2F2F2;
margin-left: 4%;
margin-bottom: 15px;
border-radius: 6px;
padding: 15px;
position: relative;
font-size: 14px;
color: #1B1D1E;
}
</style>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
type: Array, /// 打点日期列表 type: Array, /// 打点日期列表
default() { default() {
return [ return [
{date: '2021-01-27',} {date: '',}
] ]
} }
}, },
......
<template>
<view class="confirmAppointment">
<view class="box">
<view class="box-top">
<text style=""></text>
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
mainColor: '',
secondary: '',
}
},
onLoad(options) {
console.log(options,'options')
this.getPointCourseDetail(options.CourseId)
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
uni.setNavigationBarTitle({
title: '预约确定'
});
},
methods:{
getPointCourseDetail(id){
this.request2({
url: '/api/AppletPoint/GetPointCourseDetail',
data: {CourseId:id}
},
res => {
this.data = res.data
}
);
}
}
}
</script>
<style>
.confirmAppointment{
width: 100%;
height: 100vh;
background: #F3F5F7;
padding-bottom: 100px;
position: relative;
}
.confirmAppointment .box{
padding:0 15px;
}
.box-top{
background: #FFFFFF;
border-radius: 9px;
padding: 15px;
}
</style>
...@@ -3,13 +3,58 @@ ...@@ -3,13 +3,58 @@
<view class="balancetop"> <view class="balancetop">
<view class="topbox"> <view class="topbox">
<span style='font-size: 12px;color: #1B1D1E;'>账户余额(点数)</span> <span style='font-size: 12px;color: #1B1D1E;'>账户余额(点数)</span>
<span style='font-size: 25px;color: #111111;'>2000</span> <span style='font-size: 25px;color: #111111;'>{{PointNum}}</span>
<view class="recharge" v-if="IsShowRecharge == 1" @click="gopointRecharge"> <view class="recharge" v-if="IsShowRecharge == 1" @click="gopointRecharge">
充值 充值
</view> </view>
</view> </view>
</view> </view>
<u-tabs
:list="list"
:is-scroll="false"
:current="current"
@change="change"
:active-color="mainColor"
></u-tabs>
<u-empty v-if="g.length == 0" text="暂无相关记录" mode="list"></u-empty>
<view
v-if="g.length > 0"
style="
height: calc(100vh - 205px);
width: calc(100vw);
overflow: hidden;
padding-bottom: 10px;
"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<view class="DetailList">
<view class="item" v-for="(x, i) in g" :key="i" >
<view style="flex: 1;width: 1px;">
<text>{{x.Description}}</text>
<text style="font-size: 11px;color: #999999;margin-top: 10px;">{{x.CreateDate}}</text>
</view>
<view style="width: 200px;text-align: right;">
{{x.Type==1?'+'+x.PonitNum:'-'+x.PonitNum}}
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view> </view>
</template> </template>
...@@ -25,7 +70,28 @@ ...@@ -25,7 +70,28 @@
mainColor: '', mainColor: '',
secondary: '', secondary: '',
IsShowRecharge:1, IsShowRecharge:1,
showAuth:false,
u:{}, u:{},
list: [
{ name: "消费记录" },
{ name: "充值记录" },
],
current:0,
msg:{
pageIndex:1,
pageSize:15,
Type:0
},
g:[],
PointNum:0,
page_count: 1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
} }
}, },
onLoad() { onLoad() {
...@@ -37,7 +103,7 @@ ...@@ -37,7 +103,7 @@
}; };
this.showAuth = true; this.showAuth = true;
}else{ }else{
this.getData() this.init()
} }
}, },
created() { created() {
...@@ -50,8 +116,34 @@ ...@@ -50,8 +116,34 @@
}, },
methods:{ methods:{
getData(){ init(){
this.request2({
url: '/api/AppletPoint/GetAppletUserPointDetailPageList',
data: this.msg
},
res => {
this.PointNum = res.data.pageData.PointNum
this.g= res.data.pageData.List
}
);
},
change(index) {
this.current = index
this.msg.Type = index+1;
this.msg.pageIndex = 1;
this.g = [];
this.init();
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
}, },
gopointRecharge(){ gopointRecharge(){
uni.navigateTo({ uni.navigateTo({
...@@ -61,7 +153,7 @@ ...@@ -61,7 +153,7 @@
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.getData() this.init()
}, },
goback(){ goback(){
uni.navigateBack() uni.navigateBack()
...@@ -88,7 +180,7 @@ ...@@ -88,7 +180,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 10px 0 ; padding: 10px 0 ;
box-shadow:0 2px 10px 5px #F2F2F2; box-shadow:0 0px 10px 6px #F2F2F2;
} }
.pointBalance .recharge{ .pointBalance .recharge{
width: 100px; width: 100px;
...@@ -102,4 +194,16 @@ ...@@ -102,4 +194,16 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.pointBalance .DetailList{
}
.pointBalance .item{
padding: 15px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 14px;
color: #111111;
}
</style> </style>
<template> <template>
<view class="pointRecharge"> <view class="pointRecharge">
<view class="recharge-top"> <view class="recharge-top">
<u-avatar :src="mall_UserInfo.Photo" size="140" ></u-avatar> <u-avatar :src="mall_UserInfo.Photo" size="80" ></u-avatar>
<view class="recharge-top-r"> <view class="recharge-top-r">
<text class="chaochu1">{{mall_UserInfo.Name}}</text> <text class="chaochu1">{{mall_UserInfo.Name}}</text>
<text class="chaochu1" style='font-size: 11px;color: #666666;'>1456</text> <text class="chaochu1" style='font-size: 11px;color: #666666;'>{{Point}}</text>
</view> </view>
</view> </view>
<view class="recharge-c"> <view class="recharge-c">
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
}, },
show:false, show:false,
content:'', content:'',
orderInfo:{},
Point:0,
} }
}, },
onLoad() { onLoad() {
...@@ -48,6 +50,7 @@ ...@@ -48,6 +50,7 @@
}); });
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo"):{}; this.mall_UserInfo = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo"):{};
this.getPointGoodsList() this.getPointGoodsList()
this.getdianshu()
}, },
methods:{ methods:{
getPointGoodsList(){ getPointGoodsList(){
...@@ -60,6 +63,16 @@ ...@@ -60,6 +63,16 @@
} }
); );
}, },
getdianshu(){
this.request2({
url: '/api/AppletPoint/GetAppletUserPointDetailPageList',
data: {pageIndex:1,pageSize:15,Type:0}
},
res => {
this.Point = res.data.pageData.PointNum
}
);
},
btnRecharge(item){//点击充值 btnRecharge(item){//点击充值
this.show= true; this.show= true;
this.content= '确定花费'+item.SellingPrice+'充值点数'+item.PonitNum+'吗?' this.content= '确定花费'+item.SellingPrice+'充值点数'+item.PonitNum+'吗?'
...@@ -72,9 +85,37 @@ ...@@ -72,9 +85,37 @@
data: this.RechargeMsg data: this.RechargeMsg
}, },
res => { res => {
this.orderInfo = JSON.parse(res.data);
this.Pay()
} }
); );
},
Pay(){
let that=this;
let orderInfo = this.orderInfo;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp,
nonceStr: this.orderInfo.nonceStr,
package: this.orderInfo.package,
signType: this.orderInfo.signType,
paySign: this.orderInfo.sign,
success: function(res) {
console.log('success', res);
uni.showToast({
title: "支付成功"
})
that.getdianshu()
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
})
}
});
} }
} }
} }
......
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