diff --git a/App.vue b/App.vue
index 4be6c41..46bb291 100644
--- a/App.vue
+++ b/App.vue
@@ -2,6 +2,8 @@
export default {
onShow: function (options) {
console.log("show 项目init:", options, decodeURIComponent(options.query.scene));
+ uni.removeStorageSync("scene");
+
if (options.query.id) {
uni.setStorageSync("apply-jobdetail-id", options.query.id);
} else {
diff --git a/main.js b/main.js
index 150c6a3..b6d7d5d 100644
--- a/main.js
+++ b/main.js
@@ -65,7 +65,12 @@ export function createApp () {
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号
resolve(res)
- })
+ },
+ function fail (err) {
+ console.log(err);
+ resolve(err)
+
+ })
})
},
/*
diff --git a/manifest.json b/manifest.json
index e61638a..bc63340 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"name" : "fadanzhushou",
"appid" : "__UNI__860FDF3",
- "description" : "发单助手",
+ "description" : "报名助手",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
diff --git a/pages.json b/pages.json
index b0a480a..7532baa 100644
--- a/pages.json
+++ b/pages.json
@@ -3,7 +3,7 @@
{
"path": "pages/home/index",
"style": {
- "navigationBarTitleText": "发单助手",
+ "navigationBarTitleText": "报名助手",
"backgroundColor": "#caf1e0",
"backgroundColorTop": "#caf1e0"
// "navigationStyle": "custom"
diff --git a/pages/person/index.vue b/pages/person/index.vue
index 2bc1888..2d6acd9 100644
--- a/pages/person/index.vue
+++ b/pages/person/index.vue
@@ -103,7 +103,19 @@
-
+
+
+
+
@@ -299,9 +311,9 @@ export default {
that.itemList = [
{
icon: "icon-wodetuandui",
- label: "切换团队",
+ label: "团队管理",
result: "",
- path: "qiehuan",
+ path: "/root/person/teamManage",
pRow: 12,
},
{
@@ -314,7 +326,7 @@ export default {
},
];
}
- }
+ }
let userInfo = uni.getStorageSync("apply-userinfo");
that.isLogin = true;
diff --git a/root/bind/search.vue b/root/bind/search.vue
index efccded..0baac2f 100644
--- a/root/bind/search.vue
+++ b/root/bind/search.vue
@@ -63,7 +63,7 @@ export default {
placeholder: "",
wxCode: "",
keyword: "",
- agencyName: "发单助手",
+ agencyName: "报名助手",
recommendList: [],
shareImg: "",
sharePop: {
diff --git a/root/person/about.vue b/root/person/about.vue
index 2ad3a40..c86dc63 100644
--- a/root/person/about.vue
+++ b/root/person/about.vue
@@ -4,7 +4,7 @@
- 发单助手
+ 报名助手
Version {{version}}
diff --git a/root/person/memberApplyAdd.vue b/root/person/memberApplyAdd.vue
index f5d962d..96b6777 100644
--- a/root/person/memberApplyAdd.vue
+++ b/root/person/memberApplyAdd.vue
@@ -15,8 +15,8 @@
-
-
+
+
@@ -36,28 +36,33 @@ export default {
applying: false,
inviteUserId: "",
uid: "",
+ ing: false,
};
},
onLoad(options) {
console.log(options);
- options.scene = "id=3087_101125";
- if (options.scene) {
+ // options.scene = "id=3087_101125";
+ if (uni.getStorageSync("scene") || options.scene) {
console.log("XXXXXXXXXXXX");
//扫小程序码携带参数
- var sceneStr = decodeURIComponent(options.scene);
+
+ var sceneStr = uni.getStorageSync("scene") ? decodeURIComponent(uni.getStorageSync("scene")) : decodeURIComponent(options.scene);
var sceneJson = this.G.sceneToJson(sceneStr);
console.log("sceneJson===", sceneJson);
this.inviteUserId = sceneJson.id.split("_")[1];
this.uid = sceneJson.id.split("_")[0];
this.G.checkToken().then((info) => {
- console.log("info", info);
- if (info) {
+ console.log("info11", info);
+ if (!info.msg) {
+ this.userInfo = uni.getStorageSync("apply-userinfo");
this.getAgencyById();
this.checkHasApply();
+ uni.removeStorageSync("scene");
} else {
- uni.reLaunch({
- url: "/pages/login/index?path=/pages/person/memberApplyAdd&scene=" + options.scene,
- });
+ // uni.reLaunch({
+ // url: `/pages/login/index?path='/root1/person/memberApplyAdd'&scene=${options.scene}`,
+ // });
+ uni.setStorageSync("scene", options.scene);
}
});
@@ -69,7 +74,24 @@ export default {
methods: {
applyAdd() {
let that = this;
+
+ if (!this.userInfo.userName) {
+ uni.showToast({
+ title: "请输入你的姓名",
+ icon: "none",
+ });
+ return;
+ }
+ if (this.ing) {
+ return;
+ }
+ that.ing = true;
this.G.Post(this.api.order_addApply, { agencyId: that.uid, username: this.userInfo.userName, inviteUserId: this.inviteUserId }, (res) => {
+ uni.showToast({
+ title: "申请成功",
+ icon: "none",
+ });
+ that.checkHasApply();
console.log(res);
});
},
@@ -82,13 +104,13 @@ export default {
},
checkHasApply() {
let that = this;
- this.G.Post(this.api.order_checkHasApply, { agencyId: that.uid, userId: this.inviteUserId }, (res) => {
+ this.G.Post(this.api.order_checkHasApply, { agencyId: that.uid, userId: this.userInfo.id }, (res) => {
if (res.length > 0) {
that.applying = true;
} else {
that.applying = false;
}
-
+ that.ing = false;
console.log(res);
});
},
diff --git a/root/person/order.vue b/root/person/order.vue
index 4ee41cc..f46f6db 100644
--- a/root/person/order.vue
+++ b/root/person/order.vue
@@ -128,7 +128,7 @@
-
+
diff --git a/root/person/teamManage.vue b/root/person/teamManage.vue
index 6399150..7c33af1 100644
--- a/root/person/teamManage.vue
+++ b/root/person/teamManage.vue
@@ -37,7 +37,7 @@
微信分享邀请
- 取消
+ 取消
diff --git a/utils/ajax.js b/utils/ajax.js
index b1a272d..a6562c2 100644
--- a/utils/ajax.js
+++ b/utils/ajax.js
@@ -55,34 +55,34 @@ let data = {
// #ifdef APP-PLUS
'g-open-env': 'APP-PLUS',
appId: uuid_new,
- // 请求来源标识 1.小程序 2.app 3.网页
- appClassify: 2,
- appName: encodeURIComponent('发单助手')
+ // 请求来源标识 1.小程序 2.app 3.网页
+ appClassify: 2,
+ appName: encodeURIComponent('报名助手')
// #endif
// #ifdef H5
'g-open-env': 'H5',
appId: '',
- appClassify: 3,
- appName: encodeURIComponent('发单助手')
+ appClassify: 3,
+ appName: encodeURIComponent('报名助手')
// #endif
// #ifdef MP-WEIXIN
'g-open-env': 'MP-MINI',
appId: uni.getAccountInfoSync().miniProgram.appId,
- appClassify: 1,
- appName: encodeURIComponent('发单助手')
+ appClassify: 1,
+ appName: encodeURIComponent('报名助手')
// #endif
// #ifdef MP-TOUTIAO
'g-open-env': 'MP-TOUTIAO',
appId: tt.getEnvInfoSync().microapp.appId,
subAppId: uni.getStorageSync('subAppId'),
- appClassify: 1,
- appName: encodeURIComponent('发单助手')
+ appClassify: 1,
+ appName: encodeURIComponent('报名助手')
// #endif
// #ifdef MP-KUAISHOU
'g-open-env': 'MP-KUAISHOU',
appId: "",
- appClassify: 1,
- appName: encodeURIComponent('发单助手')
+ appClassify: 1,
+ appName: encodeURIComponent('报名助手')
// #endif
}
return params
@@ -121,9 +121,10 @@ let data = {
title: resData.msg,
icon: "none"
});
+ failback(resData);
setTimeout(() => {
uni.reLaunch({
- url: '/pages/login/index?path=' + that.getPathCopy().path + '&level=' + that.getPathCopy().level
+ url: '/pages/login/index?path=/' + that.getPathCopy().path + '&level=' + that.getPathCopy().level
});
}, 1500);
} else if (resData.status == 500 || resData.status == 502) {// 某种原因导致接口提示该状态码
diff --git a/utils/common.js b/utils/common.js
index b93242a..4b48d82 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -32,7 +32,7 @@ let data = {
shareFun (
path = "/pages/home/index",
image = "",
- title = "发单助手"
+ title = "报名助手"
) {
let params = {
path: path,