user.vue 27 KB

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