index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. <template>
  2. <view class="page-box">
  3. <navBar title="vip" color="#b1643c" />
  4. <view class="page-content">
  5. <!-- 用户端 -->
  6. <block v-if="userType == 1">
  7. <view class="bgTop flex justify-center">
  8. <view class="bgTop-box">
  9. <view class="bgTop-box-top flex justify-center align-center">
  10. <view class="bgTop-box-top-box flex justify-between align-center">
  11. <view class="bgTop-box-top-box-l">
  12. <view class="bgTop-box-top-box-l-t">
  13. {{ isVip == true ? "已开通会员" : "开通会员" }}
  14. </view>
  15. <view class="bgTop-box-top-box-l-c"> 提升简历曝光 </view>
  16. <view class="bgTop-box-top-box-l-b">
  17. {{
  18. isVip == true ? "到期时间:" + dataTime : "开通会员更多招聘方联系你"
  19. }}
  20. </view>
  21. </view>
  22. <view class="bgTop-box-top-box-r">
  23. <image src="../../static/images/my/icon/vip5.png" mode=""></image>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="bgTop-box-btn flex justify-around">
  28. <view class="bgTop-box-btn-item">
  29. <image src="../../static/images/my/icon/btn1.png" mode=""></image>
  30. <view class="bgTop-box-btn-item-t"> 专属客服 </view>
  31. </view>
  32. <view class="bgTop-box-btn-item">
  33. <image src="../../static/images/my/icon/btn2.png" mode=""></image>
  34. <view class="bgTop-box-btn-item-t"> 优先提醒 </view>
  35. </view>
  36. <view class="bgTop-box-btn-item">
  37. <image src="../../static/images/my/icon/btn3.png" mode=""></image>
  38. <view class="bgTop-box-btn-item-t"> 简历刷新 </view>
  39. </view>
  40. <view class="bgTop-box-btn-item">
  41. <image src="../../static/images/my/icon/btn4.png" mode=""></image>
  42. <view class="bgTop-box-btn-item-t"> 简历置顶 </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="icon flex justify-center align-start">
  48. <u-icon name="arrow-up-fill" color="#ffffff" size="50"></u-icon>
  49. </view>
  50. <view class="bgc"></view>
  51. <view class="bgb flex justify-center">
  52. <view class="bgb-c flex justify-center">
  53. <view class="bgb-c-n">
  54. <view class="bgb-c-n-title flex justify-between align-center">
  55. <view class="bgb-c-n-title-l bgb-c-n-titles"> 专属特权 </view>
  56. <view class="bgb-c-n-title-c bgb-c-n-titles"> 普通用户 </view>
  57. <view class="bgb-c-n-title-r bgb-c-n-titles"> VIP </view>
  58. </view>
  59. <view class="bgb-c-n-title flex justify-between align-center">
  60. <view class="bgb-c-n-title-l bgb-c-n-titles"> 简历刷新 </view>
  61. <view class="bgb-c-n-title-c bgb-c-n-titles"> {{ noVipNum }}次/天 </view>
  62. <view class="bgb-c-n-title-r bgb-c-n-titles"> {{ vipNum }}次/天 </view>
  63. </view>
  64. <view class="bgb-c-n-title flex justify-between align-center">
  65. <view class="bgb-c-n-title-l bgb-c-n-titles"> 优先提醒 </view>
  66. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  67. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  68. </view>
  69. <view class="bgb-c-n-title flex justify-between align-center">
  70. <view class="bgb-c-n-title-l bgb-c-n-titles"> 专属客服 </view>
  71. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  72. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  73. </view>
  74. <view class="bgb-c-n-title flex justify-between align-center">
  75. <view class="bgb-c-n-title-l bgb-c-n-titles"> 视频面试 </view>
  76. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  77. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  78. </view>
  79. <view class="bgb-c-n-title flex justify-between align-center">
  80. <view class="bgb-c-n-title-l bgb-c-n-titles"> 语音沟通 </view>
  81. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  82. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  83. </view>
  84. <view class="bgb-c-n-title flex justify-between align-center">
  85. <view class="bgb-c-n-title-l bgb-c-n-titles"> 简历置顶 </view>
  86. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  87. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="btn flex justify-center align-start flex-wrap" v-if="isVip == false">
  93. <view class="" style="width: 686rpx; padding-left: 20rpx">
  94. <view class="flex align-center" style="width: 100%">
  95. <u-checkbox size="28rpx" v-model="checked" shape="circle">
  96. <view class="flex align-center">开通即同意<navigator style="color: #016bf6"
  97. url="/my/setting/weekXiYi" open-type="navigate">《会员开通协议》</navigator>
  98. </view>
  99. </u-checkbox>
  100. </view>
  101. </view>
  102. <view class="btn-c flex align-center justify-between">
  103. <view class="btn-c-l flex align-center">
  104. <text>{{ vipPrice }}</text>
  105. <text>元/月</text>
  106. </view>
  107. <view class="btn-c-r flex justify-center align-center" @click="submit()">
  108. 立即购买
  109. </view>
  110. </view>
  111. </view>
  112. </block>
  113. <block v-else>
  114. <view class="bgTop flex justify-center">
  115. <view class="bgTop-box">
  116. <view class="bgTop-box-top flex justify-center align-center">
  117. <view class="bgTop-box-top-box flex justify-between align-center">
  118. <view class="bgTop-box-top-box-l">
  119. <view class="bgTop-box-top-box-l-t">
  120. {{ isVipC == true ? "已开通会员" : "开通会员" }}
  121. </view>
  122. <view class="bgTop-box-top-box-l-c"> 提升岗位曝光 </view>
  123. <view class="bgTop-box-top-box-l-b">
  124. {{
  125. isVipC == true
  126. ? "到期时间:" + dataTimeC
  127. : "开通会员更多求职者联系你"
  128. }}
  129. </view>
  130. </view>
  131. <view class="bgTop-box-top-box-r">
  132. <image src="../../static/images/my/icon/vip5.png" mode=""></image>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="bgTop-box-btn flex justify-around">
  137. <view class="bgTop-box-btn-item">
  138. <image src="../../static/images/my/icon/btn1.png" mode=""></image>
  139. <view class="bgTop-box-btn-item-t"> 专属客服 </view>
  140. </view>
  141. <view class="bgTop-box-btn-item">
  142. <image src="../../static/images/my/icon/btn2.png" mode=""></image>
  143. <view class="bgTop-box-btn-item-t"> 优先推荐 </view>
  144. </view>
  145. <view class="bgTop-box-btn-item">
  146. <image src="../../static/images/my/icon/btn3.png" mode=""></image>
  147. <view class="bgTop-box-btn-item-t"> 招聘刷新 </view>
  148. </view>
  149. <view class="bgTop-box-btn-item">
  150. <image src="../../static/images/my/icon/btn4.png" mode=""></image>
  151. <view class="bgTop-box-btn-item-t"> 专属特权 </view>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="icon flex justify-center align-start">
  157. <u-icon name="arrow-up-fill" color="#ffffff" size="50"></u-icon>
  158. </view>
  159. <view class="bgc"></view>
  160. <view class="bgb flex justify-center">
  161. <view class="bgb-c flex justify-center">
  162. <view class="bgb-c-n">
  163. <view class="bgb-c-n-title flex justify-between align-center">
  164. <view class="bgb-c-n-title-l bgb-c-n-titles"> 专属特权 </view>
  165. <view class="bgb-c-n-title-c bgb-c-n-titles"> 普通用户 </view>
  166. <view class="bgb-c-n-title-r bgb-c-n-titles"> VIP </view>
  167. </view>
  168. <view class="bgb-c-n-title flex justify-between align-center">
  169. <view class="bgb-c-n-title-l bgb-c-n-titles"> 招聘刷新 </view>
  170. <view class="bgb-c-n-title-c bgb-c-n-titles">
  171. {{ noVipNumCom }}次/天
  172. </view>
  173. <view class="bgb-c-n-title-r bgb-c-n-titles"> {{ vipNumCom }}次/天 </view>
  174. </view>
  175. <view class="bgb-c-n-title flex justify-between align-center">
  176. <view class="bgb-c-n-title-l bgb-c-n-titles"> 优先推荐 </view>
  177. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  178. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  179. </view>
  180. <view class="bgb-c-n-title flex justify-between align-center">
  181. <view class="bgb-c-n-title-l bgb-c-n-titles"> 专属客服 </view>
  182. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  183. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  184. </view>
  185. <view class="bgb-c-n-title flex justify-between align-center">
  186. <view class="bgb-c-n-title-l bgb-c-n-titles"> 视频面试 </view>
  187. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  188. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  189. </view>
  190. <view class="bgb-c-n-title flex justify-between align-center">
  191. <view class="bgb-c-n-title-l bgb-c-n-titles"> 语音沟通 </view>
  192. <view class="bgb-c-n-title-c bgb-c-n-titles"> × </view>
  193. <view class="bgb-c-n-title-r bgb-c-n-titles"> √ </view>
  194. </view>
  195. <view class="bgb-c-n-title flex justify-between align-center">
  196. <view class="bgb-c-n-title-l bgb-c-n-titles"> 免费沟通 </view>
  197. <view class="bgb-c-n-title-c bgb-c-n-titles"> {{ msgNum }}次/天 </view>
  198. <view class="bgb-c-n-title-r bgb-c-n-titles"> {{ vipMsgNum }}次/天 </view>
  199. </view>
  200. <view class="bgb-c-n-title flex justify-between align-center">
  201. <view class="bgb-c-n-title-l bgb-c-n-titles"> 沟通价格 </view>
  202. <view class="bgb-c-n-title-c bgb-c-n-titles"> {{ msgPrice }}元/次 </view>
  203. <view class="bgb-c-n-title-r bgb-c-n-titles">
  204. {{ vipMsgPrice }}元/次
  205. </view>
  206. </view>
  207. </view>
  208. </view>
  209. </view>
  210. <view class="btn flex justify-center align-start flex-wrap" v-if="isVipC == false">
  211. <view class="" style="width: 686rpx; padding-left: 20rpx">
  212. <view class="flex align-center" style="width: 100%">
  213. <u-checkbox size="28rpx" v-model="checked" shape="circle">
  214. <view class="flex align-center">开通即同意<navigator style="color: #016bf6"
  215. url="/my/setting/weekXiYi" open-type="navigate">《会员开通协议》</navigator>
  216. </view>
  217. </u-checkbox>
  218. </view>
  219. </view>
  220. <view class="btn-c flex align-center justify-between">
  221. <view class="btn-c-l flex align-center">
  222. <text>{{ vipPrice }}</text>
  223. <text>元/月</text>
  224. </view>
  225. <view class="btn-c-r flex justify-center align-center" @click="submit()">
  226. 立即购买
  227. </view>
  228. </view>
  229. </view>
  230. </block>
  231. <u-popup v-model="show" mode="bottom" :mask-close-able="false" border-radius="24" :closeable="true">
  232. <view class="payTitle">选择支付类型</view>
  233. <view class="payPrice"> 支付价格:¥{{ vipPrice }} </view>
  234. <view class="payList flex justify-center">
  235. <view class="payList-box">
  236. <view class="payList-box-item flex align-center justify-between" v-for=""
  237. v-for="(item, index) in openLists" :key="index">
  238. <view class="payList-box-item-l flex align-center">
  239. <image :src="item.image" style="
  240. width: 54rpx;
  241. height: 54rpx;
  242. border-radius: 50%;
  243. margin-right: 20rpx;
  244. " mode="">
  245. </image>
  246. {{ item.text }}
  247. </view>
  248. <view class="payList-box-item-r">
  249. <radio-group name="openWay" @tap="selectWay(item)">
  250. <label class="tui-radio">
  251. <radio color="#016BF6" :checked="openWay === item.id ? true : false" />
  252. </label>
  253. </radio-group>
  254. </view>
  255. </view>
  256. </view>
  257. </view>
  258. <view class="payBtn flex justify-center">
  259. <view class="payBtn-box flex justify-center align-center" @click="pay()">
  260. 确认支付
  261. </view>
  262. </view>
  263. </u-popup>
  264. </view>
  265. </view>
  266. </template>
  267. <script>
  268. import navBar from "@/components/nav-bar/index.vue";
  269. export default {
  270. data() {
  271. return {
  272. show: false,
  273. checked: false,
  274. number: 0,
  275. userType: "2",
  276. current: 0,
  277. xingValue1: "",
  278. chakan1: "",
  279. jiangjiMouth: "",
  280. xingValue2: "",
  281. chakan2: "",
  282. jiangjiMouth2: "",
  283. list1: [],
  284. list2: [],
  285. list3: [],
  286. vipNum: 0,
  287. noVipNum: 0,
  288. vipNumCom: 0,
  289. noVipNumCom: 0,
  290. userMonthTime: "", //用户会员到期时间
  291. companyMonthTime: "", //企业会员到期时间
  292. vipPrice: "0", //会员价格
  293. openLists: [],
  294. openWay: 1,
  295. isVip: false,
  296. isVipC: "",
  297. dataTime: "", //到期时间
  298. dataTimeC: "",
  299. isTrue: true,
  300. msgNum: 0, //非会员每天免费联系次数
  301. vipMsgNum: 0, //会员每天免费联系次数
  302. msgPrice: 0, //非会员每次联系价格
  303. vipMsgPrice: 0, //会员每次联系价格
  304. };
  305. },
  306. components: {
  307. navBar,
  308. },
  309. onShow() {
  310. this.msgNum = uni.getStorageSync("msgNum") ? uni.getStorageSync("msgNum") : 0;
  311. this.vipMsgNum = uni.getStorageSync("vipMsgNum") ?
  312. uni.getStorageSync("vipMsgNum") :
  313. 0;
  314. this.vipMsgPrice = uni.getStorageSync("vipMsgPrice") ?
  315. uni.getStorageSync("vipMsgPrice") :
  316. 0;
  317. this.msgPrice = uni.getStorageSync("msgPrice") ? uni.getStorageSync("msgPrice") : 0;
  318. this.getUserInfo();
  319. },
  320. onLoad() {
  321. this.userType = uni.getStorageSync("userType");
  322. if (this.userType == 1) {
  323. //用户简历的刷新次数
  324. this.getVipPeople();
  325. this.getNoVipPeople();
  326. } else {
  327. this.getVipCom();
  328. this.getNoVipCom();
  329. }
  330. this.getVipPrice();
  331. // #ifdef APP-PLUS
  332. this.openLists = [{
  333. image: "../../static/images/my/zhifubao.png",
  334. text: "支付宝",
  335. id: 1,
  336. },
  337. {
  338. image: "../../static/images/my/icon_weixin.png",
  339. text: "微信",
  340. id: 2,
  341. },
  342. ];
  343. this.openWay = 1;
  344. // #endif
  345. // #ifdef MP-WEIXIN
  346. this.openLists = [{
  347. image: "../../static/share/icon_weixin.png",
  348. text: "微信",
  349. id: 2,
  350. }, ];
  351. this.openWay = 2;
  352. // #endif
  353. // #ifdef H5
  354. let ua = navigator.userAgent.toLowerCase();
  355. if (ua.indexOf("micromessenger") !== -1) {
  356. this.openLists = [{
  357. image: "../../static/images/my/zhifubao.png",
  358. text: "支付宝",
  359. id: 1,
  360. },
  361. {
  362. image: "../../static/share/icon_weixin.png",
  363. text: "微信",
  364. id: 2,
  365. },
  366. ];
  367. } else {
  368. this.openLists = [{
  369. image: "../../static/images/my/zhifubao.png",
  370. text: "支付宝",
  371. id: 1,
  372. }, ];
  373. }
  374. this.openWay = 1;
  375. // #endif
  376. },
  377. methods: {
  378. //支付
  379. pay() {
  380. let that = this;
  381. if (that.isTrue == false) {
  382. return;
  383. }
  384. let token = uni.getStorageSync('token')
  385. if (!token) {
  386. uni.showToast({
  387. title: "登录过期",
  388. icon: "none",
  389. });
  390. return
  391. }
  392. console.log('进入支付')
  393. that.isTrue = false;
  394. if (this.openWay == 2) {
  395. // #ifdef APP-PLUS
  396. // 微信APP支付 根据订单id获取支付信息
  397. this.$Request
  398. .post("/app/wxPay/wxPayOrder", {
  399. classify: 1,
  400. money: this.vipPrice,
  401. type: 2,
  402. })
  403. .then((ret) => {
  404. this.isCheckPay(ret.code, "wxpay", JSON.stringify(ret.data));
  405. });
  406. // #endif
  407. // #ifdef MP-WEIXIN
  408. // 微信小程序支付
  409. this.$Request
  410. .post("/app/wxPay/wxPayOrder", {
  411. classify: 3,
  412. money: this.vipPrice,
  413. type: 2,
  414. })
  415. .then((ret) => {
  416. uni.hideLoading();
  417. console.log(ret.data);
  418. uni.requestPayment({
  419. provider: "wxpay",
  420. timeStamp: ret.data.timestamp,
  421. nonceStr: ret.data.noncestr,
  422. package: ret.data.package,
  423. signType: ret.data.signType,
  424. paySign: ret.data.sign,
  425. success: function(suc) {
  426. console.log("success:" + JSON.stringify(suc));
  427. uni.showToast({
  428. title: "支付成功",
  429. icon: "success",
  430. });
  431. that.show = false;
  432. that.isTrue = true;
  433. that.getUserInfo();
  434. },
  435. fail: function(err) {
  436. console.log("fail:" + JSON.stringify(err));
  437. that.isTrue = true;
  438. uni.showToast({
  439. title: "支付失败",
  440. icon: "none",
  441. });
  442. },
  443. });
  444. });
  445. // #endif
  446. // #ifdef H5
  447. let ua = navigator.userAgent.toLowerCase();
  448. if (ua.indexOf("micromessenger") !== -1) {
  449. let data = {
  450. classify: 2,
  451. money: this.vipPrice,
  452. type: 2,
  453. };
  454. this.$Request.postJson("/app/wxPay/wxPayOrder", data).then((res) => {
  455. if (res.code == 0) {
  456. this.callPay(res.data);
  457. } else {
  458. that.isTrue = true;
  459. uni.showToast({
  460. icon: "none",
  461. title: "支付失败!",
  462. });
  463. }
  464. });
  465. }
  466. // #endif
  467. } else {
  468. // APP支付宝支付
  469. // #ifdef APP
  470. console.log("APP进入支付。");
  471. const datas = {
  472. classify: 4,
  473. money: 0.1,
  474. type: 2,
  475. }
  476. this.$Request.postT("/app/aliPay/payMoneyOrder", datas).then((ret) => {
  477. this.show = false;
  478. console.log(ret);
  479. this.isCheckPay(ret.code, "alipay", ret.data);
  480. });
  481. // #endif
  482. // #ifdef H5
  483. let data = {
  484. classify: 4,
  485. money: this.vipPrice,
  486. type: 2,
  487. };
  488. this.$Request.postJson("/app/aliPay/payMoneyOrder", data).then((res) => {
  489. if (res.code === 0) {
  490. this.show = false;
  491. that.isTrue = true;
  492. const div = document.createElement("div");
  493. div.innerHTML = res.data; //此处form就是后台返回接收到的数据
  494. // document.body.appendChild(div);
  495. // document.forms[0].submit();
  496. } else {
  497. that.isTrue = true;
  498. uni.showToast({
  499. icon: "none",
  500. title: "支付失败!",
  501. });
  502. }
  503. });
  504. // #endif
  505. }
  506. },
  507. callPay: function(response) {
  508. if (typeof WeixinJSBridge === "undefined") {
  509. if (document.addEventListener) {
  510. document.addEventListener(
  511. "WeixinJSBridgeReady",
  512. this.onBridgeReady(response),
  513. false
  514. );
  515. } else if (document.attachEvent) {
  516. document.attachEvent("WeixinJSBridgeReady", this.onBridgeReady(response));
  517. document.attachEvent("onWeixinJSBridgeReady", this.onBridgeReady(response));
  518. }
  519. } else {
  520. this.onBridgeReady(response);
  521. }
  522. },
  523. onBridgeReady: function(response) {
  524. let that = this;
  525. if (!response.package) {
  526. return;
  527. }
  528. console.log(response, "++++++++");
  529. WeixinJSBridge.invoke(
  530. "getBrandWCPayRequest", {
  531. appId: response.appid, //公众号名称,由商户传入
  532. timeStamp: response.timestamp, //时间戳,自1970年以来的秒数
  533. nonceStr: response.noncestr, //随机串
  534. package: response.package,
  535. signType: response.signType, //微信签名方式:
  536. paySign: response.sign, //微信签名
  537. },
  538. function(res) {
  539. console.log(res, "/*-/*-/*-");
  540. if (res.err_msg === "get_brand_wcpay_request:ok") {
  541. // 使用以上方式判断前端返回,微信团队郑重提示:
  542. //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
  543. uni.showLoading({
  544. title: "支付成功",
  545. });
  546. setTimeout(function() {
  547. that.isTrue = true;
  548. uni.hideLoading();
  549. }, 1000);
  550. that.show = false;
  551. that.getUserInfo();
  552. } else {
  553. that.isTrue = true;
  554. uni.hideLoading();
  555. }
  556. WeixinJSBridge.log(response.err_msg);
  557. }
  558. );
  559. },
  560. isCheckPay(status, name, order) {
  561. let that = this;
  562. if (status == 0) {
  563. this.setPayment(name, order);
  564. } else {
  565. uni.hideLoading();
  566. that.isTrue = true;
  567. uni.showToast({
  568. title: "支付信息有误",
  569. icon: "none",
  570. });
  571. }
  572. },
  573. setPayment(name, order) {
  574. let that = this;
  575. console.log("*-*-*");
  576. uni.requestPayment({
  577. provider: name,
  578. orderInfo: order, //微信、支付宝订单数据
  579. success: function(res) {
  580. console.log(res);
  581. uni.hideLoading();
  582. uni.showLoading({
  583. title: "支付成功",
  584. });
  585. that.show = false;
  586. that.getUserInfo();
  587. that.isTrue = true;
  588. },
  589. fail: function(err) {
  590. console.log(err);
  591. that.isTrue = true;
  592. uni.hideLoading();
  593. },
  594. complete() {
  595. that.isTrue = true;
  596. uni.hideLoading();
  597. },
  598. });
  599. },
  600. selectWay: function(item) {
  601. this.openWay = item.id;
  602. },
  603. //获取会员开通价格
  604. getVipPrice() {
  605. if (uni.getStorageSync("userType") == 1) {
  606. //用户会员价格
  607. this.$Request.get("/app/common/type/331").then((res) => {
  608. if (res.code == 0) {
  609. this.vipPrice = res.data.value;
  610. }
  611. });
  612. } else {
  613. //企业会员价格
  614. this.$Request.get("/app/common/type/332").then((res) => {
  615. if (res.code == 0) {
  616. this.vipPrice = res.data.value;
  617. }
  618. });
  619. }
  620. },
  621. //获取个人信息
  622. getUserInfo() {
  623. this.$Request.get("/app/user/selectUserById").then((res) => {
  624. if (res.code == 0) {
  625. if (res.data.isUserVip + "" == 1) {
  626. this.isVip = true;
  627. this.dataTime = res.data.userMonthTime;
  628. } else {
  629. this.isVip = false;
  630. }
  631. if (res.data.isCompanyVip + "" == "1") {
  632. this.isVipC = true;
  633. this.dataTimeC = res.data.companyMonthTime;
  634. } else {
  635. this.isVipC = false;
  636. }
  637. }
  638. });
  639. },
  640. submit() {
  641. if (this.checked == false) {
  642. uni.showToast({
  643. title: "请阅读并同意《会员开通协议》",
  644. icon: "none",
  645. });
  646. return;
  647. }
  648. console.log('准备支付')
  649. this.show = true;
  650. },
  651. //会员简历刷新次数
  652. getVipPeople() {
  653. this.$Request.get("/app/common/type/328").then((res) => {
  654. if (res.code == 0) {
  655. this.vipNum = res.data.value;
  656. }
  657. });
  658. },
  659. //非会员简历刷新次数
  660. getNoVipPeople() {
  661. this.$Request.get("/app/common/type/327").then((res) => {
  662. if (res.code == 0) {
  663. this.noVipNum = res.data.value;
  664. }
  665. });
  666. },
  667. //会员岗位刷新次数
  668. getVipCom() {
  669. this.$Request.get("/app/common/type/330").then((res) => {
  670. if (res.code == 0) {
  671. this.vipNumCom = res.data.value;
  672. }
  673. });
  674. },
  675. //非会员岗位刷新次数
  676. getNoVipCom() {
  677. this.$Request.get("/app/common/type/329").then((res) => {
  678. if (res.code == 0) {
  679. this.noVipNumCom = res.data.value;
  680. }
  681. });
  682. },
  683. },
  684. };
  685. </script>
  686. <style lang="less" scoped>
  687. .page-box {
  688. position: absolute;
  689. left: 0;
  690. bottom: 0;
  691. right: 0;
  692. top: 0;
  693. overflow: hidden;
  694. display: flex;
  695. flex-direction: column;
  696. .page-content {
  697. flex: 1;
  698. overflow: hidden;
  699. overflow-y: auto;
  700. }
  701. }
  702. page {
  703. background-color: #f6f6f6;
  704. }
  705. /deep/.u-checkbox__icon-wrap--checked {
  706. background-color: #016bf6;
  707. border-color: #016bf6;
  708. }
  709. .payTitle {
  710. width: 100%;
  711. text-align: center;
  712. font-weight: bold;
  713. margin-top: 30rpx;
  714. }
  715. .payPrice {
  716. width: 100%;
  717. margin-top: 30rpx;
  718. text-align: center;
  719. }
  720. .payList {
  721. width: 100%;
  722. margin-top: 20rpx;
  723. .payList-box {
  724. width: 686rpx;
  725. .payList-box-item {
  726. width: 100%;
  727. margin-bottom: 20rpx;
  728. }
  729. .payList-box-item-l {
  730. font-size: 30rpx;
  731. }
  732. }
  733. }
  734. .payBtn {
  735. width: 100%;
  736. height: 88rpx;
  737. margin-top: 20rpx;
  738. margin-bottom: 60rpx;
  739. .payBtn-box {
  740. width: 686rpx;
  741. height: 100%;
  742. background-color: #016bf6;
  743. color: #ffffff;
  744. border-radius: 40rpx;
  745. }
  746. }
  747. .bgTop {
  748. width: 100%;
  749. height: 611rpx;
  750. background-color: #1f1f27;
  751. .bgTop-box {
  752. width: 686rpx;
  753. height: 100%;
  754. .bgTop-box-top {
  755. width: 100%;
  756. height: 300rpx;
  757. margin-top: 30rpx;
  758. background: linear-gradient(90deg, #eab99b 0%, #f8d6bb 46%, #dc9c79 100%);
  759. border-radius: 16rpx;
  760. }
  761. .bgTop-box-top-box {
  762. width: calc(100% - 60rpx);
  763. height: 165rpx;
  764. }
  765. .bgTop-box-top-box-l {
  766. .bgTop-box-top-box-l-t {
  767. // color: #9C694D;
  768. font-size: 34rpx;
  769. font-weight: 800;
  770. background-image: linear-gradient(to right, #6f3e1d, #c4724b);
  771. background-clip: text;
  772. color: transparent;
  773. }
  774. .bgTop-box-top-box-l-c {
  775. background-image: linear-gradient(to right, #6f3e1d, #c4724b);
  776. background-clip: text;
  777. color: transparent;
  778. font-size: 34rpx;
  779. font-weight: 800;
  780. // margin-top: 10rpx;
  781. }
  782. .bgTop-box-top-box-l-b {
  783. color: #9c694d;
  784. font-size: 26rpx;
  785. font-weight: 500;
  786. margin-top: 30rpx;
  787. }
  788. }
  789. .bgTop-box-top-box-r {
  790. width: 178rpx;
  791. height: 100%;
  792. image {
  793. width: 100%;
  794. height: 100%;
  795. }
  796. }
  797. .bgTop-box-btn {
  798. width: 100%;
  799. height: 187rpx;
  800. background: linear-gradient(0deg, #272731 0%, #1f1f27 100%);
  801. border-radius: 16rpx;
  802. margin-top: 20rpx;
  803. .bgTop-box-btn-item {
  804. width: 100rpx;
  805. margin-top: 10rpx;
  806. image {
  807. width: 100rpx;
  808. height: 100rpx;
  809. border-radius: 50%;
  810. }
  811. .bgTop-box-btn-item-t {
  812. width: 100rpx;
  813. color: #d6b19b;
  814. font-size: 24rpx;
  815. font-weight: 500;
  816. margin-top: 16rpx;
  817. }
  818. }
  819. }
  820. }
  821. }
  822. .icon {
  823. width: 100%;
  824. margin-top: -50rpx;
  825. }
  826. .bgc {
  827. width: 100%;
  828. height: 158rpx;
  829. background: #f6f6f6;
  830. border-radius: 24rpx;
  831. margin-top: -20rpx;
  832. }
  833. .bgb {
  834. width: 100%;
  835. // height: 400rpx;
  836. margin-top: -130rpx;
  837. .bgb-c {
  838. width: 686rpx;
  839. height: 100%;
  840. background-color: #ffffff;
  841. border-radius: 24rpx;
  842. .bgb-c-n {
  843. width: 606rpx;
  844. height: 100%;
  845. }
  846. .bgb-c-n-title:nth-of-type(1) {
  847. margin-top: 46rpx;
  848. }
  849. .bgb-c-n-title {
  850. width: 100%;
  851. // margin-top: 20rpx;
  852. margin-bottom: 50rpx;
  853. .bgb-c-n-titles {
  854. width: 150rpx;
  855. text-align: center;
  856. }
  857. .bgb-c-n-title-l {
  858. color: #202020;
  859. font-size: 28rpx;
  860. font-weight: 800;
  861. }
  862. .bgb-c-n-title-c {
  863. color: #202020;
  864. font-size: 28rpx;
  865. font-weight: 800;
  866. }
  867. .bgb-c-n-title-r {
  868. color: #b1643c;
  869. font-size: 28rpx;
  870. font-weight: 800;
  871. }
  872. }
  873. }
  874. }
  875. .btn {
  876. width: 100%;
  877. // height: 140rpx;
  878. background-color: #f6f6f6;
  879. position: fixed;
  880. bottom: 0;
  881. .btn-c {
  882. margin-top: 10rpx;
  883. width: 686rpx;
  884. height: 90rpx;
  885. border-radius: 45rpx;
  886. background: linear-gradient(90deg, #056d70 0%, #023842 100%);
  887. margin-bottom: 40rpx;
  888. .btn-c-l {
  889. width: 436rpx;
  890. height: 100%;
  891. color: #febb91;
  892. // font-weight: 800;
  893. text:nth-of-type(1) {
  894. font-size: 44rpx;
  895. margin-left: 20rpx;
  896. }
  897. text:nth-of-type(2) {
  898. font-size: 32rpx;
  899. }
  900. }
  901. .btn-c-r {
  902. width: 250rpx;
  903. height: 100%;
  904. background: linear-gradient(90deg, #ffe2da 0%, #ffb584 100%);
  905. border-radius: 0rpx 45rpx 45rpx 0rpx;
  906. color: #5e3c28;
  907. font-size: 28rpx;
  908. // font-weight: 800;
  909. }
  910. }
  911. }
  912. </style>