user.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087
  1. <template>
  2. <view class="user-index" :class="['qn-page-' + theme]">
  3. <view class="user-top" :style="{ height: vip_data.name ? '418rpx' : '348rpx' }">
  4. <!-- 装饰 -->
  5. <view class="circle-big" :style="{ height: vip_data.name ? '418rpx' : '348rpx' }">
  6. <view class="circle-one"></view>
  7. <view class="circle-two"></view>
  8. <view class="vip-view clearfix" v-if="vip_data.name">
  9. <view class="float_left">
  10. <view class="vip-name">
  11. <text class="ibonfont ibonhuiyuan" style="margin-right: 16rpx;"></text>
  12. {{ vip_data.name }}
  13. </view>
  14. <view class="desc" v-if="vip_data.vipDiscount === 5">享受全场{{ vip_data.discount - 0 }}折</view>
  15. <view class="desc" v-else>专享会员权益</view>
  16. </view>
  17. <view class="float_right vip-btn" @click="navTo(`/pagesT/user/VipDetail?id=${vip_data.id}`)">
  18. <block v-if="vip_data.isSelf">立即查看</block>
  19. <block v-else>立即开通</block>
  20. </view>
  21. </view>
  22. </view>
  23. <uniStatusBar />
  24. <!-- 未登录 -->
  25. <view class="user-info clearfix" v-if="!isLogin">
  26. <view class="ui-img float_left">
  27. <u-image shape="circle" width="120rpx" height="120rpx" error-icon="photo" src="https://onlineimg.qianniao.vip/user-re.png"></u-image>
  28. </view>
  29. <view class="user-name float_left" style="padding-top: 20rpx;">
  30. <Login @loginSuccess="loginSuccess"><view class="login-btn" slot="lBtn">登录/注册</view></Login>
  31. </view>
  32. <view class="float_right right-icon" @click="setUserInfo">
  33. <view><text class="ibonfont ibonshezhi21"></text></view>
  34. <view class="text">设置</view>
  35. </view>
  36. </view>
  37. <!-- 已登录 -->
  38. <view class="user-info clearfix" v-else>
  39. <view class="ui-img float_left" @click="setUserInfo">
  40. <u-image error-icon="photo" shape="circle" width="120rpx" height="120rpx" :src="userInfo.avatar"></u-image>
  41. <view class="edit-bth">{{ userStatus === 0 ? '去完善' : '编辑' }}</view>
  42. </view>
  43. <view class="user-name float_left">
  44. <view class="un-text ellipsis" v-if="userInfo.name">{{ userInfo.name || '匿名用户' }}</view>
  45. <view class="un-text-desc" v-if="(personnelReview === 5 || finishData === 5) && (userStatus !== 2 || enableStatus === 4)">
  46. <text v-if="enableStatus === 4">已禁用</text>
  47. <text v-else-if="userStatus === 0">待完善资料</text>
  48. <text v-else-if="userStatus === 1">审核中</text>
  49. <text v-else-if="userStatus === 3">已驳回,请重新完善资料</text>
  50. </view>
  51. <view class="un-text-desc" v-else>
  52. <text class="customer-type-name">{{ userInfo.customerSourceTypeName || '默认类型' }}</text>
  53. </view>
  54. <view class="un-text-desc" style="margin-left: 20rpx;" v-if="vip_data.isSelf"><text class="customer-type-name">VIP会员</text></view>
  55. </view>
  56. <view class="float_right right-icon" @click="setUserInfo">
  57. <view><text class="ibonfont ibonshezhi21"></text></view>
  58. <view class="text">设置</view>
  59. </view>
  60. </view>
  61. <block v-if="personnelReview === 5 && userStatus === 3">
  62. <u-notice-bar mode="horizontal" :list="['审核失败,原因:' + userInfo.auditFailReason]" :speed="100" :volume-icon="false" :more-icon="true"></u-notice-bar>
  63. </block>
  64. </view>
  65. <view class="num-view" v-if="isLogin">
  66. <view class="num-li" v-if="en_token !== aier_en_token" @click="navTo('/pagesT/money/Balance')">
  67. <view class="num-text">{{ Number(userInfo.memberBalance) || 0 }}</view>
  68. <view class="num-tit">余额</view>
  69. </view>
  70. <view class="num-li" @click="navTo('/pagesT/pointsMall/index')">
  71. <view class="num-text">{{ userInfo.integral || 0 }}</view>
  72. <view class="num-tit">积分</view>
  73. </view>
  74. <view class="num-li" @click="navTo('/pagesT/user/DiscountCoupon')">
  75. <view class="num-text">{{ userInfo.couponNum || 0 }}</view>
  76. <view class="num-tit">优惠券</view>
  77. </view>
  78. <view class="num-li" @click="navTo('/pagesT/user/Collection')">
  79. <view class="num-text">{{ userInfo.collNum || 0 }}</view>
  80. <view class="num-tit">收藏</view>
  81. </view>
  82. </view>
  83. <view class="model-view">
  84. <view class="model-tit clearfix">
  85. <view class="float_left">我的订单</view>
  86. <view class="float_right" @click="navTo('/pagesT/order/order?state=0')">
  87. <text>查看全部</text>
  88. <text class="ibonfont ibonjinru"></text>
  89. </view>
  90. </view>
  91. <view class="model-main fn-ul order-ul">
  92. <view class="fn-li" @click="navTo('/pagesT/order/order?state=' + 1)">
  93. <u-badge v-if="order_num['2'] > 0 && isLogin" type="error" :offset="[-16, 18]" :count="order_num['2']"></u-badge>
  94. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-dfk-' + theme + '.png'"></image></view>
  95. <view class="fn-label">待付款</view>
  96. </view>
  97. <view class="fn-li" @click="navTo('/pagesT/order/order?state=' + 2)">
  98. <u-badge v-if="order_num['3'] > 0 && isLogin" type="error" :offset="[-16, 18]" :count="order_num['3']"></u-badge>
  99. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-dfh-' + theme + '.png'"></image></view>
  100. <view class="fn-label">待发货</view>
  101. </view>
  102. <view class="fn-li" @click="navTo('/pagesT/order/order?state=' + 3)">
  103. <u-badge v-if="order_num['4'] > 0 && isLogin" type="error" :offset="[-16, 18]" :count="order_num['4']"></u-badge>
  104. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-dsh-' + theme + '.png'"></image></view>
  105. <view class="fn-label">待收货</view>
  106. </view>
  107. <view class="fn-li" @click="navTo('/pagesT/order/order?state=' + 4)">
  108. <u-badge v-if="order_num['5'] > 0 && isLogin" type="error" :offset="[-16, 18]" :count="order_num['5']"></u-badge>
  109. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-finish-' + theme + '.png'"></image></view>
  110. <view class="fn-label">已完成</view>
  111. </view>
  112. <!-- <view class="fn-li" v-if="en_token !== aier_en_token" @click="navTo('/pagesT/order/ReturnOrder')">
  113. <u-badge v-if="order_num['10'] > 0 && isLogin" type="error" :offset="[-16, 18]" :count="order_num['10']"></u-badge>
  114. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-service-' + theme + '.png'"></image></view>
  115. <view class="fn-label">售后服务</view>
  116. </view> -->
  117. </view>
  118. </view>
  119. <!-- 负责代表信息 -->
  120. <!-- <view class="model-view" v-if="isLogin">
  121. <view class="information-top">
  122. <image src="https://onlineimg.qianniao.vip/ic-db.png" class="img"></image>
  123. <view class="text">负责代表信息</view>
  124. </view>
  125. <view class="information-bottom">
  126. <ul class="ul-list">
  127. <li class="ul-item ellipsis">
  128. <text class="left">出货门店:</text>
  129. <text class="right">{{ userInfo.shopDate.name }}</text>
  130. </li>
  131. <li class="ul-item">
  132. <text class="left">业代姓名:</text>
  133. <text class="right">{{ userInfo.salesManName || '客服' }}</text>
  134. </li>
  135. <li class="ul-item">
  136. <text class="left">服务时间:</text>
  137. <text class="right">全天</text>
  138. </li>
  139. <li class="ul-item">
  140. <text class="left">门店电话:</text>
  141. <text class="right right-last" @click="lianxi(userInfo.salesManMobile || userInfo.shopDate.mobile)">
  142. {{ userInfo.salesManMobile || userInfo.shopDate.mobile }}
  143. </text>
  144. </li>
  145. </ul>
  146. </view>
  147. </view> -->
  148. <view class="model-view" v-if="en_token !== aier_en_token">
  149. <view class="model-tit">我的服务</view>
  150. <view class="model-main fn-ul">
  151. <view class="fn-li" @click="navTo('/pagesT/user/VipList')">
  152. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-vip-' + theme + '.png'"></image></view>
  153. <view class="fn-label">会员卡</view>
  154. </view>
  155. <view class="fn-li" @click="navTo('/pagesT/address/address')">
  156. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-address-' + theme + '.png'"></image></view>
  157. <view class="fn-label">我的地址</view>
  158. </view>
  159. <view class="fn-li" @click="navTo('/pagesT/user/DiscountCoupon')">
  160. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-coupon-' + theme + '.png'"></image></view>
  161. <view class="fn-label">我的优惠券</view>
  162. </view>
  163. <!-- <view class="fn-li" @click="goDistribution">
  164. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-fen-' + theme + '.png'"></image></view>
  165. <view class="fn-label">分销中心</view>
  166. </view> -->
  167. <view class="fn-li" @click="navTo('/pagesT/user/Collection')">
  168. <view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-fen-' + theme + '.png'"></image></view>
  169. <view class="fn-label">我的收藏</view>
  170. </view>
  171. </view>
  172. </view>
  173. <view class="model-view list-model-view">
  174. <view class="model-tit">工具与服务</view>
  175. <view class="model-main list-ul new-class">
  176. <view class="list-li clearfix" @click="openpop">
  177. <view class="fn-icon">
  178. <image src="https://onlineimg.qianniao.vip/ic-kf.png" mode="aspectFill"></image>
  179. <view>{{ userInfo.salesManName ? '专属客服' : '客服中心' }}</view>
  180. </view>
  181. </view>
  182. <view class="list-li clearfix" v-if="en_token === aier_en_token" @click="navTo('/pagesT/address/address')">
  183. <view class="fn-icon">
  184. <image src="https://onlineimg.qianniao.vip/ic-dz.png" mode="aspectFill"></image>
  185. <view>我的地址</view>
  186. </view>
  187. </view>
  188. <view class="list-li clearfix" v-if="en_token === aier_en_token" @click="navTo('/pagesT/money/CustomerBalanceDetail')">
  189. <view class="fn-icon">
  190. <image src="https://onlineimg.qianniao.vip/ic-3.png" mode="aspectFill"></image>
  191. <view>往来查询</view>
  192. </view>
  193. </view>
  194. <view class="list-li clearfix" v-if="en_token !== aier_en_token" @click="navTo('/pagesT/user/GetCoupon')">
  195. <view class="fn-icon">
  196. <image src="https://onlineimg.qianniao.vip/ix-lj.png" mode="aspectFill"></image>
  197. <view>领券中心</view>
  198. </view>
  199. </view>
  200. <view class="list-li clearfix" v-if="en_token !== aier_en_token" @click="navTo('/pagesT/user/Collection')">
  201. <view class="fn-icon">
  202. <image src="https://onlineimg.qianniao.vip/ix-order.png" mode="aspectFill"></image>
  203. <view>常购清单</view>
  204. </view>
  205. </view>
  206. <view class="list-li clearfix" @click="navTo('/pagesT/user/needSubmit')">
  207. <view class="fn-icon">
  208. <image src="https://onlineimg.qianniao.vip/ic-xq.png" mode="aspectFill"></image>
  209. <view>需求提报</view>
  210. </view>
  211. </view>
  212. <view class="list-li clearfix" @click="navTo('/pagesT/user/guquan')">
  213. <view class="fn-icon">
  214. <image src="https://onlineimg.qianniao.vip/ic-xq.png" mode="aspectFill"></image>
  215. <view>股权</view>
  216. </view>
  217. </view>
  218. <!-- #ifdef MP -->
  219. <view class="list-li">
  220. <button class="clearfix share-btn" open-type="share">
  221. <view class="fn-icon">
  222. <image src="https://onlineimg.qianniao.vip/ix-tj.png" mode="aspectFill"></image>
  223. <view class="share">推荐分享</view>
  224. </view>
  225. </button>
  226. </view>
  227. <!-- #endif -->
  228. <!-- #ifdef APP-PLUS -->
  229. <!-- <view class="list-li clearfix" @click="share">
  230. <view class="fn-icon">
  231. <image src="https://onlineimg.qianniao.vip/ic-5.png" mode="aspectFill"></image>
  232. <view>推荐分享</view>
  233. </view>
  234. </view> -->
  235. <!-- <view class="list-li clearfix" @click="share">
  236. <view class="float_left">
  237. <view class="fn-icon"><image src="https://onlineimg.qianniao.vip/ic-5.png" mode="aspectFill"></image></view>
  238. <text>推荐分享</text>
  239. </view>
  240. <view class="float_right"><text class="ibonfont ibonjinru"></text></view>
  241. </view> -->
  242. <!-- #endif -->
  243. <view class="list-li clearfix" v-if="en_token !== aier_en_token" @click="setUserInfo">
  244. <view class="fn-icon">
  245. <image src="https://onlineimg.qianniao.vip/ic-sz.png" mode="aspectFill"></image>
  246. <view>设置</view>
  247. </view>
  248. </view>
  249. </view>
  250. </view>
  251. <u-modal
  252. v-model="tip_model"
  253. @confirm="finishCofirm"
  254. @cancel="tipCancel"
  255. :show-cancel-button="true"
  256. content="请先完善资料,再进行购物"
  257. confirm-text="去完善"
  258. cancel-text="逛逛商城"
  259. ></u-modal>
  260. <Tabbar v-model="current"></Tabbar>
  261. <u-popup v-model="call_show" width="600rpx" mode="center" border-radius="20">
  262. <view class="call-pop">
  263. <view class="title">
  264. <text>专属客户经理</text>
  265. <view class="close-icon" @click="cancalCall"><u-icon name="close" size="28" color="#6c6c6c"></u-icon></view>
  266. </view>
  267. <view class="call-ul">
  268. <view class="call-li">
  269. <text class="label">客户经理:</text>
  270. <text class="value">{{ userInfo.salesManName }}</text>
  271. </view>
  272. <view class="call-li">
  273. <text class="label">联系方式:</text>
  274. <text class="value">{{ userInfo.salesManMobile }}</text>
  275. </view>
  276. </view>
  277. <view class="call-btn primary-btn" @click="lianxi(userInfo.salesManMobile)">一键通话</view>
  278. </view>
  279. </u-popup>
  280. </view>
  281. </template>
  282. <script>
  283. import Login from '@/components/Login.vue';
  284. import uniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue';
  285. import { getEnToken ,getToken} from '@/access/common.js';
  286. export default {
  287. components: {
  288. Login,
  289. uniStatusBar
  290. },
  291. // 下拉刷新
  292. onPullDownRefresh() {
  293. if (this.$store.state.hasLogin) {
  294. this.getCustomerInfo();
  295. this.getMyVipCards();
  296. // 获取分销文字设置
  297. this.getTxtSetting();
  298. this.getDistributionSetting();
  299. } else {
  300. uni.stopPullDownRefresh();
  301. }
  302. },
  303. data() {
  304. return {
  305. tip_model: false,
  306. call_show: false,
  307. current: 3,
  308. distributionSet: {},
  309. userInfo: {},
  310. avatar: '',
  311. vip_data: {},
  312. vip_num: 0,
  313. // 爱尔
  314. aier_en_token: '8ecdecee648713391dc144f29bea5ca7',
  315. en_token: getEnToken(),
  316. order_num: {}
  317. };
  318. },
  319. watch: {
  320. '$store.state.locationObj'(val) {
  321. if (JSON.stringify(val) === '{}') {
  322. this.getAuthorizeInfo();
  323. return;
  324. }
  325. if (this.$store.state.hasLogin) {
  326. this.getCustomerInfo();
  327. }
  328. },
  329. isLogin(val) {
  330. if (val) {
  331. // 获取用户详情
  332. this.getCustomerInfo();
  333. // 获取分销文字设置
  334. this.getTxtSetting();
  335. // 获取分销基础设置
  336. this.getDistributionSetting();
  337. this.getOrderStatusNum();
  338. } else {
  339. this.vip_data = {};
  340. }
  341. }
  342. },
  343. computed: {
  344. // 业代姓名
  345. salesManName() {
  346. if (this.$store.state.userStatus.salesManName) {
  347. return this.$store.state.userStatus.salesManName;
  348. } else {
  349. return '客服';
  350. }
  351. },
  352. // 门店电话
  353. salesManMobile() {
  354. if (this.$store.state.userStatus.salesManMobile) {
  355. return this.$store.state.userStatus.salesManMobile;
  356. } else {
  357. return this.$store.state.userStatus.enterpriseMobile;
  358. }
  359. },
  360. // 门店
  361. enterpriseName() {
  362. return this.$store.state.enterpriseInfo.enterpriseName;
  363. },
  364. baseSet() {
  365. return this.$store.state.baseSet;
  366. },
  367. enterprisemobile() {
  368. return this.$store.state.enterpriseInfo.mobile;
  369. },
  370. isLogin() {
  371. return this.$store.state.hasLogin;
  372. },
  373. // 客户审核
  374. personnelReview() {
  375. return this.baseSet.personnelReview;
  376. },
  377. userStatus() {
  378. return this.$store.state.userStatus.status;
  379. },
  380. enableStatus() {
  381. return this.$store.state.userStatus.enableStatus;
  382. },
  383. // 完善资料 4禁用 5启用
  384. finishData() {
  385. return this.baseSet.finishData;
  386. }
  387. },
  388. onLoad() {
  389. if (JSON.stringify(this.$store.state.locationObj) === '{}') {
  390. this.getAuthorizeInfo();
  391. return;
  392. }
  393. if (this.$store.state.hasLogin) {
  394. // 获取分销文字设置
  395. this.getTxtSetting();
  396. // 获取分销基础设置
  397. this.getDistributionSetting();
  398. // this.avatar = this.$common.getAvator();
  399. }
  400. // #ifdef MP-WEIXIN
  401. // 小程序的原生菜单中显示分享按钮
  402. uni.showShareMenu({
  403. withShareTicket: false,
  404. menus: ['shareAppMessage', 'shareTimeline']
  405. });
  406. // #endif
  407. },
  408. onShow() {
  409. if (this.$store.state.hasLogin) {
  410. // 获取用户详情
  411. this.getCustomerInfo();
  412. this.getOrderStatusNum();
  413. }
  414. },
  415. methods: {
  416. // #ifdef APP-PLUS
  417. share() {
  418. uni.share({
  419. provider: 'weixin',
  420. scene: 'WXSceneSession',
  421. type: 5,
  422. title: this.baseSet.shop,
  423. imageUrl: this.baseSet.images,
  424. success: function(res) {
  425. console.log('success:' + JSON.stringify(res));
  426. },
  427. fail: function(err) {
  428. console.log('fail:' + JSON.stringify(err));
  429. }
  430. });
  431. },
  432. // #endif
  433. // 设置用户信息
  434. setUserInfo() {
  435. if (!(this.finishData === 5 && this.userInfo.status !== 2)) {
  436. this.navTo('/pagesT/selfconfig/selfconfig');
  437. } else {
  438. this.navTo('/pagesT/user/editUserInfo');
  439. }
  440. },
  441. loginSuccess() {
  442. // this.isLogin = this.$store.state.hasLogin;
  443. // this.getCustomerInfo();
  444. // this.getMyVipCards();
  445. },
  446. /**
  447. * 统一跳转接口,拦截未登录路由
  448. * navigator标签现在默认没有转场动画,所以用view
  449. */
  450. navTo(url) {
  451. // console.log(this.hasLogin)
  452. // return
  453. if (!this.$store.state.hasLogin) {
  454. // #ifdef APP-PLUS
  455. uni.reLaunch({
  456. url: '/pagesT/public/wxLogin'
  457. });
  458. // #endif
  459. // #ifdef MP-WEIXIN
  460. uni.reLaunch({
  461. url: '/pagesT/binding/bindInfo'
  462. });
  463. //#endif
  464. // #ifdef H5
  465. uni.navigateTo({
  466. url: '/pagesT/public/wxLogin?loginType=2'
  467. });
  468. // #endif
  469. } else {
  470. uni.navigateTo({
  471. url
  472. });
  473. }
  474. },
  475. async goDistribution() {
  476. if (!this.$store.state.hasLogin) {
  477. // #ifdef APP-PLUS || H5
  478. uni.reLaunch({
  479. url: '/pagesT/public/wxLogin'
  480. });
  481. // #endif
  482. // #ifdef MP-WEIXIN
  483. uni.reLaunch({
  484. url: '/pagesT/binding/bindInfo'
  485. });
  486. //#endif
  487. } else {
  488. if (this.distributionSet.level && this.distributionSet.level > 0) {
  489. this.getInfoBusinessman();
  490. } else {
  491. this.$api.msg('抱歉,当前商家暂未开启分销功能');
  492. }
  493. }
  494. },
  495. // 获取文字设置
  496. async getTxtSetting() {
  497. this.$u.api.getTxtSetting().then(({ data }) => {
  498. this.$store.commit('commit_distributionTextSet', data.base_form || {});
  499. });
  500. },
  501. // 获取分销商详情
  502. async getInfoBusinessman() {
  503. if (this.userInfo.status !== 2) {
  504. this.$api.msg('抱歉,您的账号未通过审核');
  505. return;
  506. }
  507. this.$u.api.getInfoBusinessman().then(({ data }) => {
  508. if (JSON.stringify(data) === '{}') {
  509. // 不是分销商进入申请分销商页面
  510. this.goPage('/pagesT/Distribution/ApplyTerm');
  511. } else {
  512. if (data.auditStatus === 2) {
  513. // 进入分销中心页面
  514. this.goPage('/pagesT/Distribution/Distribution');
  515. } else {
  516. this.goPage('/pagesT/Distribution/ApplyAudit?auditStatus=1&applicationCondition=' + data.applicationCondition);
  517. }
  518. }
  519. });
  520. },
  521. getDistributionSetting() {
  522. this.$u.api.getDistributionSetting().then(({ data }) => {
  523. this.$store.commit('commit_distributionSet', data);
  524. this.distributionSet = data;
  525. });
  526. },
  527. // 获取我的会员卡
  528. getMyVipCards() {
  529. this.$u.api
  530. .getMyVipCards({
  531. page: 1,
  532. pageSize: 1
  533. })
  534. .then(({ data, pageTotal }) => {
  535. if (data.length) {
  536. this.vip_num = pageTotal;
  537. this.vip_data = {
  538. ...data[0],
  539. isSelf: true
  540. };
  541. } else {
  542. this.getAllVipCard();
  543. }
  544. });
  545. },
  546. // 获取会员列表
  547. getAllVipCard() {
  548. this.$u.api
  549. .getAllVipCard({
  550. page: 1,
  551. pageSize: 1
  552. })
  553. .then(({ data }) => {
  554. if (data.length) {
  555. this.vip_data = data[0];
  556. }
  557. });
  558. },
  559. //用户订单状态数量统计
  560. getOrderStatusNum() {
  561. this.$u.api.getOrderStatusNum().then(res => {
  562. this.order_num = res.data;
  563. });
  564. },
  565. // 获取用户信息
  566. getCustomerInfo() {
  567. this.$u.api.getCustomerInfo().then(({ data }) => {
  568. uni.stopPullDownRefresh();
  569. this.userInfo = data;
  570. if (this.userInfo.status === 2) {
  571. this.getMyVipCards();
  572. }
  573. this.$store.commit('commit_userStatus', data);
  574. if (this.baseSet.finishDataGo && data.status === 0) {
  575. this.tip_model = true;
  576. }
  577. });
  578. },
  579. // 联系客服
  580. async lianxi(phone) {
  581. this.cancalCall();
  582. uni.makePhoneCall({
  583. phoneNumber: phone || this.enterprisemobile
  584. });
  585. },
  586. cancalCall() {
  587. this.call_show = false;
  588. },
  589. openpop() {
  590. if (this.userInfo.salesManName) {
  591. this.call_show = true;
  592. } else {
  593. this.lianxi(this.enterprisemobile);
  594. }
  595. },
  596. // 完善资料提示取消
  597. tipCancel() {
  598. this.tip_model = false;
  599. },
  600. // 跳转完善资料页面
  601. finishCofirm() {
  602. this.goPage('/pagesT/user/editUserInfo');
  603. }
  604. },
  605. onShareAppMessage(options) {
  606. return {
  607. title: this.$store.state.baseSet.shop,
  608. path: '/pages/index/index?businessmanId=' + (this.$store.state.userStatus.id || ''),
  609. success: res => {
  610. console.log(res);
  611. }
  612. };
  613. },
  614. // #ifdef MP-WEIXIN
  615. // 分享到朋友圈
  616. onShareTimeline(obj) {},
  617. // 收藏小程序
  618. onAddToFavorites() {}
  619. // #endif
  620. };
  621. </script>
  622. <style lang="scss">
  623. page {
  624. background-color: #ffffff;
  625. }
  626. .user-index {
  627. overflow-x: hidden;
  628. width: 750upx;
  629. }
  630. .user-top {
  631. color: #ffffff;
  632. position: relative;
  633. width: 100%;
  634. height: 418rpx;
  635. overflow: hidden;
  636. .circle-big {
  637. content: '';
  638. display: block;
  639. width: 180%;
  640. height: 418rpx;
  641. position: absolute;
  642. left: 50%;
  643. transform: translateX(-50%);
  644. top: 0;
  645. overflow: hidden;
  646. border-radius: 0 0 50% 50%;
  647. background: linear-gradient(156deg, #ff6b2c 0%, #ec2723 100%);
  648. .circle-one {
  649. position: absolute;
  650. top: 0;
  651. left: 20%;
  652. border-bottom-right-radius: 100%;
  653. width: 557rpx;
  654. height: 60rpx;
  655. background: linear-gradient(180deg, rgba(255, 60, 58, 0.62) 10%, #ff6d2f 100%);
  656. }
  657. .circle-two {
  658. width: 155rpx;
  659. height: 155rpx;
  660. background: linear-gradient(211deg, #ff8d33 0%, #ff633b 62%);
  661. border-radius: 100%;
  662. position: absolute;
  663. bottom: -12rpx;
  664. left: 19%;
  665. }
  666. .vip-view {
  667. width: 670upx;
  668. padding: 26rpx 40rpx;
  669. height: 98rpx;
  670. border-radius: 15rpx;
  671. background: linear-gradient(90deg, #8e0e15 0%, #550609 100%);
  672. border-top: 4rpx solid rgba(255, 219, 153, 1);
  673. color: #ffe285;
  674. z-index: 1;
  675. position: absolute;
  676. bottom: 0;
  677. left: 50%;
  678. transform: translateX(-50%);
  679. overflow: hidden;
  680. .vip-name {
  681. display: inline-block;
  682. font-size: 32rpx;
  683. font-weight: 500;
  684. }
  685. .desc {
  686. font-size: 28rpx;
  687. font-weight: 400;
  688. margin-left: 16rpx;
  689. display: inline-block;
  690. }
  691. .vip-btn {
  692. width: 140rpx;
  693. font-size: 24rpx;
  694. font-weight: 400;
  695. height: 42rpx;
  696. background: linear-gradient(90deg, #ffbf59 0%, #ff3b2d 100%);
  697. border-radius: 21rpx;
  698. color: #ffefc5;
  699. text-align: center;
  700. line-height: 42rpx;
  701. }
  702. }
  703. }
  704. .user-info {
  705. padding: 0 40rpx;
  706. padding-top: 80rpx;
  707. position: relative;
  708. z-index: 9;
  709. .ui-img {
  710. border-radius: 100%;
  711. border: 4upx solid #ffffff;
  712. position: relative;
  713. .edit-bth {
  714. position: absolute;
  715. width: 86rpx;
  716. height: 32rpx;
  717. background: #b620e0;
  718. border-radius: 16rpx;
  719. text-align: center;
  720. font-size: 20rpx;
  721. line-height: 32rpx;
  722. left: 50%;
  723. transform: translateX(-50%);
  724. bottom: -8rpx;
  725. }
  726. }
  727. .right-icon {
  728. text-align: center;
  729. padding-top: 22rpx;
  730. .ibonfont {
  731. font-size: 40rpx;
  732. }
  733. .text {
  734. font-size: 20rpx;
  735. font-weight: 400;
  736. color: #ffffff;
  737. line-height: 28rpx;
  738. margin-top: 9rpx;
  739. }
  740. }
  741. .user-name {
  742. font-size: 32upx;
  743. padding-left: 10upx;
  744. margin-top: 14rpx;
  745. width: 450rpx;
  746. .login-btn {
  747. color: #fff;
  748. font-size: 32rpx;
  749. width: 100%;
  750. text-align: left;
  751. }
  752. .un-text {
  753. -webkit-line-clamp: 1;
  754. }
  755. .un-text-desc {
  756. float: left;
  757. font-size: 20upx;
  758. margin-top: 12rpx;
  759. width: 120rpx;
  760. height: 36rpx;
  761. line-height: 36rpx;
  762. text-align: center;
  763. background: rgba(255, 139, 130, 0.38);
  764. border-radius: 18rpx;
  765. }
  766. .ulogin-bth {
  767. text-align: left;
  768. height: 46upx;
  769. line-height: 46upx;
  770. border-radius: 46upx;
  771. padding: 0;
  772. color: #ffffff;
  773. float: left;
  774. background-color: transparent;
  775. margin-top: 20upx;
  776. &::after {
  777. border: 0 none;
  778. }
  779. }
  780. }
  781. }
  782. }
  783. .num-view {
  784. display: flex;
  785. padding-bottom: 10upx;
  786. border-bottom: 16rpx solid #f9f9f9;
  787. padding: 30rpx 0;
  788. .num-li {
  789. flex: 4;
  790. text-align: center;
  791. position: relative;
  792. .num-text {
  793. font-size: 32upx;
  794. font-weight: 600;
  795. padding-bottom: 10upx;
  796. font-family: DIN-Medium;
  797. }
  798. .num-tit {
  799. font-size: 24upx;
  800. font-weight: 400;
  801. }
  802. &::after {
  803. content: '';
  804. display: block;
  805. position: absolute;
  806. width: 1px;
  807. height: 40upx;
  808. background-color: #ffffff;
  809. right: 0;
  810. top: 50%;
  811. transform: translateY(-50%);
  812. }
  813. }
  814. .num-li:last-child {
  815. &::after {
  816. background-color: transparent;
  817. }
  818. }
  819. }
  820. .model-view {
  821. border-bottom: 16rpx solid #f9f9f9;
  822. border-radius: 12upx;
  823. padding-bottom: 40upx;
  824. background-color: #ffffff;
  825. position: relative;
  826. z-index: 1;
  827. .information-bottom {
  828. // width: 750rpx;
  829. height: 100rpx;
  830. text-align: center;
  831. padding-left: 48rpx;
  832. .ul-list {
  833. display: flex;
  834. flex-wrap: wrap;
  835. margin-top: 32rpx;
  836. .ul-item {
  837. text-align: left;
  838. width: 50%;
  839. -webkit-line-clamp: 1;
  840. &:nth-child(3),
  841. &:nth-child(4) {
  842. margin-top: 24rpx;
  843. }
  844. .left {
  845. font-size: 24rpx;
  846. line-height: 33rpx;
  847. color: #9d9d9d;
  848. font-weight: 500;
  849. }
  850. .right {
  851. font-size: 24rpx;
  852. line-height: 33rpx;
  853. color: #000000;
  854. font-weight: 600;
  855. }
  856. .right-last {
  857. color: #fa6400;
  858. font-weight: 600;
  859. }
  860. }
  861. }
  862. }
  863. // 负责信息
  864. .information-top {
  865. // width:750rpx ;
  866. height: 72rpx;
  867. background: url(https://onlineimg.qianniao.vip/bck.png) no-repeat;
  868. background-position: -24rpx 0, 0 0;
  869. background-size: 800rpx 99rpx;
  870. padding-top: 17rpx;
  871. .img {
  872. display: inline-block;
  873. width: 33rpx;
  874. height: 33rpx;
  875. vertical-align: middle;
  876. margin-left: 56rpx;
  877. }
  878. .text {
  879. font-size: 32rpx;
  880. font-weight: 600;
  881. color: #2a2a2a;
  882. line-height: 45rpx;
  883. vertical-align: middle;
  884. display: inline-block;
  885. margin-left: 6rpx;
  886. }
  887. }
  888. .model-tit {
  889. padding: 32upx;
  890. font-size: 32rpx;
  891. font-weight: 600;
  892. color: #000000;
  893. .float_right {
  894. font-size: 28upx;
  895. color: #9d9d9d;
  896. font-weight: 400;
  897. .ibonjinru {
  898. margin-left: 10upx;
  899. font-size: 24upx;
  900. }
  901. }
  902. }
  903. .list-ul {
  904. padding: 0 30upx;
  905. display: flex;
  906. flex-wrap: wrap;
  907. .list-li {
  908. line-height: 90upx;
  909. font-size: 28upx;
  910. color: #2a2a2a;
  911. width: 25%;
  912. text-align: center;
  913. .fn-icon {
  914. // margin-right: 24upx;
  915. // display: inline-block;
  916. text-align: center;
  917. .share {
  918. line-height: 95rpx;
  919. padding-left: 8rpx;
  920. }
  921. image {
  922. width: 89rpx;
  923. height: 89rpx;
  924. vertical-align: middle;
  925. transform: translateY(3rpx); // width: 50upx;
  926. // height: 50upx;
  927. // vertical-align: middle;
  928. // transform: translateY(-2upx);
  929. }
  930. }
  931. .ibonjinru {
  932. font-size: 28upx;
  933. color: #9d9d9d;
  934. }
  935. .share-btn {
  936. background-color: #ffffff;
  937. font-size: 28rpx;
  938. padding-left: 0;
  939. padding-right: 0;
  940. padding-top: 2rpx;
  941. text-align: left;
  942. color: #2a2a2a;
  943. }
  944. }
  945. }
  946. .fn-ul {
  947. display: flex;
  948. flex-wrap: wrap;
  949. .fn-li {
  950. width: 25%;
  951. flex-grow: 1;
  952. text-align: center;
  953. font-size: 26upx;
  954. margin-top: 16upx;
  955. .fn-label {
  956. color: #6a6a6a;
  957. font-size: 26rpx;
  958. }
  959. .fn-icon {
  960. image {
  961. width: 70upx;
  962. height: 70upx;
  963. }
  964. .ibonfont {
  965. color: #000000;
  966. font-size: 50upx;
  967. padding-bottom: 10upx;
  968. display: inline-block;
  969. }
  970. }
  971. }
  972. }
  973. .order-ul {
  974. .fn-li {
  975. width: 20%;
  976. position: relative;
  977. .fn-icon {
  978. image {
  979. width: 64upx;
  980. height: 64upx;
  981. margin-bottom: 10rpx;
  982. }
  983. }
  984. }
  985. }
  986. }
  987. .list-model-view {
  988. margin-bottom: 0;
  989. border-bottom: 0;
  990. padding-bottom: 0;
  991. }
  992. .call-pop {
  993. .title {
  994. text-align: center;
  995. padding: 0 30rpx;
  996. line-height: 90rpx;
  997. height: 90rpx;
  998. font-weight: bold;
  999. position: relative;
  1000. .close-icon {
  1001. position: absolute;
  1002. font-weight: normal;
  1003. right: 30rpx;
  1004. top: 50%;
  1005. transform: translateY(-50%);
  1006. }
  1007. }
  1008. .call-ul {
  1009. padding: 0 30rpx 30rpx;
  1010. .call-li {
  1011. line-height: 80rpx;
  1012. height: 80rpx;
  1013. }
  1014. }
  1015. .call-btn {
  1016. width: 100%;
  1017. line-height: 80rpx;
  1018. height: 80rpx;
  1019. text-align: center;
  1020. }
  1021. }
  1022. </style>