|
|
|
|
|
<template>
|
|
|
|
|
|
<div class="g_bg_page g_pl_10 g_pr_10">
|
|
|
|
|
|
<div class="g_h_20"></div>
|
|
|
|
|
|
<div class="g_mb_10 g_fs_18 g_pl_10">「{{ agencyInfo.fullName || "-" }}」邀请您加入他的团队:</div>
|
|
|
|
|
|
<div class="r_box g_pt_24 g_pb_16 g_text_c">
|
|
|
|
|
|
<img class="g_h_80 g_w_80 g_radius_50" :src="agencyInfo.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/default.svg'" alt="" />
|
|
|
|
|
|
<div class="g_fs_20 g_mt_12 g_mb_12 g_fw_600">
|
|
|
|
|
|
{{ agencyInfo.agencyName || "-" }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="g_c_9 g_fs_14">
|
|
|
|
|
|
{{ agencyInfo.desp || "-" }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="g_mt_60 r_box g_pl_10">
|
|
|
|
|
|
<u-input v-model="userName" height="88" placeholder="请输入你的姓名"></u-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="g_mt_84">
|
|
|
|
|
|
<g-button v-if="applying" btnText="已申请" type="disabled" class=""></g-button>
|
|
|
|
|
|
<g-button v-else btnText="申请加入团队" type="primary" class="" @clickBtn="applyAdd"></g-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
agencyInfo: {
|
|
|
|
|
|
agencyName: "",
|
|
|
|
|
|
fullName: "",
|
|
|
|
|
|
},
|
|
|
|
|
|
userName: "",
|
|
|
|
|
|
applying: false,
|
|
|
|
|
|
userId: "",
|
|
|
|
|
|
uid: "",
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
console.log(options);
|
|
|
|
|
|
options.scene = "id=3087AAAAA101125";
|
|
|
|
|
|
if (options.scene) {
|
|
|
|
|
|
console.log("XXXXXXXXXXXX");
|
|
|
|
|
|
//扫小程序码携带参数
|
|
|
|
|
|
var sceneStr = decodeURIComponent(options.scene);
|
|
|
|
|
|
var sceneJson = this.G.sceneToJson(sceneStr);
|
|
|
|
|
|
console.log("sceneJson===", sceneJson);
|
|
|
|
|
|
this.inviteUserId = sceneJson.storeJobId || sceneJson.id.split("AAAAA")[1];
|
|
|
|
|
|
this.uid = sceneJson.id.split("AAAAA")[0];
|
|
|
|
|
|
this.getAgencyById();
|
|
|
|
|
|
this.checkHasApply();
|
|
|
|
|
|
|
|
|
|
|
|
console.log("this.userId", this.userId, "this.uid", this.uid);
|
|
|
|
|
|
// uni.setStorageSync("AGENCY_USER_ID", this.userId);
|
|
|
|
|
|
}
|
|
|
|
|
|
if(uni.getStorageSync('apply-token')){
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
applyAdd() {
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
this.G.Post(this.api.order_addApply, { agencyId: that.uid, username: this.userName, inviteUserId: this.inviteUserId }, (res) => {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
getAgencyById() {
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
this.G.Get(this.api.order_getAgencyById, { agencyId: that.uid }, (res) => {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
that.agencyInfo = res;
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
checkHasApply(){
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
this.G.Post(this.api.order_checkHasApply, { agencyId: that.uid, username: this.userName, userId: this.inviteUserId }, (res) => {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style></style>
|