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

186 lines
4.7 KiB
Vue

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="p-root-bind-search g_w_all g_bg_f_5 g_kuaishou" style="min-height: 100%">
<!-- #ifdef APP-PLUS || H5 -->
<u-navbar back-icon-color="#333333" back-icon-size="40" title="发展代理" title-size="36" title-color="#111111" :title-bold="false">
<!-- <view class="g_pr_16" slot='right' @click="handleOpenSharePop">
<i class="iconfont icon-zhuanfa1 g_c_3" style="font-size: 36rpx;"></i>
</view> -->
</u-navbar>
<!-- #endif -->
<view class="g_flex_row_center g_fs_20 g_c_3 g_fw_600 g_mb_16 g_pt_24">邀请粉丝代理关注我的发单号</view>
<view class="" v-if="active == 0">
<view class="">
<view class="" v-for="(item, index) in recommendList" :key="index">
<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"
/>
</view>
</view>
</view>
<view v-if="active == 1">
<mainPanel :showBg="false" :active="active" :recommendList="recommendList[0]" @exportCode="getCode" @setImg="setShareImg" />
</view>
<u-popup v-model="sharePop.isShow" mode="bottom" border-radius="16">
<view class="g_fs_14 g_flex_row_center g_pt_20 g_pb_20" style="color: #323233">立即分享给好友</view>
<view class="g_flex_row_center">
<view v-for="(item, index) in sharePop.type" :key="index" style="width: 25%" class="g_flex_row_center" @click="handleOpenApp(item, index)">
<view class="">
<view class="g_flex_row_center">
<image :src="localBaseImg + 'share/' + item.icon + '.svg'" style="width: 48px; height: 48px"></image>
</view>
<view class="g_pt_8 g_pb_16 g_fs_12 g_flex_row_center" style="color: #646566">{{ item.name }}</view>
</view>
</view>
</view>
<view class="g_h_8 g_bg_f_5"></view>
<view class="g_h_48 g_flex_c g_fs_16" style="color: #646566" @click="sharePop.isShow = false"></view>
</u-popup>
</view>
</template>
<script>
import mainPanel from "./myMain.vue";
export default {
components: {
mainPanel,
},
data() {
return {
localBaseImg: this.G.store().localBaseImg,
active: 0,
placeholder: "",
wxCode: "",
keyword: "",
agencyName: "发单助手",
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();
},
onShareAppMessage() {
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);
return this.G.shareFun("/root/detail/user?" + that.G.objToStr(params), this.shareImg, that.agencyName + "邀请您关注他的发单号,快来关注吧!");
},
onLoad(options) {
console.log(options);
this.active = options.active;
if (this.active === 0) {
this.placeholder = "请输入发单号账号/手机号";
uni.setNavigationBarTitle({
title: "寻找发单号",
});
} else {
this.placeholder = "请输入粉丝ID账号";
uni.setNavigationBarTitle({
title: "发展代理",
});
}
},
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;
},
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>