diff --git a/main.js b/main.js index 2fa7c28..b6999b1 100644 --- a/main.js +++ b/main.js @@ -34,7 +34,7 @@ export function createApp () { app.config.productionTip = false; app.component('g-empty', gEmpty); - app.component('g-tabbar', gTabbar); + app.component('g-tabbar', gTabbar); app.component('g-loading', gLoading); app.component('g-button', gButton); app.component('g-list-job', gListJob); @@ -85,7 +85,8 @@ export function createApp () { console.log(err); resolve(err) - }) + } + ) }) }, /* @@ -99,7 +100,7 @@ export function createApp () { uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取 uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 if (res.agencyId) { - // if (res.agencyStatus == 1) { + // if (res.agencyStatus == 1) { G.Get(apiInfo.login_agencyInfo, {}, (aRes) => { uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员 uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员 @@ -167,59 +168,7 @@ export function createApp () { }); }, $sourceType); }, - // 新增方法:生成 UUID - getUUID () { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { - const r = (Math.random() * 16) | 0; - const v = c === "x" ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); - }, - /** - * 上传到oss - */ - uploadImgToOss (callback = () => { }, customDir = '', type = 'default', $num = 1, $sourceType = ['album', 'camera']) { - var that = this; - G.uploadImage($num, (imgRes) => { - uni.showLoading({ - title: '上传中...', - }) - console.log('imgRes', imgRes); - let imgPath = JSON.parse(imgRes)[0] - console.log('imgPath', imgPath); - G.Get(apiInfo.getOssInfo, { prefix: customDir }, ({ data }) => { - console.log('uploadImgToOssresresresres', data); - const { policy, signature, accessid, dir, host } = data; - let key = dir + that.getUUID() - const formData = { - "key": key + "_${filename}", - "policy": policy, - "OSSAccessKeyId": accessid, - signature, - "success_action_status": "200", - }; - - uni.uploadFile({ - url: host, - filePath: imgPath, - name: "file", - formData: formData, - success: function (res) { - if (res.errMsg = "uploadFile:ok") { - const imgUrl = `${host}/${key}_${imgPath.split('/').pop()}`; - callback({ - status: '上传成功', - image: imgUrl - }); - } - console.log('resresresresresresres', res); - }, - fail: function (res) { }, - }); - }) - }) - }, /* 上传图片 */ uploadImgByCamera (callback = () => { }, type = 'default', $num = 1, $sourceType = ['camera']) { diff --git a/root/components/applyFlow.vue b/root/components/applyFlow.vue index 32eaa66..ea9e2af 100644 --- a/root/components/applyFlow.vue +++ b/root/components/applyFlow.vue @@ -113,22 +113,26 @@ export default { components: {}, // 组件参数 接收来自父组件的数据 props: { + // 用户信息 userInfo: { type: Object, default: () => { return {}; }, }, + // 用户的代理信息 agencyInfo: { type: Object, default: () => { return {}; }, }, + // 被邀请方的代理信息 shareAgencyId: { type: String, default: "", }, + // 是否需要跳转申请成功页 navNewPage: { type: Boolean, default: true, diff --git a/root/detail/userShare.vue b/root/detail/userShare.vue index 41aeebf..6e25023 100644 --- a/root/detail/userShare.vue +++ b/root/detail/userShare.vue @@ -19,7 +19,7 @@
- + @@ -53,7 +53,7 @@
-
+
@@ -101,7 +101,7 @@
-
+
diff --git a/root/person/memberApplyAdd.vue b/root/person/memberApplyAdd.vue index b02df78..277774d 100644 --- a/root/person/memberApplyAdd.vue +++ b/root/person/memberApplyAdd.vue @@ -45,7 +45,7 @@ export default { }; }, onLoad(options) { - console.log(options); + console.log('options',options); // options.scene = "id=3087_101125"; if (uni.getStorageSync("scene") || options.scene) { console.log("XXXXXXXXXXXX");