user.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136
  1. <template>
  2. <view class="container">
  3. <view class="vheigh"></view>
  4. <view class="bg"><image src="../../static/img/mybg.png" mode=""></image></view>
  5. <view class="user-section flex">
  6. <view class="detail" @click="navTo('/pages/set/userinfo')">
  7. <view class="portrait-box"><image class="portrait" :src="userInfo.avatar || '/static/error/missing-face.png'"></image></view>
  8. <view class="info-box">
  9. <view class="username">{{ userInfo.nickname || '游客' }}</view>
  10. <view class="phone" v-if="userInfo.phone">{{ userInfo.phone | hiddenphone }}</view>
  11. </view>
  12. </view>
  13. <view class="config">
  14. <view class="setting"><image src="../../static/icon/set.png" mode=""></image></view>
  15. <view class="config-font">VIP会员</view>
  16. </view>
  17. </view>
  18. <view class="list-top"></view>
  19. <view class="balance">
  20. <view class="balance-main">
  21. <view class="tj-item" @click="navTo('/pages/money/wallet')">
  22. <view class="tj-img"><image src="../../static/icon/my1.png" mode=""></image></view>
  23. <view class="tj-num">¥2000</view>
  24. <view class="tj-font">我的余额</view>
  25. </view>
  26. <view class="tj-item" @click="navTo('/user/page/scoreAccumulate')">
  27. <view class="tj-img"><image src="../../static/icon/my2.png" mode=""></image></view>
  28. <view class="tj-num">¥2000</view>
  29. <view class="tj-font">我的佣金</view>
  30. </view>
  31. <view class="tj-item" @click="navTo('/user/page/scoreAccumulate')">
  32. <view class="tj-img"><image src="../../static/icon/my3.png" mode=""></image></view>
  33. <view class="tj-num">¥2000</view>
  34. <view class="tj-font">我的积分</view>
  35. </view>
  36. <view class="tj-item" @click="navTo('/user/page/extension')">
  37. <view class="tj-img"><image src="../../static/icon/my4.png" mode=""></image></view>
  38. <view class="tj-num">¥2000</view>
  39. <view class="tj-font">我的推广</view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="cover-container">
  44. <view class="item-box">
  45. <view class="user-item">
  46. <text>我的工具</text>
  47. <!-- <text class="iconfont iconenter" @click="loadMore()"></text> -->
  48. </view>
  49. <view class="order-section">
  50. <view class="order-item" @click="navTo('/pages/tool/entity?type=1')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  51. <view class="o-ic">
  52. <view class="icon"><image class="icon-img" src="/static/icon/ffstk.png" mode="aspectFit"></image></view>
  53. <text>发放实体卡</text>
  54. </view>
  55. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  56. </view>
  57. <view class="order-item" @click="navTo('/pages/tool/entity?type=2')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  58. <view class="o-ic">
  59. <view class="icon"><image class="icon-img" src="/static/icon/hxstk.png" mode="aspectFit"></image></view>
  60. <text>核销实体卡</text>
  61. </view>
  62. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  63. </view>
  64. <view class="order-item" @click="navTo('/user/page/revenueCenter')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  65. <view class="o-ic">
  66. <view class="icon"><image class="icon-img" src="/static/icon/u9.png" mode="aspectFit"></image></view>
  67. <text>收益报告</text>
  68. </view>
  69. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  70. </view>
  71. <view class="order-item" @click="navTo('/user/page/dlcenter')" hover-class="common-hover" :hover-stay-time="50" v-if="isArea_admin">
  72. <view class="o-ic">
  73. <view class="icon"><image class="icon-img" src="/static/icon/dl.png" mode="aspectFit"></image></view>
  74. <text>代理收益</text>
  75. </view>
  76. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  77. </view>
  78. <view class="order-item" @click="navTo('/user/page/recommend')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  79. <view class="o-ic">
  80. <view class="icon"><image class="icon-img" src="/static/icon/u10.png" mode="aspectFit"></image></view>
  81. <text>推荐充值</text>
  82. </view>
  83. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  84. </view>
  85. <view class="order-item" @click="navTo('/user/page/storeCommission')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  86. <view class="o-ic">
  87. <view class="icon"><image class="icon-img" src="/static/icon/s-cms.png" mode="aspectFit"></image></view>
  88. <text>门店佣金</text>
  89. </view>
  90. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  91. </view>
  92. <!-- <view class="order-item" @click="navTo('/pages/tool/phoneBill')" hover-class="common-hover"
  93. :hover-stay-time="50" >
  94. <view class="o-ic">
  95. <view class="icon">
  96. <image class="icon-img" src="/static/icon/phone.png" mode="aspectFit"></image>
  97. </view>
  98. <text>话费充值</text>
  99. </view>
  100. <view class="order-img">
  101. <image src="../../static/img/img74.png" mode=""></image>
  102. </view>
  103. </view> -->
  104. <view class="order-item" @click="navTo('/user/page/award')" hover-class="common-hover" :hover-stay-time="50">
  105. <view class="o-ic">
  106. <view class="icon"><image class="icon-img" src="/static/icon/gryj.png" mode="aspectFit"></image></view>
  107. <text>个人佣金</text>
  108. </view>
  109. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  110. </view>
  111. <view class="order-item" @click="readQr()" hover-class="common-hover" :hover-stay-time="50" v-if="!isAdmin">
  112. <view class="o-ic">
  113. <view class="icon"><image class="icon-img" src="/static/icon/1-my.png" mode="aspectFit"></image></view>
  114. <text>扫码充值</text>
  115. </view>
  116. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  117. </view>
  118. <view class="order-item" @click="navTo('/user/page/wipe')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  119. <view class="o-ic">
  120. <view class="icon"><image class="icon-img" src="/static/icon/u6.png" mode="aspectFit"></image></view>
  121. <text>提货管理</text>
  122. </view>
  123. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  124. </view>
  125. <view class="order-item" @click="navTo('/user/page/delivery')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  126. <view class="o-ic">
  127. <view class="icon"><image class="icon-img" src="/static/icon/u12.png" mode="aspectFit"></image></view>
  128. <text>送货管理</text>
  129. </view>
  130. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  131. </view>
  132. <view class="order-item" @click="navTo('/user/page/refundAdmin?state=0&isUser=' + isUser)" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  133. <view class="o-ic">
  134. <view class="icon"><image class="icon-img" src="/static/icon/u7.png" mode="aspectFit"></image></view>
  135. <text>退货管理</text>
  136. </view>
  137. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  138. </view>
  139. <view class="order-item" @click="navTo('/user/page/depositAdmin')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  140. <view class="o-ic">
  141. <view class="icon"><image class="icon-img" src="/static/icon/u11.png" mode="aspectFit"></image></view>
  142. <text>押金管理</text>
  143. </view>
  144. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  145. </view>
  146. <view class="order-item" @click="navTo('/pages/set/point')" hover-class="common-hover" :hover-stay-time="50" v-if="isAdmin">
  147. <view class="o-ic">
  148. <view class="icon"><image class="icon-img" src="/static/icon/5-my.png" mode="aspectFit"></image></view>
  149. <text>自提点管理</text>
  150. </view>
  151. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  152. </view>
  153. <view class="order-item" @click="navTo('/pages/set/address')" hover-class="common-hover" :hover-stay-time="50">
  154. <view class="o-ic">
  155. <view class="icon"><image class="icon-img" src="/static/icon/3-my.png" mode="aspectFit"></image></view>
  156. <text>收货地址</text>
  157. </view>
  158. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  159. </view>
  160. <view class="order-item" @click="navTo('/user/page/shareQrCode')" hover-class="common-hover" :hover-stay-time="50">
  161. <view class="o-ic">
  162. <view class="icon"><image class="icon-img" src="/static/icon/2-my.png" mode="aspectFit"></image></view>
  163. <text>推广海报</text>
  164. </view>
  165. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  166. </view>
  167. <view class="order-item" hover-class="common-hover" :hover-stay-time="50" @click="showPopup">
  168. <!-- <view class="icon" v-if="userIdentity"><image class="icon-img" src="/static/icon/u8.png" mode="aspectFit"></image></view> -->
  169. <view class="o-ic">
  170. <view class="icon"><image class="icon-img" src="/static/icon/4-my.png" mode="aspectFit"></image></view>
  171. <text>联系客服</text>
  172. </view>
  173. <!-- <view class="txt">
  174. 联系客服
  175. </view> -->
  176. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  177. </view>
  178. <!-- <view class="order-item" hover-class="common-hover" :hover-stay-time="50">
  179. <view class="icon"><image class="icon-img" src="/static/icon/u4.png" mode="aspectFit"></image></view>
  180. <text>关于我们</text>
  181. </view> -->
  182. <view class="order-item" hover-class="common-hover" :hover-stay-time="50" @click="showBind">
  183. <view class="o-ic">
  184. <view class="icon"><image class="icon-img" src="/static/icon/ztd.png" mode="aspectFit"></image></view>
  185. <text>绑定管理账号</text>
  186. </view>
  187. <view class="order-img"><image src="../../static/img/img74.png" mode=""></image></view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. <uni-popup ref="popup" type="center">
  193. <view class="popup-box">
  194. <view class="img"><image src="https://37shop.liuniu946.com/front/img/img009.png" mode=""></image></view>
  195. <view class="mian">
  196. <view class="delivery">
  197. <view class="title">已经为您定制专属客服</view>
  198. <image src="https://37shop.liuniu946.com/front/img/img010.png" mode=""></image>
  199. </view>
  200. <view class="nocancel">{{ text }}</view>
  201. <view class="comfirm-box">
  202. <view class="cancel" @click="cancel">取消</view>
  203. <view class="comfirm" @click="comfirm(text)">复制微信</view>
  204. </view>
  205. </view>
  206. </view>
  207. </uni-popup>
  208. <uni-popup ref="popupadmin" type="center">
  209. <view class="bind-admin-wappper">
  210. <view class="title">绑定管理账号</view>
  211. <view class="admin-item">
  212. <view class="item-name">账号</view>
  213. <view class="item-val"><input type="text" v-model="adminName" placeholder="请输入管理账号" /></view>
  214. </view>
  215. <view class="admin-item">
  216. <view class="item-name">密码</view>
  217. <view class="item-val"><input type="password" v-model="adminPsw" placeholder="请输入管理密码" /></view>
  218. </view>
  219. <view class="btn-wrapper">
  220. <view class="btn" @click="adminClose">取消</view>
  221. <view class="btn btn1" @click="adminQr">确定</view>
  222. </view>
  223. </view>
  224. </uni-popup>
  225. <uni-popup ref="popupStk" type="center">
  226. <view class="stk-tc">
  227. <image src="https://zccy.liuniu946.com/static/img/gift-bg.png" mode="" class="gift-bg"></image>
  228. <view class="gift-bg-mb"></view>
  229. <image src="https://zccy.liuniu946.com/static/img/stk-gift.png" mode="" class="gift"></image>
  230. <view class="" style="height: 145rpx;"></view>
  231. <view class="tc-tit">{{ type == 1 ? '实体卡发放' : '实体卡核销' }}</view>
  232. <input type="text" class="tc-inp" placeholder="请输入卡号" v-model="code" />
  233. <input type="text" class="tc-inp tc-inp-km" placeholder="请输入卡密" v-model="password" v-if="type == 2" />
  234. <view class="tc-btn" @click="gonew">{{ type == 1 ? '立即发放' : '立即核销' }}</view>
  235. <view class="" style="height: 50rpx;"></view>
  236. </view>
  237. </uni-popup>
  238. </view>
  239. </template>
  240. <script>
  241. import { mapState, mapMutations } from 'vuex';
  242. import uniList from '@/components/uni-list/uni-list.vue';
  243. import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
  244. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  245. import { getArticleDetail } from '@/api/index.js';
  246. import { orderData, getUserInfo, getSpreadCount, bindAdmin, sendStk, checkStk } from '@/api/user.js';
  247. import { saveUrl, interceptor } from '@/utils/loginUtils.js';
  248. import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
  249. export default {
  250. components: {
  251. uniList,
  252. uniListItem
  253. },
  254. data() {
  255. return {
  256. coverTransform: 'translateY(0px)',
  257. coverTransition: '0s',
  258. moving: false,
  259. userDowm: 0, //卡片升级专属高度
  260. userMaxDowm: 0, //卡片最高高度,
  261. userIdentity: false, //是否展示管理页面
  262. text: '',
  263. isUser: 0,
  264. integral: '', //积分获取
  265. mycount: 0,
  266. adminName: '',
  267. adminPsw: '',
  268. isAdmin: false,
  269. isArea_admin: false,
  270. code: '',
  271. password: '',
  272. type: '',
  273. uping: false
  274. };
  275. },
  276. onShow() {
  277. this.getWx(5);
  278. console.log(this.userInfo);
  279. // 判断是否已经登录
  280. if (this.hasLogin) {
  281. this.loadBaseData();
  282. // this.getSpreadCount();
  283. console.log(this.userInfo);
  284. }
  285. },
  286. // #ifndef MP
  287. // onNavigationBarButtonTap(e) {
  288. // const index = e.index;
  289. // if (index === 0) {
  290. // this.navTo('/pages/set/set');
  291. // } else if (index === 1) {
  292. // // #ifdef APP-PLUS
  293. // const pages = getCurrentPages();
  294. // const page = pages[pages.length - 1];
  295. // const currentWebview = page.$getAppWebview();
  296. // currentWebview.hideTitleNViewButtonRedDot({
  297. // index
  298. // });
  299. // // #endif
  300. // uni.navigateTo({
  301. // url: '/pages/user/notice'
  302. // });
  303. // }
  304. // },
  305. // #endif
  306. computed: {
  307. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  308. },
  309. filters: {
  310. hiddenphone(value) {
  311. return value.substring(0, 3) + '****' + value.substring(7, 12);
  312. }
  313. },
  314. methods: {
  315. ...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
  316. // 获取微信客服
  317. getWx(id) {
  318. getArticleDetail({}, id).then(({ data }) => {
  319. console.log(data, 'wx');
  320. this.text = data.synopsis;
  321. });
  322. },
  323. // 加载初始数据
  324. loadBaseData() {
  325. getUserInfo({})
  326. .then(({ data }) => {
  327. this.setUserInfo(data);
  328. // this.getSpreadCount()
  329. console.log(data, '++++++++++++');
  330. if (this.userInfo.store_info.length != 0) {
  331. this.isAdmin = true;
  332. }
  333. if (data.store_info instanceof Array) {
  334. if (this.userInfo.store_info.length == 0) {
  335. this.isAdmin = false;
  336. } else {
  337. this.isAdmin = true;
  338. }
  339. }
  340. if (Object.prototype.toString.call(data.store_info) === '[object Object]') {
  341. this.isAdmin = true;
  342. }
  343. this.isArea_admin = data.area_admin == 0 ? false : true;
  344. // 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
  345. orderData({})
  346. .then(({ data }) => {
  347. this.setOrderInfo(data);
  348. console.log(this.orderInfo);
  349. })
  350. .catch(e => {
  351. this.setOrderInfo({
  352. complete_count: 0, //完成
  353. received_count: 0, //待收货
  354. unshipped_count: 0, //待发货
  355. order_count: 0, //订单总数
  356. unpaid_count: 0 //待付款
  357. });
  358. });
  359. })
  360. .catch(e => {
  361. console.log(e);
  362. });
  363. },
  364. /**
  365. * 统一跳转接口,拦截未登录路由
  366. * navigator标签现在默认没有转场动画,所以用view
  367. */
  368. navTo(url) {
  369. if (!this.hasLogin) {
  370. // 保存地址
  371. saveUrl();
  372. // 登录拦截
  373. interceptor();
  374. } else {
  375. uni.navigateTo({
  376. url
  377. });
  378. }
  379. },
  380. changeIdentity() {
  381. this.userIdentity = !this.userIdentity;
  382. if (this.isUser === 0) {
  383. this.isUser = 1;
  384. } else if (this.isUser === 1) {
  385. this.isUser = 0;
  386. }
  387. },
  388. showPopup() {
  389. this.$refs.popup.open();
  390. },
  391. cancel() {
  392. this.$refs.popup.close();
  393. },
  394. comfirm(text) {
  395. console.log(text);
  396. const result = uniCopy(text);
  397. if (result === false) {
  398. uni.showToast({
  399. title: '不支持'
  400. });
  401. } else {
  402. uni.showToast({
  403. title: '复制成功',
  404. icon: 'none'
  405. });
  406. }
  407. this.$refs.popup.close();
  408. },
  409. getSpreadCount() {
  410. getSpreadCount({}, 4).then(res => {
  411. // console.log(res,'提现++++++')
  412. this.mycount = res.data.count;
  413. console.log(this.mycount, '提现++++++');
  414. });
  415. },
  416. showBind() {
  417. if (!this.hasLogin) {
  418. // 保存地址
  419. saveUrl();
  420. // 登录拦截
  421. interceptor();
  422. } else {
  423. this.$refs.popupadmin.open();
  424. }
  425. },
  426. adminQr() {
  427. if (!this.adminName) {
  428. return this.$api.msg('请输入管理账号');
  429. }
  430. if (!this.adminPsw) {
  431. return this.$api.msg('请输入管理密码');
  432. }
  433. uni.showLoading({
  434. title: '提交绑定...',
  435. mask: true
  436. });
  437. // bindAdmin
  438. console.log(this.adminName, this.adminPsw, 'dddddddddddddddddd');
  439. bindAdmin({
  440. admin_account: this.adminName,
  441. admin_password: this.adminPsw
  442. })
  443. .then(res => {
  444. console.log(res, 'bindAdmin+++++++++++++++++++++');
  445. uni.hideLoading();
  446. this.$refs.popupadmin.close();
  447. this.$api.msg('绑定成功');
  448. this.loadBaseData();
  449. })
  450. .catch(err => {
  451. console.log(err);
  452. this.$refs.popupadmin.close();
  453. });
  454. },
  455. adminClose() {
  456. this.adminName = '';
  457. this.adminPsw = '';
  458. this.$refs.popupadmin.close();
  459. },
  460. // 扫描支付
  461. readQr() {
  462. let obj = this;
  463. if (!this.hasLogin) {
  464. // 保存地址
  465. saveUrl();
  466. // 登录拦截
  467. interceptor();
  468. } else {
  469. // #ifndef H5
  470. uni.scanCode({
  471. success(e) {
  472. // console.log(e,'e++++++++++++')
  473. uni.navigateTo({
  474. url: '/user/page/pay' + e.result
  475. });
  476. }
  477. });
  478. // #endif
  479. // #ifdef H5
  480. this.weichatObj.scanQRCode({
  481. needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
  482. scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
  483. success: function(res) {
  484. uni.navigateTo({
  485. url: '/user/page/pay' + res.result
  486. });
  487. }
  488. });
  489. // #endif
  490. }
  491. },
  492. openStk(type) {
  493. this.type = type;
  494. this.$refs.popupStk.open();
  495. },
  496. gonew() {
  497. let obj = this;
  498. if (obj.uping) {
  499. return;
  500. }
  501. if (obj.code == '') {
  502. return obj.$api.msg('请输入卡号');
  503. }
  504. if (obj.type == 2) {
  505. if (obj.password == '') {
  506. return obj.$api.msg('请输入卡密');
  507. }
  508. }
  509. obj.uping = true;
  510. if (obj.type == 1) {
  511. sendStk({
  512. code: obj.code
  513. })
  514. .then(res => {
  515. obj.$refs.popupStk.close();
  516. uni.showToast({
  517. title: '发放成功',
  518. duration: 2000
  519. });
  520. obj.uping = false;
  521. })
  522. .catch(err => {
  523. obj.uping = false;
  524. });
  525. } else if (obj.type == 2) {
  526. checkStk({
  527. code: obj.code,
  528. password: obj.password
  529. })
  530. .then(res => {
  531. obj.$refs.popupStk.close();
  532. uni.showToast({
  533. title: '核销成功',
  534. duration: 2000
  535. });
  536. obj.uping = false;
  537. })
  538. .catch(err => {
  539. obj.uping = false;
  540. });
  541. }
  542. }
  543. /**
  544. * 获取个人用户信息
  545. */
  546. // getUserInfo() {
  547. // console.log('getuserInfo')
  548. // let that = this;
  549. // getUserInfo().then(res => {
  550. // that.userInfo = res.data,
  551. // that.is_promoter = res.data.is_promoter
  552. // that.extension_status = res.data.extension_status
  553. // });
  554. // },
  555. }
  556. };
  557. </script>
  558. <style lang="scss">
  559. page,
  560. .container {
  561. height: auto;
  562. min-height: 100%;
  563. background-color: #ffffff;
  564. }
  565. %flex-center {
  566. display: flex;
  567. flex-direction: column;
  568. justify-content: center;
  569. align-items: center;
  570. }
  571. %section {
  572. display: flex;
  573. justify-content: space-around;
  574. align-content: center;
  575. background: #fff;
  576. border-radius: 10rpx;
  577. }
  578. .bg {
  579. position: absolute;
  580. top: 0;
  581. left: 0;
  582. height: 400rpx;
  583. width: 100%;
  584. image {
  585. width: 100%;
  586. height: 100%;
  587. }
  588. }
  589. .user-section {
  590. padding: 112rpx 42rpx 0 38rpx;
  591. position: relative;
  592. z-index: 10;
  593. .detail {
  594. display: flex;
  595. align-items: center;
  596. .portrait-box {
  597. height: 120rpx;
  598. width: 120rpx;
  599. .portrait {
  600. width: 100%;
  601. height: 100%;
  602. border: 4rpx solid #fff;
  603. border-radius: 50%;
  604. }
  605. }
  606. .info-box {
  607. margin-left: 20rpx;
  608. line-height: 1;
  609. .username {
  610. font-size: 32rpx;
  611. font-family: PingFang SC;
  612. font-weight: bold;
  613. color: #ffffff;
  614. }
  615. .phone {
  616. font-size: 25rpx;
  617. font-family: PingFang SC;
  618. font-weight: 500;
  619. color: #ffffff;
  620. margin-top: 18rpx;
  621. }
  622. }
  623. }
  624. .config {
  625. width: 161rpx;
  626. height: 51rpx;
  627. background: #ffffff;
  628. border-radius: 25rpx;
  629. display: flex;
  630. align-items: center;
  631. justify-content: center;
  632. line-height: 1;
  633. .setting {
  634. width: 25rpx;
  635. height: 36rpx;
  636. image {
  637. width: 25rpx;
  638. height: 36rpx;
  639. }
  640. }
  641. .config-font {
  642. margin-left: 10rpx;
  643. font-size: 25rpx;
  644. font-family: PingFang SC;
  645. font-weight: 500;
  646. color: #ee2f72;
  647. }
  648. }
  649. }
  650. .list-top {
  651. position: relative;
  652. z-index: 10;
  653. margin-top: 50rpx;
  654. width: 750rpx;
  655. height: 20rpx;
  656. background: #ffffff;
  657. border-radius: 30rpx 30rpx 0px 0px;
  658. }
  659. .cover-container {
  660. background: $page-color-base;
  661. // margin-top: -150rpx;
  662. // padding: 0 30rpx;
  663. position: relative;
  664. background: #f5f5f5;
  665. padding-bottom: 20rpx;
  666. .arc {
  667. position: absolute;
  668. left: 0;
  669. top: -34rpx;
  670. width: 100%;
  671. height: 36rpx;
  672. }
  673. }
  674. .tj-sction {
  675. @extend %section;
  676. .tj-item {
  677. @extend %flex-center;
  678. flex-direction: column;
  679. height: 140rpx;
  680. font-size: $font-sm;
  681. color: #75787d;
  682. }
  683. .num {
  684. font-size: $font-lg;
  685. color: $font-color-dark;
  686. margin-bottom: 8rpx;
  687. }
  688. }
  689. .item-box {
  690. // border-radius: 10rpx;
  691. background-color: white;
  692. margin-top: 20rpx;
  693. .box-title {
  694. line-height: 1;
  695. padding: 30rpx;
  696. .title {
  697. font-size: $font-lg;
  698. font-weight: bold;
  699. }
  700. .link {
  701. font-size: $font-base - 2rpx;
  702. color: $font-color-light;
  703. }
  704. }
  705. .order-section {
  706. padding: 28rpx;
  707. padding-bottom: 0;
  708. .order-item {
  709. display: flex;
  710. justify-content: space-between;
  711. width: 100%;
  712. height: 120rpx;
  713. border-radius: 10rpx;
  714. font-size: $font-sm;
  715. color: $font-color-dark;
  716. .o-ic {
  717. margin: auto 0;
  718. display: flex;
  719. .icon {
  720. margin-right: 20rpx;
  721. image {
  722. width: 52rpx;
  723. height: 43rpx;
  724. }
  725. }
  726. text {
  727. color: #3b3b3b;
  728. font-size: 30rpx;
  729. font-family: SourceHanSansCN-Regular;
  730. }
  731. }
  732. .order-img {
  733. margin: auto 0;
  734. // margin: auto 50rpx;
  735. image {
  736. width: 16rpx;
  737. height: 28rpx;
  738. }
  739. }
  740. }
  741. .iconfont {
  742. font-size: 48rpx;
  743. margin-bottom: 18rpx;
  744. color: #fa436a;
  745. }
  746. .icon-shouhoutuikuan {
  747. font-size: 44rpx;
  748. }
  749. }
  750. }
  751. .history-section {
  752. // padding: 30rpx 0 0;
  753. margin-top: 20rpx;
  754. background: #fff;
  755. border-radius: 10rpx;
  756. .sec-header {
  757. display: flex;
  758. align-items: center;
  759. font-size: $font-base;
  760. color: $font-color-dark;
  761. line-height: 40rpx;
  762. margin-left: 30rpx;
  763. padding-top: 30rpx;
  764. .iconfont {
  765. font-size: 44rpx;
  766. color: $color-red;
  767. margin-right: 16rpx;
  768. line-height: 40rpx;
  769. }
  770. }
  771. .h-list {
  772. white-space: nowrap;
  773. padding: 30rpx 30rpx 0;
  774. .h-list-image {
  775. display: inline-block;
  776. width: 160rpx;
  777. height: 160rpx;
  778. margin-right: 20rpx;
  779. border-radius: 10rpx;
  780. }
  781. }
  782. }
  783. .user-item {
  784. font-size: 30rpx;
  785. font-weight: bold;
  786. color: #666666;
  787. border-bottom: 1px #f5f5f5 solid;
  788. padding: 25rpx 20rpx 26rpx 20rpx;
  789. display: flex;
  790. justify-content: space-between;
  791. text {
  792. }
  793. }
  794. .balance {
  795. position: relative;
  796. z-index: 10;
  797. background: #ffffff;
  798. .balance-main {
  799. display: flex;
  800. padding-top: 40rpx;
  801. color: #ffffff;
  802. .tj-item {
  803. display: flex;
  804. flex-direction: column;
  805. flex-grow: 1;
  806. text-align: center;
  807. font-size: 26rpx;
  808. font-weight: 500;
  809. color: #3b3b3b;
  810. line-height: 1;
  811. .tj-img {
  812. image {
  813. width: 112rpx;
  814. height: 112rpx;
  815. }
  816. }
  817. .tj-num {
  818. font-size: 25rpx;
  819. font-family: PingFang SC;
  820. font-weight: 500;
  821. color: #363636;
  822. }
  823. .tj-font {
  824. margin-top: 10rpx;
  825. font-size: 28rpx;
  826. font-family: PingFang SC;
  827. font-weight: 500;
  828. color: #363636;
  829. }
  830. }
  831. .jg {
  832. width: 2rpx;
  833. height: 81rpx;
  834. margin-top: 18rpx;
  835. background-color: #c5868a;
  836. }
  837. }
  838. }
  839. .foot-wrapper {
  840. width: 373rpx;
  841. height: 79rpx;
  842. background: #ffffff;
  843. box-shadow: 0px 3px 10px 0px rgba(180, 183, 187, 0.8);
  844. border-radius: 11rpx;
  845. margin: 46rpx auto 20rpx;
  846. text-align: center;
  847. line-height: 79rpx;
  848. font-size: 30rpx;
  849. font-weight: bold;
  850. color: #901b21;
  851. }
  852. .popup-box {
  853. width: 522rpx;
  854. height: 605rpx;
  855. background-color: #ffffff;
  856. border-radius: 20rpx;
  857. position: relative;
  858. .img {
  859. position: relative;
  860. top: -56rpx;
  861. left: 0;
  862. width: 522rpx;
  863. height: 132rpx;
  864. display: flex;
  865. justify-content: center;
  866. image {
  867. border-radius: 20rpx 20rpx 0 0;
  868. width: 450rpx;
  869. height: 132rpx;
  870. }
  871. }
  872. .mian {
  873. margin-top: -44rpx;
  874. display: flex;
  875. flex-direction: column;
  876. align-items: center;
  877. // padding: 32rpx 32rpx;
  878. background-color: #ffffff;
  879. border-radius: 0 0 20rpx 20rpx;
  880. text-align: center;
  881. .delivery {
  882. font-size: 40rpx;
  883. color: #333333;
  884. display: flex;
  885. align-items: center;
  886. flex-direction: column;
  887. .title {
  888. }
  889. image {
  890. margin-top: 48rpx;
  891. width: 172rpx;
  892. height: 160rpx;
  893. }
  894. }
  895. .nocancel {
  896. font-size: 32rpx;
  897. color: #333333;
  898. margin-top: 14rpx;
  899. }
  900. .comfirm-box {
  901. margin-top: 52rpx;
  902. display: flex;
  903. // margin-bottom: 32rpx;
  904. // justify-content: space-around;
  905. .cancel {
  906. display: flex;
  907. align-items: center;
  908. justify-content: center;
  909. width: 197rpx;
  910. height: 74rpx;
  911. border: 1px solid #dcc786;
  912. border-radius: 38rpx;
  913. font-size: 32rpx;
  914. color: #605128;
  915. }
  916. .comfirm {
  917. margin-left: 32rpx;
  918. display: flex;
  919. align-items: center;
  920. justify-content: center;
  921. width: 197rpx;
  922. height: 74rpx;
  923. background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
  924. border-radius: 38px;
  925. font-size: 32rpx;
  926. color: #605128;
  927. }
  928. }
  929. }
  930. }
  931. .bind-admin-wappper {
  932. width: 600rpx;
  933. height: 682rpx;
  934. border-radius: 20rpx;
  935. background-color: #fff;
  936. .title {
  937. padding-top: 70rpx;
  938. font-size: 42rpx;
  939. text-align: center;
  940. font-family: PingFang SC;
  941. font-weight: 500;
  942. color: #ffa200;
  943. }
  944. .admin-item {
  945. .item-name {
  946. padding-top: 55rpx;
  947. padding-bottom: 20rpx;
  948. font-size: 32rpx;
  949. font-family: PingFang SC;
  950. font-weight: 500;
  951. color: #333333;
  952. padding-left: 68rpx;
  953. }
  954. .item-val {
  955. width: 470rpx;
  956. height: 70rpx;
  957. line-height: 70rpx;
  958. margin: 0 auto;
  959. background: #ffffff;
  960. border: 1px solid #999999;
  961. border-radius: 6px;
  962. outline: none;
  963. input {
  964. padding-left: 20rpx;
  965. display: block;
  966. height: 70rpx;
  967. line-height: 70rpx;
  968. }
  969. }
  970. }
  971. .btn-wrapper {
  972. margin-top: 60rpx;
  973. display: flex;
  974. justify-content: space-between;
  975. height: 50rpx;
  976. padding: 0 65rpx;
  977. .btn {
  978. // margin-right: 22rpx;
  979. text-align: center;
  980. font-size: 30rpx;
  981. font-family: PingFang SC;
  982. font-weight: 500;
  983. line-height: 70rpx;
  984. color: #666666;
  985. width: 224rpx;
  986. height: 70rpx;
  987. border-radius: 6rpx;
  988. border: 1px solid #999999;
  989. }
  990. .btn1 {
  991. color: #fff;
  992. background-color: #ff6600;
  993. }
  994. }
  995. }
  996. .icon-img {
  997. width: 52rpx;
  998. height: 43rpx;
  999. }
  1000. .stk-tc {
  1001. width: 560rpx;
  1002. // height: 550rpx;
  1003. background-color: #fff;
  1004. border-radius: 20rpx;
  1005. position: relative;
  1006. .gift,
  1007. .gift-bg,
  1008. .gift-bg-mb {
  1009. position: absolute;
  1010. left: 0;
  1011. right: 0;
  1012. margin: auto;
  1013. }
  1014. .tc-tit,
  1015. .tc-inp,
  1016. .tc-btn {
  1017. margin: auto;
  1018. }
  1019. .gift {
  1020. top: -93rpx;
  1021. width: 177rpx;
  1022. height: 186rpx;
  1023. }
  1024. .gift-bg-mb {
  1025. top: 0;
  1026. width: 456rpx;
  1027. height: 90rpx;
  1028. background-color: #fff;
  1029. }
  1030. .gift-bg {
  1031. top: -90rpx;
  1032. width: 456rpx;
  1033. height: 180rpx;
  1034. }
  1035. .tc-tit {
  1036. font-weight: bold;
  1037. color: #333333;
  1038. font-size: 36rpx;
  1039. text-align: center;
  1040. }
  1041. .tc-inp {
  1042. display: block;
  1043. margin: 20rpx auto;
  1044. width: 440rpx;
  1045. height: 70rpx;
  1046. background-color: #f5f5f5;
  1047. top: 210rpx;
  1048. padding-left: 20rpx;
  1049. border-radius: 15rpx;
  1050. font-size: 32rpx;
  1051. }
  1052. .tc-inp-km {
  1053. top: 305rpx;
  1054. }
  1055. .tc-btn {
  1056. width: 405rpx;
  1057. height: 86rpx;
  1058. margin-top: 45rpx;
  1059. background-color: #901b21;
  1060. border-radius: 43rpx;
  1061. text-align: center;
  1062. color: #fff;
  1063. line-height: 86rpx;
  1064. font-size: 36rpx;
  1065. }
  1066. }
  1067. </style>