已支付订单列表:where.payStatus = 1;
This commit is contained in:
+202
@@ -0,0 +1,202 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_booking_course_index = require("../../api/booking/course/index.js");
|
||||
const store_modules_car = require("../../store/modules/car.js");
|
||||
store_modules_car.useCarStore();
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
// 课程信息
|
||||
course: {},
|
||||
// 课程相册
|
||||
photo: [],
|
||||
isLogin: false,
|
||||
disabled: true,
|
||||
options: [
|
||||
{
|
||||
icon: "headphones",
|
||||
text: "客服"
|
||||
},
|
||||
{
|
||||
icon: "redo",
|
||||
text: "分享"
|
||||
}
|
||||
],
|
||||
buttonGroup: [
|
||||
{
|
||||
text: "立即报名",
|
||||
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
|
||||
color: "#fff"
|
||||
}
|
||||
],
|
||||
radio2: 0,
|
||||
sex: [
|
||||
{
|
||||
text: "幼儿基础班(10次课,10天连续上课)",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
text: "少年基础班(10次课,10天连续上课)",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: "少年基础班(10次课,10天连续上课)",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
text: "成人基础班(10次课,10天连续上课)",
|
||||
value: 3
|
||||
}
|
||||
],
|
||||
teacher: [
|
||||
{
|
||||
text: "姚教练",
|
||||
value: 0
|
||||
}
|
||||
],
|
||||
student: [
|
||||
{
|
||||
text: "全红婵",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
text: "新增",
|
||||
value: 99
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id;
|
||||
this.reload();
|
||||
},
|
||||
onShow() {
|
||||
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
|
||||
this.isLogin = true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async reload() {
|
||||
const app = this;
|
||||
Promise.all([app.getCourse()]).then((res) => {
|
||||
const course = res[0];
|
||||
app.course = course;
|
||||
common_vendor.index.setNavigationBarTitle({
|
||||
title: course.courseName
|
||||
});
|
||||
if (course.files) {
|
||||
app.photo = JSON.parse(course.files);
|
||||
}
|
||||
});
|
||||
},
|
||||
getCourse() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_booking_course_index.getCourse(this.id).then((result) => {
|
||||
resolve(result);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
onDisabled() {
|
||||
this.disabled = !this.disabled;
|
||||
},
|
||||
navTo(url) {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
openBookingTel() {
|
||||
this.$refs.popup.open("bottom");
|
||||
},
|
||||
closeBookingTel() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
callPhone(phone) {
|
||||
common_vendor.index.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
});
|
||||
},
|
||||
onMap() {
|
||||
common_vendor.index.getLocation({
|
||||
type: "gcj02",
|
||||
//返回可以用于uni.openLocation的经纬度
|
||||
success: function(res) {
|
||||
console.log("返回可以用于uni.openLocation的经纬度: ", res);
|
||||
const latitude = this.course.latitude;
|
||||
const longitude = this.course.longitude;
|
||||
common_vendor.index.openLocation({
|
||||
latitude,
|
||||
longitude,
|
||||
success: function() {
|
||||
console.log("success");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
save() {
|
||||
if (!this.disabled) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请先阅读并同意订票协议",
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/package/course/checkout?id=" + this.id
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
|
||||
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
|
||||
const _easycom_uv_empty2 = common_vendor.resolveComponent("uv-empty");
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
(_easycom_uv_avatar2 + _easycom_uv_text2 + _easycom_uv_empty2 + _easycom_uv_gap2 + _easycom_uni_card2)();
|
||||
}
|
||||
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
|
||||
const _easycom_uv_text = () => "../../uni_modules/uv-text/components/uv-text/uv-text.js";
|
||||
const _easycom_uv_empty = () => "../../uni_modules/uv-empty/components/uv-empty/uv-empty.js";
|
||||
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_avatar + _easycom_uv_text + _easycom_uv_empty + _easycom_uv_gap + _easycom_uni_card)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
src: "https://oss.wsdns.cn/20240608/1de5f5c694de4e339957be8013ca1ab9.jpeg",
|
||||
size: "100"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
text: "游泳教练",
|
||||
align: "center",
|
||||
size: "16"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
text: "游泳企事业800",
|
||||
type: "warning",
|
||||
size: "12"
|
||||
}),
|
||||
d: $data.course.content,
|
||||
e: common_vendor.p({
|
||||
icon: "https://cdn.uviewui.com/uview/empty/car.png"
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
height: "50"
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
title: "教练简介",
|
||||
["is-shadow"]: false,
|
||||
border: false,
|
||||
padding: 0
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
height: "80"
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-82126e57"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/teacher/detail.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "教练介绍",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
|
||||
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text",
|
||||
"uv-empty": "../../uni_modules/uv-empty/components/uv-empty/uv-empty",
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="container data-v-82126e57"><view class="teacher-avatar data-v-82126e57"><uv-avatar wx:if="{{a}}" class="data-v-82126e57" u-i="82126e57-0" bind:__l="__l" u-p="{{a}}"></uv-avatar><view class="teacher-info data-v-82126e57"><uv-text wx:if="{{b}}" class="data-v-82126e57" u-i="82126e57-1" bind:__l="__l" u-p="{{b}}"></uv-text><uv-text wx:if="{{c}}" class="data-v-82126e57" u-i="82126e57-2" bind:__l="__l" u-p="{{c}}"></uv-text></view></view><uni-card wx:if="{{g}}" class="data-v-82126e57" u-s="{{['d']}}" u-i="82126e57-3" bind:__l="__l" u-p="{{g}}"><view class="web-text-heading booking-content data-v-82126e57"><view class="data-v-82126e57"><rich-text class="data-v-82126e57" nodes="{{d}}"/></view><uv-empty wx:if="{{e}}" class="data-v-82126e57" u-i="82126e57-4,82126e57-3" bind:__l="__l" u-p="{{e}}"></uv-empty><uv-gap wx:if="{{f}}" class="data-v-82126e57" u-i="82126e57-5,82126e57-3" bind:__l="__l" u-p="{{f}}"></uv-gap></view></uni-card><uv-gap wx:if="{{h}}" class="data-v-82126e57" u-i="82126e57-6" bind:__l="__l" u-p="{{h}}"></uv-gap></view>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
|
||||
page {
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.teacher-avatar.data-v-82126e57 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 50rpx 0;
|
||||
}
|
||||
.teacher-avatar .teacher-info.data-v-82126e57 {
|
||||
line-height: 1.4rem;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user