已支付订单列表:where.payStatus = 1;
This commit is contained in:
+545
@@ -0,0 +1,545 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_shop_order_index = require("../../api/shop/order/index.js");
|
||||
const api_booking_course_index = require("../../api/booking/course/index.js");
|
||||
const api_booking_student_index = require("../../api/booking/student/index.js");
|
||||
const api_system_payment_index = require("../../api/system/payment/index.js");
|
||||
const api_passport_login_index = require("../../api/passport/login/index.js");
|
||||
const utils_common = require("../../utils/common.js");
|
||||
const store_modules_car = require("../../store/modules/car.js");
|
||||
const store_modules_user = require("../../store/modules/user.js");
|
||||
const userStore = store_modules_user.useUserStore();
|
||||
const carStore = store_modules_car.useCarStore();
|
||||
const { goodsList, totalPrice, carNum, merchantId, merchantName, merchantCode, type, dateTime } = common_vendor.storeToRefs(carStore);
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
courseId: 0,
|
||||
form: {},
|
||||
orderId: 0,
|
||||
goodsId: 0,
|
||||
userInfo: {},
|
||||
student: {},
|
||||
studentList: [],
|
||||
week: 0,
|
||||
goodsList,
|
||||
// 骨架屏
|
||||
hideTools: true,
|
||||
// 订单总金额
|
||||
totalPrice,
|
||||
reducePrice: 0,
|
||||
merchantId,
|
||||
merchantName,
|
||||
merchantCode,
|
||||
getWeek: utils_common.getWeek,
|
||||
payType: 1,
|
||||
payment: [],
|
||||
isLogin: false,
|
||||
disabled: false,
|
||||
// 支付密码是否正确
|
||||
isPayPasswordCorrect: false,
|
||||
disabledPayPayPassword: false,
|
||||
payPassword: ""
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.courseId = option.id;
|
||||
this.reload();
|
||||
},
|
||||
onShow() {
|
||||
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
|
||||
this.isLogin = true;
|
||||
}
|
||||
this.openLogin();
|
||||
},
|
||||
methods: {
|
||||
async reload() {
|
||||
const app = this;
|
||||
const userInfo = await userStore.fetchUserInfo();
|
||||
app.userInfo = userInfo;
|
||||
api_booking_student_index.pageStudent({ userId: common_vendor.index.getStorageSync("user_id") }).then((res) => {
|
||||
app.studentList = res.list;
|
||||
const arr = res.list.filter((d) => d.isDefault === true);
|
||||
app.student = arr[0];
|
||||
});
|
||||
api_system_payment_index.select({ status: true }).then((list) => {
|
||||
app.payment = list.filter((d) => d.type < 2).map((d) => {
|
||||
if (d.code == "balancePay") {
|
||||
d.name = `${d.name} (¥${userInfo.balance})`;
|
||||
}
|
||||
return d;
|
||||
});
|
||||
});
|
||||
api_booking_course_index.getCourse(app.courseId).then((data) => {
|
||||
this.form = data;
|
||||
});
|
||||
},
|
||||
onDisabled() {
|
||||
this.disabled = !this.disabled;
|
||||
},
|
||||
navTo(url) {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
openUrl(url) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
} else {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
},
|
||||
onAddress(item) {
|
||||
this.address = item;
|
||||
this.$refs.addForm.close();
|
||||
},
|
||||
// 切换支付方式
|
||||
onPayType(index) {
|
||||
this.payType = index;
|
||||
},
|
||||
openStudentList() {
|
||||
this.$refs.addForm.open("center");
|
||||
},
|
||||
// 弹出登录提示框
|
||||
openLogin() {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 验证支付密码
|
||||
onPayPassword() {
|
||||
if (this.payPassword == "" || !this.payPassword) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入支付密码",
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.disabledPayPayPassword = true;
|
||||
const { payPassword } = this;
|
||||
api_passport_login_index.checkPayPassword({ payPassword }).then((res) => {
|
||||
this.disabledPayPayPassword = false;
|
||||
this.isPayPasswordCorrect = true;
|
||||
this.save();
|
||||
}).catch((err) => {
|
||||
common_vendor.index.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
});
|
||||
this.disabledPayPayPassword = false;
|
||||
});
|
||||
},
|
||||
save() {
|
||||
const app = this;
|
||||
if (!this.disabled) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请先阅读并同意服务协议",
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (carStore.goodsList.length == 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "订单信息不存在",
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (app.payType == 0 && !this.isPayPasswordCorrect) {
|
||||
this.$refs.payPasswordForm.open("center");
|
||||
return false;
|
||||
}
|
||||
common_vendor.index.showLoading({
|
||||
title: "订单提交中."
|
||||
});
|
||||
api_shop_order_index.addOrder({
|
||||
type: 0,
|
||||
// 0商城订单
|
||||
orderId: this.orderId,
|
||||
merchantId: this.merchantId,
|
||||
merchantCode: this.merchantCode,
|
||||
merchantName: this.merchantName,
|
||||
totalPrice: this.totalPrice,
|
||||
payPrice: this.totalPrice - this.reducePrice,
|
||||
goodsList: this.goodsList,
|
||||
comments: this.goodsList[0].goodsName,
|
||||
// 微信支付
|
||||
payType: this.payType,
|
||||
// 下单日期
|
||||
dateTime: this.dateTime
|
||||
}).then((data) => {
|
||||
const orderInfo = data;
|
||||
common_vendor.index.requestPayment({
|
||||
provider: orderInfo.provider,
|
||||
// 服务提供商
|
||||
timeStamp: orderInfo.timeStamp,
|
||||
// 时间戳
|
||||
nonceStr: orderInfo.nonceStr,
|
||||
// 随机字符串
|
||||
package: orderInfo.package,
|
||||
signType: orderInfo.signType,
|
||||
// 签名算法
|
||||
paySign: orderInfo.paySign,
|
||||
// 签名
|
||||
success: function(res) {
|
||||
common_vendor.index.showToast({
|
||||
title: "支付成功",
|
||||
icon: "success"
|
||||
});
|
||||
setTimeout(function() {
|
||||
app.disabled = false;
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/package/goods/order"
|
||||
});
|
||||
}, 500);
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log("支付失败", err);
|
||||
app.disabled = false;
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/package/goods/order"
|
||||
});
|
||||
}
|
||||
});
|
||||
common_vendor.index.hideLoading();
|
||||
}).catch((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: res.message || "请检查您的网络.",
|
||||
icon: "none"
|
||||
});
|
||||
common_vendor.index.hideLoading();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
|
||||
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
const _easycom_uv_count_to2 = common_vendor.resolveComponent("uv-count-to");
|
||||
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
|
||||
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
|
||||
const _easycom_uni_tag2 = common_vendor.resolveComponent("uni-tag");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
const _easycom_uv_code_input2 = common_vendor.resolveComponent("uv-code-input");
|
||||
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
|
||||
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
|
||||
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
|
||||
(_easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_icon2 + _easycom_uni_icons2 + _easycom_uv_gap2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_uv_avatar2 + _easycom_uni_tag2 + _easycom_uni_popup2 + _easycom_uv_code_input2 + _easycom_uni_forms_item2 + _easycom_uni_forms2 + _easycom_ws_login2)();
|
||||
}
|
||||
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
|
||||
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.js";
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
const _easycom_uv_count_to = () => "../../uni_modules/uv-count-to/components/uv-count-to/uv-count-to.js";
|
||||
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
|
||||
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
|
||||
const _easycom_uni_tag = () => "../../uni_modules/uni-tag/components/uni-tag/uni-tag.js";
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
const _easycom_uv_code_input = () => "../../uni_modules/uv-code-input/components/uv-code-input/uv-code-input.js";
|
||||
const _easycom_uni_forms_item = () => "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js";
|
||||
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.js";
|
||||
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_icon + _easycom_uni_icons + _easycom_uv_gap + _easycom_uv_count_to + _easycom_uv_button + _easycom_uv_avatar + _easycom_uni_tag + _easycom_uni_popup + _easycom_uv_code_input + _easycom_uni_forms_item + _easycom_uni_forms + _easycom_ws_login)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t($data.merchantId),
|
||||
b: common_vendor.t($data.merchantCode),
|
||||
c: common_vendor.t($data.merchantName),
|
||||
d: common_vendor.t(_ctx.dateTime),
|
||||
e: common_vendor.t($data.week),
|
||||
f: common_vendor.t($data.totalPrice),
|
||||
g: common_vendor.t(_ctx.type),
|
||||
h: common_vendor.t($data.goodsList),
|
||||
i: common_vendor.p({
|
||||
title: `课程名称`,
|
||||
label: $data.form.courseName,
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
title: `上课课时`,
|
||||
label: $data.form.classPeriod,
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
title: `年龄限制`,
|
||||
label: $data.form.ageLimit,
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
title: `培训费用`,
|
||||
label: `¥${$data.form.price}`,
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
title: `上课时间`,
|
||||
label: `${$data.form.startTime}`,
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
title: `上课地点`,
|
||||
label: `${$data.form.address}`,
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
customStyle: {
|
||||
backgroundColor: "#ffffff"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
title: "课程信息",
|
||||
border: false,
|
||||
["is-shadow"]: false
|
||||
}),
|
||||
q: $data.student
|
||||
}, $data.student ? {
|
||||
r: common_vendor.p({
|
||||
name: "arrow-right"
|
||||
}),
|
||||
s: common_vendor.o($options.openStudentList),
|
||||
t: common_vendor.p({
|
||||
title: `${$data.student.name}`,
|
||||
icon: "account",
|
||||
cellStyle: {
|
||||
padding: "5px 0"
|
||||
},
|
||||
border: false
|
||||
})
|
||||
} : {
|
||||
v: common_vendor.p({
|
||||
name: "arrow-right"
|
||||
}),
|
||||
w: common_vendor.o($options.openStudentList),
|
||||
x: common_vendor.p({
|
||||
title: `选择学员`,
|
||||
icon: "account",
|
||||
cellStyle: {
|
||||
padding: "5px 0"
|
||||
},
|
||||
border: false
|
||||
})
|
||||
}, {
|
||||
y: common_vendor.p({
|
||||
title: "报名学员",
|
||||
border: false,
|
||||
["is-shadow"]: false
|
||||
}),
|
||||
z: common_vendor.f($data.payment, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.type == $data.payType
|
||||
}, item.type == $data.payType ? {
|
||||
b: "15db4f87-16-" + i0 + "," + ("15db4f87-15-" + i0),
|
||||
c: common_vendor.p({
|
||||
size: "30rpx",
|
||||
name: "checkbox-mark"
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.o(($event) => $options.onPayType(item.type), index),
|
||||
e: "15db4f87-15-" + i0 + ",15db4f87-14",
|
||||
f: common_vendor.p({
|
||||
title: `${item.name}`,
|
||||
icon: `${item.image}`,
|
||||
cellStyle: {
|
||||
padding: "20rpx 10rpx",
|
||||
borderRadius: "8rpx",
|
||||
backgroundColor: item.type == $data.payType ? "#f6fff1" : ""
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
g: index
|
||||
});
|
||||
}),
|
||||
A: common_vendor.p({
|
||||
customStyle: {
|
||||
backgroundColor: "#ffffff"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
B: common_vendor.t($data.totalPrice || 0),
|
||||
C: common_vendor.o(($event) => _ctx.actionsClick("分享")),
|
||||
D: common_vendor.p({
|
||||
title: "选择支付方式",
|
||||
border: false,
|
||||
["is-shadow"]: false
|
||||
}),
|
||||
E: !$data.disabled
|
||||
}, !$data.disabled ? {
|
||||
F: common_vendor.o($options.onDisabled),
|
||||
G: common_vendor.p({
|
||||
type: "circle",
|
||||
size: "20",
|
||||
color: "#a4a5a7"
|
||||
})
|
||||
} : {
|
||||
H: common_vendor.o($options.onDisabled),
|
||||
I: common_vendor.p({
|
||||
type: "checkbox",
|
||||
size: "20",
|
||||
color: "#11a954"
|
||||
})
|
||||
}, {
|
||||
J: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=501")),
|
||||
K: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=502")),
|
||||
L: common_vendor.o((...args) => $options.onDisabled && $options.onDisabled(...args)),
|
||||
M: common_vendor.p({
|
||||
height: "50"
|
||||
}),
|
||||
N: common_vendor.p({
|
||||
startVal: 0,
|
||||
decimals: "2",
|
||||
duration: "100",
|
||||
color: "#ebcf00",
|
||||
bold: true,
|
||||
endVal: $data.totalPrice
|
||||
}),
|
||||
O: common_vendor.o($options.save),
|
||||
P: common_vendor.p({
|
||||
disabled: !$data.disabled || $data.goodsList.length == 0,
|
||||
customStyle: {
|
||||
background: "linear-gradient(to right, #70b915, #008e04)",
|
||||
borderRadius: "0 30px 30px 0",
|
||||
color: "#ffffff",
|
||||
border: "none",
|
||||
padding: "22px 30px"
|
||||
},
|
||||
text: "提交订单"
|
||||
}),
|
||||
Q: common_vendor.f($data.studentList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: "15db4f87-26-" + i0 + "," + ("15db4f87-25-" + i0),
|
||||
b: common_vendor.p({
|
||||
text: item.type,
|
||||
fontSize: "12",
|
||||
size: "32",
|
||||
randomBgColor: true
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: common_vendor.t(item.phone),
|
||||
e: item.isDefault
|
||||
}, item.isDefault ? {
|
||||
f: "15db4f87-27-" + i0 + "," + ("15db4f87-25-" + i0),
|
||||
g: common_vendor.p({
|
||||
text: "默认",
|
||||
size: "mini",
|
||||
inverted: true,
|
||||
type: "success"
|
||||
})
|
||||
} : {}, {
|
||||
h: "15db4f87-28-" + i0 + "," + ("15db4f87-25-" + i0),
|
||||
i: common_vendor.o(($event) => $options.onAddress(item), index),
|
||||
j: "15db4f87-25-" + i0 + ",15db4f87-24",
|
||||
k: common_vendor.p({
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
},
|
||||
label: item.address
|
||||
}),
|
||||
l: index
|
||||
});
|
||||
}),
|
||||
R: common_vendor.p({
|
||||
type: "right"
|
||||
}),
|
||||
S: common_vendor.o(($event) => $options.navTo("/package/course/student")),
|
||||
T: common_vendor.p({
|
||||
customStyle: {
|
||||
borderRadius: "30px"
|
||||
},
|
||||
text: "学员管理"
|
||||
}),
|
||||
U: common_vendor.p({
|
||||
customStyle: {
|
||||
backgroundColor: "#ffffff"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
V: common_vendor.p({
|
||||
title: "选择学员",
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
}),
|
||||
W: common_vendor.sr("addForm", "15db4f87-22"),
|
||||
X: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
}),
|
||||
Y: common_vendor.o(($event) => $data.payPassword = $event),
|
||||
Z: common_vendor.p({
|
||||
mode: "box",
|
||||
dot: true,
|
||||
space: 0,
|
||||
maxlength: 6,
|
||||
hairline: true,
|
||||
modelValue: $data.payPassword
|
||||
}),
|
||||
aa: common_vendor.p({
|
||||
label: "支付密码",
|
||||
name: "payPassword",
|
||||
required: true
|
||||
}),
|
||||
ab: common_vendor.o($options.onPayPassword),
|
||||
ac: common_vendor.p({
|
||||
customStyle: {
|
||||
background: "linear-gradient(to right, #70b915, #008e04)",
|
||||
borderRadius: "30px",
|
||||
color: "#ffffff"
|
||||
},
|
||||
text: "确定支付",
|
||||
disabled: $data.disabledPayPayPassword
|
||||
}),
|
||||
ad: common_vendor.sr("form", "15db4f87-32,15db4f87-31"),
|
||||
ae: common_vendor.p({
|
||||
["label-width"]: 80
|
||||
}),
|
||||
af: common_vendor.o(($event) => $options.navTo(`/package/user/pay-password`)),
|
||||
ag: common_vendor.p({
|
||||
title: "请输入支付密码",
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
}),
|
||||
ah: common_vendor.sr("payPasswordForm", "15db4f87-30"),
|
||||
ai: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
}),
|
||||
aj: common_vendor.sr("login", "15db4f87-36"),
|
||||
ak: common_vendor.o($options.reload),
|
||||
al: common_vendor.p({
|
||||
logo: _ctx.logo
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-15db4f87"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/checkout.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"navigationBarTitleText": "订单确认",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
|
||||
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
|
||||
"uv-count-to": "../../uni_modules/uv-count-to/components/uv-count-to/uv-count-to",
|
||||
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
|
||||
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
|
||||
"uni-tag": "../../uni_modules/uni-tag/components/uni-tag/uni-tag",
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
|
||||
"uv-code-input": "../../uni_modules/uv-code-input/components/uv-code-input/uv-code-input",
|
||||
"uni-forms-item": "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item",
|
||||
"uni-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms",
|
||||
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+132
@@ -0,0 +1,132 @@
|
||||
|
||||
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 */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.checkout-car.data-v-15db4f87 {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #000000;
|
||||
border-radius: 100px;
|
||||
align-items: center;
|
||||
}
|
||||
.checkout-car .car-selected.data-v-15db4f87 {
|
||||
color: #ccc;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.checkout-car .car-total.data-v-15db4f87 {
|
||||
display: flex;
|
||||
color: #ebcf00;
|
||||
align-items: center;
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
.card-actions.data-v-15db4f87 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
height: 45px;
|
||||
border-top: 1px #eee solid;
|
||||
}
|
||||
.card-actions-item.data-v-15db4f87 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.card-actions-item .web-text-heading.data-v-15db4f87 {
|
||||
font-size: 38rpx;
|
||||
margin-left: 28rpx;
|
||||
}
|
||||
.card-actions-item-text.data-v-15db4f87 {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.address-body.data-v-15db4f87 {
|
||||
width: 660rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.add-address.data-v-15db4f87 {
|
||||
width: 600rpx !important;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
.btn-bar.data-v-15db4f87 {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
margin: auto;
|
||||
clear: both;
|
||||
}
|
||||
.title-bar.data-v-15db4f87 {
|
||||
display: flex;
|
||||
}
|
||||
.title-bar .web-text-heading.data-v-15db4f87 {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.title-bar .web-text-secondary.data-v-15db4f87 {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.xieyi.data-v-15db4f87 {
|
||||
margin-bottom: 80rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.xieyi .text.data-v-15db4f87 {
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
.xieyi .text .link.data-v-15db4f87 {
|
||||
color: #0f80ff;
|
||||
}
|
||||
.pay-password-card.data-v-15db4f87 {
|
||||
width: 600rpx;
|
||||
min-height: 300rpx;
|
||||
margin: 30rpx auto;
|
||||
background-color: #ffffff;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.pay-password-card .web-text-primary.data-v-15db4f87 {
|
||||
line-height: 2rem;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.to-pay-btn.data-v-15db4f87 {
|
||||
width: 400rpx !important;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
+449
@@ -0,0 +1,449 @@
|
||||
"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: "upload",
|
||||
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
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
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
|
||||
});
|
||||
},
|
||||
onClick(e) {
|
||||
const app = this;
|
||||
const { course } = app;
|
||||
console.log("e: ", e);
|
||||
if (e.index == 0) {
|
||||
common_vendor.wx$1.openCustomerServiceChat({
|
||||
extInfo: { url: `` },
|
||||
corpId: `setting.config.wxqykf.corpId`,
|
||||
success(res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (e.index == 1) {
|
||||
common_vendor.index.share({
|
||||
provider: "weixin",
|
||||
scene: "WXSceneSession",
|
||||
type: 5,
|
||||
imageUrl: "",
|
||||
title: course.name,
|
||||
miniProgram: {
|
||||
id: "gh_abcdefg",
|
||||
path: "package/course/detail?id=" + app.id,
|
||||
type: 0,
|
||||
webUrl: "http://apps.gxwebsoft.com/gxtyzx-h5/#/package/course/detail?id=" + app.id
|
||||
},
|
||||
success: (ret) => {
|
||||
console.log(JSON.stringify(ret));
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mapTo(item) {
|
||||
const arr = item.lngAndLat.split(",");
|
||||
common_vendor.index.openLocation({
|
||||
latitude: parseFloat(arr[1]),
|
||||
longitude: parseFloat(arr[0]),
|
||||
success: function() {
|
||||
console.log("success");
|
||||
}
|
||||
});
|
||||
},
|
||||
openBookingTel() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/package/course/checkout?id=" + this.id
|
||||
});
|
||||
},
|
||||
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");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
openUrl(url) {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
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_swiper2 = common_vendor.resolveComponent("uv-swiper");
|
||||
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
|
||||
const _easycom_uni_tag2 = common_vendor.resolveComponent("uni-tag");
|
||||
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
|
||||
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
|
||||
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
|
||||
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
const _easycom_uni_goods_nav2 = common_vendor.resolveComponent("uni-goods-nav");
|
||||
const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
|
||||
const _easycom_uv_tags2 = common_vendor.resolveComponent("uv-tags");
|
||||
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
|
||||
(_easycom_uv_swiper2 + _easycom_uv_cell2 + _easycom_uni_tag2 + _easycom_uv_icon2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_image2 + _easycom_uv_avatar2 + _easycom_uv_text2 + _easycom_uv_gap2 + _easycom_uni_goods_nav2 + _easycom_uni_data_checkbox2 + _easycom_uv_tags2 + _easycom_uv_button2 + _easycom_uni_popup2 + _easycom_ws_login2)();
|
||||
}
|
||||
const _easycom_uv_swiper = () => "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper.js";
|
||||
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
|
||||
const _easycom_uni_tag = () => "../../uni_modules/uni-tag/components/uni-tag/uni-tag.js";
|
||||
const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.js";
|
||||
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
|
||||
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_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
const _easycom_uni_goods_nav = () => "../../uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.js";
|
||||
const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
|
||||
const _easycom_uv_tags = () => "../../uni_modules/uv-tags/components/uv-tags/uv-tags.js";
|
||||
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_swiper + _easycom_uv_cell + _easycom_uni_tag + _easycom_uv_icon + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_image + _easycom_uv_avatar + _easycom_uv_text + _easycom_uv_gap + _easycom_uni_goods_nav + _easycom_uni_data_checkbox + _easycom_uv_tags + _easycom_uv_button + _easycom_uni_popup + _easycom_ws_login)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
list: $data.photo,
|
||||
indicator: true,
|
||||
indicatorMode: "line",
|
||||
circular: true,
|
||||
height: "200",
|
||||
radius: "0"
|
||||
}),
|
||||
b: $data.course.courseName
|
||||
}, $data.course.courseName ? {
|
||||
c: common_vendor.t($data.course.courseName),
|
||||
d: common_vendor.p({
|
||||
cellStyle: {
|
||||
padding: "10px 5px"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
e: common_vendor.t($data.course.price),
|
||||
f: common_vendor.p({
|
||||
text: `${$data.course.classPeriod}课时`,
|
||||
inverted: true,
|
||||
type: "error"
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
cellStyle: {
|
||||
padding: "10px 5px"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
size: "50rpx",
|
||||
name: "map-fill",
|
||||
color: "#5ac725"
|
||||
}),
|
||||
i: common_vendor.o(($event) => $options.mapTo($data.course)),
|
||||
j: common_vendor.p({
|
||||
title: $data.course.merchantName,
|
||||
label: `距离【${$data.course.merchantName}】3.8公里·约7分钟`,
|
||||
isLink: true,
|
||||
border: false,
|
||||
cellStyle: {
|
||||
padding: "10px 5px"
|
||||
}
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
title: "年龄限制",
|
||||
label: $data.course.ageLimit,
|
||||
border: false,
|
||||
cellStyle: {
|
||||
padding: "10px 5px"
|
||||
}
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
title: "报名时间",
|
||||
label: $data.course.bmTime,
|
||||
border: false,
|
||||
cellStyle: {
|
||||
padding: "10px 5px"
|
||||
}
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
customStyle: {
|
||||
backgroundColor: "#ffffff"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
})
|
||||
} : {}, {
|
||||
o: common_vendor.p({
|
||||
src: `https://oss.wsdns.cn/20240608/1ce5b3f9b33b48b2bc9d68644e8ba6f4.jpg`
|
||||
}),
|
||||
p: $data.course.content,
|
||||
q: common_vendor.p({
|
||||
title: "课程介绍",
|
||||
["is-shadow"]: false,
|
||||
border: false,
|
||||
padding: 0
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
src: "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKf8Lvm8WN0LnV2B6vYzyGJVxk2XW3j1mtDzicA60KhWRRjyU8ORiascwInkbqhVibRm2A1O1tRRbzhA/132",
|
||||
size: "54"
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
text: "游泳教练",
|
||||
align: "center",
|
||||
size: "16"
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
text: "游泳企事业800",
|
||||
type: "warning",
|
||||
size: "12"
|
||||
}),
|
||||
v: common_vendor.o(($event) => $options.openUrl(`/package/teacher/detail?id=1`)),
|
||||
w: common_vendor.p({
|
||||
title: "课程教练",
|
||||
["is-shadow"]: false,
|
||||
border: false,
|
||||
padding: 0
|
||||
}),
|
||||
x: common_vendor.p({
|
||||
height: "80"
|
||||
}),
|
||||
y: common_vendor.o($options.onClick),
|
||||
z: common_vendor.o($options.openBookingTel),
|
||||
A: common_vendor.p({
|
||||
fill: true,
|
||||
options: $data.options,
|
||||
["button-group"]: $data.buttonGroup
|
||||
}),
|
||||
B: common_vendor.p({
|
||||
height: "10"
|
||||
}),
|
||||
C: common_vendor.p({
|
||||
mode: "price",
|
||||
color: "#ff0000",
|
||||
bold: true,
|
||||
size: "20",
|
||||
text: $data.course.price
|
||||
}),
|
||||
D: common_vendor.p({
|
||||
cellStyle: {
|
||||
padding: "10px 15px"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
E: common_vendor.p({
|
||||
title: "规格",
|
||||
border: false
|
||||
}),
|
||||
F: common_vendor.o(($event) => $data.radio2 = $event),
|
||||
G: common_vendor.p({
|
||||
mode: "tag",
|
||||
localdata: $data.sex,
|
||||
modelValue: $data.radio2
|
||||
}),
|
||||
H: common_vendor.p({
|
||||
border: false,
|
||||
cellStyle: {
|
||||
padding: "0 15px"
|
||||
}
|
||||
}),
|
||||
I: common_vendor.p({
|
||||
title: "班级/教练",
|
||||
border: false
|
||||
}),
|
||||
J: common_vendor.o(($event) => _ctx.radio3 = $event),
|
||||
K: common_vendor.p({
|
||||
mode: "tag",
|
||||
localdata: $data.teacher,
|
||||
modelValue: _ctx.radio3
|
||||
}),
|
||||
L: common_vendor.p({
|
||||
border: false,
|
||||
cellStyle: {
|
||||
padding: "0 15px"
|
||||
}
|
||||
}),
|
||||
M: common_vendor.p({
|
||||
title: "报名学员",
|
||||
border: false
|
||||
}),
|
||||
N: common_vendor.o(($event) => _ctx.radio4 = $event),
|
||||
O: common_vendor.p({
|
||||
mode: "tag",
|
||||
localdata: $data.student,
|
||||
modelValue: _ctx.radio4
|
||||
}),
|
||||
P: common_vendor.p({
|
||||
text: "新增",
|
||||
type: "info",
|
||||
size: "mini",
|
||||
icon: "plus",
|
||||
plain: true
|
||||
}),
|
||||
Q: common_vendor.p({
|
||||
border: false,
|
||||
cellStyle: {
|
||||
padding: "0 15px"
|
||||
}
|
||||
}),
|
||||
R: common_vendor.o($options.save),
|
||||
S: common_vendor.p({
|
||||
disabled: !$data.disabled,
|
||||
customStyle: {
|
||||
background: "linear-gradient(to right, #FE6035, #EF1224)",
|
||||
borderRadius: "0 30px 30px 0",
|
||||
color: "#ffffff",
|
||||
border: "none",
|
||||
padding: "22px 30px"
|
||||
},
|
||||
text: "下一步"
|
||||
}),
|
||||
T: common_vendor.p({
|
||||
customStyle: {
|
||||
backgroundColor: "#ffffff"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
U: common_vendor.sr("popup", "5f91cfa3-18"),
|
||||
V: common_vendor.p({
|
||||
type: "center"
|
||||
}),
|
||||
W: common_vendor.sr("login", "5f91cfa3-34"),
|
||||
X: common_vendor.o($options.reload),
|
||||
Y: common_vendor.p({
|
||||
logo: _ctx.logo
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5f91cfa3"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/detail.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"navigationBarTitleText": "课程详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-swiper": "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper",
|
||||
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
|
||||
"uni-tag": "../../uni_modules/uni-tag/components/uni-tag/uni-tag",
|
||||
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
|
||||
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
|
||||
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
|
||||
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text",
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
|
||||
"uni-goods-nav": "../../uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav",
|
||||
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
|
||||
"uv-tags": "../../uni_modules/uv-tags/components/uv-tags/uv-tags",
|
||||
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
|
||||
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+143
@@ -0,0 +1,143 @@
|
||||
|
||||
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 */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.merchant-name.data-v-5f91cfa3 {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.save-btn.data-v-5f91cfa3 {
|
||||
width: 750rpx;
|
||||
background-color: #ffffff;
|
||||
position: fixed;
|
||||
padding-bottom: 30rpx;
|
||||
bottom: 0;
|
||||
}
|
||||
.booking-tel.data-v-5f91cfa3 {
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 270px;
|
||||
right: 0;
|
||||
width: 80px;
|
||||
height: 38px;
|
||||
border-radius: 50px 0 0 50px;
|
||||
background: linear-gradient(to right, #ccff66, #008e04);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #ffffff;
|
||||
font-size: 13px;
|
||||
}
|
||||
.popup-checkout.data-v-5f91cfa3 {
|
||||
background-color: #ffffff;
|
||||
width: 100vw;
|
||||
height: 60vh;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
margin: auto;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.popup-checkout .title.data-v-5f91cfa3 {
|
||||
font-weight: bold;
|
||||
font-size: 38rpx;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.popup-checkout .desc.data-v-5f91cfa3 {
|
||||
line-height: 2rem;
|
||||
}
|
||||
.popup-close.data-v-5f91cfa3 {
|
||||
display: flex;
|
||||
margin-top: 24rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
.booking-content.data-v-5f91cfa3 {
|
||||
padding: 10px;
|
||||
font-size: 30rpx;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
.xieyi.data-v-5f91cfa3 {
|
||||
margin-bottom: 80rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.xieyi .text.data-v-5f91cfa3 {
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
.xieyi .text .link.data-v-5f91cfa3 {
|
||||
color: #0f80ff;
|
||||
}
|
||||
.teacher-list.data-v-5f91cfa3 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.teacher-list .teacher-item.data-v-5f91cfa3 {
|
||||
margin: 20rpx 12rpx;
|
||||
display: flex;
|
||||
width: 160rpx;
|
||||
height: 200rpx;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 12rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
.teacher-list .teacher-item .teacher-info.data-v-5f91cfa3 {
|
||||
text-align: center;
|
||||
}
|
||||
.checkout-car.data-v-5f91cfa3 {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
bottom: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #000000;
|
||||
border-radius: 100px;
|
||||
align-items: center;
|
||||
}
|
||||
.checkout-car .car-selected.data-v-5f91cfa3 {
|
||||
color: #ccc;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.checkout-car .car-total.data-v-5f91cfa3 {
|
||||
display: flex;
|
||||
color: #ebcf00;
|
||||
align-items: center;
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_booking_course_index = require("../../api/booking/course/index.js");
|
||||
const api_booking_item_index = require("../../api/booking/item/index.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
// 骨架屏
|
||||
hideTools: true,
|
||||
// 项目列表
|
||||
itemList: []
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
reload() {
|
||||
const app = this;
|
||||
Promise.all([app.getCourseList(), app.getItemList()]).then((res) => {
|
||||
console.log("res: ", res);
|
||||
app.list = res[0];
|
||||
app.itemList = res[1];
|
||||
});
|
||||
},
|
||||
getCourseList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_booking_course_index.pageCourse({}).then((result) => {
|
||||
resolve(result.list);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
getItemList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_booking_item_index.listItem({}).then((result) => {
|
||||
resolve(result);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
onItem(e) {
|
||||
const { index } = e.detail;
|
||||
this.openUrl(`/package/course/list?categoryId=${this.itemList[index].id}&categoryName=${this.itemList[index].name}`);
|
||||
},
|
||||
openUrl(url) {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
|
||||
const _easycom_uni_grid_item2 = common_vendor.resolveComponent("uni-grid-item");
|
||||
const _easycom_uni_grid2 = common_vendor.resolveComponent("uni-grid");
|
||||
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
|
||||
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
|
||||
(_easycom_uv_gap2 + _easycom_uv_avatar2 + _easycom_uni_grid_item2 + _easycom_uni_grid2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_uv_image2 + _easycom_uv_text2)();
|
||||
}
|
||||
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
|
||||
const _easycom_uni_grid_item = () => "../../uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.js";
|
||||
const _easycom_uni_grid = () => "../../uni_modules/uni-grid/components/uni-grid/uni-grid.js";
|
||||
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
|
||||
const _easycom_uv_text = () => "../../uni_modules/uv-text/components/uv-text/uv-text.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_gap + _easycom_uv_avatar + _easycom_uni_grid_item + _easycom_uni_grid + _easycom_uv_skeleton + _easycom_uni_card + _easycom_uv_image + _easycom_uv_text)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.itemList.length > 0
|
||||
}, $data.itemList.length > 0 ? {
|
||||
b: common_vendor.p({
|
||||
height: "10"
|
||||
}),
|
||||
c: common_vendor.f($data.itemList, (item, index, i0) => {
|
||||
return {
|
||||
a: "84f783ca-3-" + i0 + "," + ("84f783ca-2-" + i0),
|
||||
b: common_vendor.p({
|
||||
src: item.image,
|
||||
size: 30,
|
||||
shape: "square",
|
||||
fontSize: "16",
|
||||
randomBgColor: true
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: index,
|
||||
e: "84f783ca-2-" + i0 + ",84f783ca-1",
|
||||
f: common_vendor.p({
|
||||
index
|
||||
})
|
||||
};
|
||||
}),
|
||||
d: common_vendor.o($options.onItem),
|
||||
e: common_vendor.p({
|
||||
column: 5,
|
||||
highlight: true,
|
||||
showBorder: false
|
||||
})
|
||||
} : {
|
||||
f: common_vendor.p({
|
||||
rows: "3",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
}, {
|
||||
h: $data.list.length > 0
|
||||
}, $data.list.length > 0 ? {
|
||||
i: common_vendor.f($data.list, (item, index, i0) => {
|
||||
return {
|
||||
a: "84f783ca-6-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.image,
|
||||
width: "200",
|
||||
height: "110"
|
||||
}),
|
||||
c: "84f783ca-7-" + i0,
|
||||
d: common_vendor.p({
|
||||
size: "15",
|
||||
lineHeight: "24",
|
||||
lines: 1,
|
||||
text: item.courseName
|
||||
}),
|
||||
e: "84f783ca-8-" + i0,
|
||||
f: common_vendor.p({
|
||||
lineHeight: "24",
|
||||
size: "13",
|
||||
text: `${item.classPeriod}课时`
|
||||
}),
|
||||
g: "84f783ca-9-" + i0,
|
||||
h: common_vendor.p({
|
||||
mode: "price",
|
||||
color: "#ff0000",
|
||||
text: `${item.price}`
|
||||
}),
|
||||
i: "84f783ca-10-" + i0,
|
||||
j: common_vendor.o(($event) => $options.openUrl(`/package/course/detail?id=` + item.courseId), index),
|
||||
k: index
|
||||
};
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
text: `1.3km`
|
||||
})
|
||||
} : {
|
||||
k: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-84f783ca"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/index.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"navigationBarTitleText": "培训课程",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
|
||||
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
|
||||
"uni-grid-item": "../../uni_modules/uni-grid/components/uni-grid-item/uni-grid-item",
|
||||
"uni-grid": "../../uni_modules/uni-grid/components/uni-grid/uni-grid",
|
||||
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
|
||||
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="data-v-84f783ca"><block wx:if="{{a}}"><uv-gap wx:if="{{b}}" class="data-v-84f783ca" u-i="84f783ca-0" bind:__l="__l" u-p="{{b}}"></uv-gap><view class="item-list data-v-84f783ca"><uni-grid wx:if="{{e}}" class="data-v-84f783ca" u-s="{{['d']}}" bindchange="{{d}}" u-i="84f783ca-1" bind:__l="__l" u-p="{{e}}"><uni-grid-item wx:for="{{c}}" wx:for-item="item" wx:key="d" class="data-v-84f783ca" u-s="{{['d']}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{item.f}}"><view class="grid-item-box data-v-84f783ca" style="background-color:#ffffff;margin:10rpx;border-radius:10rpx;display:flex;flex-direction:column;justify-content:center;align-items:center;height:5rem"><uv-avatar wx:if="{{item.b}}" class="data-v-84f783ca" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-avatar><text class="text data-v-84f783ca">{{item.c}}</text></view></uni-grid-item></uni-grid></view></block><block wx:else><uni-card wx:if="{{g}}" class="data-v-84f783ca" u-s="{{['d']}}" u-i="84f783ca-4" bind:__l="__l" u-p="{{g}}"><uv-skeleton wx:if="{{f}}" class="data-v-84f783ca" u-i="84f783ca-5,84f783ca-4" bind:__l="__l" u-p="{{f}}"></uv-skeleton></uni-card></block><view class="card-title web-text-heading data-v-84f783ca">热门培训</view><block wx:if="{{h}}"><view class="course-list data-v-84f783ca"><block wx:for="{{i}}" wx:for-item="item" wx:key="k"><view class="course-item data-v-84f783ca" bindtap="{{item.j}}"><uv-image wx:if="{{item.b}}" class="data-v-84f783ca" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-image><view class="course-info data-v-84f783ca"><uv-text wx:if="{{item.d}}" class="course-name data-v-84f783ca" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></uv-text><uv-text wx:if="{{item.f}}" class="course-name web-text-secondary data-v-84f783ca" u-i="{{item.e}}" bind:__l="__l" u-p="{{item.f}}"></uv-text><view class="flex justify-between w-full data-v-84f783ca"><uv-text wx:if="{{item.h}}" class="course-name web-text-danger data-v-84f783ca" u-i="{{item.g}}" bind:__l="__l" u-p="{{item.h}}"></uv-text><view class="data-v-84f783ca"><uv-text wx:if="{{j}}" class="web-text-secondary px-2 data-v-84f783ca" u-i="{{item.i}}" bind:__l="__l" u-p="{{j}}"></uv-text></view></view></view></view></block></view></block><block wx:else><uni-card wx:if="{{s}}" class="data-v-84f783ca" u-s="{{['d']}}" u-i="84f783ca-11" bind:__l="__l" u-p="{{s}}"><uv-skeleton wx:if="{{k}}" class="data-v-84f783ca" u-i="84f783ca-12,84f783ca-11" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" class="data-v-84f783ca" u-i="84f783ca-13,84f783ca-11" bind:__l="__l" u-p="{{l}}"></uv-gap><uv-skeleton wx:if="{{m}}" class="data-v-84f783ca" u-i="84f783ca-14,84f783ca-11" bind:__l="__l" u-p="{{m}}"></uv-skeleton><uv-gap wx:if="{{n}}" class="data-v-84f783ca" u-i="84f783ca-15,84f783ca-11" bind:__l="__l" u-p="{{n}}"></uv-gap><uv-skeleton wx:if="{{o}}" class="data-v-84f783ca" u-i="84f783ca-16,84f783ca-11" bind:__l="__l" u-p="{{o}}"></uv-skeleton><uv-gap wx:if="{{p}}" class="data-v-84f783ca" u-i="84f783ca-17,84f783ca-11" bind:__l="__l" u-p="{{p}}"></uv-gap><uv-skeleton wx:if="{{q}}" class="data-v-84f783ca" u-i="84f783ca-18,84f783ca-11" bind:__l="__l" u-p="{{q}}"></uv-skeleton><uv-gap wx:if="{{r}}" class="data-v-84f783ca" u-i="84f783ca-19,84f783ca-11" bind:__l="__l" u-p="{{r}}"></uv-gap></uni-card></block></view>
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.card-title.data-v-84f783ca {
|
||||
width: 700rpx;
|
||||
margin: 12rpx auto;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.course-list.data-v-84f783ca {
|
||||
width: 700rpx;
|
||||
margin: auto !important;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.course-list .course-item.data-v-84f783ca {
|
||||
width: 335rpx;
|
||||
margin: 16rpx 0;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.course-list .course-item .course-info.data-v-84f783ca {
|
||||
padding: 10rpx 16rpx;
|
||||
line-height: 35rpx;
|
||||
}
|
||||
.course-list .course-item .price-bar.data-v-84f783ca {
|
||||
padding: 0 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.item-list.data-v-84f783ca {
|
||||
width: 720rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.merchant-card-title.data-v-84f783ca {
|
||||
width: 700rpx;
|
||||
margin: 12rpx auto;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.card-body.data-v-84f783ca {
|
||||
width: 700rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.card-body .merchant-card.data-v-84f783ca {
|
||||
margin: 12rpx auto;
|
||||
border-radius: 10rpx;
|
||||
border-color: slategrey;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-body .merchant-card .merchant-image.data-v-84f783ca {
|
||||
width: 45vw;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
}
|
||||
.card-body .merchant-card .merchant-name.data-v-84f783ca {
|
||||
padding: 10rpx;
|
||||
overflow: hidden;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.card-body .merchant-card .merchant-desc.data-v-84f783ca {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_booking_course_index = require("../../api/booking/course/index.js");
|
||||
const api_booking_item_index = require("../../api/booking/item/index.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
categoryId: 0,
|
||||
categoryName: "",
|
||||
list: [],
|
||||
// 骨架屏
|
||||
hideTools: true,
|
||||
// 项目列表
|
||||
itemList: []
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option) {
|
||||
this.categoryId = option.categoryId;
|
||||
this.categoryName = option.categoryName;
|
||||
common_vendor.index.setNavigationBarTitle({
|
||||
title: option.categoryName
|
||||
});
|
||||
}
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
reload() {
|
||||
const app = this;
|
||||
Promise.all([app.getCourseList(), app.getItemList()]).then((res) => {
|
||||
console.log("res: ", res);
|
||||
app.list = res[0];
|
||||
app.itemList = res[1];
|
||||
app.hideTools = false;
|
||||
});
|
||||
},
|
||||
getCourseList() {
|
||||
const { categoryId } = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
api_booking_course_index.pageCourse({ categoryId }).then((result) => {
|
||||
resolve(result.list);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
getItemList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_booking_item_index.listItem({}).then((result) => {
|
||||
resolve(result);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
openUrl(url) {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
|
||||
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
|
||||
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
(_easycom_uv_gap2 + _easycom_uv_image2 + _easycom_uv_text2 + _easycom_uv_skeleton2 + _easycom_uni_card2)();
|
||||
}
|
||||
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
|
||||
const _easycom_uv_text = () => "../../uni_modules/uv-text/components/uv-text/uv-text.js";
|
||||
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_gap + _easycom_uv_image + _easycom_uv_text + _easycom_uv_skeleton + _easycom_uni_card)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: !$data.hideTools
|
||||
}, !$data.hideTools ? {
|
||||
b: common_vendor.p({
|
||||
height: "5"
|
||||
}),
|
||||
c: common_vendor.f($data.list, (item, index, i0) => {
|
||||
return {
|
||||
a: "312c4c39-1-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.image,
|
||||
width: "200",
|
||||
height: "110"
|
||||
}),
|
||||
c: "312c4c39-2-" + i0,
|
||||
d: "312c4c39-3-" + i0,
|
||||
e: common_vendor.p({
|
||||
size: "15",
|
||||
lines: 1,
|
||||
text: item.courseName
|
||||
}),
|
||||
f: "312c4c39-4-" + i0,
|
||||
g: common_vendor.p({
|
||||
size: "13",
|
||||
text: `${item.classPeriod}课时`
|
||||
}),
|
||||
h: "312c4c39-5-" + i0,
|
||||
i: common_vendor.p({
|
||||
mode: "price",
|
||||
color: "#ff0000",
|
||||
text: `${item.price}`
|
||||
}),
|
||||
j: "312c4c39-6-" + i0,
|
||||
k: "312c4c39-7-" + i0,
|
||||
l: common_vendor.o(($event) => $options.openUrl(`/package/course/detail?id=` + item.courseId), index),
|
||||
m: index
|
||||
};
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
height: "5"
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
text: `1.3km`
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
height: "5"
|
||||
})
|
||||
} : {
|
||||
g: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
i: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-312c4c39"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/list.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "课程列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
|
||||
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
|
||||
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text",
|
||||
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card"
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="data-v-312c4c39"><block wx:if="{{a}}"><uv-gap wx:if="{{b}}" class="data-v-312c4c39" u-i="312c4c39-0" bind:__l="__l" u-p="{{b}}"></uv-gap><view class="course-list data-v-312c4c39"><block wx:for="{{c}}" wx:for-item="item" wx:key="m"><view class="course-item data-v-312c4c39" bindtap="{{item.l}}"><uv-image wx:if="{{item.b}}" class="data-v-312c4c39" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-image><uv-gap wx:if="{{d}}" class="data-v-312c4c39" u-i="{{item.c}}" bind:__l="__l" u-p="{{d}}"></uv-gap><uv-text wx:if="{{item.e}}" class="course-name data-v-312c4c39" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"></uv-text><uv-text wx:if="{{item.g}}" class="course-name web-text-secondary data-v-312c4c39" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"></uv-text><view class="flex justify-between w-full data-v-312c4c39"><uv-text wx:if="{{item.i}}" class="course-name web-text-danger data-v-312c4c39" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"></uv-text><view class="data-v-312c4c39"><uv-text wx:if="{{e}}" class="web-text-secondary px-2 data-v-312c4c39" u-i="{{item.j}}" bind:__l="__l" u-p="{{e}}"></uv-text></view></view><uv-gap wx:if="{{f}}" class="data-v-312c4c39" u-i="{{item.k}}" bind:__l="__l" u-p="{{f}}"></uv-gap></view></block></view></block><block wx:else><uni-card wx:if="{{o}}" class="data-v-312c4c39" u-s="{{['d']}}" u-i="312c4c39-8" bind:__l="__l" u-p="{{o}}"><uv-skeleton wx:if="{{g}}" class="data-v-312c4c39" u-i="312c4c39-9,312c4c39-8" bind:__l="__l" u-p="{{g}}"></uv-skeleton><uv-gap wx:if="{{h}}" class="data-v-312c4c39" u-i="312c4c39-10,312c4c39-8" bind:__l="__l" u-p="{{h}}"></uv-gap><uv-skeleton wx:if="{{i}}" class="data-v-312c4c39" u-i="312c4c39-11,312c4c39-8" bind:__l="__l" u-p="{{i}}"></uv-skeleton><uv-gap wx:if="{{j}}" class="data-v-312c4c39" u-i="312c4c39-12,312c4c39-8" bind:__l="__l" u-p="{{j}}"></uv-gap><uv-skeleton wx:if="{{k}}" class="data-v-312c4c39" u-i="312c4c39-13,312c4c39-8" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" class="data-v-312c4c39" u-i="312c4c39-14,312c4c39-8" bind:__l="__l" u-p="{{l}}"></uv-gap><uv-skeleton wx:if="{{m}}" class="data-v-312c4c39" u-i="312c4c39-15,312c4c39-8" bind:__l="__l" u-p="{{m}}"></uv-skeleton><uv-gap wx:if="{{n}}" class="data-v-312c4c39" u-i="312c4c39-16,312c4c39-8" bind:__l="__l" u-p="{{n}}"></uv-gap></uni-card></block></view>
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.card-title.data-v-312c4c39 {
|
||||
width: 700rpx;
|
||||
margin: 12rpx auto;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.course-list.data-v-312c4c39 {
|
||||
width: 700rpx;
|
||||
margin: auto !important;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.course-list .course-item.data-v-312c4c39 {
|
||||
width: 335rpx;
|
||||
margin: 16rpx 0;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.course-list .course-item .course-name.data-v-312c4c39 {
|
||||
line-height: 1.4rem;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
.course-list .course-item .price-bar.data-v-312c4c39 {
|
||||
padding: 0 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.item-list.data-v-312c4c39 {
|
||||
width: 720rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.merchant-card-title.data-v-312c4c39 {
|
||||
width: 700rpx;
|
||||
margin: 12rpx auto;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.card-body.data-v-312c4c39 {
|
||||
width: 700rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.card-body .merchant-card.data-v-312c4c39 {
|
||||
margin: 12rpx auto;
|
||||
border-radius: 10rpx;
|
||||
border-color: slategrey;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-body .merchant-card .merchant-image.data-v-312c4c39 {
|
||||
width: 45vw;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
}
|
||||
.card-body .merchant-card .merchant-name.data-v-312c4c39 {
|
||||
padding: 10rpx;
|
||||
overflow: hidden;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.card-body .merchant-card .merchant-desc.data-v-312c4c39 {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
+438
@@ -0,0 +1,438 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_shop_userAddress_index = require("../../api/shop/userAddress/index.js");
|
||||
require("../../utils/request.js");
|
||||
const regionsData = require("../../regions-data.js");
|
||||
const utils_common = require("../../utils/common.js");
|
||||
const store_modules_user = require("../../store/modules/user.js");
|
||||
const store_modules_car = require("../../store/modules/car.js");
|
||||
const userStore = store_modules_user.useUserStore();
|
||||
const carStore = store_modules_car.useCarStore();
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
statusBarHeight: 104,
|
||||
isLogin: false,
|
||||
form: {
|
||||
name: "",
|
||||
phone: ""
|
||||
},
|
||||
// 表单数据
|
||||
formData: {},
|
||||
fields: {},
|
||||
logo: "",
|
||||
bookingUser: {},
|
||||
server: [],
|
||||
order: [],
|
||||
defaultData: [{
|
||||
text: "默认学员",
|
||||
value: true
|
||||
}],
|
||||
typeData: [
|
||||
{
|
||||
text: "家",
|
||||
value: "家"
|
||||
},
|
||||
{
|
||||
text: "公司",
|
||||
value: "公司"
|
||||
},
|
||||
{
|
||||
text: "学校",
|
||||
value: "学校"
|
||||
}
|
||||
],
|
||||
regions: regionsData.regions,
|
||||
dataTree: [
|
||||
{
|
||||
text: "一年级",
|
||||
value: "1-0",
|
||||
children: [
|
||||
{
|
||||
text: "1.1班",
|
||||
value: "1-1"
|
||||
},
|
||||
{
|
||||
text: "1.2班",
|
||||
value: "1-2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "二年级",
|
||||
value: "2-0",
|
||||
children: [
|
||||
{
|
||||
text: "2.1班",
|
||||
value: "2-1"
|
||||
},
|
||||
{
|
||||
text: "2.2班",
|
||||
value: "2-2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "三年级",
|
||||
value: "3-0",
|
||||
disable: true
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
// 对name字段进行必填验证
|
||||
name: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: "请输入收件人名称"
|
||||
}]
|
||||
},
|
||||
phone: {
|
||||
rules: [{
|
||||
required: true,
|
||||
format: "number",
|
||||
errorMessage: "请输入正确的手机号码"
|
||||
}]
|
||||
},
|
||||
address: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: "请输入详情地址"
|
||||
}]
|
||||
},
|
||||
region: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: "请选择所在地区"
|
||||
}, {
|
||||
validateFunction: function(rule, value, data, callback) {
|
||||
console.log("value: ", value);
|
||||
if (value.length < 2) {
|
||||
callback("请至少勾选两个兴趣爱好");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload(e) {
|
||||
const app = this;
|
||||
const userInfo = await userStore.fetchUserInfo();
|
||||
if (Object.keys(userInfo).length > 0) {
|
||||
app.isLogin = true;
|
||||
app.userInfo = userInfo;
|
||||
} else {
|
||||
app.isLogin = false;
|
||||
}
|
||||
api_shop_userAddress_index.pageUserAddress({
|
||||
userId: userInfo.userId
|
||||
}).then((res) => {
|
||||
app.list = res.list;
|
||||
});
|
||||
},
|
||||
navTo(item) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
}
|
||||
utils_common.openUrl(item);
|
||||
},
|
||||
// 弹出登录提示框
|
||||
openLogin() {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
onType(e) {
|
||||
this.formData.type = e.detail.value;
|
||||
},
|
||||
onIsDefault() {
|
||||
this.formData.isDefault = !this.formData.isDefault;
|
||||
},
|
||||
// 选用该地址
|
||||
onAddres(item) {
|
||||
carStore.setAddress(item);
|
||||
common_vendor.index.navigateBack();
|
||||
},
|
||||
add() {
|
||||
this.formData = {};
|
||||
this.$refs.addForm.open("center");
|
||||
},
|
||||
openEdit(item) {
|
||||
this.formData = item;
|
||||
this.$refs.addForm.open("center");
|
||||
},
|
||||
remove(item) {
|
||||
const app = this;
|
||||
common_vendor.index.showModal({
|
||||
title: "确定要删除吗?",
|
||||
success(o) {
|
||||
if (o.confirm) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "请求中."
|
||||
});
|
||||
api_shop_userAddress_index.removeUserAddress(item.id).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "操作成功",
|
||||
icon: "none"
|
||||
});
|
||||
app.$refs.addForm.close();
|
||||
app.reload();
|
||||
});
|
||||
app.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 触发提交表单
|
||||
submit() {
|
||||
this.$refs.form.validate().then((res) => {
|
||||
const saveOrUpdate = this.formData.id ? api_shop_userAddress_index.updateUserAddress : api_shop_userAddress_index.addUserAddress;
|
||||
saveOrUpdate(this.formData).then((message) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "保存成功",
|
||||
icon: "success"
|
||||
});
|
||||
this.$refs.addForm.close();
|
||||
this.reload();
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
console.log("表单数据信息:", res);
|
||||
}).catch((err) => {
|
||||
console.log("表单错误信息:", err);
|
||||
});
|
||||
},
|
||||
save() {
|
||||
api_shop_userAddress_index.addUserAddress(this.form).then((msg) => {
|
||||
common_vendor.index.showToast({
|
||||
title: msg,
|
||||
icon: "none"
|
||||
});
|
||||
this.$refs.addForm.close();
|
||||
this.reload();
|
||||
}).catch(() => {
|
||||
common_vendor.index.showToast({
|
||||
title: "请检查您的网络.",
|
||||
icon: "none"
|
||||
});
|
||||
common_vendor.index.hideLoading();
|
||||
this.$refs.addForm.close();
|
||||
this.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
|
||||
const _easycom_uni_tag2 = common_vendor.resolveComponent("uni-tag");
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
|
||||
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
|
||||
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
|
||||
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
|
||||
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
|
||||
const _easycom_uni_data_picker2 = common_vendor.resolveComponent("uni-data-picker");
|
||||
const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
|
||||
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
(_easycom_uv_avatar2 + _easycom_uni_tag2 + _easycom_uni_icons2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_button2 + _easycom_ws_login2 + _easycom_uv_input2 + _easycom_uni_forms_item2 + _easycom_uni_data_picker2 + _easycom_uni_data_checkbox2 + _easycom_uni_forms2 + _easycom_uni_popup2)();
|
||||
}
|
||||
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
|
||||
const _easycom_uni_tag = () => "../../uni_modules/uni-tag/components/uni-tag/uni-tag.js";
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
|
||||
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
|
||||
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
|
||||
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
|
||||
const _easycom_uni_forms_item = () => "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js";
|
||||
const _easycom_uni_data_picker = () => "../../uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.js";
|
||||
const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
|
||||
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.js";
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_avatar + _easycom_uni_tag + _easycom_uni_icons + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_button + _easycom_ws_login + _easycom_uv_input + _easycom_uni_forms_item + _easycom_uni_data_picker + _easycom_uni_data_checkbox + _easycom_uni_forms + _easycom_uni_popup)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f($data.list, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: "0e16bb55-3-" + i0 + "," + ("0e16bb55-2-" + i0),
|
||||
b: common_vendor.p({
|
||||
text: item.type,
|
||||
fontSize: "12",
|
||||
size: "32",
|
||||
randomBgColor: true
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: common_vendor.t(item.phone),
|
||||
e: item.isDefault
|
||||
}, item.isDefault ? {
|
||||
f: "0e16bb55-4-" + i0 + "," + ("0e16bb55-2-" + i0),
|
||||
g: common_vendor.p({
|
||||
text: "默认",
|
||||
size: "mini",
|
||||
inverted: true,
|
||||
type: "success"
|
||||
})
|
||||
} : {}, {
|
||||
h: common_vendor.o(($event) => $options.openEdit(item), index),
|
||||
i: "0e16bb55-5-" + i0 + "," + ("0e16bb55-2-" + i0),
|
||||
j: "0e16bb55-2-" + i0 + ",0e16bb55-1",
|
||||
k: index
|
||||
});
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
type: "compose",
|
||||
size: "18"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
cellStyle: {
|
||||
padding: "10px 0"
|
||||
}
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
customStyle: {
|
||||
backgroundColor: "#ffffff"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
}),
|
||||
f: common_vendor.o($options.add),
|
||||
g: common_vendor.p({
|
||||
customStyle: {
|
||||
background: "linear-gradient(to right, #70b915, #008e04)",
|
||||
borderRadius: "30px",
|
||||
color: "#ffffff"
|
||||
},
|
||||
text: "添加学员"
|
||||
}),
|
||||
h: common_vendor.sr("login", "0e16bb55-7"),
|
||||
i: common_vendor.o($options.reload),
|
||||
j: common_vendor.p({
|
||||
logo: $data.logo
|
||||
}),
|
||||
k: common_vendor.o(($event) => $data.formData.name = $event),
|
||||
l: common_vendor.p({
|
||||
placeholder: "收件人姓名",
|
||||
maxlength: "5",
|
||||
modelValue: $data.formData.name
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
label: "收件人",
|
||||
name: "name",
|
||||
required: true
|
||||
}),
|
||||
n: common_vendor.o(($event) => $data.formData.phone = $event),
|
||||
o: common_vendor.p({
|
||||
placeholder: "收件人手机号码",
|
||||
maxlength: "11",
|
||||
modelValue: $data.formData.phone
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
label: "手机号码",
|
||||
name: "phone",
|
||||
required: true
|
||||
}),
|
||||
q: common_vendor.o(_ctx.onchange),
|
||||
r: common_vendor.o(_ctx.onnodeclick),
|
||||
s: common_vendor.o(_ctx.onpopupopened),
|
||||
t: common_vendor.o(_ctx.onpopupclosed),
|
||||
v: common_vendor.o(($event) => $data.formData.region = $event),
|
||||
w: common_vendor.p({
|
||||
placeholder: "省、市、区、街道",
|
||||
["popup-title"]: "请选择所在地区",
|
||||
localdata: $data.regions,
|
||||
map: {
|
||||
text: "label",
|
||||
value: "value"
|
||||
},
|
||||
modelValue: $data.formData.region
|
||||
}),
|
||||
x: common_vendor.p({
|
||||
label: "所在地区",
|
||||
name: "region",
|
||||
required: true
|
||||
}),
|
||||
y: common_vendor.o(($event) => $data.formData.address = $event),
|
||||
z: common_vendor.p({
|
||||
placeholder: "小区、写字楼、门牌号等",
|
||||
modelValue: $data.formData.address
|
||||
}),
|
||||
A: common_vendor.p({
|
||||
label: "详细地址",
|
||||
name: "address",
|
||||
required: true
|
||||
}),
|
||||
B: common_vendor.o($options.onType),
|
||||
C: common_vendor.o(($event) => $data.formData.type = $event),
|
||||
D: common_vendor.p({
|
||||
mode: "tag",
|
||||
localdata: $data.typeData,
|
||||
modelValue: $data.formData.type
|
||||
}),
|
||||
E: common_vendor.p({
|
||||
label: "标签",
|
||||
name: "type"
|
||||
}),
|
||||
F: common_vendor.o($options.onIsDefault),
|
||||
G: common_vendor.o(($event) => $data.formData.isDefault = $event),
|
||||
H: common_vendor.p({
|
||||
localdata: $data.defaultData,
|
||||
modelValue: $data.formData.isDefault
|
||||
}),
|
||||
I: $data.formData.id
|
||||
}, $data.formData.id ? {
|
||||
J: common_vendor.p({
|
||||
type: "trash"
|
||||
}),
|
||||
K: common_vendor.o(($event) => $options.remove($data.formData))
|
||||
} : {}, {
|
||||
L: common_vendor.p({
|
||||
name: "isDefault"
|
||||
}),
|
||||
M: common_vendor.o($options.submit),
|
||||
N: common_vendor.p({
|
||||
customStyle: {
|
||||
background: "linear-gradient(to right, #70b915, #008e04)",
|
||||
borderRadius: "30px",
|
||||
color: "#ffffff"
|
||||
},
|
||||
text: "保存"
|
||||
}),
|
||||
O: common_vendor.sr("form", "0e16bb55-10,0e16bb55-9"),
|
||||
P: common_vendor.p({
|
||||
modelValue: $data.formData,
|
||||
rules: $data.rules,
|
||||
["label-width"]: 80
|
||||
}),
|
||||
Q: common_vendor.p({
|
||||
title: "添加学员",
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: "10px 6px"
|
||||
}),
|
||||
R: common_vendor.sr("addForm", "0e16bb55-8"),
|
||||
S: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/student.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"navigationBarTitleText": "学员管理",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
|
||||
"uni-tag": "../../uni_modules/uni-tag/components/uni-tag/uni-tag",
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
|
||||
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
|
||||
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
|
||||
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login",
|
||||
"uv-input": "../../uni_modules/uv-input/components/uv-input/uv-input",
|
||||
"uni-forms-item": "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item",
|
||||
"uni-data-picker": "../../uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker",
|
||||
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
|
||||
"uni-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms",
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="page"><uni-card wx:if="{{e}}" u-s="{{['d']}}" u-i="0e16bb55-0" bind:__l="__l" u-p="{{e}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{d}}" u-s="{{['d']}}" u-i="0e16bb55-1,0e16bb55-0" bind:__l="__l" u-p="{{d}}"><block wx:for="{{a}}" wx:for-item="item" wx:key="k"><uv-cell wx:if="{{c}}" u-s="{{['icon','title','right-icon']}}" u-i="{{item.j}}" bind:__l="__l" u-p="{{c}}"><uv-avatar u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}" slot="icon"></uv-avatar><view class="title-bar" slot="title"><text class="web-text-heading" style="font-weight:700">{{item.c}}</text><text class="web-text-secondary">{{item.d}}</text><uni-tag wx:if="{{item.e}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"></uni-tag></view><uni-icons style="color:#999999" bindclick="{{item.h}}" u-i="{{item.i}}" bind:__l="__l" u-p="{{b}}" slot="right-icon"></uni-icons></uv-cell></block></uv-cell-group></view></view></uni-card><view class="btn-bar"><uv-button wx:if="{{g}}" class="save-user-profile" bindclick="{{f}}" u-i="0e16bb55-6" bind:__l="__l" u-p="{{g}}"></uv-button></view><ws-login wx:if="{{j}}" class="r" u-r="login" binddone="{{i}}" u-i="0e16bb55-7" bind:__l="__l" u-p="{{j}}"/><uni-popup wx:if="{{S}}" class="r" u-s="{{['d']}}" u-r="addForm" u-i="0e16bb55-8" bind:__l="__l" u-p="{{S}}"><uni-card wx:if="{{Q}}" u-s="{{['d']}}" u-i="0e16bb55-9,0e16bb55-8" bind:__l="__l" u-p="{{Q}}"><uni-forms wx:if="{{P}}" class="r" u-s="{{['d']}}" u-r="form" u-i="0e16bb55-10,0e16bb55-9" bind:__l="__l" u-p="{{P}}"><uni-forms-item wx:if="{{m}}" u-s="{{['d']}}" u-i="0e16bb55-11,0e16bb55-10" bind:__l="__l" u-p="{{m}}"><uv-input wx:if="{{l}}" u-i="0e16bb55-12,0e16bb55-11" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{p}}" u-s="{{['d']}}" u-i="0e16bb55-13,0e16bb55-10" bind:__l="__l" u-p="{{p}}"><uv-input wx:if="{{o}}" u-i="0e16bb55-14,0e16bb55-13" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{x}}" u-s="{{['d']}}" u-i="0e16bb55-15,0e16bb55-10" bind:__l="__l" u-p="{{x}}"><uni-data-picker wx:if="{{w}}" bindchange="{{q}}" bindnodeclick="{{r}}" bindpopupopened="{{s}}" bindpopupclosed="{{t}}" u-i="0e16bb55-16,0e16bb55-15" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"></uni-data-picker></uni-forms-item><uni-forms-item wx:if="{{A}}" u-s="{{['d']}}" u-i="0e16bb55-17,0e16bb55-10" bind:__l="__l" u-p="{{A}}"><uv-input wx:if="{{z}}" u-i="0e16bb55-18,0e16bb55-17" bind:__l="__l" bindupdateModelValue="{{y}}" u-p="{{z}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{E}}" u-s="{{['d']}}" u-i="0e16bb55-19,0e16bb55-10" bind:__l="__l" u-p="{{E}}"><uni-data-checkbox wx:if="{{D}}" bindchange="{{B}}" u-i="0e16bb55-20,0e16bb55-19" bind:__l="__l" bindupdateModelValue="{{C}}" u-p="{{D}}"></uni-data-checkbox></uni-forms-item><uni-forms-item wx:if="{{L}}" u-s="{{['d']}}" u-i="0e16bb55-21,0e16bb55-10" bind:__l="__l" u-p="{{L}}"><view class="web-cell"><uni-data-checkbox wx:if="{{H}}" bindclick="{{F}}" u-i="0e16bb55-22,0e16bb55-21" bind:__l="__l" bindupdateModelValue="{{G}}" u-p="{{H}}"></uni-data-checkbox><view wx:if="{{I}}" class="del-btn" bindtap="{{K}}"><uni-icons wx:if="{{J}}" u-s="{{['d']}}" class="web-cell" style="color:#999999" u-i="0e16bb55-23,0e16bb55-21" bind:__l="__l" u-p="{{J}}"><text class="web-text-danger" style="font-size:22rpx;padding-left:4rpx">删除</text></uni-icons></view></view></uni-forms-item><uv-button wx:if="{{N}}" class="add-address" bindclick="{{M}}" u-i="0e16bb55-24,0e16bb55-10" bind:__l="__l" u-p="{{N}}"></uv-button></uni-forms></uni-card></uni-popup></view>
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
|
||||
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 */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.avatar {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.save-user-profile {
|
||||
width: 700rpx;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
.add-address {
|
||||
width: 600rpx !important;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
.btn-bar {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
margin: auto;
|
||||
clear: both;
|
||||
}
|
||||
.title-bar {
|
||||
display: flex;
|
||||
}
|
||||
.title-bar .web-text-heading {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.title-bar .web-text-secondary {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user