myInfo.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057
  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 style="font-size: 26rpx;">分享朋友圈</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 style="font-size: 26rpx;">分享微信好友</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. },
  271. onShow() {
  272. console.log(123123)
  273. if (uni.getLaunchOptionsSync().scene == 1154) {
  274. uni.showToast({
  275. title: '请前往小程序查看名片~',
  276. icon: 'none',
  277. duration: 10000
  278. });
  279. }
  280. this.userInfo = uni.getStorageSync("userInfo")
  281. if (uni.getStorageSync("userInfo").phone) {
  282. this.init()
  283. } else {
  284. uni.switchTab({
  285. url: '/pages/cardHolder/cardHolder'
  286. })
  287. }
  288. },
  289. onShareAppMessage(res) {
  290. console.log(res, this.popupshow)
  291. let that = this;
  292. //生成名片图片
  293. let imageUrl = this.poster
  294. console.log("imageUrl", imageUrl)
  295. if (res.from === 'button') {
  296. let path = `/pages/cardHolder/scanCodeAddCard?id=${that.currectData.id}`
  297. console.log("分享地址", path)
  298. return {
  299. title: this.popupshow ? `${that.currectData.name}分享的名片~` : '电子名片',
  300. path: path,
  301. imageUrl: this.popupshow ? imageUrl : '',
  302. };
  303. }
  304. if (res.from === 'menu') {
  305. return {
  306. title: '我的名片',
  307. path: '/pages/tabBarPro/index/index',
  308. imageUrl: this.popupshow ? imageUrl : ''
  309. };
  310. }
  311. },
  312. methods: {
  313. toUrl() {
  314. this.popupshow = false
  315. this.showShare = true
  316. },
  317. handleHiddenShare() {
  318. this.popupshow = false
  319. },
  320. posterError(err) {
  321. console.log(err)
  322. uni.hideLoading()
  323. },
  324. posterSuccess(url) {
  325. console.log("hahahah", url)
  326. // 生成成功,会把临时路径在这里返回
  327. this.poster = url;
  328. uni.hideLoading()
  329. this.popupshow = true
  330. console.log(url)
  331. },
  332. showCode(val) {
  333. this.selectCode = val.qrCodeMyself
  334. this.isShowCode = true
  335. },
  336. share(item) {
  337. uni.showLoading({
  338. title: '加载中',
  339. mask: true
  340. })
  341. this.currectData = item
  342. var data = [{
  343. type: 'image',
  344. path: this.currectData.currentBackground,
  345. use: 'bg',
  346. x: -10,
  347. y: 0,
  348. width: 530,
  349. height: 325
  350. },
  351. {
  352. type: 'image',
  353. path: this.currectData.headSculpture ? this.currectData.headSculpture :
  354. '../../static/imgs/card/defaulthead.png',
  355. shape: 'circle',
  356. use: 'head',
  357. imageType: this.currectData.headSculpture ? 'wl' : 'bd',
  358. x: 30,
  359. y: 30,
  360. width: 100,
  361. height: 100
  362. },
  363. {
  364. type: 'text',
  365. text: this.currectData.name,
  366. use: 'name',
  367. x: 150,
  368. y: 50,
  369. size: 24,
  370. color: '#000'
  371. },
  372. {
  373. type: 'text',
  374. text: this.currectData.post,
  375. use: 'post',
  376. x: 240,
  377. y: 55,
  378. size: 18,
  379. color: '#666666'
  380. },
  381. {
  382. type: 'text',
  383. text: this.currectData.companyName,
  384. use: 'companyName',
  385. x: 150,
  386. y: 95,
  387. size: 18,
  388. color: '#000'
  389. },
  390. {
  391. type: 'image',
  392. path: '../../static/imgs/card/address1.png',
  393. use: 'address-icon',
  394. x: 145,
  395. y: 130,
  396. width: 15,
  397. height: 20
  398. },
  399. {
  400. type: 'textarea',
  401. text: this.currectData.province + this.currectData.city + this.currectData.area + this
  402. .currectData.detailedAddress,
  403. lineSpace: 1,
  404. width: 320,
  405. use: 'address',
  406. x: 175,
  407. y: 135,
  408. size: 14,
  409. color: '#000'
  410. },
  411. {
  412. type: 'image',
  413. path: '../../static/imgs/card/phone1.png',
  414. use: 'phone-icon',
  415. x: 145,
  416. y: 163,
  417. width: 16,
  418. height: 16
  419. },
  420. {
  421. type: 'text',
  422. text: this.currectData.phone,
  423. use: 'phone',
  424. x: 175,
  425. y: 167,
  426. size: 14,
  427. color: '#000'
  428. },
  429. {
  430. type: 'image',
  431. path: '../../static/imgs/card/remark1.png',
  432. use: 'remark-icon',
  433. x: 145,
  434. y: 197,
  435. width: 13,
  436. height: 16
  437. },
  438. {
  439. type: 'textarea',
  440. text: this.currectData.remark ? this.currectData.remark : '单击添加备注',
  441. use: 'remark',
  442. lineSpace: 2,
  443. width: 200,
  444. x: 175,
  445. y: 200,
  446. size: 13,
  447. color: '#000'
  448. },
  449. {
  450. type: 'image',
  451. path: '../../static/imgs/card/bgc6.png',
  452. use: 'bg1',
  453. x: 3,
  454. y: 243,
  455. width: 518,
  456. height: 67
  457. },
  458. {
  459. type: 'image',
  460. path: '../../static/imgs/card/home.png',
  461. use: 'home',
  462. x: 30,
  463. y: 260,
  464. width: 33,
  465. height: 33
  466. },
  467. {
  468. type: 'image',
  469. path: '../../static/imgs/card/share.png',
  470. use: 'share',
  471. x: 90,
  472. y: 263,
  473. width: 33,
  474. height: 28
  475. },
  476. {
  477. type: 'image',
  478. path: '../../static/imgs/card/ewm.png',
  479. use: 'code',
  480. x: 150,
  481. y: 263,
  482. width: 32,
  483. height: 32
  484. },
  485. {
  486. type: 'text',
  487. text: '置顶',
  488. use: 'top',
  489. x: 280,
  490. y: 265,
  491. size: 24,
  492. color: '#fff'
  493. },
  494. {
  495. type: 'text',
  496. text: '删除',
  497. use: 'del',
  498. x: 350,
  499. y: 265,
  500. size: 24,
  501. color: '#fff'
  502. },
  503. {
  504. type: 'text',
  505. text: '编辑',
  506. use: 'edit',
  507. x: 420,
  508. y: 265,
  509. size: 24,
  510. color: '#fff'
  511. },
  512. ]
  513. console.log(this.currectData.cuttentTemplate, 111111)
  514. for (var i = 0; i < data.length; i++) {
  515. switch (this.currectData.cuttentTemplate) {
  516. case '2':
  517. if (data[i].use === 'name' ||
  518. data[i].use === 'companyName' ||
  519. data[i].use === 'address-icon' ||
  520. data[i].use === 'phone-icon' ||
  521. data[i].use === 'remark-icon') {
  522. data[i].x = 30
  523. }
  524. if (data[i].use === 'address-icon') {
  525. data[i].path = '../../static/imgs/card/address3.png'
  526. }
  527. if (data[i].use === 'phone-icon') {
  528. data[i].path = '../../static/imgs/card/phone3.png'
  529. }
  530. if (data[i].use === 'remark-icon') {
  531. data[i].path = '../../static/imgs/card/remark3.png'
  532. }
  533. if (data[i].use === 'post') {
  534. data[i].x = 100
  535. }
  536. if (data[i].use === 'address' ||
  537. data[i].use === 'phone' ||
  538. data[i].use === 'remark') {
  539. data[i].x = 60
  540. }
  541. if (data[i].use == 'head') {
  542. data[i].x = 370
  543. }
  544. break;
  545. case '3':
  546. if (data[i].use === 'name') {
  547. data[i].x = 30
  548. data[i].y = 150
  549. }
  550. if (data[i].use === 'companyName') {
  551. data[i].x = 30
  552. data[i].y = 180
  553. }
  554. if (data[i].use === 'post') {
  555. data[i].x = 100
  556. data[i].y = 153
  557. }
  558. if (data[i].use === 'address-icon' ||
  559. data[i].use === 'phone-icon' ||
  560. data[i].use === 'remark-icon') {
  561. data[i].x = 170
  562. }
  563. if (data[i].use === 'address-icon') {
  564. data[i].y = 150
  565. }
  566. if (data[i].use === 'address') {
  567. data[i].y = 155;
  568. data[i].width = 300
  569. }
  570. if (data[i].use === 'phone-icon') {
  571. data[i].y = 180
  572. }
  573. if (data[i].use === 'phone') {
  574. data[i].y = 183
  575. }
  576. if (data[i].use === 'remark-icon') {
  577. data[i].y = 210
  578. }
  579. if (data[i].use === 'remark') {
  580. data[i].y = 212
  581. }
  582. if (data[i].use === 'address' ||
  583. data[i].use === 'phone' ||
  584. data[i].use === 'remark') {
  585. data[i].x = 190
  586. }
  587. break;
  588. case '4':
  589. if (data[i].use === 'name' ||
  590. data[i].use === 'companyName') {
  591. data[i].x = 30
  592. }
  593. if (data[i].use === 'companyName') {
  594. data[i].y = 90
  595. }
  596. if (data[i].use === 'post') {
  597. data[i].x = 100
  598. }
  599. if (data[i].use == 'head') {
  600. data[i].x = 25
  601. data[i].y = 120
  602. }
  603. if (data[i].use === 'address-icon') {
  604. data[i].path = '../../static/imgs/card/address2.png'
  605. }
  606. if (data[i].use === 'phone-icon') {
  607. data[i].path = '../../static/imgs/card/phone2.png'
  608. }
  609. if (data[i].use === 'remark-icon') {
  610. data[i].path = '../../static/imgs/card/remark2.png'
  611. }
  612. if (data[i].use === 'address-icon' ||
  613. data[i].use === 'phone-icon' ||
  614. data[i].use === 'remark-icon') {
  615. data[i].x = 170
  616. }
  617. if (data[i].use === 'address') {
  618. data[i].width = 300
  619. }
  620. if (data[i].use === 'address' ||
  621. data[i].use === 'phone' ||
  622. data[i].use === 'remark') {
  623. data[i].x = 190
  624. }
  625. break;
  626. default:
  627. }
  628. }
  629. this.canvasData = {
  630. clicknum: this.clicknum++,
  631. list: data,
  632. page: 'myInfo'
  633. }
  634. console.log(1111111)
  635. },
  636. toHome(item) {
  637. uni.navigateTo({
  638. url: "/pageA/mySet/myHome?id=" + item.personalHomeId
  639. })
  640. },
  641. radioChange(n) {
  642. console.log('radioChange', n);
  643. },
  644. init() {
  645. var that = this
  646. this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
  647. commonId: this.userInfo.id
  648. }, failres => {
  649. uni.hideLoading()
  650. uni.showToast({
  651. icon: "none",
  652. title: failres.errmsg,
  653. duration: 3000
  654. });
  655. }).then(res => {
  656. this.cardList = res.data.items
  657. setTimeout(() => {
  658. that.loading = false
  659. }, 1500)
  660. })
  661. },
  662. toEditCard(val) {
  663. uni.navigateTo({
  664. url: "/pageA/mySet/editCard?itemVal=" + JSON.stringify(val)
  665. })
  666. },
  667. delCard() {
  668. let _data = {}
  669. if (this.radiovalue == 1) {
  670. _data = {
  671. id: this.id
  672. }
  673. } else {
  674. _data = {
  675. id: this.id,
  676. deleteCondition: 1
  677. }
  678. }
  679. that.$request.baseRequest('admin.unimall.cardManagementInfo', 'delete', _data, failres => {
  680. uni.hideLoading()
  681. uni.showToast({
  682. icon: "none",
  683. title: failres.errmsg,
  684. duration: 3000
  685. });
  686. }).then(res => {
  687. this.isShowDel = false
  688. uni.showToast({
  689. icon: "success",
  690. title: '删除成功!',
  691. duration: 2000
  692. });
  693. this.init()
  694. })
  695. },
  696. del(val) {
  697. this.id = val
  698. this.isShowDel = true
  699. },
  700. addCard() {
  701. uni.navigateTo({
  702. url: "/pageA/mySet/newCard?cardIndex=" + (this.cardList.length + 1)
  703. })
  704. },
  705. topMarking(val) {
  706. that.$request.baseRequest('admin.unimall.cardManagementInfo', 'top', {
  707. cardManagementInfo: JSON.stringify({
  708. id: val.id
  709. })
  710. }, failres => {
  711. uni.hideLoading()
  712. uni.showToast({
  713. icon: "none",
  714. title: failres.errmsg,
  715. duration: 3000
  716. });
  717. }).then(res => {
  718. uni.showToast({
  719. icon: "success",
  720. title: '置顶成功!',
  721. duration: 2000
  722. })
  723. this.init()
  724. })
  725. }
  726. }
  727. }
  728. </script>
  729. <style lang="scss" scoped>
  730. .content {
  731. padding-bottom: 40rpx;
  732. }
  733. .card-content {
  734. width: 100%;
  735. }
  736. .content1 {
  737. .icon-text {
  738. margin-left: 10rpx;
  739. }
  740. .style1 {
  741. display: flex;
  742. margin-bottom: 70rpx;
  743. padding: 30rpx;
  744. box-sizing: border-box;
  745. .left {
  746. width: 132rpx;
  747. height: 132rpx;
  748. border-radius: 50%;
  749. }
  750. .right {
  751. margin-left: 40rpx;
  752. .row1 {
  753. .name {
  754. font-size: 38rpx;
  755. font-weight: bold;
  756. color: #040000;
  757. margin-right: 20rpx;
  758. }
  759. .post {
  760. font-size: 26rpx;
  761. font-weight: 500;
  762. color: #666666;
  763. }
  764. }
  765. .row2 {
  766. margin-top: 20rpx;
  767. font-size: 24rpx;
  768. font-weight: bold;
  769. color: #323333;
  770. }
  771. .row3,
  772. .row4 {
  773. margin-top: 30rpx;
  774. font-size: 24rpx;
  775. font-weight: 500;
  776. color: #323333;
  777. }
  778. }
  779. }
  780. .style2 {
  781. padding: 30rpx;
  782. box-sizing: border-box;
  783. margin-bottom: 70rpx;
  784. .top {
  785. .row1 {
  786. .name {
  787. font-size: 38rpx;
  788. font-weight: bold;
  789. color: #040000;
  790. margin-right: 20rpx;
  791. }
  792. .post {
  793. font-size: 26rpx;
  794. font-weight: 500;
  795. color: #666666;
  796. }
  797. }
  798. .row2 {
  799. margin-top: 20rpx;
  800. font-size: 24rpx;
  801. font-weight: bold;
  802. color: #323333;
  803. }
  804. }
  805. .bottom {
  806. margin-top: 20rpx;
  807. .left {
  808. margin-right: 40rpx;
  809. .row1 {
  810. .name {
  811. font-size: 38rpx;
  812. font-weight: bold;
  813. color: #040000;
  814. margin-right: 20rpx;
  815. }
  816. .post {
  817. font-size: 26rpx;
  818. font-weight: 500;
  819. color: #666666;
  820. }
  821. }
  822. .row2 {
  823. margin-top: 20rpx;
  824. font-size: 24rpx;
  825. font-weight: bold;
  826. color: #323333;
  827. }
  828. }
  829. .right {
  830. .row1,
  831. .row2 {
  832. font-size: 24rpx;
  833. font-weight: 500;
  834. color: #323333;
  835. }
  836. .row2 {
  837. margin-top: 20rpx;
  838. }
  839. .row3,
  840. .row4 {
  841. margin-top: 30rpx;
  842. font-size: 24rpx;
  843. font-weight: 500;
  844. color: #323333;
  845. }
  846. }
  847. }
  848. }
  849. }
  850. .card-list {
  851. padding: 0 20rpx;
  852. .title-name {
  853. font-weight: bold;
  854. color: #19191A;
  855. margin: 20rpx 0;
  856. }
  857. }
  858. .card-list-item {
  859. width: calc(100% + 40rpx);
  860. left: -20rpx;
  861. position: relative;
  862. border-radius: 30rpx;
  863. padding: 40rpx;
  864. box-sizing: border-box;
  865. .car-bottom {
  866. position: absolute;
  867. bottom: 27rpx;
  868. left: 20rpx;
  869. width: calc(100% - 40rpx);
  870. background: url("../../static/imgs/card/bgc6.png") no-repeat center;
  871. background-size: cover;
  872. border-radius: 0 0 20rpx 20rpx;
  873. .left {
  874. position: absolute;
  875. padding: 20rpx 0;
  876. width: 270rpx;
  877. box-sizing: border-box;
  878. display: flex;
  879. justify-content: space-evenly;
  880. // background: url("../../static/imgs/card/bgc1.png") no-repeat center;
  881. // background-size: 100% 100%;
  882. }
  883. .right {
  884. font-size: 25rpx;
  885. padding: 20rpx 0;
  886. position: relative;
  887. right: -278rpx;
  888. width: calc(100vw - 320rpx);
  889. box-sizing: border-box;
  890. display: flex;
  891. justify-content: space-evenly;
  892. // background: url("../../static/imgs/card/bgc2.png") no-repeat center;
  893. // background-size: 100% 100%;
  894. .text {
  895. color: #fff;
  896. }
  897. }
  898. }
  899. .left {
  900. width: 30%;
  901. .top {
  902. margin-bottom: 20rpx;
  903. }
  904. .img {
  905. width: 80%;
  906. }
  907. .bottom {}
  908. }
  909. .right {
  910. .row1 {
  911. .line {
  912. width: 1px;
  913. height: 20px;
  914. margin: 0 20rpx;
  915. background: black;
  916. }
  917. }
  918. }
  919. }
  920. .upload {
  921. background-color: #fff;
  922. margin: 20rpx;
  923. border-radius: 20rpx;
  924. padding: 76rpx;
  925. .solids {
  926. flex-direction: column;
  927. .text {
  928. margin-top: 20rpx;
  929. font-size: 26rpx;
  930. font-weight: 500;
  931. color: #666666;
  932. }
  933. }
  934. }
  935. .share-content {
  936. display: flex;
  937. padding: 20rpx;
  938. justify-content: center;
  939. font-size: 24rpx;
  940. button {
  941. background: transparent;
  942. line-height: 1.5;
  943. }
  944. button:after {
  945. border: none;
  946. }
  947. }
  948. .icon-pengyouquan,
  949. .icon-weixin {
  950. font-size: 50px;
  951. color: #33CC00;
  952. }
  953. .del-style {
  954. padding: 40rpx 40rpx 160rpx 40rpx;
  955. font-size: 32rpx;
  956. position: relative;
  957. .title {
  958. color: #1A1A1A;
  959. font-size: 32rpx;
  960. font-weight: bold;
  961. }
  962. .radio-wrap {
  963. padding: 23rpx;
  964. border-radius: 10rpx;
  965. background: #F5F5F5;
  966. margin: 20rpx 0;
  967. }
  968. .cancel,
  969. .confirm {
  970. width: 50%;
  971. text-align: center;
  972. padding: 35rpx 0;
  973. border-top: 1px solid #ccc;
  974. font-size: 36rpx;
  975. }
  976. .footer {
  977. position: absolute;
  978. bottom: 0px;
  979. width: 100%;
  980. left: 0;
  981. }
  982. .cancel {
  983. border-right: 1px solid #ccc;
  984. }
  985. .confirm {
  986. color: #4977FC;
  987. }
  988. }
  989. </style> -->