提交代码
This commit is contained in:
parent
362948739b
commit
c32212014d
|
|
@ -184,7 +184,7 @@
|
|||
header['content-type'] = 'application/json';
|
||||
}
|
||||
uni.request({
|
||||
url: "http://localhost:8888/" + url,
|
||||
url: "https://gift.zpc-xy.com/" + url,
|
||||
method: method,
|
||||
data: data,
|
||||
header: header,
|
||||
|
|
@ -251,7 +251,20 @@
|
|||
closeReceivePop() {
|
||||
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() {
|
||||
await this.loadRecordList();
|
||||
this.$refs.recordPop.open();
|
||||
|
|
@ -263,11 +276,19 @@
|
|||
title: '加载中...'
|
||||
});
|
||||
// 这里可以调用API获取实际的领取记录
|
||||
const result = await this.request('getRecord?userId=' + this.userId, 'GET', {});
|
||||
const result = await this.request('getRecord?userId=' + this.getUserId(), 'GET', {});
|
||||
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('加载领取记录...');
|
||||
} catch (error) {
|
||||
|
|
@ -393,6 +414,7 @@
|
|||
// 这里可以调用API提交数据
|
||||
const result = await this.request('addRecord', 'POST', formData);
|
||||
console.log(result);
|
||||
uni.hideLoading();
|
||||
if (result.code == 200) {
|
||||
uni.showToast({
|
||||
title: '提交成功,请等待审核',
|
||||
|
|
@ -407,7 +429,7 @@
|
|||
});
|
||||
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
||||
|
||||
} catch (error) {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
52
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
52
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
|
|
@ -2671,11 +2671,15 @@ const getPublicInstance = (i) => {
|
|||
return getExposeProxy(i) || i.proxy;
|
||||
return getPublicInstance(i.parent);
|
||||
};
|
||||
function getComponentInternalInstance(i) {
|
||||
return i;
|
||||
}
|
||||
const publicPropertiesMap = (
|
||||
// Move PURE marker to new line to workaround compiler discarding it
|
||||
// due to type annotation
|
||||
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
||||
$: (i) => i,
|
||||
// fixed by xxxxxx
|
||||
$: getComponentInternalInstance,
|
||||
// fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的
|
||||
// $el: i => i.vnode.el,
|
||||
$el: (i) => i.__$el || (i.__$el = {}),
|
||||
|
|
@ -4546,6 +4550,7 @@ function warnRef(ref2) {
|
|||
const queuePostRenderEffect = queuePostFlushCb;
|
||||
function mountComponent(initialVNode, options) {
|
||||
const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null);
|
||||
instance.renderer = options.mpType ? options.mpType : "component";
|
||||
{
|
||||
instance.ctx.$onApplyOptions = onApplyOptions;
|
||||
instance.ctx.$children = [];
|
||||
|
|
@ -4884,7 +4889,8 @@ function injectLifecycleHook(name, hook, publicThis, instance) {
|
|||
}
|
||||
function initHooks$1(options, instance, publicThis) {
|
||||
const mpType = options.mpType || publicThis.$mpType;
|
||||
if (!mpType || mpType === "component") {
|
||||
if (!mpType || mpType === "component" || // instance.renderer 标识页面是否作为组件渲染
|
||||
mpType === "page" && instance.renderer === "component") {
|
||||
return;
|
||||
}
|
||||
Object.keys(options).forEach((name) => {
|
||||
|
|
@ -5540,10 +5546,10 @@ function handlePromise(promise) {
|
|||
function promisify$1(name, fn) {
|
||||
return (args = {}, ...rest) => {
|
||||
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) => {
|
||||
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) {
|
||||
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) => {
|
||||
invokeApi(name, api, extend({}, options, {
|
||||
|
|
@ -6107,7 +6113,7 @@ function getOSInfo(system, platform) {
|
|||
osName = system.split(" ")[0] || platform;
|
||||
osVersion = system.split(" ")[1] || "";
|
||||
}
|
||||
osName = osName.toLocaleLowerCase();
|
||||
osName = osName.toLowerCase();
|
||||
switch (osName) {
|
||||
case "harmony":
|
||||
case "ohos":
|
||||
|
|
@ -6147,9 +6153,9 @@ function populateParameters(fromRes, toRes) {
|
|||
appVersion: "1.0.0",
|
||||
appVersionCode: "100",
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
uniCompileVersion: "4.65",
|
||||
uniCompilerVersion: "4.65",
|
||||
uniRuntimeVersion: "4.65",
|
||||
uniCompileVersion: "4.75",
|
||||
uniCompilerVersion: "4.75",
|
||||
uniRuntimeVersion: "4.75",
|
||||
uniPlatform: "mp-weixin",
|
||||
deviceBrand,
|
||||
deviceModel: model,
|
||||
|
|
@ -6186,7 +6192,7 @@ function getGetDeviceType(fromRes, model) {
|
|||
mac: "pc"
|
||||
};
|
||||
const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
|
||||
const _model = model.toLocaleLowerCase();
|
||||
const _model = model.toLowerCase();
|
||||
for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) {
|
||||
const _m = deviceTypeMapsKeys[index2];
|
||||
if (_model.indexOf(_m) !== -1) {
|
||||
|
|
@ -6200,7 +6206,7 @@ function getGetDeviceType(fromRes, model) {
|
|||
function getDeviceBrand(brand) {
|
||||
let deviceBrand = brand;
|
||||
if (deviceBrand) {
|
||||
deviceBrand = deviceBrand.toLocaleLowerCase();
|
||||
deviceBrand = deviceBrand.toLowerCase();
|
||||
}
|
||||
return deviceBrand;
|
||||
}
|
||||
|
|
@ -6298,9 +6304,9 @@ const getAppBaseInfo = {
|
|||
appLanguage: getAppLanguage(hostLanguage),
|
||||
isUniAppX: false,
|
||||
uniPlatform: "mp-weixin",
|
||||
uniCompileVersion: "4.65",
|
||||
uniCompilerVersion: "4.65",
|
||||
uniRuntimeVersion: "4.65"
|
||||
uniCompileVersion: "4.75",
|
||||
uniCompilerVersion: "4.75",
|
||||
uniRuntimeVersion: "4.75"
|
||||
};
|
||||
extend(toRes, parameters);
|
||||
}
|
||||
|
|
@ -6973,14 +6979,14 @@ const atFileRegex = /^\s*at\s+[\w/./-]+:\d+$/;
|
|||
function rewriteConsole() {
|
||||
function wrapConsole(type) {
|
||||
return function(...args) {
|
||||
const originalArgs = [...args];
|
||||
if (originalArgs.length) {
|
||||
const maybeAtFile = originalArgs[originalArgs.length - 1];
|
||||
if (typeof maybeAtFile === "string" && atFileRegex.test(maybeAtFile)) {
|
||||
originalArgs.pop();
|
||||
}
|
||||
}
|
||||
{
|
||||
const originalArgs = [...args];
|
||||
if (originalArgs.length) {
|
||||
const maybeAtFile = originalArgs[originalArgs.length - 1];
|
||||
if (typeof maybeAtFile === "string" && atFileRegex.test(maybeAtFile)) {
|
||||
originalArgs.pop();
|
||||
}
|
||||
}
|
||||
originalConsole[type](...originalArgs);
|
||||
}
|
||||
if (type === "error" && args.length === 1) {
|
||||
|
|
@ -7040,9 +7046,9 @@ function isConsoleWritable() {
|
|||
return isWritable;
|
||||
}
|
||||
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 id = "mp-weixin_r5vw4B";
|
||||
const id = "mp-weixin_Tvd9Dq";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const _sfc_main = {
|
|||
header["content-type"] = "application/json";
|
||||
}
|
||||
common_vendor.index.request({
|
||||
url: "http://localhost:8888/" + url,
|
||||
url: "https://gift.zpc-xy.com/" + url,
|
||||
method,
|
||||
data,
|
||||
header,
|
||||
|
|
@ -104,6 +104,17 @@ const _sfc_main = {
|
|||
closeReceivePop() {
|
||||
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() {
|
||||
await this.loadRecordList();
|
||||
this.$refs.recordPop.open();
|
||||
|
|
@ -113,12 +124,22 @@ const _sfc_main = {
|
|||
common_vendor.index.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
const result = await this.request("getRecord?userId=" + this.userId, "GET", {});
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:267", result);
|
||||
this.recordList = result.data;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:272", "加载领取记录...");
|
||||
const result = await this.request("getRecord?userId=" + this.getUserId(), "GET", {});
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:280", result);
|
||||
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;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:293", "加载领取记录...");
|
||||
} 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();
|
||||
},
|
||||
|
|
@ -134,14 +155,14 @@ const _sfc_main = {
|
|||
base64,
|
||||
path
|
||||
} = 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.base64 = base64;
|
||||
common_vendor.index.showToast({
|
||||
title: "上传成功"
|
||||
});
|
||||
} 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({
|
||||
title: "处理失败",
|
||||
icon: "none"
|
||||
|
|
@ -229,7 +250,8 @@ const _sfc_main = {
|
|||
ProductImage: this.base64
|
||||
};
|
||||
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) {
|
||||
common_vendor.index.showToast({
|
||||
title: "提交成功,请等待审核",
|
||||
|
|
@ -243,14 +265,13 @@ const _sfc_main = {
|
|||
icon: "none"
|
||||
});
|
||||
}
|
||||
common_vendor.index.hideLoading();
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "提交失败,请重试",
|
||||
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() {
|
||||
|
|
@ -270,10 +291,10 @@ const _sfc_main = {
|
|||
current: this.imagePath,
|
||||
urls: [this.imagePath],
|
||||
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) {
|
||||
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({
|
||||
title: "预览失败",
|
||||
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)),
|
||||
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({
|
||||
type: "center",
|
||||
["is-mask-click"]: false
|
||||
|
|
@ -345,7 +366,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
e: item.phone + item.time
|
||||
};
|
||||
}),
|
||||
F: common_vendor.sr("recordPop", "8f702d68-2"),
|
||||
F: common_vendor.sr("recordPop", "6e486efd-2"),
|
||||
G: common_vendor.p({
|
||||
type: "center"
|
||||
})
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -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>
|
||||
Loading…
Reference in New Issue
Block a user