myInfo.vue 25 KB

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