Commit e0543f3f authored by 不吃草的咩's avatar 不吃草的咩

订单接口

parent 3ac18b99
...@@ -7,6 +7,7 @@ App({ ...@@ -7,6 +7,7 @@ App({
information:{}, information:{},
phone:'', phone:'',
orderDetail:{}, orderDetail:{},
courseId:'',
onLaunch() { onLaunch() {
//console.log(colorUISdk.isRandom.getRandom(6)) //console.log(colorUISdk.isRandom.getRandom(6))
//console.log(colorUISdk.version) //console.log(colorUISdk.version)
......
{ {
"pages": [ "pages": [
"pages/order/order",
"pages/home/home", "pages/home/home",
"pages/order/order",
"pages/my/home", "pages/my/home",
"pages/demo/background/background", "pages/demo/background/background",
"pages/demo/avatar/avatar", "pages/demo/avatar/avatar",
...@@ -136,7 +137,10 @@ ...@@ -136,7 +137,10 @@
"van-notice-bar": "/vantPackage/notice-bar/index", "van-notice-bar": "/vantPackage/notice-bar/index",
"van-card": "/vantPackage/card/index", "van-card": "/vantPackage/card/index",
"van-sticky": "/vantPackage/sticky/index", "van-sticky": "/vantPackage/sticky/index",
"van-search": "/vantPackage/search/index" "van-search": "/vantPackage/search/index",
"van-tab": "/vantPackage/tab/index",
"van-tabs": "/vantPackage/tabs/index",
"van-empty": "/vantPackage/empty/index"
}, },
"tabBar": { "tabBar": {
"color": "#aaaaaa", "color": "#aaaaaa",
......
...@@ -14,7 +14,7 @@ export const colorUISdk = new ColorUISdk({ ...@@ -14,7 +14,7 @@ export const colorUISdk = new ColorUISdk({
dev: { dev: {
// url: 'http://101.42.222.235:8050/' // url: 'http://101.42.222.235:8050/'
// url:'http://jbzhang.censoft.com.cn/' // url:'http://jbzhang.censoft.com.cn/'
url: 'http://192.168.14.79:8010/' url: 'http://jjliu.censoft.com.cn/'
}, },
//本地环境 //本地环境
host: { host: {
......
...@@ -14,6 +14,10 @@ Component({ ...@@ -14,6 +14,10 @@ Component({
navurl:{ navurl:{
type:String, type:String,
value:'' value:''
},
tabBg:{
type:String,
value:''
} }
}, },
lifetimes: { lifetimes: {
...@@ -27,8 +31,20 @@ Component({ ...@@ -27,8 +31,20 @@ Component({
methods:{ methods:{
//随机生成库内颜色名&&拼接路由 //随机生成库内颜色名&&拼接路由
getColor() { getColor() {
// console.log(this.data.tabBg);
if(this.data.tabBg == "QYJS"){
//cyan olive
let colorArr = ['yellow', 'orange', 'red', 'pink', 'mauve', 'purple', 'blue', 'cyan', 'green', 'olive', 'grey', 'brown']; let colorArr = ['yellow', 'orange', 'red', 'pink', 'mauve', 'purple', 'blue', 'cyan', 'green', 'olive', 'grey', 'brown'];
return colorArr[Math.floor(Math.random() * colorArr.length)] console.log(colorArr[Math.floor(Math.random() * colorArr.length)]);
// return colorArr[Math.floor(Math.random() * colorArr.length)]
return "cyan";
}else{
// let colorArr = ['yellow', 'orange', 'red', 'pink', 'mauve', 'purple', 'blue', 'cyan', 'green', 'olive', 'grey', 'brown'];
// console.log(colorArr[Math.floor(Math.random() * colorArr.length)]);
// return colorArr[Math.floor(Math.random() * colorArr.length)]
return "blue";
}
}, },
// getNavUrl(){ // getNavUrl(){
// let params = '' // let params = ''
......
...@@ -11,7 +11,8 @@ Page({ ...@@ -11,7 +11,8 @@ Page({
id:'', id:'',
name:'', name:'',
note:'', note:'',
price:'' price:'',
showPrice:0,
} }
}, },
onClickLeft(){ onClickLeft(){
...@@ -40,12 +41,14 @@ Page({ ...@@ -40,12 +41,14 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options); console.log(options);
const {name,note,price,id} = options; let {name,note,price,id} = options;
let showPrice = (parseInt(price * 100) ) / 10000;
this.setData({ this.setData({
["course.name"]:name == 'null' ? '' : name, ["course.name"]:name == 'null' ? '' : name,
["course.note"]:note == 'null' ? '暂无介绍' : note, ["course.note"]:note == 'null' ? '暂无介绍' : note,
["course.price"]:price == 'null' ? '' : price, ["course.price"]:price == 'null' ? '' : price,
["course.id"]:id ["course.id"]:id,
["course.showPrice"]:showPrice
}) })
}, },
......
...@@ -12,12 +12,13 @@ ...@@ -12,12 +12,13 @@
/> />
</view> </view>
</ui-navbar> </ui-navbar>
<ui-title title="课程介绍" depth="2" isIcon ui="ml-3"/>
<view class="box"> <view class="box">
<van-cell-group> <van-cell-group>
<van-cell title="课程名称" value="{{course.name}}" /> <van-cell title="课程名称" value="{{course.name}}" />
<van-cell title="课程简介" value="{{course.note}}" /> <van-cell title="课程简介" value="{{course.note}}" />
<van-cell title="课程价格"> <van-cell title="课程价格">
<view><text>¥</text><text class="price">{{course.price}}</text></view> <view><text>¥</text><text class="price">{{course.showPrice}}元</text></view>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
<view class="btn"> <view class="btn">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
} }
.box{ .box{
width: 100%; width: 100%;
margin-top: 20rpx; margin-top: 10rpx;
background-color: #ffffff; background-color: #ffffff;
} }
.price{ .price{
...@@ -13,3 +13,6 @@ ...@@ -13,3 +13,6 @@
width: 96%; width: 96%;
margin: 30rpx auto 0; margin: 30rpx auto 0;
} }
.ml-3{
margin: 10rpx 0 10rpx;
}
\ No newline at end of file
...@@ -7,12 +7,7 @@ Page({ ...@@ -7,12 +7,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
course:{ course:{}
id:'',
name:'',
note:'',
price:''
}
}, },
onClickLeft(){ onClickLeft(){
wx.navigateBack({ wx.navigateBack({
...@@ -30,9 +25,7 @@ Page({ ...@@ -30,9 +25,7 @@ Page({
*/ */
onReady: function () { onReady: function () {
this.setData({ this.setData({
["course.name"]:app.orderDetail.name, course:app.orderDetail
["course.note"]:app.orderDetail.mack,
["course.price"]:app.orderDetail.price
}) })
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<ui-navbar isSlot> <ui-navbar isSlot>
<view style="width: 100%;height: 100%;"> <view style="width: 100%;height: 100%;">
<van-nav-bar <van-nav-bar
title="课程介绍" title="订单详情"
left-text="返回" left-text="返回"
left-arrow left-arrow
border="{{false}}" border="{{false}}"
...@@ -14,11 +14,15 @@ ...@@ -14,11 +14,15 @@
</ui-navbar> </ui-navbar>
<view class="box"> <view class="box">
<van-cell-group> <van-cell-group>
<van-cell title="课程名称" value="{{course.name}}" /> <van-cell title="姓名" value="{{course.name}}" />
<van-cell title="课程简介" value="{{course.note}}" /> <van-cell title="课程名称" value="{{course.courseName}}" />
<van-cell title="作业类别" value="{{course.jobCategory}}" />
<van-cell title="资格类型" value="{{course.qualificationsType}}" />
<van-cell title="培训类型" value="{{course.trainType}}" />
<van-cell title="课程价格"> <van-cell title="课程价格">
<view><text>¥</text><text class="price">{{course.price}}</text></view> <view><text>¥</text><text class="price">{{course.payerTotal}}元</text></view>
</van-cell> </van-cell>
<van-cell title="交易日期" value="{{course.successTime}}" />
</van-cell-group> </van-cell-group>
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
......
...@@ -3,12 +3,16 @@ ...@@ -3,12 +3,16 @@
<text slot="center">{{jgTitle}}</text> <text slot="center">{{jgTitle}}</text>
</ui-navbar> </ui-navbar>
<view class="box"> <view class="box">
<view class="im">
<image style="width: 200rpx; height: 200rpx;" mode="aspectFit" src="../../../static/logo.jpg"></image>
</view>
<view class="title"><text>中国通信企业协会介绍</text></view> <view class="title"><text>中国通信企业协会介绍</text></view>
<view class="detail"><text>公司简介</text></view> <ui-title title="公司简介" depth="2" isIcon ui="ml-3"/>
<view class="wen"><text> 中国通信企业协会是经民政部核准注册登记,由信息通信行业基础运营、信息服务、设备制造、工程建设、网络运维、网络安全等通信产业相关的企业、事业单位和个人自愿组成的全国性、行业性、非营利的社团组织。成立于1990年12月,原名中国邮电企业管理协会,2001年5月更名为中国通信企业协会(简称中国通信企协)。中国通信企业协会理事会由全国有关通信部门的领导、企业家、专家和学者组成,现有副会长21名,常务理事71名,理事228名。 <view class="wen"><text> 中国通信企业协会是经民政部核准注册登记,由信息通信行业基础运营、信息服务、设备制造、工程建设、网络运维、网络安全等通信产业相关的企业、事业单位和个人自愿组成的全国性、行业性、非营利的社团组织。成立于1990年12月,原名中国邮电企业管理协会,2001年5月更名为中国通信企业协会(简称中国通信企协)。中国通信企业协会理事会由全国有关通信部门的领导、企业家、专家和学者组成,现有副会长21名,常务理事71名,理事228名。
  协会团体会员单位1100余家。会员单位中,基础运营企业约占17%,设备制造企业约占3%,通信工程建设企业约占15%,通信网络运维企业约占30%,增值服务企业约占13%,虚拟运营企业约占4%,网络安全企业约占9%,光电缆企业约占5%,其他约占4%。   协会团体会员单位1100余家。会员单位中,基础运营企业约占17%,设备制造企业约占3%,通信工程建设企业约占15%,通信网络运维企业约占30%,增值服务企业约占13%,虚拟运营企业约占4%,网络安全企业约占9%,光电缆企业约占5%,其他约占4%。
</text></view> </text></view>
<view class="detail"><text>业务范围</text></view> <ui-title title="业务范围" depth="2" isIcon ui="ml-3"/>
<view class="wen"><text> 中国通信企业协会部分职能,根据国家有关通信和信息化发展的政策和要求,结合通信发展实际,研究分析通信相关行业发展状况和趋势,总结和探索通信行业经营、管理、改革、服务和发展的新经验、新思路、新途径,为政府主管部门和企业提供建议和参考。 <view class="wen"><text> 中国通信企业协会部分职能,根据国家有关通信和信息化发展的政策和要求,结合通信发展实际,研究分析通信相关行业发展状况和趋势,总结和探索通信行业经营、管理、改革、服务和发展的新经验、新思路、新途径,为政府主管部门和企业提供建议和参考。
  研究制订通信行业团体标准等相关行业标准,并组织宣贯,经政府部门批准或委托,积极稳妥地开展相关领域能力水平评定。   研究制订通信行业团体标准等相关行业标准,并组织宣贯,经政府部门批准或委托,积极稳妥地开展相关领域能力水平评定。
通信行业、企业咨询服务。承接企业委托课题研究,以及调查、评估、管理咨询;举办通信发展论坛、研讨会,组织对通信业发展的研究分析;为企业提供通信质量、先进技术型企业评估、知识产权运用标杆、中国驰名商标等相关咨询服务。 通信行业、企业咨询服务。承接企业委托课题研究,以及调查、评估、管理咨询;举办通信发展论坛、研讨会,组织对通信业发展的研究分析;为企业提供通信质量、先进技术型企业评估、知识产权运用标杆、中国驰名商标等相关咨询服务。
......
/* pages/qyDetail/qyDetail.wxss */ /* pages/qyDetail/qyDetail.wxss */
.box{ .box{
width: 98%; width: 98%;
margin: 0 auto; margin: 30rpx auto 0;
background-color: #ffffff; background-color: #ffffff;
box-sizing: border-box; box-sizing: border-box;
padding: 10rpx; padding: 10rpx;
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
} }
.box .title text{ .box .title text{
font-size: 32rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
/* color: ; */ /* color: ; */
} }
...@@ -35,3 +35,10 @@ ...@@ -35,3 +35,10 @@
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx 0; padding: 16rpx 0;
} }
.im{
width: 100%;
text-align: center;
}
.ml-3{
margin:20rpx 0 20rpx !important;
}
\ No newline at end of file
...@@ -203,19 +203,22 @@ Page({ ...@@ -203,19 +203,22 @@ Page({
// if(options.price == null || options.price == undefined){ // if(options.price == null || options.price == undefined){
// price = // price =
// } // }
let phone = app.phone == '' ? wx.getStorageSync('phone') : app.phone app.courseId = options.id;
let phone = app.phone == '' ? wx.getStorageSync('phone') : app.phone;
let price = (parseInt(options.price) * 100) / 10000;
let id = app.courseId
this.setData({ this.setData({
["fromDate.price"]:options.price, ["fromDate.price"]:price,
phone:phone, phone:phone,
["fromDate.phone"]:phone, ["fromDate.phone"]:phone,
["fromDate.id"]:options.id ["fromDate.id"]:id
}); });
//获取课程类型,动态生成列表 //获取课程类型,动态生成列表
app.colorUISdk.request({ app.colorUISdk.request({
url:'dictionary/listByPar2', url:'dictionary/listByPar2',
method: 'GET', method: 'GET',
data: { data: {
courseId:options.id courseId:id
} }
}).then(res=> { }).then(res=> {
console.log(res); console.log(res);
......
...@@ -39,21 +39,21 @@ ...@@ -39,21 +39,21 @@
<view class="box"> <view class="box">
<van-cell-group> <van-cell-group>
<van-cell center> <van-cell center>
<view slot="title" class="txt"><text class="req">* </text><text>姓名</text></view> <view slot="title" class="txt"><text>姓名</text> <text class="req"> *</text></view>
<van-field model:value="{{username}}" placeholder-style="place" custom-style="placeholder" placeholder="请输入用户名" input-align="right" border="{{ false }}" /> <van-field model:value="{{username}}" placeholder-style="place" custom-style="placeholder" placeholder="请输入用户名" input-align="right" border="{{ false }}" />
</van-cell> </van-cell>
<van-cell center value="{{popup.genderText}}" bind:click="onDisplay" value-class="placeholder"> <van-cell center value="{{popup.genderText}}" bind:click="onDisplay" value-class="placeholder">
<view slot="title" class="txt"><text class="req">* </text><text>性别</text></view> <view slot="title" class="txt"><text>性别</text> <text class="req"> *</text></view>
</van-cell> </van-cell>
<van-cell center> <van-cell center>
<view slot="title" class="txt"><text class="req">* </text><text>身份证号</text></view> <view slot="title" class="txt"><text>身份证号</text> <text class="req"> * </text></view>
<van-field model:value="{{ card }}" placeholder="请输入您的身份证号" input-align="right" border="{{ false }}" /> <van-field model:value="{{ card }}" placeholder="请输入您的身份证号" input-align="right" border="{{ false }}" />
</van-cell> </van-cell>
<van-cell center value="{{popup.studyText}}" bind:click="onDisplayStudy" value-class="placeholder"> <van-cell center value="{{popup.studyText}}" bind:click="onDisplayStudy" value-class="placeholder">
<view slot="title" class="txt"><text>文化程度</text></view> <view slot="title" class="txt"><text>文化程度</text></view>
</van-cell> </van-cell>
<van-cell center> <van-cell center>
<view slot="title" class="txt"><text class="req">* </text><text>手机号</text></view> <view slot="title" class="txt"><text>手机号</text> <text class="req"> *</text></view>
<van-field model:value="{{ phone }}" placeholder="请输入您的手机号" input-align="right" border="{{ false }}" /> <van-field model:value="{{ phone }}" placeholder="请输入您的手机号" input-align="right" border="{{ false }}" />
</van-cell> </van-cell>
<van-cell center> <van-cell center>
...@@ -65,16 +65,16 @@ ...@@ -65,16 +65,16 @@
<view class="box"> <view class="box">
<van-cell-group> <van-cell-group>
<van-cell center value="{{popup.homeworkText}}" bind:click="onDisplayHomework" value-class="placeholder"> <van-cell center value="{{popup.homeworkText}}" bind:click="onDisplayHomework" value-class="placeholder">
<view slot="title" class="txt"><text class="req">* </text><text>作业类别</text></view> <view slot="title" class="txt"><text>作业类别</text> <text class="req"> *</text></view>
</van-cell> </van-cell>
<van-cell center value="{{popup.zigeTypeText}}" bind:click="onDisplayZigeType" value-class="placeholder"> <van-cell center value="{{popup.zigeTypeText}}" bind:click="onDisplayZigeType" value-class="placeholder">
<view slot="title" class="txt"><text class="req">* </text><text>资格类型</text></view> <view slot="title" class="txt"><text>资格类型</text> <text class="req"> *</text></view>
</van-cell> </van-cell>
<van-cell center value="{{popup.peixunTypeText}}" bind:click="onDisplayPeixunType" value-class="placeholder"> <van-cell center value="{{popup.peixunTypeText}}" bind:click="onDisplayPeixunType" value-class="placeholder">
<view slot="title" class="txt"><text class="req">* </text><text>培训类型</text></view> <view slot="title" class="txt"><text>培训类型</text> <text class="req"> *</text></view>
</van-cell> </van-cell>
<van-cell center> <van-cell center>
<view slot="title" class="txt"><text>留言</text></view> <view slot="title" class="txt"><text>备注</text></view>
<van-field placeholder-style="placeholder" <van-field placeholder-style="placeholder"
model:value="{{ beizhu }}" model:value="{{ beizhu }}"
type="textarea" type="textarea"
......
...@@ -185,6 +185,9 @@ Page({ ...@@ -185,6 +185,9 @@ Page({
// }) // })
}, },
onShow:function(){ onShow:function(){
this.setData({
courseData:[]
})
app.colorUISdk.request({ app.colorUISdk.request({
url:'infocourse/list', url:'infocourse/list',
method: 'GET', method: 'GET',
......
...@@ -19,18 +19,18 @@ ...@@ -19,18 +19,18 @@
<view class="ui-container"> <view class="ui-container">
<van-notice-bar <!-- <van-notice-bar
left-icon="volume-o" left-icon="volume-o"
background="transparent" background="transparent"
color="#1989FA" color="#1989FA"
text="无论我们能活多久,我们能够享受的只有无法分割的此刻,此外别无其他。——shadowlover" text="无论我们能活多久,我们能够享受的只有无法分割的此刻,此外别无其他。——shadowlover"
/> /> -->
<block > <block >
<ui-title title="企业介绍" depth="2" isIcon ui="ml-3"/> <ui-title title="企业介绍" depth="2" isIcon ui="ml-3"/>
<view class="ui-grid ui-cols-2"> <view class="ui-grid ui-cols-2">
<block wx:for="{{jgDetail}}" wx:key="index"> <block wx:for="{{jgDetail}}" wx:key="index">
<view class="ui-item p-3"> <view class="ui-item p-3">
<app-nav-li data="{{item}}" navurl="/pages/document/qyDetail/qyDetail?type={{index}}"/> <app-nav-li data="{{item}}" tabBg="QYJS" navurl="/pages/document/qyDetail/qyDetail?type={{index}}"/>
</view> </view>
</block> </block>
<!-- <block > <!-- <block >
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<block wx:for="{{courseData}}" wx:for-index="id" wx:key="course_index"> <block wx:for="{{courseData}}" wx:for-index="id" wx:key="course_index">
<view class="ui-item p-3" > <view class="ui-item p-3" >
<app-nav-li data="{{item}}" navurl="/pages/document/coursedetails/coursedetails?price={{item.cost}}&name={{item.courseName}}&note={{item.remark}}&id={{item.id}}"/> <app-nav-li data="{{item}}" tabBg="KELB" navurl="/pages/document/coursedetails/coursedetails?price={{item.cost}}&name={{item.courseName}}&note={{item.remark}}&id={{item.id}}"/>
</view> </view>
</block> </block>
</view> </view>
......
// pages/order/order.js // pages/order/order.js
const app = getApp(); const app = getApp();
import Toast from '../../vantPackage/toast/toast';
Page({ Page({
/** /**
...@@ -7,24 +8,24 @@ Page({ ...@@ -7,24 +8,24 @@ Page({
*/ */
data: { data: {
value:'', value:'',
list:[ list:[],
{name:'5g小课堂',mack:'是的是的发的发生阿的说法',createTime:'2022-02-21'}, isEmpty:false
{name:'5g小课堂',mack:'是的是的发的发生阿的说法',createTime:'2022-02-21'},
{name:'5g小课堂',mack:'是的是的发的发生阿的说法',createTime:'2022-02-21'},
{name:'5g小课堂',mack:'是的是的发的发生阿的说法',createTime:'2022-02-21'},
{name:'5g小课堂',mack:'是的是的发的发生阿的说法',createTime:'2022-02-21'},
{name:'5g小课堂',mack:'是的是的发的发生阿的说法',createTime:'2022-02-21'},
]
}, },
onSearch(){}, onSearch(){},
onCancel(){}, onCancel(){},
orderDetail(e){ orderDetail(e){
console.log(e); // console.log(e);
app.orderDetail = e.target.dataset.item; app.orderDetail = e.target.dataset.item;
wx.navigateTo({ wx.navigateTo({
url: '/pages/document/orderdetail/orderdetail', url: '/pages/document/orderdetail/orderdetail',
}) })
}, },
// onClick(event) {
// wx.showToast({
// title: `点击标签 ${event.detail.name}`,
// icon: 'none',
// });
// },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -43,7 +44,47 @@ Page({ ...@@ -43,7 +44,47 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
let openid = wx.getStorageSync('openid');
if(openid == ''){
wx.showToast({
title: '您还未登录,即将跳转登录',
icon: 'none'
})
setTimeout(()=>{
wx.switchTab({
url: '/pages/home/home',
})
},2000)
}else{
app.colorUISdk.request({
url:`infostudentorder/infoOrderByOpenId?openId=${openid}`,
method: 'GET',
data: {}
}).then((res)=>{
if(res.code == 0){
if(res.infoStudentOrderEntity.length > 0){
//处理价格&&时间
let list = res.infoStudentOrderEntity.map((a)=>{
a.cost = parseInt(a.cost * 100) / 10000;
a.payerTotal = parseInt(a.payerTotal * 100) / 10000;
a.successTime = (a.successTime.split("+")[0]).replace(/T/ig," ");
return a;
});
this.setData({
list:list
});
}else{
this.setData({
isEmpty:true
})
}
}else{
Toast.fail('请求异常')
}
console.log(res);
})
}
}, },
/** /**
......
.list{ .list{
width: 98%; width: 98%;
margin: 6rpx auto 0; padding: 10rpx auto 0;
box-sizing: border-box;
background-color: #ffffff; background-color: #ffffff;
} }
.gao{
display: flex;
flex-wrap: nowrap;
flex-direction: column;
justify-content: space-between;
height: 100%;
text{
color:"#969799";
height: 18px;
font-size:12px;
line-height: 18px;
margin-top:3px;
}
}
.cell-index--van-cell__title{
min-width: 500rpx;
max-width: 500rpx;
}
.ml-3{
margin: 10rpx 0 10rpx;
}
\ No newline at end of file
...@@ -2,16 +2,30 @@ ...@@ -2,16 +2,30 @@
<ui-navbar isCenter> <ui-navbar isCenter>
<text slot="center">我的订单</text> <text slot="center">我的订单</text>
</ui-navbar> </ui-navbar>
<van-sticky offset-top="{{ 70 }}"> <ui-title title="订单列表" depth="2" isIcon ui="ml-3"/>
<!-- <van-sticky offset-top="{{ 70 }}">
<van-search value="{{ value }}" custom-class="search" placeholder="请输入搜索关键词" show-action bind:search="onSearch" bind:cancel="onCancel" /> <van-search value="{{ value }}" custom-class="search" placeholder="请输入搜索关键词" show-action bind:search="onSearch" bind:cancel="onCancel" />
</van-sticky> </van-sticky> -->
<view class="list"> <!-- <van-tabs bind:click="onClick" animated color="#1989fa">
<van-tab title="已支付">
</van-tab>
<van-tab title="未支付">
<text>sdfsfs4fs6f546</text>
</van-tab>
</van-tabs> -->
<view class="list">
<van-cell-group> <van-cell-group>
<van-cell title="{{item.name}}" label="订单日期:{{item.createTime}}" center wx:for="{{list}}" wx:key="index"> <van-cell title="{{item.courseName}}" label="订单日期:{{item.successTime}}" center wx:for="{{list}}" wx:key="index">
<view class="gao">
<van-button type="primary" size="small" bind:click="orderDetail" data-item="{{item}}">查看详情</van-button> <van-button type="primary" size="small" bind:click="orderDetail" data-item="{{item}}">查看详情</van-button>
<text>¥{{item.payerTotal}}元</text>
</view>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
<van-empty image="error" description="没有您的报名记录,请先去报名。" wx:if="{{isEmpty}}" />
</ui-sys> </ui-sys>
\ No newline at end of file
...@@ -19,7 +19,7 @@ Page({ ...@@ -19,7 +19,7 @@ Page({
}) })
setTimeout(()=>{ setTimeout(()=>{
wx.switchTab({ wx.switchTab({
url: '/pages/my/home', url: '/pages/home/home',
}) })
},2000); },2000);
}else{ }else{
...@@ -53,7 +53,7 @@ Page({ ...@@ -53,7 +53,7 @@ Page({
}) })
setTimeout(()=>{ setTimeout(()=>{
wx.switchTab({ wx.switchTab({
url: '/pages/my/home', url: '/pages/home/home',
}) })
},2000) },2000)
} }
...@@ -63,6 +63,9 @@ Page({ ...@@ -63,6 +63,9 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.setData({
courseData:[]
})
app.colorUISdk.request({ app.colorUISdk.request({
url:'infocourse/list', url:'infocourse/list',
method: 'GET', method: 'GET',
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="ui-grid ui-cols-2"> <view class="ui-grid ui-cols-2">
<block wx:for="{{courseData}}" wx:for-index="id" wx:key="course_index"> <block wx:for="{{courseData}}" wx:for-index="id" wx:key="course_index">
<view class="ui-item p-3"> <view class="ui-item p-3">
<app-nav-li data="{{item}}" navurl="/pages/document/subsign/subsign?price={{item.cost}}&name={{item.courseName}}&id={{item.id}}"/> <app-nav-li data="{{item}}" tabBg="KELB" navurl="/pages/document/subsign/subsign?price={{item.cost}}&name={{item.courseName}}&id={{item.id}}"/>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -16,7 +16,7 @@ Page({ ...@@ -16,7 +16,7 @@ Page({
}, },
onClickLeft() { onClickLeft() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/document/subsign/subsign', url: `/pages/document/subsign/subsign?id=${app.courseId}`,
}) })
}, },
beforeRead(event) { beforeRead(event) {
...@@ -250,7 +250,7 @@ Page({ ...@@ -250,7 +250,7 @@ Page({
let openid = wx.getStorageSync('openid'); let openid = wx.getStorageSync('openid');
let studentId = res.studentId; let studentId = res.studentId;
app.colorUISdk.request({ app.colorUISdk.request({
url: `wx/pay_one?openid=${openid}&price=${parseFloat(parseInt(app.information.price * 100) / 100) }&studentId=${res.studentId}`, url: `wx/pay_one?openid=${openid}&price=${parseInt(app.information.price * 100) }&studentId=${res.studentId}`,
//&phone=${app.information.phone}&price=${parseInt(app.information.price * 100)}&courseId=${app.information.id} //&phone=${app.information.phone}&price=${parseInt(app.information.price * 100)}&courseId=${app.information.id}
method: 'POST' method: 'POST'
}).then(({ }).then(({
...@@ -267,21 +267,13 @@ Page({ ...@@ -267,21 +267,13 @@ Page({
"signType": "RSA", "signType": "RSA",
"paySign": sign_info.paySign, "paySign": sign_info.paySign,
"success": function (res) { "success": function (res) {
app.colorUISdk.request({ //支付成功生成学生信息
url: "wx/pay_success", Toast.success('支付成功');
method:"POST",
}).then((data)=>{
if(data && data.code == 0){
Toast.success("支付成功");
setTimeout(()=>{ setTimeout(()=>{
wx.switchTab({ wx.switchTab({
url: '/pages/home/home', url: '/pages/home/home',
}) })
},1000) },1500)
}else{
Toast.fail("服务异常");
}
})
}, },
"fail": function (res) { "fail": function (res) {
//删除前一个 //删除前一个
......
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