user.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. <template>
  2. <view>
  3. <view :class="'mine' + (skinNotColor ? ' not-color' : '')+(config.greyTheme==1?' grayTheme':'')">
  4. <view :style="'height:' + systems.barHeight + 'rpx;'"></view>
  5. <view
  6. :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;'">
  7. 我的
  8. </view>
  9. <image src="../../static/pages/images/userBg.png" class="wdbg" @click="jumpUrl('mine/userinfo/userinfo')">
  10. </image>
  11. <view class="minec">
  12. <view class="minec-img" @click="jumpUrl('mine/userinfo/userinfo')">
  13. <image :src="userInfos.avatar ? userInfos.avatar : '/static/pages/images/userimg.png'"
  14. mode="aspectFit" class="user"></image>
  15. </view>
  16. <view class="mines" @click="jumpUrl('mine/userinfo/userinfo')" v-if="isLogin">
  17. <view class="ddflex">
  18. {{ userInfos.nickName }}
  19. <view class="ddflex" style="font-size: 24rpx;font-weight: 400;" @click.stop="isShowBind=true" v-if="userInfos.userType!=1">
  20. <image style="width: 23rpx;height: 22rpx;margin-right: 10rpx;" src="/static/images/bind.png" class="auth-img"></image>
  21. 绑定工号
  22. </view>
  23. <view class="ddflex" style="font-size: 24rpx;font-weight: 400;" v-if="userInfos.userType==1&&userInfos.saleNo">
  24. <image style="width: 23rpx;height: 22rpx;margin-right: 10rpx;" src="/static/images/bind.png" class="auth-img"></image>
  25. {{ userInfos.saleNo }}
  26. </view>
  27. </view>
  28. <text class="edu" v-if="userInfos.mobile">{{ userInfos.mobile }}</text>
  29. </view>
  30. <view class="flex" v-else><text class="login-btn" @click="jumpUrl('')">点击登录</text></view>
  31. <view class="rule dflex" @click="isSign == 0 || sign == 1 ? jumpUrl('') : signFun()" v-if="isShowSign">
  32. <image src="/static/pages/images/qdico.png"></image>
  33. {{ !isLogin ? '签到' : isSign == 0 || sign == 1 ? '已签到' : '签到' }}
  34. </view>
  35. <!-- </navigator> -->
  36. </view>
  37. <view class="datas dflex">
  38. <!-- @click="jumpUrl('mine/coupons/coupons')" -->
  39. <navigator url="" hover-class="none" class="li" @click="jumpUrl('mine/collect/collect')">
  40. <text>{{ myCount.matchNo ? myCount.matchNo : '0' }}</text>
  41. 我的收藏
  42. </navigator>
  43. <navigator url="" hover-class="none" class="li" @click="jumpUrl('mine/follow/index')">
  44. <text>{{ myCount.followNo ? myCount.followNo : '0' }}</text>
  45. 我的关注
  46. </navigator>
  47. <navigator url="" hover-class="none" class="li"
  48. @click="jumpUrl('match/activity/activity')">
  49. <text>{{ myCount.enlistMatchNo ? myCount.enlistMatchNo : '0' }}</text>
  50. 参与活动
  51. </navigator>
  52. <!-- <navigator url="/mine/footprint/footprint" hover-class="none" class="li"><text>{{footprint?footprint:'0'}}</text>足迹</navigator> -->
  53. </view>
  54. <view style="height: 80rpx;"></view>
  55. </view>
  56. <view :class="(config.greyTheme==1?' grayTheme':'')">
  57. <view class="con" style="margin-top: -80rpx;" v-if="userInfos.userType!=1">
  58. <view class="order">
  59. <navigator url="" hover-class="none" class="tits dflex" @click="jumpUrl('match/activity/activity')">
  60. <view class="flex">我的活动</view>
  61. 全部活动
  62. <image src="../../static/pages/images/more.png" class="rico"></image>
  63. </navigator>
  64. <view class="ddflex" style="justify-content: space-between;padding: 40rpx 0rpx;">
  65. <view class="order-item ddflex fflex" @click="jumpUrl('match/activity/activity?current=2')">
  66. <image src="/static/images/hd_dcy.png"></image>
  67. <view>待参与</view>
  68. </view>
  69. <vieW class="order-line"></vieW>
  70. <view class="order-item ddflex fflex" @click="jumpUrl('match/activity/activity?current=3')">
  71. <image src="/static/images/hd_ywc.png"></image>
  72. <view>已完成</view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="con" style="margin-top: -80rpx;" v-else>
  78. <view class="order">
  79. <view class="ddflex" style="justify-content: space-between;padding: 40rpx 0rpx;">
  80. <!-- <view class="order-item ddflex fflex" @click="jumpUrl('match/activityManage/activityManage')">
  81. <image src="/static/images/hdgl.png"></image>
  82. <view>活动管理</view>
  83. </view>
  84. <vieW class="order-line"></vieW> -->
  85. <view class="order-item ddflex fflex" @click="jumpUrl('library/poster/index')">
  86. <image src="/static/images/hbtg.png"></image>
  87. <view>海报推广</view>
  88. </view>
  89. <vieW class="order-line"></vieW>
  90. <view class="order-item ddflex fflex" @click="jumpUrl('library/page/page')">
  91. <image src="/static/images/yxdy.png"></image>
  92. <view>营销单页</view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="con" v-if="!userInfos.userType&&recommendCard">
  98. <view class="order">
  99. <navigator url="" hover-class="none" class="tits dflex" @click="jumpUrl('mine/order/order')">
  100. <view class="flex">我的顾问</view>
  101. </navigator>
  102. <view class="service-person">
  103. <view class="dflex" @click="jumpUrl('/card/index/index')">
  104. <image class="service-person-header" :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
  105. <view class="fflex">
  106. <view class="dflex">
  107. <view class="fflex">
  108. <view class="service-person-name ddflex">
  109. <view>Hi~我是{{recommendCard.realName}}</view>
  110. <image src="/static/images/rico2.png" class="rico"></image>
  111. </view>
  112. <view class="service-person-number">(工号:{{recommendCard.jobNumber}}) 您的1V1专属保险顾问</view>
  113. </view>
  114. <view class="service-person-btn" @click="jumpSingleChatRoom()">在线咨询</view>
  115. </view>
  116. <view class="service-person-options ddflex">
  117. <view class="service-person-option ddflex">
  118. <image src="/static/pages/images/dz_hui.png"></image>
  119. <view>{{recommendCard.favorableComment}}%</view>
  120. </view>
  121. <view class="service-person-option ddflex">
  122. <image src="/static/pages/images/cy_hui.png"></image>
  123. <view>入司{{recommendCard.inDate?monthDayDiff(recommendCard.inDate):'1年'}}</view>
  124. </view>
  125. <view class="service-person-option ddflex">
  126. <image src="/static/pages/images/fw_hui.png"></image>
  127. <view>为{{recommendCard.cntCust?recommendCard.cntCust:0}}人服务</view>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="service-person-phone ddflex">
  133. <view class="ddflex flex" style="justify-content: center;" @click.stop="callPhone(recommendCard.phone)">
  134. <image src="/static/pages/images/phone1.png"></image>
  135. <view>联系电话</view>
  136. </view>
  137. <view class="order-line" v-if="recommendCard.phone&&(recommendCard.wechat||recommendCard.wechatCode||recommendCard.wechatCompanyCode)"></view>
  138. <view class="ddflex flex" v-if="recommendCard.wechat||recommendCard.wechatCode||recommendCard.wechatCompanyCode" style="justify-content: center;" @click.stop="(recommendCard.wechat||recommendCard.wechatCode||recommendCard.wechatCompanyCode)?showCodePop():''">
  139. <image style="width: 35rpx;height: 28rpx;" src="/static/pages/images/qw.png"></image>
  140. <view>加微信</view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <!-- url="/promote/invite/invite" -->
  147. <view class="box mlist" v-if="userInfos.userType!=1">
  148. <button class="li ddflex" open-type="share">
  149. <image src="/static/images/yqhy.png" class="mico"></image>
  150. <view class="fflex">推荐好友</view>
  151. <image src="../../static/pages/images/more.png" class="rico"></image>
  152. </button>
  153. </view>
  154. <view class="box mlist" v-else>
  155. <navigator class="li ddflex" @click="toCard()" hover-class="none">
  156. <image src="/static/images/wdmp.png" class="mico"></image>
  157. <view class="fflex">我的名片</view>
  158. <image src="../../static/pages/images/more.png" class="rico"></image>
  159. </navigator>
  160. <!-- <navigator class="li ddflex" @click="jumpUrl('mine/clientManage/clientManage')" hover-class="none">
  161. <image src="/static/images/wdmp.png" class="mico"></image>
  162. <view class="fflex">我的客户</view>
  163. <image src="../../static/pages/images/more.png" class="rico"></image>
  164. </navigator> -->
  165. </view>
  166. <view class="box mlist">
  167. <view class="li ddflex" v-if="!config.INTELLIGENT_CUSTOMER_SERVICE">
  168. <view class="fflex">
  169. <contact-button class-name="ddflex" img-url="/static/images/lxkf.png"
  170. img-style='width: 49rpx;height: 49rpx;margin: 0 25rpx 0 0;' button-text="联系客服"
  171. styles="line-height:initial;"></contact-button>
  172. </view>
  173. <image src="../../static/pages/images/more.png" class="rico"></image>
  174. </view>
  175. <navigator class="li ddflex" @click="toKf()" hover-class="none" v-else>
  176. <image src="/static/images/lxkf.png" class="mico" mode="aspectFit"></image>
  177. <view class="fflex">智能客服</view>
  178. <image src="../../static/pages/images/more.png" class="rico"></image>
  179. </navigator>
  180. <navigator class="li ddflex" url="/mine/help/help" hover-class="none">
  181. <image src="/static/images/bzzx.png" class="mico" mode="aspectFit"></image>
  182. <view class="fflex">帮助中心</view>
  183. <image src="../../static/pages/images/more.png" class="rico"></image>
  184. </navigator>
  185. <navigator class="li ddflex" url="/mine/feedback/feedback" hover-class="none">
  186. <image src="/static/images/jyfk.png" class="mico"></image>
  187. <view class="fflex">建议与反馈</view>
  188. <image src="../../static/pages/images/more.png" class="rico"></image>
  189. </navigator>
  190. <navigator class="li ddflex" url="/pages/about/about" hover-class="none">
  191. <image src="/static/images/gywm.png" class="mico"></image>
  192. <view class="fflex">关于中国人寿</view>
  193. <image src="../../static/pages/images/more.png" class="rico"></image>
  194. </navigator>
  195. <navigator class="li ddflex" url="/mine/set/set" hover-class="none">
  196. <image src="/static/images/setting.png" class="mico"></image>
  197. <view class="fflex">设置中心</view>
  198. <image src="../../static/pages/images/more.png" class="rico"></image>
  199. </navigator>
  200. </view>
  201. </view>
  202. <!-- <footer-copyright></footer-copyright> -->
  203. <view style="height: 80rpx;"></view>
  204. <!-- <view class="placeholder-view" :style="'height:' + (bottomBlankHeignt + 115) + 'rpx'"></view> -->
  205. <foot channel="user"></foot>
  206. <!-- <to-userinfo v-if="isShowUpdate"></to-userinfo> -->
  207. <msgNumber bottom="230rpx"></msgNumber>
  208. <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle"></view>
  209. <view class="code-pop" v-if="isShowCodePop">
  210. <view v-if="recommendCard.wechatCode||recommendCard.wechatCompanyCode" class="ddflex" style="justify-content: center;">
  211. <view class="code-content" v-if="recommendCard.wechatCode">
  212. <image :src="recommendCard.wechatCode?recommendCard.wechatCode:'/static/images/wxCode.jpg'" :style="recommendCard.wechatCompanyCode?'width: 200rpx;height: 200rpx;':''"
  213. show-menu-by-longpress="true"></image>
  214. <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
  215. </view>
  216. <view class="code-content" v-if="recommendCard.wechatCompanyCode" :style="recommendCard.wechatCode?'margin-left:30rpx':''">
  217. <image :src="recommendCard.wechatCompanyCode?recommendCard.wechatCompanyCode:'/static/images/wxCode.jpg'" :style="recommendCard.wechatCode?'width: 200rpx;height: 200rpx;':''"
  218. show-menu-by-longpress="true"></image>
  219. <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别企微二维码</view>
  220. </view>
  221. </view>
  222. <view class="code-text" v-else>
  223. <view>微信号</view>
  224. <view>{{recommendCard.wechat}}</view>
  225. </view>
  226. <view class="code-btn" @click="copy(recommendCard.wechat)" v-if="recommendCard.wechat">
  227. 复制微信号
  228. </view>
  229. </view>
  230. <bindJobnum v-if="isShowBind" @closeBind="closeBind()"></bindJobnum>
  231. <update-userinfonew :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" v-if="isShowUpdate" @closeUpdate="closeUpdate" @updateInfo="updateInfo" @updateMobile="updateMobile"></update-userinfonew>
  232. </view>
  233. </template>
  234. <script>
  235. // pages/user/user.js
  236. const app = getApp();
  237. const req = require('../../utils/request.js');
  238. const util = require('../../utils/util.js');
  239. const route = require('../../utils/route');
  240. import foot from '../../components/nav-bar/index';
  241. import footerCopyright from '../../components/footer-copyright/footer-copyright';
  242. import bindJobnum from '../../components/bind-jobnum/index.vue';
  243. import msgNumber from '../../components/msg-number/index.vue';
  244. export default {
  245. data() {
  246. return {
  247. systems: {},
  248. skinNotColor: req.public.skinNotColor,
  249. picUrlss: req.public.picUrls,
  250. bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
  251. // merchantId: '',
  252. iconSrc: req.public.iconSrc,
  253. //头部页面背景链接
  254. isHideVip: true,
  255. //隐藏会员
  256. isVip: true,
  257. //是否是会员
  258. IS_secondary_members: 0,
  259. distr: '',
  260. userinfovip: '',
  261. userMoney: '',
  262. istetphone: '',
  263. logo: '',
  264. name: '',
  265. is_open_wallet: '',
  266. Open_Points_Mall: '',
  267. statistics: '',
  268. vipList: '',
  269. rongkang: req.header.appId,
  270. isSign: '',
  271. sign: 0,
  272. isLogin: false,
  273. noLogin: false,
  274. is_open_shop: '',
  275. isShowSign: false, //是否显示签到按钮
  276. config: {},
  277. userInfo: {},
  278. userInfos: {},
  279. isShowUpdate: false, //是否显示更新信息弹窗
  280. isUpdateInfo: false,//更新用户信息
  281. isUpdateMobile: false,//绑定手机号
  282. recommendCard:'',
  283. isShowCodePop:false,
  284. isShowBind:false,
  285. myCount:{
  286. enlistMatchNo:0,
  287. followNo:0,
  288. matchNo:0
  289. }
  290. };
  291. },
  292. components: {
  293. foot,
  294. footerCopyright,
  295. bindJobnum,
  296. msgNumber
  297. },
  298. props: {},
  299. onLoad(options) {
  300. uni.hideTabBar();
  301. uni.setNavigationBarColor({
  302. frontColor: this.skinNotColor ? '#000' : '#ffffff',
  303. backgroundColor: this.skinNotColor ? '#fff' : req.public.titleTopBgColor
  304. });
  305. if (JSON.parse(req.getStorage('configRes')).IS_secondary_members) {
  306. let IS_secondary_members = JSON.parse(req.getStorage('configRes')).IS_secondary_members;
  307. console.log(IS_secondary_members);
  308. this.setData({
  309. IS_secondary_members: IS_secondary_members
  310. });
  311. }
  312. this.userInfo = req.getStorage('userInfo');
  313. // #ifdef MP-WEIXIN
  314. let userInfo = req.getStorage('userInfo');
  315. if (req.isAuth()) {
  316. // setTimeout(res => {
  317. // this.isShowUpdate = true;
  318. // }, 500);
  319. }
  320. // #endif
  321. req.saveBehaviorNew('',16,4)
  322. },
  323. onShow: function() {
  324. let userInfo = req.getStorage('userInfo');
  325. this.isLogin = req.isLogins(false);
  326. if (this.isLogin) {
  327. this.getMy();
  328. this.getAbout();
  329. this.getMyCount()
  330. this.noLogin = true;
  331. console.log("userInfo",userInfo)
  332. this.getUpdate()
  333. } else {
  334. this.noLogin = false;
  335. }
  336. },
  337. onShareAppMessage(res) {
  338. if (res.from == 'button') {
  339. let userInfo = req.getStorage('userInfo');
  340. return {
  341. title: userInfo.nickName+'邀请您加入'+this.config.CONFIG_PROJECT_TITLE,
  342. path: '/pages/index/index',
  343. imageUrl: this.config.CONFIG_PROJECT_LOGO, // 分享图
  344. };
  345. }
  346. },
  347. methods: {
  348. jumpUrl(url) {
  349. if (req.isLogins(true)) {
  350. app.globalData.navigateTo(url);
  351. }
  352. },
  353. jumpMerchantManage() {
  354. let token = req.getStorage('AUTH_TOKEN');
  355. this.jumpUrl('merchant/index?appId=' + req.header.appId + '&token=' + token);
  356. },
  357. gouserInfo() {
  358. app.globalData.navigateTo('mine/userinfo/userinfo');
  359. },
  360. getMy() {
  361. let that = this;
  362. req.getRequest('/api/user/info', {}, data => {
  363. // data.merchantId = req.getStorage('userInfo').merchantId
  364. data.nickName = req.excludeSpecial(data.nickName);
  365. this.userInfos = data;
  366. // that.setData(data); // this.isbindmobile();
  367. console.log('userinfo==' + JSON.stringify(data));
  368. this.getRecommendCard()
  369. // console.log(this);
  370. });
  371. },
  372. getAbout() {
  373. var _this = this;
  374. req.getRequest('/api/other/config', {}, function(res) {
  375. _this.phone = res.CONFIG_SERVICE_HOT_MOBILE;
  376. _this.config = res;
  377. _this.setData({
  378. istetphone: res.user_bind_mobile,
  379. logo: res.CONFIG_PROJECT_LOGO,
  380. name: res.CONFIG_PROJECT_TITLE
  381. });
  382. // console.log(res);
  383. if (res && res.is_open_wallet) {
  384. _this.setData({
  385. is_open_wallet: JSON.parse(res.is_open_wallet)
  386. });
  387. }
  388. if (res.is_open_shop) {
  389. _this.is_open_shop = res.is_open_shop;
  390. }
  391. });
  392. },
  393. callPhone() {
  394. if (req.isLogins(true)) {
  395. uni.makePhoneCall({
  396. phoneNumber: this.phone
  397. });
  398. }
  399. },
  400. goUrl() {
  401. app.globalData.openPage('mine/vip/vip');
  402. },
  403. showInfo(index) {
  404. if (!this.vipList[index].isShowInfo) {
  405. this.vipList.map(it => {
  406. it.isShowInfo = false;
  407. return it;
  408. });
  409. }
  410. this.vipList[index].isShowInfo = !this.vipList[index].isShowInfo;
  411. },
  412. closeUpdate() {
  413. this.isShowUpdate = false;
  414. },
  415. updateInfo(e) {
  416. this.isUpdateInfo = e;
  417. this.getMy();
  418. },
  419. updateMobile(e) {
  420. this.isUpdateMobile = e;
  421. this.getMy();
  422. },
  423. getUpdate() {
  424. console.log('getUpdate')
  425. let userInfos = req.getStorage('userInfo')
  426. // if ((!userInfos.avatar || userInfos.avatar.indexOf('thirdwx.qlogo') > -1 || !userInfos.nickName || userInfos.nickName.indexOf('用户') > -1) ) {
  427. // console.log('没有昵称')
  428. // this.isShowUpdate = true;
  429. // this.isUpdateInfo = true;
  430. // return false;
  431. // }
  432. if(!userInfos.mobile){
  433. console.log('没有手机号')
  434. this.isShowUpdate = true
  435. this.isUpdateMobile = true
  436. return false;
  437. }
  438. return true;
  439. },
  440. closeBind(){
  441. this.isShowBind = false;
  442. },
  443. // 判断强制绑定手机号
  444. // isbindmobile() {
  445. // if (req.getStorage('configRes')) {
  446. // let configRes = JSON.parse(req.getStorage('configRes'))
  447. // this.setData({ istetphone: configRes.user_bind_mobile, logo: configRes.CONFIG_PROJECT_LOGO, name: configRes.CONFIG_PROJECT_TITLE })
  448. // } else {
  449. // req.g('/api/config', (res) => {
  450. // req.setStorage('configRes', JSON.stringify(res))
  451. // this.setData({ istetphone: res.user_bind_mobile, logo: res.CONFIG_PROJECT_LOGO, name: res.CONFIG_PROJECT_TITLE })
  452. // })
  453. // }
  454. // if(this.data.istetphone=='1'){
  455. // // 获取用户手机号
  456. // let userInfo= req.getStorage('userInfo')
  457. // if(userInfo.mobile==null||userInfo.mobile==''){
  458. // console.log("获取用户手机号===============================")
  459. // app.openPage('pages/authorize/authorize?bindmobile=1')
  460. // }
  461. // }
  462. // },
  463. // 获取推荐销售
  464. getRecommendCard(){
  465. if(this.userInfos.userType==1){
  466. req.getRequest('/api/visiting/card/userInfo',{},res=>{
  467. this.recommendCard = res
  468. })
  469. }else{
  470. if(this.userInfos.manageSaleNo){
  471. req.getRequest('/api/visiting/card/recommendCardInfo',{},res=>{
  472. this.recommendCard = res
  473. })
  474. }else{
  475. this.recommendCard = ''
  476. }
  477. }
  478. },
  479. monthDayDiff(date){
  480. return util.monthDayDiff(date)
  481. },
  482. showCodePop(){
  483. this.isShowCodePop = true
  484. req.saveBehaviorNew(this.recommendCard.id,1,18)
  485. },
  486. // 拨打电话
  487. callPhone(val) {
  488. if(!val) return false
  489. uni.makePhoneCall({
  490. phoneNumber: val,
  491. success(res){
  492. req.saveBehaviorNew(this.recommendCard.id,1,17,this.recommendCard.phone)
  493. }
  494. });
  495. },
  496. copy(val){
  497. this.isShowCodePop = false
  498. uni.setClipboardData({
  499. data: val,
  500. complete() {
  501. req.msg('复制成功')
  502. }
  503. })
  504. },
  505. jumpSingleChatRoom() {
  506. if (this.recommendCard) {
  507. req.jumpSingleChatRoom(this.recommendCard.userId, this.recommendCard.avatar, this.recommendCard
  508. .realName);
  509. req.saveBehaviorNew(this.recommendCard.id,1,14)
  510. }
  511. },
  512. getMyCount(){
  513. req.getRequest('/api/my/count',{},res=>{
  514. this.myCount = res
  515. })
  516. },
  517. toCard(){
  518. if(this.recommendCard){
  519. if(this.recommendCard.auditState==0){
  520. // 待审核
  521. this.jumpUrl('card/success/success?state=0')
  522. return false
  523. }else if(this.recommendCard.auditState==1){
  524. // 审核成功
  525. this.jumpUrl('card/success/success?state=1')
  526. return false
  527. }else if(this.recommendCard.auditState==2){
  528. // 审核失败
  529. this.jumpUrl('card/success/success?state=2&&msg='+this.recommendCard.auditFailReason)
  530. return false
  531. }
  532. }else{
  533. this.jumpUrl('card/create/create')
  534. }
  535. },
  536. // 智能客服
  537. toKf(){
  538. this.jumpUrl('pages/web/web?url='+encodeURIComponent(this.config.INTELLIGENT_CUSTOMER_SERVICE));
  539. }
  540. },
  541. created() {
  542. const systemInfo = uni.getSystemInfoSync();
  543. // px转换到rpx的比例
  544. let pxToRpxScale = 750 / systemInfo.windowWidth;
  545. let systems = {
  546. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  547. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  548. };
  549. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  550. this.systems = systems;
  551. }
  552. };
  553. </script>
  554. <style>
  555. @import './user.css';
  556. </style>