myInfo.vue 24 KB

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