tuijian.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  1. <template>
  2. <view class="main">
  3. <view class="model-one" v-if="modelStatus">
  4. <!-- <view class="model-one" v-if="true"> -->
  5. <view class="top-one">
  6. <image :src="imgHost+'/static/mine/topbg.png'" class="bg" mode=""></image>
  7. <view class="infobox">
  8. <view class="flex">
  9. <image class="avatar-img"
  10. :src="user.avatar== null||''? '../../static/tuijian/head.png':user.avatar" mode=""></image>
  11. <view class="avatar-content">
  12. <view class="nickname">
  13. {{user.realname == undefined||null ? '请登录': '欢迎您,' + user.realname}}
  14. </view>
  15. <view class="spread-protocol" @click="promoteProtocol">
  16. 推广协议
  17. <uni-icons :size="30" class="uni-icon-wrapper" color="#7F786A" type="arrowright"
  18. style="width: 32rpx;height: 32rpx;padding-left:5px;" />
  19. </view>
  20. </view>
  21. </view>
  22. <view class="text-center" style="text-align: center;" @click="getthis(4)">
  23. <view class="qrcode-icon">
  24. <image src="../../static/tuijian/qrcode.png" mode="" style="width: 100%;height: 100%;">
  25. </image>
  26. </view>
  27. <view class="text-white" style="">
  28. 推广二维码
  29. </view>
  30. </view>
  31. <!-- <view class="rule" @click="recommendRules" data-target="Modal">
  32. 推荐规则
  33. <uni-icons :size="30" class="uni-icon-wrapper" color="#F5CC57" type="arrowright" style="width: 32rpx;height: 32rpx;padding-left:5px;" />
  34. </view> -->
  35. </view>
  36. </view>
  37. <view class="info-box" style="position: relative;height: 400rpx;">
  38. <view class="info"
  39. style="padding: 30rpx 15rpx;width: 80%;background-color: #FFFFFF;box-shadow: 6rpx 6rpx 20rpx rgba(26, 26, 26, 0.2);border-radius: 20rpx;z-index: 100;position: absolute;top: -50px;left: 50%;transform: translate(-50%, -10%);">
  40. <view class="price-content">
  41. <view class="price-title" style="text-align: center;font-size: 32rpx;font-weight: bold;">
  42. 可提现金额(元)</view>
  43. <view class="price" style="text-align: center;font-size: 50rpx;">{{promoteInfo.balance}}
  44. </view>
  45. </view>
  46. <view class="flex align-center justify-between"
  47. style="margin: 0 20rpx;padding-bottom: 15rpx;border-bottom: 1px solid #B4B4B4;">
  48. <view class="">
  49. <view class="text-left" style="color: #B4B4B4;font-size: 32rpx;">已提现奖金(元)</view>
  50. <view class="text-center" style="margin: 10rpx 0;">{{promoteInfo.withdrawn}}</view>
  51. </view>
  52. <view>
  53. <view class="" style="color: #B4B4B4;font-size: 32rpx;">未结算奖金(元)</view>
  54. <view class="text-center" style="margin: 10rpx 0;">{{promoteInfo.audit_balance}}</view>
  55. </view>
  56. </view>
  57. <view class="flex align-center justify-around" style="padding-top: 30rpx;">
  58. <view @click="getthis(5)" class="bank flex align-center justify-center radius text-center"
  59. style="text-align: center;width: 45%;height: 60rpx;line-height:60rpx;border: 1px solid #F6CF87;">
  60. <image :src="$imgHost + '/static/tuijian/bank-1.png'" mode=""
  61. style="width: 35rpx;height: 25rpx;"></image>
  62. <view style="margin-left: 15rpx;">银行卡绑定</view>
  63. </view>
  64. <view @click="getthis(0)" class="flex align-center justify-center radius"
  65. style="text-align: center;width: 45%;height: 60rpx;line-height:60rpx;border: 1px solid #F6CF87;">
  66. <image :src="$imgHost + '/static/tuijian/bank-1.png'" mode=""
  67. style="width: 35rpx;height: 25rpx;">
  68. <view style="margin-left: 15rpx;">马上提现</view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="btns">
  74. <view class="tab" v-for="( item , index ) in btns" :key="index" @click="getthis(index)">
  75. <view class="imgs">
  76. <view
  77. :class="['imgs-item',{'imgs-item1':index ==0},{'imgs-item2':index ==1},{'imgs-item3':index ==2},{'imgs-item4':index ==3},{'imgs-item5':index ==5}]">
  78. <image :src="imgHost + item.img" class="tab-img" mode=""></image>
  79. </view>
  80. </view>
  81. <view class="name">
  82. {{item.name == undefined ? '':item.name }}
  83. </view>
  84. <view class="price" :class="item.danwei=='人'?'ren':''">
  85. <text class="price-vlaue">
  86. {{index==0? promoteInfo.promote_reward:index==1? promoteInfo.promote_order_num:index==2? promoteInfo.withdrawn_detail_money:index==3? promoteInfo.invite_num:''}}
  87. </text>
  88. {{index==1?'个':item.danwei}}
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="model-two" v-else>
  94. <!-- <view class="model-two" v-if="false"> -->
  95. <view class="top-img">
  96. <image :src="imgHost+'/static/mine/topbg2.png'" mode=""></image>
  97. <view class="top-box">
  98. <view class="title-box">
  99. <view class="title-top">销售拿奖金</view>
  100. <view class="protocol-btns" style="" @click="protocol" data-target="protocol">查看协议</view>
  101. </view>
  102. <view class="top-content" style="text-align: center;font-size: 26rpx;">
  103. 成为推广人后,推广其他用户下单,您可以获得奖金<br>推广方式多样化,给你更多的体验
  104. </view>
  105. </view>
  106. </view>
  107. <view class="sponsor">
  108. <view class="sponsor-btn">立即成为聚联诚集团推广人</view>
  109. </view>
  110. <!-- <view class="top-two">
  111. <image :src="imgHost+'/static/mine/topbg2.png'" mode=""></image>
  112. </view> -->
  113. <!-- <view class="top-two">
  114. <image :src="imgHost+'/static/index/img1.png'" mode=""></image>
  115. </view>
  116. <view class="protocol">
  117. <view class="protocol-btn" @click="protocol" data-target="protocol">查看协议</view>
  118. <view class="protocol-content">
  119. <image :src="imgHost+'/static/apply/jiangjin.png'" mode="" class="protocol-content-img"></image>
  120. <view class="title">销售拿奖金</view>
  121. <view class="txt">成为推广人后,推广其他用户下单,您可以获得奖金<br>推广方式多样化,给你更多的体验</view>
  122. </view>
  123. </view> -->
  124. <view class="tabs">
  125. <view @click="join(index)" class="tab" :key="index" v-for="( item , index ) in tabs">
  126. <view class="tab-img-two">
  127. <image :src="item.img" mode="" class="i1"></image>
  128. </view>
  129. <view class="tab-txt">
  130. <view>{{index == 1 ? item.txt+money+'元即可': item.txt}}</view>
  131. <view>{{item.txt2}}</view>
  132. </view>
  133. <view class="tab-foot-img">
  134. <image :src="item.gimg" mode="" class="i2"></image>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. <!-- 推荐规则 -->
  140. <view class="cu-modal" :class="modalName=='Modal'?'show':''">
  141. <view class="cu-dialog">
  142. <view class="cu-bar bg-white justify-end">
  143. <view class="content">推荐规则</view>
  144. <view class="action" @tap="hideModal">
  145. <text class="cuIcon-close yellow"></text>
  146. </view>
  147. </view>
  148. <view class="padding-xl">
  149. {{promote_config.promote_agreement}}
  150. </view>
  151. </view>
  152. </view>
  153. <!-- 推广二维码 -->
  154. <view class="cu-modal" :class="modalName=='qrcode'?'show':''">
  155. <view class="cu-dialog">
  156. <view class="cu-bar bg-white justify-end">
  157. <view class="content">推广二维码</view>
  158. <view class="action" @tap="hideModal">
  159. <text class="cuIcon-close yellow"></text>
  160. </view>
  161. </view>
  162. <view class="padding-xl">
  163. <image class="qrcodeImg" :src="inviteQr"></image>
  164. <canvas canvas-id="qrcode" class="canvas-hide" style="width: 354px;height: 354px;" />
  165. <view class="qrcodeBtn">
  166. <text class="textbgw">长按二维码保存</text>
  167. <button class="cu-btn yellowBg" @click="copyurl">复制链接</button>
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. <!-- 推荐规则 -->
  173. <view class="cu-modal" :class="modalName=='openSetting'?'show':''">
  174. <view class="cu-dialog">
  175. <view class="cu-bar bg-white justify-end">
  176. <view class="content">提示</view>
  177. <view class="action" @tap="hideModal">
  178. <text class="cuIcon-close yellow"></text>
  179. </view>
  180. </view>
  181. <view class="padding-xl">
  182. <view class="">保存二维码需要您授权相关权限</view>
  183. <view class="">
  184. <button type="default" class="cu-btn" @tap="hideModal" style="margin: 10px;">取消</button>
  185. <button type="default" open-type="openSetting" class="cu-btn yellowBg" style="margin: 10px;"
  186. @tap="hideModal">确定</button>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. <!-- 公告栏 -->
  192. <view class="cu-modal" :class="modalName == 'protocol'?'show':''">
  193. <view class="cu-dialog offset-top">
  194. <view class="cu-bar bg-white justify-end">
  195. <view class="content">协议</view>
  196. <view class="action" @tap="hideModal">
  197. <text class="cuIcon-close yellow" />
  198. </view>
  199. </view>
  200. <view class="padding-xl">
  201. <u-parse :content="promote_agreement == null? '暂无文章数据' : promote_agreement" @preview="preview"
  202. @navigate="navigate" className="articleDetailContent" />
  203. </view>
  204. </view>
  205. </view>
  206. <!-- 获取微信信息弹窗框 -->
  207. <view class="cu-modal" :class="modalName == 'login' ? 'show' : ''">
  208. <view class="cu-dialog">
  209. <view class="cu-bar bg-white justify-end">
  210. <view class="content">登录</view>
  211. <view class="action" @tap="modalName = ''">
  212. <text class="cuIcon-close yellow" />
  213. </view>
  214. </view>
  215. <view class="padding-xl">
  216. <view class="top-title" style="">
  217. <text class="top-title1">您还未登陆</text></br>
  218. <text class="top-title2">请先登录再进行操作</text>
  219. </view>
  220. <view class="flex justify-around">
  221. <button type="primary" @tap="modalName = ''" class="cu-btn round greyBg lg">暂不登录</button>
  222. <button type="primary" @click="gotologin" class="cu-btn round yellowBg lg"
  223. hover-class="btn-hover">立刻登录</button>
  224. </view>
  225. </view>
  226. </view>
  227. </view>
  228. </view>
  229. </template>
  230. <script>
  231. var user = require('../../common/user.js');
  232. import store from '@/store'
  233. import {
  234. mapState,
  235. mapMutations,
  236. mapGetters,
  237. mapActions
  238. } from 'vuex';
  239. import uParse from '@/components/u-parse/u-parse.vue'
  240. import uQRCode from '../../js_sdk/Sansnn-uQRCode/uqrcode'
  241. import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy.js'
  242. export default {
  243. components: {
  244. uParse,
  245. uQRCode
  246. },
  247. computed: {
  248. ...mapState(['user']),
  249. ...mapGetters({
  250. hasLogin: 'verifyJwt'
  251. }),
  252. },
  253. data() {
  254. return {
  255. modelStatus: true,
  256. modalName: null,
  257. userInfo: {},
  258. gonggao: false,
  259. hasUserInfo: false,
  260. btnDisabled: false,
  261. background: ['../../static/index/img1.png', '../../static/index/img1.png', '../../static/index/img1.png'],
  262. indicatorDots: true,
  263. vertical: false,
  264. autoplay: false,
  265. interval: 2000,
  266. duration: 500,
  267. imgHost: '',
  268. btns: [{
  269. name: '推广奖金',
  270. img: '/static/tuijian/tuiguang-1.png',
  271. danwei: '元',
  272. },
  273. {
  274. name: '推广订单',
  275. img: '/static/tuijian/dan-1.png',
  276. danwei: '元',
  277. },
  278. {
  279. name: '提现明细',
  280. img: '/static/tuijian/tixian-1.png',
  281. danwei: '元',
  282. },
  283. {
  284. name: '我推荐的人',
  285. img: '/static/tuijian/group-1.png',
  286. danwei: '人',
  287. },
  288. // {
  289. // name: '推广二维码',
  290. // img: '/static/tuijian/qr.png',
  291. // danwei: '',
  292. // },
  293. // {
  294. // name: '银行卡绑定',
  295. // img: '/static/tuijian/bank-1.png',
  296. // danwei: '',
  297. // },
  298. ],
  299. promoteInfo: {
  300. promote_reward: '',
  301. promote_order_num: '',
  302. withdrawn_detail_money: '',
  303. invite_num: '',
  304. audit_balance: 0,
  305. withdrawn: 0,
  306. balance: 0
  307. },
  308. inviteQr: '',
  309. promote_config: {},
  310. // 加盟数据
  311. promote_agreement: '',
  312. money: '',
  313. modalName: null, //协议框状态
  314. tabs: [{
  315. img: '../../static/apply/xiadan.png',
  316. txt: '完成任意订单即可',
  317. txt2: '享受推广人特权',
  318. gimg: '../../static/apply/godan.png'
  319. },
  320. {
  321. img: '../../static/apply/qianbao.png',
  322. txt: '支付',
  323. txt2: '享受推广人特权',
  324. gimg: '../../static/apply/gopay.png'
  325. },
  326. ],
  327. qrcode: ""
  328. }
  329. },
  330. onLoad: function() {
  331. this.imgHost = this.$imgHost
  332. this.qrcode = this.$qrcode
  333. },
  334. onShow: function() {
  335. if (this.hasLogin) {
  336. // this.user刷新就没了,统一调用接口判断
  337. this.getPromoteInfo();
  338. this.getPromoteConfig();
  339. // this.getInviteQr();
  340. } else {
  341. this.modelStatus = false
  342. }
  343. console.log(this.user.id)
  344. this.make(this.user.id)
  345. },
  346. mounted() {
  347. this.configData()
  348. },
  349. methods: {
  350. ...mapActions({
  351. getUser: 'getUser' // 将 `this.getUser()` 映射为 `this.$store.dispatch('getUser')`
  352. }),
  353. // 加盟数据
  354. configData: async function() {
  355. let res = await this.$request.post('/api/SystemConfig/getSysteConfig');
  356. console.log(res)
  357. if (res.code == 200) {
  358. this.money = res.data.promote_price
  359. this.promote_agreement = res.data.promote_agreement
  360. }
  361. },
  362. copyurl() {
  363. const result = h5Copy(this.qrcode + this.user.id)
  364. if (result === false) {
  365. uni.showToast({
  366. title: '复制失败',
  367. icon: "none"
  368. })
  369. } else {
  370. this.modalName = ''
  371. uni.showToast({
  372. title: '复制成功',
  373. icon: 'none'
  374. })
  375. }
  376. },
  377. // 协议
  378. protocol(e) {
  379. this.modalName = e.currentTarget.dataset.target
  380. },
  381. // 推广协议
  382. promoteProtocol() {
  383. uni.navigateTo({
  384. url: "/pages/tuijian/promoteProtocol"
  385. })
  386. },
  387. hideModal(e) {
  388. this.modalName = null
  389. },
  390. async make(id) {
  391. //生成二维码
  392. uQRCode.make({
  393. canvasId: 'qrcode',
  394. componentInstance: this,
  395. text: this.qrcode + id,
  396. size: 354,
  397. margin: 10,
  398. backgroundColor: '#ffffff',
  399. foregroundColor: '#000000',
  400. fileType: 'png',
  401. errorCorrectLevel: uQRCode.errorCorrectLevel.H,
  402. success: res => {
  403. this.inviteQr = res
  404. }
  405. })
  406. },
  407. onBridgeReady: function(res) {
  408. WeixinJSBridge.invoke(
  409. 'getBrandWCPayRequest', {
  410. "appId": res.data.appId,
  411. "timeStamp": res.data.timeStamp,
  412. "nonceStr": res.data.nonceStr,
  413. "package": res.data.package,
  414. "signType": res.data.signType,
  415. "paySign": res.data.paySign
  416. },
  417. function(re) {
  418. if (re.err_msg == "get_brand_wcpay_request:ok") {
  419. uni.showToast({
  420. icon: 'success',
  421. title: '支付成功',
  422. duration: 1000
  423. });
  424. setTimeout(function() {
  425. uni.navigateBack();
  426. }, 1000);
  427. }
  428. });
  429. },
  430. async join(index) {
  431. if (this.$isShow) {
  432. uni.showModal({
  433. title: "提示",
  434. content: "系统维护请等待通知",
  435. showCancel: false,
  436. success: (res) => {}
  437. })
  438. return false
  439. }
  440. let that = this
  441. if (index == 1) {
  442. if (this.hasLogin) {
  443. // if (this.$util.is_weixin()) {
  444. // let res = await this.$request.post('/api/payment/payPromote', {
  445. // plat_type: 1
  446. // });
  447. // if (res.code == 200) {
  448. // if (typeof WeixinJSBridge == "undefined") {
  449. // if (document.addEventListener) {
  450. // document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false);
  451. // } else if (document.attachEvent) {
  452. // document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady);
  453. // document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady);
  454. // }
  455. // } else {
  456. // this.onBridgeReady(res)
  457. // }
  458. // }
  459. // } else {
  460. // let res = await this.$request.post("/api/payment/webPayPromote")
  461. // if (res.code == 200) {
  462. // window.location.href = res.data.mweb_url
  463. // }
  464. // }
  465. uni.navigateTo({
  466. url: "tuijianpay"
  467. })
  468. } else {
  469. uni.navigateTo({
  470. url: "../login/login",
  471. fail: (err) => {
  472. console.log(err)
  473. }
  474. })
  475. }
  476. } else {
  477. uni.switchTab({
  478. url: '/pages/index/index'
  479. });
  480. }
  481. },
  482. gotologin() {
  483. this.modalName = '';
  484. uni.navigateTo({
  485. url: "../login/login",
  486. fail: (err) => {
  487. console.log(err)
  488. }
  489. })
  490. },
  491. // wxLogin: function(e) {
  492. // if (e.detail.userInfo == undefined) {
  493. // uni.showToast({
  494. // title: '微信登录失败'
  495. // });
  496. // return;
  497. // }
  498. // user.loginByWeixin(e.detail.userInfo)
  499. // .then(res => {
  500. // console.log(res)
  501. // this.getUser(true);
  502. // let that = this;
  503. // if (res.code == 200) {
  504. // if (res.data.is_auth == 1){
  505. // this.modalName = ''
  506. // let promoter_type = this.user.promoter_type
  507. // if(promoter_type>0){
  508. // this.modelStatus = true
  509. // this.getPromoteInfo();
  510. // this.getPromoteConfig();
  511. // this.getInviteQr();
  512. // }else{
  513. // uni.navigateTo({
  514. // url: '/pages/mine/info'
  515. // });
  516. // }
  517. // }
  518. // }
  519. // })
  520. // .catch(res => {
  521. // if (res.code == 200) {
  522. // if (res.data.is_auth == 1) {
  523. // console.log(666)
  524. // uni.navigateTo({
  525. // url: '/pages/mine/info'
  526. // });
  527. // }
  528. // }
  529. // });
  530. // },
  531. // ------------------------------------------------------
  532. downloadImg: function(url) {
  533. uni.showLoading({
  534. title: '保存中...'
  535. })
  536. this.btnDisabled = true
  537. uni.downloadFile({
  538. url: url,
  539. success: (res) => {
  540. if (res.statusCode === 200) {
  541. uni.saveImageToPhotosAlbum({
  542. filePath: res.tempFilePath,
  543. success: () => {
  544. uni.hideLoading()
  545. this.btnDisabled = false
  546. uni.showToast({
  547. title: "保存成功",
  548. icon: "none"
  549. });
  550. },
  551. fail: (res) => {
  552. uni.hideLoading()
  553. this.btnDisabled = false
  554. uni.showToast({
  555. title: "保存失败,请稍后重试",
  556. icon: "none"
  557. });
  558. this.modalName = 'openSetting'
  559. }
  560. });
  561. }
  562. }
  563. })
  564. },
  565. getPromoteConfig: async function() {
  566. let res = await this.$request.post('/api/SystemConfig/getSysteConfig', {});
  567. if (res.code == 200) {
  568. this.promote_config = res.data;
  569. } else {
  570. uni.showToast({
  571. icon: 'none',
  572. title: res.message
  573. });
  574. }
  575. },
  576. getPromoteInfo: async function() {
  577. let res = await this.$request.post('/api/userPromote/promoteInfo', {});
  578. console.log(res, 666)
  579. if (res.code == 200) {
  580. this.promoteInfo = res.data
  581. this.modelStatus = true
  582. } else if(res.code == 10001) { // 不是推广人
  583. this.modelStatus = false
  584. } else {
  585. uni.showToast({
  586. icon: 'none',
  587. title: res.message,
  588. duration: 800
  589. });
  590. setTimeout(() => {
  591. uni.switchTab({
  592. url: "../index/index"
  593. })
  594. }, 800)
  595. }
  596. },
  597. // getInviteQr: async function() {
  598. // let res = await this.$request.post('/api/userPromote/getInviteQr', {
  599. // path: 'pages/index/index'
  600. // });
  601. // if (res.code == 200) {
  602. // this.inviteQr = res.data.invite_qr_url;
  603. // } else {
  604. // uni.showToast({
  605. // icon: 'none',
  606. // title: res.message
  607. // });
  608. // }
  609. // },
  610. close() {
  611. this.gonggao = false
  612. },
  613. showgg() {
  614. this.gonggao = true
  615. },
  616. gocash() {
  617. uni.navigateTo({
  618. url: '/pages/tuijian/cash'
  619. })
  620. },
  621. gothere(e) {
  622. if (e == 0) {
  623. uni.switchTab({
  624. url: '/pages/index/index'
  625. })
  626. } else if (e == 1) {
  627. uni.redirectTo({
  628. url: '/pages/tuijian/tuijian'
  629. })
  630. } else if (e == 2) {
  631. uni.switchTab({
  632. url: '/pages/mine/mine'
  633. })
  634. }
  635. },
  636. getthis(e) {
  637. if (this.$isShow) {
  638. uni.showModal({
  639. title: "提示",
  640. content: "系统维护请等待通知",
  641. showCancel: false,
  642. success: (res) => {}
  643. })
  644. return false
  645. }
  646. if (e == 0) {
  647. uni.navigateTo({
  648. url: '/pages/tuijian/jiangjin'
  649. })
  650. } else if (e == 1) {
  651. uni.navigateTo({
  652. url: '/pages/tuijian/order?index=0'
  653. })
  654. } else if (e == 2) {
  655. uni.navigateTo({
  656. url: '/pages/tuijian/cashdetail'
  657. })
  658. } else if (e == 3) {
  659. uni.navigateTo({
  660. url: '/pages/mine/tuijian'
  661. })
  662. } else if (e == 4) {
  663. this.modalName = 'qrcode';
  664. } else {
  665. uni.navigateTo({
  666. url: '/pages/tuijian/bankCard'
  667. })
  668. }
  669. },
  670. recommendRules(e) {
  671. console.log(e)
  672. console.log('点击成功')
  673. this.modalName = e.currentTarget.dataset.target
  674. },
  675. // 关闭函数
  676. hideModal(e) {
  677. this.modalName = null
  678. },
  679. }
  680. }
  681. </script>
  682. <style>
  683. /* 推荐中心样式 */
  684. page {
  685. width: 100%;
  686. background: #fff;
  687. }
  688. .canvas-hide {
  689. /* 1 */
  690. position: fixed;
  691. right: 100vw;
  692. bottom: 100vh;
  693. /* 2 */
  694. z-index: -9999;
  695. /* 3 */
  696. opacity: 0;
  697. }
  698. .main {
  699. width: 100%;
  700. height: auto;
  701. background: #fff;
  702. }
  703. .top-one {
  704. width: 100%;
  705. height: 400rpx;
  706. font-size: 28rpx;
  707. /* position: relative; */
  708. padding-top: 5vw;
  709. }
  710. .top-one .rule {
  711. position: absolute;
  712. top: 4vw;
  713. right: 4vw;
  714. font-family: PingFangSC-Regular, sans-serif;
  715. font-weight: 400;
  716. color: #F5CC57;
  717. }
  718. .top-one .bg {
  719. width: 100%;
  720. position: absolute;
  721. top: 0;
  722. left: 0;
  723. z-index: 0;
  724. height: 30vh;
  725. }
  726. .top-one .infobox {
  727. width: 90vw;
  728. height: 200rpx;
  729. margin: 0 5vw;
  730. position: absolute;
  731. display: flex;
  732. justify-content: space-between;
  733. align-items: center;
  734. }
  735. .infobox .avatar-img {
  736. width: 70px;
  737. height: 70px;
  738. border-radius: 60px;
  739. background: #eee;
  740. }
  741. .infobox .avatar-content {
  742. margin-left: 15rpx;
  743. }
  744. .infobox .qrcode-icon {
  745. margin: 0 auto;
  746. width: 70rpx;
  747. height: 70rpx;
  748. background: #eee;
  749. text-align: center;
  750. margin-bottom: 10rpx;
  751. }
  752. .avatar-content .nickname {
  753. font-size: 32rpx;
  754. margin-top: 20rpx;
  755. color: #FFFFFF;
  756. }
  757. .avatar-content .spread-protocol {
  758. margin-top: 20rpx;
  759. color: #7F786A;
  760. }
  761. .infobox .name {
  762. width: calc(90vw - 150px);
  763. height: 40px;
  764. line-height: 40px;
  765. margin: 40px 0;
  766. font-size: 18px;
  767. color: #394043;
  768. }
  769. .mainbg {
  770. width: 100%;
  771. height: 66vh;
  772. position: fixed;
  773. bottom: 0;
  774. left: 0;
  775. }
  776. .keti {
  777. width: 80vw;
  778. height: 60px;
  779. line-height: 60px;
  780. margin: 0 10vw;
  781. background: #F49A31;
  782. border-radius: 40px;
  783. color: #fff;
  784. position: fixed;
  785. top: 32vw;
  786. display: flex;
  787. justify-content: space-between;
  788. padding: 0 15px;
  789. font-size: 14px;
  790. font-weight: 300;
  791. }
  792. .btn {
  793. width: auto;
  794. border: 1px solid #fff;
  795. border-radius: 4px;
  796. padding: 0 15px;
  797. height: 33px;
  798. line-height: 33px;
  799. margin: 15px 0;
  800. font-size: 24rpx;
  801. font-weight: 300;
  802. font-family: PingFangSC-Regular, sans-serif;
  803. }
  804. .tixian-box {
  805. width: 80vw;
  806. height: auto;
  807. padding: 5vw;
  808. display: flex;
  809. justify-content: center;
  810. position: fixed;
  811. top: 55vw;
  812. left: 10vw;
  813. background: #fff;
  814. }
  815. .tixian-box .tbtn {
  816. width: 39.5vw;
  817. height: 60px;
  818. }
  819. .tbtn .title {
  820. width: 100%;
  821. height: 30px;
  822. text-align: center;
  823. line-height: 30px;
  824. font-size: 32rpx;
  825. font-weight: 400;
  826. color: #555864;
  827. font-family: PingFangSC-Regular, sans-serif;
  828. }
  829. .tbtn .num {
  830. width: 100%;
  831. height: 30px;
  832. line-height: 30px;
  833. text-align: center;
  834. color: #ED462F;
  835. font-family: PingFangSC-Regular, sans-serif;
  836. }
  837. .tbtn .num .num-value {
  838. font-size: 38rpx;
  839. font-weight: 500;
  840. color: #ED462F;
  841. font-family: PingFangSC-Regular, sans-serif;
  842. }
  843. .tixian-box .yiti {
  844. border-right: 1px dashed #F5CC57;
  845. }
  846. .btns {
  847. width: 90vw;
  848. height: auto;
  849. display: flex;
  850. justify-content: space-around;
  851. flex-wrap: wrap;
  852. position: fixed;
  853. top: calc(70vw + 80px);
  854. left: 5vw;
  855. }
  856. .btns .tab {
  857. /* width: 27vw;
  858. height: 27vw; */
  859. width: 160rpx;
  860. height: 160rpx;
  861. margin-bottom: 3vw;
  862. background: rgba(255, 255, 255, 1);
  863. box-shadow: 6rpx 6rpx 20rpx rgba(26, 26, 26, 0.2);
  864. border-radius: 8px;
  865. }
  866. .tab .imgs {
  867. width: 100%;
  868. height: 60rpx;
  869. display: flex;
  870. justify-content: center;
  871. align-items: center;
  872. margin-bottom: 5rpx;
  873. }
  874. .tab .imgs .imgs-item {
  875. width: 45rpx;
  876. height: 45rpx;
  877. }
  878. .imgs-item1 {
  879. width: 48rpx !important !;
  880. }
  881. .imgs-item2 {
  882. width: 39rpx !important;
  883. }
  884. .imgs-item3 {
  885. width: 40rpx !important;
  886. }
  887. .imgs-item4 {
  888. width: 52rpx !important;
  889. }
  890. .imgs-item5 {
  891. width: 50rpx !important;
  892. height: 42rpx !important;
  893. }
  894. .tab .tab-img {
  895. width: 100%;
  896. height: 100%;
  897. /* width: 48rpx;
  898. height: 48rpx; */
  899. /* margin-bottom: 5rpx; */
  900. /* width: 9vw;
  901. height: 8vw;
  902. margin: 4vw 9vw 1vw 9vw; */
  903. }
  904. .tab .name {
  905. width: 100%;
  906. height: 50rpx;
  907. line-height: 50rpx;
  908. margin-bottom: 5rpx;
  909. font-size: 28rpx;
  910. font-weight: 400;
  911. color: #555864;
  912. text-align: center;
  913. font-family: PingFangSC-Regular, sans-serif;
  914. }
  915. .tab .price {
  916. width: 100%;
  917. height: 5vw;
  918. line-height: 5vw;
  919. color: #ED462F;
  920. text-align: center;
  921. font-size: 26rpx;
  922. font-weight: 400;
  923. text-align: center;
  924. font-family: PingFangSC-Regular, sans-serif;
  925. }
  926. .tab .ren {
  927. color: #F5CC57;
  928. }
  929. .bg {
  930. width: 100vw;
  931. height: 100vh;
  932. background: rgba(0, 0, 0, 0.3);
  933. position: fixed;
  934. top: 0;
  935. left: 0;
  936. }
  937. /* .bg .gonggaobox{
  938. width: calc( 90vw - 30px );
  939. height: auto;
  940. padding: 15px;
  941. background: #fff;
  942. border-radius: 8px;
  943. margin: 30% 5vw;
  944. } */
  945. /* .gonggaobox .title{
  946. width: 100%;
  947. height: 50px;
  948. line-height: 50px;
  949. display: flex;
  950. border-bottom: 1px solid #eee;
  951. } */
  952. .title .name1 {
  953. width: 60%;
  954. height: 50px;
  955. text-align: center;
  956. color: #555864;
  957. }
  958. .title .close {
  959. width: 20%;
  960. height: 50px;
  961. text-align: center;
  962. color: #F5CC57;
  963. }
  964. /* .gonggaobox .txt{
  965. padding: 15px;
  966. text-indent: 20px;
  967. color: #555864;
  968. font-weight:300;
  969. font-size:26rpx;
  970. align-items: center;
  971. width: 100%;
  972. height: auto;
  973. } */
  974. .txt image {
  975. width: 100px;
  976. height: 100px;
  977. margin: 20px calc(45vw - 65px);
  978. }
  979. .yellow {
  980. color: #F5CC57;
  981. }
  982. .uni-icons {
  983. font-size: 32rpx !important;
  984. }
  985. .yellowBg {
  986. color: #fff !important;
  987. background: #f5cc57 !important;
  988. font-size: 16px;
  989. font-family: PingFangSC-Regular, sans-serif;
  990. width: 224rpx;
  991. margin-top: 10rpx;
  992. }
  993. .textbgw {
  994. color: #f5cc57 !important;
  995. font-size: 16px;
  996. font-family: PingFangSC-Regular, sans-serif;
  997. }
  998. /* 底部导航栏 */
  999. /* .foot{
  1000. position: fixed;
  1001. bottom: 0;
  1002. left: 0;
  1003. background: #fff;
  1004. width: 100%;
  1005. height: 50px;
  1006. display: flex;
  1007. justify-content: space-around;
  1008. border-top: 1px solid #eee;
  1009. }
  1010. .foot .box{
  1011. width: 60px;
  1012. height: 40px;
  1013. margin: 5px;
  1014. }
  1015. .box .icon{
  1016. width: 26px;
  1017. height: 26px;
  1018. margin: 0 17px;
  1019. }
  1020. .box .txt{
  1021. width: 60px;
  1022. height: 10px;
  1023. line-height: 10px;
  1024. text-align: center;
  1025. font-size: 12px;
  1026. color: #989898;
  1027. }
  1028. .box .native{
  1029. color: #000;
  1030. } */
  1031. .qrcodeImg {
  1032. width: 200rpx;
  1033. height: 200rpx;
  1034. }
  1035. .qrcodeBtn {
  1036. margin-top: 15px;
  1037. display: flex;
  1038. flex-direction: column;
  1039. align-items: center;
  1040. }
  1041. /* 加盟申请样式 */
  1042. .main-two {
  1043. width: 100vw;
  1044. height: auto;
  1045. margin-bottom: 20px;
  1046. }
  1047. /* 新增 */
  1048. .top-img {
  1049. width: 100%;
  1050. height: 42vw;
  1051. position: relative;
  1052. }
  1053. .top-img image {
  1054. width: 100vw;
  1055. height: 42vw;
  1056. padding: 10px;
  1057. }
  1058. .top-box {
  1059. width: 80vw;
  1060. position: absolute;
  1061. top: 40%;
  1062. left: 50%;
  1063. transform: translate(-50%, -50%);
  1064. }
  1065. .title-top {
  1066. width: auto;
  1067. height: 46rpx;
  1068. margin-bottom: 30rpx;
  1069. text-align: center;
  1070. font-size: 32rpx;
  1071. font-weight: 400;
  1072. color: #fff;
  1073. font-family: PingFangSC-Regular, sans-serif;
  1074. position: relative;
  1075. }
  1076. .protocol-btns {
  1077. position: absolute;
  1078. top: 0;
  1079. right: 0;
  1080. color: #FAC45D;
  1081. width: 150rpx;
  1082. height: 46rpx;
  1083. line-height: 46rpx;
  1084. text-align: center;
  1085. background: #fff;
  1086. border-radius: 50px;
  1087. }
  1088. .sponsor {
  1089. width: 100%;
  1090. padding: 0 50rpx
  1091. }
  1092. .sponsor-btn {
  1093. width: 100%;
  1094. height: 80rpx;
  1095. line-height: 80rpx;
  1096. text-align: center;
  1097. border-radius: 50rpx;
  1098. margin: 60rpx 0 80rpx 0;
  1099. color: #FFFFFF;
  1100. font-size: 28rpx;
  1101. background: #FAC45D;
  1102. }
  1103. /* */
  1104. .top-two {
  1105. width: 100%;
  1106. height: auto;
  1107. }
  1108. .top-two image {
  1109. width: 100vw;
  1110. height: 42vw;
  1111. padding: 10px;
  1112. }
  1113. .protocol {
  1114. width: 90vw;
  1115. height: 140px;
  1116. background: #fff;
  1117. border-radius: 5px;
  1118. padding: 20px 10px;
  1119. margin: 5vw;
  1120. position: relative;
  1121. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  1122. }
  1123. .protocol .protocol-btn {
  1124. /* width: auto;
  1125. height: auto; */
  1126. width: 160rpx;
  1127. height: 48rpx;
  1128. line-height: 48rpx;
  1129. /* padding: 3px 20px; */
  1130. color: #F5CC57;
  1131. font-size: 24rpx;
  1132. font-weight: 500;
  1133. text-align: center;
  1134. font-family: PingFangSC-Regular, sans-serif;
  1135. background: rgba(236, 207, 125, 0.2);
  1136. border-radius: 8px;
  1137. float: right;
  1138. }
  1139. .protocol .protocol-content .protocol-content-img {
  1140. width: 120rpx;
  1141. height: 120rpx;
  1142. margin-right: 10rpx;
  1143. position: absolute;
  1144. top: 60px;
  1145. }
  1146. .protocol .protocol-content .title {
  1147. width: calc(90vw - 90px);
  1148. height: 45rpx;
  1149. line-height: 45rpx;
  1150. font-size: 32rpx;
  1151. font-weight: 300;
  1152. font-family: PingFangSC-Regular, sans-serif;
  1153. color: #555864;
  1154. position: absolute;
  1155. top: 60px;
  1156. left: 80px;
  1157. }
  1158. .protocol .protocol-content .txt {
  1159. width: calc(90vw - 90px);
  1160. height: 66rpx;
  1161. line-height: 66rpx;
  1162. font-size: 24rpx;
  1163. font-weight: 300;
  1164. font-family: PingFangSC-Regular, sans-serif;
  1165. line-height: 20px;
  1166. color: #777;
  1167. position: absolute;
  1168. top: 85px;
  1169. left: 80px;
  1170. }
  1171. .tabs {
  1172. width: 90vw;
  1173. height: auto;
  1174. margin: 0 5vw;
  1175. display: flex;
  1176. justify-content: space-between;
  1177. }
  1178. .tabs .tab {
  1179. width: 42.5vw;
  1180. height: auto;
  1181. border-radius: 5px;
  1182. background: #fff;
  1183. padding: 20px 0;
  1184. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  1185. }
  1186. .tab .i1 {
  1187. width: 36px;
  1188. height: 36px;
  1189. margin: 0 calc(21.25vw - 18px);
  1190. }
  1191. .tab .tab-txt {
  1192. width: 81%;
  1193. height: auto;
  1194. line-height: 20px;
  1195. text-align: center;
  1196. margin: 10px 10%;
  1197. font-size: 30rpx;
  1198. font-weight: 300;
  1199. font-family: PingFangSC-Regular, sans-serif;
  1200. color: #555864;
  1201. }
  1202. .tab .i2 {
  1203. width: 100px;
  1204. height: 30px;
  1205. margin: 0 calc(21.25vw - 50px);
  1206. }
  1207. .yellow {
  1208. color: #F5CC57;
  1209. }
  1210. .yellowBg {
  1211. background: #F5CC57 !important;
  1212. }
  1213. .greyBg {
  1214. background: grey !important;
  1215. }
  1216. .top-title {
  1217. margin-bottom: 15px;
  1218. }
  1219. .top-title .top-title1 {
  1220. font-size: 19px;
  1221. color: #000000;
  1222. margin-top: 10px;
  1223. }
  1224. .top-title .top-title2 {
  1225. font-size: 13px;
  1226. color: #999;
  1227. }
  1228. .offset-top {
  1229. bottom: 200px;
  1230. }
  1231. </style>