|
@@ -2,7 +2,7 @@
|
|
|
<view class="content">
|
|
|
<view class="bg"></view>
|
|
|
<view class="cont-box">
|
|
|
- <view class="user-cont">
|
|
|
+ <view class="user-cont" @click="navTo('/pages/user/userInfo')">
|
|
|
<view class="user-box" v-if="user!=null">
|
|
|
<view class="left">
|
|
|
<image src="../../static/images/default.png"></image>
|
|
@@ -11,7 +11,7 @@
|
|
|
<view class="account">{{user.deptName}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="right" @click="navTo('/pages/user/userInfo')">
|
|
|
+ <view class="right" >
|
|
|
<image src="../../static/images/right_arrow.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -23,17 +23,17 @@
|
|
|
|
|
|
<view class="menu-box">
|
|
|
<view class="title-box">
|
|
|
- <image class="icon" src="../../static/images/office.png"></image>
|
|
|
+ <image class="icon" src="../../static/manergevip/chang.png"></image>
|
|
|
<view class="title">常用功能</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
|
<view class="menus">
|
|
|
- <view class="menu-item" @click="navTo('/pages/user/ai/index')">
|
|
|
- <image src="../../static/images/menu_info.png"></image>
|
|
|
+ <!-- <view class="menu-item" @click="navTo('/pages/user/ai/index')">
|
|
|
+ <image src="../../static/manergevip/serve.png"></image>
|
|
|
<view class="m-name">AI客服</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="menu-item" @click="navTo('/pages/user/qwSop/sop')">
|
|
|
- <image src="../../static/images/menu_info.png"></image>
|
|
|
+ <image src="../../static/manergevip/sop.png"></image>
|
|
|
<view class="m-name">群发SOP</view>
|
|
|
</view>
|
|
|
<!-- <view class="menu-item" @click="navTo('/pages/user/courseSop/sop')">
|
|
@@ -44,10 +44,18 @@
|
|
|
<image src="../../static/images/menu_info.png"></image>
|
|
|
<view class="m-name">看课管理</view>
|
|
|
</view>
|
|
|
+ <view class="menu-item" @click="navTo('/pages/user/users/users')">
|
|
|
+ <image src="../../static/manergevip/qudao.png"></image>
|
|
|
+ <view class="m-name">渠道管理</view>
|
|
|
+ </view>
|
|
|
+ <view class="menu-item" @click="handleShare">
|
|
|
+ <image src="../../static/manergevip/share-manage.png"></image>
|
|
|
+ <view class="m-name">渠道邀请</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <view class="menu-box">
|
|
|
+ <!-- <view class="menu-box">
|
|
|
<view class="title-box">
|
|
|
<image class="icon" src="../../static/images/office.png"></image>
|
|
|
<view class="title">客户管理</view>
|
|
@@ -67,7 +75,7 @@
|
|
|
<view class="m-name">导入微信用户</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<!-- <view class="menu-box">
|
|
|
<view class="title-box">
|
|
|
<image class="icon" src="../../static/images/office.png"></image>
|
|
@@ -103,18 +111,29 @@
|
|
|
</view> -->
|
|
|
<view class="menu-box">
|
|
|
<view class="title-box">
|
|
|
- <image class="icon" src="../../static/images/office.png"></image>
|
|
|
+ <image class="icon" src="../../static/manergevip/qita.png"></image>
|
|
|
<view class="title">其它工具</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
|
- <view class="menus">
|
|
|
+ <!-- <view class="menus">
|
|
|
<view class="menu-item" @click="navTo('/pages/user/users/users')">
|
|
|
<image src="../../static/images/menu_info.png"></image>
|
|
|
<view class="m-name">通讯录</view>
|
|
|
</view>
|
|
|
+ </view> -->
|
|
|
+ <view class="menus">
|
|
|
+ <view class="menu-item" @click="navTo('/pages/user/about')">
|
|
|
+ <image src="../../static/manergevip/about.png"></image>
|
|
|
+ <view class="m-name">关于我们</view>
|
|
|
+ </view>
|
|
|
+ <view class="menu-item" @click="navTo('/pages/user/editUser')">
|
|
|
+ <image src="../../static/manergevip/setup.png"></image>
|
|
|
+ <view class="m-name">设置</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
- <view class="menu-box1">
|
|
|
+ <!-- <view class="menu-box1">
|
|
|
<view class="menu-item" @click="navTo('/pages/user/about')">
|
|
|
<view class="left">
|
|
|
<image src="../../static/images/icon_about_us.png"></image>
|
|
@@ -133,11 +152,71 @@
|
|
|
<image src="../../static/images/right_arrow.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="btn-box" >
|
|
|
<view class="sub-btn" @click="showLogout()">退出登录</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!-- 分享弹窗 -->
|
|
|
+ <u-popup :show="showShare" :closeOnClickOverlay="true" :round='20' @close="closeShare" @open="openShare">
|
|
|
+ <view class="sharePop x-ac">
|
|
|
+ <view class="sharePop-item y-f" @click="shareimg">
|
|
|
+ <image src="@/static/images/card_icon.png" mode="aspectFill"
|
|
|
+ style="width: 80rpx; height: 80rpx;margin-top: 20rpx;"></image>
|
|
|
+ <view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
|
|
|
+ <view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
|
|
|
+ </view>
|
|
|
+ <view class="sharePop-item y-f" @click="buildimg">
|
|
|
+ <image src="@/static/images/poster_icon.png" mode="aspectFill"></image>
|
|
|
+ <view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
|
|
|
+ <view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
|
|
|
+ </view>
|
|
|
+ <view class="sharePop-item y-f" @click="setTimeShow=true">
|
|
|
+ <image src="@/static/images/link_icon.png" mode="aspectFill"></image>
|
|
|
+ <view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
|
|
|
+ <view style="font-size: 12px;color: #888;">生成链接一键复制</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <!-- 长按保存海报 -->
|
|
|
+ <u-popup :show="setImg" @close="closeimg" :round="12">
|
|
|
+ <view class="w100 h500">
|
|
|
+ <image :src="codeLink.url" class="codeimg w660" mode="widthFix"></image>
|
|
|
+ </view>
|
|
|
+ <view class="justify-around mtb40">
|
|
|
+ <view class="column justify-center align-center" @click="downimg">
|
|
|
+ <image src='@/static/image/downicon.png' class="w80 h80"></image>
|
|
|
+ <view class="mt10">长按图片保存</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <!-- 设置链接有效时长弹窗 -->
|
|
|
+ <u-modal :show="setTimeShow" content='content' class="model" @confirm="confirmTime">
|
|
|
+ <view class="setTimebox">
|
|
|
+ <view class="timetip">不传默认以系统参数为准</view>
|
|
|
+ <view class="x-f">
|
|
|
+ <text style="margin-right: 20px;">链接有效时长(分钟)</text>
|
|
|
+ <u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time" maxlength="5"></u-input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+ <!-- 卡片分享引导 -->
|
|
|
+ <u-overlay :show="showzhidao" @click="showzhidao = false" style="z-index: 9999;">
|
|
|
+ <view class="point-box">
|
|
|
+ <view class="imgshe" >
|
|
|
+ <image src='@/static/image/point.png' class="w300 h300"></image>
|
|
|
+ </view>
|
|
|
+ <view class="column colorf fs32 xu-box fs40
|
|
|
+ align-center justify-center">
|
|
|
+ <view class="justify-center">点击右上角
|
|
|
+ <image src="@/static/image/wxmore.png"
|
|
|
+ class="w50 h50 mlr10"></image>
|
|
|
+ </view>
|
|
|
+ <view class="mt20">选择 “转发给朋友”</view>
|
|
|
+ <view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-overlay>
|
|
|
<u-modal :show="show" title="提示" :showCancelButton="true" @cancel="hideLogout()" @confirm="logout()" content='确认退出吗?'></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -145,12 +224,27 @@
|
|
|
<script>
|
|
|
|
|
|
import { getCompanyUser } from '@/api/user.js'
|
|
|
-
|
|
|
+ import {
|
|
|
+ sharecourselink,
|
|
|
+ buildCode,
|
|
|
+ getSDK,
|
|
|
+ becomeVipuser,
|
|
|
+ becomeVipuserImg
|
|
|
+ } from '@/api/courseManage'
|
|
|
+ import wx from 'weixin-js-sdk'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
show:false,
|
|
|
user:null,
|
|
|
+ showShare:false,
|
|
|
+ copyLinks:'',
|
|
|
+ setTimeShow:false,
|
|
|
+ time:'',
|
|
|
+ setImg:false,
|
|
|
+ codeLink:'',
|
|
|
+ showzhidao:false,
|
|
|
+ imgs:'https://h5.wxcourse.cdwjyyh.com/icon/20250214100002.png'
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
@@ -158,7 +252,148 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ // 获取jssdk
|
|
|
+ getjssdklist() {
|
|
|
+ const param = {
|
|
|
+ url: window.location.href.split('#')[0] // 注意去除 hash
|
|
|
+ }
|
|
|
+ getSDK(param).then(res => {
|
|
|
+ wx.config({
|
|
|
+ debug: false,
|
|
|
+ appId: res.data.appId, // 必填,公众号的唯一标识
|
|
|
+ timestamp: res.data.timestamp, // 必填,生成签名的时间戳
|
|
|
+ nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
|
|
|
+ signature: res.data.signature, // 必填,签名
|
|
|
+ jsApiList: ["updateAppMessageShareData", "onMenuShareAppMessage", ] // 必填,需要使用的JS接口列表
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ shareimg(){
|
|
|
+ //分享好友
|
|
|
+ let self = this
|
|
|
+ // 配置--你到时候把配置全局 --就是这些东西 调接口拿
|
|
|
+ wx.ready(function() { //需在用户可能点击分享按钮前就先调用
|
|
|
+ wx.updateAppMessageShareData({
|
|
|
+ title: self.user.userName+"邀请您成为群管", // 分享标题
|
|
|
+ desc: self.user.deptName, // 分享描述
|
|
|
+ link:self.copyLinks,
|
|
|
+ imgUrl: self.codeLink.url ||self.imgs, // 分享图标
|
|
|
+ success: function(res) {
|
|
|
+ self.showzhidao=true
|
|
|
+ self.setImg=false
|
|
|
+ self.showShare=false
|
|
|
+ // 设置成功
|
|
|
+ uni.showToast({
|
|
|
+ title: '卡片已生成',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1000
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ console.log(err);
|
|
|
+ uni.showToast({
|
|
|
+ title: '卡片生成失败,请重试',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleShare() {
|
|
|
+ this.showShare = true
|
|
|
+ this.getjssdklist()
|
|
|
+ this.getlink('preload'); // 提前加载链接
|
|
|
+ },
|
|
|
+ //设置链接时长
|
|
|
+ confirmTime() {
|
|
|
+ this.setTimeShow = false
|
|
|
+ this.showShare = false
|
|
|
+ this.getlink('preload')
|
|
|
+ this.copyLink()
|
|
|
+ },
|
|
|
+ closeimg(){
|
|
|
+ this.setImg=false
|
|
|
+ this.showShare=false
|
|
|
+ },
|
|
|
+ buildimg() {
|
|
|
+ //生成海报
|
|
|
+ this.setImg=!this.setImg
|
|
|
+ this.getshareimg()
|
|
|
+ },
|
|
|
+ getshareimg(){
|
|
|
+ //生成海报
|
|
|
+ uni.showLoading({
|
|
|
+ title: '正在生成中...'
|
|
|
+ })
|
|
|
+ const param={
|
|
|
+ code:'',
|
|
|
+ companyId:this.user.companyId,
|
|
|
+ companyUserId:this.user.userId
|
|
|
+ }
|
|
|
+ becomeVipuserImg(param).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.codeLink=res.data
|
|
|
+ this.getlink()
|
|
|
+ console.log(res)
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getlink(type){
|
|
|
+ //生成链接
|
|
|
+ const param={
|
|
|
+ companyId:this.user.companyId,
|
|
|
+ companyUserId:this.user.userId,
|
|
|
+ tagids:'',
|
|
|
+ limitTime:this.time
|
|
|
+ }
|
|
|
+ becomeVipuser(param).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.copyLinks=res.data
|
|
|
+ if (this.copyLinks.startsWith('http://')) {
|
|
|
+ this.copyLinks = this.copyLinks.replace('http://', 'https://');
|
|
|
+ }
|
|
|
+ console.log(this.copyLinks,'分享链接')
|
|
|
+ }else{
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ copyLink(){
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: this.copyLinks,
|
|
|
+ success: () => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '链接已复制',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ // this.setTimeShow = !this.setTimeShow
|
|
|
+ this.showShare = false
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '复制失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, 100)
|
|
|
+ },
|
|
|
+ closeShare() {
|
|
|
+ this.showShare = false
|
|
|
+ // console.log('open');
|
|
|
+ },
|
|
|
+ openShare() {
|
|
|
+ // this.showShare = false
|
|
|
+ // console.log('close');
|
|
|
+ },
|
|
|
showLogout(){
|
|
|
this.show=true;
|
|
|
},
|
|
@@ -186,6 +421,7 @@
|
|
|
getCompanyUser(data).then(res => {
|
|
|
if(res.code==200){
|
|
|
this.user=res.data;
|
|
|
+ console.log(this.user)
|
|
|
}else{
|
|
|
|
|
|
}
|
|
@@ -202,6 +438,39 @@
|
|
|
}
|
|
|
</style>
|
|
|
<style scoped lang="scss">
|
|
|
+ .imgshe{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row-reverse
|
|
|
+ }
|
|
|
+ .point-box{
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ .xu-box{
|
|
|
+ border: #f5f5f5 4rpx dashed;
|
|
|
+ padding: 20rpx 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .setTimebox {
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ width: fit-content;
|
|
|
+ height: fit-content;
|
|
|
+ }
|
|
|
+ .codeimg {
|
|
|
+ position: absolute;
|
|
|
+ z-index: 9999;
|
|
|
+ left: 40rpx;
|
|
|
+ top: 40rpx;
|
|
|
+ }
|
|
|
+ .timetip {
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #2979ff;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
.content{
|
|
|
position: relative;
|
|
|
height: 100%;
|
|
@@ -302,8 +571,8 @@
|
|
|
align-items: center;
|
|
|
justify-content: flex-start;
|
|
|
.icon{
|
|
|
- width: 30rpx;
|
|
|
- height:30rpx;
|
|
|
+ width: 40rpx;
|
|
|
+ height:40rpx;
|
|
|
}
|
|
|
.title{
|
|
|
margin-left: 10rpx;
|
|
@@ -382,7 +651,7 @@
|
|
|
}
|
|
|
}
|
|
|
.btn-box{
|
|
|
- margin: 60rpx 0rpx 30rpx;
|
|
|
+ margin: 30rpx 0rpx 30rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
@@ -398,5 +667,26 @@
|
|
|
font-family: PingFang SC;
|
|
|
color: #111;
|
|
|
}
|
|
|
+ }
|
|
|
+ .sharePop {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 50px 0;
|
|
|
+ padding-bottom: 100px;
|
|
|
+ border-radius: 20px 20px 0 0;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ padding: 0 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ display: inline-flex !important;
|
|
|
+
|
|
|
+ image {
|
|
|
+ height: 48px;
|
|
|
+ width: 48px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|