changeCard.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <template>
  2. <view class="content">
  3. <view class="content1 flex">
  4. <span class='default active'>邀请</span>
  5. <span class='default'>黑名单</span>
  6. </view>
  7. <view class="content2 ">
  8. <view v-for='(item,index) in cardList' class="item">
  9. <!-- <view class="card-list-item" style="background:red"> -->
  10. <view class="card-list-item"
  11. :style="item.cardManagementInfo.currentBackground?'background:url('+item.cardManagementInfo.currentBackground+');background-size:100% 100%':''">
  12. <view class="card-content style1" v-if="item.cardManagementInfo.cuttentTemplate==1">
  13. <view class="left">
  14. <u--image :showLoading="true" :src="item.cardManagementInfo.headSculpture" width="66px" height="66px"
  15. shape="circle"></u--image>
  16. </view>
  17. <view class="right">
  18. <view class="row1">
  19. <text class="name">{{item.cardManagementInfo.name}}</text>
  20. <text class="post">{{item.cardManagementInfo.post}}</text>
  21. </view>
  22. <view class="row2">
  23. {{item.cardManagementInfo.companyName}}
  24. </view>
  25. <view class="row3 flex" @click="">
  26. <u--image :showLoading="true" src="/static/imgs/card/address1.png" width="13px" height="16px"
  27. ></u--image>
  28. <view class='icon-text'>{{ item.cardManagementInfo.province }}{{ item.cardManagementInfo.city }}{{ item.cardManagementInfo.area }}</view>
  29. </view>
  30. <view class="row4 flex">
  31. <u--image :showLoading="true" src="/static/imgs/card/phone1.png" width="12px" height="13px"
  32. ></u--image><view class='icon-text'>{{ item.cardManagementInfo.phone }}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="card-content style1 flex-between" v-if="item.cardManagementInfo.cuttentTemplate==2">
  37. <view class="right">
  38. <view class="row1">
  39. <text class="name">{{item.cardManagementInfo.name}}</text>
  40. <text class="post">{{item.cardManagementInfo.post}}</text>
  41. </view>
  42. <view class="row2">
  43. {{item.cardManagementInfo.companyName}}
  44. </view>
  45. <view class="row3 flex">
  46. <u--image :showLoading="true" src="/static/imgs/card/address3.png" width="13px" height="16px"
  47. ></u--image>
  48. <view class='icon-text'>{{ item.cardManagementInfo.province }}{{ item.cardManagementInfo.city }}{{ item.cardManagementInfo.area }}</view>
  49. </view>
  50. <view class="row4 flex">
  51. <u--image :showLoading="true" src="/static/imgs/card/phone3.png" width="12px" height="13px"
  52. ></u--image><view class='icon-text'>{{ item.cardManagementInfo.phone }}</view>
  53. </view>
  54. </view>
  55. <view class="left">
  56. <u--image :showLoading="true" :src="item.cardManagementInfo.headSculpture" width="66px" height="66px"
  57. shape="circle" v-if="item.cardManagementInfo.headSculpture"></u--image>
  58. <u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px"
  59. height="66px" shape="circle" v-else></u--image>
  60. </view>
  61. </view>
  62. <view class="card-content style2" v-if="item.cardManagementInfo.cuttentTemplate==3">
  63. <view class="top">
  64. <u--image :showLoading="true" :src="item.cardManagementInfo.headSculpture" width="66px" height="66px"
  65. shape="circle" v-if="item.cardManagementInfo.headSculpture"></u--image>
  66. <u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px"
  67. height="66px" shape="circle" v-else></u--image>
  68. </view>
  69. <view class="bottom flex">
  70. <view class="left">
  71. <view class="row1">
  72. <text class="name">{{item.cardManagementInfo.name}}</text>
  73. <text class="post">{{item.cardManagementInfo.post}}</text>
  74. </view>
  75. <view class="row2">
  76. {{item.cardManagementInfo.companyName}}
  77. </view>
  78. </view>
  79. <view class="right">
  80. <view class="row1 flex">
  81. <u--image :showLoading="true" src="/static/imgs/card/address1.png" width="13px" height="16px"
  82. ></u--image><view class='icon-text'>{{ item.cardManagementInfo.province }}{{ item.cardManagementInfo.city }}{{ item.cardManagementInfo.area }}</view>
  83. </view>
  84. <view class="row2 flex">
  85. <u--image :showLoading="true" src="/static/imgs/card/phone1.png" width="12px" height="13px"
  86. ></u--image><view class='icon-text'>{{ item.cardManagementInfo.phone }}</view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="card-content style2" v-if="item.cardManagementInfo.cuttentTemplate==4">
  92. <view class="top">
  93. <view class="row1">
  94. <text class="name">{{item.cardManagementInfo.name}}</text>
  95. <text class="post">{{item.cardManagementInfo.post}}</text>
  96. </view>
  97. <view class="row2">
  98. {{item.cardManagementInfo.companyName}}
  99. </view>
  100. </view>
  101. <view class="bottom flex">
  102. <view class="left">
  103. <u--image :showLoading="true" :src="item.cardManagementInfo.headSculpture" width="66px" height="66px"
  104. shape="circle" v-if="item.cardManagementInfo.headSculpture"></u--image>
  105. <u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png"
  106. width="66px" height="66px" shape="circle" v-else></u--image>
  107. </view>
  108. <view class="right">
  109. <view class="row1 flex">
  110. <u--image :showLoading="true" src="/static/imgs/card/address2.png" width="13px" height="16px"
  111. ></u--image><view class='icon-text'>{{ item.cardManagementInfo.province }}{{ item.cardManagementInfo.city }}{{ item.cardManagementInfo.area }}</view>
  112. </view>
  113. <view class="row2 flex">
  114. <u--image :showLoading="true" src="/static/imgs/card/phone2.png" width="12px" height="13px"
  115. ></u--image><view class='icon-text'>{{ item.cardManagementInfo.phone }}</view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="status-btns" v-if="item.status==0">
  121. <span class='status-btn' @click='cardExchangeInfoEdit(1,item)'> 拉黑</span>
  122. <span class='status-btn error' @click='cardExchangeInfoEdit(2,item)'>拒绝</span>
  123. <span class='status-btn success' @click='cardExchangeInfoEdit(3,item)'>接受</span>
  124. <span class='status-btn' @click='cardExchangeInfoEdit(4,item)'>移除</span>
  125. </view>
  126. <view class="status-btns" v-else>
  127. <span class='status' v-if="item.status==1">已接受</span>
  128. <span class='status' v-if="item.status==3">已拒绝</span>
  129. <span class='status' v-if="item.status==5">已过期</span>
  130. <span class='status' v-if="item.status==7">已拉黑</span>
  131. </view>
  132. </view>
  133. <view style='margin:0 20rpx;' class="flex flex-between">
  134. <span>来至 {{item.circleName}}</span>
  135. <span> {{parseTime(item.gmtCreate)}}</span>
  136. </view>
  137. <!-- <view class="left">
  138. <view class="top flex-row-center">
  139. <image :src="item.headSculpture" mode="widthFix" class="img"></image>
  140. </view>
  141. <view class="bottom flex flex-evenly">
  142. <uni-icons @click="toHome(item)" type="home" size="20"></uni-icons>
  143. <text @click='switchType(item)'>{{item.classify?item.classifyName:'默'}}</text>
  144. <uni-icons @click='share(item)' type="redo" size="20" color=''></uni-icons>
  145. </view>
  146. </view>
  147. <view class="right">
  148. <view class="row1 flex">
  149. <text>{{item.name}}</text>
  150. <text class="line"></text>
  151. <text>{{item.post}}</text>
  152. <u-checkbox-group v-if='islongPress' placement="column"
  153. @change="checkboxChange($event,index)">
  154. <u-checkbox :name='index+1' :checked='item.checked'
  155. :customStyle="{marginBottom: '8px'}">
  156. </u-checkbox>
  157. </u-checkbox-group>
  158. </view>
  159. <view class="row2">
  160. {{item.companyName}}
  161. </view>
  162. <view class="row3" @click="toMap(item)">
  163. <uni-icons type="redo" size="20"></uni-icons>
  164. <text>{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</text>
  165. </view>
  166. <view class="row3">
  167. <uni-icons type="redo" size="20"></uni-icons>
  168. <text>{{item.phone}}</text>
  169. </view>
  170. <view @click='remarkEdit(item)' class="row3">
  171. <uni-icons type="redo" size="20"></uni-icons>
  172. <text>{{item.remark?item.remark:'单击添加备注'}}</text>
  173. </view>
  174. </view> -->
  175. </view>
  176. <!--< view class="row" v-for="(item,index) in cardList" :key="index">
  177. <view class="flex">
  178. <view class="left">
  179. <view class="top flex-row-center">
  180. <image :src="item.cardManagementInfo.headSculpture" mode="widthFix" class="img"></image>
  181. </view>
  182. </view>
  183. <view class="right">
  184. <view class="row1 flex">
  185. <text>{{item.cardManagementInfo.name}}</text>
  186. <text class="line"></text>
  187. <text>{{item.cardManagementInfo.post}}</text>
  188. </view>
  189. <view class="row2">
  190. {{item.cardManagementInfo.companyName}}
  191. </view>
  192. <view class="row3" @click="toMap">
  193. <uni-icons type="redo" size="20"></uni-icons>
  194. <text>{{item.cardManagementInfo.detailedAddress}}</text>
  195. </view>
  196. <view class="row3">
  197. <uni-icons type="redo" size="20"></uni-icons>
  198. <text>{{item.cardManagementInfo.phone}}</text>
  199. </view>
  200. </view>
  201. </view>
  202. <view class="" v-if="item.status==0">
  203. <span @click='cardExchangeInfoEdit(1,item)'> 拉黑</span>
  204. <span @click='cardExchangeInfoEdit(2,item)'>拒绝</span>
  205. <span @click='cardExchangeInfoEdit(3,item)'>接受</span>
  206. <span @click='cardExchangeInfoEdit(4,item)'>移除</span>
  207. </view>
  208. <view class="" v-else>
  209. <span v-if="item.status==1">已接受</span>
  210. <span v-if="item.status==3">已拒绝</span>
  211. <span v-if="item.status==5">已过期</span>
  212. <span v-if="item.status==7">已拉黑</span>
  213. </view>
  214. <view class="flex flex-between">
  215. <span>来至 {{item.circleName}}</span>
  216. <span> {{parseTime(item.gmtCreate)}}</span>
  217. </view>
  218. </view> -->
  219. </view>
  220. <u-toast ref="uToast"></u-toast>
  221. </view>
  222. </template>
  223. <script>
  224. export default {
  225. data() {
  226. return {
  227. userInfo:{},
  228. status:1,
  229. cardList:[{cardManagementInfo:{}}],
  230. };
  231. },
  232. onLoad() {
  233. this.userInfo = uni.getStorageSync("userInfo")
  234. this.getList()
  235. },
  236. methods:{
  237. getList(){
  238. uni.showLoading({
  239. title: '数据加载中'
  240. })
  241. this.$request.baseRequest('admin.unimall.cardExchangeInfo', 'list', {
  242. receiveId:this.userInfo.id,
  243. status:this.status
  244. }, failres => {
  245. console.log('res+++++', failres.errmsg)
  246. this.$refs.uToast.show({
  247. type: 'error',
  248. message: failres.errmsg,
  249. })
  250. uni.hideLoading()
  251. }).then(res => {
  252. uni.hideLoading()
  253. this.cardList = res.data.items
  254. })
  255. },
  256. cardExchangeInfoEdit(type,val){
  257. uni.showLoading({
  258. title: '数据加载中'
  259. })
  260. this.$request.baseRequest('admin.unimall.cardExchangeInfo', 'update', {
  261. cardExchangeInfo:JSON.stringify(val),
  262. updateFlag:type
  263. }, failres => {
  264. console.log('res+++++', failres.errmsg)
  265. this.$refs.uToast.show({
  266. type: 'error',
  267. message: failres.errmsg,
  268. })
  269. uni.hideLoading()
  270. }).then(res => {
  271. uni.hideLoading()
  272. this.$refs.uToast.show({
  273. type: 'success',
  274. message: "操作成功!",
  275. })
  276. })
  277. }
  278. }
  279. }
  280. </script>
  281. <style lang="scss" scoped>
  282. .content1 {
  283. background: #112253;
  284. padding: 0rpx 20rpx 160rpx 20rpx;
  285. box-sizing: border-box;
  286. border-radius: 0px 0px 20rpx 20rpx;
  287. }
  288. // .content2 {
  289. // margin-top:-112rpx;
  290. // border: 1px solid #ccc;
  291. // border-radius: 30rpx;
  292. // padding: 40rpx;
  293. // box-sizing: border-box;
  294. // .left {
  295. // width: 30%;
  296. // .top {
  297. // margin-bottom: 20rpx;
  298. // }
  299. // .img {
  300. // width: 80%;
  301. // }
  302. // .bottom {
  303. // }
  304. // }
  305. // .right {
  306. // .row1 {
  307. // .line {
  308. // width: 1px;
  309. // height: 20px;
  310. // margin: 0 20rpx;
  311. // background: black;
  312. // }
  313. // }
  314. // }
  315. // }
  316. .default{
  317. color:rgba(255, 255, 255, 0.5);
  318. font-size:26rpx;
  319. padding:20rpx;
  320. position:relative;
  321. }
  322. .active{
  323. color:#fff;
  324. font-size:32rpx;
  325. }
  326. .active:after{
  327. content:'';
  328. display:block;
  329. width:10px;
  330. height:2px;
  331. background:#fff;
  332. position: absolute;
  333. left: 50%;
  334. transform: translateX(-50%);
  335. bottom: 0;
  336. }
  337. .content2 {
  338. // padding:0 20rpx;
  339. position: relative;
  340. top: -144rpx;
  341. .style1 {
  342. display: flex;
  343. padding: 20rpx 30rpx;
  344. width: 85%;
  345. margin-bottom: 90rpx;
  346. .left {
  347. width: 132rpx;
  348. height: 132rpx;
  349. border-radius: 50%;
  350. }
  351. .right {
  352. margin-left: 40rpx;
  353. .row1 {
  354. .name {
  355. font-size: 38rpx;
  356. font-weight: bold;
  357. color: #040000;
  358. margin-right: 20rpx;
  359. }
  360. .post {
  361. font-size: 26rpx;
  362. font-weight: 500;
  363. color: #666666;
  364. }
  365. }
  366. .row2 {
  367. font-size: 24rpx;
  368. font-weight: bold;
  369. color: #323333;
  370. }
  371. .row3 {
  372. margin-top: 30rpx;
  373. font-size: 24rpx;
  374. font-weight: 500;
  375. color: #323333;
  376. }
  377. .row2,.row4 {
  378. margin-top: 10rpx;
  379. }
  380. }
  381. }
  382. .style2 {
  383. padding: 30rpx;
  384. margin-bottom: 100rpx;
  385. .top {
  386. .row1 {
  387. .name {
  388. font-size: 38rpx;
  389. font-weight: bold;
  390. color: #040000;
  391. margin-right: 20rpx;
  392. }
  393. .post {
  394. font-size: 26rpx;
  395. font-weight: 500;
  396. color: #666666;
  397. }
  398. }
  399. .row2 {
  400. margin-top: 10rpx;
  401. font-size: 24rpx;
  402. font-weight: bold;
  403. color: #323333;
  404. }
  405. }
  406. .bottom {
  407. margin-top: 48rpx;
  408. .left {
  409. margin-right: 40rpx;
  410. .row1 {
  411. .name {
  412. font-size: 38rpx;
  413. font-weight: bold;
  414. color: #040000;
  415. margin-right: 20rpx;
  416. }
  417. .post {
  418. font-size: 26rpx;
  419. font-weight: 500;
  420. color: #666666;
  421. }
  422. }
  423. .row2 {
  424. margin-top: 10rpx;
  425. font-size: 24rpx;
  426. font-weight: bold;
  427. color: #323333;
  428. }
  429. }
  430. .right {
  431. .row1,
  432. .row2 {
  433. font-size: 24rpx;
  434. font-weight: 500;
  435. color: #323333;
  436. }
  437. .row2,.row4 {
  438. margin-top: 10rpx;
  439. }
  440. }
  441. }
  442. }
  443. .card-list-item {
  444. width: calc(100%);
  445. // left:-20rpx;
  446. position: relative;
  447. border-radius: 30rpx;
  448. padding: 40rpx;
  449. box-sizing: border-box;
  450. .car-bottom {
  451. position: absolute;
  452. bottom: 63rpx;
  453. left: 20rpx;
  454. bottom:24rpx;
  455. width:94.9%;
  456. background: url("../../static/imgs/card/bg5.png") no-repeat center;
  457. background-size: 100% 100%;
  458. height: 80rpx;
  459. // width: calc(100% - 40rpx);
  460. .left {
  461. // top: -40rpx;
  462. position: absolute;
  463. padding: 20rpx 0;
  464. width: 70vw;
  465. height: 80rpx;
  466. box-sizing: border-box;
  467. display: flex;
  468. align-items: center;
  469. justify-content: space-evenly;
  470. z-index:100;
  471. left: 0px;
  472. // background-size: 100% 100%;
  473. overflow-y: hidden;
  474. }
  475. }
  476. .left {
  477. width: 30%;
  478. .top {
  479. margin-bottom: 20rpx;
  480. }
  481. .img {
  482. width: 80%;
  483. }
  484. .bottom {}
  485. }
  486. .right {
  487. .row1 {
  488. .line {
  489. width: 1px;
  490. height: 20px;
  491. margin: 0 20rpx;
  492. background: black;
  493. }
  494. }
  495. }
  496. }
  497. }
  498. .icon-text{
  499. margin-left: 10px;
  500. font-size: 24rpx;
  501. font-weight: 500;
  502. color: #323333;
  503. }
  504. .status-btns{
  505. margin:10rpx 0 25rpx;
  506. text-align:right;
  507. }
  508. .status-btns span{
  509. background:#fff;
  510. border:1px solid rgba(0, 0, 0, 0.20);
  511. padding:10rpx 30rpx;
  512. font-size:26rpx;
  513. }
  514. .status{
  515. color:#666;
  516. }
  517. .error{
  518. color:#FF4E4E;
  519. }
  520. .success{
  521. color:#279D2A;
  522. }
  523. </style>