Commit d5483ea6 authored by Mac's avatar Mac

1

parent 888a3173
...@@ -511,6 +511,10 @@ ...@@ -511,6 +511,10 @@
"path":"personal/studentAppointmentList" //学生约课列表 "path":"personal/studentAppointmentList" //学生约课列表
},{ },{
"path":"personal/studentAppointmentInfo" //学生约课详情 "path":"personal/studentAppointmentInfo" //学生约课详情
},{
"path": "appointmentList"//约课列表
},{
"path": "confirmAppointment"//预约课程
} }
] ]
}, },
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
} }
.appointment .item-top{ .appointment .item-top{
width: 100%; width: 100%;
padding: 15px; padding: 15px 0;
border-bottom: 1px solid #E2E2E2; border-bottom: 1px solid #E2E2E2;
} }
.appointment .item-top-o{ .appointment .item-top-o{
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 15px; font-size: 11px;
color: #1B1D1E; color: #1B1D1E;
} }
.appointment .item-top-o-r{ .appointment .item-top-o-r{
...@@ -96,11 +96,11 @@ ...@@ -96,11 +96,11 @@
.appointment .item-b{ .appointment .item-b{
width: 100%; width: 100%;
height: 55px; height: 55px;
padding: 15px; padding: 15px 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: space-between;
} }
.appointment .yuyue{ .appointment .yuyue{
width: 69px; width: 69px;
...@@ -131,57 +131,75 @@ ...@@ -131,57 +131,75 @@
<view style="display: flex;flex-direction: row;align-items: center;"> <view style="display: flex;flex-direction: row;align-items: center;">
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
</view> </view>
<u-icon name="success" :color="mainColor" size="30" v-if='item.ID==msg.OrderBy && current==1'></u-icon> <u-icon name="success" :color="mainColor" size="30" v-if='item.ID==msg.CourseClassId && current==1'></u-icon>
<u-icon name="success" :color="mainColor" size="30" v-if='item.ID==msg.CarBrandId && current==2'></u-icon> <u-icon name="success" :color="mainColor" size="30" v-if='item.ID==msg.TeacherId && current==2'></u-icon>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<!-- 预约的列表 --> <!-- 预约的列表 -->
<view class="subscribeList" style="height: calc(100vh - 190px);width: calc(100vw);overflow: auto;">
<view class="subscribeList" style="height: calc(100vh - 190px);width: calc(100vw);overflow: auto;" >
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scroll='getscroll'> <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scroll='getscroll'>
<view style="padding: 0 15px;" @touchstart="getscroll"> <u-empty v-if="subscribeList.length == 0" text="暂无相关数据" mode="list" ></u-empty>
<view style="padding: 0 15px;" @touchstart="getscroll" v-if="subscribeList.length>0">
<view class="subscribe-item" v-for="(item,index) in subscribeList" :key='index' :style="{'margin-bottom':subscribeList.length==index+1?'20px':'0'}"> <view class="subscribe-item" v-for="(item,index) in subscribeList" :key='index' :style="{'margin-bottom':subscribeList.length==index+1?'20px':'0'}">
<view class="item-top"> <view class="item-top">
<view class="item-top-o"> <view class="item-top-o">
<text>{{item.time}}</text> <text>{{item.StudyStartDate}}-{{item.StudyEndDate}}可预约</text>
<view class="item-top-o-r" :style="{'background':mainColor}"> <view class="item-top-o-r" :style="{'background':mainColor}">
{{item.CourseClassName}} {{item.ClassName}}
<view class="item-top-san"></view> <view class="item-top-san"></view>
</view> </view>
</view> </view>
<view class="item-top-t"> <view class="item-top-t">
<u-avatar :src="item.photo" size='80' mode="circle"></u-avatar> <u-avatar :src="item.TeacherLogo" size='80' mode="circle"></u-avatar>
<view class="item-top-t-r"> <view class="item-top-t-r">
<view class="chaochu1" style="font-weight: bold;">{{item.kecheng}}</view> <view class="chaochu1" style="font-weight: bold;">{{item.CourseName}}</view>
<view class="chaochu1" style="font-size: 12px;color: #666666;">{{item.teacher}}</view> <view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<view style="font-size: 12px;color: #666666;">{{item.TeacherName}}</view>
<view style="display: flex;flex-direction: row;align-items: flex-end;color: #DD0000;">
<text style='font-size: 16px;'>
{{item.PointNum}}
</text>
<text style='font-size: 12px;'>
</text>
</view> </view>
</view> </view>
</view> </view>
<view class="item-b">
<view class="yuyue">预约</view>
<view class="yuyue" style="background: #FFFFFF;color: #40766E;border: 1px solid #40766E;">取消预约</view>
<view class="yuyue">去上课</view>
</view> </view>
</view> </view>
<view class="item-b">
<view style="font-size: 11px;color: #1B1D1E;">
课时时长{{item.StudyDuration}}{{item.DurationUnitName}}(至少约课{{item.MinDuration}}{{item.DurationUnitName}})
</view> </view>
<view class="yuyue" v-if="item.IsHaveCourse==0" @click="goconfirm(item)">预约</view>
<view class="yuyue" style="background: #FFFFFF;color: #40766E;border: 1px solid #40766E;" v-if="item.IsHaveCourse>0">已预约</view>
<view style="width: 100%;height: 100%;background: #000000;opacity: 0.4;position: absolute;left: 0;top: 0;" v-if="screenshow==true" @touchstart="screenshow=false" ></view> </view>
</view>
</view>
</scroll-view> </scroll-view>
<view style="width: 100%;height: 100%;background: #000000;opacity: 0.4;position: absolute;left: 0;top: 0;" v-if="screenshow==true" @touchstart="screenshow=false" ></view>
</view> </view>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view> </view>
</template> </template>
<script> <script>
import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue' import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue'
import auth from '@/components/auth/index.vue';
import {gegerateDates, dateEqual,formatDate} from './components/zzx-calendar/generateDates.js';
export default{ export default{
components:{ components:{
zzxCalendar, zzxCalendar,
auth
}, },
data(){ data(){
...@@ -189,6 +207,7 @@ import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue' ...@@ -189,6 +207,7 @@ import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue'
pageTitle:'约课', pageTitle:'约课',
mainColor: "", mainColor: "",
secondary: '', secondary: '',
showAuth:false,
list: [{ list: [{
name: '综合排序' name: '综合排序'
}, { }, {
...@@ -199,60 +218,95 @@ import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue' ...@@ -199,60 +218,95 @@ import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue'
current: 0, current: 0,
screenshow:false, screenshow:false,
screenList:[], screenList:[],
contents:[ contents:[],
{'ID': 0, Name: '体验课'},
{'ID': 1, Name: '一对一'},
],
contents2:[ contents2:[
{'ID': 0, Name: '李老师'}, {'ID': 0, Name: '李老师'},
{'ID': 1, Name: '林老师'}, {'ID': 1, Name: '林老师'},
], ],
subscribeList:[ subscribeList:[],
{kecheng:'日语年月日正确表达',teacher:'张小碗儿',CourseClassName:'一对一',time:'20:30',photo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1609315660000_6.png'}, weekMode:true,
{kecheng:'日语年月日正确表2达',teacher:'小林子',CourseClassName:'体验课',time:'20:30',photo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1609315660000_6.png'}, msg:{
{kecheng:'日语年月日正确表2达',teacher:'小林子',CourseClassName:'体验课',time:'20:30',photo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1609315660000_6.png'}, SelectStartTime:'',
{kecheng:'日语年月日正确表2达',teacher:'小林子',CourseClassName:'体验课',time:'20:30',photo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1609315660000_6.png'}, SelectEndTime:'',
{kecheng:'日语年月日正确表2达',teacher:'小林子',CourseClassName:'体验课',time:'20:30',photo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1609315660000_6.png'}, CourseClassId:0,
{kecheng:'日语年月日正确表2达',teacher:'小林子',CourseClassName:'体验课',time:'20:30',photo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1609315660000_6.png'}, TeacherId:0,
{kecheng:'厉害',teacher:'小林子',CourseClassName:'体验课',time:'20:30',photo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1609315660000_6.png'}, }
],
weekMode:true
} }
}, },
onLoad() { onLoad(options) {
console.log(options,'options')
if(options && options.CourseClassId){
this.msg.CourseClassId = options.CourseClassId
this.current=1
}
this.msg.SelectStartTime = formatDate(new Date(), 'yyyy-MM-dd'),
this.msg.SelectEndTime = formatDate(new Date(), 'yyyy-MM-dd'),
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}else{
this.getPointCourseClassList()
this.getTeacherList()
this.init()
}
},
created() {
}, },
methods:{ methods:{
datechange(e){ datechange(e){
console.log(e) console.log(e)
this.msg.SelectStartTime = e.fullDate;
this.msg.SelectEndTime = e.fullDate;
this.init()
}, },
getweekMode(e){ getweekMode(e){
this.weekMode = e this.weekMode = e
}, },
getscroll: function() {//一直在调用 空了处理 getscroll: function() {
let that = this let that = this
if(that.weekMode == false){ if(that.weekMode == false){
that.$refs.zzx.changeMode() that.$refs.zzx.changeMode()
that.weekMode=true that.weekMode=true
} }
}, },
onItemSelect(){ onItemSelect(item){
this.screenshow = false; this.screenshow = false;
if(this.current==1){
this.msg.CourseClassId = item.ID;
this.list[this.current].name = item.Name
}else if(this.current==2){
this.msg.TeacherId = item.ID
this.list[this.current].name = item.Name
}
this.init()
}, },
change(val){ change(val){
if (val == 0) { if (val == 0) {
this.screenshow = false this.screenshow = false
this.list= [{
name: '综合排序'
}, {
name: '课程'
},{
name: '老师'
}]
this.msg.CourseClassId=0;
this.msg.TeacherId = 0;
} else if(val == 1){ } else if(val == 1){
if (val == this.current && this.screenshow == true) { if (val == this.current && this.screenshow == true) {
this.screenshow = false this.screenshow = false
...@@ -271,6 +325,65 @@ import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue' ...@@ -271,6 +325,65 @@ import zzxCalendar from './components/zzx-calendar/zzx-calendar.vue'
} }
this.current = val this.current = val
this.init()
},
getPointCourseClassList(){
this.request2({
url: '/api/AppletPoint/GetPointCourseClassList',
data: {}
},
res => {
this.contents=[]
res.data.forEach(x=>{
x.ClassList.forEach(j=>{
let obj = {
Name:j.ClassName,
ID:j.ID
}
if(j.ID==this.msg.CourseClassId){ //如果和列表的某个相等 把名字赋值给tabs
this.list[1].name =j.ClassName
}
this.contents.push(obj)
})
})
}
);
},
getTeacherList(){
this.request2({
url: '/api/AppletSchool/GetTeacherList',
data: {}
},
res => {
this.contents2=res.data
}
);
},
init(){
this.request2({
url: '/api/AppletPoint/GetTeacherCourseList',
data: this.msg
},
res => {
this.subscribeList = res.data[0].PlanList
}
);
},
reloadUserinfo() {
this.userinfo();
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
},
goconfirm(item){
uni.navigateTo({
url: '/pages/appointment/confirmAppointment?CourseId='+item.ID
});
} }
} }
} }
......
<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