已支付订单列表:where.payStatus = 1;

This commit is contained in:
2024-07-10 22:44:18 +08:00
parent 9dd834adb5
commit 1311eb03b8
611 changed files with 92828 additions and 400 deletions
+16
View File
@@ -0,0 +1,16 @@
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
+26
View File
@@ -0,0 +1,26 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageCard(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/card/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getCard(id) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/card/" + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getCard = getCard;
exports.pageCard = pageCard;
+16
View File
@@ -0,0 +1,16 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageCoupon(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/coupon/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.pageCoupon = pageCoupon;
+26
View File
@@ -0,0 +1,26 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageCourse(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/course/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getCourse(id) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/course/" + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getCourse = getCourse;
exports.pageCourse = pageCourse;
+37
View File
@@ -0,0 +1,37 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageEmergency(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/emergency/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function addEmergency(data) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/booking/emergency",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function removeEmergency(id) {
const res = await utils_request.http.delete(
config_setting.MODULES_API_URL + "/booking/emergency/" + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
exports.addEmergency = addEmergency;
exports.pageEmergency = pageEmergency;
exports.removeEmergency = removeEmergency;
+26
View File
@@ -0,0 +1,26 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function listField(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/field",
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function verification(orderNo) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/field/verification/" + orderNo
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.listField = listField;
exports.verification = verification;
+27
View File
@@ -0,0 +1,27 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function addIntegral(data) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/booking/integral",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function getSignData(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/integral/getSignData",
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.addIntegral = addIntegral;
exports.getSignData = getSignData;
+16
View File
@@ -0,0 +1,16 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function listItem(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/item",
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.listItem = listItem;
+26
View File
@@ -0,0 +1,26 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageMatch(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/match/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getMatch(id) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/match/" + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getMatch = getMatch;
exports.pageMatch = pageMatch;
+27
View File
@@ -0,0 +1,27 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageMatchOrder(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/match-order/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function addBatchMatchOrder(data) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/booking/match-order/batch",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
exports.addBatchMatchOrder = addBatchMatchOrder;
exports.pageMatchOrder = pageMatchOrder;
+16
View File
@@ -0,0 +1,16 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function listPeriod(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/period",
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.listPeriod = listPeriod;
+16
View File
@@ -0,0 +1,16 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageStudent(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/student/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.pageStudent = pageStudent;
+39
View File
@@ -0,0 +1,39 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function findUseCard(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-card/findUseCard",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function pageUserCard(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-card/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getUserCard(id) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-card/" + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.findUseCard = findUseCard;
exports.getUserCard = getUserCard;
exports.pageUserCard = pageUserCard;
+16
View File
@@ -0,0 +1,16 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageUserCardLog(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-card-log/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.pageUserCardLog = pageUserCardLog;
+51
View File
@@ -0,0 +1,51 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function data() {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-coupon/data",
{}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function pageUserCoupon(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-coupon/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function listUserCoupon(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-coupon",
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function addUserCoupon(data2) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/booking/user-coupon",
data2
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
exports.addUserCoupon = addUserCoupon;
exports.data = data;
exports.listUserCoupon = listUserCoupon;
exports.pageUserCoupon = pageUserCoupon;
+69
View File
@@ -0,0 +1,69 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageUserInvoice(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-invoice/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function addUserInvoice(data) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/booking/user-invoice",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function updateUserInvoice(data) {
const res = await utils_request.http.put(
config_setting.MODULES_API_URL + "/booking/user-invoice",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function removeUserInvoice(id) {
const res = await utils_request.http.delete(
config_setting.MODULES_API_URL + "/booking/user-invoice/" + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function doInvoice(data) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/booking/user-invoice/doInvoice",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function showInvoice(orderNo) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/booking/user-invoice/showInvoice/" + orderNo
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.addUserInvoice = addUserInvoice;
exports.doInvoice = doInvoice;
exports.pageUserInvoice = pageUserInvoice;
exports.removeUserInvoice = removeUserInvoice;
exports.showInvoice = showInvoice;
exports.updateUserInvoice = updateUserInvoice;
+27
View File
@@ -0,0 +1,27 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function updateUsers(data) {
const res = await utils_request.http.put(
config_setting.MODULES_API_URL + "/shop/users",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function getByPhone(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/users/getByPhone",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getByPhone = getByPhone;
exports.updateUsers = updateUsers;
+24
View File
@@ -0,0 +1,24 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageArticle(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/cms/article/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getArticle(id) {
const res = await utils_request.http.get(config_setting.MODULES_API_URL + "/cms/article/" + id);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getArticle = getArticle;
exports.pageArticle = pageArticle;
+29
View File
@@ -0,0 +1,29 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageMpMenu(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/cms/mp-menu/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function listMpMenu(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/cms/mp-menu",
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.listMpMenu = listMpMenu;
exports.pageMpMenu = pageMpMenu;
+37
View File
@@ -0,0 +1,37 @@
"use strict";
const utils_request = require("../../utils/request.js");
const config_setting = require("../../config/setting.js");
async function getSiteInfo() {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/cms/website/getSiteInfo"
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getUserInfo() {
const res = await utils_request.http.get(config_setting.SERVER_API_URL + "/auth/user");
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getNext7day() {
const res = await utils_request.http.get(config_setting.MODULES_API_URL + "/cms/website/getNext7day");
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getServerTime() {
const res = await utils_request.http.get(config_setting.MODULES_API_URL + "/cms/website/getServerTime");
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getNext7day = getNext7day;
exports.getServerTime = getServerTime;
exports.getSiteInfo = getSiteInfo;
exports.getUserInfo = getUserInfo;
+2
View File
@@ -0,0 +1,2 @@
"use strict";
require("../../../utils/request.js");
+35
View File
@@ -0,0 +1,35 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function sendSmsCaptcha(data) {
const res = await utils_request.http.post("/sendSmsCaptcha", data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function getWxOpenId(data) {
const res = await utils_request.http.post(config_setting.SERVER_API_URL + "/wx-login/getWxOpenId", data);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function updatePayPassword(data) {
const res = await utils_request.http.put(config_setting.SERVER_API_URL + "/auth/updatePayPassword", data);
if (res.data.code === 0) {
return res.data.message ?? "修改成功";
}
return Promise.reject(new Error(res.data.message));
}
async function checkPayPassword(data) {
const res = await utils_request.http.post(config_setting.SERVER_API_URL + "/auth/checkPayPassword", data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
exports.checkPayPassword = checkPayPassword;
exports.getWxOpenId = getWxOpenId;
exports.sendSmsCaptcha = sendSmsCaptcha;
exports.updatePayPassword = updatePayPassword;
+26
View File
@@ -0,0 +1,26 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageGoods(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/goods/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getGoods(id) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/goods/" + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getGoods = getGoods;
exports.pageGoods = pageGoods;
+16
View File
@@ -0,0 +1,16 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageGoodsCategory(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/goods-category/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.pageGoodsCategory = pageGoodsCategory;
+31
View File
@@ -0,0 +1,31 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageMerchant(params) {
const res = await utils_request.http.get(config_setting.MODULES_API_URL + "/shop/merchant/page", {
params
});
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function listMerchant(params) {
const res = await utils_request.http.get(config_setting.MODULES_API_URL + "/shop/merchant", {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getMerchant(id) {
const res = await utils_request.http.get(config_setting.MODULES_API_URL + "/shop/merchant/" + id);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.getMerchant = getMerchant;
exports.listMerchant = listMerchant;
exports.pageMerchant = pageMerchant;
+58
View File
@@ -0,0 +1,58 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageOrder(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/order/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function addOrder(data) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/shop/order",
data
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function updateOrder(data) {
const res = await utils_request.http.put(
config_setting.MODULES_API_URL + "/shop/order",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function getOrder(id) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/order/" + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function getByOrderNo(orderNo) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/order/getByOrderNo/" + orderNo
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.addOrder = addOrder;
exports.getByOrderNo = getByOrderNo;
exports.getOrder = getOrder;
exports.pageOrder = pageOrder;
exports.updateOrder = updateOrder;
+48
View File
@@ -0,0 +1,48 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageUserAddress(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/user-address/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
async function addUserAddress(data) {
const res = await utils_request.http.post(
config_setting.MODULES_API_URL + "/shop/user-address",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function updateUserAddress(data) {
const res = await utils_request.http.put(
config_setting.MODULES_API_URL + "/shop/user-address",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
async function removeUserAddress(id) {
const res = await utils_request.http.delete(
config_setting.MODULES_API_URL + "/shop/user-address/" + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
exports.addUserAddress = addUserAddress;
exports.pageUserAddress = pageUserAddress;
exports.removeUserAddress = removeUserAddress;
exports.updateUserAddress = updateUserAddress;
+14
View File
@@ -0,0 +1,14 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function updateUsers(data) {
const res = await utils_request.http.put(
config_setting.MODULES_API_URL + "/shop/users",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
exports.updateUsers = updateUsers;
+16
View File
@@ -0,0 +1,16 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageWechatDeposit(params) {
const res = await utils_request.http.get(
config_setting.MODULES_API_URL + "/shop/wechat-deposit/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.pageWechatDeposit = pageWechatDeposit;
+2
View File
@@ -0,0 +1,2 @@
"use strict";
require("../../../utils/request.js");
@@ -0,0 +1,2 @@
"use strict";
require("../../../utils/request.js");
+51
View File
@@ -0,0 +1,51 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
const computeSignature = (accessKeySecret, canonicalString) => {
return common_vendor.crypto.enc.Base64.stringify(common_vendor.crypto.HmacSHA1(canonicalString, accessKeySecret));
};
async function uploadOssByPath(filePath) {
return new Promise(async (resolve, reject) => {
const date = /* @__PURE__ */ new Date();
date.setMinutes(date.getMinutes() + 1);
const policyText = {
expiration: date.toISOString(),
// 设置policy过期时间。
conditions: [
// 限制上传大小。
["content-length-range", 0, 1024 * 1024 * 1024]
]
};
let sts = common_vendor.index.getStorageSync("sts");
let stsExpired = common_vendor.index.getStorageSync("stsExpiredAt");
if (!sts || stsExpired && common_vendor.dayjs().isBefore(common_vendor.dayjs(stsExpired))) {
const { data: { data: { credentials } } } = await utils_request.http.get(`${config_setting.SERVER_API_URL}/oss/getSTSToken`);
common_vendor.index.setStorageSync("sts", credentials);
common_vendor.index.setStorageSync("stsExpiredAt", credentials.expiration);
sts = credentials;
}
console.log(sts);
const [filename, ext] = filePath.split(".");
const key = `headers/${common_vendor.md5(filename + Math.random() * 1e5)}.${ext}`;
const policy = common_vendor.gBase64.encode(JSON.stringify(policyText));
const signature = computeSignature(sts.accessKeySecret, policy);
common_vendor.index.uploadFile({
url: "https://oss.wsdns.cn",
name: "file",
filePath,
formData: {
key,
policy,
OSSAccessKeyId: sts.accessKeyId,
signature,
"x-oss-security-token": sts.securityToken
},
success: () => {
resolve(`https://oss.wsdns.cn/${key}`);
},
error: (err) => reject(err)
});
});
}
exports.uploadOssByPath = uploadOssByPath;
+13
View File
@@ -0,0 +1,13 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function select(params) {
const res = await utils_request.http.get(config_setting.SERVER_API_URL + "/system/payment/select", {
params
});
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.select = select;
+13
View File
@@ -0,0 +1,13 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function updatePointsBySign() {
const res = await utils_request.http.post(
config_setting.SERVER_API_URL + "/system/user/updatePointsBySign"
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
exports.updatePointsBySign = updatePointsBySign;
+11
View File
@@ -0,0 +1,11 @@
"use strict";
const utils_request = require("../../../utils/request.js");
const config_setting = require("../../../config/setting.js");
async function pageUserBalanceLog(params) {
const res = await utils_request.http.get(config_setting.MODULES_API_URL + "/shop/user-balance-log/page", { params });
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
exports.pageUserBalanceLog = pageUserBalanceLog;
+83
View File
@@ -0,0 +1,83 @@
"use strict";
const common_vendor = require("./common/vendor.js");
require("./utils/request.js");
const store_index = require("./store/index.js");
const utils_permission = require("./utils/permission.js");
require("./store/modules/user.js");
const uni_modules_uvUiTools_index = require("./uni_modules/uv-ui-tools/index.js");
if (!Math) {
"./pages/index/index.js";
"./pages/shop/shop.js";
"./pages/order/order.js";
"./pages/user/user.js";
"./package/user/personal.js";
"./package/user/emergency.js";
"./package/user/coupon.js";
"./package/user/integral.js";
"./package/user/invoice.js";
"./package/user/invoice-edit.js";
"./package/user/invoice-show.js";
"./package/user/balance-log.js";
"./package/user/card.js";
"./package/user/card-detail.js";
"./package/user/card-detail-merchant.js";
"./package/user/card-detail-about.js";
"./package/user/card-detail-record.js";
"./package/user/pay-password.js";
"./package/user/address.js";
"./package/user/ic-card.js";
"./package/user/ic-card-order.js";
"./package/order/index.js";
"./package/user/qrcode.js";
"./package/goods/detail.js";
"./package/goods/checkout.js";
"./package/goods/order.js";
"./package/card/index.js";
"./package/card/checkout.js";
"./package/article/index.js";
"./package/article/detail.js";
"./package/booking/merchant.js";
"./package/booking/index.js";
"./package/booking/checkout.js";
"./package/booking/confirm.js";
"./package/booking/cashier.js";
"./package/order/detail.js";
"./package/course/index.js";
"./package/course/list.js";
"./package/course/detail.js";
"./package/course/checkout.js";
"./package/course/student.js";
"./package/admin/index.js";
"./package/admin/order-scan.js";
"./package/admin/field.js";
"./package/teacher/detail.js";
"./package/match/index.js";
"./package/match/detail.js";
"./package/match/checkout.js";
"./package/cooperate/index.js";
"./package/coupon/index.js";
}
const _sfc_main = {
onLaunch: async function() {
console.log("App Launch");
common_vendor.index.getSystemInfo({
success(data) {
console.log(data);
console.log("data.navigationStyle: ", data.navigationStyle);
}
});
},
onShow: async function() {
console.log("App Show");
},
onHide: function() {
console.log("App Hide");
}
};
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/App.vue"]]);
const app = common_vendor.createApp(App);
app.use(store_index.store);
app.use(utils_permission.permission);
app.use(uni_modules_uvUiTools_index.uvUI);
app.use(common_vendor.createPinia());
app.mount("#app");
+101
View File
@@ -0,0 +1,101 @@
{
"pages": [
"pages/index/index",
"pages/shop/shop",
"pages/order/order",
"pages/user/user"
],
"subPackages": [
{
"root": "package",
"pages": [
"user/personal",
"user/emergency",
"user/coupon",
"user/integral",
"user/invoice",
"user/invoice-edit",
"user/invoice-show",
"user/balance-log",
"user/card",
"user/card-detail",
"user/card-detail-merchant",
"user/card-detail-about",
"user/card-detail-record",
"user/pay-password",
"user/address",
"user/ic-card",
"user/ic-card-order",
"order/index",
"user/qrcode",
"goods/detail",
"goods/checkout",
"goods/order",
"card/index",
"card/checkout",
"article/index",
"article/detail",
"booking/merchant",
"booking/index",
"booking/checkout",
"booking/confirm",
"booking/cashier",
"order/detail",
"course/index",
"course/list",
"course/detail",
"course/checkout",
"course/student",
"admin/index",
"admin/order-scan",
"admin/field",
"teacher/detail",
"match/index",
"match/detail",
"match/checkout",
"cooperate/index",
"coupon/index"
]
}
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "webSoft",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#000000",
"selectedColor": "#d81e06",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png",
"text": "首页"
},
{
"pagePath": "pages/shop/shop",
"iconPath": "static/tabbar/shop.png",
"selectedIconPath": "static/tabbar/shop-active.png",
"text": "商城"
},
{
"pagePath": "pages/order/order",
"iconPath": "static/tabbar/order.png",
"selectedIconPath": "static/tabbar/order-active.png",
"text": "订单"
},
{
"pagePath": "pages/user/user",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user-active.png",
"text": "我的"
}
]
},
"lazyCodeLoading": "requiredComponents",
"usingComponents": {}
}
+2695
View File
File diff suppressed because one or more lines are too long
+21509
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
"use strict";
const TENANT_ID = 10150;
const MODULES_API_URL = "https://modules.gxwebsoft.com/api";
const API_BASE_URL = "https://server.gxwebsoft.com/api";
const SERVER_API_URL = "https://server.gxwebsoft.com/api";
exports.API_BASE_URL = API_BASE_URL;
exports.MODULES_API_URL = MODULES_API_URL;
exports.SERVER_API_URL = SERVER_API_URL;
exports.TENANT_ID = TENANT_ID;
+521
View File
@@ -0,0 +1,521 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_layout_index = require("../../api/layout/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
require("../../utils/request.js");
const api_booking_period_index = require("../../api/booking/period/index.js");
const store_modules_car = require("../../store/modules/car.js");
const utils_common = require("../../utils/common.js");
const carStore = store_modules_car.useCarStore();
const { orderInfo, totalPrice, carNum, merchant, type, dateTime, childrenPrice } = common_vendor.storeToRefs(carStore);
const _sfc_main = {
data() {
return {
// 场馆ID
merchantId: 0,
// 场馆信息
merchant,
// 未来7天
next7day: [],
// 预定信息
orderInfo,
// 订单总金额
totalPrice,
// 儿童票价
childrenPrice,
// 预定日期
dateTime: null,
merchantList: [],
currentId: 0,
// 0全场 1半场
type: 0,
// 星期几
week: 0,
// 是否可以预定半场
isHalf: 0,
// 服务器时间
serverTime: {},
items: ["全场", "半场"],
// 搜索条件
where: {},
// 时段
periodList: [],
// 场地
fieldList: [],
// 选中的场地
selection: [],
// 是否已登录
isLogin: false,
// 是否同意协议
disabled: false,
// 购物车信息
showCarInfo: false
};
},
onLoad() {
this.reload();
},
onShow() {
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
this.isLogin = true;
}
},
computed: {
totalPrice() {
const app = this;
let totalPrice2 = 0;
app.selection.map((d) => {
totalPrice2 = totalPrice2 + d.price;
});
carStore.totalPrice = totalPrice2;
console.log("totalPrice: ", totalPrice2);
return totalPrice2;
},
carNum() {
return this.selection.length;
}
},
methods: {
async reload() {
const app = this;
await app.getMerchantList();
common_vendor.index.showLoading({
title: "数据读取中."
});
Promise.all([app.getServerTime(), app.getNext7day(), app.getMerchant()]).then((res) => {
const serverTime = res[0];
const next7day = res[1];
const merchant2 = res[2];
app.serverTime = serverTime;
app.next7day = next7day;
app.merchant = merchant2;
common_vendor.index.setNavigationBarTitle({
title: merchant2.merchantName
});
carStore.setMerchant(merchant2);
app.next7day = next7day.map((d, i) => {
if (!app.dateTime && i == 0) {
app.dateTime = d.dateTime;
app.week = d.week;
carStore.dateTime = d.dateTime;
}
d.name = utils_common.getWeek(d.week);
d.value = d.date;
return d;
});
app.getBookingPeriod();
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
});
},
back() {
common_vendor.index.navigateBack();
},
goBack() {
return common_vendor.index.navigateTo({
url: "/package/admin/index"
});
},
getMerchantList() {
this.merchantList = common_vendor.index.getStorageSync("merchantList");
if (this.merchantList.length > 0) {
this.merchantId = this.merchantList[0].value;
}
if (common_vendor.index.getStorageSync("currentId")) {
this.merchantId = common_vendor.index.getStorageSync("currentId");
}
},
onDisabled() {
this.disabled = !this.disabled;
},
onDateTime(e) {
console.log("e: ", e);
this.week = e.week;
this.dateTime = e.dateTime;
carStore.dateTime = e.dateTime;
carStore.orderInfo = [];
this.selection = [];
this.reload();
},
onType(e) {
const index = e.currentIndex;
if (index == 0) {
this.type = 0;
this.isHalf = 0;
}
if (index == 1) {
this.type = 1;
this.isHalf = 1;
}
this.reload();
},
getMerchant() {
return new Promise((resolve, reject) => {
api_shop_merchant_index.getMerchant(this.merchantId).then((result) => {
resolve(result);
}).catch(reject);
});
},
getServerTime() {
return new Promise((resolve, reject) => {
api_layout_index.getServerTime().then((result) => {
resolve(result);
}).catch(reject);
});
},
getNext7day() {
return new Promise((resolve, reject) => {
api_layout_index.getNext7day().then((result) => {
resolve(result);
}).catch(reject);
});
},
// getBookingField() {
// FieldApi.listField({
// merchantId: this.merchantId,
// isStatus: 1,
// isHalf: this.isHalf,
// dateTime: `${this.dateTime}`
// }).then(list => {
// this.fieldList = list;
// })
// },
getBookingPeriod() {
const now = /* @__PURE__ */ new Date();
now.getHours();
now.getMinutes();
const week = this.week === 0 ? 7 : this.week;
api_booking_period_index.listPeriod({
merchantId: this.merchantId,
isStatus: 0,
week,
dateTime: `${this.dateTime}`,
half: this.isHalf
}).then((list) => {
this.periodList = list;
common_vendor.index.hideLoading();
}).catch((err) => {
this.periodList = [];
common_vendor.index.showToast({
title: err.message,
icon: "none"
});
common_vendor.index.hideLoading();
if (err.message === "您还有未支付订单,请先支付") {
setTimeout(() => {
return common_vendor.index.switchTab({
url: "/pages/order/order"
});
}, 1e3);
}
});
},
callPhone(phone) {
common_vendor.index.makePhoneCall({
phoneNumber: phone
});
},
openCarInfo() {
this.$refs.popup.open("bottom");
},
closeCarInfo() {
this.$refs.popup.close();
},
onMap() {
common_vendor.index.getLocation({
type: "gcj02",
//返回可以用于uni.openLocation的经纬度
success: function(res) {
console.log("返回可以用于uni.openLocation的经纬度: ", res);
const latitude = this.merchant.latitude;
const longitude = this.merchant.longitude;
common_vendor.index.openLocation({
latitude,
longitude,
success: function() {
console.log("success");
}
});
}
});
},
onField(item, period) {
if (item.sold) {
return;
}
const app = this;
const { merchant: merchant2 } = this;
const key = utils_common.getKey(`${this.dateTime}${item.timePeriod}${this.merchantId}${item.fieldId}`);
const index = app.selection.findIndex((d) => d.key === key);
if (index >= 0) {
app.selection.splice(index, 1);
} else {
if (app.selection.length > 1) {
common_vendor.index.showToast({
title: "最多预定两个场地!",
icon: "none"
});
return false;
}
const split = item.timePeriod.split("-");
app.selection.push({
key,
merchantId: this.merchantId,
merchantCode: merchant2.merchantCode,
fieldId: item.fieldId,
fieldName: item.fieldName,
price: item.price,
childrenPrice: period.childrenPrice,
adultNum: 1,
childrenNum: 0,
merchantName: merchant2.merchantName,
isChildren: item.isChildren,
isHalf: this.type,
timePeriod: item.timePeriod,
periodId: item.periodId,
startTime: `${split[0].trim()}:00`,
endTime: `${split[1].trim()}:00`,
orderCode: key,
dateTime: `${this.dateTime}`,
comments: `${this.dateTime} (${utils_common.getWeek(this.week)}) ${item.timePeriod}`
});
console.log(app.selection);
console.log("period: ", period);
console.log("item.isChildren: ", item.isChildren);
if (item.isChildren === 1) {
console.log("item.isChildren2: ", item.isChildren);
carStore.childrenPrice = period.childrenPrice;
} else {
carStore.childrenPrice = 0;
}
carStore.orderInfo = app.selection;
carStore.carNum = app.selection.length;
carStore.totalPrice = totalPrice;
carStore.payPrice = totalPrice;
carStore.setPeriod(period);
}
},
getStratTime(value) {
const split = value.split("-");
const timeText = split[0].replace(" ", "");
const startTime = (/* @__PURE__ */ new Date(`${this.dateTime} ${timeText}:00`)).getTime();
return startTime / 1e3 || 0;
},
isActive(item) {
const index = this.selection.find((d) => d.key === utils_common.getKey(`${this.dateTime}${item.timePeriod}${this.merchantId}${item.fieldId}`));
if (item.sold) {
if (item.isHalf === 1) {
return "web-bg-warning";
}
return "web-bg-info";
}
if (index) {
return "active web-bg-success";
}
},
// isActive(text,item) {
// const index = this.selection.find(d => d.key == getKey(text))
// if(item.sold){
// if(item.isHalf == 1){
// return 'web-bg-warning'
// }
// return 'web-bg-info'
// }
// if (index) {
// return 'active web-bg-success'
// }
// },
remove(item) {
const index = this.selection.findIndex((d) => d.key === item.key);
this.selection.splice(index, 1);
carStore.orderInfo = this.selection;
},
save() {
common_vendor.index.$uv.route({
url: "/package/booking/confirm"
});
}
}
};
if (!Array) {
const _easycom_ws_select_merchant2 = common_vendor.resolveComponent("ws-select-merchant");
const _easycom_uv_tabs2 = common_vendor.resolveComponent("uv-tabs");
const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
const _easycom_uv_badge2 = common_vendor.resolveComponent("uv-badge");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_count_to2 = common_vendor.resolveComponent("uv-count-to");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
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_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_ws_select_merchant2 + _easycom_uv_tabs2 + _easycom_uni_segmented_control2 + _easycom_uv_badge2 + _easycom_uv_gap2 + _easycom_uv_icon2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_uni_icons2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uni_popup2 + _easycom_ws_login2)();
}
const _easycom_ws_select_merchant = () => "../../uni_modules/ws-select-merchant/components/ws-select-merchant/ws-select-merchant.js";
const _easycom_uv_tabs = () => "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs.js";
const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
const _easycom_uv_badge = () => "../../uni_modules/uv-badge/components/uv-badge/uv-badge.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.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_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_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_ws_select_merchant + _easycom_uv_tabs + _easycom_uni_segmented_control + _easycom_uv_badge + _easycom_uv_gap + _easycom_uv_icon + _easycom_uv_count_to + _easycom_uv_button + _easycom_uni_icons + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uni_popup + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o($options.reload),
b: common_vendor.p({
merchantList: $data.merchantList,
merchantId: $data.merchantId
}),
c: common_vendor.o($options.onDateTime),
d: common_vendor.p({
list: $data.next7day,
itemStyle: {
height: "58px"
},
activeStyle: {
color: "#2ba91c"
},
lineColor: "#2ba91c",
inactiveStyle: {
color: "#808080"
}
}),
e: common_vendor.o($options.onType),
f: common_vendor.p({
current: _ctx.current,
values: $data.items,
activeColor: "#2ba91c",
inActiveColor: "#ff0000"
}),
g: common_vendor.p({
isDot: true,
type: "blank"
}),
h: common_vendor.p({
isDot: true,
type: "info"
}),
i: common_vendor.p({
isDot: true,
type: "success"
}),
j: common_vendor.p({
isDot: true,
type: "warning"
}),
k: $data.periodList.length > 0
}, $data.periodList.length > 0 ? {
l: common_vendor.f($data.periodList, (item, index, i0) => {
return {
a: common_vendor.t(item.timePeriod),
b: common_vendor.f(item.fieldList, (field, index2, i1) => {
return {
a: common_vendor.t(field.fieldName),
b: common_vendor.n($options.isActive(field)),
c: common_vendor.o(($event) => $options.onField(field, item), index2),
d: index2
};
}),
c: common_vendor.t(item.price),
d: index
};
})
} : {}, {
m: common_vendor.p({
height: "50"
}),
n: common_vendor.p({
name: "shopping-cart",
size: "36",
color: "#ffffff"
}),
o: common_vendor.p({
type: "error",
max: "99",
value: $options.carNum
}),
p: common_vendor.o((...args) => $options.openCarInfo && $options.openCarInfo(...args)),
q: common_vendor.p({
startVal: 0,
decimals: "2",
duration: "100",
color: "#ebcf00",
bold: true,
endVal: $options.totalPrice
}),
r: common_vendor.o($options.save),
s: common_vendor.p({
disabled: $data.orderInfo.length == 0,
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
border: "none",
padding: "22px 30px"
},
text: "下一步"
}),
t: common_vendor.f($data.orderInfo, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.remove(item), index),
b: "788dd7a0-16-" + i0 + "," + ("788dd7a0-15-" + i0),
c: common_vendor.o(($event) => $options.remove(item), index),
d: "788dd7a0-15-" + i0 + ",788dd7a0-14",
e: common_vendor.p({
title: `${item.fieldName} ¥${item.price}`,
label: `${item.dateTime}`,
cellStyle: {
padding: "10px 5px"
}
}),
f: index
};
}),
v: common_vendor.p({
type: "trash",
size: "20",
color: "#f76b4e"
}),
w: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
x: common_vendor.o($options.closeCarInfo),
y: common_vendor.p({
title: `购物车`,
extra: "关闭",
border: false,
["is-shadow"]: false,
padding: 0
}),
z: common_vendor.p({
height: "70"
}),
A: common_vendor.sr("popup", "788dd7a0-12"),
B: common_vendor.sr("login", "788dd7a0-18"),
C: common_vendor.o($options.reload),
D: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-788dd7a0"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/admin/field.vue"]]);
wx.createPage(MiniProgramPage);
+21
View File
@@ -0,0 +1,21 @@
{
"navigationBarTitleText": "场地管理",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"usingComponents": {
"ws-select-merchant": "../../uni_modules/ws-select-merchant/components/ws-select-merchant/ws-select-merchant",
"uv-tabs": "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs",
"uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
"uv-badge": "../../uni_modules/uv-badge/components/uv-badge/uv-badge",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"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",
"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",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-788dd7a0"><ws-select-merchant wx:if="{{b}}" class="data-v-788dd7a0" binddone="{{a}}" u-i="788dd7a0-0" bind:__l="__l" u-p="{{b}}"/><uv-tabs wx:if="{{d}}" class="data-v-788dd7a0" bindchange="{{c}}" u-i="788dd7a0-1" bind:__l="__l" u-p="{{d}}"></uv-tabs><view class="uni-padding-wrap uni-common-mt data-v-788dd7a0"><uni-segmented-control wx:if="{{f}}" class="data-v-788dd7a0" bindclickItem="{{e}}" u-i="788dd7a0-2" bind:__l="__l" u-p="{{f}}"/></view><view class="uni-badge-wrap data-v-788dd7a0"><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{g}}" class="data-v-788dd7a0" u-i="788dd7a0-3" bind:__l="__l" u-p="{{g}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">可预约</text></view><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{h}}" class="data-v-788dd7a0" u-i="788dd7a0-4" bind:__l="__l" u-p="{{h}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">已出售</text></view><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{i}}" class="data-v-788dd7a0" u-i="788dd7a0-5" bind:__l="__l" u-p="{{i}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">我的选择</text></view><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{j}}" class="data-v-788dd7a0" u-i="788dd7a0-6" bind:__l="__l" u-p="{{j}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">已预定半场</text></view></view><view wx:if="{{k}}" class="checkout-body web-text-primary data-v-788dd7a0"><block wx:for="{{l}}" wx:for-item="item" wx:key="d"><view class="period-item data-v-788dd7a0"><view class="period data-v-788dd7a0">{{item.a}}</view><view class="field-list data-v-788dd7a0"><block wx:for="{{item.b}}" wx:for-item="field" wx:key="d"><view class="{{['field', 'data-v-788dd7a0', field.b]}}" bindtap="{{field.c}}"><text class="field-name data-v-788dd7a0">{{field.a}}</text><text class="price data-v-788dd7a0">{{item.c}}元</text></view></block></view></view></block><view class="period-item data-v-788dd7a0" style="display:none"><view class="period data-v-788dd7a0">18:00 - 20:00</view><view class="field-list data-v-788dd7a0"><view class="field web-bg-info data-v-788dd7a0"><text class="field-name data-v-788dd7a0">1号场地</text><text class="price data-v-788dd7a0">580元</text></view><view class="field web-bg-success active data-v-788dd7a0"><text class="field-name data-v-788dd7a0">2号场地</text><text class="price data-v-788dd7a0">580元</text></view><view class="field web-bg-warning data-v-788dd7a0"><text class="field-name data-v-788dd7a0">3号场地</text><text class="price data-v-788dd7a0">580元</text></view></view></view></view></view><uv-gap wx:if="{{m}}" class="data-v-788dd7a0" u-i="788dd7a0-7" bind:__l="__l" u-p="{{m}}"></uv-gap><view class="checkout-car data-v-788dd7a0" style="display:none"><view class="car-selected data-v-788dd7a0" bindtap="{{p}}"><uv-icon wx:if="{{n}}" class="data-v-788dd7a0" u-i="788dd7a0-8" bind:__l="__l" u-p="{{n}}"></uv-icon><uv-badge wx:if="{{o}}" class="data-v-788dd7a0" u-i="788dd7a0-9" bind:__l="__l" u-p="{{o}}"></uv-badge></view><view class="car-total data-v-788dd7a0"><text class="data-v-788dd7a0" style="color:#ebcf00">¥</text><uv-count-to wx:if="{{q}}" class="data-v-788dd7a0" u-i="788dd7a0-10" bind:__l="__l" u-p="{{q}}"></uv-count-to></view><uv-button wx:if="{{s}}" class="save-btn data-v-788dd7a0" bindclick="{{r}}" u-i="788dd7a0-11" bind:__l="__l" u-p="{{s}}"></uv-button></view><uni-popup class="r data-v-788dd7a0" u-s="{{['d']}}" u-r="popup" style="margin-bottom:200px" u-i="788dd7a0-12" bind:__l="__l"><uni-card wx:if="{{y}}" class="data-v-788dd7a0" u-s="{{['d']}}" bindclick="{{x}}" u-i="788dd7a0-13,788dd7a0-12" bind:__l="__l" u-p="{{y}}"><uv-cell-group wx:if="{{w}}" class="data-v-788dd7a0" u-s="{{['d']}}" u-i="788dd7a0-14,788dd7a0-13" bind:__l="__l" u-p="{{w}}"><block wx:for="{{t}}" wx:for-item="item" wx:key="f"><uv-cell wx:if="{{item.e}}" class="data-v-788dd7a0" u-s="{{['right-icon']}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view slot="right-icon"><uni-icons wx:if="{{v}}" class="data-v-788dd7a0" bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{v}}"></uni-icons><text class="web-text-secondary data-v-788dd7a0" style="font-size:24rpx" bindtap="{{item.c}}">移除</text></view></uv-cell></block></uv-cell-group></uni-card><uv-gap wx:if="{{z}}" class="data-v-788dd7a0" u-i="788dd7a0-17,788dd7a0-12" bind:__l="__l" u-p="{{z}}"></uv-gap></uni-popup><ws-login wx:if="{{D}}" class="r data-v-788dd7a0" u-r="login" binddone="{{C}}" u-i="788dd7a0-18" bind:__l="__l" u-p="{{D}}"/>
+194
View File
@@ -0,0 +1,194 @@
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-788dd7a0 {
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-788dd7a0 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
position: relative;
}
.checkout-car .car-total.data-v-788dd7a0 {
display: flex;
color: #ebcf00;
align-items: center;
}
.popup-car-info.data-v-788dd7a0 {
margin-bottom: 100px;
padding: 20rpx;
background-color: #ffffff;
width: 660rpx;
margin: 150rpx auto;
}
.uni-padding-wrap.data-v-788dd7a0 {
width: 180rpx;
margin: 20rpx auto;
}
.uni-badge-wrap.data-v-788dd7a0 {
display: flex;
justify-content: space-around;
}
.uni-badge-wrap .badge-item.data-v-788dd7a0 {
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
}
.uni-badge-wrap .badge-item text.data-v-788dd7a0 {
padding: 2rpx;
}
.uni-badge-wrap .badge-item .web-text-secondary.data-v-788dd7a0 {
padding-left: 8rpx;
}
.checkout-body.data-v-788dd7a0 {
padding: 24rpx;
}
.checkout-body .period-item.data-v-788dd7a0 {
margin: 12rpx 0;
}
.checkout-body .period-item .period.data-v-788dd7a0 {
line-height: 2rem;
padding-left: 12rpx;
font-size: 28rpx;
}
.checkout-body .period-item .field-list.data-v-788dd7a0 {
display: flex;
flex-wrap: wrap;
}
.checkout-body .period-item .field-list .web-bg-info.data-v-788dd7a0 {
background-color: #909399 !important;
color: #ffffff !important;
}
.checkout-body .period-item .field-list .web-bg-success.data-v-788dd7a0 {
color: #2ba91c !important;
border: 1px solid #2ba91c !important;
}
.checkout-body .period-item .field-list .active.data-v-788dd7a0:before {
border-radius: 0 0 12rpx 0;
content: "";
position: absolute;
right: 0;
bottom: 0;
border: 24rpx solid #2ba91c;
border-top-color: transparent;
border-left-color: transparent;
}
.checkout-body .period-item .field-list .active.data-v-788dd7a0:after {
content: "";
width: 5px;
height: 10px;
position: absolute;
right: 3px;
bottom: 4px;
border: 1px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
transform: rotate(45deg);
border-radius: 4rpx;
}
.checkout-body .period-item .field-list .field.data-v-788dd7a0 {
width: 118rpx;
height: 118rpx;
margin: 9rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 16rpx;
line-height: 1.3rem;
position: relative;
color: #333333;
background-color: #ffffff;
border: 1px solid #808080;
}
.checkout-body .period-item .field-list .field .field-name.data-v-788dd7a0 {
font-size: 23rpx;
}
.checkout-body .period-item .field-list .field .price.data-v-788dd7a0 {
font-size: 25rpx;
}
.xieyi.data-v-788dd7a0 {
margin: 30rpx auto;
padding: 20rpx 30rpx;
}
.xieyi .text.data-v-788dd7a0 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-788dd7a0 {
color: #0f80ff;
}
.box-bg.data-v-788dd7a0 {
background-color: #f5f5f5;
padding: 5px 0;
}
.city.data-v-788dd7a0 {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
margin-left: 4px;
}
.input-view.data-v-788dd7a0 {
display: flex;
flex-direction: row;
flex: 1;
background-color: #f8f8f8;
height: 30px;
border-radius: 15px;
padding: 0 15px;
flex-wrap: nowrap;
margin: 7px 0;
line-height: 30px;
}
.input-uni-icon.data-v-788dd7a0 {
line-height: 30px;
}
.nav-bar-input.data-v-788dd7a0 {
height: 30px;
line-height: 30px;
padding: 0 5px;
font-size: 12px;
background-color: #f8f8f8;
}
+247
View File
@@ -0,0 +1,247 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
const api_booking_users_index = require("../../api/booking/users/index.js");
const api_cms_mpMenu_index = require("../../api/cms/mp-menu/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
const api_shop_users_index = require("../../api/shop/users/index.js");
const utils_common = require("../../utils/common.js");
const api_passport_login_index = require("../../api/passport/login/index.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
const tenantStore = store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
orderNo: void 0,
statusBarHeight: 104,
isLogin: false,
userInfo: {},
currMerchant: {},
merchantId: null,
fields: {},
logo: "",
bookingUser: {},
server: [],
order: [],
hideUser: true,
hideTools: true,
// 是否拥有场馆管理员权限
hasMerchantRole: false,
// 是否拥有场馆职员权限
hasMerchantClerkRole: false,
// 是否拥有超级管理员权限
hasSuperAdminRole: false,
scanType: "",
scanResult: ""
};
},
onLoad(option) {
if (option.orderNo) {
this.orderNo = option.orderNo;
}
this.reload();
},
methods: {
async reload(e) {
const app = this;
common_vendor.index.getSystemInfo({
success(data) {
if (data) {
app.statusBarHeight = data.statusBarHeight;
}
}
});
const tenantInfo = await tenantStore.fetchTenantInfo();
app.logo = tenantInfo.websiteLogo;
if (tenantInfo.fields) {
tenantInfo.fields.map((d) => {
const key = d.name;
app.fields[key] = d.value;
});
}
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
if (app.orderNo) {
return common_vendor.index.redirectTo({
url: "/package/admin/order-scan?orderNo=" + app.orderNo
});
}
app.userInfo = userInfo;
common_vendor.index.setStorageSync("user_id", app.userInfo.userId);
app.hasMerchantRole = userInfo.roles.find((d) => d.roleCode === "merchant");
app.hasMerchantClerkRole = userInfo.roles.find((d) => d.roleCode === "merchantClerk");
app.hasSuperAdminRole = userInfo.roles.find((d) => d.roleCode === "superAdmin");
api_shop_merchant_index.pageMerchant({ merchantIds: userInfo.merchants, limit: 50 }).then((res) => {
app.merchantList = res.list.map((d, i) => {
if (i === 0) {
app.currMerchant = d;
app.merchantId = d.merchantId;
}
return {
text: d.merchantName,
value: d.merchantId
};
});
common_vendor.index.setStorageSync("merchantList", app.merchantList);
});
api_booking_users_index.getByPhone({
phone: userInfo.phone
}).then((data) => {
if (data) {
app.hideUser = false;
app.userInfo.ouid = data.userId;
app.userInfo = Object.assign({}, app.userInfo, data);
}
});
} else {
app.isLogin = false;
app.userInfo = {};
}
api_cms_mpMenu_index.pageMpMenu({ type: 4, limit: 100 }).then((res) => {
app.order = res.list.filter((d) => d.rows === 0);
app.server = res.list.filter((d) => d.rows === 0);
app.hideTools = false;
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
app.hideTools = false;
});
common_vendor.index.login({
success: (res) => {
api_passport_login_index.getWxOpenId({
code: res.code
}).then((response) => {
if (!app.userInfo.openid) {
api_shop_users_index.updateUsers({
userId: app.userInfo.ouid,
openid: response.openid,
sessionKey: response.session_key,
unionid: response.unionid
});
}
});
}
});
},
navTo(item) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
} else {
if (item.path === "/package/admin/order-scan") {
common_vendor.index.showModal({
title: "直接使用微信扫一扫功能完成核销"
});
return false;
} else {
utils_common.openUrl(item);
}
}
},
// 弹出登录提示框
openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
},
back() {
common_vendor.index.navigateBack();
},
goBack() {
return common_vendor.index.switchTab({
url: "/pages/user/user"
});
}
}
};
if (!Array) {
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_ws_admin_card2 = common_vendor.resolveComponent("ws-admin-card");
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item");
const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_gap2 + _easycom_ws_admin_card2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_uni_list_item2 + _easycom_uni_list2 + _easycom_ws_login2)();
}
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_ws_admin_card = () => "../../uni_modules/ws-admin-card/components/ws-admin-card/ws-admin-card.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_uni_list_item = () => "../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js";
const _easycom_uni_list = () => "../../uni_modules/uni-list/components/uni-list/uni-list.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_gap + _easycom_ws_admin_card + _easycom_uv_skeleton + _easycom_uni_card + _easycom_uni_list_item + _easycom_uni_list + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
height: "20"
}),
b: common_vendor.o($options.openLogin),
c: common_vendor.p({
merchantList: _ctx.merchantList,
merchantId: $data.merchantId,
data: $data.userInfo,
["is-login"]: $data.isLogin
}),
d: $data.hideTools
}, $data.hideTools ? {
e: common_vendor.p({
rows: "2",
loading: $data.hideTools,
title: false
}),
f: common_vendor.p({
border: false,
padding: "18px 8px"
}),
g: common_vendor.p({
rows: "9",
loading: $data.hideTools,
title: false
}),
h: common_vendor.p({
border: false,
padding: "18px 8px"
})
} : common_vendor.e({
i: $data.hasMerchantRole || $data.hasMerchantClerkRole
}, $data.hasMerchantRole || $data.hasMerchantClerkRole ? {
j: common_vendor.f($data.server, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.color ? item.color : "#333333",
c: common_vendor.o(($event) => $options.navTo(item), index),
d: "2fabd118-8-" + i0 + ",2fabd118-7",
e: common_vendor.p({
thumb: item.icon,
link: true
}),
f: index
};
}),
k: common_vendor.p({
border: false
})
} : {}, {
l: common_vendor.p({
border: false,
padding: 0
}),
m: common_vendor.sr("login", "2fabd118-9"),
n: common_vendor.o($options.reload),
o: common_vendor.p({
logo: $data.logo
}),
p: common_vendor.o((...args) => $options.goBack && $options.goBack(...args))
}));
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/admin/index.vue"]]);
wx.createPage(MiniProgramPage);
+12
View File
@@ -0,0 +1,12 @@
{
"navigationBarTitleText": "管理中心",
"usingComponents": {
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"ws-admin-card": "../../uni_modules/ws-admin-card/components/ws-admin-card/ws-admin-card",
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uni-list-item": "../../uni_modules/uni-list/components/uni-list-item/uni-list-item",
"uni-list": "../../uni_modules/uni-list/components/uni-list/uni-list",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><uv-gap wx:if="{{a}}" u-i="2fabd118-0" bind:__l="__l" u-p="{{a}}"></uv-gap><ws-admin-card wx:if="{{c}}" bindopenLogin="{{b}}" u-i="2fabd118-1" bind:__l="__l" u-p="{{c}}"/><block wx:if="{{d}}"><uni-card wx:if="{{f}}" u-s="{{['d']}}" u-i="2fabd118-2" bind:__l="__l" u-p="{{f}}"><uv-skeleton wx:if="{{e}}" u-i="2fabd118-3,2fabd118-2" bind:__l="__l" u-p="{{e}}"></uv-skeleton></uni-card><uni-card wx:if="{{h}}" u-s="{{['d']}}" u-i="2fabd118-4" bind:__l="__l" u-p="{{h}}"><uv-skeleton wx:if="{{g}}" u-i="2fabd118-5,2fabd118-4" bind:__l="__l" u-p="{{g}}"></uv-skeleton></uni-card></block><block wx:else><uni-card wx:if="{{l}}" u-s="{{['d']}}" u-i="2fabd118-6" bind:__l="__l" u-p="{{l}}"><block wx:if="{{i}}"><view class="server" style="min-height:200px"><uni-list wx:if="{{k}}" u-s="{{['d']}}" u-i="2fabd118-7,2fabd118-6" bind:__l="__l" u-p="{{k}}"><block wx:for="{{j}}" wx:for-item="item" wx:key="f"><uni-list-item wx:if="{{item.e}}" u-s="{{['body']}}" bindclick="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view class="slot-box" slot="body"><text class="slot-text" style="{{'color:' + item.b}}">{{item.a}}</text></view></uni-list-item></block></uni-list></view></block></uni-card><ws-login wx:if="{{o}}" class="r" u-r="login" binddone="{{n}}" u-i="2fabd118-9" bind:__l="__l" u-p="{{o}}"/><view class="logout" bindtap="{{p}}"><view size="20" class="btn">返回</view></view></block></view>
+51
View File
@@ -0,0 +1,51 @@
page {
/* background: url('https://oss.wsdns.cn/20240502/75fc744657544a38a32f83a825688286.png') no-repeat; */
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 */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.uni-section .uni-section-header {
padding: 5px 5px !important;
}
.logout {
width: 300rpx;
margin: 0 auto;
padding: 10rpx 0 20rpx 0;
}
.logout .btn {
display: flex;
justify-content: center;
background-color: #fff;
border-radius: 30rpx;
padding: 12rpx 0;
color: #808080;
}
+352
View File
@@ -0,0 +1,352 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_order_index = require("../../api/shop/order/index.js");
const api_booking_field_index = require("../../api/booking/field/index.js");
const api_shop_wechatDeposit_index = require("../../api/shop/wechatDeposit/index.js");
const store_modules_user = require("../../store/modules/user.js");
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
components: {},
data() {
return {
isLogin: false,
orderNo: "",
userId: 0,
form: {},
where: {
page: 1
},
canReset: false,
loadMore: "more",
logo: "",
items: ["全部订单", "未支付", "已支付", "已完成", "押金"],
orderStatus: ["未使用", "已完成", "已取消", "取消中", "退款申请中", "退款被拒绝", "退款成功", "客户端申请退款"],
payType: [
"余额支付",
"微信支付",
"会员卡支付",
"支付宝",
"现金",
"POS机",
"VIP月卡",
"VIP年卡",
"VIP次卡",
"IC月卡",
"IC年卡",
"IC次卡",
"免费",
"VIP充值卡",
"IC充值卡",
"积分支付",
"VIP季卡",
"IC季卡"
],
orderList: [],
styles: [
{
value: "button",
text: "按钮",
checked: true
},
{
value: "text",
text: "文字"
}
],
colors: ["#333333", "#4cd964", "#dd524d"],
current: 0,
colorIndex: 0,
activeColor: "#108001",
styleType: "text"
};
},
onLoad(option) {
this.orderNo = option.orderNo;
this.logo = common_vendor.index.getStorageSync("app_logo") ? common_vendor.index.getStorageSync("app_logo") : "https://oss.wsdns.cn/20240423/7f6878104a6d4427884721f412ab5441.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90";
this.reload();
},
onShow() {
},
// 触底函数
onReachBottom() {
const app = this;
const { where } = this;
if (app.canReset) {
app.where.page = ++where.page;
app.reload();
}
},
methods: {
async reload() {
const app = this;
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
}
const { where, userId, orderNo } = this;
console.log("userId: ", userId);
where.userId = userId;
api_shop_order_index.getByOrderNo(orderNo).then((data) => {
app.form = data;
if (data.orderStatus == 1) {
common_vendor.index.setNavigationBarTitle({
title: "订单核销"
});
}
common_vendor.index.hideLoading();
}).catch((err) => {
console.log("err: ", err);
app.form = {};
common_vendor.index.hideLoading();
});
},
onClickItem(e) {
const app = this;
const { where, userId } = this;
const index = e.currentIndex;
if (this.current !== e.currentIndex) {
this.current = e.currentIndex;
}
if (userId == 0) {
app.openLogin();
return;
}
if (index == 0) {
where.payStatus = void 0;
where.orderStatus = void 0;
}
if (index == 1) {
where.payStatus = 2;
}
if (index == 2) {
where.payStatus = 1;
}
if (index == 3) {
where.orderStatus = 1;
}
if (index == 4) {
api_shop_wechatDeposit_index.pageWechatDeposit({
uid: common_vendor.index.getStorageSync("user_id")
}).then((res) => {
console.log("res: ", res);
app.orderList = res.list;
});
return false;
}
this.reload();
},
// 弹出登录提示框
// openLogin() {
// if (!this.isLogin) {
// this.$refs.login.open('bottom');
// return false;
// }
// },
// 弹出登录提示框
async openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
}
},
save() {
const app = this;
const { orderNo } = this;
common_vendor.index.showLoading({
title: "请求中."
});
api_booking_field_index.verification(orderNo).then((res) => {
common_vendor.index.showToast({
title: "核销成功",
icon: "success"
});
common_vendor.index.hideLoading();
app.reload();
}).catch((res) => {
common_vendor.index.showToast({
title: res.message || "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
app.reload();
});
}
}
};
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_parse2 = common_vendor.resolveComponent("uv-parse");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_parse2 + _easycom_uv_gap2 + _easycom_uv_button2 + _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_parse = () => "../../uni_modules/uv-parse/components/uv-parse/uv-parse.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.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";
if (!Math) {
(_easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_parse + _easycom_uv_gap + _easycom_uv_button + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.isLogin
}, $data.isLogin ? common_vendor.e({
b: common_vendor.p({
title: `${$data.form.merchantName}`,
label: ` `,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
border: false
}),
c: common_vendor.f($data.form.orderInfo, (item, index, i0) => {
return {
a: "6e3de76a-3-" + i0 + ",6e3de76a-1",
b: common_vendor.p({
title: `${item.fieldName}`,
label: `${item.comments}`,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
value: `¥${item.price}`,
border: false
}),
c: index
};
}),
d: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
e: common_vendor.t($data.form.totalPrice),
f: common_vendor.t($data.form.payPrice),
g: common_vendor.p({
title: "预定信息",
border: false,
["is-shadow"]: false,
padding: 0
}),
h: $data.form.orderNo
}, $data.form.orderNo ? common_vendor.e({
i: common_vendor.p({
title: `姓名`,
value: `${$data.form.realName}`,
cellStyle: {
padding: "8px"
}
}),
j: common_vendor.p({
title: `手机号码`,
value: `${$data.form.phone}`,
cellStyle: {
padding: "8px"
}
}),
k: common_vendor.p({
title: `订单号`,
value: `${$data.form.orderId}`,
cellStyle: {
padding: "8px"
}
}),
l: common_vendor.p({
content: $data.form.orderNo,
selectable: true
}),
m: common_vendor.p({
title: `订单编号`,
cellStyle: {
padding: "8px"
}
}),
n: $data.form.orderStatus == 0
}, $data.form.orderStatus == 0 ? {
o: common_vendor.t(`${$data.orderStatus[$data.form.orderStatus]}`)
} : {}, {
p: $data.form.orderStatus == 1
}, $data.form.orderStatus == 1 ? {
q: common_vendor.t(`${$data.orderStatus[$data.form.orderStatus]}`)
} : {}, {
r: common_vendor.p({
title: `订单状态`,
cellStyle: {
padding: "8px"
}
}),
s: common_vendor.p({
title: `下单时间`,
value: `${$data.form.createTime}`,
cellStyle: {
padding: "8px"
}
}),
t: common_vendor.p({
title: `支付方式`,
value: `${$data.payType[$data.form.payType]}`,
cellStyle: {
padding: "8px"
}
}),
v: common_vendor.p({
title: `优惠说明`,
value: `${$data.form.couponDesc ? $data.form.couponDesc : "无"}`,
cellStyle: {
padding: "8px"
},
border: false
}),
w: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff",
padding: "8px 0"
},
border: false
}),
x: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
})
}) : {}, {
y: common_vendor.p({
height: "20"
}),
z: $data.form.orderStatus == 0
}, $data.form.orderStatus == 0 ? {
A: common_vendor.o($options.save),
B: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "确认核销"
})
} : {}) : {
C: common_vendor.o($options.openLogin),
D: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "请先登录"
}),
E: common_vendor.sr("login", "6e3de76a-18"),
F: common_vendor.o($options.reload),
G: common_vendor.p({
logo: $data.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/admin/order-scan.vue"]]);
wx.createPage(MiniProgramPage);
+14
View File
@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "订单核销",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"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-parse": "../../uni_modules/uv-parse/components/uv-parse/uv-parse",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="order"><uni-card wx:if="{{g}}" u-s="{{['d']}}" u-i="6e3de76a-0" bind:__l="__l" u-p="{{g}}"><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="6e3de76a-1,6e3de76a-0" bind:__l="__l" u-p="{{d}}"><uv-cell wx:if="{{b}}" u-i="6e3de76a-2,6e3de76a-1" bind:__l="__l" u-p="{{b}}"/><block wx:for="{{c}}" wx:for-item="item" wx:key="c"><uv-cell wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"/></block></uv-cell-group></view></view><view slot="actions" class="card-actions"><view class="web-text-heading">合计:¥{{e}}</view><view class="web-text-danger">实付:¥{{f}}</view></view></uni-card><block wx:if="{{h}}"><uni-card wx:if="{{x}}" u-s="{{['d']}}" u-i="6e3de76a-4" bind:__l="__l" u-p="{{x}}"><view class="web-cell web-cell-align-top"><uv-cell-group wx:if="{{w}}" u-s="{{['d']}}" u-i="6e3de76a-5,6e3de76a-4" bind:__l="__l" u-p="{{w}}"><uv-cell wx:if="{{i}}" u-i="6e3de76a-6,6e3de76a-5" bind:__l="__l" u-p="{{i}}"/><uv-cell wx:if="{{j}}" u-i="6e3de76a-7,6e3de76a-5" bind:__l="__l" u-p="{{j}}"/><uv-cell wx:if="{{k}}" u-i="6e3de76a-8,6e3de76a-5" bind:__l="__l" u-p="{{k}}"/><uv-cell wx:if="{{m}}" u-s="{{['value']}}" u-i="6e3de76a-9,6e3de76a-5" bind:__l="__l" u-p="{{m}}"><uv-parse u-i="6e3de76a-10,6e3de76a-9" bind:__l="__l" u-p="{{l}}" slot="value"></uv-parse></uv-cell><uv-cell wx:if="{{r}}" u-s="{{['value']}}" u-i="6e3de76a-11,6e3de76a-5" bind:__l="__l" u-p="{{r}}"><view slot="value"><text wx:if="{{n}}" class="web-text-primary">{{o}}</text><text wx:if="{{p}}" class="web-text-success">{{q}}</text></view></uv-cell><uv-cell wx:if="{{s}}" u-i="6e3de76a-12,6e3de76a-5" bind:__l="__l" u-p="{{s}}"/><uv-cell wx:if="{{t}}" u-i="6e3de76a-13,6e3de76a-5" bind:__l="__l" u-p="{{t}}"/><uv-cell wx:if="{{v}}" u-i="6e3de76a-14,6e3de76a-5" bind:__l="__l" u-p="{{v}}"/></uv-cell-group></view></uni-card></block><uv-gap wx:if="{{y}}" u-i="6e3de76a-15" bind:__l="__l" u-p="{{y}}"></uv-gap><view wx:if="{{z}}" class="save-btn"><uv-button wx:if="{{B}}" bindclick="{{A}}" u-i="6e3de76a-16" bind:__l="__l" u-p="{{B}}"></uv-button></view></view><view wx:else><view class="login-bar"><view class="login-btn"><uv-button wx:if="{{D}}" bindclick="{{C}}" u-i="6e3de76a-17" bind:__l="__l" u-p="{{D}}"></uv-button></view></view><ws-login wx:if="{{G}}" class="r" u-r="login" binddone="{{F}}" u-i="6e3de76a-18" bind:__l="__l" u-p="{{G}}"/></view>
+120
View File
@@ -0,0 +1,120 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content {
display: flex;
justify-content: center;
align-items: center;
height: 150px;
text-align: center;
}
.content-text {
font-size: 14px;
color: #666;
}
.color-tag {
width: 25px;
height: 25px;
}
.uni-list {
flex: 1;
}
.order .order-title {
padding: 20rpx 0;
border-bottom: 1px #eee solid;
}
.order .order-title .merchant-avatar {
margin-right: 12rpx;
}
.order .order-title .btn-status {
font-size: 30rpx;
display: flex;
}
.order .order-body {
padding: 16px 0;
}
.ele-flex {
display: flex;
justify-content: space-between;
}
.card-actions {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0 10px;
align-items: center;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions .web-text-heading {
font-size: 30rpx;
font-weight: 500;
}
.card-actions .web-text-danger {
font-size: 30rpx;
font-weight: 500;
}
.card-actions-item {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item-text {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.btn-status {
font-size: 30rpx;
display: flex;
}
.close {
top: 60rpx !important;
}
.save-btn {
width: 700rpx;
left: 25rpx;
height: 80rpx;
position: fixed;
bottom: 30rpx;
}
.qrcode {
margin-top: 30rpx;
text-align: center;
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
}
.login-bar {
width: 600rpx;
height: 40vh;
margin: auto;
display: flex;
}
.login-bar .login-btn {
width: 500rpx;
margin: auto;
}
+63
View File
@@ -0,0 +1,63 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_cms_article_index = require("../../api/cms/article/index.js");
const _sfc_main = {
data() {
return {
articleId: 0,
record: {}
};
},
onLoad(e) {
const {
articleId,
id
} = e;
if (id) {
this.articleId = id;
}
if (articleId) {
this.articleId = articleId;
}
this.getArticle();
},
methods: {
getArticle() {
api_cms_article_index.getArticle(this.articleId).then((data) => {
data.content = this.formatRichText(data.content);
this.record = data;
common_vendor.index.setNavigationBarTitle({
title: data.title
});
});
},
formatRichText(html) {
let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
match = match.replace(/style="[^"]+"/gi, "").replace(/style='[^']+'/gi, "");
match = match.replace(/width="[^"]+"/gi, "").replace(/width='[^']+'/gi, "");
match = match.replace(/height="[^"]+"/gi, "").replace(/height='[^']+'/gi, "");
return match;
});
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
match = match.replace(/width:[^;]+;/gi, "max-width:100%;").replace(
/width:[^;]+;/gi,
"max-width:100%;"
);
return match;
});
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
newContent = newContent.replace(
/\<img/gi,
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
);
return newContent;
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.record.content
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a9e7a8d0"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/article/detail.vue"]]);
wx.createPage(MiniProgramPage);
+5
View File
@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "文章详情",
"enablePullDownRefresh": false,
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<view class="article-content data-v-a9e7a8d0"><rich-text class="data-v-a9e7a8d0" nodes="{{a}}"/></view>
+29
View File
@@ -0,0 +1,29 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.article-content.data-v-a9e7a8d0 {
padding: 20rpx;
line-height: 1.8rem;
}
+89
View File
@@ -0,0 +1,89 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_cms_article_index = require("../../api/cms/article/index.js");
const _sfc_main = {
data() {
return {
id: 0,
list: []
};
},
onLoad(e) {
const {
id
} = e;
api_cms_article_index.pageArticle({
categoryId: id
}).then((res) => {
if (res.count > 0) {
this.list = res.list;
const item = res.list[0];
common_vendor.index.setNavigationBarTitle({
title: item.categoryName
});
}
});
},
methods: {
openUrl(url) {
common_vendor.index.navigateTo({
url
});
}
}
};
if (!Array) {
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
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");
(_easycom_uv_image2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2)();
}
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.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";
if (!Math) {
(_easycom_uv_image + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "3d2471db-3-" + i0 + "," + ("3d2471db-2-" + i0),
b: common_vendor.p({
src: item.image,
width: "80px",
height: "80px"
}),
c: common_vendor.o(($event) => $options.openUrl("/package/article/detail?id=" + item.articleId), index),
d: "3d2471db-2-" + i0 + "," + ("3d2471db-1-" + i0),
e: common_vendor.p({
title: `${item.title}`,
label: item.createTime,
cellStyle: {
padding: "8px"
},
border: false
}),
f: "3d2471db-1-" + i0 + "," + ("3d2471db-0-" + i0),
g: "3d2471db-0-" + i0,
h: index
};
}),
b: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff",
padding: "8px 0"
},
border: false
}),
c: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/article/index.vue"]]);
wx.createPage(MiniProgramPage);
+10
View File
@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "文章列表",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
"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"
}
}
+1
View File
@@ -0,0 +1 @@
<view><block wx:for="{{a}}" wx:for-item="item" wx:key="h"><uni-card wx:if="{{c}}" u-s="{{['d']}}" u-i="{{item.g}}" bind:__l="__l" u-p="{{c}}"><view class="web-cell web-cell-align-top"><uv-cell-group wx:if="{{b}}" u-s="{{['d']}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{b}}"><uv-cell wx:if="{{item.e}}" u-s="{{['value']}}" bindclick="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><uv-image u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}" slot="value"></uv-image></uv-cell></uv-cell-group></view></uni-card></block></view>
View File
+378
View File
@@ -0,0 +1,378 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_goods_index = require("../../api/shop/goods/index.js");
const api_layout_index = require("../../api/layout/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
require("../../utils/request.js");
const api_booking_field_index = require("../../api/booking/field/index.js");
const api_booking_period_index = require("../../api/booking/period/index.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
const tenantStore = store_modules_tenant.useTenantStore();
const lineBg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAOCAYAAABdC15GAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFxSURBVHgBzZNRTsJAEIb/WTW+lpiY+FZPIDew3ABP4GJ8hxsI9zBpOYHeQDwBPQI+mRiRvpLojtPdYhCorQqF/6GdbGd2vvwzBXZcNAt4oj1ANeUoAT5iqkUjbEFLHNmhD1YPEvpZ3ghkGlVDCkc94/BmHMq998I5ONiY1ZBfpKAyuOtgAc5yOEDmYEWNh32BHF91sGHZHmwW4azciN9aQwnz3SJEgOmte+R2tdLprTYoa50mvuomlLpD4Y3oQZnov6D2RzCqI93bWOHaEmAGqQUyRBlZR1WfarcD/EJ2z8DtzDGvsMCwpm8XOCfDUsVOCYhiqRxI/CTQo4UOvjzO7Pow18vfywneuUHHUUxLn55lLw5JFpZ8bEUcY8oXdOLWiHLTxvoGpLqoUmy6dBT15o/ox3znpoycAmxUsiJTbs1cmxeVKp+0zmFIS7bGWiVghC7Vwse8jFKAX9eljh4ggKLLv7uaQvG9/F59Oo2SouxPu7OTCxN/s8wAAAAASUVORK5CYII=";
const _sfc_main = {
data() {
return {
id: 0,
list: [{
name: "周三",
value: "05月08日"
}, {
name: "周四",
value: "05月09日"
}, {
name: "周五",
value: "05月10日"
}, {
name: "周六",
value: "05月11日"
}, {
name: "周日",
value: "05月12日"
}, {
name: "周一",
value: "05月13日"
}, {
name: "周二",
value: "05月14日"
}],
week: 0,
items: ["全场", "半场"],
lineBg,
// 时段
periodList: [],
// 场地
fieldList: [],
order: [],
// 订单总金额
total: 0,
keys: [],
// 场馆列表
merchant: {},
// 网站参数
fields: {},
// 幻灯片广告
ads: [],
// 小程序导航图标
navigation: [],
// 小程序导航图标(双排)
doubleNavigation: [],
isLogin: false,
disabled: false,
styleType: {
color: "#ff0000"
},
activeColor: {
color: "#303133"
}
};
},
onLoad(option) {
this.id = option.id;
this.reload();
},
computed: {
total() {
const app2 = this;
app2.total = 0;
app2.order.map((d) => {
console.log(d.totalPrice);
app2.total = app2.total + d.totalPrice;
});
return app2.total;
}
},
methods: {
async reload() {
const app2 = this;
const info = await tenantStore.fetchTenantInfo();
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
app2.isLogin = true;
}
if (info.fields) {
info.fields.map((d) => {
const key = d.name;
app2.fields[key] = d.value;
});
}
if (info.serverTime) {
this.week = info.serverTime.week;
}
if (info.websiteLogo) {
common_vendor.index.setStorageSync("app_logo", info.websiteLogo);
app2.logo = info.websiteLogo;
}
if (info.mpMenus) {
console.log("info.mpMenus: ", info.mpMenus);
const arr = info.mpMenus.filter((d) => d.type == 2 && d.rows == 0);
const arr1 = info.mpMenus.filter((d) => d.type == 2 && d.rows == 1);
const arr2 = info.mpMenus.filter((d) => d.type == 2 && d.rows == 2);
if (arr) {
app2.navigation = arr;
}
if (arr1) {
app2.doubleNavigation.push(arr1);
}
if (arr2) {
app2.doubleNavigation.push(arr2);
}
}
Promise.all([app2.getMerchant(), app2.getBookingField(), app2.getBookingPeriod()]).then((res) => {
app2.merchant = res[0];
console.log("Promise.all", app2.merchant);
});
},
getSiteInfo() {
return new Promise((resolve, reject) => {
api_layout_index.getSiteInfo().then((result) => {
resolve(result);
}).catch(reject);
});
},
onDisabled() {
this.disabled = !this.disabled;
},
navTo(url) {
common_vendor.index.navigateTo({
url
});
},
listAdList() {
},
pageGoods() {
return new Promise((resolve, reject) => {
api_shop_goods_index.pageGoods({}).then((result) => {
resolve(result.list);
}).catch(reject);
});
},
getMerchantList() {
return new Promise((resolve, reject) => {
api_shop_merchant_index.listMerchant({}).then((result) => {
resolve(result);
}).catch(reject);
});
},
getMerchant() {
api_shop_merchant_index.getMerchant(this.id).then((data) => {
app.merchant = data;
if (data.files) {
app.ads = JSON.parse(data.files);
}
common_vendor.index.setNavigationBarTitle({
title: data.merchantName
});
});
},
getBookingField() {
api_booking_field_index.listField({
merchantId: this.id,
isStatus: 1
}).then((list) => {
this.fieldList = list;
});
},
getBookingPeriod() {
const {
week
} = this;
const merchantId = this.id;
const isStatus = 1;
api_booking_period_index.listPeriod({
merchantId,
isStatus,
week
}).then((list) => {
this.periodList = list;
});
},
change(e) {
const {
index
} = e.detail;
const id = this.merchant[index].merchantId;
this.openUrl(`/package/booking/booking?id=${id}`);
},
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.merchant.latitude;
const longitude = this.merchant.longitude;
common_vendor.index.openLocation({
latitude,
longitude,
success: function() {
console.log("success");
}
});
}
});
},
openUrl(url) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
} else {
common_vendor.index.navigateTo({
url
});
}
},
onField(i, i2) {
const app2 = this;
const p = this.periodList[i];
const f = this.fieldList[i2];
const key = `${p.periodId}_${f.fieldId}`;
const index = app2.order.findIndex((d) => d.key == key);
console.log("index: ", index);
console.log("app.order.length: ", app2.order.length);
if (index >= 0) {
app2.order.splice(index, 1);
} else {
if (app2.order.length > 1) {
common_vendor.index.showToast({
title: "最多预定两个场地!",
icon: "none"
});
return false;
}
app2.order.push({
key,
fid: f.fieldId,
pid: p.periodId,
totalPrice: p.price
});
}
},
isActive(text) {
const index = this.order.find((d) => d.key == text);
if (index) {
return true;
}
},
save() {
common_vendor.index.navigateTo({
url: "/package/booking/cashier"
});
}
}
};
if (!Array) {
const _easycom_uv_tabs2 = common_vendor.resolveComponent("uv-tabs");
const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
const _easycom_uv_badge2 = common_vendor.resolveComponent("uv-badge");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_count_to2 = common_vendor.resolveComponent("uv-count-to");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_tabs2 + _easycom_uni_segmented_control2 + _easycom_uv_badge2 + _easycom_uv_icon2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_ws_login2)();
}
const _easycom_uv_tabs = () => "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs.js";
const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
const _easycom_uv_badge = () => "../../uni_modules/uv-badge/components/uv-badge/uv-badge.js";
const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_tabs + _easycom_uni_segmented_control + _easycom_uv_badge + _easycom_uv_icon + _easycom_uv_count_to + _easycom_uv_button + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
list: $data.list,
itemStyle: {
height: "58px"
},
activeStyle: {
color: "#2ba91c"
},
lineColor: "#2ba91c",
inactiveStyle: {
color: "#808080"
}
}),
b: common_vendor.o(_ctx.onClickItem),
c: common_vendor.p({
current: _ctx.current,
values: $data.items,
activeColor: "#2ba91c",
inActiveColor: "#ff0000"
}),
d: common_vendor.p({
isDot: true,
type: "blank"
}),
e: common_vendor.p({
isDot: true,
type: "info"
}),
f: common_vendor.p({
isDot: true,
type: "success"
}),
g: common_vendor.p({
isDot: true,
type: "warning"
}),
h: common_vendor.t($data.order),
i: common_vendor.f($data.periodList, (item, index, i0) => {
return {
a: common_vendor.t(item.timePeriod),
b: common_vendor.f($data.fieldList, (item2, index2, i1) => {
return {
a: common_vendor.t(item2.fieldName),
b: common_vendor.n($options.isActive(`${item.periodId}_${item2.fieldId}`) ? "active web-bg-success" : ""),
c: common_vendor.o(($event) => $options.onField(index, index2), index2),
d: index2
};
}),
c: common_vendor.t(item.price),
d: index
};
}),
j: common_vendor.p({
name: "shopping-cart",
size: "36",
color: "#ffffff"
}),
k: common_vendor.p({
type: "error",
max: "99",
value: $data.order.length
}),
l: common_vendor.p({
startVal: 0,
decimals: "2",
duration: "100",
color: "#ebcf00",
bold: true,
endVal: $options.total
}),
m: common_vendor.o($options.save),
n: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
order: "none",
padding: "22px 30px"
},
text: "去支付"
}),
o: common_vendor.sr("login", "f5dda94d-10"),
p: common_vendor.o($options.reload),
q: common_vendor.p({
logo: _ctx.logo
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-f5dda94d"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/booking/cashier.vue"]]);
wx.createPage(MiniProgramPage);
+12
View File
@@ -0,0 +1,12 @@
{
"navigationBarTitleText": "订单确认",
"usingComponents": {
"uv-tabs": "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs",
"uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
"uv-badge": "../../uni_modules/uv-badge/components/uv-badge/uv-badge",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"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",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-f5dda94d"><uv-tabs wx:if="{{a}}" class="data-v-f5dda94d" u-i="f5dda94d-0" bind:__l="__l" u-p="{{a}}"></uv-tabs><view class="uni-padding-wrap uni-common-mt data-v-f5dda94d"><uni-segmented-control wx:if="{{c}}" class="data-v-f5dda94d" bindclickItem="{{b}}" u-i="f5dda94d-1" bind:__l="__l" u-p="{{c}}"/></view><view class="uni-badge-wrap data-v-f5dda94d"><view class="badge-item data-v-f5dda94d"><uv-badge wx:if="{{d}}" class="data-v-f5dda94d" u-i="f5dda94d-2" bind:__l="__l" u-p="{{d}}"></uv-badge><text class="web-text-secondary data-v-f5dda94d">可预约</text></view><view class="badge-item data-v-f5dda94d"><uv-badge wx:if="{{e}}" class="data-v-f5dda94d" u-i="f5dda94d-3" bind:__l="__l" u-p="{{e}}"></uv-badge><text class="web-text-secondary data-v-f5dda94d">已出售</text></view><view class="badge-item data-v-f5dda94d"><uv-badge wx:if="{{f}}" class="data-v-f5dda94d" u-i="f5dda94d-4" bind:__l="__l" u-p="{{f}}"></uv-badge><text class="web-text-secondary data-v-f5dda94d">我的选择</text></view><view class="badge-item data-v-f5dda94d"><uv-badge wx:if="{{g}}" class="data-v-f5dda94d" u-i="f5dda94d-5" bind:__l="__l" u-p="{{g}}"></uv-badge><text class="web-text-secondary data-v-f5dda94d">已预定半场</text></view></view> {{h}} <view class="checkout-body web-text-primary data-v-f5dda94d"><block wx:for="{{i}}" wx:for-item="item" wx:key="d"><view class="period-item data-v-f5dda94d"><view class="period data-v-f5dda94d">{{item.a}}</view><view class="field-list data-v-f5dda94d"><block wx:for="{{item.b}}" wx:for-item="item2" wx:key="d"><view class="{{['field', 'data-v-f5dda94d', item2.b]}}" bindtap="{{item2.c}}"><text class="field-name data-v-f5dda94d">{{item2.a}}</text><text class="price data-v-f5dda94d">{{item.c}}元</text></view></block></view></view></block><view class="period-item data-v-f5dda94d" style="display:none"><view class="period data-v-f5dda94d">18:00 - 20:00</view><view class="field-list data-v-f5dda94d"><view class="field web-bg-info data-v-f5dda94d"><text class="field-name data-v-f5dda94d">1号场地</text><text class="price data-v-f5dda94d">580元</text></view><view class="field web-bg-success active data-v-f5dda94d"><text class="field-name data-v-f5dda94d">2号场地</text><text class="price data-v-f5dda94d">580元</text></view><view class="field web-bg-warning data-v-f5dda94d"><text class="field-name data-v-f5dda94d">3号场地</text><text class="price data-v-f5dda94d">580元</text></view></view></view></view></view><view class="checkout-car data-v-f5dda94d"><view class="car-selected data-v-f5dda94d"><uv-icon wx:if="{{j}}" class="data-v-f5dda94d" u-i="f5dda94d-6" bind:__l="__l" u-p="{{j}}"></uv-icon><uv-badge wx:if="{{k}}" class="data-v-f5dda94d" u-i="f5dda94d-7" bind:__l="__l" u-p="{{k}}"></uv-badge></view><view class="car-total data-v-f5dda94d"><text class="data-v-f5dda94d" style="color:#ebcf00">¥</text><uv-count-to wx:if="{{l}}" class="data-v-f5dda94d" u-i="f5dda94d-8" bind:__l="__l" u-p="{{l}}"></uv-count-to></view><uv-button wx:if="{{n}}" class="save-btn data-v-f5dda94d" bindclick="{{m}}" u-i="f5dda94d-9" bind:__l="__l" u-p="{{n}}"></uv-button></view><ws-login wx:if="{{q}}" class="r data-v-f5dda94d" u-r="login" binddone="{{p}}" u-i="f5dda94d-10" bind:__l="__l" u-p="{{q}}"/>
+300
View File
@@ -0,0 +1,300 @@
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-f5dda94d {
padding: 30rpx;
font-weight: 500;
font-size: 42rpx;
background-color: #ffffff;
}
.checkout-car.data-v-f5dda94d {
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-f5dda94d {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total.data-v-f5dda94d {
display: flex;
color: #ebcf00;
align-items: center;
}
.booking-tel.data-v-f5dda94d {
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: 26rpx;
}
.popup-booking-tel.data-v-f5dda94d {
background-color: #ffffff;
width: 560rpx;
min-height: 400rpx;
border-radius: 20rpx;
margin: auto;
padding: 20px;
z-index: 9999;
display: flex;
flex-direction: column;
}
.popup-booking-tel .title.data-v-f5dda94d {
font-weight: bold;
font-size: 38rpx;
text-align: center;
padding: 10px 0;
}
.popup-booking-tel .desc.data-v-f5dda94d {
line-height: 2rem;
}
.uni-padding-wrap.data-v-f5dda94d {
width: 180rpx;
margin: 20rpx auto;
}
.uni-badge-wrap.data-v-f5dda94d {
display: flex;
justify-content: space-around;
}
.uni-badge-wrap .badge-item.data-v-f5dda94d {
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
}
.uni-badge-wrap .badge-item text.data-v-f5dda94d {
padding: 2rpx;
}
.uni-badge-wrap .badge-item .web-text-secondary.data-v-f5dda94d {
padding-left: 8rpx;
}
.checkout-body.data-v-f5dda94d {
padding: 20rpx;
}
.checkout-body .period-item.data-v-f5dda94d {
margin: 12rpx 0;
}
.checkout-body .period-item .period.data-v-f5dda94d {
line-height: 2rem;
padding-left: 12rpx;
font-size: 28rpx;
}
.checkout-body .period-item .field-list.data-v-f5dda94d {
display: flex;
flex-wrap: wrap;
}
.checkout-body .period-item .field-list .web-bg-info.data-v-f5dda94d {
background-color: #e6e6e6 !important;
}
.checkout-body .period-item .field-list .web-bg-success.data-v-f5dda94d {
color: #2ba91c !important;
border: 1px solid #2ba91c !important;
}
.checkout-body .period-item .field-list .web-bg-warning.data-v-f5dda94d {
background-color: #c9e294 !important;
}
.checkout-body .period-item .field-list .active.data-v-f5dda94d:before {
border-radius: 0 0 12rpx 0;
content: "";
position: absolute;
right: 0;
bottom: 0;
border: 24rpx solid #2ba91c;
border-top-color: transparent;
border-left-color: transparent;
}
.checkout-body .period-item .field-list .active.data-v-f5dda94d:after {
content: "";
width: 5px;
height: 10px;
position: absolute;
right: 3px;
bottom: 4px;
border: 1px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
transform: rotate(45deg);
border-radius: 4rpx;
}
.checkout-body .period-item .field-list .field.data-v-f5dda94d {
width: 118rpx;
height: 118rpx;
margin: 9rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 16rpx;
line-height: 1.3rem;
position: relative;
color: #333333;
background-color: #ffffff;
border: 1px solid #808080;
}
.checkout-body .period-item .field-list .field .field-name.data-v-f5dda94d {
font-size: 23rpx;
}
.checkout-body .period-item .field-list .field .price.data-v-f5dda94d {
font-size: 25rpx;
}
.xieyi.data-v-f5dda94d {
margin: 30rpx auto;
padding: 20rpx 30rpx;
}
.xieyi .text.data-v-f5dda94d {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-f5dda94d {
color: #0f80ff;
}
.user-oreder.data-v-f5dda94d {
padding: 16px 0;
}
.user-oreder .web-cell-content.data-v-f5dda94d {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.user-oreder .web-text-center.data-v-f5dda94d {
text-align: center;
}
.card-title.data-v-f5dda94d {
width: 700rpx;
margin: 12rpx auto;
font-size: 38rpx;
font-weight: 500;
margin-top: 32rpx;
}
.merchant-card-title.data-v-f5dda94d {
width: 700rpx;
margin: 12rpx auto;
font-size: 40rpx;
font-weight: 500;
margin-top: 32rpx;
}
.card-body.data-v-f5dda94d {
width: 740rpx;
margin: auto;
}
.card-body .merchant-card.data-v-f5dda94d {
margin: 12rpx auto;
background: #ffffff;
border-radius: 10rpx;
border-color: slategrey;
border-radius: 16rpx;
}
.card-body .merchant-card .merchant-image.data-v-f5dda94d {
width: 200rpx;
border-radius: 16rpx 16rpx 0 0;
height: 140rpx !important;
}
.card-body .merchant-card .merchant-name.data-v-f5dda94d {
padding: 12rpx;
font-weight: 500;
font-size: 26rpx;
text-align: center;
}
.card-body .merchant-card .merchant-desc.data-v-f5dda94d {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.navigation.data-v-f5dda94d {
padding: 0 30rpx 0 30rpx;
}
.scroll-list.data-v-f5dda94d {
display: flex;
flex-direction: column;
}
.scroll-list__item.data-v-f5dda94d {
margin-right: 20px;
}
.scroll-list__item__image.data-v-f5dda94d {
width: 60px;
height: 60px;
border-radius: 4px;
}
.scroll-list__item__text.data-v-f5dda94d {
color: #808080;
text-align: center;
font-size: 12px;
margin-top: 5px;
}
.scroll-list__line.data-v-f5dda94d {
display: flex;
flex-direction: row;
margin-top: 10px;
}
.scroll-list__line__item.data-v-f5dda94d {
margin-right: 30px;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.scroll-list__line__item__image.data-v-f5dda94d {
width: 61px;
height: 48px;
}
.scroll-list__line__item__text.data-v-f5dda94d {
margin-top: 5px;
color: #808080;
font-size: 12px;
text-align: center;
}
.scroll-list__line__item--no-margin-right.data-v-f5dda94d {
margin-right: 0;
}
.scroll-list__line__item__text.data-v-f5dda94d {
white-space: nowrap;
}
+519
View File
@@ -0,0 +1,519 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_layout_index = require("../../api/layout/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
require("../../utils/request.js");
const api_booking_period_index = require("../../api/booking/period/index.js");
const store_modules_car = require("../../store/modules/car.js");
const utils_common = require("../../utils/common.js");
const carStore = store_modules_car.useCarStore();
const {
orderInfo,
totalPrice,
carNum,
merchant,
type,
dateTime,
childrenPrice
} = common_vendor.storeToRefs(carStore);
const _sfc_main = {
data() {
return {
// 场馆ID
merchantId: 0,
// 场馆信息
merchant,
// 未来7天
next7day: [],
// 预定信息
orderInfo,
// 订单总金额
totalPrice,
// 儿童票价
childrenPrice,
// 预定日期
dateTime: null,
// 0全场 1半场
type: 0,
// 星期几
week: 0,
// 是否可以预定半场
isHalf: 0,
// 服务器时间
serverTime: {},
items: ["全场", "半场"],
// 搜索条件
where: {},
// 时段
periodList: [],
// 场地
fieldList: [],
// 选中的场地
selection: [],
// 是否已登录
isLogin: false,
// 是否同意协议
disabled: false,
// 购物车信息
showCarInfo: false
};
},
onLoad(option) {
this.merchantId = option.id;
this.reload();
},
onShow() {
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
this.isLogin = true;
}
},
computed: {
totalPrice() {
const app = this;
let totalPrice2 = 0;
app.selection.map((d) => {
totalPrice2 = totalPrice2 + d.price;
});
carStore.totalPrice = totalPrice2;
console.log("totalPrice: ", totalPrice2);
return totalPrice2;
},
carNum() {
return this.selection.length;
}
},
methods: {
async reload() {
const app = this;
common_vendor.index.showLoading({
title: "数据读取中."
});
Promise.all([app.getServerTime(), app.getNext7day(), app.getMerchant()]).then((res) => {
const serverTime = res[0];
const next7day = res[1];
const merchant2 = res[2];
app.serverTime = serverTime;
app.next7day = next7day;
app.merchant = merchant2;
common_vendor.index.setNavigationBarTitle({
title: merchant2.merchantName
});
carStore.setMerchant(merchant2);
app.next7day = next7day.map((d, i) => {
if (!app.dateTime && i == 0) {
app.dateTime = d.dateTime;
app.week = d.week;
carStore.dateTime = d.dateTime;
}
d.name = utils_common.getWeek(d.week);
d.value = d.date;
return d;
});
app.getBookingPeriod();
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
});
},
onDisabled() {
this.disabled = !this.disabled;
},
onDateTime(e) {
console.log("e: ", e);
this.week = e.week;
this.dateTime = e.dateTime;
carStore.dateTime = e.dateTime;
carStore.orderInfo = [];
this.selection = [];
this.reload();
},
onType(e) {
const index = e.currentIndex;
if (index == 0) {
this.type = 0;
this.isHalf = 0;
}
if (index == 1) {
this.type = 1;
this.isHalf = 1;
}
this.reload();
},
getMerchant() {
return new Promise((resolve, reject) => {
api_shop_merchant_index.getMerchant(this.merchantId).then((result) => {
resolve(result);
}).catch(reject);
});
},
getServerTime() {
return new Promise((resolve, reject) => {
api_layout_index.getServerTime().then((result) => {
resolve(result);
}).catch(reject);
});
},
getNext7day() {
return new Promise((resolve, reject) => {
api_layout_index.getNext7day().then((result) => {
resolve(result);
}).catch(reject);
});
},
// getBookingField() {
// FieldApi.listField({
// merchantId: this.merchantId,
// isStatus: 1,
// isHalf: this.isHalf,
// dateTime: `${this.dateTime}`
// }).then(list => {
// this.fieldList = list;
// })
// },
getBookingPeriod() {
const {
serverTime
} = this;
const now = /* @__PURE__ */ new Date();
const hours = now.getHours();
const minutes = now.getMinutes();
const startTime = serverTime.today == this.dateTime ? String(hours) + String(minutes) : void 0;
const week = this.week == 0 ? 7 : this.week;
api_booking_period_index.listPeriod({
merchantId: this.merchantId,
isStatus: 0,
week,
dateTime: `${this.dateTime}`,
startTime,
half: this.isHalf
}).then((list) => {
this.periodList = list;
common_vendor.index.hideLoading();
}).catch((err) => {
this.periodList = [];
common_vendor.index.showToast({
title: err.message,
icon: "none"
});
common_vendor.index.hideLoading();
if (err.message == "您还有未支付订单,请先支付") {
setTimeout(() => {
return common_vendor.index.switchTab({
url: "/pages/order/order"
});
}, 1e3);
}
});
},
callPhone(phone) {
common_vendor.index.makePhoneCall({
phoneNumber: phone
});
},
openCarInfo() {
this.$refs.popup.open("bottom");
},
closeCarInfo() {
this.$refs.popup.close();
},
onMap() {
common_vendor.index.getLocation({
type: "gcj02",
//返回可以用于uni.openLocation的经纬度
success: function(res) {
console.log("返回可以用于uni.openLocation的经纬度: ", res);
const latitude = this.merchant.latitude;
const longitude = this.merchant.longitude;
common_vendor.index.openLocation({
latitude,
longitude,
success: function() {
console.log("success");
}
});
}
});
},
onField(item, period) {
if (item.sold) {
return;
}
const app = this;
const { merchant: merchant2 } = this;
const key = utils_common.getKey(`${this.dateTime}${item.timePeriod}${this.merchantId}${item.fieldId}`);
const index = app.selection.findIndex((d) => d.key == key);
if (index >= 0) {
app.selection.splice(index, 1);
} else {
if (app.selection.length > 1) {
common_vendor.index.showToast({
title: "最多预定两个场地!",
icon: "none"
});
return false;
}
const split = item.timePeriod.split("-");
app.selection.push({
key,
merchantId: this.merchantId,
merchantCode: merchant2.merchantCode,
fieldId: item.fieldId,
fieldName: item.fieldName,
price: item.price,
childrenPrice: period.childrenPrice,
adultNum: 1,
childrenNum: 0,
merchantName: merchant2.merchantName,
isChildren: item.isChildren,
isHalf: this.type,
timePeriod: item.timePeriod,
periodId: item.periodId,
startTime: `${split[0].trim()}:00`,
endTime: `${split[1].trim()}:00`,
orderCode: key,
dateTime: `${this.dateTime}`,
comments: `${this.dateTime} (${utils_common.getWeek(this.week)}) ${item.timePeriod}`
});
console.log(app.selection);
console.log("period: ", period);
console.log("item.isChildren: ", item.isChildren);
if (item.isChildren == 1) {
console.log("item.isChildren2: ", item.isChildren);
carStore.childrenPrice = period.childrenPrice;
} else {
carStore.childrenPrice = 0;
}
carStore.orderInfo = app.selection;
carStore.carNum = app.selection.length;
carStore.totalPrice = totalPrice;
carStore.payPrice = totalPrice;
carStore.setPeriod(period);
}
},
getStratTime(value) {
const split = value.split("-");
const timeText = split[0].replace(" ", "");
const startTime = (/* @__PURE__ */ new Date(`${this.dateTime} ${timeText}:00`)).getTime();
return startTime / 1e3 || 0;
},
isActive(item) {
const index = this.selection.find((d) => d.key == utils_common.getKey(`${this.dateTime}${item.timePeriod}${this.merchantId}${item.fieldId}`));
if (item.sold) {
if (item.isHalf == 1) {
return "web-bg-warning";
}
return "web-bg-info";
}
if (index) {
return "active web-bg-success";
}
},
// isActive(text,item) {
// const index = this.selection.find(d => d.key == getKey(text))
// if(item.sold){
// if(item.isHalf == 1){
// return 'web-bg-warning'
// }
// return 'web-bg-info'
// }
// if (index) {
// return 'active web-bg-success'
// }
// },
remove(item) {
const index = this.selection.findIndex((d) => d.key == item.key);
this.selection.splice(index, 1);
carStore.orderInfo = this.selection;
},
save() {
common_vendor.index.$uv.route({
url: "/package/booking/confirm"
});
}
}
};
if (!Array) {
const _easycom_uv_tabs2 = common_vendor.resolveComponent("uv-tabs");
const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
const _easycom_uv_badge2 = common_vendor.resolveComponent("uv-badge");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_count_to2 = common_vendor.resolveComponent("uv-count-to");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
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_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_tabs2 + _easycom_uni_segmented_control2 + _easycom_uv_badge2 + _easycom_uv_gap2 + _easycom_uv_icon2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_uni_icons2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uni_popup2 + _easycom_ws_login2)();
}
const _easycom_uv_tabs = () => "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs.js";
const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
const _easycom_uv_badge = () => "../../uni_modules/uv-badge/components/uv-badge/uv-badge.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.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_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_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_tabs + _easycom_uni_segmented_control + _easycom_uv_badge + _easycom_uv_gap + _easycom_uv_icon + _easycom_uv_count_to + _easycom_uv_button + _easycom_uni_icons + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uni_popup + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.merchant
}, $data.merchant ? {
b: common_vendor.t($data.merchant.merchantId),
c: common_vendor.t($data.merchant.merchantCode),
d: common_vendor.t($data.merchant.merchantName),
e: common_vendor.t($data.dateTime),
f: common_vendor.t($data.week),
g: common_vendor.t($options.totalPrice),
h: common_vendor.t($data.type),
i: common_vendor.t($data.orderInfo)
} : {}, {
j: common_vendor.o($options.onDateTime),
k: common_vendor.p({
list: $data.next7day,
itemStyle: {
height: "58px"
},
activeStyle: {
color: "#2ba91c"
},
lineColor: "#2ba91c",
inactiveStyle: {
color: "#808080"
}
}),
l: common_vendor.o($options.onType),
m: common_vendor.p({
current: _ctx.current,
values: $data.items,
activeColor: "#2ba91c",
inActiveColor: "#ff0000"
}),
n: common_vendor.p({
isDot: true,
type: "blank"
}),
o: common_vendor.p({
isDot: true,
type: "info"
}),
p: common_vendor.p({
isDot: true,
type: "success"
}),
q: common_vendor.p({
isDot: true,
type: "warning"
}),
r: $data.periodList.length > 0
}, $data.periodList.length > 0 ? {
s: common_vendor.f($data.periodList, (item, index, i0) => {
return {
a: common_vendor.t(item.timePeriod),
b: common_vendor.f(item.fieldList, (field, index2, i1) => {
return {
a: common_vendor.t(field.fieldName),
b: common_vendor.n($options.isActive(field)),
c: common_vendor.o(($event) => $options.onField(field, item), index2),
d: index2
};
}),
c: common_vendor.t(item.price),
d: index
};
})
} : {}, {
t: common_vendor.p({
height: "50"
}),
v: common_vendor.p({
name: "shopping-cart",
size: "36",
color: "#ffffff"
}),
w: common_vendor.p({
type: "error",
max: "99",
value: $options.carNum
}),
x: common_vendor.o((...args) => $options.openCarInfo && $options.openCarInfo(...args)),
y: common_vendor.p({
startVal: 0,
decimals: "2",
duration: "100",
color: "#ebcf00",
bold: true,
endVal: $options.totalPrice
}),
z: common_vendor.o($options.save),
A: common_vendor.p({
disabled: $data.orderInfo.length == 0,
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
border: "none",
padding: "22px 30px"
},
text: "下一步"
}),
B: common_vendor.f($data.orderInfo, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.remove(item), index),
b: "6e113c20-15-" + i0 + "," + ("6e113c20-14-" + i0),
c: common_vendor.o(($event) => $options.remove(item), index),
d: "6e113c20-14-" + i0 + ",6e113c20-13",
e: common_vendor.p({
title: `${item.fieldName} ¥${item.price}`,
label: `${item.dateTime}`,
cellStyle: {
padding: "10px 5px"
}
}),
f: index
};
}),
C: common_vendor.p({
type: "trash",
size: "20",
color: "#f76b4e"
}),
D: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
E: common_vendor.o($options.closeCarInfo),
F: common_vendor.p({
title: `购物车`,
extra: "关闭",
border: false,
["is-shadow"]: false,
padding: 0
}),
G: common_vendor.p({
height: "70"
}),
H: common_vendor.sr("popup", "6e113c20-11"),
I: common_vendor.sr("login", "6e113c20-17"),
J: common_vendor.o($options.reload),
K: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6e113c20"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/booking/checkout.vue"]]);
wx.createPage(MiniProgramPage);
+18
View File
@@ -0,0 +1,18 @@
{
"navigationBarTitleText": "场地预定",
"usingComponents": {
"uv-tabs": "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs",
"uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
"uv-badge": "../../uni_modules/uv-badge/components/uv-badge/uv-badge",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"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",
"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",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-6e113c20"><view wx:if="{{a}}" class="web-debug web-text-success data-v-6e113c20" style="display:none"> 场馆ID:{{b}} 场馆编号:{{c}} 场馆名称:{{d}} 日期:{{e}} 星期:{{f}} 订单总金额:{{g}} 类型:{{h}} 场地信息:{{i}}</view><uv-tabs wx:if="{{k}}" class="data-v-6e113c20" bindchange="{{j}}" u-i="6e113c20-0" bind:__l="__l" u-p="{{k}}"></uv-tabs><view class="uni-padding-wrap uni-common-mt data-v-6e113c20"><uni-segmented-control wx:if="{{m}}" class="data-v-6e113c20" bindclickItem="{{l}}" u-i="6e113c20-1" bind:__l="__l" u-p="{{m}}"/></view><view class="uni-badge-wrap data-v-6e113c20"><view class="badge-item data-v-6e113c20"><uv-badge wx:if="{{n}}" class="data-v-6e113c20" u-i="6e113c20-2" bind:__l="__l" u-p="{{n}}"></uv-badge><text class="web-text-secondary data-v-6e113c20">可预约</text></view><view class="badge-item data-v-6e113c20"><uv-badge wx:if="{{o}}" class="data-v-6e113c20" u-i="6e113c20-3" bind:__l="__l" u-p="{{o}}"></uv-badge><text class="web-text-secondary data-v-6e113c20">已出售</text></view><view class="badge-item data-v-6e113c20"><uv-badge wx:if="{{p}}" class="data-v-6e113c20" u-i="6e113c20-4" bind:__l="__l" u-p="{{p}}"></uv-badge><text class="web-text-secondary data-v-6e113c20">我的选择</text></view><view class="badge-item data-v-6e113c20"><uv-badge wx:if="{{q}}" class="data-v-6e113c20" u-i="6e113c20-5" bind:__l="__l" u-p="{{q}}"></uv-badge><text class="web-text-secondary data-v-6e113c20">已预定半场</text></view></view><view wx:if="{{r}}" class="checkout-body web-text-primary data-v-6e113c20"><block wx:for="{{s}}" wx:for-item="item" wx:key="d"><view class="period-item data-v-6e113c20"><view class="period data-v-6e113c20">{{item.a}}</view><view class="field-list data-v-6e113c20"><block wx:for="{{item.b}}" wx:for-item="field" wx:key="d"><view class="{{['field', 'data-v-6e113c20', field.b]}}" bindtap="{{field.c}}"><text class="field-name data-v-6e113c20">{{field.a}}</text><text class="price data-v-6e113c20">{{item.c}}元</text></view></block></view></view></block><view class="period-item data-v-6e113c20" style="display:none"><view class="period data-v-6e113c20">18:00 - 20:00</view><view class="field-list data-v-6e113c20"><view class="field web-bg-info data-v-6e113c20"><text class="field-name data-v-6e113c20">1号场地</text><text class="price data-v-6e113c20">580元</text></view><view class="field web-bg-success active data-v-6e113c20"><text class="field-name data-v-6e113c20">2号场地</text><text class="price data-v-6e113c20">580元</text></view><view class="field web-bg-warning data-v-6e113c20"><text class="field-name data-v-6e113c20">3号场地</text><text class="price data-v-6e113c20">580元</text></view></view></view></view></view><uv-gap wx:if="{{t}}" class="data-v-6e113c20" u-i="6e113c20-6" bind:__l="__l" u-p="{{t}}"></uv-gap><view class="checkout-car data-v-6e113c20"><view class="car-selected data-v-6e113c20" bindtap="{{x}}"><uv-icon wx:if="{{v}}" class="data-v-6e113c20" u-i="6e113c20-7" bind:__l="__l" u-p="{{v}}"></uv-icon><uv-badge wx:if="{{w}}" class="data-v-6e113c20" u-i="6e113c20-8" bind:__l="__l" u-p="{{w}}"></uv-badge></view><view class="car-total data-v-6e113c20"><text class="data-v-6e113c20" style="color:#ebcf00">¥</text><uv-count-to wx:if="{{y}}" class="data-v-6e113c20" u-i="6e113c20-9" bind:__l="__l" u-p="{{y}}"></uv-count-to></view><uv-button wx:if="{{A}}" class="save-btn data-v-6e113c20" bindclick="{{z}}" u-i="6e113c20-10" bind:__l="__l" u-p="{{A}}"></uv-button></view><uni-popup class="r data-v-6e113c20" u-s="{{['d']}}" u-r="popup" style="margin-bottom:200px" u-i="6e113c20-11" bind:__l="__l"><uni-card wx:if="{{F}}" class="data-v-6e113c20" u-s="{{['d']}}" bindclick="{{E}}" u-i="6e113c20-12,6e113c20-11" bind:__l="__l" u-p="{{F}}"><uv-cell-group wx:if="{{D}}" class="data-v-6e113c20" u-s="{{['d']}}" u-i="6e113c20-13,6e113c20-12" bind:__l="__l" u-p="{{D}}"><block wx:for="{{B}}" wx:for-item="item" wx:key="f"><uv-cell wx:if="{{item.e}}" class="data-v-6e113c20" u-s="{{['right-icon']}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view slot="right-icon"><uni-icons wx:if="{{C}}" class="data-v-6e113c20" bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{C}}"></uni-icons><text class="web-text-secondary data-v-6e113c20" style="font-size:24rpx" bindtap="{{item.c}}">移除</text></view></uv-cell></block></uv-cell-group></uni-card><uv-gap wx:if="{{G}}" class="data-v-6e113c20" u-i="6e113c20-16,6e113c20-11" bind:__l="__l" u-p="{{G}}"></uv-gap></uni-popup><ws-login wx:if="{{K}}" class="r data-v-6e113c20" u-r="login" binddone="{{J}}" u-i="6e113c20-17" bind:__l="__l" u-p="{{K}}"/>
+167
View File
@@ -0,0 +1,167 @@
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-6e113c20 {
padding: 30rpx;
font-weight: 500;
font-size: 42rpx;
background-color: #ffffff;
}
.checkout-car.data-v-6e113c20 {
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-6e113c20 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
position: relative;
}
.checkout-car .car-total.data-v-6e113c20 {
display: flex;
color: #ebcf00;
align-items: center;
}
.popup-car-info.data-v-6e113c20 {
margin-bottom: 100px;
padding: 20rpx;
background-color: #ffffff;
width: 660rpx;
margin: 150rpx auto;
}
.uni-padding-wrap.data-v-6e113c20 {
width: 180rpx;
margin: 20rpx auto;
}
.uni-badge-wrap.data-v-6e113c20 {
display: flex;
justify-content: space-around;
}
.uni-badge-wrap .badge-item.data-v-6e113c20 {
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
}
.uni-badge-wrap .badge-item text.data-v-6e113c20 {
padding: 2rpx;
}
.uni-badge-wrap .badge-item .web-text-secondary.data-v-6e113c20 {
padding-left: 8rpx;
}
.checkout-body.data-v-6e113c20 {
padding: 24rpx;
}
.checkout-body .period-item.data-v-6e113c20 {
margin: 12rpx 0;
}
.checkout-body .period-item .period.data-v-6e113c20 {
line-height: 2rem;
padding-left: 12rpx;
font-size: 28rpx;
}
.checkout-body .period-item .field-list.data-v-6e113c20 {
display: flex;
flex-wrap: wrap;
}
.checkout-body .period-item .field-list .web-bg-info.data-v-6e113c20 {
background-color: #909399 !important;
color: #ffffff !important;
}
.checkout-body .period-item .field-list .web-bg-success.data-v-6e113c20 {
color: #2ba91c !important;
border: 1px solid #2ba91c !important;
}
.checkout-body .period-item .field-list .active.data-v-6e113c20:before {
border-radius: 0 0 12rpx 0;
content: "";
position: absolute;
right: 0;
bottom: 0;
border: 24rpx solid #2ba91c;
border-top-color: transparent;
border-left-color: transparent;
}
.checkout-body .period-item .field-list .active.data-v-6e113c20:after {
content: "";
width: 5px;
height: 10px;
position: absolute;
right: 3px;
bottom: 4px;
border: 1px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
transform: rotate(45deg);
border-radius: 4rpx;
}
.checkout-body .period-item .field-list .field.data-v-6e113c20 {
width: 118rpx;
height: 118rpx;
margin: 9rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 16rpx;
line-height: 1.3rem;
position: relative;
color: #333333;
background-color: #ffffff;
border: 1px solid #808080;
}
.checkout-body .period-item .field-list .field .field-name.data-v-6e113c20 {
font-size: 23rpx;
}
.checkout-body .period-item .field-list .field .price.data-v-6e113c20 {
font-size: 25rpx;
}
.xieyi.data-v-6e113c20 {
margin: 30rpx auto;
padding: 20rpx 30rpx;
}
.xieyi .text.data-v-6e113c20 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-6e113c20 {
color: #0f80ff;
}
+747
View File
@@ -0,0 +1,747 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_order_index = require("../../api/shop/order/index.js");
const api_booking_users_index = require("../../api/booking/users/index.js");
const api_booking_userCard_index = require("../../api/booking/userCard/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_decimal = require("../../utils/decimal.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 { merchantId, orderInfo, period, totalPrice, reducePrice, payPrice, childrenPrice, carNum, carNum2, merchant, type, dateTime } = common_vendor.storeToRefs(carStore);
const _sfc_main = {
data() {
return {
orderId: 0,
userInfo: {},
// 表单信息
form: {
cardId: 0,
payType: 1
},
// 支付方式
payment: [],
// 场馆信息
merchant,
merchantId,
orderInfo,
carNum,
carNum2: 0,
week: 0,
totalPrice,
reducePrice: 0,
payPrice,
childrenPrice,
period,
cardId: 0,
getWeek: utils_common.getWeek,
payType: 1,
isLogin: false,
disabled: false,
cardList: [],
userCard: {},
// isRefresh: true,
// 支付密码是否正确
isPayPasswordCorrect: false,
disabledPayPayPassword: false,
payPassword: "",
// 折扣率
discount: 1,
// 票类型
radiolist: [
{
name: "成人票",
price: 50,
totalPrice: 50,
disabled: false
},
{
name: "儿童票",
price: 35,
totalPrice: 35,
disabled: false
}
],
radiovalue: "成人票"
};
},
onLoad(option) {
if (option.id) {
this.orderId = option.id;
this.form.orderId = option.id;
}
this.reload();
},
onShow() {
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
this.isLogin = true;
}
this.openLogin();
},
// computed: {
// payPrice(){
// console.log('this.payPrice: ',this.payPrice);
// },
// carNum(){
// console.log('orderInfo[0].adultNum: ',this.adultNum);
// return this.adultNum;
// // return carStore.payPrice;
// }
// },
methods: {
async reload() {
const app = this;
const { form, orderId, merchant: merchant2, totalPrice: totalPrice2, orderInfo: orderInfo2 } = this;
app.userInfo = await userStore.fetchUserInfo();
api_booking_users_index.getByPhone({
phone: app.userInfo.phone
}).then((data) => {
if (data) {
app.hideUser = false;
app.userInfo.ouid = data.userId;
app.userInfo = Object.assign({}, app.userInfo, data);
}
});
form.type = 1;
form.payPrice = totalPrice2;
form.orderInfo = orderInfo2;
app.payPrice = totalPrice2;
if (merchant2) {
app.merchantId = merchant2.merchantId;
form.merchantId = merchant2.merchantId;
form.merchantName = merchant2.merchantName;
form.merchantCode = merchant2.merchantCode;
form.comments = merchant2.merchantName + " " + orderInfo2[0].fieldName + " " + orderInfo2[0].dateTime;
}
console.log("重新赋值订单信息: ", orderId);
if (orderId > 0) {
api_shop_order_index.getOrder(orderId).then((data) => {
app.form = data;
app.orderInfo = data.orderInfo;
app.totalPrice = data.totalPrice;
app.reducePrice = data.reducePrice;
app.payPrice = data.payPrice;
app.merchantId = data.merchantId;
app.childrenPrice = data.orderInfo[0].childrenPrice;
if (data.orderInfo[0].adultNum > 0) {
app.radiovalue = "成人票";
app.carNum = data.orderInfo[0].adultNum;
}
if (data.orderInfo[0].childrenNum > 0) {
app.radiovalue = "儿童票";
app.carNum = data.orderInfo[0].childrenNum;
}
carStore.setOrderInfo(data.orderInfo);
});
}
Promise.all([app.getUserCard(), app.getPayment()]).then((res) => {
const userCard = res[0];
const payment = res[1];
app.userCard = userCard;
app.payment = payment.map((d) => {
if (d.type == 0) {
d.name = `${d.name} (余额¥${app.userInfo.balance})`;
}
if (d.type == 2 && userCard) {
d.name = `${userCard.name}(¥${userCard.remainingMoney})`;
}
return d;
});
if (userCard) {
form.cardId = userCard.id;
form.payType = 2;
app.payType = 2;
if (userCard.type == 1) ;
if (userCard.type == 2) ;
if (userCard.type == 3) ;
if (userCard.type == 2) ;
if (userCard.type == 5) {
app.discount = utils_decimal.cal.cheng(userCard.discount, 0.1);
const orderPrice = totalPrice2 || form.totalPrice;
if (orderPrice) {
console.log("orderPrice: ", orderPrice);
const lastTotalPrice = utils_decimal.cal.cheng(orderPrice, app.discount);
console.log("折后金额: ", lastTotalPrice);
app.reducePrice = utils_decimal.cal.jian(orderPrice, lastTotalPrice);
console.log("减少的金额: ", app.reducePrice);
app.payPrice = orderPrice * app.discount;
console.log("实付额: ", app.payPrice);
}
}
}
});
},
// 读取可用的会员卡
async getUserCard() {
return new Promise((resolve, reject) => {
const { merchantId: merchantId2 } = this;
api_booking_userCard_index.findUseCard({
sid: merchantId2
}).then((result) => {
resolve(result);
}).catch(reject);
});
},
// 读取支付方式列表
getPayment() {
return new Promise((resolve, reject) => {
api_system_payment_index.select({ status: true }).then((result) => {
resolve(result);
}).catch(reject);
});
},
onDisabled() {
this.disabled = !this.disabled;
},
navTo(url) {
common_vendor.index.navigateTo({
url
});
},
// 切换支付方式
async onPayType(index) {
const app = this;
const { form, totalPrice: totalPrice2, carNum: carNum3, childrenPrice: childrenPrice2, radiovalue } = this;
app.payType = index;
app.form.payType = index;
app.form.cardId = 0;
console.log("childrenPrice: ", childrenPrice2);
app.payPrice = 0;
app.reducePrice = 0;
await app.countTotalPrice();
if (index === 2) {
await app.reload();
}
},
openUrl(url) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
} else {
common_vendor.index.navigateTo({
url
});
}
},
// 弹出登录提示框
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;
});
},
onAdultNum(e) {
const app = this;
const index = e.value;
app.carNum = index;
app.orderInfo[0].adultNum = index;
app.countTotalPrice();
},
onAdultNum2(e) {
const app = this;
const index = e.value;
app.carNum2 = index;
app.orderInfo[0].childrenNum = index;
app.countTotalPrice();
},
// 重新计算金额
countTotalPrice() {
const app = this;
const prices = [];
app.orderInfo.map((d) => {
prices.push(d.price * d.adultNum + d.childrenPrice * d.childrenNum);
});
const sum = prices.reduce((accumulator, currentValue) => accumulator + currentValue, 0);
console.log(sum);
app.totalPrice = sum;
app.payPrice = sum;
},
save() {
const app = this;
console.log("payPrice000: ", app.payPrice);
console.log(carStore.payPrice);
const { form, merchant: merchant2, orderInfo: orderInfo2, totalPrice: totalPrice2, payPrice: payPrice2 } = this;
if (!this.disabled) {
common_vendor.index.showToast({
title: "请先阅读并同意服务协议",
icon: "none"
});
return false;
}
if (orderInfo2.length == 0) {
common_vendor.index.showToast({
title: "订单信息不存在",
icon: "none"
});
return false;
}
if (form.payType == 2 && !app.userCard) {
common_vendor.index.showToast({
title: "没有找到可用的会员卡",
icon: "none"
});
return false;
}
if (form.payType == 0 && !this.isPayPasswordCorrect) {
app.$refs.payPasswordForm.open("center");
return false;
}
common_vendor.index.showLoading({
title: "订单提交中."
});
form.payPrice = app.payPrice;
form.totalPrice = app.payPrice;
form.reducePrice = app.reducePrice;
api_shop_order_index.addOrder({
type: 1,
orderId: form.orderId,
merchantId: form.merchantId,
merchantName: form.merchantName,
merchantCode: form.merchantCode,
// 订单金额
totalPrice: app.payPrice,
// 实付金额
payPrice: app.payPrice,
// 预定场地信息
orderInfo: form.orderInfo,
comments: form.comments,
// 微信支付
payType: form.payType,
// 下单日期
dateTime: form.dateTime,
// 会员卡ID
cardId: form.cardId
}).then((data) => {
const orderInfo3 = data;
if (form.payType == 1) {
common_vendor.index.requestPayment({
provider: orderInfo3.provider,
// 服务提供商
timeStamp: orderInfo3.timeStamp,
// 时间戳
nonceStr: orderInfo3.nonceStr,
// 随机字符串
package: orderInfo3.package,
signType: orderInfo3.signType,
// 签名算法
paySign: orderInfo3.paySign,
// 签名
success: function(res) {
common_vendor.index.showToast({
title: "支付成功",
icon: "success"
});
setTimeout(function() {
app.disabled = false;
common_vendor.index.reLaunch({
url: "/pages/order/order",
success: function(e) {
var page = getCurrentPages()[0];
if (page == void 0 || page == null) return;
page.onLoad();
}
});
}, 1500);
},
fail: function(err) {
console.log("支付失败", err);
app.disabled = false;
common_vendor.index.reLaunch({
url: "/pages/order/order",
success: function(e) {
var page = getCurrentPages()[0];
if (page == void 0 || page == null) return;
page.onLoad();
}
});
}
});
}
if (form.payType == 0) {
if (!orderInfo3) {
return common_vendor.index.showToast({
title: "支付失败",
icon: "error"
});
}
if (orderInfo3) {
common_vendor.index.showToast({
title: "支付成功",
icon: "success"
});
setTimeout(function() {
app.disabled = false;
app.$refs.payPasswordForm.close();
common_vendor.index.reLaunch({
url: "/pages/order/order",
success: function(e) {
var page = getCurrentPages()[0];
if (page == void 0 || page == null) return;
page.onLoad();
}
});
}, 1500);
}
}
if (form.payType == 2) {
if (!orderInfo3) {
return common_vendor.index.showToast({
title: "支付失败",
icon: "error"
});
}
if (orderInfo3) {
common_vendor.index.showToast({
title: "支付成功",
icon: "success"
});
setTimeout(function() {
app.disabled = false;
common_vendor.index.reLaunch({
url: "/pages/order/order",
success: function(e) {
var page = getCurrentPages()[0];
if (page == void 0 || page == null) return;
page.onLoad();
}
});
}, 1500);
}
}
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_number_box2 = common_vendor.resolveComponent("uv-number-box");
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_ws_login2 = common_vendor.resolveComponent("ws-login");
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_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_number_box2 + _easycom_uv_icon2 + _easycom_uni_icons2 + _easycom_uv_gap2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_ws_login2 + _easycom_uv_code_input2 + _easycom_uni_forms_item2 + _easycom_uni_forms2 + _easycom_uni_popup2)();
}
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_number_box = () => "../../uni_modules/uv-number-box/components/uv-number-box/uv-number-box.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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.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_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_number_box + _easycom_uv_icon + _easycom_uni_icons + _easycom_uv_gap + _easycom_uv_count_to + _easycom_uv_button + _easycom_ws_login + _easycom_uv_code_input + _easycom_uni_forms_item + _easycom_uni_forms + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.t($data.radiolist),
b: common_vendor.t($data.carNum),
c: common_vendor.t($data.childrenPrice),
d: common_vendor.t($data.orderInfo),
e: $data.merchant
}, $data.merchant ? {
f: common_vendor.t($data.merchant.merchantId),
g: common_vendor.t($data.merchant.merchantCode),
h: common_vendor.t($data.merchant.merchantName),
i: common_vendor.t(_ctx.dateTime),
j: common_vendor.t($data.week),
k: common_vendor.t($data.totalPrice),
l: common_vendor.t(_ctx.type),
m: common_vendor.t($data.payPrice),
n: common_vendor.t($data.period),
o: common_vendor.t($data.orderInfo)
} : {}, {
p: $data.userInfo.realName
}, $data.userInfo.realName ? {
q: common_vendor.t($data.userInfo.realName)
} : {
r: common_vendor.o(($event) => $options.navTo(`/package/user/personal`))
}, {
s: common_vendor.p({
title: "真实姓名",
cellStyle: {
padding: "10px 5px"
},
border: false
}),
t: common_vendor.p({
title: "手机号码",
cellStyle: {
padding: "10px 5px"
},
value: $data.userInfo.phone,
border: false
}),
v: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
w: common_vendor.p({
title: "预约人信息",
border: false,
["is-shadow"]: false
}),
x: $data.orderInfo.length == 0
}, $data.orderInfo.length == 0 ? {} : {}, {
y: $data.orderInfo
}, $data.orderInfo ? {
z: common_vendor.p({
title: `场馆`,
label: $data.form.merchantName,
cellStyle: {
padding: "10px 5px"
}
}),
A: common_vendor.f($data.orderInfo, (item, index, i0) => {
return common_vendor.e($data.childrenPrice > 0 ? {
a: "246b5229-7-" + i0 + ",246b5229-5",
b: common_vendor.p({
title: `${item.fieldName}`,
label: `${item.dateTime} ${$data.getWeek(this.week)} ${item.timePeriod}`,
cellStyle: {
padding: "10px 5px"
}
})
} : {
c: "246b5229-8-" + i0 + ",246b5229-5",
d: common_vendor.p({
title: `${item.fieldName}`,
label: `${item.dateTime} ${$data.getWeek(this.week)} ${item.timePeriod}`,
value: `¥${item.price}`,
cellStyle: {
padding: "10px 5px"
}
})
}, {
e: common_vendor.f($data.radiolist, (item2, index2, i1) => {
return common_vendor.e($data.childrenPrice > 0 ? common_vendor.e({
a: common_vendor.t(item2.name),
b: item2.name == "成人票"
}, item2.name == "成人票" ? {
c: common_vendor.t(item2.price)
} : {}, {
d: item2.name == "儿童票"
}, item2.name == "儿童票" ? {
e: common_vendor.t(item2.price)
} : {}, {
f: item2.name === "成人票"
}, item2.name === "成人票" ? {
g: common_vendor.o($options.onAdultNum, index2),
h: "246b5229-10-" + i0 + "-" + i1 + "," + ("246b5229-9-" + i0 + "-" + i1),
i: common_vendor.o(($event) => $data.carNum = $event, index2),
j: common_vendor.p({
min: 0,
max: 1e3,
disabled: $data.orderId > 0,
modelValue: $data.carNum
})
} : {}, {
k: item2.name === "儿童票"
}, item2.name === "儿童票" ? {
l: common_vendor.o($options.onAdultNum2, index2),
m: "246b5229-11-" + i0 + "-" + i1 + "," + ("246b5229-9-" + i0 + "-" + i1),
n: common_vendor.o(($event) => $data.carNum2 = $event, index2),
o: common_vendor.p({
min: 0,
max: 1e3,
disabled: $data.orderId > 0,
modelValue: $data.carNum2
})
} : {}, {
p: "246b5229-9-" + i0 + "-" + i1 + ",246b5229-5",
q: common_vendor.p({
iconStyle: "checkbox-mark",
cellStyle: {
padding: "10px 5px"
},
border: false
})
}) : {}, {
r: index2
});
}),
f: index
});
}),
B: $data.childrenPrice > 0,
C: $data.childrenPrice > 0
} : {}, {
D: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
E: common_vendor.p({
title: "订单信息",
border: false,
["is-shadow"]: false
}),
F: common_vendor.f($data.payment, (item, index, i0) => {
return common_vendor.e({
a: item.type == $data.payType
}, item.type == $data.payType ? {
b: "246b5229-15-" + i0 + "," + ("246b5229-14-" + i0),
c: common_vendor.p({
size: "30rpx",
name: "checkbox-mark"
})
} : {}, {
d: common_vendor.o(($event) => $options.onPayType(item.type), index),
e: "246b5229-14-" + i0 + ",246b5229-13",
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
});
}),
G: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
H: common_vendor.t($data.reducePrice),
I: common_vendor.t($data.payPrice || 0),
J: common_vendor.p({
title: `选择支付方式`,
border: false,
["is-shadow"]: false
}),
K: !$data.disabled
}, !$data.disabled ? {
L: common_vendor.o($options.onDisabled),
M: common_vendor.p({
type: "circle",
size: "20",
color: "#a4a5a7"
})
} : {
N: common_vendor.o($options.onDisabled),
O: common_vendor.p({
type: "checkbox",
size: "20",
color: "#11a954"
})
}, {
P: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=501")),
Q: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=502")),
R: common_vendor.o((...args) => $options.onDisabled && $options.onDisabled(...args)),
S: common_vendor.p({
height: "50"
}),
T: common_vendor.p({
decimals: "2",
duration: "50",
color: "#ebcf00",
bold: true,
endVal: $data.payPrice
}),
U: common_vendor.o($options.save),
V: common_vendor.p({
disabled: !$data.disabled,
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
border: "none",
padding: "22px 30px"
},
text: "提交订单"
}),
W: common_vendor.sr("login", "246b5229-21"),
X: common_vendor.o($options.reload),
Y: common_vendor.p({
logo: _ctx.logo
}),
Z: common_vendor.o($options.onPayPassword),
aa: common_vendor.o(($event) => $data.payPassword = $event),
ab: common_vendor.p({
mode: "box",
dot: true,
space: 0,
maxlength: 6,
hairline: true,
modelValue: $data.payPassword
}),
ac: common_vendor.p({
label: "支付密码",
name: "payPassword",
required: true
}),
ad: common_vendor.sr("form", "246b5229-24,246b5229-23"),
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", "246b5229-22"),
ai: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-246b5229"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/booking/confirm.vue"]]);
wx.createPage(MiniProgramPage);
+19
View File
@@ -0,0 +1,19 @@
{
"navigationBarTitleText": "订单确认",
"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-number-box": "../../uni_modules/uv-number-box/components/uv-number-box/uv-number-box",
"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",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login",
"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",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}
File diff suppressed because one or more lines are too long
+107
View File
@@ -0,0 +1,107 @@
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-246b5229 {
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-246b5229 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total.data-v-246b5229 {
display: flex;
color: #ebcf00;
align-items: center;
padding-left: 40rpx;
}
.card-actions.data-v-246b5229 {
display: flex;
flex-direction: row;
justify-content: flex-end;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions-item.data-v-246b5229 {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item .web-text-heading.data-v-246b5229 {
font-size: 38rpx;
margin-left: 28rpx;
}
.card-actions-item-text.data-v-246b5229 {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.xieyi.data-v-246b5229 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-246b5229 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-246b5229 {
color: #0f80ff;
}
.pay-password-card.data-v-246b5229 {
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-246b5229 {
line-height: 2rem;
padding: 20rpx 0;
}
.to-pay-btn.data-v-246b5229 {
width: 400rpx !important;
margin: 40rpx auto;
}
+257
View File
@@ -0,0 +1,257 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
const store_modules_car = require("../../store/modules/car.js");
const carStore = store_modules_car.useCarStore();
const _sfc_main = {
data() {
return {
id: 0,
// 场馆信息
merchant: {},
// 场馆相册
photo: [],
isLogin: false,
disabled: true
};
},
onLoad(option) {
this.id = option.id;
carStore.merchantId = 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.getMerchant()]).then((res) => {
const merchant = res[0];
app.merchant = merchant;
common_vendor.index.setNavigationBarTitle({
title: merchant.merchantName
});
if (merchant.files) {
app.photo = JSON.parse(merchant.files);
}
carStore.setMerchant(merchant);
carStore.merchantId = merchant.merchantId;
carStore.merchantName = merchant.merchantName;
carStore.merchantCode = merchant.merchantCode;
});
},
getMerchant() {
return new Promise((resolve, reject) => {
api_shop_merchant_index.getMerchant(this.id).then((result) => {
resolve(result);
}).catch(reject);
});
},
onDisabled() {
this.disabled = !this.disabled;
},
navTo(url) {
common_vendor.index.navigateTo({
url
});
},
mapTo(item) {
console.log("item: ", item.lngAndLat);
const arr = item.lngAndLat.split(",");
console.log("arr: ", arr);
common_vendor.index.openLocation({
latitude: parseFloat(arr[1]),
longitude: parseFloat(arr[0]),
success: function() {
console.log("success");
}
});
},
openBookingTel() {
this.$refs.popup.open("center");
},
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.merchant.latitude;
const longitude = this.merchant.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/booking/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_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_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
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_uv_icon2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uni_icons2 + _easycom_uv_button2 + _easycom_uv_gap2 + _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_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_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.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_uv_icon + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uni_icons + _easycom_uv_button + _easycom_uv_gap + _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: common_vendor.p({
title: "营业时间",
label: $data.merchant.businessTime,
cellStyle: {
padding: "10px 5px"
}
}),
c: common_vendor.p({
title: "场馆地址",
label: $data.merchant.address,
cellStyle: {
padding: "10px 5px"
}
}),
d: common_vendor.p({
size: "50rpx",
name: "map-fill",
color: "#5ac725"
}),
e: common_vendor.o(($event) => $options.mapTo($data.merchant)),
f: common_vendor.p({
title: "场馆位置",
label: `距离【${$data.merchant.merchantName}】3.8公里·约7分钟`,
isLink: true,
cellStyle: {
padding: "10px 5px"
}
}),
g: common_vendor.o(($event) => $options.callPhone($data.merchant.phone)),
h: common_vendor.p({
title: "服务前台电话",
label: $data.merchant.phone,
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
i: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
j: common_vendor.p({
title: $data.merchant.merchantName,
border: false,
["is-shadow"]: false,
padding: 0
}),
k: $data.merchant.content,
l: common_vendor.p({
title: "场地介绍",
["is-shadow"]: false,
border: false,
padding: 0
}),
m: !$data.disabled
}, !$data.disabled ? {
n: common_vendor.o($options.onDisabled),
o: common_vendor.p({
type: "circle",
size: "20",
color: "#a4a5a7"
})
} : {
p: common_vendor.o($options.onDisabled),
q: common_vendor.p({
type: "checkbox",
size: "20",
color: "#11a954"
})
}, {
r: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=503")),
s: common_vendor.o((...args) => $options.onDisabled && $options.onDisabled(...args)),
t: common_vendor.o($options.save),
v: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "预定场地"
}),
w: common_vendor.p({
height: "50"
}),
x: common_vendor.o((...args) => $options.openBookingTel && $options.openBookingTel(...args)),
y: common_vendor.p({
name: "close-circle",
color: "#ffffff",
size: "30"
}),
z: common_vendor.o((...args) => $options.closeBookingTel && $options.closeBookingTel(...args)),
A: common_vendor.sr("popup", "dfe028cf-13"),
B: common_vendor.p({
type: "center"
}),
C: common_vendor.sr("login", "dfe028cf-15"),
D: common_vendor.o($options.reload),
E: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-dfe028cf"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/booking/index.vue"]]);
wx.createPage(MiniProgramPage);
+15
View File
@@ -0,0 +1,15 @@
{
"navigationBarTitleText": "场地信息",
"usingComponents": {
"uv-swiper": "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"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",
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-dfe028cf"><view class="uv-demo-block data-v-dfe028cf"><uv-swiper wx:if="{{a}}" class="data-v-dfe028cf" u-i="dfe028cf-0" bind:__l="__l" u-p="{{a}}"></uv-swiper></view><uni-card wx:if="{{j}}" class="data-v-dfe028cf" u-s="{{['d']}}" u-i="dfe028cf-1" bind:__l="__l" u-p="{{j}}"><uv-cell-group wx:if="{{i}}" class="data-v-dfe028cf" u-s="{{['d']}}" u-i="dfe028cf-2,dfe028cf-1" bind:__l="__l" u-p="{{i}}"><uv-cell wx:if="{{b}}" class="data-v-dfe028cf" u-i="dfe028cf-3,dfe028cf-2" bind:__l="__l" u-p="{{b}}"></uv-cell><uv-cell wx:if="{{c}}" class="data-v-dfe028cf" u-i="dfe028cf-4,dfe028cf-2" bind:__l="__l" u-p="{{c}}"></uv-cell><uv-cell wx:if="{{f}}" class="data-v-dfe028cf" u-s="{{['right-icon']}}" bindclick="{{e}}" u-i="dfe028cf-5,dfe028cf-2" bind:__l="__l" u-p="{{f}}"><uv-icon class="data-v-dfe028cf" style="color:#ff0000" u-i="dfe028cf-6,dfe028cf-5" bind:__l="__l" u-p="{{d}}" slot="right-icon"></uv-icon></uv-cell><uv-cell wx:if="{{h}}" class="data-v-dfe028cf" bindclick="{{g}}" u-i="dfe028cf-7,dfe028cf-2" bind:__l="__l" u-p="{{h}}"></uv-cell></uv-cell-group></uni-card><uni-card wx:if="{{l}}" class="data-v-dfe028cf" u-s="{{['d']}}" u-i="dfe028cf-8" bind:__l="__l" u-p="{{l}}"><view class="web-text-heading booking-content data-v-dfe028cf"><view class="data-v-dfe028cf"><rich-text class="data-v-dfe028cf" nodes="{{k}}"/></view></view></uni-card><view class="xieyi web-cell web-text-secondary web-cell-align-top data-v-dfe028cf"><view class="web-cell web-cell-content web-cell-align-top data-v-dfe028cf"><uni-icons wx:if="{{m}}" class="data-v-dfe028cf" bindclick="{{n}}" u-i="dfe028cf-9" bind:__l="__l" u-p="{{o}}"></uni-icons><uni-icons wx:else class="data-v-dfe028cf" bindclick="{{p}}" u-i="dfe028cf-10" bind:__l="__l" u-p="{{q||''}}"></uni-icons><view class="text data-v-dfe028cf" bindtap="{{s}}"><text class="data-v-dfe028cf">我已阅读并同意</text><text class="link data-v-dfe028cf" catchtap="{{r}}">《订票协议》</text></view></view></view><view class="save-btn data-v-dfe028cf"><uv-button wx:if="{{v}}" class="data-v-dfe028cf" bindclick="{{t}}" u-i="dfe028cf-11" bind:__l="__l" u-p="{{v}}"></uv-button></view></view><uv-gap wx:if="{{w}}" class="data-v-dfe028cf" u-i="dfe028cf-12" bind:__l="__l" u-p="{{w}}"></uv-gap><view class="booking-tel data-v-dfe028cf" bindtap="{{x}}">活动订场</view><uni-popup wx:if="{{B}}" class="r data-v-dfe028cf" u-s="{{['d']}}" u-r="popup" u-i="dfe028cf-13" bind:__l="__l" u-p="{{B}}"><view class="popup-booking-tel data-v-dfe028cf"><text class="title data-v-dfe028cf">场馆热线</text><text class="desc data-v-dfe028cf">主体育场、足球训练场:0771-4953380</text><text class="desc data-v-dfe028cf">体育馆、综合训练馆、网球馆:0771-4953380</text><text class="desc data-v-dfe028cf">游泳跳水馆:0771-4736008</text><text class="title data-v-dfe028cf">参观接待</text><text class="desc data-v-dfe028cf">预约电话:0771-4736955</text><text class="desc data-v-dfe028cf">传真号码:0771-4736955</text><text class="title data-v-dfe028cf">大型活动订场</text><text class="desc data-v-dfe028cf">预约电话:0771-4736970、0771-4736994</text><text class="title data-v-dfe028cf">威拓普健身馆</text><text class="desc data-v-dfe028cf">联系电话:0771-5588699</text></view><view class="web-cell popup-close data-v-dfe028cf" bindtap="{{z}}"><uv-icon wx:if="{{y}}" class="data-v-dfe028cf" u-i="dfe028cf-14,dfe028cf-13" bind:__l="__l" u-p="{{y}}"></uv-icon></view></uni-popup><ws-login wx:if="{{E}}" class="r data-v-dfe028cf" u-r="login" binddone="{{D}}" u-i="dfe028cf-15" bind:__l="__l" u-p="{{E}}"/>
+102
View File
@@ -0,0 +1,102 @@
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-dfe028cf {
padding: 30rpx;
font-weight: 500;
font-size: 42rpx;
background-color: #ffffff;
}
.save-btn.data-v-dfe028cf {
width: 700rpx;
left: 25rpx;
height: 80rpx;
position: fixed;
bottom: 30rpx;
}
.booking-tel.data-v-dfe028cf {
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-booking-tel.data-v-dfe028cf {
background-color: #ffffff;
width: 560rpx;
min-height: 400rpx;
border-radius: 20rpx;
margin: auto;
padding: 20px;
z-index: 9999;
display: flex;
flex-direction: column;
}
.popup-booking-tel .title.data-v-dfe028cf {
font-weight: bold;
font-size: 38rpx;
text-align: center;
padding: 10px 0;
}
.popup-booking-tel .desc.data-v-dfe028cf {
line-height: 2rem;
}
.popup-close.data-v-dfe028cf {
display: flex;
margin-top: 24rpx;
justify-content: center;
}
.booking-content.data-v-dfe028cf {
padding: 10px;
font-size: 30rpx;
line-height: 1.5rem;
}
.xieyi.data-v-dfe028cf {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-dfe028cf {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-dfe028cf {
color: #0f80ff;
}
+222
View File
@@ -0,0 +1,222 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../utils/request.js");
const api_layout_index = require("../../api/layout/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
require("../../store/modules/user.js");
const tenantStore = store_modules_tenant.useTenantStore();
const _sfc_main = {
data() {
return {
itemType: null,
items: ["关注", "推荐"],
// 场馆列表
merchant: [],
// 网站参数
fields: {},
// 幻灯片广告
ads: [],
// 幻灯片链接地址
pathList: [],
// 项目列表
itemList: [],
// 小程序导航图标
navigation: [],
// 小程序导航图标(双排)
doubleNavigation: [],
isLogin: false,
// 骨架屏
hideTools: true,
mp_menu_display_method: 0
};
},
onLoad(o) {
this.itemType = o.type;
this.reload();
},
methods: {
async reload() {
const app = this;
const info = await tenantStore.fetchTenantInfo();
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
app.isLogin = true;
}
if (info.fields) {
info.fields.map((d) => {
const key = d.name;
app.fields[key] = d.value;
if (d.name == "h5_url") {
common_vendor.index.setStorageSync(d.name, d.value);
}
if (d.name == "mp_menu_display_method") {
app.mp_menu_display_method = d.value;
}
});
}
if (info.ads) {
const ad = info.ads.filter((d) => d.adType == "幻灯片");
if (ad) {
const adsList = JSON.parse(ad[0].images);
adsList.map((d) => {
app.ads.push(d.url);
});
app.pathList = JSON.parse(ad[0].path);
}
app.hideTools = false;
}
if (info.websiteName) {
common_vendor.index.setNavigationBarTitle({
title: info.websiteName
});
}
if (info.websiteLogo) {
common_vendor.index.setStorageSync("app_logo", info.websiteLogo);
app.logo = info.websiteLogo;
}
if (info.mpMenus) {
const arr = info.mpMenus.filter((d) => d.type == 2 && d.rows == 0);
const arr1 = info.mpMenus.filter((d) => d.type == 2 && d.rows == 1);
info.mpMenus.filter((d) => d.type == 2 && d.rows == 2);
app.navigation = [];
app.doubleNavigation = [];
if (arr1) {
app.doubleNavigation.push(arr);
app.doubleNavigation.push(arr1);
} else {
app.doubleNavigation.push(arr);
}
if (arr) {
app.navigation = arr;
}
}
Promise.all([app.getMerchantList()]).then((res) => {
app.merchant = res[0];
});
},
getSiteInfo() {
return new Promise((resolve, reject) => {
api_layout_index.getSiteInfo().then((result) => {
resolve(result);
}).catch(reject);
});
},
getMerchantList() {
const { itemType } = this;
return new Promise((resolve, reject) => {
api_shop_merchant_index.listMerchant({ itemType }).then((result) => {
resolve(result);
}).catch(reject);
});
},
change(e) {
const { index } = e.detail;
const id = this.merchant[index].merchantId;
this.openUrl(`/package/booking/index?id=${id}`);
},
onAds(index) {
const { pathList } = this;
this.openUrl(pathList[index]);
},
openUrl(url) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
} else {
common_vendor.index.navigateTo({
url
});
}
}
}
};
if (!Array) {
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_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uni_grid_item2 + _easycom_uni_grid2 + _easycom_uv_skeleton2 + _easycom_uv_gap2 + _easycom_uni_card2 + _easycom_ws_login2)();
}
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_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";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uni_grid_item + _easycom_uni_grid + _easycom_uv_skeleton + _easycom_uv_gap + _easycom_uni_card + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.merchant.length > 0
}, $data.merchant.length > 0 ? {
b: common_vendor.f($data.merchant, (item, index, i0) => {
return {
a: item.image,
b: common_vendor.t(item.merchantName),
c: index,
d: "5f22de14-1-" + i0 + ",5f22de14-0",
e: common_vendor.p({
index
})
};
}),
c: common_vendor.o($options.change),
d: common_vendor.p({
column: 3,
borderColor: "transparent",
highlight: true
})
} : {
e: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
f: common_vendor.p({
height: "16"
}),
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({
border: false,
padding: "18px 6px"
})
}, {
n: common_vendor.sr("login", "5f22de14-11"),
o: common_vendor.o($options.reload),
p: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5f22de14"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/booking/merchant.vue"]]);
wx.createPage(MiniProgramPage);
+12
View File
@@ -0,0 +1,12 @@
{
"navigationBarTitleText": "订单核销",
"enablePullDownRefresh": false,
"usingComponents": {
"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",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-5f22de14"><view class="card-body data-v-5f22de14"><block wx:if="{{a}}"><uni-grid wx:if="{{d}}" class="data-v-5f22de14" u-s="{{['d']}}" bindchange="{{c}}" u-i="5f22de14-0" bind:__l="__l" u-p="{{d}}"><uni-grid-item wx:for="{{b}}" wx:for-item="item" wx:key="c" class="data-v-5f22de14" u-s="{{['d']}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view class="merchant-card data-v-5f22de14" style="display:flex;flex-direction:column"><image src="{{item.a}}" mode="widthFix" class="merchant-image data-v-5f22de14"/><text class="merchant-name data-v-5f22de14">{{item.b}}</text></view></uni-grid-item></uni-grid></block><block wx:else><uni-card wx:if="{{m}}" class="data-v-5f22de14" u-s="{{['d']}}" u-i="5f22de14-2" bind:__l="__l" u-p="{{m}}"><uv-skeleton wx:if="{{e}}" class="data-v-5f22de14" u-i="5f22de14-3,5f22de14-2" bind:__l="__l" u-p="{{e}}"></uv-skeleton><uv-gap wx:if="{{f}}" class="data-v-5f22de14" u-i="5f22de14-4,5f22de14-2" bind:__l="__l" u-p="{{f}}"></uv-gap><uv-skeleton wx:if="{{g}}" class="data-v-5f22de14" u-i="5f22de14-5,5f22de14-2" bind:__l="__l" u-p="{{g}}"></uv-skeleton><uv-gap wx:if="{{h}}" class="data-v-5f22de14" u-i="5f22de14-6,5f22de14-2" bind:__l="__l" u-p="{{h}}"></uv-gap><uv-skeleton wx:if="{{i}}" class="data-v-5f22de14" u-i="5f22de14-7,5f22de14-2" bind:__l="__l" u-p="{{i}}"></uv-skeleton><uv-gap wx:if="{{j}}" class="data-v-5f22de14" u-i="5f22de14-8,5f22de14-2" bind:__l="__l" u-p="{{j}}"></uv-gap><uv-skeleton wx:if="{{k}}" class="data-v-5f22de14" u-i="5f22de14-9,5f22de14-2" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" class="data-v-5f22de14" u-i="5f22de14-10,5f22de14-2" bind:__l="__l" u-p="{{l}}"></uv-gap></uni-card></block></view></view><ws-login wx:if="{{p}}" class="r data-v-5f22de14" u-r="login" binddone="{{o}}" u-i="5f22de14-11" bind:__l="__l" u-p="{{p}}"/>
+215
View File
@@ -0,0 +1,215 @@
page {
/* background: url('https://oss.wsdns.cn/20240502/75fc744657544a38a32f83a825688286.png') no-repeat; */
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 */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.segmented.data-v-5f22de14 {
display: block;
justify-content: space-around;
text-align: center;
width: 200rpx;
margin: auto;
color: #ffffff;
}
.segmented .item.data-v-5f22de14 {
color: #666;
font-size: 26rpx;
padding: 0 12rpx;
}
.segmented .active.data-v-5f22de14 {
color: #333;
font-size: 30rpx;
font-weight: 500;
}
.user-oreder.data-v-5f22de14 {
display: flex;
padding: 16px 0;
}
.user-oreder .scroll-item.data-v-5f22de14 {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 25rpx;
}
.user-oreder .scroll-item .scrool-item-text.data-v-5f22de14 {
white-space: nowrap;
}
.user-oreder .web-cell-content.data-v-5f22de14 {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.user-oreder .web-text-center.data-v-5f22de14 {
text-align: center;
}
.menu-list.data-v-5f22de14 {
display: flex;
padding: 16px 0;
flex-wrap: wrap;
}
.menu-list .scroll-item.data-v-5f22de14 {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 25rpx;
}
.menu-list .scroll-item .scrool-item-text.data-v-5f22de14 {
white-space: nowrap;
}
.menu-list .web-cell-content.data-v-5f22de14 {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 10rpx 0;
}
.menu-list .web-text-center.data-v-5f22de14 {
text-align: center;
}
.menu-list .menu-title.data-v-5f22de14 {
white-space: nowrap;
font-size: 26rpx;
}
.card-title.data-v-5f22de14 {
width: 700rpx;
margin: 12rpx auto;
font-size: 34rpx;
font-weight: 500;
margin-top: 32rpx;
}
.merchant-card-title.data-v-5f22de14 {
width: 700rpx;
margin: 12rpx auto;
font-size: 40rpx;
font-weight: 500;
margin-top: 32rpx;
}
.card-body.data-v-5f22de14 {
width: 740rpx;
margin: auto;
}
.card-body .merchant-card.data-v-5f22de14 {
margin: 12rpx auto;
background: #ffffff;
border-radius: 10rpx;
border-color: slategrey;
border-radius: 16rpx;
}
.card-body .merchant-card .merchant-image.data-v-5f22de14 {
width: 200rpx;
border-radius: 16rpx 16rpx 0 0;
height: 140rpx !important;
}
.card-body .merchant-card .merchant-name.data-v-5f22de14 {
padding: 10rpx;
font-weight: 500;
font-size: 26rpx;
text-align: center;
}
.card-body .merchant-card .merchant-desc.data-v-5f22de14 {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-list.data-v-5f22de14 {
display: flex;
flex-wrap: wrap;
width: 720rpx;
margin: auto;
}
.item-list .item-bar.data-v-5f22de14 {
width: 138rpx;
height: 138rpx;
padding: 10rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background-color: #ffffff;
border-radius: 10rpx;
margin: 10rpx;
font-size: 26rpx;
}
.navigation.data-v-5f22de14 {
padding: 0 30rpx 0 30rpx;
}
.scroll-list.data-v-5f22de14 {
display: flex;
flex-direction: column;
}
.scroll-list__item.data-v-5f22de14 {
margin-right: 20px;
}
.scroll-list__item__image.data-v-5f22de14 {
width: 60px;
height: 60px;
border-radius: 4px;
}
.scroll-list__item__text.data-v-5f22de14 {
color: #808080;
text-align: center;
font-size: 12px;
margin-top: 5px;
}
.scroll-list__line.data-v-5f22de14 {
display: flex;
flex-direction: row;
margin-top: 10px;
}
.scroll-list__line__item.data-v-5f22de14 {
margin-right: 30px;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.scroll-list__line__item__image.data-v-5f22de14 {
width: 61px;
height: 48px;
}
.scroll-list__line__item__text.data-v-5f22de14 {
margin-top: 5px;
color: #808080;
font-size: 12px;
text-align: center;
}
.scroll-list__line__item--no-margin-right.data-v-5f22de14 {
margin-right: 0;
}
.scroll-list__line__item__text.data-v-5f22de14 {
white-space: nowrap;
}
+496
View File
@@ -0,0 +1,496 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_card_index = require("../../api/booking/card/index.js");
const api_shop_order_index = require("../../api/shop/order/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 {
cardId: 0,
goodsId: 0,
userInfo: {},
form: {},
address: {},
addressList: [],
week: 0,
goodsList,
// 订单总金额
totalPrice,
reducePrice: 0,
merchantId,
merchantName,
merchantCode,
getWeek: utils_common.getWeek,
payType: 1,
isLogin: false,
disabled: false,
// 支付密码是否正确
isPayPasswordCorrect: false,
disabledPayPayPassword: false,
payPassword: ""
};
},
onLoad(option) {
this.cardId = option.cardId;
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 { cardId } = this;
const userInfo = await userStore.fetchUserInfo();
app.userInfo = userInfo;
api_booking_card_index.getCard(cardId).then((data) => {
app.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) {
console.log("e: ", index);
this.payType = index;
},
openAddressList() {
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;
const { form, payType } = this;
if (!this.disabled) {
common_vendor.index.showToast({
title: "请先阅读并同意服务协议",
icon: "none"
});
return false;
}
if (payType == 0 && !this.isPayPasswordCorrect) {
this.$refs.payPasswordForm.open("center");
return false;
}
common_vendor.index.showLoading({
title: "订单提交中."
});
api_shop_order_index.addOrder({
type: 2,
// 0商城订单 1预定订单 2会员卡订单
cardId: form.cardId,
merchantId: form.merchantId,
merchantName: form.merchantName,
totalPrice: form.price,
payPrice: form.price,
comments: form.cardName,
payType
}).then((data) => {
const orderInfo = data;
if (payType == 1) {
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/user/card"
});
}, 500);
},
fail: function(err) {
console.log("支付失败", err);
app.disabled = false;
}
});
}
if (payType == 0) {
if (orderInfo) {
common_vendor.index.showToast({
title: "支付成功",
icon: "success"
});
setTimeout(function() {
app.disabled = false;
common_vendor.index.navigateTo({
url: "/package/user/card"
});
}, 500);
return;
}
if (!orderInfo) {
return common_vendor.index.showToast({
title: "支付失败",
icon: "error"
});
}
}
common_vendor.index.hideLoading();
}).catch((res) => {
common_vendor.index.showToast({
title: res.message || "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
});
}
}
};
if (!Array) {
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
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_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");
(_easycom_uv_avatar2 + _easycom_ws_login2 + _easycom_uni_card2 + _easycom_uv_icon2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_icons2 + _easycom_uv_gap2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_uni_tag2 + _easycom_uni_popup2 + _easycom_uv_code_input2 + _easycom_uni_forms_item2 + _easycom_uni_forms2)();
}
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.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_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_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_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";
if (!Math) {
(_easycom_uv_avatar + _easycom_ws_login + _easycom_uni_card + _easycom_uv_icon + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_icons + _easycom_uv_gap + _easycom_uv_count_to + _easycom_uv_button + _easycom_uni_tag + _easycom_uni_popup + _easycom_uv_code_input + _easycom_uni_forms_item + _easycom_uni_forms)();
}
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.t($data.form),
j: common_vendor.p({
src: $data.form.merchantAvatar,
size: "42"
}),
k: common_vendor.t($data.form.cardName),
l: $data.form.cardCode == "月/年卡"
}, $data.form.cardCode == "月/年卡" ? {
m: common_vendor.t($data.form.month)
} : {}, {
n: $data.form.cardCode == "次卡"
}, $data.form.cardCode == "次卡" ? {
o: common_vendor.t($data.form.number)
} : {}, {
p: $data.form.cardCode == "充值卡"
}, $data.form.cardCode == "充值卡" ? {
q: common_vendor.t($data.form.discount)
} : {}, {
r: common_vendor.p({
src: "../../static/qrcode.png",
size: "30",
shape: "square"
}),
s: `url(${$data.form.image}) no-repeat center center`,
t: common_vendor.sr("login", "b71f6ba9-2"),
v: common_vendor.o($options.reload),
w: common_vendor.p({
logo: _ctx.logo
}),
x: $data.form.comments,
y: common_vendor.p({
title: "会员卡说明",
border: false,
["is-shadow"]: false
}),
z: common_vendor.f(_ctx.payment, (item, index, i0) => {
return {
a: index
};
}),
A: $data.payType == 1
}, $data.payType == 1 ? {
B: common_vendor.p({
size: "30rpx",
name: "checkbox-mark"
})
} : {}, {
C: common_vendor.o(($event) => $options.onPayType(1)),
D: common_vendor.p({
title: "微信支付",
icon: "https://oss.wsdns.cn/20240511/8d7af0f0374040cb9b9255eff5fb812d.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90",
cellStyle: {
padding: "20rpx 10rpx",
borderRadius: "8rpx",
backgroundColor: $data.payType == 1 ? "#f6fff1" : ""
},
border: false
}),
E: $data.payType == 0
}, $data.payType == 0 ? {
F: common_vendor.p({
size: "30rpx",
name: "checkbox-mark"
})
} : {}, {
G: common_vendor.o(($event) => $options.onPayType(0)),
H: common_vendor.p({
title: `余额支付(${$data.userInfo.balance})`,
icon: "https://oss.wsdns.cn/20240511/fae57a94fa0042b9bceb721421304db1.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90",
cellStyle: {
padding: "10px 5px",
borderRadius: "8rpx",
backgroundColor: $data.payType == 0 ? "#f6fff1" : ""
},
border: false
}),
I: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
J: common_vendor.t($data.form.price || 0),
K: common_vendor.o(($event) => _ctx.actionsClick("分享")),
L: common_vendor.p({
title: "选择支付方式",
border: false,
["is-shadow"]: false
}),
M: !$data.disabled
}, !$data.disabled ? {
N: common_vendor.o($options.onDisabled),
O: common_vendor.p({
type: "circle",
size: "20",
color: "#a4a5a7"
})
} : {
P: common_vendor.o($options.onDisabled),
Q: common_vendor.p({
type: "checkbox",
size: "20",
color: "#11a954"
})
}, {
R: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=501")),
S: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=502")),
T: common_vendor.o((...args) => $options.onDisabled && $options.onDisabled(...args)),
U: common_vendor.p({
height: "50"
}),
V: common_vendor.p({
startVal: 0,
decimals: "2",
duration: "100",
color: "#ebcf00",
bold: true,
endVal: $data.form.price
}),
W: common_vendor.o($options.save),
X: common_vendor.p({
disabled: !$data.disabled,
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
border: "none",
padding: "22px 30px"
},
text: "提交订单"
}),
Y: common_vendor.f($data.addressList, (item, index, i0) => {
return common_vendor.e({
a: "b71f6ba9-19-" + i0 + "," + ("b71f6ba9-18-" + 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: "b71f6ba9-20-" + i0 + "," + ("b71f6ba9-18-" + i0),
g: common_vendor.p({
text: "默认",
size: "mini",
inverted: true,
type: "success"
})
} : {}, {
h: "b71f6ba9-21-" + i0 + "," + ("b71f6ba9-18-" + i0),
i: common_vendor.o(($event) => $options.onAddress(item), index),
j: "b71f6ba9-18-" + i0 + ",b71f6ba9-17",
k: common_vendor.p({
cellStyle: {
padding: "10px 0"
},
label: item.address
}),
l: index
});
}),
Z: common_vendor.p({
type: "right"
}),
aa: common_vendor.o(($event) => $options.navTo("/package/user/address")),
ab: common_vendor.p({
customStyle: {
borderRadius: "30px"
},
text: "收货地址管理"
}),
ac: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
ad: common_vendor.p({
title: "选择收货地址",
border: false,
["is-shadow"]: false,
padding: 0
}),
ae: common_vendor.sr("addForm", "b71f6ba9-15"),
af: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
ag: common_vendor.o(($event) => $data.payPassword = $event),
ah: common_vendor.p({
mode: "box",
dot: true,
space: 0,
maxlength: 6,
hairline: true,
modelValue: $data.payPassword
}),
ai: common_vendor.p({
label: "支付密码",
name: "payPassword",
required: true
}),
aj: common_vendor.o($options.onPayPassword),
ak: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "确定支付",
disabled: $data.disabledPayPayPassword
}),
al: common_vendor.sr("form", "b71f6ba9-25,b71f6ba9-24"),
am: common_vendor.p({
["label-width"]: 80
}),
an: common_vendor.o(($event) => $options.navTo(`/package/user/pay-password`)),
ao: common_vendor.p({
title: "请输入支付密码",
border: false,
["is-shadow"]: false,
padding: 0
}),
ap: common_vendor.sr("payPasswordForm", "b71f6ba9-23"),
aq: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
ar: common_vendor.sr("login", "b71f6ba9-29"),
as: common_vendor.o($options.reload),
at: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b71f6ba9"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/card/checkout.vue"]]);
wx.createPage(MiniProgramPage);
+20
View File
@@ -0,0 +1,20 @@
{
"navigationBarTitleText": "订单确认",
"usingComponents": {
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"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-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",
"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"
}
}
File diff suppressed because one or more lines are too long
+216
View File
@@ -0,0 +1,216 @@
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-b71f6ba9 {
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-b71f6ba9 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total.data-v-b71f6ba9 {
display: flex;
color: #ebcf00;
align-items: center;
padding-left: 40rpx;
}
.card-list .container.data-v-b71f6ba9 {
width: 700rpx;
position: relative;
margin: 25rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 20rpx;
position: relative;
box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.2);
color: #ffffff;
}
.card-list .container .card-num.data-v-b71f6ba9 {
position: absolute;
z-index: 1;
bottom: 30rpx;
left: 30rpx;
}
.card-list .container.data-v-b71f6ba9::before {
content: "";
display: block;
position: absolute;
border-radius: 20rpx;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000000;
background-size: 100%;
opacity: 0.25; /* 设置透明度 */
}
.card-list .content.data-v-b71f6ba9 {
position: relative;
z-index: 1;
width: 700rpx;
height: 380rpx;
display: flex;
justify-content: space-between;
}
.card-list .content .merchant-avatar.data-v-b71f6ba9 {
margin-top: 30rpx;
margin-left: 30rpx;
}
.card-list .content .card-info.data-v-b71f6ba9 {
height: 120rpx;
margin-top: 10rpx;
margin-left: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.card-list .content .card-info .title-bar.data-v-b71f6ba9 {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
}
.card-list .content .card-info .web-text-price.data-v-b71f6ba9 {
padding-right: 40rpx;
font-size: 36rpx;
color: #fecc66;
}
.card-list .card-item.data-v-b71f6ba9 {
width: 700rpx;
margin: 20rpx auto;
border-radius: 20rpx;
position: relative;
}
.card-list .order-title.data-v-b71f6ba9 {
padding: 20rpx 0;
}
.card-list .order-title .merchant-avatar.data-v-b71f6ba9 {
margin-right: 12rpx;
}
.card-list .order-title .card-name.data-v-b71f6ba9 {
font-weight: 600;
}
.card-list .order-title .btn-status.data-v-b71f6ba9 {
font-size: 30rpx;
display: flex;
}
.card-list .order-body.data-v-b71f6ba9 {
padding: 16px 0;
}
.card-actions.data-v-b71f6ba9 {
display: flex;
flex-direction: row;
justify-content: flex-end;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions-item.data-v-b71f6ba9 {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item .web-text-heading.data-v-b71f6ba9 {
font-size: 38rpx;
margin-left: 28rpx;
}
.card-actions-item-text.data-v-b71f6ba9 {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.address-body.data-v-b71f6ba9 {
width: 660rpx;
margin: auto;
}
.add-address.data-v-b71f6ba9 {
width: 600rpx !important;
margin: 40rpx auto;
}
.btn-bar.data-v-b71f6ba9 {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
.title-bar.data-v-b71f6ba9 {
display: flex;
}
.title-bar .web-text-heading.data-v-b71f6ba9 {
margin-right: 20rpx;
}
.title-bar .web-text-secondary.data-v-b71f6ba9 {
margin-right: 20rpx;
}
.xieyi.data-v-b71f6ba9 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-b71f6ba9 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-b71f6ba9 {
color: #0f80ff;
}
.pay-password-card.data-v-b71f6ba9 {
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-b71f6ba9 {
line-height: 2rem;
padding: 20rpx 0;
}
.to-pay-btn.data-v-b71f6ba9 {
width: 400rpx !important;
margin: 40rpx auto;
}
+272
View File
@@ -0,0 +1,272 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_card_index = require("../../api/booking/card/index.js");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const _sfc_main = {
components: {},
data() {
return {
isRefresh: false,
isLogin: false,
userId: 0,
where: {
page: 1,
cardCode: "月/年卡",
sceneType: "showCanBuyVipCard"
},
canReset: false,
loadMore: "more",
logo: "",
items: ["月/年卡", "次卡", "充值卡"],
cardList: [],
styles: [
{
value: "button",
text: "按钮",
checked: true
},
{
value: "text",
text: "文字"
}
],
colors: ["#333333", "#4cd964", "#dd524d"],
current: 0,
colorIndex: 0,
activeColor: "#108001",
styleType: "text",
getWeek: utils_common.getWeek,
// 骨架屏
hideTools: true
};
},
onLoad(option) {
this.openLogin();
this.reload();
console.log("判断是否刷新: ", option);
if (option.isRefresh) {
this.isRefresh = true;
}
},
onShow(e) {
console.log("判断是否刷新: ", e);
this.openLogin();
if (this.isRefresh) {
this.reload();
}
},
// 触底函数
onReachBottom() {
const app = this;
const { where } = this;
if (app.canReset) {
app.where.page = ++where.page;
app.reload();
}
},
methods: {
reload() {
const app = this;
const { where, userId } = this;
if (userId == 0) {
app.openLogin();
return;
}
app.loadMore = "loading";
api_booking_card_index.pageCard(where).then((res) => {
const list = res.list.map((d) => {
console.log(d);
return d;
});
if (app.cardList.length < res.count) {
app.cardList = app.cardList.concat(list);
app.canReset = true;
app.loadMore = "no-more";
} else {
app.canReset = false;
app.loadMore = "no-more";
}
app.isRefresh = false;
app.hideTools = false;
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
app.isRefresh = false;
app.hideTools = false;
});
},
onClickItem(e, text) {
const { where, userId } = this;
const index = e.currentIndex;
if (this.current !== e.currentIndex) {
this.current = e.currentIndex;
}
if (index == 0) {
where.cardCode = "月/年卡";
}
if (index == 1) {
where.cardCode = "次卡";
}
if (index == 2) {
where.cardCode = "充值卡";
}
this.where.page = 1;
this.cardList = [];
this.hideTools = true;
this.reload();
},
openUrl(url) {
common_vendor.index.navigateTo({
url
});
},
toPay(orderId) {
common_vendor.index.navigateTo({
url: "/package/booking/confirm?id=" + orderId
});
},
closeOrder(item) {
common_vendor.index.showModal({
title: "确定取消此订单?",
success(o) {
if (o.confirm) ;
}
});
},
// 弹出登录提示框
async openLogin() {
this.userId = common_vendor.index.getStorageSync("user_id");
if (!this.userId) {
this.$refs.login.open("bottom");
return false;
}
}
}
};
if (!Array) {
const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uni_segmented_control2 + _easycom_uv_avatar2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_ws_login2)();
}
const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uni_segmented_control + _easycom_uv_avatar + _easycom_uv_skeleton + _easycom_uni_card + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o($options.onClickItem),
b: common_vendor.p({
current: $data.current,
values: $data.items,
styleType: $data.styleType,
activeColor: $data.activeColor,
inActiveColor: "#808080"
}),
c: common_vendor.f($data.cardList, (item, index, i0) => {
return common_vendor.e({
a: "8f2f2dbe-1-" + i0,
b: common_vendor.p({
src: item.merchantAvatar,
size: "36"
}),
c: common_vendor.t(item.cardName),
d: item.cardCode == "月/年卡"
}, item.cardCode == "月/年卡" ? {
e: common_vendor.t(item.month)
} : {}, {
f: item.cardCode == "次卡"
}, item.cardCode == "次卡" ? {
g: common_vendor.t(item.number)
} : {}, {
h: item.cardCode == "充值卡"
}, item.cardCode == "充值卡" ? {
i: common_vendor.t(item.discount)
} : {}, {
j: common_vendor.t(`¥${item.price}`),
k: common_vendor.o(($event) => $options.openUrl("/package/card/checkout?cardId=" + item.cardId), index),
l: `url(${item.image}) no-repeat center center`,
m: index
});
}),
d: $data.cardList.length == 0
}, $data.cardList.length == 0 ? {
e: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
f: common_vendor.p({
border: false,
padding: "18px 6px"
}),
g: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
h: common_vendor.p({
border: false,
padding: "18px 6px"
}),
i: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
j: common_vendor.p({
border: false,
padding: "18px 6px"
}),
k: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
l: common_vendor.p({
border: false,
padding: "18px 6px"
}),
m: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
n: common_vendor.p({
border: false,
padding: "18px 6px"
}),
o: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
p: common_vendor.p({
border: false,
padding: "18px 6px"
})
} : {}, {
q: common_vendor.sr("login", "8f2f2dbe-14"),
r: common_vendor.o($options.reload),
s: common_vendor.p({
logo: $data.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/card/index.vue"]]);
wx.createPage(MiniProgramPage);
+10
View File
@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "购买VIP会员卡",
"usingComponents": {
"uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view><view class="segmented"><uni-segmented-control wx:if="{{b}}" bindclickItem="{{a}}" u-i="8f2f2dbe-0" bind:__l="__l" u-p="{{b}}"/></view><view class="card-list"><block wx:for="{{c}}" wx:for-item="item" wx:key="m"><view bindtap="{{item.k}}" class="container" style="{{'background:' + item.l + ';' + ('background-size:' + '100%') + ';' + ('opacity:' + '0.85')}}"><view class="content web-cell"><view class="merchant-avatar"><uv-avatar wx:if="{{item.b}}" style="border:3rpx solid #ffffff" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-avatar></view><view class="card-info web-cell-content"><view class="title-bar"><view class="web-text-heading" style="color:#ffffff;font-size:17px;font-weight:600">{{item.c}}</view><block wx:if="{{item.d}}"><view class="desc web-text-heading" style="color:#ffffff;font-size:14px">{{item.e}}个月</view></block><block wx:if="{{item.f}}"><view class="desc web-text-heading" style="color:#ffffff;font-size:14px">{{item.g}}次</view></block><block wx:if="{{item.h}}"><view class="desc web-text-heading" style="color:#ffffff;font-size:14px">{{item.i}}折</view></block></view><view class="price"><text class="web-text-price">{{item.j}}</text></view></view></view></view></block><block wx:if="{{d}}"><uni-card wx:if="{{f}}" u-s="{{['d']}}" u-i="8f2f2dbe-2" bind:__l="__l" u-p="{{f}}"><uv-skeleton wx:if="{{e}}" u-i="8f2f2dbe-3,8f2f2dbe-2" bind:__l="__l" u-p="{{e}}"></uv-skeleton></uni-card><uni-card wx:if="{{h}}" u-s="{{['d']}}" u-i="8f2f2dbe-4" bind:__l="__l" u-p="{{h}}"><uv-skeleton wx:if="{{g}}" u-i="8f2f2dbe-5,8f2f2dbe-4" bind:__l="__l" u-p="{{g}}"></uv-skeleton></uni-card><uni-card wx:if="{{j}}" u-s="{{['d']}}" u-i="8f2f2dbe-6" bind:__l="__l" u-p="{{j}}"><uv-skeleton wx:if="{{i}}" u-i="8f2f2dbe-7,8f2f2dbe-6" bind:__l="__l" u-p="{{i}}"></uv-skeleton></uni-card><uni-card wx:if="{{l}}" u-s="{{['d']}}" u-i="8f2f2dbe-8" bind:__l="__l" u-p="{{l}}"><uv-skeleton wx:if="{{k}}" u-i="8f2f2dbe-9,8f2f2dbe-8" bind:__l="__l" u-p="{{k}}"></uv-skeleton></uni-card><uni-card wx:if="{{n}}" u-s="{{['d']}}" u-i="8f2f2dbe-10" bind:__l="__l" u-p="{{n}}"><uv-skeleton wx:if="{{m}}" u-i="8f2f2dbe-11,8f2f2dbe-10" bind:__l="__l" u-p="{{m}}"></uv-skeleton></uni-card><uni-card wx:if="{{p}}" u-s="{{['d']}}" u-i="8f2f2dbe-12" bind:__l="__l" u-p="{{p}}"><uv-skeleton wx:if="{{o}}" u-i="8f2f2dbe-13,8f2f2dbe-12" bind:__l="__l" u-p="{{o}}"></uv-skeleton></uni-card></block><ws-login wx:if="{{s}}" class="r" u-r="login" binddone="{{r}}" u-i="8f2f2dbe-14" bind:__l="__l" u-p="{{s}}"/></view></view>
+158
View File
@@ -0,0 +1,158 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content {
display: flex;
justify-content: center;
align-items: center;
height: 150px;
text-align: center;
}
.segmented {
padding: 0 12rpx;
}
.content-text {
font-size: 14px;
color: #666;
}
.color-tag {
width: 25px;
height: 25px;
}
.uni-list {
flex: 1;
}
.card-list .container {
width: 700rpx;
height: 200rpx;
position: relative;
margin: 25rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 20rpx;
position: relative;
box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.2);
color: #ffffff;
}
.card-list .container::before {
content: "";
display: block;
position: absolute;
border-radius: 20rpx;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000000;
background-size: 100%;
opacity: 0.25; /* 设置透明度 */
}
.card-list .content {
position: relative;
z-index: 1;
width: 700rpx;
display: flex;
justify-content: space-between;
}
.card-list .content .merchant-avatar {
margin-left: 24rpx;
}
.card-list .content .card-info {
margin-left: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.card-list .content .card-info .title-bar {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
}
.card-list .content .card-info .web-text-price {
padding-right: 30rpx;
font-size: 36rpx;
color: #fecc66;
}
.card-list .card-item {
width: 700rpx;
margin: 20rpx auto;
border-radius: 20rpx;
position: relative;
}
.card-list .order-title {
padding: 20rpx 0;
}
.card-list .order-title .merchant-avatar {
margin-right: 12rpx;
}
.card-list .order-title .card-name {
font-weight: 600;
}
.card-list .order-title .btn-status {
font-size: 30rpx;
display: flex;
}
.card-list .order-body {
padding: 16px 0;
}
.ele-flex {
display: flex;
justify-content: space-between;
}
.card-actions {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions-item {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item-text {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.close {
top: 60rpx !important;
}
.total-price {
display: flex;
flex-direction: column;
justify-content: flex-start;
font-size: 30rpx;
align-items: flex-start;
padding-left: 6rpx;
margin-left: 450rpx;
}
.total-price .web-text-heading {
font-size: 30rpx !important;
}
+170
View File
@@ -0,0 +1,170 @@
"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/match/list?categoryId=` + this.itemList[index].id);
},
openUrl(url) {
common_vendor.index.navigateTo({
url
});
}
}
};
if (!Array) {
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
(_easycom_uv_cell2 + _easycom_uv_button2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_skeleton2 + _easycom_uv_gap2)();
}
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.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_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
if (!Math) {
(_easycom_uv_cell + _easycom_uv_button + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_skeleton + _easycom_uv_gap)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.list.length > 0
}, $data.list.length > 0 ? {
b: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "0391ec96-2-" + i0 + "," + ("0391ec96-1-" + i0),
b: "0391ec96-4-" + i0 + "," + ("0391ec96-3-" + i0),
c: "0391ec96-5-" + i0 + "," + ("0391ec96-3-" + i0),
d: "0391ec96-3-" + i0 + "," + ("0391ec96-1-" + i0),
e: "0391ec96-1-" + i0 + "," + ("0391ec96-0-" + i0),
f: index,
g: "0391ec96-0-" + i0
};
}),
c: common_vendor.p({
label: `负责游泳跳水馆、包括游泳馆的日常经营管理工作`,
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
d: common_vendor.p({
type: "info",
icon: "phone",
shape: "circle",
size: "small",
text: "电话咨询"
}),
e: common_vendor.p({
type: "info",
icon: "edit-pen",
shape: "circle",
size: "small",
text: "合作留言"
}),
f: common_vendor.p({
title: "电话咨询",
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
g: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
h: common_vendor.p({
title: "游泳健身活动俱乐部",
border: false,
["is-shadow"]: false,
padding: 0
})
} : {
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({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
p: common_vendor.p({
height: "16"
}),
q: 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-0391ec96"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/cooperate/index.vue"]]);
wx.createPage(MiniProgramPage);
+11
View File
@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "商务合作",
"usingComponents": {
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"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-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="data-v-0391ec96"><view class="card-title web-text-heading data-v-0391ec96">商务合作</view><block wx:if="{{a}}"><uni-card wx:for="{{b}}" wx:for-item="item" wx:key="f" class="data-v-0391ec96" u-s="{{['d']}}" u-i="{{item.g}}" bind:__l="__l" u-p="{{h}}"><uv-cell-group wx:if="{{g}}" class="data-v-0391ec96" u-s="{{['d']}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{g}}"><uv-cell wx:if="{{c}}" class="data-v-0391ec96" u-s="{{['label']}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{c}}"><view class="text-gray-500 data-v-0391ec96" slot="label">负责游泳跳水馆、包括游泳馆的日常经营管理工作</view></uv-cell><uv-cell wx:if="{{f}}" class="data-v-0391ec96" u-s="{{['title']}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{f}}"><view class="flex justify-end data-v-0391ec96" slot="title"><view class="ml-3 data-v-0391ec96"><uv-button wx:if="{{d}}" class="data-v-0391ec96" u-i="{{item.b}}" bind:__l="__l" u-p="{{d}}"></uv-button></view><view class="ml-3 data-v-0391ec96"><uv-button wx:if="{{e}}" class="data-v-0391ec96" u-i="{{item.c}}" bind:__l="__l" u-p="{{e}}"></uv-button></view></view></uv-cell></uv-cell-group></uni-card></block><block wx:else><uni-card wx:if="{{q}}" class="data-v-0391ec96" u-s="{{['d']}}" u-i="0391ec96-6" bind:__l="__l" u-p="{{q}}"><uv-skeleton wx:if="{{i}}" class="data-v-0391ec96" u-i="0391ec96-7,0391ec96-6" bind:__l="__l" u-p="{{i}}"></uv-skeleton><uv-gap wx:if="{{j}}" class="data-v-0391ec96" u-i="0391ec96-8,0391ec96-6" bind:__l="__l" u-p="{{j}}"></uv-gap><uv-skeleton wx:if="{{k}}" class="data-v-0391ec96" u-i="0391ec96-9,0391ec96-6" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" class="data-v-0391ec96" u-i="0391ec96-10,0391ec96-6" bind:__l="__l" u-p="{{l}}"></uv-gap><uv-skeleton wx:if="{{m}}" class="data-v-0391ec96" u-i="0391ec96-11,0391ec96-6" bind:__l="__l" u-p="{{m}}"></uv-skeleton><uv-gap wx:if="{{n}}" class="data-v-0391ec96" u-i="0391ec96-12,0391ec96-6" bind:__l="__l" u-p="{{n}}"></uv-gap><uv-skeleton wx:if="{{o}}" class="data-v-0391ec96" u-i="0391ec96-13,0391ec96-6" bind:__l="__l" u-p="{{o}}"></uv-skeleton><uv-gap wx:if="{{p}}" class="data-v-0391ec96" u-i="0391ec96-14,0391ec96-6" bind:__l="__l" u-p="{{p}}"></uv-gap></uni-card></block></view>
+96
View File
@@ -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-0391ec96 {
width: 700rpx;
margin: 12rpx auto;
font-size: 34rpx;
font-weight: 500;
margin-top: 32rpx;
}
.match-list.data-v-0391ec96 {
width: 700rpx;
margin: auto !important;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.match-list .match-item.data-v-0391ec96 {
width: 700rpx;
margin: 16rpx 0;
border-radius: 16rpx;
overflow: hidden;
background-color: #ffffff;
}
.match-list .match-item .match-info.data-v-0391ec96 {
padding: 10rpx 16rpx;
line-height: 35rpx;
}
.match-list .match-item .price-bar.data-v-0391ec96 {
padding: 0 16rpx;
display: flex;
justify-content: space-between;
}
.item-list.data-v-0391ec96 {
width: 720rpx;
margin: auto;
}
.merchant-card-title.data-v-0391ec96 {
width: 700rpx;
margin: 12rpx auto;
font-size: 40rpx;
font-weight: 500;
margin-top: 32rpx;
}
.card-body.data-v-0391ec96 {
width: 700rpx;
margin: auto;
}
.card-body .merchant-card.data-v-0391ec96 {
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-0391ec96 {
width: 45vw;
border-radius: 16rpx 16rpx 0 0;
}
.card-body .merchant-card .merchant-name.data-v-0391ec96 {
padding: 10rpx;
overflow: hidden;
font-weight: 500;
font-size: 26rpx;
text-align: center;
}
.card-body .merchant-card .merchant-desc.data-v-0391ec96 {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+238
View File
@@ -0,0 +1,238 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_coupon_index = require("../../api/booking/coupon/index.js");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const api_booking_userCoupon_index = require("../../api/booking/userCoupon/index.js");
const _sfc_main = {
components: {},
data() {
return {
isRefresh: false,
isLogin: false,
userId: 0,
where: {
page: 1,
status: 0
},
canReset: false,
loadMore: "more",
logo: "",
items: ["待使用(0)", "已使用(0)", "已失效(0)"],
list: [],
styles: [
{
value: "button",
text: "按钮",
checked: true
},
{
value: "text",
text: "文字"
}
],
colors: ["#333333", "#4cd964", "#dd524d"],
current: 0,
colorIndex: 0,
activeColor: "#108001",
styleType: "text",
getWeek: utils_common.getWeek,
disabled: false
};
},
onLoad(option) {
this.openLogin();
this.reload();
},
onShow(e) {
this.openLogin();
this.reload();
},
// 触底函数
onReachBottom() {
const app = this;
const {
where
} = this;
if (app.canReset) {
app.where.page = ++where.page;
app.reload();
}
},
methods: {
async reload() {
const app = this;
const {
where
} = this;
common_vendor.index.showLoading({
title: "数据读取中."
});
app.loadMore = "loading";
const userCouponIds = [];
await app.getUserCoupon({
userId: common_vendor.index.getStorageSync("user_id")
}).then((list) => {
list.map((d) => {
userCouponIds.push(d.couponId);
});
});
console.log("userCoupons: ", userCouponIds);
api_booking_coupon_index.pageCoupon(where).then((res) => {
const list = res.list.map((d) => {
if (userCouponIds.indexOf(d.id) == 0) {
d.disabled = true;
}
return d;
});
if (app.list.length < res.count) {
app.list = app.list.concat(list);
app.canReset = true;
app.loadMore = "no-more";
} else {
app.canReset = false;
app.loadMore = "no-more";
}
console.log("app.list: ", app.list);
common_vendor.index.hideLoading();
app.isRefresh = false;
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
app.isRefresh = false;
});
},
getUserCoupon() {
return new Promise((resolve, reject) => {
api_booking_userCoupon_index.listUserCoupon({}).then((result) => {
resolve(result);
}).catch(reject);
});
},
onClickItem(e) {
const app = this;
const {
where,
userId
} = this;
const index = e.currentIndex;
if (this.current !== e.currentIndex) {
this.current = e.currentIndex;
}
if (userId == 0) {
app.openLogin();
return;
}
app.where.status = index;
this.where.page = 1;
this.list = [];
this.reload();
},
openUrl(url) {
common_vendor.index.navigateTo({
url
});
},
toPay(orderId) {
common_vendor.index.navigateTo({
url: "/package/booking/confirm?id=" + orderId
});
},
closeOrder(item) {
common_vendor.index.showModal({
title: "确定取消此订单?",
success(o) {
if (o.confirm) {
OrderApi.updateOrder({
orderStatus: 2,
orderId: item.orderId
}).then((msg) => {
common_vendor.index.showToast({
title: msg,
icon: "none"
});
item.orderStatus = 2;
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
});
}
}
});
},
// 弹出登录提示框
async openLogin() {
this.userId = common_vendor.index.getStorageSync("user_id");
if (!this.userId) {
this.$refs.login.open("bottom");
return false;
}
},
save(item, index) {
const app = this;
item.couponId = item.id;
app.list[index].disabled = true;
api_booking_userCoupon_index.addUserCoupon(item).then((msg) => {
common_vendor.index.showToast({
title: "领取成功",
icon: "success"
});
setTimeout(() => {
app.reload();
}, 2e3);
});
}
}
};
if (!Array) {
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_load_more2 = common_vendor.resolveComponent("uni-load-more");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_button2 + _easycom_uni_load_more2 + _easycom_ws_login2)();
}
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uni_load_more = () => "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_button + _easycom_uni_load_more + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.save(item, index), index),
b: "7c98fd37-0-" + i0,
c: common_vendor.p({
size: "mini",
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
color: "#ffffff",
border: "none"
},
text: item.disabled ? "已领取" : "领取",
disabled: item.disabled
}),
d: index
};
}),
b: $data.list.length > 0
}, $data.list.length > 0 ? {
c: common_vendor.p({
status: $data.loadMore
})
} : {}, {
d: common_vendor.sr("login", "7c98fd37-2"),
e: common_vendor.o($options.reload),
f: common_vendor.p({
logo: $data.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/coupon/index.vue"]]);
wx.createPage(MiniProgramPage);
+8
View File
@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "领劵中心",
"usingComponents": {
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uni-load-more": "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view><view class="coupon"><block wx:for="{{a}}" wx:for-item="item" wx:key="d"><view class="coupon-item web-cell"><view class="coupon-bg"><view class="title"><label class="price">8</label><label class="unit">元</label></view><view class="desc">满减劵</view></view><view class="coupon-info web-cell web-cell-content"><view class="coupon-content"><view class="title">优惠券名称</view><view class="desc web-text-secondary">有效期至:2024-05-29</view></view><uv-button wx:if="{{item.c}}" class="save-btn" bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"></uv-button></view></view></block><uni-load-more wx:if="{{b}}" u-i="7c98fd37-1" bind:__l="__l" u-p="{{c}}"></uni-load-more><ws-login wx:if="{{f}}" class="r" u-r="login" binddone="{{e}}" u-i="7c98fd37-2" bind:__l="__l" u-p="{{f}}"/></view></view>
+123
View File
@@ -0,0 +1,123 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content {
display: flex;
justify-content: center;
align-items: center;
height: 150px;
text-align: center;
}
.segmented {
padding: 0 12rpx;
}
.content-text {
font-size: 14px;
color: #666;
}
.color-tag {
width: 25px;
height: 25px;
}
.uni-list {
flex: 1;
}
.coupon .coupon-item {
width: 700rpx;
margin: 20rpx auto;
border-radius: 12rpx;
border-bottom: 1px #eee solid;
background: #fff;
}
.coupon .coupon-item .coupon-bg {
width: 140rpx;
height: 140rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 26rpx;
color: #fff;
border-radius: 12rpx 0 0 12rpx;
background: linear-gradient(to right, #70b915, #008e04);
}
.coupon .coupon-item .coupon-bg .price {
font-size: 50rpx;
}
.coupon .coupon-item .coupon-info {
padding: 20rpx;
display: flex;
justify-content: space-between;
}
.coupon .coupon-item .coupon-info .title {
line-height: 2rem;
}
.coupon .coupon-item .merchant-avatar {
margin-right: 12rpx;
}
.coupon .coupon-item .btn-status {
font-size: 30rpx;
display: flex;
}
.coupon .order-body {
padding: 16px 0;
}
.ele-flex {
display: flex;
justify-content: space-between;
}
.card-actions {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions-item {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item-text {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.close {
top: 60rpx !important;
}
.total-price {
display: flex;
flex-direction: column;
justify-content: flex-start;
font-size: 30rpx;
align-items: flex-start;
padding-left: 6rpx;
margin-left: 450rpx;
}
.total-price .web-text-heading {
font-size: 30rpx !important;
}
+545
View File
@@ -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
View File
@@ -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
View File
@@ -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;
}

Some files were not shown because too many files have changed in this diff Show More