Commit dccf4eba authored by Edwise's avatar Edwise 🍷

gai

parent 398ac213
...@@ -2431,7 +2431,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) { ...@@ -2431,7 +2431,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0; exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts"); var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Ins_1 = __webpack_require__(/*! ./Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts"); var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName; var TbNetName;
(function (TbNetName) { (function (TbNetName) {
...@@ -2469,8 +2468,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) { ...@@ -2469,8 +2468,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
fetchAsync(url) fetchAsync(url)
.then(function (data) { .then(function (data) {
dataRecord[netName] = data; dataRecord[netName] = data;
if (!hideMsg && !data.success)
ctrls_1.showToast(data.message || "网络异常");
callback && callback(data.success, data); callback && callback(data.success, data);
resolve(data); resolve(data);
console.log("\n%c[ mock ]\n" console.log("\n%c[ mock ]\n"
...@@ -2487,8 +2484,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) { ...@@ -2487,8 +2484,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
Main_1.GDispatcher.removeEventListener(netName, fun); Main_1.GDispatcher.removeEventListener(netName, fun);
var d = e.data; var d = e.data;
dataRecord[netName] = d; dataRecord[netName] = d;
if (!hideMsg && !d.success)
Ins_1.Ins.showToast(d.message || "网络超时");
callback && callback(d.success, d); callback && callback(d.success, d);
resolve(d); resolve(d);
console.log("\n%c[ request ]\n" console.log("\n%c[ request ]\n"
This diff is collapsed.
...@@ -2433,7 +2433,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) { ...@@ -2433,7 +2433,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0; exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts"); var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Ins_1 = __webpack_require__(/*! ./Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts"); var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName; var TbNetName;
(function (TbNetName) { (function (TbNetName) {
...@@ -2471,8 +2470,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) { ...@@ -2471,8 +2470,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
fetchAsync(url) fetchAsync(url)
.then(function (data) { .then(function (data) {
dataRecord[netName] = data; dataRecord[netName] = data;
if (!hideMsg && !data.success)
ctrls_1.showToast(data.message || "网络异常");
callback && callback(data.success, data); callback && callback(data.success, data);
resolve(data); resolve(data);
console.log("\n%c[ mock ]\n" console.log("\n%c[ mock ]\n"
...@@ -2489,8 +2486,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) { ...@@ -2489,8 +2486,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
Main_1.GDispatcher.removeEventListener(netName, fun); Main_1.GDispatcher.removeEventListener(netName, fun);
var d = e.data; var d = e.data;
dataRecord[netName] = d; dataRecord[netName] = d;
if (!hideMsg && !d.success)
Ins_1.Ins.showToast(d.message || "网络超时");
callback && callback(d.success, d); callback && callback(d.success, d);
resolve(d); resolve(d);
console.log("\n%c[ request ]\n" console.log("\n%c[ request ]\n"
...@@ -158,7 +158,7 @@ export function sendTbNet( ...@@ -158,7 +158,7 @@ export function sendTbNet(
//记录数据 //记录数据
dataRecord[netName] = data; dataRecord[netName] = data;
//统一错误信息提示 //统一错误信息提示
if (!hideMsg && !data.success) showToast(data.message || "网络异常") // if (!hideMsg && !data.success) showToast(data.message || "网络异常")
//回调 //回调
callback && callback(data.success, data); callback && callback(data.success, data);
resolve(data) resolve(data)
...@@ -190,7 +190,7 @@ export function sendTbNet( ...@@ -190,7 +190,7 @@ export function sendTbNet(
//记录数据 //记录数据
dataRecord[netName] = d; dataRecord[netName] = d;
//统一错误信息提示,d.data为了区分网络超时 //统一错误信息提示,d.data为了区分网络超时
if (!hideMsg && !d.success) Ins.showToast(d.message || "网络超时") // if (!hideMsg && !d.success) Ins.showToast(d.message || "网络超时")
//执行回调 //执行回调
callback && callback(d.success, d); callback && callback(d.success, d);
resolve(d) resolve(d)
......
...@@ -27,7 +27,8 @@ App({ ...@@ -27,7 +27,8 @@ App({
*/ */
handleQuery(query) { handleQuery(query) {
const { activityId } = query; const { activityId } = query;
this.activityId = activityId || '5f8022919da671f3b6d5fb14'; // this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然
this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷
} }
}); });
...@@ -2433,7 +2433,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) { ...@@ -2433,7 +2433,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0; exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts"); var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Ins_1 = __webpack_require__(/*! ./Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts"); var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName; var TbNetName;
(function (TbNetName) { (function (TbNetName) {
...@@ -2471,8 +2470,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) { ...@@ -2471,8 +2470,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
fetchAsync(url) fetchAsync(url)
.then(function (data) { .then(function (data) {
dataRecord[netName] = data; dataRecord[netName] = data;
if (!hideMsg && !data.success)
ctrls_1.showToast(data.message || "网络异常");
callback && callback(data.success, data); callback && callback(data.success, data);
resolve(data); resolve(data);
console.log("\n%c[ mock ]\n" console.log("\n%c[ mock ]\n"
...@@ -2489,8 +2486,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) { ...@@ -2489,8 +2486,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
Main_1.GDispatcher.removeEventListener(netName, fun); Main_1.GDispatcher.removeEventListener(netName, fun);
var d = e.data; var d = e.data;
dataRecord[netName] = d; dataRecord[netName] = d;
if (!hideMsg && !d.success)
Ins_1.Ins.showToast(d.message || "网络超时");
callback && callback(d.success, d); callback && callback(d.success, d);
resolve(d); resolve(d);
console.log("\n%c[ request ]\n" console.log("\n%c[ request ]\n"
...@@ -337,6 +337,7 @@ Page({ ...@@ -337,6 +337,7 @@ Page({
* 登录接口 * 登录接口
*/ */
async login() { async login() {
my.showLoading();
const { const {
nickName, nickName,
avatar avatar
...@@ -348,10 +349,12 @@ Page({ ...@@ -348,10 +349,12 @@ Page({
userNick: nickName, userNick: nickName,
avatar avatar
}).catch(res => { }).catch(res => {
my.hideLoading();
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
if (success) { if (success) {
my.hideLoading();
app.openId = data.openId; app.openId = data.openId;
this.getActivityBaseInfoById(); this.getActivityBaseInfoById();
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment