user.vue 28 KB

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