已支付订单列表: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
+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;
}
+449
View File
@@ -0,0 +1,449 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_course_index = require("../../api/booking/course/index.js");
const store_modules_car = require("../../store/modules/car.js");
store_modules_car.useCarStore();
const _sfc_main = {
data() {
return {
id: 0,
// 课程信息
course: {},
// 课程相册
photo: [],
isLogin: false,
disabled: true,
options: [
{
icon: "headphones",
text: "客服"
},
{
icon: "upload",
text: "分享"
}
],
buttonGroup: [
{
text: "立即报名",
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
color: "#fff"
}
],
radio2: 0,
sex: [
{
text: "幼儿基础班(10次课,10天连续上课)",
value: 0
},
{
text: "少年基础班(10次课,10天连续上课)",
value: 1
},
{
text: "少年基础班(10次课,10天连续上课)",
value: 2
},
{
text: "成人基础班(10次课,10天连续上课)",
value: 3
}
],
teacher: [
{
text: "姚教练",
value: 0
}
],
student: [
{
text: "全红婵",
value: 0
}
]
};
},
onLoad(option) {
this.id = option.id;
this.reload();
},
onShow() {
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
this.isLogin = true;
}
},
methods: {
async reload() {
const app = this;
Promise.all([app.getCourse()]).then((res) => {
const course = res[0];
app.course = course;
common_vendor.index.setNavigationBarTitle({
title: course.courseName
});
if (course.files) {
app.photo = JSON.parse(course.files);
}
});
},
getCourse() {
return new Promise((resolve, reject) => {
api_booking_course_index.getCourse(this.id).then((result) => {
resolve(result);
}).catch(reject);
});
},
onDisabled() {
this.disabled = !this.disabled;
},
navTo(url) {
common_vendor.index.navigateTo({
url
});
},
onClick(e) {
const app = this;
const { course } = app;
console.log("e: ", e);
if (e.index == 0) {
common_vendor.wx$1.openCustomerServiceChat({
extInfo: { url: `` },
corpId: `setting.config.wxqykf.corpId`,
success(res) {
}
});
}
if (e.index == 1) {
common_vendor.index.share({
provider: "weixin",
scene: "WXSceneSession",
type: 5,
imageUrl: "",
title: course.name,
miniProgram: {
id: "gh_abcdefg",
path: "package/course/detail?id=" + app.id,
type: 0,
webUrl: "http://apps.gxwebsoft.com/gxtyzx-h5/#/package/course/detail?id=" + app.id
},
success: (ret) => {
console.log(JSON.stringify(ret));
}
});
}
},
mapTo(item) {
const arr = item.lngAndLat.split(",");
common_vendor.index.openLocation({
latitude: parseFloat(arr[1]),
longitude: parseFloat(arr[0]),
success: function() {
console.log("success");
}
});
},
openBookingTel() {
common_vendor.index.navigateTo({
url: "/package/course/checkout?id=" + this.id
});
},
closeBookingTel() {
this.$refs.popup.close();
},
callPhone(phone) {
common_vendor.index.makePhoneCall({
phoneNumber: phone
});
},
onMap() {
common_vendor.index.getLocation({
type: "gcj02",
//返回可以用于uni.openLocation的经纬度
success: function(res) {
console.log("返回可以用于uni.openLocation的经纬度: ", res);
const latitude = this.course.latitude;
const longitude = this.course.longitude;
common_vendor.index.openLocation({
latitude,
longitude,
success: function() {
console.log("success");
}
});
}
});
},
openUrl(url) {
common_vendor.index.navigateTo({
url
});
},
save() {
if (!this.disabled) {
common_vendor.index.showToast({
title: "请先阅读并同意订票协议",
icon: "none"
});
return false;
}
common_vendor.index.navigateTo({
url: "/package/course/checkout?id=" + this.id
});
}
}
};
if (!Array) {
const _easycom_uv_swiper2 = common_vendor.resolveComponent("uv-swiper");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uni_tag2 = common_vendor.resolveComponent("uni-tag");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uni_goods_nav2 = common_vendor.resolveComponent("uni-goods-nav");
const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
const _easycom_uv_tags2 = common_vendor.resolveComponent("uv-tags");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_swiper2 + _easycom_uv_cell2 + _easycom_uni_tag2 + _easycom_uv_icon2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_image2 + _easycom_uv_avatar2 + _easycom_uv_text2 + _easycom_uv_gap2 + _easycom_uni_goods_nav2 + _easycom_uni_data_checkbox2 + _easycom_uv_tags2 + _easycom_uv_button2 + _easycom_uni_popup2 + _easycom_ws_login2)();
}
const _easycom_uv_swiper = () => "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper.js";
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uni_tag = () => "../../uni_modules/uni-tag/components/uni-tag/uni-tag.js";
const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.js";
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
const _easycom_uv_text = () => "../../uni_modules/uv-text/components/uv-text/uv-text.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_uni_goods_nav = () => "../../uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.js";
const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
const _easycom_uv_tags = () => "../../uni_modules/uv-tags/components/uv-tags/uv-tags.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_swiper + _easycom_uv_cell + _easycom_uni_tag + _easycom_uv_icon + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_image + _easycom_uv_avatar + _easycom_uv_text + _easycom_uv_gap + _easycom_uni_goods_nav + _easycom_uni_data_checkbox + _easycom_uv_tags + _easycom_uv_button + _easycom_uni_popup + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
list: $data.photo,
indicator: true,
indicatorMode: "line",
circular: true,
height: "200",
radius: "0"
}),
b: $data.course.courseName
}, $data.course.courseName ? {
c: common_vendor.t($data.course.courseName),
d: common_vendor.p({
cellStyle: {
padding: "10px 5px"
},
border: false
}),
e: common_vendor.t($data.course.price),
f: common_vendor.p({
text: `${$data.course.classPeriod}课时`,
inverted: true,
type: "error"
}),
g: common_vendor.p({
cellStyle: {
padding: "10px 5px"
},
border: false
}),
h: common_vendor.p({
size: "50rpx",
name: "map-fill",
color: "#5ac725"
}),
i: common_vendor.o(($event) => $options.mapTo($data.course)),
j: common_vendor.p({
title: $data.course.merchantName,
label: `距离【${$data.course.merchantName}】3.8公里·约7分钟`,
isLink: true,
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
k: common_vendor.p({
title: "年龄限制",
label: $data.course.ageLimit,
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
l: common_vendor.p({
title: "报名时间",
label: $data.course.bmTime,
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
m: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
n: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
})
} : {}, {
o: common_vendor.p({
src: `https://oss.wsdns.cn/20240608/1ce5b3f9b33b48b2bc9d68644e8ba6f4.jpg`
}),
p: $data.course.content,
q: common_vendor.p({
title: "课程介绍",
["is-shadow"]: false,
border: false,
padding: 0
}),
r: common_vendor.p({
src: "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKf8Lvm8WN0LnV2B6vYzyGJVxk2XW3j1mtDzicA60KhWRRjyU8ORiascwInkbqhVibRm2A1O1tRRbzhA/132",
size: "54"
}),
s: common_vendor.p({
text: "游泳教练",
align: "center",
size: "16"
}),
t: common_vendor.p({
text: "游泳企事业800",
type: "warning",
size: "12"
}),
v: common_vendor.o(($event) => $options.openUrl(`/package/teacher/detail?id=1`)),
w: common_vendor.p({
title: "课程教练",
["is-shadow"]: false,
border: false,
padding: 0
}),
x: common_vendor.p({
height: "80"
}),
y: common_vendor.o($options.onClick),
z: common_vendor.o($options.openBookingTel),
A: common_vendor.p({
fill: true,
options: $data.options,
["button-group"]: $data.buttonGroup
}),
B: common_vendor.p({
height: "10"
}),
C: common_vendor.p({
mode: "price",
color: "#ff0000",
bold: true,
size: "20",
text: $data.course.price
}),
D: common_vendor.p({
cellStyle: {
padding: "10px 15px"
},
border: false
}),
E: common_vendor.p({
title: "规格",
border: false
}),
F: common_vendor.o(($event) => $data.radio2 = $event),
G: common_vendor.p({
mode: "tag",
localdata: $data.sex,
modelValue: $data.radio2
}),
H: common_vendor.p({
border: false,
cellStyle: {
padding: "0 15px"
}
}),
I: common_vendor.p({
title: "班级/教练",
border: false
}),
J: common_vendor.o(($event) => _ctx.radio3 = $event),
K: common_vendor.p({
mode: "tag",
localdata: $data.teacher,
modelValue: _ctx.radio3
}),
L: common_vendor.p({
border: false,
cellStyle: {
padding: "0 15px"
}
}),
M: common_vendor.p({
title: "报名学员",
border: false
}),
N: common_vendor.o(($event) => _ctx.radio4 = $event),
O: common_vendor.p({
mode: "tag",
localdata: $data.student,
modelValue: _ctx.radio4
}),
P: common_vendor.p({
text: "新增",
type: "info",
size: "mini",
icon: "plus",
plain: true
}),
Q: common_vendor.p({
border: false,
cellStyle: {
padding: "0 15px"
}
}),
R: common_vendor.o($options.save),
S: common_vendor.p({
disabled: !$data.disabled,
customStyle: {
background: "linear-gradient(to right, #FE6035, #EF1224)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
border: "none",
padding: "22px 30px"
},
text: "下一步"
}),
T: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
U: common_vendor.sr("popup", "5f91cfa3-18"),
V: common_vendor.p({
type: "center"
}),
W: common_vendor.sr("login", "5f91cfa3-34"),
X: common_vendor.o($options.reload),
Y: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5f91cfa3"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/detail.vue"]]);
wx.createPage(MiniProgramPage);
+22
View File
@@ -0,0 +1,22 @@
{
"navigationBarTitleText": "课程详情",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-swiper": "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uni-tag": "../../uni_modules/uni-tag/components/uni-tag/uni-tag",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uni-goods-nav": "../../uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav",
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
"uv-tags": "../../uni_modules/uv-tags/components/uv-tags/uv-tags",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
File diff suppressed because one or more lines are too long
+143
View File
@@ -0,0 +1,143 @@
page {
background-size: 100%;
background-repeat: no-repeat;
background-color: #f0f2f5;
width: 750rpx;
overflow-x: hidden;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.merchant-name.data-v-5f91cfa3 {
font-weight: 500;
font-size: 28rpx;
background-color: #ffffff;
}
.save-btn.data-v-5f91cfa3 {
width: 750rpx;
background-color: #ffffff;
position: fixed;
padding-bottom: 30rpx;
bottom: 0;
}
.booking-tel.data-v-5f91cfa3 {
position: fixed;
z-index: 1;
top: 270px;
right: 0;
width: 80px;
height: 38px;
border-radius: 50px 0 0 50px;
background: linear-gradient(to right, #ccff66, #008e04);
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 13px;
}
.popup-checkout.data-v-5f91cfa3 {
background-color: #ffffff;
width: 100vw;
height: 60vh;
border-radius: 20rpx 20rpx 0 0;
margin: auto;
z-index: 9999;
display: flex;
flex-direction: column;
}
.popup-checkout .title.data-v-5f91cfa3 {
font-weight: bold;
font-size: 38rpx;
text-align: center;
padding: 10px 0;
}
.popup-checkout .desc.data-v-5f91cfa3 {
line-height: 2rem;
}
.popup-close.data-v-5f91cfa3 {
display: flex;
margin-top: 24rpx;
justify-content: center;
}
.booking-content.data-v-5f91cfa3 {
padding: 10px;
font-size: 30rpx;
line-height: 1.5rem;
}
.xieyi.data-v-5f91cfa3 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-5f91cfa3 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-5f91cfa3 {
color: #0f80ff;
}
.teacher-list.data-v-5f91cfa3 {
display: flex;
flex-wrap: wrap;
}
.teacher-list .teacher-item.data-v-5f91cfa3 {
margin: 20rpx 12rpx;
display: flex;
width: 160rpx;
height: 200rpx;
flex-direction: column;
justify-content: space-between;
align-items: center;
background-color: #f3f3f3;
border-radius: 12rpx;
padding: 16rpx;
}
.teacher-list .teacher-item .teacher-info.data-v-5f91cfa3 {
text-align: center;
}
.checkout-car.data-v-5f91cfa3 {
width: 700rpx;
left: 25rpx;
position: fixed;
z-index: 9999;
bottom: 30rpx;
display: flex;
justify-content: space-between;
background-color: #000000;
border-radius: 100px;
align-items: center;
}
.checkout-car .car-selected.data-v-5f91cfa3 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total.data-v-5f91cfa3 {
display: flex;
color: #ebcf00;
align-items: center;
padding-left: 40rpx;
}
+199
View File
@@ -0,0 +1,199 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_course_index = require("../../api/booking/course/index.js");
const api_booking_item_index = require("../../api/booking/item/index.js");
const _sfc_main = {
data() {
return {
list: [],
// 骨架屏
hideTools: true,
// 项目列表
itemList: []
};
},
onLoad() {
this.reload();
},
methods: {
reload() {
const app = this;
Promise.all([app.getCourseList(), app.getItemList()]).then((res) => {
console.log("res: ", res);
app.list = res[0];
app.itemList = res[1];
});
},
getCourseList() {
return new Promise((resolve, reject) => {
api_booking_course_index.pageCourse({}).then((result) => {
resolve(result.list);
}).catch(reject);
});
},
getItemList() {
return new Promise((resolve, reject) => {
api_booking_item_index.listItem({}).then((result) => {
resolve(result);
}).catch(reject);
});
},
onItem(e) {
const { index } = e.detail;
this.openUrl(`/package/course/list?categoryId=${this.itemList[index].id}&categoryName=${this.itemList[index].name}`);
},
openUrl(url) {
common_vendor.index.navigateTo({
url
});
}
}
};
if (!Array) {
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
const _easycom_uni_grid_item2 = common_vendor.resolveComponent("uni-grid-item");
const _easycom_uni_grid2 = common_vendor.resolveComponent("uni-grid");
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
(_easycom_uv_gap2 + _easycom_uv_avatar2 + _easycom_uni_grid_item2 + _easycom_uni_grid2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_uv_image2 + _easycom_uv_text2)();
}
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
const _easycom_uni_grid_item = () => "../../uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.js";
const _easycom_uni_grid = () => "../../uni_modules/uni-grid/components/uni-grid/uni-grid.js";
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
const _easycom_uv_text = () => "../../uni_modules/uv-text/components/uv-text/uv-text.js";
if (!Math) {
(_easycom_uv_gap + _easycom_uv_avatar + _easycom_uni_grid_item + _easycom_uni_grid + _easycom_uv_skeleton + _easycom_uni_card + _easycom_uv_image + _easycom_uv_text)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.itemList.length > 0
}, $data.itemList.length > 0 ? {
b: common_vendor.p({
height: "10"
}),
c: common_vendor.f($data.itemList, (item, index, i0) => {
return {
a: "84f783ca-3-" + i0 + "," + ("84f783ca-2-" + i0),
b: common_vendor.p({
src: item.image,
size: 30,
shape: "square",
fontSize: "16",
randomBgColor: true
}),
c: common_vendor.t(item.name),
d: index,
e: "84f783ca-2-" + i0 + ",84f783ca-1",
f: common_vendor.p({
index
})
};
}),
d: common_vendor.o($options.onItem),
e: common_vendor.p({
column: 5,
highlight: true,
showBorder: false
})
} : {
f: common_vendor.p({
rows: "3",
loading: $data.hideTools,
title: false
}),
g: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: "12px 4px"
})
}, {
h: $data.list.length > 0
}, $data.list.length > 0 ? {
i: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "84f783ca-6-" + i0,
b: common_vendor.p({
src: item.image,
width: "200",
height: "110"
}),
c: "84f783ca-7-" + i0,
d: common_vendor.p({
size: "15",
lineHeight: "24",
lines: 1,
text: item.courseName
}),
e: "84f783ca-8-" + i0,
f: common_vendor.p({
lineHeight: "24",
size: "13",
text: `${item.classPeriod}课时`
}),
g: "84f783ca-9-" + i0,
h: common_vendor.p({
mode: "price",
color: "#ff0000",
text: `${item.price}`
}),
i: "84f783ca-10-" + i0,
j: common_vendor.o(($event) => $options.openUrl(`/package/course/detail?id=` + item.courseId), index),
k: index
};
}),
j: common_vendor.p({
text: `1.3km`
})
} : {
k: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
l: common_vendor.p({
height: "16"
}),
m: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
n: common_vendor.p({
height: "16"
}),
o: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
p: common_vendor.p({
height: "16"
}),
q: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
r: common_vendor.p({
height: "16"
}),
s: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: "12px 4px"
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-84f783ca"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/index.vue"]]);
wx.createPage(MiniProgramPage);
+14
View File
@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "培训课程",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"uni-grid-item": "../../uni_modules/uni-grid/components/uni-grid-item/uni-grid-item",
"uni-grid": "../../uni_modules/uni-grid/components/uni-grid/uni-grid",
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="data-v-84f783ca"><block wx:if="{{a}}"><uv-gap wx:if="{{b}}" class="data-v-84f783ca" u-i="84f783ca-0" bind:__l="__l" u-p="{{b}}"></uv-gap><view class="item-list data-v-84f783ca"><uni-grid wx:if="{{e}}" class="data-v-84f783ca" u-s="{{['d']}}" bindchange="{{d}}" u-i="84f783ca-1" bind:__l="__l" u-p="{{e}}"><uni-grid-item wx:for="{{c}}" wx:for-item="item" wx:key="d" class="data-v-84f783ca" u-s="{{['d']}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{item.f}}"><view class="grid-item-box data-v-84f783ca" style="background-color:#ffffff;margin:10rpx;border-radius:10rpx;display:flex;flex-direction:column;justify-content:center;align-items:center;height:5rem"><uv-avatar wx:if="{{item.b}}" class="data-v-84f783ca" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-avatar><text class="text data-v-84f783ca">{{item.c}}</text></view></uni-grid-item></uni-grid></view></block><block wx:else><uni-card wx:if="{{g}}" class="data-v-84f783ca" u-s="{{['d']}}" u-i="84f783ca-4" bind:__l="__l" u-p="{{g}}"><uv-skeleton wx:if="{{f}}" class="data-v-84f783ca" u-i="84f783ca-5,84f783ca-4" bind:__l="__l" u-p="{{f}}"></uv-skeleton></uni-card></block><view class="card-title web-text-heading data-v-84f783ca">热门培训</view><block wx:if="{{h}}"><view class="course-list data-v-84f783ca"><block wx:for="{{i}}" wx:for-item="item" wx:key="k"><view class="course-item data-v-84f783ca" bindtap="{{item.j}}"><uv-image wx:if="{{item.b}}" class="data-v-84f783ca" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-image><view class="course-info data-v-84f783ca"><uv-text wx:if="{{item.d}}" class="course-name data-v-84f783ca" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></uv-text><uv-text wx:if="{{item.f}}" class="course-name web-text-secondary data-v-84f783ca" u-i="{{item.e}}" bind:__l="__l" u-p="{{item.f}}"></uv-text><view class="flex justify-between w-full data-v-84f783ca"><uv-text wx:if="{{item.h}}" class="course-name web-text-danger data-v-84f783ca" u-i="{{item.g}}" bind:__l="__l" u-p="{{item.h}}"></uv-text><view class="data-v-84f783ca"><uv-text wx:if="{{j}}" class="web-text-secondary px-2 data-v-84f783ca" u-i="{{item.i}}" bind:__l="__l" u-p="{{j}}"></uv-text></view></view></view></view></block></view></block><block wx:else><uni-card wx:if="{{s}}" class="data-v-84f783ca" u-s="{{['d']}}" u-i="84f783ca-11" bind:__l="__l" u-p="{{s}}"><uv-skeleton wx:if="{{k}}" class="data-v-84f783ca" u-i="84f783ca-12,84f783ca-11" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" class="data-v-84f783ca" u-i="84f783ca-13,84f783ca-11" bind:__l="__l" u-p="{{l}}"></uv-gap><uv-skeleton wx:if="{{m}}" class="data-v-84f783ca" u-i="84f783ca-14,84f783ca-11" bind:__l="__l" u-p="{{m}}"></uv-skeleton><uv-gap wx:if="{{n}}" class="data-v-84f783ca" u-i="84f783ca-15,84f783ca-11" bind:__l="__l" u-p="{{n}}"></uv-gap><uv-skeleton wx:if="{{o}}" class="data-v-84f783ca" u-i="84f783ca-16,84f783ca-11" bind:__l="__l" u-p="{{o}}"></uv-skeleton><uv-gap wx:if="{{p}}" class="data-v-84f783ca" u-i="84f783ca-17,84f783ca-11" bind:__l="__l" u-p="{{p}}"></uv-gap><uv-skeleton wx:if="{{q}}" class="data-v-84f783ca" u-i="84f783ca-18,84f783ca-11" bind:__l="__l" u-p="{{q}}"></uv-skeleton><uv-gap wx:if="{{r}}" class="data-v-84f783ca" u-i="84f783ca-19,84f783ca-11" bind:__l="__l" u-p="{{r}}"></uv-gap></uni-card></block></view>
+96
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-84f783ca {
width: 700rpx;
margin: 12rpx auto;
font-size: 34rpx;
font-weight: 500;
margin-top: 32rpx;
}
.course-list.data-v-84f783ca {
width: 700rpx;
margin: auto !important;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.course-list .course-item.data-v-84f783ca {
width: 335rpx;
margin: 16rpx 0;
border-radius: 16rpx;
overflow: hidden;
background-color: #ffffff;
}
.course-list .course-item .course-info.data-v-84f783ca {
padding: 10rpx 16rpx;
line-height: 35rpx;
}
.course-list .course-item .price-bar.data-v-84f783ca {
padding: 0 16rpx;
display: flex;
justify-content: space-between;
}
.item-list.data-v-84f783ca {
width: 720rpx;
margin: auto;
}
.merchant-card-title.data-v-84f783ca {
width: 700rpx;
margin: 12rpx auto;
font-size: 40rpx;
font-weight: 500;
margin-top: 32rpx;
}
.card-body.data-v-84f783ca {
width: 700rpx;
margin: auto;
}
.card-body .merchant-card.data-v-84f783ca {
margin: 12rpx auto;
border-radius: 10rpx;
border-color: slategrey;
border-radius: 16rpx;
display: flex;
justify-content: space-between;
}
.card-body .merchant-card .merchant-image.data-v-84f783ca {
width: 45vw;
border-radius: 16rpx 16rpx 0 0;
}
.card-body .merchant-card .merchant-name.data-v-84f783ca {
padding: 10rpx;
overflow: hidden;
font-weight: 500;
font-size: 26rpx;
text-align: center;
}
.card-body .merchant-card .merchant-desc.data-v-84f783ca {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+168
View File
@@ -0,0 +1,168 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_course_index = require("../../api/booking/course/index.js");
const api_booking_item_index = require("../../api/booking/item/index.js");
const _sfc_main = {
data() {
return {
categoryId: 0,
categoryName: "",
list: [],
// 骨架屏
hideTools: true,
// 项目列表
itemList: []
};
},
onLoad(option) {
if (option) {
this.categoryId = option.categoryId;
this.categoryName = option.categoryName;
common_vendor.index.setNavigationBarTitle({
title: option.categoryName
});
}
this.reload();
},
methods: {
reload() {
const app = this;
Promise.all([app.getCourseList(), app.getItemList()]).then((res) => {
console.log("res: ", res);
app.list = res[0];
app.itemList = res[1];
app.hideTools = false;
});
},
getCourseList() {
const { categoryId } = this;
return new Promise((resolve, reject) => {
api_booking_course_index.pageCourse({ categoryId }).then((result) => {
resolve(result.list);
}).catch(reject);
});
},
getItemList() {
return new Promise((resolve, reject) => {
api_booking_item_index.listItem({}).then((result) => {
resolve(result);
}).catch(reject);
});
},
openUrl(url) {
common_vendor.index.navigateTo({
url
});
}
}
};
if (!Array) {
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
(_easycom_uv_gap2 + _easycom_uv_image2 + _easycom_uv_text2 + _easycom_uv_skeleton2 + _easycom_uni_card2)();
}
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
const _easycom_uv_text = () => "../../uni_modules/uv-text/components/uv-text/uv-text.js";
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
if (!Math) {
(_easycom_uv_gap + _easycom_uv_image + _easycom_uv_text + _easycom_uv_skeleton + _easycom_uni_card)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: !$data.hideTools
}, !$data.hideTools ? {
b: common_vendor.p({
height: "5"
}),
c: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "312c4c39-1-" + i0,
b: common_vendor.p({
src: item.image,
width: "200",
height: "110"
}),
c: "312c4c39-2-" + i0,
d: "312c4c39-3-" + i0,
e: common_vendor.p({
size: "15",
lines: 1,
text: item.courseName
}),
f: "312c4c39-4-" + i0,
g: common_vendor.p({
size: "13",
text: `${item.classPeriod}课时`
}),
h: "312c4c39-5-" + i0,
i: common_vendor.p({
mode: "price",
color: "#ff0000",
text: `${item.price}`
}),
j: "312c4c39-6-" + i0,
k: "312c4c39-7-" + i0,
l: common_vendor.o(($event) => $options.openUrl(`/package/course/detail?id=` + item.courseId), index),
m: index
};
}),
d: common_vendor.p({
height: "5"
}),
e: common_vendor.p({
text: `1.3km`
}),
f: common_vendor.p({
height: "5"
})
} : {
g: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
h: common_vendor.p({
height: "16"
}),
i: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
j: common_vendor.p({
height: "16"
}),
k: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
l: common_vendor.p({
height: "16"
}),
m: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
n: common_vendor.p({
height: "16"
}),
o: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: "12px 4px"
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-312c4c39"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/list.vue"]]);
wx.createPage(MiniProgramPage);
+11
View File
@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "课程列表",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text",
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="data-v-312c4c39"><block wx:if="{{a}}"><uv-gap wx:if="{{b}}" class="data-v-312c4c39" u-i="312c4c39-0" bind:__l="__l" u-p="{{b}}"></uv-gap><view class="course-list data-v-312c4c39"><block wx:for="{{c}}" wx:for-item="item" wx:key="m"><view class="course-item data-v-312c4c39" bindtap="{{item.l}}"><uv-image wx:if="{{item.b}}" class="data-v-312c4c39" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-image><uv-gap wx:if="{{d}}" class="data-v-312c4c39" u-i="{{item.c}}" bind:__l="__l" u-p="{{d}}"></uv-gap><uv-text wx:if="{{item.e}}" class="course-name data-v-312c4c39" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"></uv-text><uv-text wx:if="{{item.g}}" class="course-name web-text-secondary data-v-312c4c39" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"></uv-text><view class="flex justify-between w-full data-v-312c4c39"><uv-text wx:if="{{item.i}}" class="course-name web-text-danger data-v-312c4c39" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"></uv-text><view class="data-v-312c4c39"><uv-text wx:if="{{e}}" class="web-text-secondary px-2 data-v-312c4c39" u-i="{{item.j}}" bind:__l="__l" u-p="{{e}}"></uv-text></view></view><uv-gap wx:if="{{f}}" class="data-v-312c4c39" u-i="{{item.k}}" bind:__l="__l" u-p="{{f}}"></uv-gap></view></block></view></block><block wx:else><uni-card wx:if="{{o}}" class="data-v-312c4c39" u-s="{{['d']}}" u-i="312c4c39-8" bind:__l="__l" u-p="{{o}}"><uv-skeleton wx:if="{{g}}" class="data-v-312c4c39" u-i="312c4c39-9,312c4c39-8" bind:__l="__l" u-p="{{g}}"></uv-skeleton><uv-gap wx:if="{{h}}" class="data-v-312c4c39" u-i="312c4c39-10,312c4c39-8" bind:__l="__l" u-p="{{h}}"></uv-gap><uv-skeleton wx:if="{{i}}" class="data-v-312c4c39" u-i="312c4c39-11,312c4c39-8" bind:__l="__l" u-p="{{i}}"></uv-skeleton><uv-gap wx:if="{{j}}" class="data-v-312c4c39" u-i="312c4c39-12,312c4c39-8" bind:__l="__l" u-p="{{j}}"></uv-gap><uv-skeleton wx:if="{{k}}" class="data-v-312c4c39" u-i="312c4c39-13,312c4c39-8" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" class="data-v-312c4c39" u-i="312c4c39-14,312c4c39-8" bind:__l="__l" u-p="{{l}}"></uv-gap><uv-skeleton wx:if="{{m}}" class="data-v-312c4c39" u-i="312c4c39-15,312c4c39-8" bind:__l="__l" u-p="{{m}}"></uv-skeleton><uv-gap wx:if="{{n}}" class="data-v-312c4c39" u-i="312c4c39-16,312c4c39-8" bind:__l="__l" u-p="{{n}}"></uv-gap></uni-card></block></view>
+96
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-312c4c39 {
width: 700rpx;
margin: 12rpx auto;
font-size: 34rpx;
font-weight: 500;
margin-top: 32rpx;
}
.course-list.data-v-312c4c39 {
width: 700rpx;
margin: auto !important;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.course-list .course-item.data-v-312c4c39 {
width: 335rpx;
margin: 16rpx 0;
border-radius: 16rpx;
overflow: hidden;
background-color: #ffffff;
}
.course-list .course-item .course-name.data-v-312c4c39 {
line-height: 1.4rem;
padding: 0 16rpx;
}
.course-list .course-item .price-bar.data-v-312c4c39 {
padding: 0 16rpx;
display: flex;
justify-content: space-between;
}
.item-list.data-v-312c4c39 {
width: 720rpx;
margin: auto;
}
.merchant-card-title.data-v-312c4c39 {
width: 700rpx;
margin: 12rpx auto;
font-size: 40rpx;
font-weight: 500;
margin-top: 32rpx;
}
.card-body.data-v-312c4c39 {
width: 700rpx;
margin: auto;
}
.card-body .merchant-card.data-v-312c4c39 {
margin: 12rpx auto;
border-radius: 10rpx;
border-color: slategrey;
border-radius: 16rpx;
display: flex;
justify-content: space-between;
}
.card-body .merchant-card .merchant-image.data-v-312c4c39 {
width: 45vw;
border-radius: 16rpx 16rpx 0 0;
}
.card-body .merchant-card .merchant-name.data-v-312c4c39 {
padding: 10rpx;
overflow: hidden;
font-weight: 500;
font-size: 26rpx;
text-align: center;
}
.card-body .merchant-card .merchant-desc.data-v-312c4c39 {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+438
View File
@@ -0,0 +1,438 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_userAddress_index = require("../../api/shop/userAddress/index.js");
require("../../utils/request.js");
const regionsData = require("../../regions-data.js");
const utils_common = require("../../utils/common.js");
const store_modules_user = require("../../store/modules/user.js");
const store_modules_car = require("../../store/modules/car.js");
const userStore = store_modules_user.useUserStore();
const carStore = store_modules_car.useCarStore();
const _sfc_main = {
data() {
return {
list: [],
statusBarHeight: 104,
isLogin: false,
form: {
name: "",
phone: ""
},
// 表单数据
formData: {},
fields: {},
logo: "",
bookingUser: {},
server: [],
order: [],
defaultData: [{
text: "默认学员",
value: true
}],
typeData: [
{
text: "家",
value: "家"
},
{
text: "公司",
value: "公司"
},
{
text: "学校",
value: "学校"
}
],
regions: regionsData.regions,
dataTree: [
{
text: "一年级",
value: "1-0",
children: [
{
text: "1.1班",
value: "1-1"
},
{
text: "1.2班",
value: "1-2"
}
]
},
{
text: "二年级",
value: "2-0",
children: [
{
text: "2.1班",
value: "2-1"
},
{
text: "2.2班",
value: "2-2"
}
]
},
{
text: "三年级",
value: "3-0",
disable: true
}
],
rules: {
// 对name字段进行必填验证
name: {
rules: [{
required: true,
errorMessage: "请输入收件人名称"
}]
},
phone: {
rules: [{
required: true,
format: "number",
errorMessage: "请输入正确的手机号码"
}]
},
address: {
rules: [{
required: true,
errorMessage: "请输入详情地址"
}]
},
region: {
rules: [{
required: true,
errorMessage: "请选择所在地区"
}, {
validateFunction: function(rule, value, data, callback) {
console.log("value: ", value);
if (value.length < 2) {
callback("请至少勾选两个兴趣爱好");
}
return true;
}
}]
}
}
};
},
onLoad() {
this.reload();
},
methods: {
async reload(e) {
const app = this;
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
app.userInfo = userInfo;
} else {
app.isLogin = false;
}
api_shop_userAddress_index.pageUserAddress({
userId: userInfo.userId
}).then((res) => {
app.list = res.list;
});
},
navTo(item) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
utils_common.openUrl(item);
},
// 弹出登录提示框
openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
},
onType(e) {
this.formData.type = e.detail.value;
},
onIsDefault() {
this.formData.isDefault = !this.formData.isDefault;
},
// 选用该地址
onAddres(item) {
carStore.setAddress(item);
common_vendor.index.navigateBack();
},
add() {
this.formData = {};
this.$refs.addForm.open("center");
},
openEdit(item) {
this.formData = item;
this.$refs.addForm.open("center");
},
remove(item) {
const app = this;
common_vendor.index.showModal({
title: "确定要删除吗?",
success(o) {
if (o.confirm) {
common_vendor.index.showLoading({
title: "请求中."
});
api_shop_userAddress_index.removeUserAddress(item.id).then((res) => {
common_vendor.index.showToast({
title: "操作成功",
icon: "none"
});
app.$refs.addForm.close();
app.reload();
});
app.reload();
}
}
});
},
// 触发提交表单
submit() {
this.$refs.form.validate().then((res) => {
const saveOrUpdate = this.formData.id ? api_shop_userAddress_index.updateUserAddress : api_shop_userAddress_index.addUserAddress;
saveOrUpdate(this.formData).then((message) => {
common_vendor.index.showToast({
title: "保存成功",
icon: "success"
});
this.$refs.addForm.close();
this.reload();
}).catch((err) => {
console.log(err);
});
console.log("表单数据信息:", res);
}).catch((err) => {
console.log("表单错误信息:", err);
});
},
save() {
api_shop_userAddress_index.addUserAddress(this.form).then((msg) => {
common_vendor.index.showToast({
title: msg,
icon: "none"
});
this.$refs.addForm.close();
this.reload();
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
this.$refs.addForm.close();
this.reload();
});
}
}
};
if (!Array) {
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
const _easycom_uni_tag2 = common_vendor.resolveComponent("uni-tag");
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
const _easycom_uni_data_picker2 = common_vendor.resolveComponent("uni-data-picker");
const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uv_avatar2 + _easycom_uni_tag2 + _easycom_uni_icons2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_button2 + _easycom_ws_login2 + _easycom_uv_input2 + _easycom_uni_forms_item2 + _easycom_uni_data_picker2 + _easycom_uni_data_checkbox2 + _easycom_uni_forms2 + _easycom_uni_popup2)();
}
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
const _easycom_uni_tag = () => "../../uni_modules/uni-tag/components/uni-tag/uni-tag.js";
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
const _easycom_uni_forms_item = () => "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js";
const _easycom_uni_data_picker = () => "../../uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.js";
const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uv_avatar + _easycom_uni_tag + _easycom_uni_icons + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_button + _easycom_ws_login + _easycom_uv_input + _easycom_uni_forms_item + _easycom_uni_data_picker + _easycom_uni_data_checkbox + _easycom_uni_forms + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.f($data.list, (item, index, i0) => {
return common_vendor.e({
a: "0e16bb55-3-" + i0 + "," + ("0e16bb55-2-" + i0),
b: common_vendor.p({
text: item.type,
fontSize: "12",
size: "32",
randomBgColor: true
}),
c: common_vendor.t(item.name),
d: common_vendor.t(item.phone),
e: item.isDefault
}, item.isDefault ? {
f: "0e16bb55-4-" + i0 + "," + ("0e16bb55-2-" + i0),
g: common_vendor.p({
text: "默认",
size: "mini",
inverted: true,
type: "success"
})
} : {}, {
h: common_vendor.o(($event) => $options.openEdit(item), index),
i: "0e16bb55-5-" + i0 + "," + ("0e16bb55-2-" + i0),
j: "0e16bb55-2-" + i0 + ",0e16bb55-1",
k: index
});
}),
b: common_vendor.p({
type: "compose",
size: "18"
}),
c: common_vendor.p({
cellStyle: {
padding: "10px 0"
}
}),
d: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
e: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
f: common_vendor.o($options.add),
g: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "添加学员"
}),
h: common_vendor.sr("login", "0e16bb55-7"),
i: common_vendor.o($options.reload),
j: common_vendor.p({
logo: $data.logo
}),
k: common_vendor.o(($event) => $data.formData.name = $event),
l: common_vendor.p({
placeholder: "收件人姓名",
maxlength: "5",
modelValue: $data.formData.name
}),
m: common_vendor.p({
label: "收件人",
name: "name",
required: true
}),
n: common_vendor.o(($event) => $data.formData.phone = $event),
o: common_vendor.p({
placeholder: "收件人手机号码",
maxlength: "11",
modelValue: $data.formData.phone
}),
p: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
q: common_vendor.o(_ctx.onchange),
r: common_vendor.o(_ctx.onnodeclick),
s: common_vendor.o(_ctx.onpopupopened),
t: common_vendor.o(_ctx.onpopupclosed),
v: common_vendor.o(($event) => $data.formData.region = $event),
w: common_vendor.p({
placeholder: "省、市、区、街道",
["popup-title"]: "请选择所在地区",
localdata: $data.regions,
map: {
text: "label",
value: "value"
},
modelValue: $data.formData.region
}),
x: common_vendor.p({
label: "所在地区",
name: "region",
required: true
}),
y: common_vendor.o(($event) => $data.formData.address = $event),
z: common_vendor.p({
placeholder: "小区、写字楼、门牌号等",
modelValue: $data.formData.address
}),
A: common_vendor.p({
label: "详细地址",
name: "address",
required: true
}),
B: common_vendor.o($options.onType),
C: common_vendor.o(($event) => $data.formData.type = $event),
D: common_vendor.p({
mode: "tag",
localdata: $data.typeData,
modelValue: $data.formData.type
}),
E: common_vendor.p({
label: "标签",
name: "type"
}),
F: common_vendor.o($options.onIsDefault),
G: common_vendor.o(($event) => $data.formData.isDefault = $event),
H: common_vendor.p({
localdata: $data.defaultData,
modelValue: $data.formData.isDefault
}),
I: $data.formData.id
}, $data.formData.id ? {
J: common_vendor.p({
type: "trash"
}),
K: common_vendor.o(($event) => $options.remove($data.formData))
} : {}, {
L: common_vendor.p({
name: "isDefault"
}),
M: common_vendor.o($options.submit),
N: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
O: common_vendor.sr("form", "0e16bb55-10,0e16bb55-9"),
P: common_vendor.p({
modelValue: $data.formData,
rules: $data.rules,
["label-width"]: 80
}),
Q: common_vendor.p({
title: "添加学员",
border: false,
["is-shadow"]: false,
padding: "10px 6px"
}),
R: common_vendor.sr("addForm", "0e16bb55-8"),
S: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/course/student.vue"]]);
wx.createPage(MiniProgramPage);
+20
View File
@@ -0,0 +1,20 @@
{
"navigationBarTitleText": "学员管理",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"uni-tag": "../../uni_modules/uni-tag/components/uni-tag/uni-tag",
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login",
"uv-input": "../../uni_modules/uv-input/components/uv-input/uv-input",
"uni-forms-item": "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item",
"uni-data-picker": "../../uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker",
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
"uni-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><uni-card wx:if="{{e}}" u-s="{{['d']}}" u-i="0e16bb55-0" bind:__l="__l" u-p="{{e}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{d}}" u-s="{{['d']}}" u-i="0e16bb55-1,0e16bb55-0" bind:__l="__l" u-p="{{d}}"><block wx:for="{{a}}" wx:for-item="item" wx:key="k"><uv-cell wx:if="{{c}}" u-s="{{['icon','title','right-icon']}}" u-i="{{item.j}}" bind:__l="__l" u-p="{{c}}"><uv-avatar u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}" slot="icon"></uv-avatar><view class="title-bar" slot="title"><text class="web-text-heading" style="font-weight:700">{{item.c}}</text><text class="web-text-secondary">{{item.d}}</text><uni-tag wx:if="{{item.e}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"></uni-tag></view><uni-icons style="color:#999999" bindclick="{{item.h}}" u-i="{{item.i}}" bind:__l="__l" u-p="{{b}}" slot="right-icon"></uni-icons></uv-cell></block></uv-cell-group></view></view></uni-card><view class="btn-bar"><uv-button wx:if="{{g}}" class="save-user-profile" bindclick="{{f}}" u-i="0e16bb55-6" bind:__l="__l" u-p="{{g}}"></uv-button></view><ws-login wx:if="{{j}}" class="r" u-r="login" binddone="{{i}}" u-i="0e16bb55-7" bind:__l="__l" u-p="{{j}}"/><uni-popup wx:if="{{S}}" class="r" u-s="{{['d']}}" u-r="addForm" u-i="0e16bb55-8" bind:__l="__l" u-p="{{S}}"><uni-card wx:if="{{Q}}" u-s="{{['d']}}" u-i="0e16bb55-9,0e16bb55-8" bind:__l="__l" u-p="{{Q}}"><uni-forms wx:if="{{P}}" class="r" u-s="{{['d']}}" u-r="form" u-i="0e16bb55-10,0e16bb55-9" bind:__l="__l" u-p="{{P}}"><uni-forms-item wx:if="{{m}}" u-s="{{['d']}}" u-i="0e16bb55-11,0e16bb55-10" bind:__l="__l" u-p="{{m}}"><uv-input wx:if="{{l}}" u-i="0e16bb55-12,0e16bb55-11" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{p}}" u-s="{{['d']}}" u-i="0e16bb55-13,0e16bb55-10" bind:__l="__l" u-p="{{p}}"><uv-input wx:if="{{o}}" u-i="0e16bb55-14,0e16bb55-13" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{x}}" u-s="{{['d']}}" u-i="0e16bb55-15,0e16bb55-10" bind:__l="__l" u-p="{{x}}"><uni-data-picker wx:if="{{w}}" bindchange="{{q}}" bindnodeclick="{{r}}" bindpopupopened="{{s}}" bindpopupclosed="{{t}}" u-i="0e16bb55-16,0e16bb55-15" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"></uni-data-picker></uni-forms-item><uni-forms-item wx:if="{{A}}" u-s="{{['d']}}" u-i="0e16bb55-17,0e16bb55-10" bind:__l="__l" u-p="{{A}}"><uv-input wx:if="{{z}}" u-i="0e16bb55-18,0e16bb55-17" bind:__l="__l" bindupdateModelValue="{{y}}" u-p="{{z}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{E}}" u-s="{{['d']}}" u-i="0e16bb55-19,0e16bb55-10" bind:__l="__l" u-p="{{E}}"><uni-data-checkbox wx:if="{{D}}" bindchange="{{B}}" u-i="0e16bb55-20,0e16bb55-19" bind:__l="__l" bindupdateModelValue="{{C}}" u-p="{{D}}"></uni-data-checkbox></uni-forms-item><uni-forms-item wx:if="{{L}}" u-s="{{['d']}}" u-i="0e16bb55-21,0e16bb55-10" bind:__l="__l" u-p="{{L}}"><view class="web-cell"><uni-data-checkbox wx:if="{{H}}" bindclick="{{F}}" u-i="0e16bb55-22,0e16bb55-21" bind:__l="__l" bindupdateModelValue="{{G}}" u-p="{{H}}"></uni-data-checkbox><view wx:if="{{I}}" class="del-btn" bindtap="{{K}}"><uni-icons wx:if="{{J}}" u-s="{{['d']}}" class="web-cell" style="color:#999999" u-i="0e16bb55-23,0e16bb55-21" bind:__l="__l" u-p="{{J}}"><text class="web-text-danger" style="font-size:22rpx;padding-left:4rpx">删除</text></uni-icons></view></view></uni-forms-item><uv-button wx:if="{{N}}" class="add-address" bindclick="{{M}}" u-i="0e16bb55-24,0e16bb55-10" bind:__l="__l" u-p="{{N}}"></uv-button></uni-forms></uni-card></uni-popup></view>
+67
View File
@@ -0,0 +1,67 @@
page {
background-size: 100%;
background-repeat: no-repeat;
background-color: #f0f2f5;
width: 750rpx;
overflow-x: hidden;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.avatar {
padding: 20px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 14px;
}
.save-user-profile {
width: 700rpx;
margin: 40rpx auto;
}
.add-address {
width: 600rpx !important;
margin: 40rpx auto;
}
.btn-bar {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
.title-bar {
display: flex;
}
.title-bar .web-text-heading {
margin-right: 20rpx;
}
.title-bar .web-text-secondary {
margin-right: 20rpx;
}
+523
View File
@@ -0,0 +1,523 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_order_index = require("../../api/shop/order/index.js");
const api_shop_userAddress_index = require("../../api/shop/userAddress/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 {
orderId: 0,
goodsId: 0,
userInfo: {},
address: {},
addressList: [],
week: 0,
goodsList,
// 订单总金额
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.orderId = option.orderId;
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_shop_userAddress_index.pageUserAddress({
userId: common_vendor.index.getStorageSync("user_id")
}).then((res) => {
app.addressList = res.list;
const arr = res.list.filter((d) => d.isDefault === true);
app.address = 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;
});
});
},
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;
},
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;
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;
if (app.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/goods/order"
});
}, 500);
},
fail: function(err) {
console.log("支付失败", err);
app.disabled = false;
common_vendor.index.navigateTo({
url: "/package/goods/order"
});
}
});
}
if (app.payType == 0) {
if (!orderInfo) {
return common_vendor.index.showToast({
title: "支付失败",
icon: "error"
});
}
if (orderInfo) {
common_vendor.index.showToast({
title: "支付成功",
icon: "success"
});
setTimeout(function() {
app.disabled = false;
app.$refs.payPasswordForm.close();
common_vendor.index.reLaunch({
url: "/package/goods/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_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
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");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_icon2 + _easycom_uv_cell2 + _easycom_uni_card2 + _easycom_uv_avatar2 + _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 + _easycom_ws_login2)();
}
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_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.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";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_icon + _easycom_uv_cell + _easycom_uni_card + _easycom_uv_avatar + _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 + _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: $data.address.name
}, $data.address.name ? {
j: common_vendor.p({
name: "arrow-right"
}),
k: common_vendor.o($options.openAddressList),
l: common_vendor.p({
title: `${$data.address.name}   ${$data.address.phone}`,
label: `${$data.address.address}`,
icon: "map",
cellStyle: {
padding: "5px 0"
},
border: false
})
} : {}, {
m: common_vendor.p({
border: false,
["is-shadow"]: false
}),
n: $data.goodsList.length == 0
}, $data.goodsList.length == 0 ? {} : {}, {
o: $data.goodsList
}, $data.goodsList ? {
p: common_vendor.f($data.goodsList, (item, index, i0) => {
return {
a: "d0ffe0d0-6-" + i0 + "," + ("d0ffe0d0-5-" + i0),
b: common_vendor.p({
src: item.image,
size: "60",
shape: "square"
}),
c: "d0ffe0d0-5-" + i0 + ",d0ffe0d0-4",
d: common_vendor.p({
title: `${item.goodsName}`,
label: `${item.comments}`,
cellStyle: {
padding: "10px 0"
},
border: false,
value: `¥${item.price}`
}),
e: index
};
})
} : {}, {
q: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
r: common_vendor.p({
title: "订单信息",
border: false,
["is-shadow"]: false
}),
s: common_vendor.f($data.payment, (item, index, i0) => {
return common_vendor.e({
a: item.type == $data.payType
}, item.type == $data.payType ? {
b: "d0ffe0d0-10-" + i0 + "," + ("d0ffe0d0-9-" + i0),
c: common_vendor.p({
size: "30rpx",
name: "checkbox-mark"
})
} : {}, {
d: common_vendor.o(($event) => $options.onPayType(item.type), index),
e: "d0ffe0d0-9-" + i0 + ",d0ffe0d0-8",
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
});
}),
t: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
v: common_vendor.t($data.totalPrice || 0),
w: common_vendor.o(($event) => _ctx.actionsClick("分享")),
x: common_vendor.p({
title: "选择支付方式",
border: false,
["is-shadow"]: false
}),
y: !$data.disabled
}, !$data.disabled ? {
z: common_vendor.o($options.onDisabled),
A: common_vendor.p({
type: "circle",
size: "20",
color: "#a4a5a7"
})
} : {
B: common_vendor.o($options.onDisabled),
C: common_vendor.p({
type: "checkbox",
size: "20",
color: "#11a954"
})
}, {
D: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=501")),
E: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=502")),
F: common_vendor.o((...args) => $options.onDisabled && $options.onDisabled(...args)),
G: common_vendor.p({
height: "50"
}),
H: common_vendor.p({
startVal: 0,
decimals: "2",
duration: "100",
color: "#ebcf00",
bold: true,
endVal: $data.totalPrice
}),
I: common_vendor.o($options.save),
J: 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: "提交订单"
}),
K: common_vendor.f($data.addressList, (item, index, i0) => {
return common_vendor.e({
a: "d0ffe0d0-20-" + i0 + "," + ("d0ffe0d0-19-" + 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: "d0ffe0d0-21-" + i0 + "," + ("d0ffe0d0-19-" + i0),
g: common_vendor.p({
text: "默认",
size: "mini",
inverted: true,
type: "success"
})
} : {}, {
h: "d0ffe0d0-22-" + i0 + "," + ("d0ffe0d0-19-" + i0),
i: common_vendor.o(($event) => $options.onAddress(item), index),
j: "d0ffe0d0-19-" + i0 + ",d0ffe0d0-18",
k: common_vendor.p({
cellStyle: {
padding: "10px 0"
},
label: item.address
}),
l: index
});
}),
L: common_vendor.p({
type: "right"
}),
M: common_vendor.o(($event) => $options.navTo("/package/user/address")),
N: common_vendor.p({
customStyle: {
borderRadius: "30px"
},
text: "收货地址管理"
}),
O: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
P: common_vendor.p({
title: "选择收货地址",
border: false,
["is-shadow"]: false,
padding: 0
}),
Q: common_vendor.sr("addForm", "d0ffe0d0-16"),
R: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
S: common_vendor.o($options.onPayPassword),
T: common_vendor.o(($event) => $data.payPassword = $event),
U: common_vendor.p({
mode: "box",
dot: true,
space: 0,
maxlength: 6,
hairline: true,
modelValue: $data.payPassword
}),
V: common_vendor.p({
label: "支付密码",
name: "payPassword",
required: true
}),
W: common_vendor.sr("form", "d0ffe0d0-26,d0ffe0d0-25"),
X: common_vendor.p({
["label-width"]: 80
}),
Y: common_vendor.o(($event) => $options.navTo(`/package/user/pay-password`)),
Z: common_vendor.p({
title: "请输入支付密码",
border: false,
["is-shadow"]: false,
padding: 0
}),
aa: common_vendor.sr("payPasswordForm", "d0ffe0d0-24"),
ab: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
ac: common_vendor.sr("login", "d0ffe0d0-29"),
ad: common_vendor.o($options.reload),
ae: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d0ffe0d0"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/goods/checkout.vue"]]);
wx.createPage(MiniProgramPage);
+21
View File
@@ -0,0 +1,21 @@
{
"navigationBarTitleText": "订单确认",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"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",
"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-d0ffe0d0 {
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-d0ffe0d0 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total.data-v-d0ffe0d0 {
display: flex;
color: #ebcf00;
align-items: center;
padding-left: 40rpx;
}
.card-actions.data-v-d0ffe0d0 {
display: flex;
flex-direction: row;
justify-content: flex-end;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions-item.data-v-d0ffe0d0 {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item .web-text-heading.data-v-d0ffe0d0 {
font-size: 38rpx;
margin-left: 28rpx;
}
.card-actions-item-text.data-v-d0ffe0d0 {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.address-body.data-v-d0ffe0d0 {
width: 660rpx;
margin: auto;
}
.add-address.data-v-d0ffe0d0 {
width: 600rpx !important;
margin: 40rpx auto;
}
.btn-bar.data-v-d0ffe0d0 {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
.title-bar.data-v-d0ffe0d0 {
display: flex;
}
.title-bar .web-text-heading.data-v-d0ffe0d0 {
margin-right: 20rpx;
}
.title-bar .web-text-secondary.data-v-d0ffe0d0 {
margin-right: 20rpx;
}
.xieyi.data-v-d0ffe0d0 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-d0ffe0d0 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-d0ffe0d0 {
color: #0f80ff;
}
.pay-password-card.data-v-d0ffe0d0 {
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-d0ffe0d0 {
line-height: 2rem;
padding: 20rpx 0;
}
.to-pay-btn.data-v-d0ffe0d0 {
width: 400rpx !important;
margin: 40rpx auto;
}
+289
View File
@@ -0,0 +1,289 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_goods_index = require("../../api/shop/goods/index.js");
const store_modules_car = require("../../store/modules/car.js");
const carStore = store_modules_car.useCarStore();
const {
goodsList,
orderInfo,
totalPrice,
carNum,
merchantId,
merchantName,
merchantCode,
type,
dateTime
} = common_vendor.storeToRefs(carStore);
const _sfc_main = {
data() {
return {
id: 0,
form: {},
// 场馆相册
photo: [],
isLogin: false,
disabled: true,
orderInfo,
goodsList,
totalPrice,
carNum,
merchantId,
merchantName,
merchantCode,
type,
dateTime,
options: [{
icon: "headphones",
text: "客服"
}, {
icon: "cart",
text: "购物车",
info: 2
}],
buttonGroup: [
{
text: "立即购买",
backgroundColor: "linear-gradient(90deg, #ccff66, #008e04)",
color: "#fff"
}
],
customButtonGroup1: [{
text: "立即购买",
backgroundColor: "linear-gradient(90deg, #ccff66, #008e04)",
color: "#fff"
}]
};
},
onLoad(option) {
this.id = option.id;
this.reload();
},
onShow() {
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
this.isLogin = true;
}
},
methods: {
async reload() {
const app = this;
Promise.all([app.getGoods()]).then((data) => {
console.log("data: ", data);
const form = data[0];
app.form = form;
carStore.merchantId = form.merchantId;
carStore.merchantName = form.merchantName;
carStore.merchantCode = form.merchantCode;
common_vendor.index.setNavigationBarTitle({
title: form.goodsName
});
if (form.files) {
app.photo = JSON.parse(form.files);
}
});
},
getGoods() {
return new Promise((resolve, reject) => {
api_shop_goods_index.getGoods(this.id).then((result) => {
resolve(result);
}).catch(reject);
});
},
onDisabled() {
this.disabled = !this.disabled;
},
navTo(url) {
common_vendor.index.navigateTo({
url
});
},
openBookingTel() {
this.$refs.popup.open("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;
}
const app = this;
const { form } = this;
carStore.totalPrice = form.price;
app.goodsList = [];
form.image = JSON.parse(form.image)[0];
app.goodsList.push(form);
carStore.goodsList = app.goodsList;
common_vendor.index.navigateTo({
url: "/package/goods/checkout?goodsId=" + 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_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_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
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_cell_group2 + _easycom_uni_card2 + _easycom_uni_icons2 + _easycom_uv_gap2 + _easycom_uv_button2 + _easycom_uv_icon2 + _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_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_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_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.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_cell_group + _easycom_uni_card + _easycom_uni_icons + _easycom_uv_gap + _easycom_uv_button + _easycom_uv_icon + _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: "750rpx",
radius: "0"
}),
b: common_vendor.t($data.form.price),
c: common_vendor.t($data.form.price * 2),
d: common_vendor.p({
cellStyle: {
padding: "10px 5px"
}
}),
e: common_vendor.p({
title: $data.form.goodsName,
label: "商品名称",
cellStyle: {
padding: "10px 5px"
}
}),
f: common_vendor.p({
title: "选择款式",
label: `100zz【藏青色】、100zz【古红色】`,
isLink: true,
cellStyle: {
padding: "10px 5px"
}
}),
g: common_vendor.p({
title: "参数",
label: $data.form.goodsName,
cellStyle: {
padding: "10px 5px"
}
}),
h: common_vendor.o(($event) => $options.callPhone("0771-8888888")),
i: common_vendor.p({
title: "客服电话",
label: "0771-8888888",
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
j: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
k: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
l: $data.form.content,
m: common_vendor.p({
title: "商品详情",
["is-shadow"]: false,
border: false,
padding: 0
}),
n: !$data.disabled
}, !$data.disabled ? {
o: common_vendor.o($options.onDisabled),
p: common_vendor.p({
type: "circle",
size: "20",
color: "#a4a5a7"
})
} : {
q: common_vendor.o($options.onDisabled),
r: common_vendor.p({
type: "checkbox",
size: "20",
color: "#11a954"
})
}, {
s: common_vendor.o(($event) => $options.navTo("/package/article/detail?articleId=503")),
t: common_vendor.o((...args) => $options.onDisabled && $options.onDisabled(...args)),
v: common_vendor.p({
height: "50"
}),
w: common_vendor.o($options.save),
x: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "立即购买"
}),
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", "fc93fbf0-13"),
B: common_vendor.p({
type: "center"
}),
C: common_vendor.sr("login", "fc93fbf0-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-fc93fbf0"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/goods/detail.vue"]]);
wx.createPage(MiniProgramPage);
+16
View File
@@ -0,0 +1,16 @@
{
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-swiper": "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"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-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"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=" data-v-fc93fbf0"><view class="goods-info data-v-fc93fbf0"><uv-swiper wx:if="{{a}}" class="data-v-fc93fbf0" u-i="fc93fbf0-0" bind:__l="__l" u-p="{{a}}"></uv-swiper></view><uni-card wx:if="{{k}}" class="data-v-fc93fbf0" u-s="{{['d']}}" u-i="fc93fbf0-1" bind:__l="__l" u-p="{{k}}"><uv-cell-group wx:if="{{j}}" class="data-v-fc93fbf0" u-s="{{['d']}}" u-i="fc93fbf0-2,fc93fbf0-1" bind:__l="__l" u-p="{{j}}"><uv-cell wx:if="{{d}}" class="data-v-fc93fbf0" u-s="{{['title','right-icon']}}" u-i="fc93fbf0-3,fc93fbf0-2" bind:__l="__l" u-p="{{d}}"><view class="pirce-bar data-v-fc93fbf0" style="display:flex" slot="title"><view class="web-text-danger data-v-fc93fbf0">¥</view><view class="web-text-danger data-v-fc93fbf0" style="font-size:40rpx">{{b}}</view></view><text class="web-text-secondary data-v-fc93fbf0" style="text-decoration:line-through" slot="right-icon">划线价¥{{c}}</text></uv-cell><uv-cell wx:if="{{e}}" class="data-v-fc93fbf0" u-i="fc93fbf0-4,fc93fbf0-2" bind:__l="__l" u-p="{{e}}"></uv-cell><uv-cell wx:if="{{f}}" class="data-v-fc93fbf0" u-s="{{['right-icon']}}" u-i="fc93fbf0-5,fc93fbf0-2" bind:__l="__l" u-p="{{f}}"><view slot="right-icon"></view></uv-cell><uv-cell wx:if="{{g}}" class="data-v-fc93fbf0" u-i="fc93fbf0-6,fc93fbf0-2" bind:__l="__l" u-p="{{g}}"></uv-cell><uv-cell wx:if="{{i}}" class="data-v-fc93fbf0" bindclick="{{h}}" u-i="fc93fbf0-7,fc93fbf0-2" bind:__l="__l" u-p="{{i}}"></uv-cell></uv-cell-group></uni-card><uni-card wx:if="{{m}}" class="data-v-fc93fbf0" u-s="{{['d']}}" u-i="fc93fbf0-8" bind:__l="__l" u-p="{{m}}"><view class="web-text-heading booking-content data-v-fc93fbf0"><view class="data-v-fc93fbf0"><rich-text class="data-v-fc93fbf0" nodes="{{l}}"/></view></view></uni-card><view class="xieyi web-cell web-text-secondary web-cell-align-top data-v-fc93fbf0"><view class="web-cell web-cell-content web-cell-align-top data-v-fc93fbf0"><uni-icons wx:if="{{n}}" class="data-v-fc93fbf0" bindclick="{{o}}" u-i="fc93fbf0-9" bind:__l="__l" u-p="{{p}}"></uni-icons><uni-icons wx:else class="data-v-fc93fbf0" bindclick="{{q}}" u-i="fc93fbf0-10" bind:__l="__l" u-p="{{r||''}}"></uni-icons><view class="text data-v-fc93fbf0" bindtap="{{t}}"><text class="data-v-fc93fbf0">我已阅读并同意</text><text class="link data-v-fc93fbf0" catchtap="{{s}}">《购买协议》</text></view></view></view><uv-gap wx:if="{{v}}" class="data-v-fc93fbf0" u-i="fc93fbf0-11" bind:__l="__l" u-p="{{v}}"></uv-gap><view class="save-btn data-v-fc93fbf0"><uv-button wx:if="{{x}}" class="data-v-fc93fbf0" bindclick="{{w}}" u-i="fc93fbf0-12" bind:__l="__l" u-p="{{x}}"></uv-button></view></view><uni-popup wx:if="{{B}}" class="r data-v-fc93fbf0" u-s="{{['d']}}" u-r="popup" u-i="fc93fbf0-13" bind:__l="__l" u-p="{{B}}"><view class="popup-booking-tel data-v-fc93fbf0"><text class="title data-v-fc93fbf0">场馆热线</text><text class="desc data-v-fc93fbf0">主体育场、足球训练场:0771-4953380</text><text class="desc data-v-fc93fbf0">体育馆、综合训练馆、网球馆:0771-4953380</text><text class="desc data-v-fc93fbf0">游泳跳水馆:0771-4736008</text><text class="title data-v-fc93fbf0">参观接待</text><text class="desc data-v-fc93fbf0">预约电话:0771-4736955</text><text class="desc data-v-fc93fbf0">传真号码:0771-4736955</text><text class="title data-v-fc93fbf0">大型活动订场</text><text class="desc data-v-fc93fbf0">预约电话:0771-4736970、0771-4736994</text><text class="title data-v-fc93fbf0">威拓普健身馆</text><text class="desc data-v-fc93fbf0">联系电话:0771-5588699</text></view><view class="web-cell popup-close data-v-fc93fbf0" bindtap="{{z}}"><uv-icon wx:if="{{y}}" class="data-v-fc93fbf0" u-i="fc93fbf0-14,fc93fbf0-13" bind:__l="__l" u-p="{{y}}"></uv-icon></view></uni-popup><ws-login wx:if="{{E}}" class="r data-v-fc93fbf0" u-r="login" binddone="{{D}}" u-i="fc93fbf0-15" bind:__l="__l" u-p="{{E}}"/>
+113
View File
@@ -0,0 +1,113 @@
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 */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.goods-info.data-v-fc93fbf0 {
width: 750rpx;
height: 750rpx;
background-color: #fff;
}
.merchant-name.data-v-fc93fbf0 {
padding: 30rpx;
font-weight: 500;
font-size: 42rpx;
background-color: #ffffff;
}
.save-btn.data-v-fc93fbf0 {
width: 700rpx;
left: 25rpx;
height: 80rpx;
position: fixed;
bottom: 30rpx;
}
.booking-tel.data-v-fc93fbf0 {
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-fc93fbf0 {
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-fc93fbf0 {
font-weight: bold;
font-size: 38rpx;
text-align: center;
padding: 10px 0;
}
.popup-booking-tel .desc.data-v-fc93fbf0 {
line-height: 2rem;
}
.popup-close.data-v-fc93fbf0 {
display: flex;
margin-top: 24rpx;
justify-content: center;
}
.booking-content.data-v-fc93fbf0 {
padding: 10px;
font-size: 30rpx;
line-height: 1.5rem;
}
.xieyi.data-v-fc93fbf0 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-fc93fbf0 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-fc93fbf0 {
color: #0f80ff;
}
.goods-nav-btn.data-v-fc93fbf0 {
width: 750rpx;
position: fixed;
bottom: 0;
background-color: #fff;
}
+371
View File
@@ -0,0 +1,371 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_order_index = require("../../api/shop/order/index.js");
const api_shop_wechatDeposit_index = require("../../api/shop/wechatDeposit/index.js");
const utils_common = require("../../utils/common.js");
const _sfc_main = {
components: {},
data() {
return {
isRefresh: false,
isLogin: false,
userId: 0,
where: {
page: 1,
type: 0,
// 0商城订单 1场地预定
sceneType: "showOrderGoods"
// 查询订单附加场地信息
},
canReset: false,
loadMore: "more",
logo: "",
items: ["全部", "待付款", "待发货", "待收货", "已完成"],
orderList: [],
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();
},
onShow(e) {
this.openLogin();
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;
}
where.userId = userId;
app.loadMore = "loading";
api_shop_order_index.pageOrder(where).then((res) => {
const list = res.list.map((d) => {
console.log(d);
return d;
});
if (app.orderList.length < res.count) {
console.log("11111: ", 11111);
app.orderList = app.orderList.concat(list);
app.canReset = true;
app.loadMore = "no-more";
} else {
app.canReset = false;
app.loadMore = "no-more";
console.log("22222: ", 22222);
}
common_vendor.index.hideLoading();
app.isRefresh = false;
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
app.isRefresh = false;
});
},
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 = 0;
where.orderStatus = void 0;
}
if (index == 2) {
where.payStatus = 1;
where.orderStatus = void 0;
}
if (index == 3) {
where.payStatus = 1;
where.orderStatus = 1;
}
if (index == 4) {
api_shop_wechatDeposit_index.pageWechatDeposit({
uid: common_vendor.index.getStorageSync("user_id")
}).then((res) => {
app.orderList = res.list;
if (res.count == 0) {
app.loadMore = "no-more";
}
common_vendor.index.hideLoading();
});
return false;
}
this.where.page = 1;
this.orderList = [];
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) {
api_shop_order_index.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;
}
},
// 申请开票
onInvoice(id) {
common_vendor.index.navigateTo({
url: "/package/user/invoice?id=" + id
});
}
}
};
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_count_down2 = common_vendor.resolveComponent("uv-count-down");
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_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uni_load_more2 = common_vendor.resolveComponent("uni-load-more");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uni_segmented_control2 + _easycom_uv_avatar2 + _easycom_uv_count_down2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_skeleton2 + _easycom_uv_gap2 + _easycom_uni_load_more2 + _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_count_down = () => "../../uni_modules/uv-count-down/components/uv-count-down/uv-count-down.js";
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_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_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_uni_segmented_control + _easycom_uv_avatar + _easycom_uv_count_down + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_skeleton + _easycom_uv_gap + _easycom_uni_load_more + _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: $data.orderList.length > 0
}, $data.orderList.length > 0 ? {
d: common_vendor.f($data.orderList, (item, index, i0) => {
return common_vendor.e({
a: "6fa64f37-2-" + i0 + "," + ("6fa64f37-1-" + i0),
b: common_vendor.p({
src: item.merchantAvatar,
size: "24"
}),
c: common_vendor.t(item.merchantName),
d: item.orderStatus == 2
}, item.orderStatus == 2 ? {} : item.orderStatus == 1 ? {} : common_vendor.e({
f: item.payStatus == 1
}, item.payStatus == 1 ? {} : {}, {
g: item.payStatus == 0
}, item.payStatus == 0 ? {
h: "6fa64f37-3-" + i0 + "," + ("6fa64f37-1-" + i0),
i: common_vendor.p({
time: item.timestamp,
format: "mm:ss"
})
} : {}), {
e: item.orderStatus == 1,
j: common_vendor.f(item.goodsList, (sub, subIndex, i1) => {
return {
a: "6fa64f37-6-" + i0 + "-" + i1 + "," + ("6fa64f37-5-" + i0 + "-" + i1),
b: common_vendor.p({
src: sub.image,
fontSize: "12",
size: "50",
shape: "square"
}),
c: common_vendor.t(sub.price),
d: common_vendor.o(($event) => $options.openUrl(`/package/order/detail?id=${item.orderId}`), subIndex),
e: "6fa64f37-5-" + i0 + "-" + i1 + "," + ("6fa64f37-4-" + i0),
f: common_vendor.p({
title: `${sub.goodsName}`,
label: `${sub.comments}`,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
border: false
}),
g: subIndex
};
}),
k: common_vendor.t(item.totalNum),
l: "6fa64f37-4-" + i0 + "," + ("6fa64f37-1-" + i0),
m: item.payStatus == 0 && item.orderStatus == 0
}, item.payStatus == 0 && item.orderStatus == 0 ? {
n: common_vendor.o(($event) => $options.closeOrder(item), index),
o: common_vendor.o(($event) => $options.toPay(item.orderId), index)
} : {}, {
p: item.payStatus == 1 && item.isInvoice == 0
}, item.payStatus == 1 && item.isInvoice == 0 ? {
q: common_vendor.o(($event) => $options.onInvoice(item.orderId), index)
} : {}, {
r: "6fa64f37-1-" + i0,
s: index
});
}),
e: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
f: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
})
} : {}, {
g: $data.orderList.length == 0 && $data.loadMore != "no-more"
}, $data.orderList.length == 0 && $data.loadMore != "no-more" ? {
h: common_vendor.p({
rows: "3",
avatar: true,
loading: $data.hideTools,
title: false
}),
i: common_vendor.p({
height: "16"
}),
j: common_vendor.p({
border: false,
padding: "18px 6px"
}),
k: common_vendor.p({
rows: "3",
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.p({
rows: "3",
avatar: true,
loading: $data.hideTools,
title: false
}),
o: common_vendor.p({
height: "16"
}),
p: common_vendor.p({
border: false,
padding: "18px 6px"
}),
q: common_vendor.p({
rows: "3",
avatar: true,
loading: $data.hideTools,
title: false
}),
r: common_vendor.p({
height: "16"
}),
s: common_vendor.p({
border: false,
padding: "18px 6px"
})
} : {}, {
t: $data.orderList.length > 0
}, $data.orderList.length > 0 ? {
v: common_vendor.p({
status: $data.loadMore
})
} : {}, {
w: common_vendor.sr("login", "6fa64f37-20"),
x: common_vendor.o($options.reload),
y: 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/goods/order.vue"]]);
wx.createPage(MiniProgramPage);
+15
View File
@@ -0,0 +1,15 @@
{
"navigationBarTitleText": "商城订单",
"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-count-down": "../../uni_modules/uv-count-down/components/uv-count-down/uv-count-down",
"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-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"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="segmented"><uni-segmented-control wx:if="{{b}}" bindclickItem="{{a}}" u-i="6fa64f37-0" bind:__l="__l" u-p="{{b}}"/></view><view class="order"><block wx:if="{{c}}"><block wx:for="{{d}}" wx:for-item="item" wx:key="s"><uni-card wx:if="{{f}}" u-s="{{['title','d']}}" u-i="{{item.r}}" bind:__l="__l" u-p="{{f}}"><view class="order-title web-cell" slot="title"><view class="web-cell web-cell-content"><view class="merchant-avatar"><uv-avatar wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-avatar></view><text class="merchant-name">{{item.c}}</text></view><block wx:if="{{item.d}}"><text class="btn-status web-text-secondary">已取消</text></block><block wx:elif="{{item.e}}"><text class="btn-status web-text-success">已完成</text></block><block wx:else><text wx:if="{{item.f}}" class="btn-status web-text-success">已支付</text><view wx:if="{{item.g}}" class="btn-status web-text-danger"><uv-count-down wx:if="{{item.i}}" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"></uv-count-down><text class="no-pay" style="margin-left:10rpx">未支付</text></view></block></view><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{e}}" u-s="{{['d']}}" u-i="{{item.l}}" bind:__l="__l" u-p="{{e}}"><block wx:for="{{item.j}}" wx:for-item="sub" wx:key="g"><uv-cell wx:if="{{sub.f}}" u-s="{{['icon','value']}}" bindclick="{{sub.d}}" u-i="{{sub.e}}" bind:__l="__l" u-p="{{sub.f}}"><uv-avatar u-i="{{sub.a}}" bind:__l="__l" u-p="{{sub.b}}" slot="icon"></uv-avatar><view class="goods-price-bar" slot="value"><view class="goods-price web-text-heading">¥{{sub.c}}</view><view class="total-num web-text-secondary" style="font-size:13px;letter-spacing:1px">共{{item.k}}件</view></view></uv-cell></block></uv-cell-group></view></view><view slot="actions" class="card-actions"><view wx:if="{{item.m}}" class="card-actions-item"><button class="mini-btn" size="mini" bindtap="{{item.n}}" style="margin-right:20rpx">取消订单</button><button class="mini-btn" type="primary" size="mini" bindtap="{{item.o}}">去支付</button></view><view wx:if="{{item.p}}" class="card-actions-item" bindtap="{{item.q}}"><button class="mini-btn" size="mini">申请开票</button></view></view></uni-card></block></block><block wx:if="{{g}}"><uni-card wx:if="{{j}}" u-s="{{['d']}}" u-i="6fa64f37-7" bind:__l="__l" u-p="{{j}}"><uv-skeleton wx:if="{{h}}" u-i="6fa64f37-8,6fa64f37-7" bind:__l="__l" u-p="{{h}}"></uv-skeleton><uv-gap wx:if="{{i}}" u-i="6fa64f37-9,6fa64f37-7" bind:__l="__l" u-p="{{i}}"></uv-gap></uni-card><uni-card wx:if="{{m}}" u-s="{{['d']}}" u-i="6fa64f37-10" bind:__l="__l" u-p="{{m}}"><uv-skeleton wx:if="{{k}}" u-i="6fa64f37-11,6fa64f37-10" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" u-i="6fa64f37-12,6fa64f37-10" bind:__l="__l" u-p="{{l}}"></uv-gap></uni-card><uni-card wx:if="{{p}}" u-s="{{['d']}}" u-i="6fa64f37-13" bind:__l="__l" u-p="{{p}}"><uv-skeleton wx:if="{{n}}" u-i="6fa64f37-14,6fa64f37-13" bind:__l="__l" u-p="{{n}}"></uv-skeleton><uv-gap wx:if="{{o}}" u-i="6fa64f37-15,6fa64f37-13" bind:__l="__l" u-p="{{o}}"></uv-gap></uni-card><uni-card wx:if="{{s}}" u-s="{{['d']}}" u-i="6fa64f37-16" bind:__l="__l" u-p="{{s}}"><uv-skeleton wx:if="{{q}}" u-i="6fa64f37-17,6fa64f37-16" bind:__l="__l" u-p="{{q}}"></uv-skeleton><uv-gap wx:if="{{r}}" u-i="6fa64f37-18,6fa64f37-16" bind:__l="__l" u-p="{{r}}"></uv-gap></uni-card></block><uni-load-more wx:if="{{t}}" u-i="6fa64f37-19" bind:__l="__l" u-p="{{v}}"></uni-load-more><ws-login wx:if="{{y}}" class="r" u-r="login" binddone="{{x}}" u-i="6fa64f37-20" bind:__l="__l" u-p="{{y}}"/></view></view>
+102
View File
@@ -0,0 +1,102 @@
/**
* 这里是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;
}
.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: 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;
}
.goods-price-bar {
display: flex;
flex-direction: column;
align-items: flex-end;
}
+266
View File
@@ -0,0 +1,266 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_matchOrder_index = require("../../api/booking/matchOrder/index.js");
const store_modules_user = require("../../store/modules/user.js");
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
logo: "",
matchId: 0,
userInfo: {},
isLogin: false,
disabled: false,
// 表单数据
formData: [
{
name: void 0,
phone: void 0,
sex: void 0,
idCardNo: void 0,
userId: 0,
matchId: void 0
}
],
// 单选数据源
sexs: [
{
text: "男",
value: 0
},
{
text: "女",
value: 1
}
],
rules: {}
};
},
onLoad(option) {
this.matchId = option.id;
this.formData[0].matchId = option.id;
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() {
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;
if (userInfo.userId) {
this.isLogin = true;
}
},
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
});
}
},
onSexValue(text) {
this.formData.sex = text;
},
addUser() {
const app = this;
this.formData.push({
name: void 0,
phone: void 0,
sex: void 0,
idCardNo: void 0,
matchId: app.id
});
},
removeUser(index) {
this.formData.splice(index, 1);
},
// 弹出登录提示框
openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
},
submit() {
console.log("表单数据信息:", this.formData);
api_booking_matchOrder_index.addBatchMatchOrder(this.formData).then((res) => {
console.log("173", res);
if (res.code == 1) {
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
return false;
}
common_vendor.index.showToast({
title: `报名成功`,
icon: "success"
});
this.formData = [
{
name: void 0,
phone: void 0,
sex: void 0,
idCardNo: void 0,
userId: void 0,
matchId: void 0
}
];
}).catch((err) => {
common_vendor.index.showToast({
title: err.message,
icon: "none"
});
console.log("err: ", err);
});
}
}
};
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_uni_easyinput2 = common_vendor.resolveComponent("uni-easyinput");
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uni_icons2 + _easycom_uni_easyinput2 + _easycom_uni_forms_item2 + _easycom_uni_data_checkbox2 + _easycom_uv_input2 + _easycom_uni_card2 + _easycom_uni_forms2 + _easycom_uv_button2 + _easycom_uv_gap2 + _easycom_ws_login2)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_uni_easyinput = () => "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js";
const _easycom_uni_forms_item = () => "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js";
const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uni_icons + _easycom_uni_easyinput + _easycom_uni_forms_item + _easycom_uni_data_checkbox + _easycom_uv_input + _easycom_uni_card + _easycom_uni_forms + _easycom_uv_button + _easycom_uv_gap + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.formData, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.removeUser(index), index),
b: "8df695a9-2-" + i0 + "," + ("8df695a9-1-" + i0),
c: "8df695a9-4-" + i0 + "," + ("8df695a9-3-" + i0),
d: common_vendor.o(($event) => $data.formData[index].name = $event, index),
e: common_vendor.p({
type: "text",
placeholder: "请输入姓名",
modelValue: $data.formData[index].name
}),
f: "8df695a9-3-" + i0 + "," + ("8df695a9-1-" + i0),
g: "8df695a9-6-" + i0 + "," + ("8df695a9-5-" + i0),
h: common_vendor.o(($event) => $data.formData[index].sex = $event, index),
i: common_vendor.p({
localdata: $data.sexs,
modelValue: $data.formData[index].sex
}),
j: "8df695a9-5-" + i0 + "," + ("8df695a9-1-" + i0),
k: "8df695a9-8-" + i0 + "," + ("8df695a9-7-" + i0),
l: common_vendor.o(($event) => $data.formData[index].phone = $event, index),
m: common_vendor.p({
type: "text",
maxlength: "11",
placeholder: "请输入手机号",
modelValue: $data.formData[index].phone
}),
n: "8df695a9-7-" + i0 + "," + ("8df695a9-1-" + i0),
o: "8df695a9-10-" + i0 + "," + ("8df695a9-9-" + i0),
p: common_vendor.o(($event) => $data.formData[index].idCardNo = $event, index),
q: common_vendor.p({
placeholder: "请输入",
modelValue: $data.formData[index].idCardNo
}),
r: "8df695a9-9-" + i0 + "," + ("8df695a9-1-" + i0),
s: index,
t: "8df695a9-1-" + i0 + ",8df695a9-0",
v: common_vendor.p({
title: `报名人 ${index + 1}`,
border: false,
["is-shadow"]: true
})
};
}),
b: common_vendor.p({
type: "closeempty",
color: "#999999",
size: "18"
}),
c: common_vendor.p({
label: "姓名",
name: "name",
required: true
}),
d: common_vendor.p({
label: "性别",
name: "sex",
required: true
}),
e: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
f: common_vendor.p({
label: "身份证号",
name: "idCardNo",
required: true
}),
g: common_vendor.sr("form", "8df695a9-0"),
h: common_vendor.p({
["label-width"]: 80
}),
i: common_vendor.o($options.addUser),
j: common_vendor.p({
icon: "plus",
iconSize: "16",
customStyle: {
borderRadius: "8px"
},
text: "新增报名人"
}),
k: common_vendor.p({
height: "50"
}),
l: common_vendor.o($options.submit),
m: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "确定"
}),
n: common_vendor.sr("login", "8df695a9-14"),
o: common_vendor.o($options.reload),
p: common_vendor.p({
logo: $data.logo
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8df695a9"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/match/checkout.vue"]]);
wx.createPage(MiniProgramPage);
+15
View File
@@ -0,0 +1,15 @@
{
"navigationBarTitleText": "赛事活动报名",
"usingComponents": {
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"uni-easyinput": "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput",
"uni-forms-item": "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item",
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
"uv-input": "../../uni_modules/uv-input/components/uv-input/uv-input",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uni-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-8df695a9"><uni-forms wx:if="{{h}}" class="r data-v-8df695a9" u-s="{{['d']}}" u-r="form" u-i="8df695a9-0" bind:__l="__l" u-p="{{h}}"><uni-card wx:for="{{a}}" wx:for-item="item" wx:key="s" u-s="{{['d']}}" class="relative data-v-8df695a9" u-i="{{item.t}}" bind:__l="__l" u-p="{{item.v}}"><view class="text-gray-100 absolute right-4 top-25 data-v-8df695a9"><uni-icons wx:if="{{b}}" class="data-v-8df695a9" bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{b}}"></uni-icons></view><uni-forms-item wx:if="{{c}}" class="data-v-8df695a9" u-s="{{['d']}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{c}}"><uni-easyinput wx:if="{{item.e}}" class="data-v-8df695a9" u-i="{{item.c}}" bind:__l="__l" bindupdateModelValue="{{item.d}}" u-p="{{item.e}}"/></uni-forms-item><uni-forms-item wx:if="{{d}}" class="data-v-8df695a9" u-s="{{['d']}}" u-i="{{item.j}}" bind:__l="__l" u-p="{{d}}"><uni-data-checkbox wx:if="{{item.i}}" class="data-v-8df695a9" u-i="{{item.g}}" bind:__l="__l" bindupdateModelValue="{{item.h}}" u-p="{{item.i}}"/></uni-forms-item><uni-forms-item wx:if="{{e}}" class="data-v-8df695a9" u-s="{{['d']}}" u-i="{{item.n}}" bind:__l="__l" u-p="{{e}}"><uni-easyinput wx:if="{{item.m}}" class="data-v-8df695a9" u-i="{{item.k}}" bind:__l="__l" bindupdateModelValue="{{item.l}}" u-p="{{item.m}}"/></uni-forms-item><uni-forms-item wx:if="{{f}}" class="data-v-8df695a9" u-s="{{['d']}}" u-i="{{item.r}}" bind:__l="__l" u-p="{{f}}"><uv-input wx:if="{{item.q}}" class="data-v-8df695a9" u-i="{{item.o}}" bind:__l="__l" bindupdateModelValue="{{item.p}}" u-p="{{item.q}}"></uv-input></uni-forms-item></uni-card></uni-forms><view class="add-match-user data-v-8df695a9"><uv-button wx:if="{{j}}" class="data-v-8df695a9" bindclick="{{i}}" u-i="8df695a9-11" bind:__l="__l" u-p="{{j}}"></uv-button></view><uv-gap wx:if="{{k}}" class="data-v-8df695a9" u-i="8df695a9-12" bind:__l="__l" u-p="{{k}}"></uv-gap><view class="save-btn data-v-8df695a9"><uv-button wx:if="{{m}}" class="data-v-8df695a9" bindclick="{{l}}" u-i="8df695a9-13" bind:__l="__l" u-p="{{m}}"></uv-button></view></view><ws-login wx:if="{{p}}" class="r data-v-8df695a9" u-r="login" binddone="{{o}}" u-i="8df695a9-14" bind:__l="__l" u-p="{{p}}"/>
+161
View File
@@ -0,0 +1,161 @@
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-8df695a9 {
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-8df695a9 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total.data-v-8df695a9 {
display: flex;
color: #ebcf00;
align-items: center;
padding-left: 40rpx;
}
.card-actions.data-v-8df695a9 {
display: flex;
flex-direction: row;
justify-content: flex-end;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions-item.data-v-8df695a9 {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item .web-text-heading.data-v-8df695a9 {
font-size: 38rpx;
margin-left: 28rpx;
}
.card-actions-item-text.data-v-8df695a9 {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.address-body.data-v-8df695a9 {
width: 660rpx;
margin: auto;
}
.add-match-user.data-v-8df695a9 {
width: 700rpx !important;
margin: 40rpx auto;
}
.btn-bar.data-v-8df695a9 {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
.title-bar.data-v-8df695a9 {
display: flex;
}
.title-bar .web-text-heading.data-v-8df695a9 {
margin-right: 20rpx;
}
.title-bar .web-text-secondary.data-v-8df695a9 {
margin-right: 20rpx;
}
.xieyi.data-v-8df695a9 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-8df695a9 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-8df695a9 {
color: #0f80ff;
}
.pay-password-card.data-v-8df695a9 {
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-8df695a9 {
line-height: 2rem;
padding: 20rpx 0;
}
.to-pay-btn.data-v-8df695a9 {
width: 400rpx !important;
margin: 40rpx auto;
}
.example.data-v-8df695a9 {
padding: 15px;
background-color: #fff;
}
.segmented-control.data-v-8df695a9 {
margin-bottom: 15px;
}
.save-btn.data-v-8df695a9 {
width: 700rpx;
left: 25rpx;
height: 80rpx;
position: fixed;
bottom: 30rpx;
}
.button-group.data-v-8df695a9 {
margin-top: 15px;
display: flex;
justify-content: space-around;
}
.form-item.data-v-8df695a9 {
display: flex;
align-items: center;
}
.button.data-v-8df695a9 {
display: flex;
align-items: center;
height: 35px;
margin-left: 10px;
}
+401
View File
@@ -0,0 +1,401 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_match_index = require("../../api/booking/match/index.js");
const store_modules_car = require("../../store/modules/car.js");
store_modules_car.useCarStore();
const _sfc_main = {
data() {
return {
id: 0,
// 场馆信息
match: {},
// 场馆相册
photo: [],
isLogin: false,
disabled: true,
options: [
{
icon: "headphones",
text: "客服"
},
{
icon: "upload",
text: "分享"
}
],
buttonGroup: [
{
text: "立即报名",
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
color: "#fff"
}
],
specList: [
{
id: 1,
type: 0,
name: "周五(7.5)第一场",
time: "2024-07-05 14:30 至 2024-07-05 15:30",
users: 1,
maxUsers: 30,
price: 0
},
{
id: 2,
type: 0,
name: "周五(7.5)第二场",
time: "2024-07-06 14:30 至 2024-07-06 15:30",
users: 3,
maxUsers: 30,
price: 0
},
{
id: 3,
type: 0,
name: "周五(7.5)第三场",
time: "2024-07-07 14:30 至 2024-07-07 15:30",
users: 8,
maxUsers: 30,
price: 0
}
],
selected: 0
};
},
onLoad(option) {
this.id = option.id;
this.reload();
},
onShow() {
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
this.isLogin = true;
}
},
onShareTimeline(res) {
if (res.from === "button") {
console.log("来自页面内分享按钮", res.target);
}
return {
title: this.match.title,
path: "/package/match/detail?id=" + this.match.matchId
};
},
onShareAppMessage(res) {
if (res.from === "button") {
console.log("来自页面内分享按钮", res.target);
}
return {
title: this.match.title,
path: "/package/match/detail?id=" + this.match.matchId
};
},
methods: {
async reload() {
const app = this;
Promise.all([app.getMatch()]).then((res) => {
const match = res[0];
app.match = match;
common_vendor.index.setNavigationBarTitle({
title: match.title
});
common_vendor.index.$uv.mpShare.title = match.title;
if (match.files) {
app.photo = JSON.parse(match.files);
}
});
},
getMatch() {
return new Promise((resolve, reject) => {
api_booking_match_index.getMatch(this.id).then((result) => {
resolve(result);
}).catch(reject);
});
},
onDisabled() {
this.disabled = !this.disabled;
},
navTo(url) {
common_vendor.index.navigateTo({
url
});
},
openBookingTel() {
this.$refs.popup.open("bottom");
},
closeBookingTel() {
this.$refs.popup.close();
},
callPhone(phone) {
common_vendor.index.makePhoneCall({
phoneNumber: phone
});
},
onSelect(item) {
this.selected = item.id;
},
mapTo() {
common_vendor.index.getLocation({
type: "gcj02",
//返回可以用于uni.openLocation的经纬度
success: function(res) {
console.log("返回可以用于uni.openLocation的经纬度: ", res);
const latitude = this.match.latitude;
const longitude = this.match.longitude;
common_vendor.index.openLocation({
latitude,
longitude,
success: function() {
console.log("success");
}
});
}
});
},
buttonClick() {
this.openBookingTel();
},
onClick(e) {
const index = e.index;
if (index == 1) {
common_vendor.index.$uv.mpShare = {
title: "啦啦啦",
// 默认为小程序名称,可自定义
path: "/package/match/detail?id=1"
// 默认为当前页面路径,一般无需修改,QQ小程序不支持
// 分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径。
// 支持PNG及JPG,默认为当前页面的截图
// imageUrl: ''
};
}
},
save() {
if (!this.disabled) {
common_vendor.index.showToast({
title: "请先阅读并同意订票协议",
icon: "none"
});
return false;
}
common_vendor.index.navigateTo({
url: "/package/match/checkout?id=" + this.id
});
}
}
};
if (!Array) {
const _easycom_uv_swiper2 = common_vendor.resolveComponent("uv-swiper");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_tags2 = common_vendor.resolveComponent("uv-tags");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_swiper2 + _easycom_uv_icon2 + _easycom_uv_cell2 + _easycom_uv_tags2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_gap2 + _easycom_uv_button2 + _easycom_uni_popup2 + _easycom_ws_login2)();
}
const _easycom_uv_swiper = () => "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper.js";
const _easycom_uv_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_tags = () => "../../uni_modules/uv-tags/components/uv-tags/uv-tags.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_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_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_icon + _easycom_uv_cell + _easycom_uv_tags + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_gap + _easycom_uv_button + _easycom_uni_popup + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
list: $data.photo,
indicator: true,
indicatorMode: "line",
circular: true,
height: "200",
radius: "0"
}),
b: common_vendor.t($data.match.title),
c: common_vendor.p({
size: "50rpx",
name: "map-fill",
color: "#5ac725"
}),
d: common_vendor.o(($event) => $options.mapTo($data.match)),
e: common_vendor.p({
title: "活动地点",
label: `${$data.match.address}`,
cellStyle: {
padding: "10px 5px"
}
}),
f: common_vendor.p({
title: "活动时间",
label: `2024-07-12 至 2024-08-12`,
cellStyle: {
padding: "10px 5px"
}
}),
g: common_vendor.p({
title: "报名时间",
label: `2024-07-12 至 2024-08-12`,
cellStyle: {
padding: "10px 5px"
}
}),
h: common_vendor.p({
title: "退款规则",
label: `${$data.match.refundRule}`,
cellStyle: {
padding: "10px 5px"
}
}),
i: common_vendor.t($data.match.users),
j: common_vendor.t($data.match.maxUsers),
k: common_vendor.p({
text: "未开始",
plain: true,
size: "mini",
type: "primary"
}),
l: common_vendor.p({
title: "已报名",
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
m: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
n: common_vendor.p({
title: "活动信息",
border: false,
["is-shadow"]: false,
padding: 0
}),
o: $data.match.content,
p: common_vendor.p({
title: "活动介绍",
["is-shadow"]: false,
border: false,
padding: 0
}),
q: common_vendor.p({
height: "100"
}),
r: common_vendor.p({
icon: "server-fill"
}),
s: common_vendor.p({
icon: "share-square",
["open-type"]: "share"
}),
t: common_vendor.o(($event) => $options.navTo(`/package/match/checkout?id=${$data.match.matchId}`)),
v: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
padding: "0 120rpx",
color: "#ffffff"
},
text: "立即报名"
}),
w: common_vendor.p({
cellStyle: {
padding: "10px 5px"
}
}),
x: common_vendor.f($data.specList, (item, index, i0) => {
return common_vendor.e({
a: "c7659a46-19-" + i0 + ",c7659a46-17",
b: item.type === 0
}, item.type === 0 ? {
c: "c7659a46-21-" + i0 + "," + ("c7659a46-20-" + i0),
d: common_vendor.p({
text: "个人",
size: "mini",
type: "primary"
})
} : {}, {
e: item.type === 1
}, item.type === 1 ? {
f: "c7659a46-22-" + i0 + "," + ("c7659a46-20-" + i0),
g: common_vendor.p({
text: "企业",
size: "mini",
type: "primary"
})
} : {}, {
h: common_vendor.t(item.name),
i: common_vendor.t(item.time),
j: common_vendor.t(item.users),
k: common_vendor.t(item.maxUsers),
l: item.price === 0
}, item.price === 0 ? {} : {
m: common_vendor.t(item.price)
}, {
n: common_vendor.o(($event) => $options.onSelect(item), index),
o: "c7659a46-20-" + i0 + ",c7659a46-17",
p: common_vendor.p({
border: false,
cellStyle: {
padding: "10px 5px",
borderRadius: "4px",
backgroundColor: item.id === $data.selected ? "rgb(254 242 242)" : "rgb(249 250 251)"
}
}),
q: index
});
}),
y: common_vendor.p({
height: "10"
}),
z: common_vendor.p({
height: "50"
}),
A: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
B: common_vendor.p({
["is-full"]: true,
border: false,
["is-shadow"]: false,
padding: 0
}),
C: common_vendor.o($options.save),
D: common_vendor.p({
disabled: $data.selected === 0,
customStyle: {
width: "240rpx",
background: "linear-gradient(90deg, #FE6035, #EF1224)",
borderRadius: "0",
color: "#ffffff",
border: "none",
padding: "0"
},
text: "下一步"
}),
E: common_vendor.sr("popup", "c7659a46-15"),
F: common_vendor.p({
type: "center"
}),
G: common_vendor.sr("login", "c7659a46-25"),
H: common_vendor.o($options.reload),
I: common_vendor.p({
logo: _ctx.logo
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-c7659a46"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/match/detail.vue"]]);
_sfc_main.__runtimeHooks = 6;
wx.createPage(MiniProgramPage);
+15
View File
@@ -0,0 +1,15 @@
{
"navigationBarTitleText": "活动详情",
"usingComponents": {
"uv-swiper": "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uv-tags": "../../uni_modules/uv-tags/components/uv-tags/uv-tags",
"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-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-c7659a46"><view class="uv-demo-block data-v-c7659a46"><uv-swiper wx:if="{{a}}" class="data-v-c7659a46" u-i="c7659a46-0" bind:__l="__l" u-p="{{a}}"></uv-swiper></view><view class="match-name flex justify-between data-v-c7659a46"><view class="data-v-c7659a46">{{b}}</view><view class="data-v-c7659a46"></view></view><uni-card wx:if="{{n}}" class="data-v-c7659a46" u-s="{{['d']}}" u-i="c7659a46-1" bind:__l="__l" u-p="{{n}}"><uv-cell-group wx:if="{{m}}" class="data-v-c7659a46" u-s="{{['d']}}" u-i="c7659a46-2,c7659a46-1" bind:__l="__l" u-p="{{m}}"><uv-cell wx:if="{{e}}" class="data-v-c7659a46" u-s="{{['right-icon']}}" bindclick="{{d}}" u-i="c7659a46-3,c7659a46-2" bind:__l="__l" u-p="{{e}}"><uv-icon class="data-v-c7659a46" style="color:#ff0000" u-i="c7659a46-4,c7659a46-3" bind:__l="__l" u-p="{{c}}" slot="right-icon"></uv-icon></uv-cell><uv-cell wx:if="{{f}}" class="data-v-c7659a46" u-i="c7659a46-5,c7659a46-2" bind:__l="__l" u-p="{{f}}"></uv-cell><uv-cell wx:if="{{g}}" class="data-v-c7659a46" u-i="c7659a46-6,c7659a46-2" bind:__l="__l" u-p="{{g}}"></uv-cell><uv-cell wx:if="{{h}}" class="data-v-c7659a46" u-i="c7659a46-7,c7659a46-2" bind:__l="__l" u-p="{{h}}"></uv-cell><uv-cell wx:if="{{l}}" class="data-v-c7659a46" u-s="{{['label','value']}}" u-i="c7659a46-8,c7659a46-2" bind:__l="__l" u-p="{{l}}"><view class="flex flex-row items-center text-xs web-text-secondary data-v-c7659a46" slot="label"><label class="data-v-c7659a46">{{i}}/{{j}}</label></view><uv-tags class="data-v-c7659a46" u-i="c7659a46-9,c7659a46-8" bind:__l="__l" u-p="{{k}}" slot="value"></uv-tags></uv-cell></uv-cell-group></uni-card><uni-card wx:if="{{p}}" class="data-v-c7659a46" u-s="{{['d']}}" u-i="c7659a46-10" bind:__l="__l" u-p="{{p}}"><view class="web-text-heading booking-content data-v-c7659a46"><view class="data-v-c7659a46"><rich-text class="data-v-c7659a46" nodes="{{o}}"/></view></view></uni-card></view><uv-gap wx:if="{{q}}" class="data-v-c7659a46" u-i="c7659a46-11" bind:__l="__l" u-p="{{q}}"></uv-gap><view class="fixed w-full bottom-0 bg-white data-v-c7659a46"><view class="flex justify-between items-center data-v-c7659a46"><view class="left flex data-v-c7659a46"><uv-button wx:if="{{r}}" class="data-v-c7659a46" u-s="{{['d']}}" u-i="c7659a46-12" bind:__l="__l" u-p="{{r}}">客服</uv-button><uv-button wx:if="{{s}}" class="data-v-c7659a46" u-s="{{['d']}}" u-i="c7659a46-13" bind:__l="__l" u-p="{{s}}">分享</uv-button></view><view class="mx-10 data-v-c7659a46"><uv-button wx:if="{{v}}" class="data-v-c7659a46" bindclick="{{t}}" u-i="c7659a46-14" bind:__l="__l" u-p="{{v}}"></uv-button></view></view></view><uni-popup wx:if="{{F}}" class="r data-v-c7659a46" u-s="{{['d']}}" u-r="popup" u-i="c7659a46-15" bind:__l="__l" u-p="{{F}}"><uni-card wx:if="{{B}}" class="data-v-c7659a46" u-s="{{['d']}}" u-i="c7659a46-16,c7659a46-15" bind:__l="__l" u-p="{{B}}"><uv-cell-group wx:if="{{A}}" class="data-v-c7659a46" u-s="{{['d']}}" u-i="c7659a46-17,c7659a46-16" bind:__l="__l" u-p="{{A}}"><uv-cell wx:if="{{w}}" class="data-v-c7659a46" u-s="{{['title']}}" u-i="c7659a46-18,c7659a46-17" bind:__l="__l" u-p="{{w}}"><view class="merchant-name data-v-c7659a46" slot="title">选择规格</view></uv-cell><block wx:for="{{x}}" wx:for-item="item" wx:key="q"><uv-gap wx:if="{{y}}" class="data-v-c7659a46" u-i="{{item.a}}" bind:__l="__l" u-p="{{y}}"></uv-gap><uv-cell wx:if="{{item.p}}" class="data-v-c7659a46" u-s="{{['title','label']}}" bindclick="{{item.n}}" u-i="{{item.o}}" bind:__l="__l" u-p="{{item.p}}"><view class="flex flex-row data-v-c7659a46" slot="title"><uv-tags wx:if="{{item.b}}" class="data-v-c7659a46" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></uv-tags><uv-tags wx:if="{{item.e}}" class="data-v-c7659a46" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"></uv-tags><text class="ml-2 data-v-c7659a46">{{item.h}}</text></view><view slot="label"><view class="flex text-gray-500 py-2 data-v-c7659a46">{{item.i}}</view><view class="flex text-red-500 justify-between data-v-c7659a46"><view class="data-v-c7659a46">已报名 {{item.j}}/{{item.k}}</view><view wx:if="{{item.l}}" class="price text-gray-800 data-v-c7659a46">免费</view><view wx:else class="price text-gray-800 data-v-c7659a46">¥{{item.m}}</view></view></view></uv-cell></block><uv-gap wx:if="{{z}}" class="data-v-c7659a46" u-i="c7659a46-23,c7659a46-17" bind:__l="__l" u-p="{{z}}"></uv-gap></uv-cell-group></uni-card><view class="flex flex-row justify-end w-full fixed bottom-0 bg-white data-v-c7659a46"><uv-button wx:if="{{D}}" class="data-v-c7659a46" bindclick="{{C}}" u-i="c7659a46-24,c7659a46-15" bind:__l="__l" u-p="{{D}}"></uv-button></view></uni-popup><ws-login wx:if="{{I}}" class="r data-v-c7659a46" u-r="login" binddone="{{H}}" u-i="c7659a46-25" bind:__l="__l" u-p="{{I}}"/>
+101
View File
@@ -0,0 +1,101 @@
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 */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.match-name.data-v-c7659a46 {
padding: 30rpx;
font-weight: 500;
font-size: 42rpx;
background-color: #ffffff;
}
.save-btn.data-v-c7659a46 {
width: 700rpx;
left: 25rpx;
height: 80rpx;
position: fixed;
bottom: 30rpx;
}
.booking-tel.data-v-c7659a46 {
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-c7659a46 {
background-color: #ffffff;
width: 750rpx;
min-height: 400rpx;
border-radius: 20rpx 20rpx 0 0;
margin: auto;
z-index: 9999;
display: flex;
flex-direction: column;
}
.popup-booking-tel .title.data-v-c7659a46 {
font-weight: bold;
font-size: 38rpx;
text-align: center;
padding: 10px 0;
}
.popup-booking-tel .desc.data-v-c7659a46 {
line-height: 2rem;
}
.popup-close.data-v-c7659a46 {
display: flex;
margin-top: 24rpx;
justify-content: center;
}
.booking-content.data-v-c7659a46 {
padding: 10px;
font-size: 30rpx;
line-height: 1.5rem;
}
.xieyi.data-v-c7659a46 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-c7659a46 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-c7659a46 {
color: #0f80ff;
}
+176
View File
@@ -0,0 +1,176 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_match_index = require("../../api/booking/match/index.js");
const api_booking_matchOrder_index = require("../../api/booking/matchOrder/index.js");
const _sfc_main = {
data() {
return {
list: [],
// 骨架屏
hideTools: true,
// 项目列表
itemList: []
};
},
onLoad() {
this.reload();
},
methods: {
reload() {
const app = this;
Promise.all([app.getMatchList(), app.getMatchOrderList()]).then((res) => {
console.log("res: ", res);
app.list = res[0];
app.itemList = res[1];
});
},
getMatchList() {
return new Promise((resolve, reject) => {
api_booking_match_index.pageMatch({}).then((result) => {
resolve(result.list);
}).catch(reject);
});
},
getMatchOrderList() {
return new Promise((resolve, reject) => {
api_booking_matchOrder_index.pageMatchOrder({}).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_image2 = common_vendor.resolveComponent("uv-image");
const _easycom_uv_text2 = common_vendor.resolveComponent("uv-text");
const _easycom_uv_tags2 = common_vendor.resolveComponent("uv-tags");
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");
(_easycom_uv_image2 + _easycom_uv_text2 + _easycom_uv_tags2 + _easycom_uv_skeleton2 + _easycom_uv_gap2 + _easycom_uni_card2)();
}
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
const _easycom_uv_text = () => "../../uni_modules/uv-text/components/uv-text/uv-text.js";
const _easycom_uv_tags = () => "../../uni_modules/uv-tags/components/uv-tags/uv-tags.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";
if (!Math) {
(_easycom_uv_image + _easycom_uv_text + _easycom_uv_tags + _easycom_uv_skeleton + _easycom_uv_gap + _easycom_uni_card)();
}
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 common_vendor.e({
a: "95122846-0-" + i0,
b: common_vendor.p({
src: item.image,
width: "120",
height: "120"
}),
c: "95122846-1-" + i0,
d: common_vendor.p({
size: "15",
lineHeight: "24",
lines: 2,
text: item.title
}),
e: "95122846-2-" + i0,
f: item.status == 0
}, item.status == 0 ? {
g: "95122846-3-" + i0,
h: common_vendor.p({
text: "未开始",
plain: true,
size: "mini",
type: "primary"
})
} : {}, {
i: item.status == 1
}, item.status == 1 ? {
j: "95122846-4-" + i0,
k: common_vendor.p({
text: "进行中",
plain: true,
size: "mini",
type: "error"
})
} : {}, {
l: item.status == 2
}, item.status == 2 ? {
m: "95122846-5-" + i0,
n: common_vendor.p({
text: "已结束",
plain: true,
size: "mini",
type: "info"
})
} : {}, {
o: common_vendor.t(item.users),
p: common_vendor.t(item.maxUsers),
q: common_vendor.o(($event) => $options.openUrl(`/package/match/detail?id=` + item.matchId), index),
r: index
});
}),
c: common_vendor.p({
lineHeight: "24",
size: "13",
text: `时间:2024-07-12 至 2024-08-12`
})
} : {
d: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
e: common_vendor.p({
height: "16"
}),
f: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
g: common_vendor.p({
height: "16"
}),
h: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
i: common_vendor.p({
height: "16"
}),
j: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
k: common_vendor.p({
height: "16"
}),
l: 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-95122846"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/match/index.vue"]]);
wx.createPage(MiniProgramPage);
+11
View File
@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "赛事活动",
"usingComponents": {
"uv-image": "../../uni_modules/uv-image/components/uv-image/uv-image",
"uv-text": "../../uni_modules/uv-text/components/uv-text/uv-text",
"uv-tags": "../../uni_modules/uv-tags/components/uv-tags/uv-tags",
"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"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="data-v-95122846"><view class="card-title web-text-heading data-v-95122846">最新赛事/活动</view><block wx:if="{{a}}"><view class="match-list data-v-95122846"><block wx:for="{{b}}" wx:for-item="item" wx:key="r"><view class="match-item flex data-v-95122846" bindtap="{{item.q}}"><uv-image wx:if="{{item.b}}" class="data-v-95122846" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-image><view class="match-info flex flex-col data-v-95122846"><uv-text wx:if="{{item.d}}" class="match-name data-v-95122846" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></uv-text><uv-text wx:if="{{c}}" class="match-name web-text-secondary data-v-95122846" u-i="{{item.e}}" bind:__l="__l" u-p="{{c}}"></uv-text><view class="flex flex-row items-center text-gray-400 items-center text-xs web-text-heading data-v-95122846"><uv-tags wx:if="{{item.f}}" class="data-v-95122846" u-i="{{item.g}}" bind:__l="__l" u-p="{{item.h}}"></uv-tags><uv-tags wx:if="{{item.i}}" class="data-v-95122846" u-i="{{item.j}}" bind:__l="__l" u-p="{{item.k}}"></uv-tags><uv-tags wx:if="{{item.l}}" class="data-v-95122846" u-i="{{item.m}}" bind:__l="__l" u-p="{{item.n}}"></uv-tags><label class="pl-2 web-text-secondary data-v-95122846">{{item.o}}/{{item.p}} 已报名</label></view></view></view></block></view></block><block wx:else><uni-card wx:if="{{l}}" class="data-v-95122846" u-s="{{['d']}}" u-i="95122846-6" bind:__l="__l" u-p="{{l}}"><uv-skeleton wx:if="{{d}}" class="data-v-95122846" u-i="95122846-7,95122846-6" bind:__l="__l" u-p="{{d}}"></uv-skeleton><uv-gap wx:if="{{e}}" class="data-v-95122846" u-i="95122846-8,95122846-6" bind:__l="__l" u-p="{{e}}"></uv-gap><uv-skeleton wx:if="{{f}}" class="data-v-95122846" u-i="95122846-9,95122846-6" bind:__l="__l" u-p="{{f}}"></uv-skeleton><uv-gap wx:if="{{g}}" class="data-v-95122846" u-i="95122846-10,95122846-6" bind:__l="__l" u-p="{{g}}"></uv-gap><uv-skeleton wx:if="{{h}}" class="data-v-95122846" u-i="95122846-11,95122846-6" bind:__l="__l" u-p="{{h}}"></uv-skeleton><uv-gap wx:if="{{i}}" class="data-v-95122846" u-i="95122846-12,95122846-6" bind:__l="__l" u-p="{{i}}"></uv-gap><uv-skeleton wx:if="{{j}}" class="data-v-95122846" u-i="95122846-13,95122846-6" bind:__l="__l" u-p="{{j}}"></uv-skeleton><uv-gap wx:if="{{k}}" class="data-v-95122846" u-i="95122846-14,95122846-6" bind:__l="__l" u-p="{{k}}"></uv-gap></uni-card></block></view>
+97
View File
@@ -0,0 +1,97 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.card-title.data-v-95122846 {
width: 700rpx;
margin: 12rpx auto;
font-size: 34rpx;
font-weight: 500;
margin-top: 32rpx;
}
.match-list.data-v-95122846 {
width: 700rpx;
margin: auto !important;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.match-list .match-item.data-v-95122846 {
width: 700rpx;
margin: 16rpx 0;
border-radius: 16rpx;
overflow: hidden;
background-color: #ffffff;
display: flex;
}
.match-list .match-item .match-info.data-v-95122846 {
padding: 10rpx 16rpx;
line-height: 35rpx;
}
.match-list .match-item .price-bar.data-v-95122846 {
padding: 0 16rpx;
display: flex;
justify-content: space-between;
}
.item-list.data-v-95122846 {
width: 720rpx;
margin: auto;
}
.merchant-card-title.data-v-95122846 {
width: 700rpx;
margin: 12rpx auto;
font-size: 40rpx;
font-weight: 500;
margin-top: 32rpx;
}
.card-body.data-v-95122846 {
width: 700rpx;
margin: auto;
}
.card-body .merchant-card.data-v-95122846 {
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-95122846 {
width: 45vw;
border-radius: 16rpx 16rpx 0 0;
}
.card-body .merchant-card .merchant-name.data-v-95122846 {
padding: 10rpx;
overflow: hidden;
font-weight: 500;
font-size: 26rpx;
text-align: center;
}
.card-body .merchant-card .merchant-desc.data-v-95122846 {
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

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