You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
apply-assistant-v3/root/bind/search.vue

196 lines
5.0 KiB
Vue

6 months ago
<template>
6 months ago
<div class="p-root-bind-search g_w_all g_bg_f_5 g_kuaishou" style="min-height: 100%">
6 months ago
<!-- #ifdef APP-PLUS || H5 -->
<u-navbar back-icon-color="#333333" back-icon-size="40" title="发展代理" title-size="36" title-color="#111111" :title-bold="false">
6 months ago
<!-- <div class="g_pr_16" slot='right' @click="handleOpenSharePop">
6 months ago
<i class="iconfont icon-zhuanfa1 g_c_3" style="font-size: 36rpx;"></i>
6 months ago
</div> -->
6 months ago
</u-navbar>
<!-- #endif -->
6 months ago
<div class="g_flex_row_center g_fs_20 g_c_3 g_fw_600 g_mb_16 g_pt_24">邀请粉丝代理关注我的发单号</div>
<div class="" v-if="active == 0">
<div class="">
<div class="" v-for="(item, index) in recommendList" :key="index">
6 months ago
<g-panel-card-info
:info="{
avatar: item.logo,
title: item.agencyName,
num: '职位数:' + item.jobNum + ' 粉丝数:' + item.downNum,
titleFS: 18,
titleFW: 400,
numFS: 14,
agencyCode: item.inviteCode,
}"
:radius="6"
isShowMore="1"
rightType="button"
/>
6 months ago
</div>
</div>
</div>
<div v-if="active == 1">
3 months ago
<mainPanel :showBg="false" :active="active" @exportCode="getCode" @setImg="setShareImg" />
6 months ago
</div>
6 months ago
<u-popup v-model="sharePop.isShow" mode="bottom" border-radius="16">
6 months ago
<div class="g_fs_14 g_flex_row_center g_pt_20 g_pb_20" style="color: #323233">立即分享给好友</div>
<div class="g_flex_row_center">
<div v-for="(item, index) in sharePop.type" :key="index" style="width: 25%" class="g_flex_row_center" @click="handleOpenApp(item, index)">
<div class="">
<div class="g_flex_row_center">
6 months ago
<image :src="localBaseImg + 'share/' + item.icon + '.svg'" style="width: 48px; height: 48px"></image>
6 months ago
</div>
<div class="g_pt_8 g_pb_16 g_fs_12 g_flex_row_center" style="color: #646566">{{ item.name }}</div>
</div>
</div>
</div>
<div class="g_h_8 g_bg_f_5"></div>
<div class="g_h_48 g_flex_c g_fs_16" style="color: #646566" @click="sharePop.isShow = false">取消</div>
6 months ago
</u-popup>
6 months ago
</div>
6 months ago
</template>
<script>
3 months ago
import mainPanel from "../../components/myMain.vue";
6 months ago
export default {
components: {
mainPanel,
},
data() {
return {
localBaseImg: this.G.store().localBaseImg,
5 months ago
agencyInfo: uni.getStorageSync("agencyInfo"),
5 months ago
userInfo: uni.getStorageSync("apply-userinfo"),
6 months ago
active: 0,
placeholder: "",
wxCode: "",
keyword: "",
6 months ago
agencyName: "报名助手",
6 months ago
recommendList: [],
shareImg: "",
sharePop: {
isShow: false,
type: [
{
icon: "wechat",
name: "微信好友",
tip: "wechat",
},
{
icon: "friends",
name: "朋友圈",
tip: "friends",
},
{
icon: "tiktok",
name: "抖音好友",
tip: "douyin",
},
{
icon: "kwai",
name: "快手好友",
tip: "kwai",
},
],
},
};
},
onReady() {
this.G.setNavStyle();
},
3 months ago
3 months ago
onShareAppMessage1() {
6 months ago
let that = this;
let params = {
id: uni.getStorageSync("apply-agencyId"),
type: that.active + 1,
isShowMore: false,
isShowJob: false,
shareForm: "friend",
};
console.log("代理id", that.recommendList);
5 months ago
return this.G.shareFun("/root/person/inviteFollowMe?scene=" + `id=${that.agencyInfo.id}_${that.userInfo.id}`, this.shareImg, that.agencyInfo.fullName + "邀请您关注他的发单号,快来关注吧!");
6 months ago
},
onLoad(options) {
console.log(options);
this.active = options.active;
3 months ago
uni.showLoading({
title: "生成中...",
});
6 months ago
if (this.active === 0) {
this.placeholder = "请输入发单号账号/手机号";
uni.setNavigationBarTitle({
title: "寻找发单号",
});
} else {
this.placeholder = "请输入粉丝ID账号";
uni.setNavigationBarTitle({
title: "发展代理",
});
}
3 months ago
uni.onAfterPageUnload(() => {
console.log("onAfterPageUnload");
uni.removeStorageSync("poster_img");
});
6 months ago
},
onShow() {
this.getDetail();
},
methods: {
setShareImg(e) {
console.log(e);
this.shareImg = e;
},
getDetail() {
let that = this;
that.G.Get(
that.api.bind_enterpriseDetail + "/" + uni.getStorageSync("apply-agencyId"),
{
agencyId: uni.getStorageSync("apply-agencyId"),
type: 1,
},
(res) => {
console.log("recommendList", res);
that.recommendList = [res];
console.log("--", that.recommendList);
}
);
},
getCode(e) {
console.log("获取返回数据:", e);
this.wxCode = e.code;
this.agencyName = e.agencyName;
3 months ago
uni.hideLoading();
6 months ago
},
goMain() {
let that = this;
uni.navigateTo({
url: "/root/bind/applyForm?code=" + that.keyword + "&form=1",
});
},
handleCopyText() {
this.G.copyText(this.wxCode);
},
// 打卡分享弹窗
handleOpenSharePop() {
let that = this;
that.sharePop.isShow = true;
},
// 打卡app
handleOpenApp($item, $index) {
let that = this;
that.G.handleConfirm({
content: "功能开发中",
success: (res) => {
if (res.confirm) {
that.sharePop.isShow = false;
}
},
});
},
},
};
</script>
<style></style>