myInfo.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045
  1. <template>
  2. <view class="content">
  3. <u-loading-page loading-mode='spinner' image="/static/imgs/logo.png" iconSize='60'
  4. :loading='loading'></u-loading-page>
  5. <view v-show='!loading'>
  6. <view class="card-list content1">
  7. <view class="row" v-for="(item,index) in cardList" :key="index">
  8. <view class="title-name">
  9. {{item.cardBusiness}}
  10. </view>
  11. <view class="card-list-item"
  12. :style="item.currentBackground?'background:url('+item.currentBackground+');background-size:100% 100%':''">
  13. <view class="card-content style1" v-if="item.cuttentTemplate==1">
  14. <view class="left">
  15. <u--image :showLoading="true"
  16. :src="item.headSculpture?item.headSculpture:'/static/imgs/card/defaulthead.png'"
  17. width="66px" height="66px" shape="circle"></u--image>
  18. </view>
  19. <view class="right">
  20. <view class="row1">
  21. <text class="name">{{item.name}}</text>
  22. <text class="post">{{item.post}}</text>
  23. </view>
  24. <view class="row2">
  25. {{item.companyName}}
  26. </view>
  27. <view class="row3 flex">
  28. <u--image :showLoading="true" :src="'/static/imgs/card/address'+item.icon+'.png'"
  29. width="13px" height="16px"></u--image>
  30. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  31. </view>
  32. <view class="row4 flex">
  33. <u--image :showLoading="true" :src="'/static/imgs/card/phone'+item.icon+'.png'"
  34. width="12px" height="13px"></u--image>
  35. <view class='icon-text'>{{ item.phone }}</view>
  36. </view>
  37. <view class="row4 flex">
  38. <u--image :showLoading="true" :src="'/static/imgs/card/remark'+item.icon+'.png'"
  39. width="10px" height="12px"></u--image>
  40. <view class='icon-text'>{{item.remark?item.remark:'--'}}</view>
  41. </view>
  42. <!-- <view class="">
  43. 备注
  44. </view> -->
  45. </view>
  46. </view>
  47. <view class="card-content style1 flex-between" v-if="item.cuttentTemplate==2">
  48. <view class="right">
  49. <view class="row1">
  50. <text class="name">{{item.name}}</text>
  51. <text class="post">{{item.post}}</text>
  52. </view>
  53. <view class="row2">
  54. {{item.companyName}}
  55. </view>
  56. <view class="row3 flex">
  57. <u--image :showLoading="true" :src="'/static/imgs/card/address'+item.icon+'.png'"
  58. width="13px" height="16px"></u--image>
  59. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  60. </view>
  61. <view class="row4 flex">
  62. <u--image :showLoading="true" :src="'/static/imgs/card/phone'+item.icon+'.png'"
  63. width="12px" height="13px"></u--image>
  64. <view class='icon-text'>{{ item.phone }}</view>
  65. </view>
  66. <view class="row4 flex">
  67. <u--image :showLoading="true" :src="'/static/imgs/card/remark'+item.icon+'.png'"
  68. width="10px" height="12px"></u--image>
  69. <view class='icon-text'>{{item.remark?item.remark:'--'}}</view>
  70. </view>
  71. <!-- <view class="">
  72. 备注
  73. </view> -->
  74. </view>
  75. <view class="left">
  76. <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
  77. shape="circle" v-if="item.headSculpture"></u--image>
  78. <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px"
  79. height="66px" shape="circle" v-else></u--image>
  80. </view>
  81. </view>
  82. <view class="card-content style2" v-if="item.cuttentTemplate==3">
  83. <view class="top">
  84. <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
  85. shape="circle" v-if="item.headSculpture"></u--image>
  86. <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px"
  87. height="66px" shape="circle" v-else></u--image>
  88. </view>
  89. <view class="bottom flex">
  90. <view class="left">
  91. <view class="row1">
  92. <text class="name">{{item.name}}</text>
  93. <text class="post">{{item.post}}</text>
  94. </view>
  95. <view class="row2">
  96. {{item.companyName}}
  97. </view>
  98. </view>
  99. <view class="right">
  100. <view class="row3 flex">
  101. <u--image :showLoading="true"
  102. :src="'/static/imgs/card/address'+item.icon+'.png'" width="13px"
  103. height="16px"></u--image>
  104. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  105. </view>
  106. <view class="row4 flex">
  107. <u--image :showLoading="true" :src="'/static/imgs/card/phone'+item.icon+'.png'"
  108. width="12px" height="13px"></u--image>
  109. <view class='icon-text'>{{ item.phone }}</view>
  110. </view>
  111. <view class="row4 flex">
  112. <u--image :showLoading="true" :src="'/static/imgs/card/remark'+item.icon+'.png'"
  113. width="10px" height="12px"></u--image>
  114. <view class='icon-text'>{{item.remark?item.remark:'--'}}</view>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="card-content style2" v-if="item.cuttentTemplate==4">
  120. <view class="top">
  121. <view class="row1">
  122. <text class="name">{{item.name}}</text>
  123. <text class="post">{{item.post}}</text>
  124. </view>
  125. <view class="row2">
  126. {{item.companyName}}
  127. </view>
  128. </view>
  129. <view class="bottom flex">
  130. <view class="left">
  131. <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
  132. shape="circle" v-if="item.headSculpture"></u--image>
  133. <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px"
  134. height="66px" shape="circle" v-else></u--image>
  135. </view>
  136. <view class="right">
  137. <view class="row3 flex">
  138. <u--image :showLoading="true"
  139. :src="'/static/imgs/card/address'+item.icon+'.png'" width="13px"
  140. height="16px"></u--image>
  141. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  142. </view>
  143. <view class="row4 flex">
  144. <u--image :showLoading="true" :src="'/static/imgs/card/phone'+item.icon+'.png'"
  145. width="12px" height="13px"></u--image>
  146. <view class='icon-text'>{{ item.phone }}</view>
  147. </view>
  148. <view class="row4 flex">
  149. <u--image :showLoading="true" :src="'/static/imgs/card/remark'+item.icon+'.png'"
  150. width="10px" height="12px"></u--image>
  151. <view class='icon-text'>{{item.remark?item.remark:'--'}}</view>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="car-bottom flex">
  157. <view class="left">
  158. <image src="../../static/imgs/card/home.png" mode="widthFix"
  159. style="width: 32rpx;height: auto;" @click="toHome(item)"></image>
  160. <image src="../../static/imgs/card/share.png" mode="widthFix"
  161. style="width: 35rpx;height: auto;" @click="share(item)"></image>
  162. <image src="../../static/imgs/card/ewm.png" mode="widthFix"
  163. style="width: 32rpx;height: auto;" @click="showCode(item)"></image>
  164. </view>
  165. <view class="right">
  166. <text class="text" @click="topMarking(item)">置顶</text>
  167. <text class="text" @click="del(item.id)">删除</text>
  168. <text class="text" @click="toEditCard(item)">编辑</text>
  169. </view>
  170. <!-- <u-button text="置顶" @click="topMarking(item)" throttle-time='1000'></u-button> -->
  171. <!-- <button @click="$u.debounce(topMarking, 500)">置顶</button> -->
  172. <!-- <button @click="$u.debounce(topMarking(item), 500)">置顶</button> -->
  173. <!-- <u-button text="删除" @click="del(item.id)" throttle-time='1000'></u-button> -->
  174. <!-- <button @click="toEditCard(item)">编辑</button> -->
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. <view class="upload flex flex-all-center" @click="addCard">
  180. <view class="solids flex flex-all-center">
  181. <image src="../../static/imgs/card/add.png" mode="widthFix" style="width: 148rpx;height: auto;">
  182. </image>
  183. <text class='text'>添加新名片</text>
  184. </view>
  185. </view>
  186. </view>
  187. <u-toast ref="uToast"></u-toast>
  188. <u-popup :round='10' :show="isShowDel" @close="isShowDel=false" mode="center">
  189. <view class="del-style">
  190. <text class="title">删除名片自动退出关联得圈子,确定删除?</text>
  191. <view class="">
  192. <view @click='radiovalue=1' class="flex align-item-center radio-wrap">
  193. <image style='width:13px;height:13px;margin-right:10rpx;'
  194. :src="radiovalue==1?'../../static/imgs/mySet/checked.png':'../../static/imgs/mySet/not-checked.png'"
  195. mode=""></image>
  196. <view class="">仅从自己名片列表删除</view>
  197. </view>
  198. <view @click='radiovalue=2' class="flex align-item-center radio-wrap">
  199. <image style='width:13px;height:13px;margin-right:10rpx;'
  200. :src="radiovalue==2?'../../static/imgs/mySet/checked.png':'../../static/imgs/mySet/not-checked.png'"
  201. mode=""></image>
  202. <view class="">从所有拥有此名片用户列表删除</view>
  203. </view>
  204. </view>
  205. <view class="flex footer">
  206. <view class="cancel" @click="isShowDel=false">
  207. 取消
  208. </view>
  209. <view class="confirm" @click="delCard">
  210. 删除
  211. </view>
  212. </view>
  213. </view>
  214. </u-popup>
  215. <u-popup :show="isShowCode" @close="isShowCode=false" mode="center" :round='10'>
  216. <image style='margin:10px;height: auto;' :src="selectCode" mode="widthFix"></image>
  217. </u-popup>
  218. <u-popup :show="popupshow" :closeOnClickOverlay='true' :overlayOpacity='0.4' @close='handleHiddenShare'
  219. :round="10" mode="bottom">
  220. <view>
  221. <view class="share-content">
  222. <view class="block" @click="toUrl()">
  223. <button class="moment">
  224. <view class="iconfont icon-pengyouquan"></view>
  225. <view>分享朋友圈</view>
  226. </button>
  227. </view>
  228. <view class="block">
  229. <button class="shareBtn" type="default" data-name="shareBtn" open-type="share">
  230. <view class="iconfont icon-weixin"></view>
  231. <view>分享微信好友</view>
  232. </button>
  233. </view>
  234. </view>
  235. </view>
  236. </u-popup>
  237. <!-- 生成图片 -->
  238. <poster :data="canvasData" background-color="#FFF" :width='750' :height='420' @on-success="posterSuccess"
  239. ref="poster" @on-error="posterError"></poster>
  240. <point-share @close='showShare=false' :show='showShare'></point-share>
  241. </view>
  242. </template>
  243. <script>
  244. import Poster from '../../components/zhangyuhao-poster/Poster.vue';
  245. import PointShare from '../../components/point-share/index.vue';
  246. var that;
  247. export default {
  248. components: {
  249. Poster,
  250. PointShare
  251. },
  252. data() {
  253. return {
  254. isShowCode: false,
  255. selectCode: '',
  256. id: '',
  257. showShare: false,
  258. popupshow: false,
  259. radiovalue: 1,
  260. loading: true,
  261. isShowDel: false,
  262. cardList: [],
  263. canvasData: {},
  264. clicknum: 0,
  265. poster: ''
  266. };
  267. },
  268. onLoad() {
  269. that = this
  270. this.userInfo = uni.getStorageSync("userInfo")
  271. },
  272. onShow() {
  273. this.init()
  274. },
  275. onShareAppMessage(res) {
  276. console.log(res, this.popupshow)
  277. let that = this;
  278. //生成名片图片
  279. let imageUrl = this.poster
  280. console.log("imageUrl", imageUrl)
  281. if (res.from === 'button') {
  282. let path = `/pages/cardHolder/scanCodeAddCard?id=${that.currectData.id}`
  283. return {
  284. title: this.popupshow ? `${that.currectData.name}分享的名片~` : '电子名片',
  285. path: path,
  286. imageUrl: this.popupshow ? imageUrl : '',
  287. };
  288. }
  289. if (res.from === 'menu') {
  290. return {
  291. title: '我的名片',
  292. path: '/pages/tabBarPro/index/index',
  293. imageUrl: this.popupshow ? imageUrl : ''
  294. };
  295. }
  296. },
  297. methods: {
  298. toUrl() {
  299. this.popupshow = false
  300. this.showShare = true
  301. },
  302. handleHiddenShare() {
  303. this.popupshow = false
  304. },
  305. posterError(err) {
  306. console.log(err)
  307. uni.hideLoading()
  308. },
  309. posterSuccess(url) {
  310. console.log("hahahah", url)
  311. // 生成成功,会把临时路径在这里返回
  312. this.poster = url;
  313. uni.hideLoading()
  314. this.popupshow = true
  315. console.log(url)
  316. },
  317. showCode(val) {
  318. this.selectCode = val.qrCodeMyself
  319. this.isShowCode = true
  320. },
  321. share(item) {
  322. uni.showLoading({
  323. title: '加载中',
  324. mask: true
  325. })
  326. this.currectData = item
  327. var data = [{
  328. type: 'image',
  329. path: this.currectData.currentBackground,
  330. use: 'bg',
  331. x: -10,
  332. y: 0,
  333. width: 530,
  334. height: 325
  335. },
  336. {
  337. type: 'image',
  338. path: this.currectData.headSculpture ? this.currectData.headSculpture :
  339. '../../static/imgs/card/defaulthead.png',
  340. shape: 'circle',
  341. use: 'head',
  342. imageType: this.currectData.headSculpture ? 'wl' : 'bd',
  343. x: 30,
  344. y: 30,
  345. width: 100,
  346. height: 100
  347. },
  348. {
  349. type: 'text',
  350. text: this.currectData.name,
  351. use: 'name',
  352. x: 150,
  353. y: 50,
  354. size: 24,
  355. color: '#000'
  356. },
  357. {
  358. type: 'text',
  359. text: this.currectData.post,
  360. use: 'post',
  361. x: 240,
  362. y: 55,
  363. size: 18,
  364. color: '#666666'
  365. },
  366. {
  367. type: 'text',
  368. text: this.currectData.companyName,
  369. use: 'companyName',
  370. x: 150,
  371. y: 95,
  372. size: 18,
  373. color: '#000'
  374. },
  375. {
  376. type: 'image',
  377. path: '../../static/imgs/card/address1.png',
  378. use: 'address-icon',
  379. x: 145,
  380. y: 130,
  381. width: 15,
  382. height: 20
  383. },
  384. {
  385. type: 'textarea',
  386. text: this.currectData.province + this.currectData.city + this.currectData.area + this
  387. .currectData.detailedAddress,
  388. lineSpace: 1,
  389. width: 320,
  390. use: 'address',
  391. x: 175,
  392. y: 135,
  393. size: 14,
  394. color: '#000'
  395. },
  396. {
  397. type: 'image',
  398. path: '../../static/imgs/card/phone1.png',
  399. use: 'phone-icon',
  400. x: 145,
  401. y: 163,
  402. width: 16,
  403. height: 16
  404. },
  405. {
  406. type: 'text',
  407. text: this.currectData.phone,
  408. use: 'phone',
  409. x: 175,
  410. y: 167,
  411. size: 14,
  412. color: '#000'
  413. },
  414. {
  415. type: 'image',
  416. path: '../../static/imgs/card/remark1.png',
  417. use: 'remark-icon',
  418. x: 145,
  419. y: 197,
  420. width: 13,
  421. height: 16
  422. },
  423. {
  424. type: 'textarea',
  425. text: this.currectData.remark ? this.currectData.remark : '单击添加备注',
  426. use: 'remark',
  427. lineSpace: 2,
  428. width: 200,
  429. x: 175,
  430. y: 200,
  431. size: 13,
  432. color: '#000'
  433. },
  434. {
  435. type: 'image',
  436. path: '../../static/imgs/card/bgc1.png',
  437. use: 'bg1',
  438. x: 3,
  439. y: 243,
  440. width: 240,
  441. height: 67
  442. },
  443. {
  444. type: 'image',
  445. path: '../../static/imgs/card/bgc2.png',
  446. use: 'bg2',
  447. x: 225,
  448. y: 243,
  449. width: 278,
  450. height: 67
  451. },
  452. {
  453. type: 'image',
  454. path: '../../static/imgs/card/home.png',
  455. use: 'home',
  456. x: 30,
  457. y: 260,
  458. width: 33,
  459. height: 33
  460. },
  461. {
  462. type: 'image',
  463. path: '../../static/imgs/card/share.png',
  464. use: 'share',
  465. x: 90,
  466. y: 263,
  467. width: 33,
  468. height: 28
  469. },
  470. {
  471. type: 'image',
  472. path: '../../static/imgs/card/ewm.png',
  473. use: 'code',
  474. x: 150,
  475. y: 263,
  476. width: 32,
  477. height: 32
  478. },
  479. {
  480. type: 'text',
  481. text: '置顶',
  482. use: 'top',
  483. x: 280,
  484. y: 265,
  485. size: 24,
  486. color: '#fff'
  487. },
  488. {
  489. type: 'text',
  490. text: '删除',
  491. use: 'del',
  492. x: 350,
  493. y: 265,
  494. size: 24,
  495. color: '#fff'
  496. },
  497. {
  498. type: 'text',
  499. text: '编辑',
  500. use: 'edit',
  501. x: 420,
  502. y: 265,
  503. size: 24,
  504. color: '#fff'
  505. },
  506. ]
  507. console.log(this.currectData.cuttentTemplate, 111111)
  508. for (var i = 0; i < data.length; i++) {
  509. switch (this.currectData.cuttentTemplate) {
  510. case '2':
  511. if (data[i].use === 'name' ||
  512. data[i].use === 'companyName' ||
  513. data[i].use === 'address-icon' ||
  514. data[i].use === 'phone-icon' ||
  515. data[i].use === 'remark-icon') {
  516. data[i].x = 30
  517. }
  518. if (data[i].use === 'address-icon') {
  519. data[i].path = '../../static/imgs/card/address3.png'
  520. }
  521. if (data[i].use === 'phone-icon') {
  522. data[i].path = '../../static/imgs/card/phone3.png'
  523. }
  524. if (data[i].use === 'remark-icon') {
  525. data[i].path = '../../static/imgs/card/remark3.png'
  526. }
  527. if (data[i].use === 'post') {
  528. data[i].x = 100
  529. }
  530. if (data[i].use === 'address' ||
  531. data[i].use === 'phone' ||
  532. data[i].use === 'remark') {
  533. data[i].x = 60
  534. }
  535. if (data[i].use == 'head') {
  536. data[i].x = 370
  537. }
  538. break;
  539. case '3':
  540. if (data[i].use === 'name') {
  541. data[i].x = 30
  542. data[i].y = 150
  543. }
  544. if (data[i].use === 'companyName') {
  545. data[i].x = 30
  546. data[i].y = 180
  547. }
  548. if (data[i].use === 'post') {
  549. data[i].x = 100
  550. data[i].y = 153
  551. }
  552. if (data[i].use === 'address-icon' ||
  553. data[i].use === 'phone-icon' ||
  554. data[i].use === 'remark-icon') {
  555. data[i].x = 170
  556. }
  557. if (data[i].use === 'address-icon') {
  558. data[i].y = 150
  559. }
  560. if (data[i].use === 'address') {
  561. data[i].y = 155;
  562. data[i].width = 300
  563. }
  564. if (data[i].use === 'phone-icon') {
  565. data[i].y = 180
  566. }
  567. if (data[i].use === 'phone') {
  568. data[i].y = 183
  569. }
  570. if (data[i].use === 'remark-icon') {
  571. data[i].y = 210
  572. }
  573. if (data[i].use === 'remark') {
  574. data[i].y = 212
  575. }
  576. if (data[i].use === 'address' ||
  577. data[i].use === 'phone' ||
  578. data[i].use === 'remark') {
  579. data[i].x = 190
  580. }
  581. break;
  582. case '4':
  583. if (data[i].use === 'name' ||
  584. data[i].use === 'companyName') {
  585. data[i].x = 30
  586. }
  587. if (data[i].use === 'companyName') {
  588. data[i].y = 90
  589. }
  590. if (data[i].use === 'post') {
  591. data[i].x = 100
  592. }
  593. if (data[i].use == 'head') {
  594. data[i].x = 25
  595. data[i].y = 120
  596. }
  597. if (data[i].use === 'address-icon') {
  598. data[i].path = '../../static/imgs/card/address2.png'
  599. }
  600. if (data[i].use === 'phone-icon') {
  601. data[i].path = '../../static/imgs/card/phone2.png'
  602. }
  603. if (data[i].use === 'remark-icon') {
  604. data[i].path = '../../static/imgs/card/remark2.png'
  605. }
  606. if (data[i].use === 'address-icon' ||
  607. data[i].use === 'phone-icon' ||
  608. data[i].use === 'remark-icon') {
  609. data[i].x = 170
  610. }
  611. if (data[i].use === 'address') {
  612. data[i].width = 300
  613. }
  614. if (data[i].use === 'address' ||
  615. data[i].use === 'phone' ||
  616. data[i].use === 'remark') {
  617. data[i].x = 190
  618. }
  619. break;
  620. default:
  621. }
  622. }
  623. this.canvasData = {
  624. clicknum: this.clicknum++,
  625. list: data,
  626. page: 'myInfo'
  627. }
  628. console.log(1111111)
  629. },
  630. toHome(item) {
  631. uni.navigateTo({
  632. url: "/pages/mySet/myHome?id=" + item.personalHomeId
  633. })
  634. },
  635. radioChange(n) {
  636. console.log('radioChange', n);
  637. },
  638. init() {
  639. var that = this
  640. this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
  641. commonId: this.userInfo.id
  642. }, failres => {
  643. uni.hideLoading()
  644. uni.showToast({
  645. icon: "none",
  646. title: failres.errmsg,
  647. duration: 3000
  648. });
  649. }).then(res => {
  650. this.cardList = res.data.items
  651. setTimeout(() => {
  652. that.loading = false
  653. }, 1500)
  654. })
  655. },
  656. toEditCard(val) {
  657. uni.navigateTo({
  658. url: "/pages/mySet/editCard?itemVal=" + JSON.stringify(val)
  659. })
  660. },
  661. delCard() {
  662. let _data = {}
  663. if (this.radiovalue == 1) {
  664. _data = {
  665. id: this.id
  666. }
  667. } else {
  668. _data = {
  669. id: this.id,
  670. deleteCondition: 1
  671. }
  672. }
  673. that.$request.baseRequest('admin.unimall.cardManagementInfo', 'delete', _data, failres => {
  674. uni.hideLoading()
  675. uni.showToast({
  676. icon: "none",
  677. title: failres.errmsg,
  678. duration: 3000
  679. });
  680. }).then(res => {
  681. this.isShowDel = false
  682. uni.showToast({
  683. icon: "success",
  684. title: '删除成功!',
  685. duration: 2000
  686. });
  687. this.init()
  688. })
  689. },
  690. del(val) {
  691. this.id = val
  692. this.isShowDel = true
  693. },
  694. addCard() {
  695. uni.navigateTo({
  696. url: "/pages/mySet/newCard?cardIndex="+(this.cardList.length+1)
  697. })
  698. },
  699. topMarking(val) {
  700. that.$request.baseRequest('admin.unimall.cardManagementInfo', 'top', {
  701. cardManagementInfo: JSON.stringify({
  702. id: val.id
  703. })
  704. }, failres => {
  705. uni.hideLoading()
  706. uni.showToast({
  707. icon: "none",
  708. title: failres.errmsg,
  709. duration: 3000
  710. });
  711. }).then(res => {
  712. uni.showToast({
  713. icon: "success",
  714. title: '置顶成功!',
  715. duration: 2000
  716. })
  717. this.init()
  718. })
  719. }
  720. }
  721. }
  722. </script>
  723. <style lang="scss" scoped>
  724. .content {
  725. padding-bottom: 40rpx;
  726. }
  727. .card-content {
  728. width: 100%;
  729. }
  730. .content1 {
  731. .icon-text {
  732. margin-left: 10rpx;
  733. }
  734. .style1 {
  735. display: flex;
  736. margin-bottom: 70rpx;
  737. padding: 30rpx;
  738. box-sizing: border-box;
  739. .left {
  740. width: 132rpx;
  741. height: 132rpx;
  742. border-radius: 50%;
  743. }
  744. .right {
  745. margin-left: 40rpx;
  746. .row1 {
  747. .name {
  748. font-size: 38rpx;
  749. font-weight: bold;
  750. color: #040000;
  751. margin-right: 20rpx;
  752. }
  753. .post {
  754. font-size: 26rpx;
  755. font-weight: 500;
  756. color: #666666;
  757. }
  758. }
  759. .row2 {
  760. margin-top: 20rpx;
  761. font-size: 24rpx;
  762. font-weight: bold;
  763. color: #323333;
  764. }
  765. .row3,
  766. .row4 {
  767. margin-top: 30rpx;
  768. font-size: 24rpx;
  769. font-weight: 500;
  770. color: #323333;
  771. }
  772. }
  773. }
  774. .style2 {
  775. padding: 30rpx;
  776. box-sizing: border-box;
  777. margin-bottom: 70rpx;
  778. .top {
  779. .row1 {
  780. .name {
  781. font-size: 38rpx;
  782. font-weight: bold;
  783. color: #040000;
  784. margin-right: 20rpx;
  785. }
  786. .post {
  787. font-size: 26rpx;
  788. font-weight: 500;
  789. color: #666666;
  790. }
  791. }
  792. .row2 {
  793. margin-top: 20rpx;
  794. font-size: 24rpx;
  795. font-weight: bold;
  796. color: #323333;
  797. }
  798. }
  799. .bottom {
  800. margin-top: 20rpx;
  801. .left {
  802. margin-right: 40rpx;
  803. .row1 {
  804. .name {
  805. font-size: 38rpx;
  806. font-weight: bold;
  807. color: #040000;
  808. margin-right: 20rpx;
  809. }
  810. .post {
  811. font-size: 26rpx;
  812. font-weight: 500;
  813. color: #666666;
  814. }
  815. }
  816. .row2 {
  817. margin-top: 20rpx;
  818. font-size: 24rpx;
  819. font-weight: bold;
  820. color: #323333;
  821. }
  822. }
  823. .right {
  824. .row1,
  825. .row2 {
  826. font-size: 24rpx;
  827. font-weight: 500;
  828. color: #323333;
  829. }
  830. .row2 {
  831. margin-top: 20rpx;
  832. }
  833. .row3,
  834. .row4 {
  835. margin-top: 30rpx;
  836. font-size: 24rpx;
  837. font-weight: 500;
  838. color: #323333;
  839. }
  840. }
  841. }
  842. }
  843. }
  844. .card-list {
  845. padding: 0 20rpx;
  846. .title-name {
  847. font-weight: bold;
  848. color: #19191A;
  849. margin: 20rpx 0;
  850. }
  851. }
  852. .card-list-item {
  853. width: calc(100% + 40rpx);
  854. left: -20rpx;
  855. position: relative;
  856. border-radius: 30rpx;
  857. padding: 40rpx;
  858. box-sizing: border-box;
  859. .car-bottom {
  860. position: absolute;
  861. bottom: 22rpx;
  862. left: 20rpx;
  863. width: calc(100% - 40rpx);
  864. .left {
  865. position: absolute;
  866. padding: 20rpx 0;
  867. width: 305rpx;
  868. box-sizing: border-box;
  869. display: flex;
  870. justify-content: space-evenly;
  871. background: url("../../static/imgs/card/bgc1.png") no-repeat center;
  872. background-size: 100% 100%;
  873. }
  874. .right {
  875. font-size: 25rpx;
  876. padding: 20rpx 0;
  877. position: relative;
  878. right: -278rpx;
  879. width: calc(100vw - 320rpx);
  880. box-sizing: border-box;
  881. display: flex;
  882. justify-content: space-evenly;
  883. background: url("../../static/imgs/card/bgc2.png") no-repeat center;
  884. background-size: 100% 100%;
  885. .text {
  886. color: #fff;
  887. }
  888. }
  889. }
  890. .left {
  891. width: 30%;
  892. .top {
  893. margin-bottom: 20rpx;
  894. }
  895. .img {
  896. width: 80%;
  897. }
  898. .bottom {}
  899. }
  900. .right {
  901. .row1 {
  902. .line {
  903. width: 1px;
  904. height: 20px;
  905. margin: 0 20rpx;
  906. background: black;
  907. }
  908. }
  909. }
  910. }
  911. .upload {
  912. background-color: #fff;
  913. margin: 20rpx;
  914. border-radius: 20rpx;
  915. padding: 76rpx;
  916. .solids {
  917. flex-direction: column;
  918. .text {
  919. margin-top: 20rpx;
  920. font-size: 26rpx;
  921. font-weight: 500;
  922. color: #666666;
  923. }
  924. }
  925. }
  926. .share-content {
  927. display: flex;
  928. padding: 20rpx;
  929. justify-content: center;
  930. font-size: 24rpx;
  931. button {
  932. background: transparent;
  933. line-height: 1.5;
  934. }
  935. button:after {
  936. border: none;
  937. }
  938. }
  939. .icon-pengyouquan,
  940. .icon-weixin {
  941. font-size: 50px;
  942. color: #33CC00;
  943. }
  944. .del-style {
  945. padding: 40rpx 40rpx 160rpx 40rpx;
  946. font-size: 32rpx;
  947. position: relative;
  948. .title {
  949. color: #1A1A1A;
  950. font-size: 32rpx;
  951. font-weight: bold;
  952. }
  953. .radio-wrap {
  954. padding: 23rpx;
  955. border-radius: 10rpx;
  956. background: #F5F5F5;
  957. margin: 20rpx 0;
  958. }
  959. .cancel,
  960. .confirm {
  961. width: 50%;
  962. text-align: center;
  963. padding: 35rpx 0;
  964. border-top: 1px solid #ccc;
  965. font-size: 36rpx;
  966. }
  967. .footer {
  968. position: absolute;
  969. bottom: 0px;
  970. width: 100%;
  971. left: 0;
  972. }
  973. .cancel {
  974. border-right: 1px solid #ccc;
  975. }
  976. .confirm {
  977. color: #4977FC;
  978. }
  979. }
  980. </style>