添加新文件

This commit is contained in:
hejiangming
2025-05-07 10:09:55 +08:00
parent 007b002b81
commit 7e7a096151
776 changed files with 92603 additions and 0 deletions
+167
View File
@@ -0,0 +1,167 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const api_common = require("../api/common.js");
const utils_enumUtils = require("../utils/enumUtils.js");
const utils_config = require("../utils/config.js");
const utils_auth = require("../utils/auth.js");
const _sfc_main = {
name: "common_card",
data() {
return {
uploadTemplList: [
{
id: 1,
title: "标准",
isOk: true,
url: "/static/common/ID_ok.png"
},
{
id: 2,
title: "边框缺失",
isOk: false,
url: "/static/common/ID_error_1.png"
},
{
id: 3,
title: "照片模糊",
isOk: false,
url: "/static/common/ID_error_2.png"
},
{
id: 4,
title: "闪光强烈",
isOk: false,
url: "/static/common/ID_error_3.png"
}
],
fileListZ: {},
// 身份正面照
fileListF: {}
// 身份反面照片
};
},
methods: {
deletePic(event) {
this.fileListZ.splice(event.index, 1);
},
phoneFun(type) {
let that = this;
common_vendor.index.chooseMedia({
count: 1,
// 默认为1,摄像头拍照为1,录像为10,录音为1
mediaType: ["image"],
// 可以指定是摄像头还是录像,这里两者都支持
sourceType: ["camera"],
// 可以指定来源是相册还是相机,这里只选相机
camera: "back",
// 可以指定使用前置还是后置摄像头,默认后置
success: (imgRes) => {
const filePath = imgRes.tempFiles[0].tempFilePath;
that.uploadFile(filePath, type);
},
fail: (err) => {
common_vendor.index.__f__("error", "at components/common_card.vue:87", err);
}
});
},
uploadFile(url, type) {
common_vendor.index.showLoading({
title: "图片上传中..."
});
const that = this;
const token = utils_auth.getStorageFun(utils_auth.TOKEN_NAME);
common_vendor.index.uploadFile({
url: utils_config.BASE_URL + api_common.uploadImg,
// 替换为你的上传接口URL
filePath: url,
name: "file",
formData: {
"type": utils_enumUtils.IMG_TYPE.COMMON
},
header: {
"Authorization": utils_config.Authorization,
"HSM-AUTH": token ? token : ""
},
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data);
if (data.bizcode === 100) {
if (type === "Z") {
that.fileListZ = data.data;
this.$emit("valueFunc", "Z", data.data.dbUrl);
} else if (type === "F") {
that.fileListF = data.data;
this.$emit("valueFunc", "F", data.data.dbUrl);
}
} else {
common_vendor.index.showToast({
title: "图片上传失败",
icon: "none",
mask: true,
duration: 3e3
});
}
},
fail: (uploadFileErr) => {
common_vendor.index.showToast({
title: "图片上传失败",
icon: "none",
mask: true,
duration: 3e3
});
},
complete: (res) => {
common_vendor.index.hideLoading();
}
});
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
_easycom_up_image2();
}
const _easycom_up_image = () => "../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
src: $data.fileListZ && Object.keys($data.fileListZ).length !== 0 ? $data.fileListZ.accessUrl : "/static/common/ID_rx.png",
width: "100%",
height: "90",
bgColor: "#f1f6ff00"
}),
b: common_vendor.o(($event) => $options.phoneFun("Z")),
c: common_vendor.p({
src: $data.fileListF && Object.keys($data.fileListF).length !== 0 ? $data.fileListF.accessUrl : "/static/common/ID_gq.png",
width: "100%",
height: "90",
bgColor: "#f1f6ff00"
}),
d: common_vendor.o(($event) => $options.phoneFun("F")),
e: common_vendor.f($data.uploadTemplList, (item, k0, i0) => {
return {
a: "7acb6ad4-2-" + i0,
b: common_vendor.p({
src: item.url,
width: "100%",
height: "50",
bgColor: "#f1f6ff00"
}),
c: "7acb6ad4-3-" + i0,
d: common_vendor.p({
src: item.isOk ? "/static/common/ID_ok_1.png" : "/static/common/ID_error.png",
width: "10",
height: "10",
bgColor: "#f1f6ff00"
}),
e: common_vendor.t(item.title),
f: item.id
};
})
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/common_card.js.map
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"up-image": "../uni_modules/uview-plus/components/u-image/u-image"
}
}
@@ -0,0 +1 @@
<view class="data_common_warp"><view class="ID_card_title">上传证件照</view><view class="ID_card_msg">(请务必上传本人证件照,生活照、艺术照将会被驳回)</view><view class="ID_card_upload"><view class="upload_item" bindtap="{{b}}"><up-image wx:if="{{a}}" u-i="7acb6ad4-0" bind:__l="__l" u-p="{{a}}"></up-image><view class="upload_msg">点击上传身份证人像面</view></view><view class="upload_item" bindtap="{{d}}"><up-image wx:if="{{c}}" u-i="7acb6ad4-1" bind:__l="__l" u-p="{{c}}"></up-image><view class="upload_msg">点击上传身份国旗面</view></view></view><view class="ID_card_upload_templ"><view class="templ_title">上传标准</view><view class="templ_img_list"><view wx:for="{{e}}" wx:for-item="item" wx:key="f" class="templ_img_item"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="templ_img_item_msg"><up-image wx:if="{{item.d}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></up-image><view class="templ_img_item_msg_title">{{item.e}}</view></view></view></view></view></view>
@@ -0,0 +1,70 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const _sfc_main = {
name: "custom-tab-bar",
props: {
tabIndex: {
//当前选中的tab项
type: Number,
default: 0
}
},
data() {
return {
tabs: [
{
"pagePath": "/pages/home/home",
"text": "首页",
"iconPath": "/static/column/home.png",
"selectedIconPath": "/static/column/home_sel.png"
},
{
"pagePath": "/pages/sort/sort",
"text": "分类",
"iconPath": "/static/column/sort.png",
"selectedIconPath": "/static/column/sort_sel.png"
},
// {
// "pagePath": "/pages/hash_union/hash_union",
// "text": "哈希联盟",
// "iconPath": "/static/column/hx.png",
// "selectedIconPath": "/static/column/hx_sel.png"
// },
{
"pagePath": "/pages/shopping_cart/shopping_cart",
"text": "购物车",
"iconPath": "/static/column/shopping.png",
"selectedIconPath": "/static/column/shopping_sel.png"
},
{
"pagePath": "/pages/mine/mine",
"text": "我的",
"iconPath": "/static/column/mine.png",
"selectedIconPath": "/static/column/mine_sel.png"
}
]
};
},
methods: {
switchTab(index) {
const pagePath = this.tabs[index].pagePath;
common_vendor.index.switchTab({ url: pagePath });
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.tabs, (item, index, i0) => {
return {
a: $props.tabIndex === index ? item.selectedIconPath : item.iconPath,
b: common_vendor.t(item.text),
c: common_vendor.n($props.tabIndex === index ? "tab-text tab-text-sel" : "tab-text"),
d: index,
e: common_vendor.o(($event) => $options.switchTab(index), index)
};
})
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8fac706f"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/custom-tab-bar.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="custom-tab-bar data-v-8fac706f"><view wx:for="{{a}}" wx:for-item="item" wx:key="d" class="tab-item data-v-8fac706f" bindtap="{{item.e}}"><image src="{{item.a}}" class="tab-icon data-v-8fac706f"></image><text class="{{['data-v-8fac706f', item.c]}}">{{item.b}}</text></view></view>
@@ -0,0 +1,54 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/* uni.scss */
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
.custom-tab-bar.data-v-8fac706f {
position: fixed;
display: flex;
justify-content: space-around;
align-items: center;
height: 140rpx;
/* 根据需要调整 */
background-color: #fff;
/* 背景颜色 */
bottom: 0;
width: 100%;
}
.tab-item.data-v-8fac706f {
display: flex;
flex-direction: column;
align-items: center;
}
.tab-icon.data-v-8fac706f {
width: 24px;
/* 图标大小 */
height: 24px;
/* 图标大小 */
}
.tab-text.data-v-8fac706f {
font-size: 12px;
/* 文字大小 */
}
.tab-text-sel.data-v-8fac706f {
color: #FF7C41;
}
+94
View File
@@ -0,0 +1,94 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const _sfc_main = {
name: "header",
props: {
leftTitle: {
type: String,
default: null
},
leftPath: {
type: String,
default: null
},
leftPathType: {
type: String,
default: "navigateTo"
},
rightTitle: {
type: String,
default: null
},
rightPath: {
type: String,
default: null
},
rightPathType: {
type: String,
default: "navigateTo"
}
},
data() {
return {};
},
methods: {
leftJump() {
const leftPath = this.leftPath;
if (!leftPath) {
return;
}
const leftPathType = this.leftPathType;
if (leftPathType === "navigateTo") {
common_vendor.index.navigateTo({
url: leftPath
});
} else if (leftPathType === "switchTab") {
common_vendor.index.switchTab({
url: leftPath
});
}
},
rightJump() {
const rightPath = this.rightPath;
if (!rightPath) {
return;
}
const rightPathType = this.rightPathType;
if (rightPathType === "navigateTo") {
common_vendor.index.navigateTo({
url: rightPath
});
} else if (rightPathType === "switchTab") {
common_vendor.index.switchTab({
url: rightPath
});
}
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
_easycom_up_image2();
}
const _easycom_up_image = () => "../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(_ctx.jumpMine),
b: common_vendor.p({
src: "/static/common/left.png",
width: "18",
height: "20",
bgColor: "#f1f6ff00"
}),
c: common_vendor.o((...args) => $options.leftJump && $options.leftJump(...args)),
d: common_vendor.t($props.leftTitle),
e: common_vendor.t($props.rightTitle),
f: common_vendor.o((...args) => $options.rightJump && $options.rightJump(...args))
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5be51a94"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/header.js.map
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"up-image": "../uni_modules/uview-plus/components/u-image/u-image"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="header_ data-v-5be51a94"><view class="data-v-5be51a94" style="margin-top:10rpx" bindtap="{{c}}"><up-image wx:if="{{b}}" class="data-v-5be51a94" bindclick="{{a}}" u-i="5be51a94-0" bind:__l="__l" u-p="{{b}}"/></view><view class="title_ data-v-5be51a94">{{d}}</view><view class="data-v-5be51a94" bindtap="{{f}}">{{e}}</view></view>
+35
View File
@@ -0,0 +1,35 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/* uni.scss */
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
.header_.data-v-5be51a94 {
display: flex;
align-items: center;
justify-content: space-between;
padding: 74rpx 20rpx 20rpx;
}
.header_ .title_.data-v-5be51a94 {
font-size: 36rpx;
color: #000000;
margin-left: 20rpx;
}
@@ -0,0 +1,150 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const api_raffle = require("../api/raffle.js");
const utils_index = require("../utils/index.js");
const utils_enumUtils = require("../utils/enumUtils.js");
const _sfc_main = {
name: "winning_record",
props: {
heightRef: {
//当前选中的tab项
type: Number,
default: "calc(100vh - 100rpx)"
}
},
computed: {
DELIVER_STATUS() {
return utils_enumUtils.DELIVER_STATUS;
},
DELIVER_STATUS_() {
return utils_enumUtils.DELIVER_STATUS_;
}
},
data() {
return {
prizeDrawList: [],
// 抽奖列表
form: {
status: "",
page: 1,
pageSize: 20
},
loading: false
// 加载状态标志
};
},
mounted() {
this.loadData();
},
methods: {
formatDate: utils_index.formatDate,
copyData: utils_index.copyData,
getValue: utils_enumUtils.getValue,
jumpGetFun(item) {
common_vendor.index.navigateTo({
url: "/pages/get_prize/get_prize?id=" + item.id
});
},
// 加载数据的方法
async loadData() {
if (this.loading)
return;
this.loading = true;
try {
const newData = await this.fetchData(this.form.page, this.form.pageSize);
if (newData.entitys && newData.entitys.length !== 0) {
this.prizeDrawList = [...this.prizeDrawList, ...newData.entitys];
this.form.page++;
}
} catch (error) {
common_vendor.index.__f__("error", "at components/winning_record.vue:93", "加载数据失败:", error);
} finally {
this.loading = false;
}
},
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
async fetchData(page, pageSize) {
const params = {
page,
pageSize
};
const data = await api_raffle.getWinningList(params);
if (data && data.bizcode === 100) {
return data.data;
} else {
return [];
}
},
// 当滚动到底部时触发的方法
loadMore() {
this.loadData();
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
_easycom_up_image2();
}
const _easycom_up_image = () => "../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.prizeDrawList && $data.prizeDrawList.length !== 0
}, $data.prizeDrawList && $data.prizeDrawList.length !== 0 ? {
b: common_vendor.f($data.prizeDrawList, (item, k0, i0) => {
return common_vendor.e({
a: "2436dd54-0-" + i0,
b: common_vendor.p({
src: item.iconUrl ? item.iconUrl : "/static/mine/zj_f.jpg",
width: "60",
height: "60",
bgColor: "#f1f6ff00"
}),
c: common_vendor.t(item.prizeName),
d: common_vendor.t($options.formatDate(item.ctdate)),
e: [$options.DELIVER_STATUS.AWAIT_DELIVERY_REQUIRED, $options.DELIVER_STATUS.YES_DELIVERY_REQUIRED, $options.DELIVER_STATUS.RECEIVED].includes(item.deliveryStatus)
}, [$options.DELIVER_STATUS.AWAIT_DELIVERY_REQUIRED, $options.DELIVER_STATUS.YES_DELIVERY_REQUIRED, $options.DELIVER_STATUS.RECEIVED].includes(item.deliveryStatus) ? common_vendor.e({
f: common_vendor.t($options.getValue($options.DELIVER_STATUS_, item.deliveryStatus)),
g: item.deliveryNum
}, item.deliveryNum ? {
h: common_vendor.t(item.deliveryNum),
i: common_vendor.o(($event) => $options.copyData(item.deliveryNum), item.id),
j: "2436dd54-1-" + i0,
k: common_vendor.p({
src: "/static/common/copy.png",
width: "10",
height: "10",
bgColor: "#f1f6ff00"
})
} : {}) : {}, {
l: item.type === 4
}, item.type === 4 ? {
m: item.status === 1,
n: common_vendor.o(($event) => $options.jumpGetFun(item), item.id)
} : {}, {
o: item.type === 4
}, item.type === 4 ? {
p: item.status === 2
} : {}, {
q: item.id
});
})
} : {
c: common_vendor.p({
src: "/static/common/not_order.png",
width: "80",
height: "80",
bgColor: "#f1f6ff00"
})
}, {
d: $data.loading
}, $data.loading ? {} : {}, {
e: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args)),
f: $props.heightRef
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2436dd54"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/winning_record.js.map
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"up-image": "../uni_modules/uview-plus/components/u-image/u-image"
}
}
@@ -0,0 +1 @@
<scroll-view class="data-v-2436dd54" scroll-y="true" bindscrolltolower="{{e}}" style="{{'height:' + f}}"><block wx:if="{{a}}"><view wx:for="{{b}}" wx:for-item="item" wx:key="q" class="prize_draw_item data-v-2436dd54"><view class="prize_draw_left_warp data-v-2436dd54"><up-image wx:if="{{item.b}}" class="data-v-2436dd54" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="data-v-2436dd54" style="margin-left:20rpx"><view class="title_ data-v-2436dd54">{{item.c}}</view><view class="time_ data-v-2436dd54">{{item.d}}</view><view wx:if="{{item.e}}" class="delivery_ data-v-2436dd54"><view class="delivery_status data-v-2436dd54">{{item.f}}</view><view wx:if="{{item.g}}" class="delivery_num data-v-2436dd54"><text class="data-v-2436dd54" style="margin-right:10rpx">运单号:{{item.h}}</text><up-image wx:if="{{item.k}}" class="data-v-2436dd54" bindclick="{{item.i}}" u-i="{{item.j}}" bind:__l="__l" u-p="{{item.k}}"></up-image></view><view wx:else class="delivery_num data-v-2436dd54">运单号:暂无</view></view></view></view><view wx:if="{{item.l}}" class="prize_draw_right_warp data-v-2436dd54" hidden="{{!item.m}}" bindtap="{{item.n}}">去领取</view><view wx:if="{{item.o}}" class="prize_draw_right_warp yes_ data-v-2436dd54" hidden="{{!item.p}}">已领取</view></view></block><view wx:else class="not_order_warp data-v-2436dd54"><up-image wx:if="{{c}}" class="data-v-2436dd54" u-i="2436dd54-2" bind:__l="__l" u-p="{{c}}"></up-image><view class="not_order_msg_warp data-v-2436dd54">还未中奖哦~</view></view><view wx:if="{{d}}" class="data-v-2436dd54" style="text-align:center">加载中...</view></scroll-view>
@@ -0,0 +1,74 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/* uni.scss */
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
.prize_draw_item.data-v-2436dd54 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #EEEEEE;
}
.prize_draw_left_warp.data-v-2436dd54 {
display: flex;
align-items: center;
}
.title_.data-v-2436dd54 {
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
.time_.data-v-2436dd54 {
font-size: 24rpx;
color: #666666;
margin-top: 10rpx;
}
.delivery_.data-v-2436dd54 {
display: flex;
align-items: center;
font-size: 20rpx;
margin-top: 10rpx;
}
.delivery_ .delivery_status.data-v-2436dd54 {
padding: 6rpx 10rpx;
border-radius: 10rpx;
color: #FF7C41;
border: 1rpx solid #FF7C41;
}
.delivery_ .delivery_num.data-v-2436dd54 {
margin-left: 10rpx;
display: flex;
align-items: center;
}
.prize_draw_right_warp.data-v-2436dd54 {
background: #FF7C41;
border-radius: 10rpx;
text-align: center;
color: #FFFFFF;
padding: 10rpx 28rpx;
height: 48rpx;
}
.yes_.data-v-2436dd54 {
background: #F5F5F5;
color: #666666;
}