已支付订单列表: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
+439
View File
@@ -0,0 +1,439 @@
"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: "c55c4c84-3-" + i0 + "," + ("c55c4c84-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: "c55c4c84-4-" + i0 + "," + ("c55c4c84-2-" + i0),
g: common_vendor.p({
text: "默认",
size: "mini",
inverted: true,
type: "success"
})
} : {}, {
h: common_vendor.o(($event) => $options.openEdit(item), index),
i: "c55c4c84-5-" + i0 + "," + ("c55c4c84-2-" + i0),
j: "c55c4c84-2-" + i0 + ",c55c4c84-1",
k: common_vendor.p({
cellStyle: {
padding: "10px 0"
},
label: item.address
}),
l: index
});
}),
b: common_vendor.p({
type: "compose",
size: "18"
}),
c: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
d: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
e: common_vendor.o($options.add),
f: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "添加收货地址"
}),
g: common_vendor.sr("login", "c55c4c84-7"),
h: common_vendor.o($options.reload),
i: common_vendor.p({
logo: $data.logo
}),
j: common_vendor.o(($event) => $data.formData.name = $event),
k: common_vendor.p({
placeholder: "收件人姓名",
maxlength: "5",
modelValue: $data.formData.name
}),
l: common_vendor.p({
label: "收件人",
name: "name",
required: true
}),
m: common_vendor.o(($event) => $data.formData.phone = $event),
n: common_vendor.p({
placeholder: "收件人手机号码",
maxlength: "11",
modelValue: $data.formData.phone
}),
o: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
p: common_vendor.o(_ctx.onchange),
q: common_vendor.o(_ctx.onnodeclick),
r: common_vendor.o(_ctx.onpopupopened),
s: common_vendor.o(_ctx.onpopupclosed),
t: common_vendor.o(($event) => $data.formData.region = $event),
v: common_vendor.p({
placeholder: "省、市、区、街道",
["popup-title"]: "请选择所在地区",
localdata: $data.regions,
map: {
text: "label",
value: "value"
},
modelValue: $data.formData.region
}),
w: common_vendor.p({
label: "所在地区",
name: "region",
required: true
}),
x: common_vendor.o(($event) => $data.formData.address = $event),
y: common_vendor.p({
placeholder: "小区、写字楼、门牌号等",
modelValue: $data.formData.address
}),
z: common_vendor.p({
label: "详细地址",
name: "address",
required: true
}),
A: common_vendor.o($options.onType),
B: common_vendor.o(($event) => $data.formData.type = $event),
C: common_vendor.p({
mode: "tag",
localdata: $data.typeData,
modelValue: $data.formData.type
}),
D: common_vendor.p({
label: "标签",
name: "type"
}),
E: common_vendor.o($options.onIsDefault),
F: common_vendor.o(($event) => $data.formData.isDefault = $event),
G: common_vendor.p({
localdata: $data.defaultData,
modelValue: $data.formData.isDefault
}),
H: $data.formData.id
}, $data.formData.id ? {
I: common_vendor.p({
type: "trash"
}),
J: common_vendor.o(($event) => $options.remove($data.formData))
} : {}, {
K: common_vendor.p({
name: "isDefault"
}),
L: common_vendor.o($options.submit),
M: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
N: common_vendor.sr("form", "c55c4c84-10,c55c4c84-9"),
O: common_vendor.p({
modelValue: $data.formData,
rules: $data.rules,
["label-width"]: 80
}),
P: common_vendor.p({
title: "添加收货地址",
border: false,
["is-shadow"]: false,
padding: "10px 6px"
}),
Q: common_vendor.sr("addForm", "c55c4c84-8"),
R: 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/user/address.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="{{d}}" u-s="{{['d']}}" u-i="c55c4c84-0" bind:__l="__l" u-p="{{d}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{c}}" u-s="{{['d']}}" u-i="c55c4c84-1,c55c4c84-0" bind:__l="__l" u-p="{{c}}"><block wx:for="{{a}}" wx:for-item="item" wx:key="l"><uv-cell wx:if="{{item.k}}" u-s="{{['icon','title','right-icon']}}" u-i="{{item.j}}" bind:__l="__l" u-p="{{item.k}}"><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="{{f}}" class="save-user-profile" bindclick="{{e}}" u-i="c55c4c84-6" bind:__l="__l" u-p="{{f}}"></uv-button></view><ws-login wx:if="{{i}}" class="r" u-r="login" binddone="{{h}}" u-i="c55c4c84-7" bind:__l="__l" u-p="{{i}}"/><uni-popup wx:if="{{R}}" class="r" u-s="{{['d']}}" u-r="addForm" u-i="c55c4c84-8" bind:__l="__l" u-p="{{R}}"><uni-card wx:if="{{P}}" u-s="{{['d']}}" u-i="c55c4c84-9,c55c4c84-8" bind:__l="__l" u-p="{{P}}"><uni-forms wx:if="{{O}}" class="r" u-s="{{['d']}}" u-r="form" u-i="c55c4c84-10,c55c4c84-9" bind:__l="__l" u-p="{{O}}"><uni-forms-item wx:if="{{l}}" u-s="{{['d']}}" u-i="c55c4c84-11,c55c4c84-10" bind:__l="__l" u-p="{{l}}"><uv-input wx:if="{{k}}" u-i="c55c4c84-12,c55c4c84-11" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{o}}" u-s="{{['d']}}" u-i="c55c4c84-13,c55c4c84-10" bind:__l="__l" u-p="{{o}}"><uv-input wx:if="{{n}}" u-i="c55c4c84-14,c55c4c84-13" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{w}}" u-s="{{['d']}}" u-i="c55c4c84-15,c55c4c84-10" bind:__l="__l" u-p="{{w}}"><uni-data-picker wx:if="{{v}}" bindchange="{{p}}" bindnodeclick="{{q}}" bindpopupopened="{{r}}" bindpopupclosed="{{s}}" u-i="c55c4c84-16,c55c4c84-15" bind:__l="__l" bindupdateModelValue="{{t}}" u-p="{{v}}"></uni-data-picker></uni-forms-item><uni-forms-item wx:if="{{z}}" u-s="{{['d']}}" u-i="c55c4c84-17,c55c4c84-10" bind:__l="__l" u-p="{{z}}"><uv-input wx:if="{{y}}" u-i="c55c4c84-18,c55c4c84-17" bind:__l="__l" bindupdateModelValue="{{x}}" u-p="{{y}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{D}}" u-s="{{['d']}}" u-i="c55c4c84-19,c55c4c84-10" bind:__l="__l" u-p="{{D}}"><uni-data-checkbox wx:if="{{C}}" bindchange="{{A}}" u-i="c55c4c84-20,c55c4c84-19" bind:__l="__l" bindupdateModelValue="{{B}}" u-p="{{C}}"></uni-data-checkbox></uni-forms-item><uni-forms-item wx:if="{{K}}" u-s="{{['d']}}" u-i="c55c4c84-21,c55c4c84-10" bind:__l="__l" u-p="{{K}}"><view class="web-cell"><uni-data-checkbox wx:if="{{G}}" bindclick="{{E}}" u-i="c55c4c84-22,c55c4c84-21" bind:__l="__l" bindupdateModelValue="{{F}}" u-p="{{G}}"></uni-data-checkbox><view wx:if="{{H}}" class="del-btn" bindtap="{{J}}"><uni-icons wx:if="{{I}}" u-s="{{['d']}}" class="web-cell" style="color:#999999" u-i="c55c4c84-23,c55c4c84-21" bind:__l="__l" u-p="{{I}}"><text class="web-text-danger" style="font-size:22rpx;padding-left:4rpx">删除</text></uni-icons></view></view></uni-forms-item><uv-button wx:if="{{M}}" class="add-address" bindclick="{{L}}" u-i="c55c4c84-24,c55c4c84-10" bind:__l="__l" u-p="{{M}}"></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;
}
+88
View File
@@ -0,0 +1,88 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_user_balanceLog_index = require("../../api/user/balance-log/index.js");
const utils_common = require("../../utils/common.js");
const store_modules_user = require("../../store/modules/user.js");
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
userCardId: 0,
list: [],
isLogin: false,
logo: common_vendor.index.getStorageSync("app_logo")
};
},
onLoad(o) {
this.userCardId = o.id;
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;
app.$refs.login.open("bottom");
return false;
}
api_user_balanceLog_index.pageUserBalanceLog({}).then((res) => {
app.list = res.list;
});
},
navTo(item) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
utils_common.openUrl(item);
}
}
};
if (!Array) {
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_cell2 + _easycom_uni_card2 + _easycom_ws_login2)();
}
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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_cell + _easycom_uni_card + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "f0e6f3c6-1-" + i0 + "," + ("f0e6f3c6-0-" + i0),
b: common_vendor.p({
title: item.remark,
label: item.createTime,
value: `-${item.money}`,
cellStyle: {
padding: "10px 0"
},
border: false
}),
c: "f0e6f3c6-0-" + i0,
d: index
};
}),
b: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
c: common_vendor.sr("login", "f0e6f3c6-2"),
d: common_vendor.o($options.reload),
e: 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/user/balance-log.vue"]]);
wx.createPage(MiniProgramPage);
+9
View File
@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "余额明细",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"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="page"><block wx:for="{{a}}" wx:for-item="item" wx:key="d"><uni-card wx:if="{{b}}" u-s="{{['d']}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{b}}"><uv-cell wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-cell></uni-card></block><ws-login wx:if="{{e}}" class="r" u-r="login" binddone="{{d}}" u-i="f0e6f3c6-2" bind:__l="__l" u-p="{{e}}"/></view>
+8
View File
@@ -0,0 +1,8 @@
page {
background-size: 100%;
background-repeat: no-repeat;
background-color: #f0f2f5;
width: 750rpx;
overflow-x: hidden;
}
+88
View File
@@ -0,0 +1,88 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_userCard_index = require("../../api/booking/userCard/index.js");
const store_modules_user = require("../../store/modules/user.js");
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
id: 0,
userInfo: {},
form: {},
isLogin: false,
disabled: false
};
},
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;
}
this.openLogin();
},
methods: {
async reload() {
const app = this;
const { id } = this;
const userInfo = await userStore.fetchUserInfo();
app.userInfo = userInfo;
api_booking_userCard_index.getUserCard(id).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
});
}
},
// 弹出登录提示框
openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
}
}
};
if (!Array) {
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uni_card2 + _easycom_ws_login2)();
}
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_card + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.form.info,
b: common_vendor.p({
border: false,
["is-shadow"]: false
}),
c: common_vendor.sr("login", "25d9a610-1"),
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], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/card-detail-about.vue"]]);
wx.createPage(MiniProgramPage);
@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "会员卡详情",
"enablePullDownRefresh": false,
"usingComponents": {
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
@@ -0,0 +1 @@
<view class="container"><uni-card wx:if="{{b}}" u-s="{{['d']}}" u-i="25d9a610-0" bind:__l="__l" u-p="{{b}}"><view><rich-text nodes="{{a}}"/></view></uni-card><ws-login wx:if="{{e}}" class="r" u-r="login" binddone="{{d}}" u-i="25d9a610-1" bind:__l="__l" u-p="{{e}}"/></view>
@@ -0,0 +1,8 @@
page {
background-size: 100%;
background-repeat: no-repeat;
background-color: #f0f2f5;
width: 750rpx;
overflow-x: hidden;
}
+241
View File
@@ -0,0 +1,241 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_userAddress_index = require("../../api/shop/userAddress/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
const regionsData = require("../../regions-data.js");
require("../../utils/request.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 {
sid: "",
list: [],
statusBarHeight: 104,
isLogin: false,
form: {
name: "",
phone: ""
},
// 表单数据
formData: {},
fields: {},
logo: "",
server: [],
order: [],
regions: regionsData.regions,
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(o) {
this.sid = o.sid;
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_merchant_index.pageMerchant({
merchantIds: app.sid
}).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_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_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_avatar2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_ws_login2)();
}
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_avatar + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "59dfe3a6-3-" + i0 + "," + ("59dfe3a6-2-" + i0),
b: common_vendor.p({
src: item.image,
fontSize: "12",
size: "50",
randomBgColor: true
}),
c: "59dfe3a6-2-" + i0 + ",59dfe3a6-1",
d: common_vendor.p({
title: item.merchantName,
label: item.shopType,
isLink: true,
url: `/package/booking/index?id=${item.merchantId}`,
cellStyle: {
padding: "10px 0"
}
}),
e: index
};
}),
b: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
c: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
d: common_vendor.sr("login", "59dfe3a6-4"),
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/user/card-detail-merchant.vue"]]);
wx.createPage(MiniProgramPage);
@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "适用场馆",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"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",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
@@ -0,0 +1 @@
<view class="page"><uni-card wx:if="{{c}}" u-s="{{['d']}}" u-i="59dfe3a6-0" bind:__l="__l" u-p="{{c}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{b}}" u-s="{{['d']}}" u-i="59dfe3a6-1,59dfe3a6-0" bind:__l="__l" u-p="{{b}}"><block wx:for="{{a}}" wx:for-item="item" wx:key="e"><uv-cell wx:if="{{item.d}}" u-s="{{['icon']}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"><uv-avatar u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}" slot="icon"></uv-avatar></uv-cell></block></uv-cell-group></view></view></uni-card><ws-login wx:if="{{f}}" class="r" u-r="login" binddone="{{e}}" u-i="59dfe3a6-4" bind:__l="__l" u-p="{{f}}"/></view>
@@ -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;
}
+89
View File
@@ -0,0 +1,89 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_userCardLog_index = require("../../api/booking/userCardLog/index.js");
const utils_common = require("../../utils/common.js");
const store_modules_user = require("../../store/modules/user.js");
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
userCardId: 0,
list: [],
isLogin: false,
logo: common_vendor.index.getStorageSync("app_logo")
};
},
onLoad(o) {
this.userCardId = o.id;
this.reload();
},
methods: {
async reload(e) {
const app = this;
const { userCardId } = this;
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
app.userInfo = userInfo;
} else {
app.isLogin = false;
app.$refs.login.open("bottom");
return false;
}
api_booking_userCardLog_index.pageUserCardLog({ userCardId }).then((res) => {
app.list = res.list;
});
},
navTo(item) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
utils_common.openUrl(item);
}
}
};
if (!Array) {
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_cell2 + _easycom_uni_card2 + _easycom_ws_login2)();
}
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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_cell + _easycom_uni_card + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "e3095914-1-" + i0 + "," + ("e3095914-0-" + i0),
b: common_vendor.p({
title: item.comments,
label: item.createTime,
value: `-${item.money}`,
cellStyle: {
padding: "10px 0"
},
border: false
}),
c: "e3095914-0-" + i0,
d: index
};
}),
b: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
c: common_vendor.sr("login", "e3095914-2"),
d: common_vendor.o($options.reload),
e: 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/user/card-detail-record.vue"]]);
wx.createPage(MiniProgramPage);
@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "使用记录",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
@@ -0,0 +1 @@
<view class="page"><block wx:for="{{a}}" wx:for-item="item" wx:key="d"><uni-card wx:if="{{b}}" u-s="{{['d']}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{b}}"><uv-cell wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-cell></uni-card></block><ws-login wx:if="{{e}}" class="r" u-r="login" binddone="{{d}}" u-i="e3095914-2" bind:__l="__l" u-p="{{e}}"/></view>
@@ -0,0 +1,8 @@
page {
background-size: 100%;
background-repeat: no-repeat;
background-color: #f0f2f5;
width: 750rpx;
overflow-x: hidden;
}
+303
View File
@@ -0,0 +1,303 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_userCard_index = require("../../api/booking/userCard/index.js");
const api_shop_order_index = require("../../api/shop/order/index.js");
require("../../utils/request.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 cardType = ["年卡", "次卡", "月卡", "IC卡", "充值卡"];
const _sfc_main = {
data() {
return {
id: 0,
goodsId: 0,
userInfo: {},
form: {},
address: {},
addressList: [],
week: 0,
cardType,
goodsList,
// 订单总金额
totalPrice,
reducePrice: 0,
merchantId,
merchantName,
merchantCode,
getWeek: utils_common.getWeek,
payType: 1,
isLogin: false,
disabled: false
};
},
onLoad(option) {
this.id = 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 { id } = this;
const userInfo = await userStore.fetchUserInfo();
app.userInfo = userInfo;
api_booking_userCard_index.getUserCard(id).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;
},
openQrCode() {
this.$refs.addForm.open("center");
},
// 弹出登录提示框
openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
},
save() {
if (!this.disabled) {
common_vendor.index.showToast({
title: "请先阅读并同意服务协议",
icon: "none"
});
return false;
}
common_vendor.index.showLoading({
title: "订单提交中."
});
const app = this;
const { form, payType } = this;
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_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item");
const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list");
const _easycom_uv_qrcode2 = common_vendor.resolveComponent("uv-qrcode");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uv_avatar2 + _easycom_ws_login2 + _easycom_uni_card2 + _easycom_uv_button2 + _easycom_uni_list_item2 + _easycom_uni_list2 + _easycom_uv_qrcode2 + _easycom_uni_popup2)();
}
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_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.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_uv_qrcode = () => "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uv_avatar + _easycom_ws_login + _easycom_uni_card + _easycom_uv_button + _easycom_uni_list_item + _easycom_uni_list + _easycom_uv_qrcode + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
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({
src: $data.form.merchantAvatar,
size: "42"
}),
j: common_vendor.t($data.form.name),
k: common_vendor.t($data.cardType[$data.form.type]),
l: common_vendor.p({
src: "../../static/qrcode.png",
size: "30",
shape: "square"
}),
m: common_vendor.o((...args) => $options.openQrCode && $options.openQrCode(...args)),
n: common_vendor.t($data.form.cardNum),
o: `url(${$data.form.image}) no-repeat center center`,
p: common_vendor.sr("login", "7efd7713-2"),
q: common_vendor.o($options.reload),
r: common_vendor.p({
logo: _ctx.logo
}),
s: common_vendor.t($data.form.remainingMoney || 0),
t: common_vendor.t($data.form.num || 0),
v: common_vendor.t($data.form.discount || 0),
w: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: "12px 0"
}),
x: common_vendor.o(($event) => $options.navTo(`/package/user/card-detail-merchant?sid=${$data.form.sid}`)),
y: common_vendor.p({
customStyle: {
width: "300rpx",
borderRadius: "30px",
color: "#3C8618"
},
text: "去使用"
}),
z: common_vendor.o(($event) => $options.navTo(`/package/user/card-detail-about?id=${$data.form.id}`)),
A: common_vendor.p({
link: true
}),
B: common_vendor.o(($event) => $options.navTo(`/package/user/card-detail-merchant?sid=${$data.form.sid}`)),
C: common_vendor.p({
link: true
}),
D: common_vendor.o(($event) => $options.navTo(`/package/user/card-detail-record?id=${$data.form.id}`)),
E: common_vendor.p({
link: true
}),
F: common_vendor.p({
border: false
}),
G: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
H: common_vendor.sr("qrcode", "7efd7713-12,7efd7713-11"),
I: common_vendor.p({
size: "390rpx",
options: {
data: $data.form.cardNum,
foregroundImageSrc: $data.form.merchantAvatar,
margin: 10,
foregroundImagePadding: 4,
foregroundImageHeight: 30,
foregroundImageWidth: 30,
foregroundImageBorderRadius: 4
},
value: $data.form.cardNum
}),
J: common_vendor.t($data.form.cardNum),
K: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
L: common_vendor.sr("addForm", "7efd7713-10"),
M: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
N: common_vendor.sr("login", "7efd7713-13"),
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-7efd7713"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/card-detail.vue"]]);
wx.createPage(MiniProgramPage);
+14
View File
@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "会员卡详情",
"enablePullDownRefresh": false,
"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-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"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",
"uv-qrcode": "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-7efd7713"><view class="web-debug web-text-success data-v-7efd7713" style="display:none"> 场馆ID:{{a}} 场馆编号:{{b}} 场馆名称:{{c}} 日期:{{d}} 星期:{{e}} 订单总金额:{{f}} 类型:{{g}} 商品信息:{{h}}</view><view class="card-list data-v-7efd7713"><view class="container data-v-7efd7713" style="{{'background:' + o + ';' + ('background-size:' + '100%') + ';' + ('opacity:' + '0.85')}}"><view class="content web-cell web-cell-align-top data-v-7efd7713"><view class="merchant-avatar data-v-7efd7713"><uv-avatar wx:if="{{i}}" class="data-v-7efd7713" style="border:3rpx solid #ffffff" u-i="7efd7713-0" bind:__l="__l" u-p="{{i}}"></uv-avatar></view><view class="card-info web-cell-content data-v-7efd7713"><view class="title-bar data-v-7efd7713"><view class="web-text-heading data-v-7efd7713" style="color:#ffffff;font-size:17px;font-weight:600">{{j}}</view><view class="desc web-text-placeholder data-v-7efd7713" style="font-size:14px">{{k}}</view></view><view class="price data-v-7efd7713" bindtap="{{m}}"><view class="web-text-price data-v-7efd7713"><uv-avatar wx:if="{{l}}" class="data-v-7efd7713" u-i="7efd7713-1" bind:__l="__l" u-p="{{l}}"></uv-avatar></view></view></view></view><view class="card-num data-v-7efd7713">{{n}}</view></view><ws-login wx:if="{{r}}" class="r data-v-7efd7713" u-r="login" binddone="{{q}}" u-i="7efd7713-2" bind:__l="__l" u-p="{{r}}"/></view><uni-card wx:if="{{w}}" class="data-v-7efd7713" u-s="{{['d']}}" u-i="7efd7713-3" bind:__l="__l" u-p="{{w}}"><view class="money-bar web-cell data-v-7efd7713"><view class="money-item web-cell-content data-v-7efd7713"><text class="data-v-7efd7713">余额</text><text class="data-v-7efd7713">{{s}}</text></view><view class="web-divider-vertical data-v-7efd7713"></view><view class="money-item web-cell-content data-v-7efd7713"><text class="data-v-7efd7713">剩余次数</text><text class="data-v-7efd7713">{{t}}</text></view><view class="web-divider-vertical data-v-7efd7713"></view><view class="money-item web-cell-content data-v-7efd7713"><text class="data-v-7efd7713">折扣</text><text class="data-v-7efd7713">{{v}}</text></view></view></uni-card><view class="to-pay data-v-7efd7713"><uv-button wx:if="{{y}}" class="data-v-7efd7713" bindclick="{{x}}" u-i="7efd7713-4" bind:__l="__l" u-p="{{y}}"></uv-button></view><uni-card wx:if="{{G}}" class="data-v-7efd7713" u-s="{{['d']}}" u-i="7efd7713-5" bind:__l="__l" u-p="{{G}}"><view class="server data-v-7efd7713"><uni-list wx:if="{{F}}" class="data-v-7efd7713" u-s="{{['d']}}" u-i="7efd7713-6,7efd7713-5" bind:__l="__l" u-p="{{F}}"><uni-list-item wx:if="{{A}}" class="data-v-7efd7713" u-s="{{['body']}}" bindclick="{{z}}" u-i="7efd7713-7,7efd7713-6" bind:__l="__l" u-p="{{A}}"><view class="slot-box data-v-7efd7713" slot="body"><text class="slot-text data-v-7efd7713" style="{{'color:' + '#333333'}}">会员卡详情</text></view></uni-list-item><uni-list-item wx:if="{{C}}" class="data-v-7efd7713" u-s="{{['body']}}" bindclick="{{B}}" u-i="7efd7713-8,7efd7713-6" bind:__l="__l" u-p="{{C}}"><view class="slot-box data-v-7efd7713" slot="body"><text class="slot-text data-v-7efd7713" style="{{'color:' + '#333333'}}">适用场馆</text></view></uni-list-item><uni-list-item wx:if="{{E}}" class="data-v-7efd7713" u-s="{{['body']}}" bindclick="{{D}}" u-i="7efd7713-9,7efd7713-6" bind:__l="__l" u-p="{{E}}"><view class="slot-box data-v-7efd7713" slot="body"><text class="slot-text data-v-7efd7713" style="{{'color:' + '#333333'}}">使用记录</text></view></uni-list-item></uni-list></view></uni-card></view><uni-popup wx:if="{{M}}" class="r data-v-7efd7713" u-s="{{['d']}}" u-r="addForm" u-i="7efd7713-10" bind:__l="__l" u-p="{{M}}"><uni-card wx:if="{{K}}" class="data-v-7efd7713" u-s="{{['d']}}" u-i="7efd7713-11,7efd7713-10" bind:__l="__l" u-p="{{K}}"><view class="qrcode data-v-7efd7713"><uv-qrcode wx:if="{{I}}" class="r data-v-7efd7713" u-r="qrcode" u-i="7efd7713-12,7efd7713-11" bind:__l="__l" u-p="{{I}}"></uv-qrcode><view class="card-num web-text-heading data-v-7efd7713" style="font-size:34rpx">{{J}}</view><text class="web-text-secondary data-v-7efd7713">请在结账前出示会员卡</text></view></uni-card></uni-popup><ws-login wx:if="{{P}}" class="r data-v-7efd7713" u-r="login" binddone="{{O}}" u-i="7efd7713-13" bind:__l="__l" u-p="{{P}}"/>
+226
View File
@@ -0,0 +1,226 @@
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-7efd7713 {
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-7efd7713 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total.data-v-7efd7713 {
display: flex;
color: #ebcf00;
align-items: center;
padding-left: 40rpx;
}
.card-list .container.data-v-7efd7713 {
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-7efd7713 {
position: absolute;
z-index: 1;
bottom: 30rpx;
left: 30rpx;
}
.card-list .container.data-v-7efd7713::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-7efd7713 {
position: relative;
z-index: 1;
width: 700rpx;
height: 370rpx;
display: flex;
justify-content: space-between;
}
.card-list .content .merchant-avatar.data-v-7efd7713 {
margin-top: 30rpx;
margin-left: 30rpx;
}
.card-list .content .card-info.data-v-7efd7713 {
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-7efd7713 {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
}
.card-list .content .card-info .web-text-price.data-v-7efd7713 {
padding-right: 40rpx;
font-size: 36rpx;
color: #fecc66;
}
.card-list .card-item.data-v-7efd7713 {
width: 700rpx;
margin: 20rpx auto;
border-radius: 20rpx;
position: relative;
}
.card-list .order-title.data-v-7efd7713 {
padding: 20rpx 0;
}
.card-list .order-title .merchant-avatar.data-v-7efd7713 {
margin-right: 12rpx;
}
.card-list .order-title .card-name.data-v-7efd7713 {
font-weight: 600;
}
.card-list .order-title .btn-status.data-v-7efd7713 {
font-size: 30rpx;
display: flex;
}
.card-list .order-body.data-v-7efd7713 {
padding: 16px 0;
}
.card-actions.data-v-7efd7713 {
display: flex;
flex-direction: row;
justify-content: flex-end;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions-item.data-v-7efd7713 {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item .web-text-heading.data-v-7efd7713 {
font-size: 38rpx;
margin-left: 28rpx;
}
.card-actions-item-text.data-v-7efd7713 {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.address-body.data-v-7efd7713 {
width: 660rpx;
margin: auto;
}
.to-pay.data-v-7efd7713 {
width: 600rpx !important;
margin: 40rpx auto;
display: flex;
justify-content: center;
}
.btn-bar.data-v-7efd7713 {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
.title-bar.data-v-7efd7713 {
display: flex;
}
.title-bar .web-text-heading.data-v-7efd7713 {
margin-right: 20rpx;
}
.title-bar .web-text-secondary.data-v-7efd7713 {
margin-right: 20rpx;
}
.xieyi.data-v-7efd7713 {
margin-bottom: 80rpx;
padding: 0 30rpx;
}
.xieyi .text.data-v-7efd7713 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-7efd7713 {
color: #0f80ff;
}
.money-bar.data-v-7efd7713 {
display: flex;
justify-content: space-around;
align-items: center;
}
.money-bar .money-item.data-v-7efd7713 {
text-align: center;
display: flex;
flex-direction: column;
}
.money-bar .web-divider-vertical.data-v-7efd7713 {
height: 60rpx;
width: 1rpx;
background-color: #e6e6e6;
}
.qrcode.data-v-7efd7713 {
width: 600rpx;
height: 600rpx;
margin: 30rpx auto;
line-height: 2rem;
background-color: #ffffff;
text-align: center;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
+267
View File
@@ -0,0 +1,267 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_userCard_index = require("../../api/booking/userCard/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
},
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;
}
where.userId = userId;
where.payStatus = 1;
app.loadMore = "loading";
api_booking_userCard_index.pageUserCard(where).then((res) => {
console.log("res: ", 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.hideTools = false;
app.loadMore = "no-more";
}
app.isRefresh = false;
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
app.hideTools = false;
app.isRefresh = 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_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");
const _easycom_uv_empty2 = common_vendor.resolveComponent("uv-empty");
(_easycom_uv_avatar2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_ws_login2 + _easycom_uv_empty2)();
}
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";
const _easycom_uv_empty = () => "../../uni_modules/uv-empty/components/uv-empty/uv-empty.js";
if (!Math) {
(_easycom_uv_avatar + _easycom_uv_skeleton + _easycom_uni_card + _easycom_ws_login + _easycom_uv_empty)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: !$data.hideTools || $data.cardList.length > 0
}, !$data.hideTools || $data.cardList.length > 0 ? {
b: common_vendor.f($data.cardList, (item, index, i0) => {
return common_vendor.e({
a: "75a1ddb6-0-" + i0,
b: common_vendor.p({
src: item.merchantAvatar,
size: "36"
}),
c: common_vendor.t(item.name),
d: item.type == 2
}, item.type == 2 ? {
e: common_vendor.t(item.number)
} : {}, {
f: item.type == 1 || item.type == 3 || item.type == 5
}, item.type == 1 || item.type == 3 || item.type == 5 ? {
g: common_vendor.t(item.remainingMoney)
} : {}, {
h: index,
i: common_vendor.o(($event) => $options.openUrl("/package/user/card-detail?cardId=" + item.id), index),
j: `url(${item.image}) no-repeat center center`
});
})
} : {
c: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
d: common_vendor.p({
border: false,
padding: "18px 6px"
}),
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.sr("login", "75a1ddb6-13"),
p: common_vendor.o($options.reload),
q: common_vendor.p({
logo: $data.logo
}),
r: !$data.hideTools && $data.cardList.length == 0
}, !$data.hideTools && $data.cardList.length == 0 ? {
s: common_vendor.p({
mode: "list",
icon: "https://cdn.uviewui.com/uview/empty/list.png"
})
} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/card.vue"]]);
wx.createPage(MiniProgramPage);
+11
View File
@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "我的卡包",
"enablePullDownRefresh": false,
"usingComponents": {
"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",
"uv-empty": "../../uni_modules/uv-empty/components/uv-empty/uv-empty"
}
}
+1
View File
@@ -0,0 +1 @@
<view><view class="card-list"><block wx:if="{{a}}"><view wx:for="{{b}}" wx:for-item="item" wx:key="h" class="container" bindtap="{{item.i}}" style="{{'background:' + item.j + ';' + ('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></view></view></view></view></block><block wx:else><uni-card wx:if="{{d}}" u-s="{{['d']}}" u-i="75a1ddb6-1" bind:__l="__l" u-p="{{d}}"><uv-skeleton wx:if="{{c}}" u-i="75a1ddb6-2,75a1ddb6-1" bind:__l="__l" u-p="{{c}}"></uv-skeleton></uni-card><uni-card wx:if="{{f}}" u-s="{{['d']}}" u-i="75a1ddb6-3" bind:__l="__l" u-p="{{f}}"><uv-skeleton wx:if="{{e}}" u-i="75a1ddb6-4,75a1ddb6-3" bind:__l="__l" u-p="{{e}}"></uv-skeleton></uni-card><uni-card wx:if="{{h}}" u-s="{{['d']}}" u-i="75a1ddb6-5" bind:__l="__l" u-p="{{h}}"><uv-skeleton wx:if="{{g}}" u-i="75a1ddb6-6,75a1ddb6-5" bind:__l="__l" u-p="{{g}}"></uv-skeleton></uni-card><uni-card wx:if="{{j}}" u-s="{{['d']}}" u-i="75a1ddb6-7" bind:__l="__l" u-p="{{j}}"><uv-skeleton wx:if="{{i}}" u-i="75a1ddb6-8,75a1ddb6-7" bind:__l="__l" u-p="{{i}}"></uv-skeleton></uni-card><uni-card wx:if="{{l}}" u-s="{{['d']}}" u-i="75a1ddb6-9" bind:__l="__l" u-p="{{l}}"><uv-skeleton wx:if="{{k}}" u-i="75a1ddb6-10,75a1ddb6-9" bind:__l="__l" u-p="{{k}}"></uv-skeleton></uni-card><uni-card wx:if="{{n}}" u-s="{{['d']}}" u-i="75a1ddb6-11" bind:__l="__l" u-p="{{n}}"><uv-skeleton wx:if="{{m}}" u-i="75a1ddb6-12,75a1ddb6-11" bind:__l="__l" u-p="{{m}}"></uv-skeleton></uni-card></block><ws-login wx:if="{{q}}" class="r" u-r="login" binddone="{{p}}" u-i="75a1ddb6-13" bind:__l="__l" u-p="{{q}}"/></view><view wx:if="{{r}}"><uv-empty wx:if="{{s}}" u-i="75a1ddb6-14" bind:__l="__l" u-p="{{s}}"></uv-empty></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;
}
+225
View File
@@ -0,0 +1,225 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_userCoupon_index = require("../../api/booking/userCoupon/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,
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
};
},
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: {
reload() {
const app = this;
const {
where,
userId
} = this;
if (userId == 0) {
app.openLogin();
return;
}
common_vendor.index.showLoading({
title: "数据读取中."
});
app.loadMore = "loading";
api_booking_userCoupon_index.data().then((res) => {
console.log("res: ", res);
app.items[0] = `待使用(${res.toBeUsed})`;
app.items[1] = `已使用(${res.used})`;
app.items[2] = `已失效(${res.invalid})`;
});
api_booking_userCoupon_index.pageUserCoupon(where).then((res) => {
const list = res.list.map((d) => {
console.log(d);
return d;
});
if (app.list.length < res.count) {
console.log("11111: ", 11111);
app.list = app.list.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;
}
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;
}
}
}
};
if (!Array) {
const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
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_uni_segmented_control2 + _easycom_uv_button2 + _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_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_uni_segmented_control + _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.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.list, (item, index, i0) => {
return {
a: common_vendor.o(_ctx.save, index),
b: "5db01768-1-" + i0,
c: index
};
}),
d: common_vendor.p({
size: "mini",
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
color: "#ffffff",
border: "none"
},
text: "去使用"
}),
e: $data.list.length > 0
}, $data.list.length > 0 ? {
f: common_vendor.p({
status: $data.loadMore
})
} : {}, {
g: common_vendor.sr("login", "5db01768-3"),
h: common_vendor.o($options.reload),
i: 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/user/coupon.vue"]]);
wx.createPage(MiniProgramPage);
+10
View File
@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "我的券包",
"enablePullDownRefresh": false,
"usingComponents": {
"uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
"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="segmented"><uni-segmented-control wx:if="{{b}}" bindclickItem="{{a}}" u-i="5db01768-0" bind:__l="__l" u-p="{{b}}"/></view><view class="coupon"><block wx:for="{{c}}" wx:for-item="item" wx:key="c"><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="{{d}}" class="save-btn" bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{d}}"></uv-button></view></view></block><uni-load-more wx:if="{{e}}" u-i="5db01768-2" bind:__l="__l" u-p="{{f}}"></uni-load-more><ws-login wx:if="{{i}}" class="r" u-r="login" binddone="{{h}}" u-i="5db01768-3" bind:__l="__l" u-p="{{i}}"/></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;
}
+260
View File
@@ -0,0 +1,260 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
const api_booking_emergency_index = require("../../api/booking/emergency/index.js");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
list: [],
statusBarHeight: 104,
isLogin: false,
form: {
name: "",
phone: ""
},
rules: {
// 对name字段进行必填验证
name: {
rules: [
{
required: true,
errorMessage: "请输入姓名"
},
{
minLength: 2,
maxLength: 10,
errorMessage: "输入的姓名不正确"
}
]
},
// 对email字段进行必填验证
phone: {
rules: [
{
required: true,
errorMessage: "请输入手机号码"
}
]
}
},
fields: {},
logo: "",
bookingUser: {},
server: [],
order: []
};
},
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_booking_emergency_index.pageEmergency({
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;
}
},
add() {
this.$refs.addForm.open("center");
},
onDel(item) {
const app = this;
common_vendor.index.showModal({
title: "确定要删除吗?",
success(o) {
if (o.confirm) {
common_vendor.index.showLoading({
title: "请求中."
});
api_booking_emergency_index.removeEmergency(item.emergencyId).then((res) => {
common_vendor.index.showToast({
title: "操作成功",
icon: "none"
});
});
app.reload();
}
}
});
},
// 触发提交表单
submit() {
this.$refs.form.validate().then((res) => {
api_booking_emergency_index.addEmergency(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();
});
}).catch((err) => {
console.log("表单错误信息:", err);
});
}
}
};
if (!Array) {
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_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_forms2 = common_vendor.resolveComponent("uni-forms");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uv_icon2 + _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_forms2 + _easycom_uni_popup2)();
}
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_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_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_icon + _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_forms + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.onDel(item), index),
b: "1eb32f4a-3-" + i0 + "," + ("1eb32f4a-2-" + i0),
c: "1eb32f4a-2-" + i0 + ",1eb32f4a-1",
d: common_vendor.p({
cellStyle: {
padding: "10px 0"
},
title: item.name,
label: item.phone
}),
e: index
};
}),
b: common_vendor.p({
size: "40rpx",
name: "trash"
}),
c: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
d: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
e: common_vendor.o($options.add),
f: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "添加"
}),
g: common_vendor.sr("login", "1eb32f4a-5"),
h: common_vendor.o($options.reload),
i: common_vendor.p({
logo: $data.logo
}),
j: common_vendor.o(($event) => $data.form.name = $event),
k: common_vendor.p({
placeholder: "请输入姓名",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.name
}),
l: common_vendor.p({
label: "姓名",
name: "name"
}),
m: common_vendor.o(($event) => $data.form.phone = $event),
n: common_vendor.p({
placeholder: "请输入手机号码",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.phone
}),
o: common_vendor.p({
label: "手机号码",
name: "phone"
}),
p: common_vendor.o($options.submit),
q: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
r: common_vendor.sr("form", "1eb32f4a-8,1eb32f4a-7"),
s: common_vendor.p({
modelValue: $data.form,
rules: $data.rules,
["label-width"]: 80
}),
t: common_vendor.p({
title: "添加紧急联系人",
border: false,
["is-shadow"]: false,
padding: "10px 6px"
}),
v: common_vendor.sr("addForm", "1eb32f4a-6"),
w: 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/user/emergency.vue"]]);
wx.createPage(MiniProgramPage);
+16
View File
@@ -0,0 +1,16 @@
{
"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",
"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-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="{{d}}" u-s="{{['d']}}" u-i="1eb32f4a-0" bind:__l="__l" u-p="{{d}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{c}}" u-s="{{['d']}}" u-i="1eb32f4a-1,1eb32f4a-0" bind:__l="__l" u-p="{{c}}"><block wx:for="{{a}}" wx:for-item="item" wx:key="e"><uv-cell wx:if="{{item.d}}" u-s="{{['right-icon']}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"><uv-icon bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{b}}" slot="right-icon"></uv-icon></uv-cell></block></uv-cell-group></view></view></uni-card><view class="btn-bar"><uv-button wx:if="{{f}}" class="save-user-profile" bindclick="{{e}}" u-i="1eb32f4a-4" bind:__l="__l" u-p="{{f}}"></uv-button></view><ws-login wx:if="{{i}}" class="r" u-r="login" binddone="{{h}}" u-i="1eb32f4a-5" bind:__l="__l" u-p="{{i}}"/><uni-popup wx:if="{{w}}" class="r" u-s="{{['d']}}" u-r="addForm" u-i="1eb32f4a-6" bind:__l="__l" u-p="{{w}}"><uni-card wx:if="{{t}}" u-s="{{['d']}}" u-i="1eb32f4a-7,1eb32f4a-6" bind:__l="__l" u-p="{{t}}"><uni-forms wx:if="{{s}}" class="r" u-s="{{['d']}}" u-r="form" u-i="1eb32f4a-8,1eb32f4a-7" bind:__l="__l" u-p="{{s}}"><uni-forms-item wx:if="{{l}}" u-s="{{['d']}}" u-i="1eb32f4a-9,1eb32f4a-8" bind:__l="__l" u-p="{{l}}"><uv-input wx:if="{{k}}" u-i="1eb32f4a-10,1eb32f4a-9" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{o}}" u-s="{{['d']}}" u-i="1eb32f4a-11,1eb32f4a-8" bind:__l="__l" u-p="{{o}}"><uv-input wx:if="{{n}}" u-i="1eb32f4a-12,1eb32f4a-11" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"></uv-input></uni-forms-item><uv-button wx:if="{{q}}" class="add-address" bindclick="{{p}}" u-i="1eb32f4a-13,1eb32f4a-8" bind:__l="__l" u-p="{{q}}"></uv-button></uni-forms></uni-card></uni-popup></view>
+79
View File
@@ -0,0 +1,79 @@
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-emergency {
width: 500rpx !important;
margin: 40rpx auto;
}
.btn-bar {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
.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;
}
+231
View File
@@ -0,0 +1,231 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
const api_booking_emergency_index = require("../../api/booking/emergency/index.js");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
list: [],
statusBarHeight: 104,
isLogin: false,
form: {
name: "",
phone: ""
},
fields: {},
logo: "",
bookingUser: {},
server: [],
order: []
};
},
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_booking_emergency_index.pageEmergency({
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;
}
},
add() {
this.$refs.addForm.open("center");
},
onDel(item) {
const app = this;
common_vendor.index.showModal({
title: "确定要删除吗?",
success(o) {
if (o.confirm) {
common_vendor.index.showLoading({
title: "请求中."
});
api_booking_emergency_index.removeEmergency(item.emergencyId).then((res) => {
common_vendor.index.showToast({
title: "操作成功",
icon: "none"
});
});
app.reload();
}
}
});
},
save() {
api_booking_emergency_index.addEmergency(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_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_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 _component_uv_form_item = common_vendor.resolveComponent("uv-form-item");
const _component_uv_form = common_vendor.resolveComponent("uv-form");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uv_icon2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_button2 + _easycom_ws_login2 + _easycom_uv_input2 + _component_uv_form_item + _component_uv_form + _easycom_uni_popup2)();
}
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_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_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uv_icon + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_button + _easycom_ws_login + _easycom_uv_input + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.onDel(item), index),
b: "2bb4a5a4-3-" + i0 + "," + ("2bb4a5a4-2-" + i0),
c: "2bb4a5a4-2-" + i0 + ",2bb4a5a4-1",
d: common_vendor.p({
cellStyle: {
padding: "10px 0"
},
title: item.name,
label: item.phone
}),
e: index
};
}),
b: common_vendor.p({
size: "40rpx",
name: "trash"
}),
c: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
d: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
e: common_vendor.o($options.add),
f: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "添加"
}),
g: common_vendor.sr("login", "2bb4a5a4-5"),
h: common_vendor.o($options.reload),
i: common_vendor.p({
logo: $data.logo
}),
j: common_vendor.o(($event) => $data.form.name = $event),
k: common_vendor.p({
placeholder: "请输入姓名",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.name
}),
l: common_vendor.p({
label: "姓名",
prop: "userInfo.name",
borderBottom: true
}),
m: common_vendor.o(($event) => $data.form.phone = $event),
n: common_vendor.p({
placeholder: "请输入手机号码",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.phone
}),
o: common_vendor.o(_ctx.showSexSelect),
p: common_vendor.p({
label: "性别",
prop: "userInfo.sex",
borderBottom: true
}),
q: common_vendor.o($options.save),
r: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
s: common_vendor.sr("form", "2bb4a5a4-8,2bb4a5a4-7"),
t: common_vendor.p({
labelPosition: "left",
model: $data.form,
rules: _ctx.rules
}),
v: common_vendor.p({
title: "添加联系人",
border: false,
["is-shadow"]: false,
padding: 0
}),
w: common_vendor.sr("addForm", "2bb4a5a4-6"),
x: 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/user/ic-card-order.vue"]]);
wx.createPage(MiniProgramPage);
+14
View File
@@ -0,0 +1,14 @@
{
"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",
"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-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><uni-card wx:if="{{d}}" u-s="{{['d']}}" u-i="2bb4a5a4-0" bind:__l="__l" u-p="{{d}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{c}}" u-s="{{['d']}}" u-i="2bb4a5a4-1,2bb4a5a4-0" bind:__l="__l" u-p="{{c}}"><block wx:for="{{a}}" wx:for-item="item" wx:key="e"><uv-cell wx:if="{{item.d}}" u-s="{{['right-icon']}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"><uv-icon bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{b}}" slot="right-icon"></uv-icon></uv-cell></block></uv-cell-group></view></view></uni-card><view class="btn-bar"><uv-button wx:if="{{f}}" class="save-user-profile" bindclick="{{e}}" u-i="2bb4a5a4-4" bind:__l="__l" u-p="{{f}}"></uv-button></view><ws-login wx:if="{{i}}" class="r" u-r="login" binddone="{{h}}" u-i="2bb4a5a4-5" bind:__l="__l" u-p="{{i}}"/><uni-popup wx:if="{{x}}" class="r" u-s="{{['d']}}" u-r="addForm" u-i="2bb4a5a4-6" bind:__l="__l" u-p="{{x}}"><uni-card wx:if="{{v}}" u-s="{{['d']}}" u-i="2bb4a5a4-7,2bb4a5a4-6" bind:__l="__l" u-p="{{v}}"><uv-form wx:if="{{t}}" class="r" u-s="{{['d']}}" u-r="form" u-i="2bb4a5a4-8,2bb4a5a4-7" bind:__l="__l" u-p="{{t}}"><uv-form-item wx:if="{{l}}" u-s="{{['d']}}" u-i="2bb4a5a4-9,2bb4a5a4-8" bind:__l="__l" u-p="{{l}}"><uv-input wx:if="{{k}}" u-i="2bb4a5a4-10,2bb4a5a4-9" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></uv-input></uv-form-item><uv-form-item wx:if="{{p}}" u-s="{{['d']}}" bindclick="{{o}}" u-i="2bb4a5a4-11,2bb4a5a4-8" bind:__l="__l" u-p="{{p}}"><uv-input wx:if="{{n}}" u-i="2bb4a5a4-12,2bb4a5a4-11" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"></uv-input></uv-form-item><uv-button wx:if="{{r}}" class="add-emergency" bindclick="{{q}}" u-i="2bb4a5a4-13,2bb4a5a4-8" bind:__l="__l" u-p="{{r}}"></uv-button></uv-form></uni-card></uni-popup></view>
+58
View File
@@ -0,0 +1,58 @@
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-emergency {
width: 500rpx !important;
margin: 40rpx auto;
}
.btn-bar {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
+223
View File
@@ -0,0 +1,223 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
list: [],
statusBarHeight: 104,
isLogin: false,
form: {
name: "",
phone: ""
},
// 表单数据
formData: {},
fields: {},
logo: "",
bookingUser: {},
server: [],
order: []
};
},
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;
}
},
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;
}
},
add() {
this.$refs.addForm.open("center");
},
onDel(item) {
const app = this;
common_vendor.index.showModal({
title: "确定要删除吗?",
success(o) {
if (o.confirm) {
common_vendor.index.showLoading({
title: "请求中."
});
app.reload();
}
}
});
},
// 触发提交表单
submit() {
this.$refs.form.validate().then((res) => {
}).catch((err) => {
console.log("表单错误信息:", err);
});
}
}
};
if (!Array) {
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
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 _component_uv_form_item = common_vendor.resolveComponent("uv-form-item");
const _component_uv_form = common_vendor.resolveComponent("uv-form");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uv_input2 + _easycom_uni_forms_item2 + _easycom_uni_forms2 + _easycom_uni_card2 + _easycom_uv_button2 + _easycom_ws_login2 + _component_uv_form_item + _component_uv_form + _easycom_uni_popup2)();
}
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_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.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_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uv_input + _easycom_uni_forms_item + _easycom_uni_forms + _easycom_uni_card + _easycom_uv_button + _easycom_ws_login + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $data.formData.careId = $event),
b: common_vendor.p({
placeholder: "请输入您的IC卡号",
maxlength: "20",
modelValue: $data.formData.careId
}),
c: common_vendor.p({
label: "卡号",
name: "careId",
required: true
}),
d: common_vendor.o(($event) => $data.formData.name = $event),
e: common_vendor.p({
placeholder: "请输入您的姓名",
maxlength: "6",
modelValue: $data.formData.name
}),
f: common_vendor.p({
label: "姓名",
name: "name",
required: true
}),
g: common_vendor.o(($event) => $data.formData.phone = $event),
h: common_vendor.p({
placeholder: "请输入您的手机号码",
maxlength: "11",
modelValue: $data.formData.phone
}),
i: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
j: common_vendor.sr("form", "edb143a6-1,edb143a6-0"),
k: common_vendor.p({
modelValue: $data.formData,
rules: _ctx.rules,
["label-width"]: 80
}),
l: common_vendor.p({
title: "卡片信息",
border: false,
["is-shadow"]: false,
padding: "10px 6px"
}),
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("login", "edb143a6-9"),
p: common_vendor.o($options.reload),
q: common_vendor.p({
logo: $data.logo
}),
r: common_vendor.o(($event) => $data.form.name = $event),
s: common_vendor.p({
placeholder: "请输入姓名",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.name
}),
t: common_vendor.p({
label: "姓名",
prop: "userInfo.name",
borderBottom: true
}),
v: common_vendor.o(($event) => $data.form.phone = $event),
w: common_vendor.p({
placeholder: "请输入手机号码",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.phone
}),
x: common_vendor.o(_ctx.showSexSelect),
y: common_vendor.p({
label: "性别",
prop: "userInfo.sex",
borderBottom: true
}),
z: common_vendor.o(_ctx.save),
A: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
B: common_vendor.sr("form", "edb143a6-12,edb143a6-11"),
C: common_vendor.p({
labelPosition: "left",
model: $data.form,
rules: _ctx.rules
}),
D: common_vendor.p({
title: "添加联系人",
border: false,
["is-shadow"]: false,
padding: 0
}),
E: common_vendor.sr("addForm", "edb143a6-10"),
F: 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/user/ic-card.vue"]]);
wx.createPage(MiniProgramPage);
+13
View File
@@ -0,0 +1,13 @@
{
"navigationBarTitleText": "IC卡激活",
"enablePullDownRefresh": false,
"usingComponents": {
"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-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms",
"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",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><view class="ic-card-body web-cell web-cell-align-top"><view class="web-cell-content"></view></view><uni-card wx:if="{{l}}" u-s="{{['d']}}" u-i="edb143a6-0" bind:__l="__l" u-p="{{l}}"><uni-forms wx:if="{{k}}" class="r" u-s="{{['d']}}" u-r="form" u-i="edb143a6-1,edb143a6-0" bind:__l="__l" u-p="{{k}}"><uni-forms-item wx:if="{{c}}" u-s="{{['d']}}" u-i="edb143a6-2,edb143a6-1" bind:__l="__l" u-p="{{c}}"><uv-input wx:if="{{b}}" u-i="edb143a6-3,edb143a6-2" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{f}}" u-s="{{['d']}}" u-i="edb143a6-4,edb143a6-1" bind:__l="__l" u-p="{{f}}"><uv-input wx:if="{{e}}" u-i="edb143a6-5,edb143a6-4" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"></uv-input></uni-forms-item><uni-forms-item wx:if="{{i}}" u-s="{{['d']}}" u-i="edb143a6-6,edb143a6-1" bind:__l="__l" u-p="{{i}}"><uv-input wx:if="{{h}}" u-i="edb143a6-7,edb143a6-6" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></uv-input></uni-forms-item></uni-forms></uni-card><view class="card-desc web-text-secondary"><view>温馨提示</view><view>1、请输入卡号和姓名及手机号码进行激活</view><view>2、如果忘记用户信息,请先联系场馆</view></view><view class="btn-bar"><uv-button wx:if="{{n}}" class="save-user-profile" bindclick="{{m}}" u-i="edb143a6-8" bind:__l="__l" u-p="{{n}}"></uv-button></view><ws-login wx:if="{{q}}" class="r" u-r="login" binddone="{{p}}" u-i="edb143a6-9" bind:__l="__l" u-p="{{q}}"/><uni-popup wx:if="{{F}}" class="r" u-s="{{['d']}}" u-r="addForm" u-i="edb143a6-10" bind:__l="__l" u-p="{{F}}"><uni-card wx:if="{{D}}" u-s="{{['d']}}" u-i="edb143a6-11,edb143a6-10" bind:__l="__l" u-p="{{D}}"><uv-form wx:if="{{C}}" class="r" u-s="{{['d']}}" u-r="form" u-i="edb143a6-12,edb143a6-11" bind:__l="__l" u-p="{{C}}"><uv-form-item wx:if="{{t}}" u-s="{{['d']}}" u-i="edb143a6-13,edb143a6-12" bind:__l="__l" u-p="{{t}}"><uv-input wx:if="{{s}}" u-i="edb143a6-14,edb143a6-13" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"></uv-input></uv-form-item><uv-form-item wx:if="{{y}}" u-s="{{['d']}}" bindclick="{{x}}" u-i="edb143a6-15,edb143a6-12" bind:__l="__l" u-p="{{y}}"><uv-input wx:if="{{w}}" u-i="edb143a6-16,edb143a6-15" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"></uv-input></uv-form-item><uv-button wx:if="{{A}}" class="add-emergency" bindclick="{{z}}" u-i="edb143a6-17,edb143a6-12" bind:__l="__l" u-p="{{A}}"></uv-button></uv-form></uni-card></uni-popup></view>
+71
View File
@@ -0,0 +1,71 @@
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 */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.ic-card-body {
width: 692rpx;
margin: 20rpx auto;
height: 450rpx;
border-radius: 20rpx;
background: url("https://oss.wsdns.cn/20240528/a0a2eaa6073041bcb8ef182b87efe00a.jpg?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90");
background-size: 100%;
}
.card-desc {
padding: 20rpx 40rpx;
line-height: 1.4rem;
font-size: 24rpx;
}
.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-emergency {
width: 500rpx !important;
margin: 40rpx auto;
}
.btn-bar {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
+153
View File
@@ -0,0 +1,153 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
const api_booking_integral_index = require("../../api/booking/integral/index.js");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const api_system_user_index = require("../../api/system/user/index.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const currentDate = /* @__PURE__ */ new Date();
const currentMonth = currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1).toString().padStart(2, "0");
const _sfc_main = {
data() {
return {
userInfo: {},
list: [],
statusBarHeight: 104,
isLogin: false,
form: {
name: "",
phone: ""
},
dateTime: currentMonth,
fields: {},
logo: "",
bookingUser: {},
server: [],
order: [],
showCalendar: false,
selected: [],
todaySign: false
};
},
onLoad() {
this.reload();
},
onReady() {
this.$nextTick(() => {
this.showCalendar = true;
});
},
methods: {
async reload(e) {
const app = this;
const { dateTime } = this;
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
app.userInfo = userInfo;
} else {
app.isLogin = false;
}
api_booking_integral_index.getSignData({
dateTime
}).then((res) => {
common_vendor.index.hideLoading();
if (res.message == "您今天已经签到过了") {
app.todaySign = true;
}
app.selected = [];
res.data.map((d) => {
app.selected.push({
date: d.dateTime,
info: "已签到"
});
});
});
},
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;
}
},
onSign() {
const app = this;
app.openLogin();
app.todaySign = true;
api_booking_integral_index.addIntegral({}).then((res) => {
api_system_user_index.updatePointsBySign();
app.userInfo.points++;
common_vendor.index.showToast({
title: "签到成功",
icon: "success"
});
setTimeout(() => {
app.reload();
}, 1e3);
}).catch((err) => {
});
this.$forceUpdate();
},
onMonthSwitch(e) {
this.dateTime = e.year + "-" + e.month.toString().padStart(2, "0");
this.reload();
}
}
};
if (!Array) {
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uni_calendar2 = common_vendor.resolveComponent("uni-calendar");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_button2 + _easycom_uni_card2 + _easycom_uni_calendar2 + _easycom_ws_login2)();
}
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uni_calendar = () => "../../uni_modules/uni-calendar/components/uni-calendar/uni-calendar.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_button + _easycom_uni_card + _easycom_uni_calendar + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t($data.userInfo.points),
b: common_vendor.o($options.onSign),
c: common_vendor.p({
disabled: $data.todaySign,
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "签到"
}),
d: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
e: common_vendor.o($options.onMonthSwitch),
f: common_vendor.p({
selected: $data.selected,
showMonth: true
}),
g: common_vendor.sr("login", "57f0d352-3"),
h: common_vendor.o($options.reload),
i: 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/user/integral.vue"]]);
wx.createPage(MiniProgramPage);
+10
View File
@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "我的积分",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uni-calendar": "../../uni_modules/uni-calendar/components/uni-calendar/uni-calendar",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><uni-card wx:if="{{d}}" u-s="{{['d']}}" u-i="57f0d352-0" bind:__l="__l" u-p="{{d}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><view class="integral-bar web-cell web-cell-content"><text class="web-text-placeholder">当前积分</text><text class="integral web-text-heading">{{a}}</text></view><view class="sign-in-btn"><uv-button wx:if="{{c}}" class="btn" bindclick="{{b}}" u-i="57f0d352-1,57f0d352-0" bind:__l="__l" u-p="{{c}}"></uv-button></view></view></view></uni-card><uni-calendar wx:if="{{f}}" class="uni-calendar--hook" bindmonthSwitch="{{e}}" u-i="57f0d352-2" bind:__l="__l" u-p="{{f}}"/><ws-login wx:if="{{i}}" class="r" u-r="login" binddone="{{h}}" u-i="57f0d352-3" bind:__l="__l" u-p="{{i}}"/></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 */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.integral-bar {
flex-direction: column;
padding: 30rpx 0;
}
.integral-bar .integral {
font-size: 50rpx;
line-height: 2rem;
}
.sign-in-btn {
margin-bottom: 30rpx;
}
.sign-in-btn .btn {
width: 200rpx;
margin: auto;
margin-bottom: 50rpx;
}
+352
View File
@@ -0,0 +1,352 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
const api_booking_userInvoice_index = require("../../api/booking/userInvoice/index.js");
const utils_common = require("../../utils/common.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
list: [],
statusBarHeight: 104,
isLogin: false,
fields: {},
logo: "",
bookingUser: {},
server: [],
order: [],
// 表单数据
formData: {
type: 0,
invoiceType: 0
},
// 发票类型
type: [
{
text: "个人",
value: 0
},
{
text: "单位",
value: 1
}
],
// 开票类型
invoiceType: [
{
text: "普票",
value: 0
},
{
text: "专票",
value: 1
}
],
rules: {
// 对name字段进行必填验证
name: {
rules: [
{
required: true,
errorMessage: "请输入开票名称"
}
]
},
// 对email字段进行必填验证
email: {
rules: [
{
format: "email",
errorMessage: "请输入正确的邮箱地址"
}
]
}
}
};
},
onLoad() {
this.reload();
},
methods: {
async reload() {
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_booking_userInvoice_index.pageUserInvoice({
userId: userInfo.userId,
limit: 1
}).then((res) => {
if (res.count > 0 && !app.formData.id) {
app.formData = res.list[0];
}
});
},
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;
}
},
add() {
this.$refs.addForm.open("center");
},
onDel(item) {
const app = this;
common_vendor.index.showModal({
title: "确定要删除吗?",
success(o) {
if (o.confirm) {
common_vendor.index.showLoading({
title: "请求中."
});
api_booking_userInvoice_index.removeUserInvoice(item.id).then((res) => {
common_vendor.index.showToast({
title: "操作成功",
icon: "none"
});
});
app.reload();
}
}
});
},
/**
* 复写 binddata 方法,如果只是为了校验,无复杂自定义操作,可忽略此方法
* @param {String} name 字段名称
* @param {String} value 表单域的值
*/
// binddata(name,value){
// // 通过 input 事件设置表单指定 name 的值
// this.$refs.form.setValue(name, value)
// },
// 触发提交表单
submit() {
this.$refs.form.validate().then((res) => {
const saveOrUpdate = this.formData.id ? api_booking_userInvoice_index.updateUserInvoice : api_booking_userInvoice_index.addUserInvoice;
saveOrUpdate(this.formData).then((message) => {
common_vendor.index.showToast({
title: "保存成功",
icon: "success"
});
setTimeout(() => {
common_vendor.index.navigateBack({
delta: 2
});
}, 1e3);
}).catch((err) => {
console.log(err);
});
console.log("表单数据信息:", res);
}).catch((err) => {
console.log("表单错误信息:", err);
});
}
}
};
if (!Array) {
const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uv_textarea2 = common_vendor.resolveComponent("uv-textarea");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
(_easycom_uni_data_checkbox2 + _easycom_uni_forms_item2 + _easycom_uv_input2 + _easycom_uv_textarea2 + _easycom_uv_button2 + _easycom_uni_forms2 + _easycom_uni_card2)();
}
const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
const _easycom_uni_forms_item = () => "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js";
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
const _easycom_uv_textarea = () => "../../uni_modules/uv-textarea/components/uv-textarea/uv-textarea.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
if (!Math) {
(_easycom_uni_data_checkbox + _easycom_uni_forms_item + _easycom_uv_input + _easycom_uv_textarea + _easycom_uv_button + _easycom_uni_forms + _easycom_uni_card)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o(($event) => $data.formData.isCompany = $event),
b: common_vendor.p({
localdata: $data.type,
modelValue: $data.formData.isCompany
}),
c: common_vendor.p({
label: "抬头类型",
name: "isCompany"
}),
d: $data.formData.isCompany == 0
}, $data.formData.isCompany == 0 ? {
e: common_vendor.o(($event) => $data.formData.name = $event),
f: common_vendor.p({
type: "text",
placeholder: "真实姓名(必填)",
modelValue: $data.formData.name
}),
g: common_vendor.p({
label: "名称",
name: "name",
required: true
}),
h: common_vendor.o(($event) => $data.formData.phone = $event),
i: common_vendor.p({
type: "text",
placeholder: "手机号码",
modelValue: $data.formData.phone
}),
j: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
k: common_vendor.o(($event) => $data.formData.email = $event),
l: common_vendor.p({
type: "text",
placeholder: "电子邮箱",
modelValue: $data.formData.email
}),
m: common_vendor.p({
label: "电子邮箱",
name: "email",
required: true
})
} : {}, {
n: $data.formData.isCompany == 1
}, $data.formData.isCompany == 1 ? {
o: common_vendor.o(($event) => $data.formData.name = $event),
p: common_vendor.p({
type: "text",
placeholder: "单位名称(必填)",
modelValue: $data.formData.name
}),
q: common_vendor.p({
label: "名称",
name: "name",
required: true
}),
r: common_vendor.o(($event) => $data.formData.invoiceCode = $event),
s: common_vendor.p({
type: "text",
placeholder: "纳税人识别号(必填)",
modelValue: $data.formData.invoiceCode
}),
t: common_vendor.p({
label: "税号",
name: "invoiceCode",
required: true
}),
v: common_vendor.o(($event) => $data.formData.phone = $event),
w: common_vendor.p({
type: "text",
placeholder: "手机号码",
modelValue: $data.formData.phone
}),
x: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
y: common_vendor.o(($event) => $data.formData.email = $event),
z: common_vendor.p({
type: "text",
placeholder: "电子邮箱",
modelValue: $data.formData.email
}),
A: common_vendor.p({
label: "电子邮箱",
name: "email",
required: true
}),
B: common_vendor.o(($event) => $data.formData.bankName = $event),
C: common_vendor.p({
type: "text",
placeholder: "开户银行名称",
modelValue: $data.formData.bankName
}),
D: common_vendor.p({
label: "开户行",
name: "bankName",
required: true
}),
E: common_vendor.o(($event) => $data.formData.bankAccount = $event),
F: common_vendor.p({
type: "text",
placeholder: "开户银行账号",
modelValue: $data.formData.bankAccount
}),
G: common_vendor.p({
label: "银行账号",
name: "bankAccount",
required: true
}),
H: common_vendor.o(($event) => $data.formData.address = $event),
I: common_vendor.p({
type: "text",
placeholder: "单位地址",
modelValue: $data.formData.address
}),
J: common_vendor.p({
label: "单位地址",
name: "address",
required: true
}),
K: common_vendor.o(($event) => $data.formData.tel = $event),
L: common_vendor.p({
type: "text",
placeholder: "单位电话",
modelValue: $data.formData.tel
}),
M: common_vendor.p({
label: "单位电话",
name: "tel",
required: true
}),
N: common_vendor.o(($event) => $data.formData.comments = $event),
O: common_vendor.p({
placeholder: "请输入备注信息",
["auto-height"]: true,
modelValue: $data.formData.comments
}),
P: common_vendor.p({
label: "备注",
name: "comments"
})
} : {}, {
Q: common_vendor.o($options.submit),
R: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
S: common_vendor.sr("form", "72cf4f60-1,72cf4f60-0"),
T: common_vendor.p({
modelValue: $data.formData,
rules: $data.rules,
["label-position"]: "top"
}),
U: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 20
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/invoice-edit.vue"]]);
wx.createPage(MiniProgramPage);
+13
View File
@@ -0,0 +1,13 @@
{
"navigationBarTitleText": "修改开票信息",
"enablePullDownRefresh": false,
"usingComponents": {
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
"uni-forms-item": "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item",
"uv-input": "../../uni_modules/uv-input/components/uv-input/uv-input",
"uv-textarea": "../../uni_modules/uv-textarea/components/uv-textarea/uv-textarea",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uni-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><uni-card wx:if="{{U}}" u-s="{{['d']}}" u-i="72cf4f60-0" bind:__l="__l" u-p="{{U}}"><uni-forms wx:if="{{T}}" class="r" u-s="{{['d']}}" u-r="form" u-i="72cf4f60-1,72cf4f60-0" bind:__l="__l" u-p="{{T}}"><uni-forms-item wx:if="{{c}}" u-s="{{['d']}}" u-i="72cf4f60-2,72cf4f60-1" bind:__l="__l" u-p="{{c}}"><uni-data-checkbox wx:if="{{b}}" u-i="72cf4f60-3,72cf4f60-2" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"/></uni-forms-item><block wx:if="{{d}}"><uni-forms-item wx:if="{{g}}" u-s="{{['d']}}" u-i="72cf4f60-4,72cf4f60-1" bind:__l="__l" u-p="{{g}}"><uv-input wx:if="{{f}}" class="input" u-i="72cf4f60-5,72cf4f60-4" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"/></uni-forms-item><uni-forms-item wx:if="{{j}}" u-s="{{['d']}}" u-i="72cf4f60-6,72cf4f60-1" bind:__l="__l" u-p="{{j}}"><uv-input wx:if="{{i}}" class="input" u-i="72cf4f60-7,72cf4f60-6" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"/></uni-forms-item><uni-forms-item wx:if="{{m}}" u-s="{{['d']}}" u-i="72cf4f60-8,72cf4f60-1" bind:__l="__l" u-p="{{m}}"><uv-input wx:if="{{l}}" class="input" u-i="72cf4f60-9,72cf4f60-8" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"/></uni-forms-item></block><block wx:if="{{n}}"><uni-forms-item wx:if="{{q}}" u-s="{{['d']}}" u-i="72cf4f60-10,72cf4f60-1" bind:__l="__l" u-p="{{q}}"><uv-input wx:if="{{p}}" class="input" u-i="72cf4f60-11,72cf4f60-10" bind:__l="__l" bindupdateModelValue="{{o}}" u-p="{{p}}"/></uni-forms-item><uni-forms-item wx:if="{{t}}" u-s="{{['d']}}" u-i="72cf4f60-12,72cf4f60-1" bind:__l="__l" u-p="{{t}}"><uv-input wx:if="{{s}}" class="input" u-i="72cf4f60-13,72cf4f60-12" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"/></uni-forms-item><uni-forms-item wx:if="{{x}}" u-s="{{['d']}}" u-i="72cf4f60-14,72cf4f60-1" bind:__l="__l" u-p="{{x}}"><uv-input wx:if="{{w}}" class="input" u-i="72cf4f60-15,72cf4f60-14" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"/></uni-forms-item><uni-forms-item wx:if="{{A}}" u-s="{{['d']}}" u-i="72cf4f60-16,72cf4f60-1" bind:__l="__l" u-p="{{A}}"><uv-input wx:if="{{z}}" class="input" u-i="72cf4f60-17,72cf4f60-16" bind:__l="__l" bindupdateModelValue="{{y}}" u-p="{{z}}"/></uni-forms-item><uni-forms-item wx:if="{{D}}" u-s="{{['d']}}" u-i="72cf4f60-18,72cf4f60-1" bind:__l="__l" u-p="{{D}}"><uv-input wx:if="{{C}}" class="input" u-i="72cf4f60-19,72cf4f60-18" bind:__l="__l" bindupdateModelValue="{{B}}" u-p="{{C}}"/></uni-forms-item><uni-forms-item wx:if="{{G}}" u-s="{{['d']}}" u-i="72cf4f60-20,72cf4f60-1" bind:__l="__l" u-p="{{G}}"><uv-input wx:if="{{F}}" class="input" u-i="72cf4f60-21,72cf4f60-20" bind:__l="__l" bindupdateModelValue="{{E}}" u-p="{{F}}"/></uni-forms-item><uni-forms-item wx:if="{{J}}" u-s="{{['d']}}" u-i="72cf4f60-22,72cf4f60-1" bind:__l="__l" u-p="{{J}}"><uv-input wx:if="{{I}}" class="input" u-i="72cf4f60-23,72cf4f60-22" bind:__l="__l" bindupdateModelValue="{{H}}" u-p="{{I}}"/></uni-forms-item><uni-forms-item wx:if="{{M}}" u-s="{{['d']}}" u-i="72cf4f60-24,72cf4f60-1" bind:__l="__l" u-p="{{M}}"><uv-input wx:if="{{L}}" class="input" u-i="72cf4f60-25,72cf4f60-24" bind:__l="__l" bindupdateModelValue="{{K}}" u-p="{{L}}"/></uni-forms-item><uni-forms-item wx:if="{{P}}" u-s="{{['d']}}" u-i="72cf4f60-26,72cf4f60-1" bind:__l="__l" u-p="{{P}}"><uv-textarea wx:if="{{O}}" u-i="72cf4f60-27,72cf4f60-26" bind:__l="__l" bindupdateModelValue="{{N}}" u-p="{{O}}"></uv-textarea></uni-forms-item></block><uv-button wx:if="{{R}}" class="add-emergency" bindclick="{{Q}}" u-i="72cf4f60-28,72cf4f60-1" bind:__l="__l" u-p="{{R}}"></uv-button></uni-forms></uni-card></view>
+58
View File
@@ -0,0 +1,58 @@
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-emergency {
width: 500rpx !important;
margin: 40rpx auto;
}
.btn-bar {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
+112
View File
@@ -0,0 +1,112 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_userInvoice_index = require("../../api/booking/userInvoice/index.js");
const utils_common = require("../../utils/common.js");
const _sfc_main = {
data() {
return {
isLogin: false,
logo: "",
imgUrls: "",
pdfUrl: ""
};
},
onLoad(e) {
this.reload(e.id);
},
methods: {
async reload(orderNo) {
const app = this;
await api_booking_userInvoice_index.showInvoice(orderNo).then((res) => {
if (res) {
const json = JSON.parse(res);
if (json.code) {
const result = json.result;
console.log("json: ", json);
console.log("json: ", json.code);
console.log("result: ", result);
if (result.length > 0) {
app.imgUrls = result[0].imgUrls;
app.pdfUrl = result[0].pdfUrl;
}
}
}
});
},
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;
}
},
onDown(text) {
const app = this;
console.log(text);
common_vendor.index.setClipboardData({
data: app.pdfUrl,
success: function() {
console.log("success");
},
complete: function(res) {
console.log(1, res);
}
});
common_vendor.index.getClipboardData({
success: function(res) {
console.log(2, res.data);
},
complete: function(res) {
console.log(3, res);
}
});
console.log("复制发票222", app.pdfUrl);
},
saveFile(tempFilePath) {
common_vendor.index.saveFile({
tempFilePath,
//临时路径
success: function(res) {
common_vendor.index.showToast({
icon: "none",
mask: true,
title: "文件已保存:" + res.savedFilePath,
//保存路径
duration: 3e3
});
setTimeout(() => {
common_vendor.index.openDocument({
filePath: res.savedFilePath,
success: function(res2) {
}
});
}, 3e3);
}
});
}
}
};
if (!Array) {
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
_easycom_uv_button2();
}
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
if (!Math) {
_easycom_uv_button();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.imgUrls,
b: common_vendor.o(($event) => $options.onDown($data.pdfUrl)),
c: common_vendor.o(($event) => $options.onDown($data.pdfUrl))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/invoice-show.vue"]]);
wx.createPage(MiniProgramPage);
+7
View File
@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "查看开票信息",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container"><image class="responsive-image" src="{{a}}" mode="widthFix" bindtap="{{b}}"></image><uv-button u-s="{{['d']}}" bindclick="{{c}}" u-i="52e913c3-0" bind:__l="__l">复制发票链接</uv-button></view>
+36
View File
@@ -0,0 +1,36 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.container {
width: 100%; /* 确保容器宽度为100% */
}
.responsive-image {
width: 750rpx; /* 图片宽度自适应容器宽度 */
height: auto; /* 图片高度自适应宽度保持比例 */
display: block; /* 避免图片下方出现空白 */
max-width: 100%; /* 最大宽度不超过父容器宽度 */
/* 可以设置最大高度限制,防止图片过高 */
margin-bottom: 10px;
}
+395
View File
@@ -0,0 +1,395 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
const api_booking_userInvoice_index = require("../../api/booking/userInvoice/index.js");
const utils_common = require("../../utils/common.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
orderId: 0,
list: [],
statusBarHeight: 104,
isLogin: false,
fields: {},
logo: "",
bookingUser: {},
server: [],
order: [],
// 表单数据
formData: {
type: 0,
invoiceType: 0
},
// 发票类型
type: [
{
text: "电子",
value: 0
},
{
text: "纸质",
value: 1
}
],
// 开票类型
invoiceType: [
{
text: "普票",
value: 0
},
{
text: "专票",
value: 1
}
],
rules: {
// 对name字段进行必填验证
name: {
rules: [
{
required: true,
errorMessage: "请输入开票名称"
}
]
},
// 对email字段进行必填验证
email: {
rules: [
{
format: "email",
errorMessage: "请输入正确的邮箱地址"
}
]
}
}
};
},
onLoad(e) {
this.orderId = e.id;
},
onShow() {
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_booking_userInvoice_index.pageUserInvoice({
userId: userInfo.userId,
limit: 1
}).then((res) => {
if (res.count > 0 && !app.formData.id) {
app.formData = res.list[0];
app.formData.orderId = app.orderId;
}
});
},
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;
}
},
editInvoice() {
common_vendor.index.navigateTo({
url: `/package/user/invoice-edit?id=${this.formData.id}`
});
},
add() {
this.$refs.addForm.open("center");
},
onDel(item) {
const app = this;
common_vendor.index.showModal({
title: "确定要删除吗?",
success(o) {
if (o.confirm) {
common_vendor.index.showLoading({
title: "请求中."
});
api_booking_userInvoice_index.removeUserInvoice(item.id).then((res) => {
common_vendor.index.showToast({
title: "操作成功",
icon: "none"
});
});
app.reload();
}
}
});
},
/**
* 复写 binddata 方法,如果只是为了校验,无复杂自定义操作,可忽略此方法
* @param {String} name 字段名称
* @param {String} value 表单域的值
*/
// binddata(name,value){
// // 通过 input 事件设置表单指定 name 的值
// this.$refs.form.setValue(name, value)
// },
// 触发提交表单
submit() {
const { formData } = this;
this.$refs.form.validate().then((res) => {
api_booking_userInvoice_index.doInvoice(formData).then((message) => {
console.log("message: ", message);
common_vendor.index.showToast({
title: "开票成功",
icon: "success"
});
setTimeout(() => {
common_vendor.index.navigateBack();
}, 1e3);
}).catch((err) => {
console.log(err);
});
console.log("表单数据信息:", res);
}).catch((err) => {
console.log("表单错误信息:", err);
});
}
}
};
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_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uv_textarea2 = common_vendor.resolveComponent("uv-textarea");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
(_easycom_uv_icon2 + _easycom_uv_cell2 + _easycom_uni_card2 + _easycom_uni_data_checkbox2 + _easycom_uni_forms_item2 + _easycom_uv_input2 + _easycom_uv_textarea2 + _easycom_uv_button2 + _easycom_uni_forms2)();
}
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_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
const _easycom_uni_forms_item = () => "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js";
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
const _easycom_uv_textarea = () => "../../uni_modules/uv-textarea/components/uv-textarea/uv-textarea.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.js";
if (!Math) {
(_easycom_uv_icon + _easycom_uv_cell + _easycom_uni_card + _easycom_uni_data_checkbox + _easycom_uni_forms_item + _easycom_uv_input + _easycom_uv_textarea + _easycom_uv_button + _easycom_uni_forms)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
name: "arrow-right"
}),
b: common_vendor.o($options.editInvoice),
c: common_vendor.p({
title: `${$data.formData.name ? $data.formData.name : "请填写开票信息"}`,
label: `${$data.formData.isCompany == 1 ? "单位" : "个人"}`,
cellStyle: {
padding: "5px 0"
},
border: false
}),
d: common_vendor.p({
border: false,
["is-shadow"]: false
}),
e: $data.formData.name
}, $data.formData.name ? common_vendor.e({
f: common_vendor.o(($event) => $data.formData.type = $event),
g: common_vendor.p({
localdata: $data.type,
modelValue: $data.formData.type
}),
h: common_vendor.p({
label: "发票类型",
name: "type"
}),
i: common_vendor.o(($event) => $data.formData.invoiceType = $event),
j: common_vendor.p({
localdata: $data.invoiceType,
modelValue: $data.formData.invoiceType
}),
k: common_vendor.p({
label: "开票类型",
name: "invoiceType"
}),
l: $data.formData.isCompany == 0
}, $data.formData.isCompany == 0 ? {
m: common_vendor.o(($event) => $data.formData.name = $event),
n: common_vendor.p({
disabled: true,
type: "text",
modelValue: $data.formData.name
}),
o: common_vendor.p({
label: "名称",
name: "name",
required: true
}),
p: common_vendor.o(($event) => $data.formData.phone = $event),
q: common_vendor.p({
disabled: true,
type: "text",
placeholder: "手机号码",
modelValue: $data.formData.phone
}),
r: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
s: common_vendor.o(($event) => $data.formData.email = $event),
t: common_vendor.p({
disabled: true,
type: "text",
placeholder: "电子邮箱",
modelValue: $data.formData.email
}),
v: common_vendor.p({
label: "电子邮箱",
name: "email",
required: true
})
} : {}, {
w: $data.formData.isCompany == 1
}, $data.formData.isCompany == 1 ? {
x: common_vendor.o(($event) => $data.formData.name = $event),
y: common_vendor.p({
type: "text",
placeholder: "单位名称(必填)",
modelValue: $data.formData.name
}),
z: common_vendor.p({
label: "名称",
name: "name",
required: true
}),
A: common_vendor.o(($event) => $data.formData.invoiceCode = $event),
B: common_vendor.p({
type: "text",
placeholder: "纳税人识别号(必填)",
modelValue: $data.formData.invoiceCode
}),
C: common_vendor.p({
label: "税号",
name: "invoiceCode",
required: true
}),
D: common_vendor.o(($event) => $data.formData.phone = $event),
E: common_vendor.p({
type: "text",
placeholder: "手机号码",
modelValue: $data.formData.phone
}),
F: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
G: common_vendor.o(($event) => $data.formData.email = $event),
H: common_vendor.p({
type: "text",
placeholder: "电子邮箱",
modelValue: $data.formData.email
}),
I: common_vendor.p({
label: "电子邮箱",
name: "email",
required: true
}),
J: common_vendor.o(($event) => $data.formData.bankName = $event),
K: common_vendor.p({
type: "text",
placeholder: "开户银行名称",
modelValue: $data.formData.bankName
}),
L: common_vendor.p({
label: "开户行",
name: "bankName",
required: true
}),
M: common_vendor.o(($event) => $data.formData.bankAccount = $event),
N: common_vendor.p({
type: "text",
placeholder: "开户银行账号",
modelValue: $data.formData.bankAccount
}),
O: common_vendor.p({
label: "银行账号",
name: "bankAccount",
required: true
}),
P: common_vendor.o(($event) => $data.formData.address = $event),
Q: common_vendor.p({
type: "text",
placeholder: "单位地址",
modelValue: $data.formData.address
}),
R: common_vendor.p({
label: "单位地址",
name: "address",
required: true
}),
S: common_vendor.o(($event) => $data.formData.tel = $event),
T: common_vendor.p({
type: "text",
placeholder: "单位电话",
modelValue: $data.formData.tel
}),
U: common_vendor.p({
label: "单位电话",
name: "tel",
required: true
}),
V: common_vendor.o(($event) => $data.formData.comments = $event),
W: common_vendor.p({
placeholder: "请输入备注信息",
["auto-height"]: true,
modelValue: $data.formData.comments
}),
X: common_vendor.p({
label: "备注",
name: "comments"
})
} : {}, {
Y: common_vendor.o($options.submit),
Z: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "确认开票"
}),
aa: common_vendor.sr("form", "87ef8712-4,87ef8712-3"),
ab: common_vendor.p({
modelValue: $data.formData,
rules: $data.rules,
["label-width"]: 100,
["label-position"]: "left"
}),
ac: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 20
})
}) : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/invoice.vue"]]);
wx.createPage(MiniProgramPage);
+15
View File
@@ -0,0 +1,15 @@
{
"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",
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
"uni-forms-item": "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item",
"uv-input": "../../uni_modules/uv-input/components/uv-input/uv-input",
"uv-textarea": "../../uni_modules/uv-textarea/components/uv-textarea/uv-textarea",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uni-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><uni-card wx:if="{{d}}" u-s="{{['d']}}" u-i="87ef8712-0" bind:__l="__l" u-p="{{d}}"><uv-cell wx:if="{{c}}" u-s="{{['right-icon']}}" bindclick="{{b}}" u-i="87ef8712-1,87ef8712-0" bind:__l="__l" u-p="{{c}}"><uv-icon u-i="87ef8712-2,87ef8712-1" bind:__l="__l" u-p="{{a}}" slot="right-icon"></uv-icon></uv-cell></uni-card><uni-card wx:if="{{e}}" u-s="{{['d']}}" u-i="87ef8712-3" bind:__l="__l" u-p="{{ac}}"><uni-forms wx:if="{{ab}}" class="r" u-s="{{['d']}}" u-r="form" u-i="87ef8712-4,87ef8712-3" bind:__l="__l" u-p="{{ab}}"><uni-forms-item wx:if="{{h}}" u-s="{{['d']}}" u-i="87ef8712-5,87ef8712-4" bind:__l="__l" u-p="{{h}}"><uni-data-checkbox wx:if="{{g}}" u-i="87ef8712-6,87ef8712-5" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"/></uni-forms-item><uni-forms-item wx:if="{{k}}" u-s="{{['d']}}" u-i="87ef8712-7,87ef8712-4" bind:__l="__l" u-p="{{k}}"><uni-data-checkbox wx:if="{{j}}" u-i="87ef8712-8,87ef8712-7" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"/></uni-forms-item><block wx:if="{{l}}"><uni-forms-item wx:if="{{o}}" u-s="{{['d']}}" u-i="87ef8712-9,87ef8712-4" bind:__l="__l" u-p="{{o}}"><uv-input wx:if="{{n}}" class="input" u-i="87ef8712-10,87ef8712-9" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"/></uni-forms-item><uni-forms-item wx:if="{{r}}" u-s="{{['d']}}" u-i="87ef8712-11,87ef8712-4" bind:__l="__l" u-p="{{r}}"><uv-input wx:if="{{q}}" class="input" u-i="87ef8712-12,87ef8712-11" bind:__l="__l" bindupdateModelValue="{{p}}" u-p="{{q}}"/></uni-forms-item><uni-forms-item wx:if="{{v}}" u-s="{{['d']}}" u-i="87ef8712-13,87ef8712-4" bind:__l="__l" u-p="{{v}}"><uv-input wx:if="{{t}}" class="input" u-i="87ef8712-14,87ef8712-13" bind:__l="__l" bindupdateModelValue="{{s}}" u-p="{{t}}"/></uni-forms-item></block><block wx:if="{{w}}"><uni-forms-item wx:if="{{z}}" u-s="{{['d']}}" u-i="87ef8712-15,87ef8712-4" bind:__l="__l" u-p="{{z}}"><uv-input wx:if="{{y}}" class="input" u-i="87ef8712-16,87ef8712-15" bind:__l="__l" bindupdateModelValue="{{x}}" u-p="{{y}}"/></uni-forms-item><uni-forms-item wx:if="{{C}}" u-s="{{['d']}}" u-i="87ef8712-17,87ef8712-4" bind:__l="__l" u-p="{{C}}"><uv-input wx:if="{{B}}" class="input" u-i="87ef8712-18,87ef8712-17" bind:__l="__l" bindupdateModelValue="{{A}}" u-p="{{B}}"/></uni-forms-item><uni-forms-item wx:if="{{F}}" u-s="{{['d']}}" u-i="87ef8712-19,87ef8712-4" bind:__l="__l" u-p="{{F}}"><uv-input wx:if="{{E}}" class="input" u-i="87ef8712-20,87ef8712-19" bind:__l="__l" bindupdateModelValue="{{D}}" u-p="{{E}}"/></uni-forms-item><uni-forms-item wx:if="{{I}}" u-s="{{['d']}}" u-i="87ef8712-21,87ef8712-4" bind:__l="__l" u-p="{{I}}"><uv-input wx:if="{{H}}" class="input" u-i="87ef8712-22,87ef8712-21" bind:__l="__l" bindupdateModelValue="{{G}}" u-p="{{H}}"/></uni-forms-item><uni-forms-item wx:if="{{L}}" u-s="{{['d']}}" u-i="87ef8712-23,87ef8712-4" bind:__l="__l" u-p="{{L}}"><uv-input wx:if="{{K}}" class="input" u-i="87ef8712-24,87ef8712-23" bind:__l="__l" bindupdateModelValue="{{J}}" u-p="{{K}}"/></uni-forms-item><uni-forms-item wx:if="{{O}}" u-s="{{['d']}}" u-i="87ef8712-25,87ef8712-4" bind:__l="__l" u-p="{{O}}"><uv-input wx:if="{{N}}" class="input" u-i="87ef8712-26,87ef8712-25" bind:__l="__l" bindupdateModelValue="{{M}}" u-p="{{N}}"/></uni-forms-item><uni-forms-item wx:if="{{R}}" u-s="{{['d']}}" u-i="87ef8712-27,87ef8712-4" bind:__l="__l" u-p="{{R}}"><uv-input wx:if="{{Q}}" class="input" u-i="87ef8712-28,87ef8712-27" bind:__l="__l" bindupdateModelValue="{{P}}" u-p="{{Q}}"/></uni-forms-item><uni-forms-item wx:if="{{U}}" u-s="{{['d']}}" u-i="87ef8712-29,87ef8712-4" bind:__l="__l" u-p="{{U}}"><uv-input wx:if="{{T}}" class="input" u-i="87ef8712-30,87ef8712-29" bind:__l="__l" bindupdateModelValue="{{S}}" u-p="{{T}}"/></uni-forms-item><uni-forms-item wx:if="{{X}}" u-s="{{['d']}}" u-i="87ef8712-31,87ef8712-4" bind:__l="__l" u-p="{{X}}"><uv-textarea wx:if="{{W}}" u-i="87ef8712-32,87ef8712-31" bind:__l="__l" bindupdateModelValue="{{V}}" u-p="{{W}}"></uv-textarea></uni-forms-item></block><uv-button wx:if="{{Z}}" class="add-emergency" bindclick="{{Y}}" u-i="87ef8712-33,87ef8712-4" bind:__l="__l" u-p="{{Z}}"></uv-button></uni-forms></uni-card></view>
+58
View File
@@ -0,0 +1,58 @@
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-emergency {
width: 500rpx !important;
margin: 40rpx auto;
}
.btn-bar {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
margin: auto;
clear: both;
}
+248
View File
@@ -0,0 +1,248 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../utils/request.js");
const api_passport_login_index = require("../../api/passport/login/index.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();
store_modules_car.useCarStore();
const _sfc_main = {
data() {
return {
list: [],
isLogin: false,
form: {
name: "",
phone: "",
code: "",
password: ""
},
tips: "点击获取",
logo: "",
userInfo: {},
rules: {
mobile: {
rules: [{
required: true,
format: "number",
errorMessage: "请输入手机号码"
}]
},
password: {
rules: [{
required: true,
errorMessage: "请输入支付密码"
}]
},
code: {
rules: [{
required: true,
errorMessage: "请输入短信验证码"
}]
}
}
};
},
onLoad() {
this.reload();
},
onLoad() {
if (!this.isLogin) {
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;
app.form.phone = userInfo.phone;
} else {
app.isLogin = false;
app.openLogin();
}
},
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;
}
},
codeChange(text) {
this.tips = text;
},
getSmsCode() {
const {
phone
} = this.form;
if (!phone || phone.length != 11) {
common_vendor.index.showToast({
title: "请填写正确的手机号码",
icon: "none"
});
return false;
}
if (this.$refs.uCode.canGetCode) {
api_passport_login_index.sendSmsCaptcha({
phone
}).then((res) => {
console.log("res: ", res);
});
common_vendor.index.showLoading({
title: "正在获取验证码"
});
setTimeout(() => {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "验证码已发送"
});
this.$refs.uCode.start();
}, 1e3);
} else {
common_vendor.index.showToast({
title: "倒计时结束后再发送",
icon: "none"
});
}
},
// 触发提交表单
submit() {
const { form } = this;
this.$refs.form.validate().then((res) => {
api_passport_login_index.updatePayPassword(form).then((message) => {
common_vendor.index.showToast({
title: "设置成功",
icon: "success"
});
setTimeout(() => {
common_vendor.index.navigateBack();
}, 1500);
}).catch((err) => {
common_vendor.index.showToast({
title: err.message,
icon: "none"
});
});
}).catch((err) => {
});
}
}
};
if (!Array) {
const _easycom_uv_code_input2 = common_vendor.resolveComponent("uv-code-input");
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
const _easycom_uv_code2 = common_vendor.resolveComponent("uv-code");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_code_input2 + _easycom_uni_forms_item2 + _easycom_uv_code2 + _easycom_uv_button2 + _easycom_uv_input2 + _easycom_uni_forms2 + _easycom_uni_card2 + _easycom_ws_login2)();
}
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_uv_code = () => "../../uni_modules/uv-code/components/uv-code/uv-code.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.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_uv_code_input + _easycom_uni_forms_item + _easycom_uv_code + _easycom_uv_button + _easycom_uv_input + _easycom_uni_forms + _easycom_uni_card + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(_ctx.change),
b: common_vendor.o(_ctx.finish),
c: common_vendor.o(($event) => $data.form.password = $event),
d: common_vendor.p({
mode: "box",
space: 0,
maxlength: 6,
hairline: true,
dot: true,
modelValue: $data.form.password
}),
e: common_vendor.p({
label: "支付密码",
name: "password",
required: true
}),
f: common_vendor.sr("uCode", "1e4336c6-6,1e4336c6-5"),
g: common_vendor.o($options.codeChange),
h: common_vendor.p({
seconds: _ctx.seconds,
changeText: "X秒重新获取"
}),
i: common_vendor.o($options.getSmsCode),
j: common_vendor.p({
text: $data.tips,
shape: "circle"
}),
k: common_vendor.o(($event) => $data.userInfo.mobile = $event),
l: common_vendor.p({
placeholder: "手机号码",
disabled: true,
maxlength: "11",
border: "bottom",
modelValue: $data.userInfo.mobile
}),
m: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
n: common_vendor.o(($event) => $data.form.code = $event),
o: common_vendor.p({
mode: "box",
space: 0,
maxlength: 6,
hairline: true,
modelValue: $data.form.code
}),
p: common_vendor.p({
label: "短信验证码",
name: "code",
required: true
}),
q: common_vendor.o($options.submit),
r: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "确定修改"
}),
s: common_vendor.sr("form", "1e4336c6-1,1e4336c6-0"),
t: common_vendor.p({
modelValue: $data.form,
rules: $data.rules,
["label-width"]: 90
}),
v: common_vendor.p({
title: "设置支付密码",
border: false,
["is-shadow"]: false,
padding: "10px 6px"
}),
w: common_vendor.sr("login", "1e4336c6-11"),
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/user/pay-password.vue"]]);
wx.createPage(MiniProgramPage);
+14
View File
@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "设置支付密码",
"enablePullDownRefresh": false,
"usingComponents": {
"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",
"uv-code": "../../uni_modules/uv-code/components/uv-code/uv-code",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uv-input": "../../uni_modules/uv-input/components/uv-input/uv-input",
"uni-forms": "../../uni_modules/uni-forms/components/uni-forms/uni-forms",
"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="page"><uni-card wx:if="{{v}}" u-s="{{['d']}}" u-i="1e4336c6-0" bind:__l="__l" u-p="{{v}}"><uni-forms wx:if="{{t}}" class="r" u-s="{{['d']}}" u-r="form" u-i="1e4336c6-1,1e4336c6-0" bind:__l="__l" u-p="{{t}}"><uni-forms-item wx:if="{{e}}" u-s="{{['d']}}" u-i="1e4336c6-2,1e4336c6-1" bind:__l="__l" u-p="{{e}}"><uv-code-input wx:if="{{d}}" bindchange="{{a}}" bindfinish="{{b}}" u-i="1e4336c6-3,1e4336c6-2" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></uv-code-input></uni-forms-item><uni-forms-item wx:if="{{m}}" u-s="{{['d']}}" u-i="1e4336c6-4,1e4336c6-1" bind:__l="__l" u-p="{{m}}"><uv-input wx:if="{{l}}" u-s="{{['suffix']}}" u-i="1e4336c6-5,1e4336c6-4" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"><view slot="suffix"><uv-code wx:if="{{h}}" class="r" u-r="uCode" bindchange="{{g}}" u-i="1e4336c6-6,1e4336c6-5" bind:__l="__l" u-p="{{h}}"></uv-code><uv-button wx:if="{{j}}" bindclick="{{i}}" u-i="1e4336c6-7,1e4336c6-5" bind:__l="__l" u-p="{{j}}"></uv-button></view></uv-input></uni-forms-item><uni-forms-item wx:if="{{p}}" u-s="{{['d']}}" u-i="1e4336c6-8,1e4336c6-1" bind:__l="__l" u-p="{{p}}"><uv-code-input wx:if="{{o}}" u-i="1e4336c6-9,1e4336c6-8" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"></uv-code-input></uni-forms-item><uv-button wx:if="{{r}}" class="submit-btn" bindclick="{{q}}" u-i="1e4336c6-10,1e4336c6-1" bind:__l="__l" u-p="{{r}}"></uv-button></uni-forms></uni-card><ws-login wx:if="{{y}}" class="r" u-r="login" binddone="{{x}}" u-i="1e4336c6-11" bind:__l="__l" u-p="{{y}}"/></view>
+38
View File
@@ -0,0 +1,38 @@
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 */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.submit-btn {
width: 600rpx !important;
margin: 40rpx auto;
}
+197
View File
@@ -0,0 +1,197 @@
"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");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
const api_system_file_index = require("../../api/system/file/index.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
statusBarHeight: 104,
isLogin: false,
form: null,
userInfo: {},
fields: {},
logo: "",
bookingUser: {},
server: [],
order: []
};
},
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.form = userInfo;
api_booking_users_index.getByPhone({
phone: userInfo.phone
}).then((data) => {
if (data) {
app.form = Object.assign({}, app.form, data);
}
});
} else {
app.isLogin = false;
app.form = {};
}
api_cms_mpMenu_index.listMpMenu({}).then((res) => {
app.server = res.filter((d) => d.type == 0);
app.order = res.filter((d) => d.type == 1);
});
},
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;
}
},
async chooseAvatar({ detail }) {
const url = detail.avatarUrl;
this.form.avatarUrl = await api_system_file_index.uploadOssByPath(url);
api_booking_users_index.updateUsers({
uid: this.form.uid,
avatarUrl: `${this.form.avatarUrl}`
});
},
save() {
const { form } = this;
if (!common_vendor.index.$uv.test.idCard(form.idCard)) {
common_vendor.index.showToast({
title: "请填写真实身份证号",
icon: "none"
});
return false;
}
api_booking_users_index.updateUsers({
phone: form.phone,
realName: form.realName,
idCard: form.idCard,
uid: form.uid
}).then((res) => {
common_vendor.index.showToast({
title: "保存成功",
icon: "success"
});
});
}
}
};
if (!Array) {
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _component_uv_form_item = common_vendor.resolveComponent("uv-form-item");
const _component_uv_form = common_vendor.resolveComponent("uv-form");
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");
(_easycom_uv_avatar2 + _easycom_uv_input2 + _easycom_uv_cell2 + _component_uv_form_item + _component_uv_form + _easycom_uni_card2 + _easycom_uv_button2 + _easycom_ws_login2)();
}
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.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_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_avatar + _easycom_uv_input + _easycom_uv_cell + _easycom_uni_card + _easycom_uv_button + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.form
}, $data.form ? {
b: common_vendor.p({
src: $data.form.avatarUrl,
size: "100"
}),
c: common_vendor.o((...args) => $options.chooseAvatar && $options.chooseAvatar(...args)),
d: common_vendor.o(($event) => $data.form.phone = $event),
e: common_vendor.p({
placeholder: "请输入手机号码",
disabled: true,
maxlength: "11",
modelValue: $data.form.phone
}),
f: common_vendor.p({
title: "手机号码",
value: $data.form.phone
}),
g: common_vendor.p({
prop: "form.phone",
borderBottom: true
}),
h: common_vendor.o(($event) => $data.form.realName = $event),
i: common_vendor.p({
placeholder: "请输入真实姓名",
maxlength: "11",
modelValue: $data.form.realName
}),
j: common_vendor.p({
title: "真实姓名",
value: $data.form.realName
}),
k: common_vendor.p({
prop: "form.realName",
borderBottom: true
}),
l: common_vendor.o(($event) => $data.form.idCard = $event),
m: common_vendor.p({
placeholder: "请输入身份证号",
maxlength: "18",
modelValue: $data.form.idCard
}),
n: common_vendor.p({
title: "身份证号码",
value: $data.form.idCard
}),
o: common_vendor.p({
prop: "form.idCard",
borderBottom: true
}),
p: common_vendor.sr("form", "1f448c34-2,1f448c34-1"),
q: common_vendor.p({
labelPosition: "left",
model: $data.form,
rules: _ctx.rules
}),
r: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
}),
s: common_vendor.o($options.save),
t: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
v: common_vendor.sr("login", "1f448c34-13"),
w: common_vendor.o($options.reload),
x: 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/user/personal.vue"]]);
wx.createPage(MiniProgramPage);
+12
View File
@@ -0,0 +1,12 @@
{
"navigationBarTitleText": "个人资料",
"enablePullDownRefresh": false,
"usingComponents": {
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
"uv-input": "../../uni_modules/uv-input/components/uv-input/uv-input",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"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"
}
}
+1
View File
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="page"><view class="flex justify-center"></view><button open-type="chooseAvatar" bindchooseavatar="{{c}}" class="btn"><uv-avatar wx:if="{{b}}" u-i="1f448c34-0" bind:__l="__l" u-p="{{b}}"></uv-avatar><text class="web-text-placeholder">更换头像</text></button><uni-card wx:if="{{r}}" u-s="{{['d']}}" u-i="1f448c34-1" bind:__l="__l" u-p="{{r}}"><view class="order-body web-cell-align-top"><uv-form wx:if="{{q}}" class="r" u-s="{{['d']}}" u-r="form" u-i="1f448c34-2,1f448c34-1" bind:__l="__l" u-p="{{q}}"><uv-form-item wx:if="{{g}}" u-s="{{['d']}}" u-i="1f448c34-3,1f448c34-2" bind:__l="__l" u-p="{{g}}"><uv-cell wx:if="{{f}}" u-s="{{['value']}}" u-i="1f448c34-4,1f448c34-3" bind:__l="__l" u-p="{{f}}"><uv-input u-i="1f448c34-5,1f448c34-4" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}" slot="value"></uv-input></uv-cell></uv-form-item><uv-form-item wx:if="{{k}}" u-s="{{['d']}}" u-i="1f448c34-6,1f448c34-2" bind:__l="__l" u-p="{{k}}"><uv-cell wx:if="{{j}}" u-s="{{['value']}}" u-i="1f448c34-7,1f448c34-6" bind:__l="__l" u-p="{{j}}"><uv-input u-i="1f448c34-8,1f448c34-7" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}" slot="value"></uv-input></uv-cell></uv-form-item><uv-form-item wx:if="{{o}}" u-s="{{['d']}}" u-i="1f448c34-9,1f448c34-2" bind:__l="__l" u-p="{{o}}"><uv-cell wx:if="{{n}}" u-s="{{['value']}}" u-i="1f448c34-10,1f448c34-9" bind:__l="__l" u-p="{{n}}"><uv-input u-i="1f448c34-11,1f448c34-10" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}" slot="value"></uv-input></uv-cell></uv-form-item></uv-form></view></uni-card><view class="btn-bar"><uv-button wx:if="{{t}}" class="save-user-profile" bindclick="{{s}}" u-i="1f448c34-12" bind:__l="__l" u-p="{{t}}"></uv-button></view><ws-login wx:if="{{x}}" class="r" u-r="login" binddone="{{w}}" u-i="1f448c34-13" bind:__l="__l" u-p="{{x}}"/></view>
+62
View File
@@ -0,0 +1,62 @@
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;
}
.btn-bar {
width: 700rpx;
margin: auto;
clear: both;
}
.btn {
background: none;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 20rpx 0;
}
.btn::after {
border: none;
}
+76
View File
@@ -0,0 +1,76 @@
"use strict";
const store_modules_user = require("../../store/modules/user.js");
const common_vendor = require("../../common/vendor.js");
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
isLogin: false,
userInfo: {}
};
},
onLoad() {
this.reload();
},
methods: {
async reload(e) {
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
this.isLogin = true;
this.userInfo = userInfo;
} else {
this.isLogin = false;
this.userInfo = {};
}
}
}
};
if (!Array) {
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_uni_col2 = common_vendor.resolveComponent("uni-col");
const _easycom_uni_row2 = common_vendor.resolveComponent("uni-row");
(_easycom_uni_card2 + _easycom_uni_icons2 + _easycom_uni_col2 + _easycom_uni_row2)();
}
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_uni_col = () => "../../uni_modules/uni-row/components/uni-col/uni-col.js";
const _easycom_uni_row = () => "../../uni_modules/uni-row/components/uni-row/uni-row.js";
if (!Math) {
(_easycom_uni_card + _easycom_uni_icons + _easycom_uni_col + _easycom_uni_row)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
border: false
}),
b: common_vendor.t($data.userInfo.nickname),
c: common_vendor.p({
type: "scan",
size: 30
}),
d: common_vendor.p({
span: 8
}),
e: common_vendor.p({
type: "color",
size: 30
}),
f: common_vendor.p({
span: 8
}),
g: common_vendor.p({
["custom-prefix"]: "iconfont",
type: "icon-xiazai",
size: 30
}),
h: common_vendor.p({
span: 8
}),
i: common_vendor.p({
width: _ctx.nvueWidth
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-87db41a0"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/qrcode.vue"]]);
wx.createPage(MiniProgramPage);
+10
View File
@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "我的二维码名片",
"enablePullDownRefresh": false,
"usingComponents": {
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"uni-col": "../../uni_modules/uni-row/components/uni-col/uni-col",
"uni-row": "../../uni_modules/uni-row/components/uni-row/uni-row"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page data-v-87db41a0"><uni-card wx:if="{{a}}" u-s="{{['d']}}" class="qrcode data-v-87db41a0" u-i="87db41a0-0" bind:__l="__l" u-p="{{a}}"><image class="data-v-87db41a0" src="https://file.jimeigroup.cn/reg-code3/QYPEwCcU.png" mode="widthFix"></image></uni-card><view class="user-info data-v-87db41a0"><view class="nickname data-v-87db41a0">{{b}}</view><view class="desc data-v-87db41a0">APP扫一扫,立即关注我</view></view><uni-row wx:if="{{i}}" u-s="{{['d']}}" class="qrcode-row data-v-87db41a0" u-i="87db41a0-1" bind:__l="__l" u-p="{{i}}"><uni-col wx:if="{{d}}" class="data-v-87db41a0" u-s="{{['d']}}" u-i="87db41a0-2,87db41a0-1" bind:__l="__l" u-p="{{d}}"><view class="qrcode-row-col dark data-v-87db41a0"><view class="icon data-v-87db41a0"><uni-icons wx:if="{{c}}" class="data-v-87db41a0" u-i="87db41a0-3,87db41a0-2" bind:__l="__l" u-p="{{c}}"></uni-icons></view><text class="data-v-87db41a0">扫一扫</text></view></uni-col><uni-col wx:if="{{f}}" class="data-v-87db41a0" u-s="{{['d']}}" u-i="87db41a0-4,87db41a0-1" bind:__l="__l" u-p="{{f}}"><view class="qrcode-row-col dark data-v-87db41a0"><view class="icon data-v-87db41a0"><uni-icons wx:if="{{e}}" class="data-v-87db41a0" u-i="87db41a0-5,87db41a0-4" bind:__l="__l" u-p="{{e}}"></uni-icons></view><text class="data-v-87db41a0">换个样式</text></view></uni-col><uni-col wx:if="{{h}}" class="data-v-87db41a0" u-s="{{['d']}}" u-i="87db41a0-6,87db41a0-1" bind:__l="__l" u-p="{{h}}"><view class="qrcode-row-col dark data-v-87db41a0"><view class="icon data-v-87db41a0"><uni-icons wx:if="{{g}}" class="data-v-87db41a0" u-i="87db41a0-7,87db41a0-6" bind:__l="__l" u-p="{{g}}"></uni-icons></view><text class="data-v-87db41a0">保存</text></view></uni-col></uni-row></view>
+68
View File
@@ -0,0 +1,68 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.page.data-v-87db41a0 {
height: 90vh;
display: flex;
flex-direction: column;
justify-content: center;
}
.qrcode.data-v-87db41a0 {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}
.user-info.data-v-87db41a0 {
display: flex;
flex-direction: column;
align-items: center;
}
.user-info .nickname.data-v-87db41a0 {
font-size: 48rpx;
padding: 12rpx 0;
}
.user-info .desc.data-v-87db41a0 {
color: #808080;
}
.qrcode-row-col.data-v-87db41a0 {
margin: 100rpx auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.qrcode-row-col text.data-v-87db41a0 {
line-height: 2rem;
}
.qrcode-row-col .icon.data-v-87db41a0 {
width: 120rpx;
height: 120rpx;
border-radius: 120rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
}