myInfo.vue 25 KB

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