提交代码

This commit is contained in:
zpc 2025-08-04 14:34:23 +08:00
parent 362948739b
commit c32212014d
12 changed files with 102 additions and 53 deletions

View File

@ -184,7 +184,7 @@
header['content-type'] = 'application/json'; header['content-type'] = 'application/json';
} }
uni.request({ uni.request({
url: "http://localhost:8888/" + url, url: "https://gift.zpc-xy.com/" + url,
method: method, method: method,
data: data, data: data,
header: header, header: header,
@ -251,7 +251,20 @@
closeReceivePop() { closeReceivePop() {
this.$refs.receivePop.close(); this.$refs.receivePop.close();
}, },
getUserId() {
if (this.userId == 0) {
var userId = uni.getStorageSync("user_id");
if (!userId || userId == 0) {
this.login();
} else {
this.userId = userId;
}
}
return this.userId;
},
async openRecordPop() { async openRecordPop() {
await this.loadRecordList(); await this.loadRecordList();
this.$refs.recordPop.open(); this.$refs.recordPop.open();
@ -263,11 +276,19 @@
title: '加载中...' title: '加载中...'
}); });
// API // API
const result = await this.request('getRecord?userId=' + this.userId, 'GET', {}); const result = await this.request('getRecord?userId=' + this.getUserId(), 'GET', {});
console.log(result); console.log(result);
this.recordList = result.data; if (result.data.length > 0) {
let isShow = true;
let record = [];
for (var index = 0; index < result.data.length; index++) {
var element = result.data[index];
if (element.status == 1) {
record.push(element)
}
}
this.recordList = record;
}
// 使 // 使
console.log('加载领取记录...'); console.log('加载领取记录...');
} catch (error) { } catch (error) {
@ -393,6 +414,7 @@
// API // API
const result = await this.request('addRecord', 'POST', formData); const result = await this.request('addRecord', 'POST', formData);
console.log(result); console.log(result);
uni.hideLoading();
if (result.code == 200) { if (result.code == 200) {
uni.showToast({ uni.showToast({
title: '提交成功,请等待审核', title: '提交成功,请等待审核',
@ -407,7 +429,7 @@
}); });
} }
uni.hideLoading();
} catch (error) { } catch (error) {
uni.hideLoading(); uni.hideLoading();

View File

@ -1 +1 @@
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\texport default {\r\n\t\tonLaunch: function() {\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t/*每个页面公共css */\r\n\t.column {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: column;\r\n\t}\r\n\r\n\t.row {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row;\r\n\t}\r\n\t\r\n\t.row-reverse {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row-reverse;\r\n\t}\r\n\r\n\t.center {\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tjustify-content: center;\r\n\t}\r\n</style>","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACIM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"} {"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\texport default {\r\n\t\tonLaunch: function() {\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t/*每个页面公共css */\r\n\t.column {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: column;\r\n\t}\r\n\r\n\t.row {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row;\r\n\t}\r\n\t\r\n\t.row-reverse {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row-reverse;\r\n\t}\r\n\r\n\t.center {\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tjustify-content: center;\r\n\t}\r\n</style>","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACIM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2671,11 +2671,15 @@ const getPublicInstance = (i) => {
return getExposeProxy(i) || i.proxy; return getExposeProxy(i) || i.proxy;
return getPublicInstance(i.parent); return getPublicInstance(i.parent);
}; };
function getComponentInternalInstance(i) {
return i;
}
const publicPropertiesMap = ( const publicPropertiesMap = (
// Move PURE marker to new line to workaround compiler discarding it // Move PURE marker to new line to workaround compiler discarding it
// due to type annotation // due to type annotation
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
$: (i) => i, // fixed by xxxxxx
$: getComponentInternalInstance,
// fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el故模拟一个假的 // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el故模拟一个假的
// $el: i => i.vnode.el, // $el: i => i.vnode.el,
$el: (i) => i.__$el || (i.__$el = {}), $el: (i) => i.__$el || (i.__$el = {}),
@ -4546,6 +4550,7 @@ function warnRef(ref2) {
const queuePostRenderEffect = queuePostFlushCb; const queuePostRenderEffect = queuePostFlushCb;
function mountComponent(initialVNode, options) { function mountComponent(initialVNode, options) {
const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null); const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null);
instance.renderer = options.mpType ? options.mpType : "component";
{ {
instance.ctx.$onApplyOptions = onApplyOptions; instance.ctx.$onApplyOptions = onApplyOptions;
instance.ctx.$children = []; instance.ctx.$children = [];
@ -4884,7 +4889,8 @@ function injectLifecycleHook(name, hook, publicThis, instance) {
} }
function initHooks$1(options, instance, publicThis) { function initHooks$1(options, instance, publicThis) {
const mpType = options.mpType || publicThis.$mpType; const mpType = options.mpType || publicThis.$mpType;
if (!mpType || mpType === "component") { if (!mpType || mpType === "component" || // instance.renderer 标识页面是否作为组件渲染
mpType === "page" && instance.renderer === "component") {
return; return;
} }
Object.keys(options).forEach((name) => { Object.keys(options).forEach((name) => {
@ -5540,10 +5546,10 @@ function handlePromise(promise) {
function promisify$1(name, fn) { function promisify$1(name, fn) {
return (args = {}, ...rest) => { return (args = {}, ...rest) => {
if (hasCallback(args)) { if (hasCallback(args)) {
return wrapperReturnValue(name, invokeApi(name, fn, args, rest)); return wrapperReturnValue(name, invokeApi(name, fn, extend({}, args), rest));
} }
return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => { return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest); invokeApi(name, fn, extend({}, args, { success: resolve2, fail: reject }), rest);
}))); })));
}; };
} }
@ -5940,7 +5946,7 @@ function promisify(name, api) {
} }
return function promiseApi(options = {}, ...rest) { return function promiseApi(options = {}, ...rest) {
if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) { if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
return wrapperReturnValue(name, invokeApi(name, api, options, rest)); return wrapperReturnValue(name, invokeApi(name, api, extend({}, options), rest));
} }
return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => { return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
invokeApi(name, api, extend({}, options, { invokeApi(name, api, extend({}, options, {
@ -6107,7 +6113,7 @@ function getOSInfo(system, platform) {
osName = system.split(" ")[0] || platform; osName = system.split(" ")[0] || platform;
osVersion = system.split(" ")[1] || ""; osVersion = system.split(" ")[1] || "";
} }
osName = osName.toLocaleLowerCase(); osName = osName.toLowerCase();
switch (osName) { switch (osName) {
case "harmony": case "harmony":
case "ohos": case "ohos":
@ -6147,9 +6153,9 @@ function populateParameters(fromRes, toRes) {
appVersion: "1.0.0", appVersion: "1.0.0",
appVersionCode: "100", appVersionCode: "100",
appLanguage: getAppLanguage(hostLanguage), appLanguage: getAppLanguage(hostLanguage),
uniCompileVersion: "4.65", uniCompileVersion: "4.75",
uniCompilerVersion: "4.65", uniCompilerVersion: "4.75",
uniRuntimeVersion: "4.65", uniRuntimeVersion: "4.75",
uniPlatform: "mp-weixin", uniPlatform: "mp-weixin",
deviceBrand, deviceBrand,
deviceModel: model, deviceModel: model,
@ -6186,7 +6192,7 @@ function getGetDeviceType(fromRes, model) {
mac: "pc" mac: "pc"
}; };
const deviceTypeMapsKeys = Object.keys(deviceTypeMaps); const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
const _model = model.toLocaleLowerCase(); const _model = model.toLowerCase();
for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) { for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) {
const _m = deviceTypeMapsKeys[index2]; const _m = deviceTypeMapsKeys[index2];
if (_model.indexOf(_m) !== -1) { if (_model.indexOf(_m) !== -1) {
@ -6200,7 +6206,7 @@ function getGetDeviceType(fromRes, model) {
function getDeviceBrand(brand) { function getDeviceBrand(brand) {
let deviceBrand = brand; let deviceBrand = brand;
if (deviceBrand) { if (deviceBrand) {
deviceBrand = deviceBrand.toLocaleLowerCase(); deviceBrand = deviceBrand.toLowerCase();
} }
return deviceBrand; return deviceBrand;
} }
@ -6298,9 +6304,9 @@ const getAppBaseInfo = {
appLanguage: getAppLanguage(hostLanguage), appLanguage: getAppLanguage(hostLanguage),
isUniAppX: false, isUniAppX: false,
uniPlatform: "mp-weixin", uniPlatform: "mp-weixin",
uniCompileVersion: "4.65", uniCompileVersion: "4.75",
uniCompilerVersion: "4.65", uniCompilerVersion: "4.75",
uniRuntimeVersion: "4.65" uniRuntimeVersion: "4.75"
}; };
extend(toRes, parameters); extend(toRes, parameters);
} }
@ -6973,6 +6979,7 @@ const atFileRegex = /^\s*at\s+[\w/./-]+:\d+$/;
function rewriteConsole() { function rewriteConsole() {
function wrapConsole(type) { function wrapConsole(type) {
return function(...args) { return function(...args) {
{
const originalArgs = [...args]; const originalArgs = [...args];
if (originalArgs.length) { if (originalArgs.length) {
const maybeAtFile = originalArgs[originalArgs.length - 1]; const maybeAtFile = originalArgs[originalArgs.length - 1];
@ -6980,7 +6987,6 @@ function rewriteConsole() {
originalArgs.pop(); originalArgs.pop();
} }
} }
{
originalConsole[type](...originalArgs); originalConsole[type](...originalArgs);
} }
if (type === "error" && args.length === 1) { if (type === "error" && args.length === 1) {
@ -7040,9 +7046,9 @@ function isConsoleWritable() {
return isWritable; return isWritable;
} }
function initRuntimeSocketService() { function initRuntimeSocketService() {
const hosts = "172.23.128.1,192.168.1.7,192.168.195.32,127.0.0.1"; const hosts = "28.0.0.1,192.168.1.21,192.168.195.35,127.0.0.1";
const port = "8090"; const port = "8090";
const id = "mp-weixin_r5vw4B"; const id = "mp-weixin_Tvd9Dq";
const lazy = typeof swan !== "undefined"; const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => { let restoreError = lazy ? () => {
} : initOnError(); } : initOnError();

View File

@ -39,7 +39,7 @@ const _sfc_main = {
header["content-type"] = "application/json"; header["content-type"] = "application/json";
} }
common_vendor.index.request({ common_vendor.index.request({
url: "http://localhost:8888/" + url, url: "https://gift.zpc-xy.com/" + url,
method, method,
data, data,
header, header,
@ -104,6 +104,17 @@ const _sfc_main = {
closeReceivePop() { closeReceivePop() {
this.$refs.receivePop.close(); this.$refs.receivePop.close();
}, },
getUserId() {
if (this.userId == 0) {
var userId = common_vendor.index.getStorageSync("user_id");
if (!userId || userId == 0) {
this.login();
} else {
this.userId = userId;
}
}
return this.userId;
},
async openRecordPop() { async openRecordPop() {
await this.loadRecordList(); await this.loadRecordList();
this.$refs.recordPop.open(); this.$refs.recordPop.open();
@ -113,12 +124,22 @@ const _sfc_main = {
common_vendor.index.showLoading({ common_vendor.index.showLoading({
title: "加载中..." title: "加载中..."
}); });
const result = await this.request("getRecord?userId=" + this.userId, "GET", {}); const result = await this.request("getRecord?userId=" + this.getUserId(), "GET", {});
common_vendor.index.__f__("log", "at pages/index/index.vue:267", result); common_vendor.index.__f__("log", "at pages/index/index.vue:280", result);
this.recordList = result.data; if (result.data.length > 0) {
common_vendor.index.__f__("log", "at pages/index/index.vue:272", "加载领取记录..."); let isShow = true;
let record = [];
for (var index = 0; index < result.data.length; index++) {
var element = result.data[index];
if (element.status == 1) {
record.push(element);
}
}
this.recordList = record;
}
common_vendor.index.__f__("log", "at pages/index/index.vue:293", "加载领取记录...");
} catch (error) { } catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:274", "加载领取记录失败:", error); common_vendor.index.__f__("error", "at pages/index/index.vue:295", "加载领取记录失败:", error);
} }
common_vendor.index.hideLoading(); common_vendor.index.hideLoading();
}, },
@ -134,14 +155,14 @@ const _sfc_main = {
base64, base64,
path path
} = await common_utils.processImage(); } = await common_utils.processImage();
common_vendor.index.__f__("log", "at pages/index/index.vue:293", "最终Base64长度:", base64.length, path); common_vendor.index.__f__("log", "at pages/index/index.vue:314", "最终Base64长度:", base64.length, path);
this.imagePath = path; this.imagePath = path;
this.base64 = base64; this.base64 = base64;
common_vendor.index.showToast({ common_vendor.index.showToast({
title: "上传成功" title: "上传成功"
}); });
} catch (err) { } catch (err) {
common_vendor.index.__f__("error", "at pages/index/index.vue:300", "处理失败", err); common_vendor.index.__f__("error", "at pages/index/index.vue:321", "处理失败", err);
common_vendor.index.showToast({ common_vendor.index.showToast({
title: "处理失败", title: "处理失败",
icon: "none" icon: "none"
@ -229,7 +250,8 @@ const _sfc_main = {
ProductImage: this.base64 ProductImage: this.base64
}; };
const result = await this.request("addRecord", "POST", formData); const result = await this.request("addRecord", "POST", formData);
common_vendor.index.__f__("log", "at pages/index/index.vue:395", result); common_vendor.index.__f__("log", "at pages/index/index.vue:416", result);
common_vendor.index.hideLoading();
if (result.code == 200) { if (result.code == 200) {
common_vendor.index.showToast({ common_vendor.index.showToast({
title: "提交成功,请等待审核", title: "提交成功,请等待审核",
@ -243,14 +265,13 @@ const _sfc_main = {
icon: "none" icon: "none"
}); });
} }
common_vendor.index.hideLoading();
} catch (error) { } catch (error) {
common_vendor.index.hideLoading(); common_vendor.index.hideLoading();
common_vendor.index.showToast({ common_vendor.index.showToast({
title: "提交失败,请重试", title: "提交失败,请重试",
icon: "none" icon: "none"
}); });
common_vendor.index.__f__("error", "at pages/index/index.vue:418", "提交失败:", error); common_vendor.index.__f__("error", "at pages/index/index.vue:440", "提交失败:", error);
} }
}, },
clearForm() { clearForm() {
@ -270,10 +291,10 @@ const _sfc_main = {
current: this.imagePath, current: this.imagePath,
urls: [this.imagePath], urls: [this.imagePath],
success: function(res) { success: function(res) {
common_vendor.index.__f__("log", "at pages/index/index.vue:440", "预览图片成功"); common_vendor.index.__f__("log", "at pages/index/index.vue:462", "预览图片成功");
}, },
fail: function(err) { fail: function(err) {
common_vendor.index.__f__("error", "at pages/index/index.vue:443", "预览图片失败:", err); common_vendor.index.__f__("error", "at pages/index/index.vue:465", "预览图片失败:", err);
common_vendor.index.showToast({ common_vendor.index.showToast({
title: "预览失败", title: "预览失败",
icon: "none" icon: "none"
@ -329,7 +350,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
} : {}, { } : {}, {
y: common_vendor.o((...args) => $options.closeReceivePop && $options.closeReceivePop(...args)), y: common_vendor.o((...args) => $options.closeReceivePop && $options.closeReceivePop(...args)),
z: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args)), z: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args)),
A: common_vendor.sr("receivePop", "8f702d68-1"), A: common_vendor.sr("receivePop", "6e486efd-1"),
B: common_vendor.p({ B: common_vendor.p({
type: "center", type: "center",
["is-mask-click"]: false ["is-mask-click"]: false
@ -345,7 +366,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
e: item.phone + item.time e: item.phone + item.time
}; };
}), }),
F: common_vendor.sr("recordPop", "8f702d68-2"), F: common_vendor.sr("recordPop", "6e486efd-2"),
G: common_vendor.p({ G: common_vendor.p({
type: "center" type: "center"
}) })

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<view wx:if="{{a}}" class="{{['uni-popup', k, l]}}"><view bindtouchstart="{{j}}"><uni-transition wx:if="{{b}}" key="1" bindclick="{{c}}" u-i="53c4cdbb-0" bind:__l="__l" u-p="{{d}}"/><uni-transition wx:if="{{i}}" u-s="{{['d']}}" key="2" bindclick="{{h}}" u-i="53c4cdbb-1" bind:__l="__l" u-p="{{i}}"><view style="{{e}}" class="{{['uni-popup__wrapper', f]}}" bindtap="{{g}}"><slot/></view></uni-transition></view></view> <view wx:if="{{a}}" class="{{['uni-popup', k, l]}}"><view bindtouchstart="{{j}}"><uni-transition wx:if="{{b}}" key="1" bindclick="{{c}}" u-i="15c4226a-0" bind:__l="__l" u-p="{{d}}"/><uni-transition wx:if="{{i}}" u-s="{{['d']}}" key="2" bindclick="{{h}}" u-i="15c4226a-1" bind:__l="__l" u-p="{{i}}"><view style="{{e}}" class="{{['uni-popup__wrapper', f]}}" bindtap="{{g}}"><slot/></view></uni-transition></view></view>