| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483 |
- <template>
- <view>
- <view :class="'mine' + (skinNotColor ? ' not-color' : '')">
- <view :style="'height:' + systems.barHeight + 'rpx;'"></view>
- <view
- :style="'top:' + systems.ktxStatusHeight + 'rpx;z-index:3;position: absolute;'+'line-height: '+ systems.navigationHeight+'rpx;text-align: center;left: 0;font-size: 34rpx;right: 0;color: #FFFFFF;'">
- 我的
- </view>
- <image src="../../static/pages/images/userBg.png" class="wdbg" @click="jumpUrl('mine/userinfo/userinfo')">
- </image>
- <view class="minec">
- <view class="minec-img" @click="jumpUrl('mine/userinfo/userinfo')">
- <image :src="userInfos.avatar ? userInfos.avatar : '/static/pages/images/userimg.png'"
- mode="aspectFit" class="user"></image>
- </view>
- <view class="mines" @click="jumpUrl('mine/userinfo/userinfo')" v-if="isLogin">
- <view class="ddflex">
- {{ userInfos.nickName }}
- <view class="ddflex" style="font-size: 24rpx;font-weight: 400;" @click.stop="isShowBind=true" v-if="userInfos.userType!=1">
- <image style="width: 23rpx;height: 22rpx;margin-right: 10rpx;" src="/static/images/bind.png" class="auth-img"></image>
- 绑定工号
- </view>
- </view>
- <text class="edu" v-if="userInfos.mobile">{{ userInfos.mobile }}</text>
- </view>
- <view class="flex" v-else><text class="login-btn" @click="jumpUrl('')">点击登录</text></view>
- <view class="rule dflex" @click="isSign == 0 || sign == 1 ? jumpUrl('') : signFun()" v-if="isShowSign">
- <image src="/static/pages/images/qdico.png"></image>
- {{ !isLogin ? '签到' : isSign == 0 || sign == 1 ? '已签到' : '签到' }}
- </view>
- <!-- </navigator> -->
- </view>
- <view class="datas dflex">
- <navigator url="" hover-class="none" class="li"
- @click="jumpUrl('mine/coupons/coupons')">
- <text>{{ userInfos.coupon ? userInfos.coupon : '0' }}</text>
- 我的收藏
- </navigator>
- <navigator url="" hover-class="none" class="li" @click="jumpUrl('integralshop/index/index')">
- <text>{{ userInfos.integral ? userInfos.integral : '0' }}</text>
- 我的关注
- </navigator>
- <navigator url="" hover-class="none" class="li"
- @click="jumpUrl('match/activity/activity')">
- <text>{{ userInfos.collect ? userInfos.collect : '0' }}</text>
- 参与活动
- </navigator>
- <!-- <navigator url="/mine/footprint/footprint" hover-class="none" class="li"><text>{{footprint?footprint:'0'}}</text>足迹</navigator> -->
- </view>
- <view style="height: 80rpx;"></view>
- </view>
- <view class="con" style="margin-top: -80rpx;" v-if="userInfos.userType!=1">
- <view class="order">
- <navigator url="" hover-class="none" class="tits dflex" @click="jumpUrl('match/activity/activity')">
- <view class="flex">我的活动</view>
- 全部活动
- <image src="../../static/pages/images/more.png" class="rico"></image>
- </navigator>
- <view class="ddflex" style="justify-content: space-between;padding: 40rpx 0rpx;">
- <view class="order-item ddflex fflex" @click="jumpUrl('match/activity/activity?current=2')">
- <image src="/static/images/hd_dcy.png"></image>
- <view>待参与</view>
- </view>
- <vieW class="order-line"></vieW>
- <view class="order-item ddflex fflex" @click="jumpUrl('match/activity/activity?current=3')">
- <image src="/static/images/hd_ywc.png"></image>
- <view>已完成</view>
- </view>
- </view>
- </view>
- </view>
- <view class="con" style="margin-top: -80rpx;" v-else>
- <view class="order">
- <view class="ddflex" style="justify-content: space-between;padding: 40rpx 0rpx;">
- <view class="order-item ddflex fflex" @click="jumpUrl('match/activityManage/activityManage')">
- <image src="/static/images/hdgl.png"></image>
- <view>活动管理</view>
- </view>
- <vieW class="order-line"></vieW>
- <view class="order-item ddflex fflex" @click="jumpUrl('library/poster/index')">
- <image src="/static/images/hbtg.png"></image>
- <view>海报推广</view>
- </view>
- <vieW class="order-line"></vieW>
- <view class="order-item ddflex fflex" @click="jumpUrl('library/page/page')">
- <image src="/static/images/yxdy.png"></image>
- <view>营销单页</view>
- </view>
- </view>
- </view>
- </view>
- <view class="con" v-if="!userInfos.userType">
- <view class="order">
- <navigator url="" hover-class="none" class="tits dflex" @click="jumpUrl('mine/order/order')">
- <view class="flex">我的顾问</view>
- </navigator>
- <view class="service-person">
- <view class="ddflex" @click="jumpUrl('/card/index/index')">
- <image class="service-person-header" :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
- <view>
- <view class="service-person-name ddflex">
- <view>Hi~我是{{recommendCard.realName}}</view>
- <image src="/static/images/rico2.png" class="rico"></image>
- </view>
- <view class="service-person-number">(工号:{{recommendCard.jobNumber}}) 欢迎您来到我的微页</view>
- <view class="service-person-options ddflex">
- <view class="service-person-option ddflex">
- <image src="/static/pages/images/dz_hui.png"></image>
- <view>{{recommendCard.favorableComment}}%</view>
- </view>
- <view class="service-person-option ddflex">
- <image src="/static/pages/images/cy_hui.png"></image>
- <view>入司{{recommendCard.inDate?getAgeFn(recommendCard.inDate):1}}年</view>
- </view>
- <view class="service-person-option ddflex">
- <image src="/static/pages/images/fw_hui.png"></image>
- <view>为{{recommendCard.cntCust?recommendCard.cntCust:0}}人服务</view>
- </view>
- </view>
- </view>
- </view>
- <view class="service-person-phone ddflex">
- <view class="ddflex flex" style="justify-content: center;" @click.stop="callPhone(recommendCard.phone)">
- <image src="/static/pages/images/phone1.png"></image>
- <view>联系电话</view>
- </view>
- <view class="order-line" v-if="recommendCard.phone&&recommendCard.wechat"></view>
- <view class="ddflex flex" style="justify-content: center;" @click.stop="isShowCodePop=true">
- <image style="width: 35rpx;height: 28rpx;" src="/static/pages/images/qw.png"></image>
- <view>加企微信</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="box mlist" v-if="userInfos.userType!=1">
- <navigator class="li ddflex" url="/promote/invite/invite" hover-class="none">
- <image src="/static/images/yqhy.png" class="mico"></image>
- <view class="fflex">推荐好友</view>
- <image src="../../static/pages/images/more.png" class="rico"></image>
- </navigator>
- </view>
- <view class="box mlist" v-else>
- <navigator class="li ddflex" url="/card/index/index" hover-class="none">
- <image src="/static/images/wdmp.png" class="mico"></image>
- <view class="fflex">我的名片</view>
- <image src="../../static/pages/images/more.png" class="rico"></image>
- </navigator>
- </view>
- <view class="box mlist">
- <view class="li ddflex">
- <view class="fflex">
- <contact-button class-name="ddflex" img-url="/static/images/lxkf.png"
- img-style='width: 49rpx;height: 49rpx;margin: 0 25rpx 0 0;' button-text="联系客服"
- styles="line-height:initial;"></contact-button>
- </view>
- <image src="../../static/pages/images/more.png" class="rico"></image>
- </view>
- <navigator class="li ddflex" url="/mine/help/help" hover-class="none">
- <image src="/static/images/bzzx.png" class="mico" mode="aspectFit"></image>
- <view class="fflex">帮助中心</view>
- <image src="../../static/pages/images/more.png" class="rico"></image>
- </navigator>
- <navigator class="li ddflex" url="/mine/feedback/feedback" hover-class="none">
- <image src="/static/images/jyfk.png" class="mico"></image>
- <view class="fflex">建议与反馈</view>
- <image src="../../static/pages/images/more.png" class="rico"></image>
- </navigator>
- <navigator class="li ddflex" url="/pages/about/about" hover-class="none">
- <image src="/static/images/gywm.png" class="mico"></image>
- <view class="fflex">关于中国人寿</view>
- <image src="../../static/pages/images/more.png" class="rico"></image>
- </navigator>
- </view>
- <!-- <footer-copyright></footer-copyright> -->
- <view style="height: 80rpx;"></view>
- <!-- <view class="placeholder-view" :style="'height:' + (bottomBlankHeignt + 115) + 'rpx'"></view> -->
- <foot channel="user"></foot>
- <update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" v-if="isShowUpdate"
- @closeUpdate="closeUpdate" @updateInfo="updateInfo" @updateMobile="updateMobile"></update-userinfo>
- <msgNumber></msgNumber>
-
- <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle"></view>
- <view class="code-pop" v-if="isShowCodePop">
- <view class="code-content" v-if="recommendCard.wechatCode">
- <image :src="recommendCard.wechatCode?recommendCard.wechatCode:'/static/images/wxCode.jpg'" show-menu-by-longpress="true"></image>
- <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
- </view>
- <view class="code-text" v-else>
- <view>微信号</view>
- <view>{{recommendCard.wechat}}</view>
- </view>
- <view class="code-btn" @click="copy(recommendCard.wechat)">
- 复制微信号
- </view>
- </view>
- <bindJobnum v-if="isShowBind" @closeBind="closeBind()"></bindJobnum>
- </view>
- </template>
- <script>
- // pages/user/user.js
- const app = getApp();
- const req = require('../../utils/request.js');
- const util = require('../../utils/util.js');
- const route = require('../../utils/route');
- import foot from '../../components/nav-bar/index';
- import footerCopyright from '../../components/footer-copyright/footer-copyright';
- import bindJobnum from '../../components/bind-jobnum/index.vue';
- import msgNumber from '../../components/msg-number/index.vue';
- export default {
- data() {
- return {
- systems: {},
- skinNotColor: req.public.skinNotColor,
- picUrlss: req.public.picUrls,
- bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
- // merchantId: '',
- iconSrc: req.public.iconSrc,
- //头部页面背景链接
- isHideVip: true,
- //隐藏会员
- isVip: true,
- //是否是会员
- IS_secondary_members: 0,
- distr: '',
- userinfovip: '',
- userMoney: '',
- istetphone: '',
- logo: '',
- name: '',
- is_open_wallet: '',
- Open_Points_Mall: '',
- statistics: '',
- vipList: '',
- rongkang: req.header.appId,
- isSign: '',
- sign: 0,
- isLogin: false,
- noLogin: false,
- is_open_shop: '',
- isShowSign: false, //是否显示签到按钮
- config: {},
- userInfo: {},
- userInfos: {},
- isShowUpdate: false, //是否显示更新信息弹窗
- isUpdateInfo: false, //更新用户信息
- isUpdateMobile: false, //绑定手机号
- recommendCard:{},
- isShowCodePop:false,
- isShowBind:false
- };
- },
- components: {
- foot,
- footerCopyright,
- bindJobnum,
- msgNumber
- },
- props: {},
- onLoad(options) {
- uni.hideTabBar();
- uni.setNavigationBarColor({
- frontColor: this.skinNotColor ? '#000' : '#ffffff',
- backgroundColor: this.skinNotColor ? '#fff' : req.public.titleTopBgColor
- });
- if (JSON.parse(req.getStorage('configRes')).IS_secondary_members) {
- let IS_secondary_members = JSON.parse(req.getStorage('configRes')).IS_secondary_members;
- console.log(IS_secondary_members);
- this.setData({
- IS_secondary_members: IS_secondary_members
- });
- }
- this.userInfo = req.getStorage('userInfo');
- // #ifdef MP-WEIXIN
- let userInfo = req.getStorage('userInfo');
- if (req.isAuth()) {
- setTimeout(res => {
- if (!userInfo.avatar || userInfo.nickName == '微信用户' || this.userInfos.nickName == '微信用户') {
- this.isShowUpdate = true;
- this.isUpdateInfo = true;
- }
- if (userInfo.avatar && !userInfo.mobile && (this.userInfos && !this.userInfos.mobile)) {
- this.isShowUpdate = true;
- this.isUpdateMobile = true;
- }
- }, 2000);
- }
- // #endif
- },
- onShow: function() {
- let userInfo = req.getStorage('userInfo');
- this.isLogin = req.isLogins(false);
- if (this.isLogin) {
- this.getMy();
- this.getAbout();
- this.getRecommendCard()
- this.noLogin = true;
- } else {
- this.noLogin = false;
- }
- },
- methods: {
- jumpUrl(url) {
- if (req.isLogins(true)) {
- app.globalData.navigateTo(url);
- }
- },
- jumpMerchantManage() {
- let token = req.getStorage('AUTH_TOKEN');
- this.jumpUrl('merchant/index?appId=' + req.header.appId + '&token=' + token);
- },
- gouserInfo() {
- app.globalData.navigateTo('mine/userinfo/userinfo');
- },
- getMy() {
- let that = this;
- req.getRequest('/api/user/info', {}, data => {
- // data.merchantId = req.getStorage('userInfo').merchantId
- data.nickName = req.excludeSpecial(data.nickName);
- this.userInfos = data;
- // that.setData(data); // this.isbindmobile();
- console.log('userinfo==' + JSON.stringify(data));
- this.getuserMoney();
- // console.log(this);
- });
- },
- getuserMoney() {
- let is_open_wallet = JSON.parse(req.getStorage('configRes')).is_open_wallet;
- if (is_open_wallet) {
- if (JSON.parse(is_open_wallet).isOpenWallet == 1) {
- route.extendNew({}, res => {
- // console.log(parseFloat(res.all).toFixed(2));
- if (res)
- this.setData({
- userMoney: parseFloat(res.all).toFixed(2)
- });
- });
- }
- }
- },
- getAbout() {
- var _this = this;
- req.getRequest('/api/other/config', {}, function(res) {
- _this.phone = res.CONFIG_SERVICE_HOT_MOBILE;
- _this.config = res;
- _this.setData({
- istetphone: res.user_bind_mobile,
- logo: res.CONFIG_PROJECT_LOGO,
- name: res.CONFIG_PROJECT_TITLE
- });
- // console.log(res);
- if (res && res.is_open_wallet) {
- _this.setData({
- is_open_wallet: JSON.parse(res.is_open_wallet)
- });
- }
- if (res.is_open_shop) {
- _this.is_open_shop = res.is_open_shop;
- }
- });
- },
- callPhone() {
- if (req.isLogins(true)) {
- uni.makePhoneCall({
- phoneNumber: this.phone
- });
- }
- },
- goUrl() {
- app.globalData.openPage('mine/vip/vip');
- },
- showInfo(index) {
- if (!this.vipList[index].isShowInfo) {
- this.vipList.map(it => {
- it.isShowInfo = false;
- return it;
- });
- }
- this.vipList[index].isShowInfo = !this.vipList[index].isShowInfo;
- },
- closeUpdate() {
- this.isShowUpdate = false;
- },
- updateInfo(e) {
- this.isUpdateInfo = e;
- this.getMy();
- },
- updateMobile(e) {
- this.isUpdateMobile = e;
- this.getMy();
- },
- closeBind(){
- this.isShowBind = false;
- },
- // 判断强制绑定手机号
- // isbindmobile() {
- // if (req.getStorage('configRes')) {
- // let configRes = JSON.parse(req.getStorage('configRes'))
- // this.setData({ istetphone: configRes.user_bind_mobile, logo: configRes.CONFIG_PROJECT_LOGO, name: configRes.CONFIG_PROJECT_TITLE })
- // } else {
- // req.g('/api/config', (res) => {
- // req.setStorage('configRes', JSON.stringify(res))
- // this.setData({ istetphone: res.user_bind_mobile, logo: res.CONFIG_PROJECT_LOGO, name: res.CONFIG_PROJECT_TITLE })
- // })
- // }
- // if(this.data.istetphone=='1'){
- // // 获取用户手机号
- // let userInfo= req.getStorage('userInfo')
- // if(userInfo.mobile==null||userInfo.mobile==''){
- // console.log("获取用户手机号===============================")
- // app.openPage('pages/authorize/authorize?bindmobile=1')
- // }
- // }
- // },
- // 获取推荐销售
- getRecommendCard(){
- req.getRequest('/api/visiting/card/recommendCardInfo',{},res=>{
- this.recommendCard = res
- })
- },
- getAgeFn(date){
- console.log('getAge',date)
- return util.getAge(date)
- },
- // 拨打电话
- callPhone(val) {
- if(!val) return false
- uni.makePhoneCall({
- phoneNumber: val
- });
- },
- copy(val){
- this.isShowCodePop = false
- uni.setClipboardData({
- data: val,
- complete() {
- req.msg('复制成功')
- }
- })
- },
- },
- created() {
- const systemInfo = uni.getSystemInfoSync();
- // px转换到rpx的比例
- let pxToRpxScale = 750 / systemInfo.windowWidth;
- let systems = {
- ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
- navigationHeight: 44 * pxToRpxScale // 导航栏的高度
- };
- systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
- this.systems = systems;
- }
- };
- </script>
- <style>
- @import './user.css';
- </style>
|