cardHolder.vue 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713
  1. <template>
  2. <view class="content">
  3. <view class='wrap'>
  4. <u-navbar title="电子名片" placeholder bgColor="#112253" titleStyle="color:#fff">
  5. <view class="u-nav-slot relative" slot="left">
  6. <u-icon name="bell" size="26" @click="toNotice" color="#fff"></u-icon>
  7. <u-badge :isDot="unread>0?true:false" type="error" class="point"></u-badge>
  8. </view>
  9. </u-navbar>
  10. <view class="content1 flex-row-center">
  11. <view class="search flex justify-space-between align-item-center flex-between" @click="search">
  12. <view class="left align-item-center flex">
  13. <uni-icons type="search" size="24" color="#9199af"></uni-icons>
  14. <text class="search-val"> {{searchVal?searchVal:'搜索名片'}}</text>
  15. <!-- <uni-icons type="closeempty" size="24" @click.native.stop="delSearchVal" v-if="searchVal">
  16. </uni-icons> -->
  17. </view>
  18. <view class="right">
  19. <image style='width:32rpx;height:32rpx;' v-if="searchVal" @click.native.stop="delSearchVal"
  20. src="../../static/imgs/card/searchdel.png" mode="widthFix"></image>
  21. <uni-icons type="mic" size="24" @click.native.stop="micOpen" color="#9199af"></uni-icons>
  22. </view>
  23. </view>
  24. <view class="col flex">
  25. <uni-icons type="scan" size="30" @click="scan" color="#fff"></uni-icons>
  26. </view>
  27. </view>
  28. <view
  29. :style='cardHolderList.length>0?"padding:20rpx 20rpx 200rpx 20rpx;":"padding:20rpx 20rpx 20rpx 20rpx;"'
  30. class="content2">
  31. <view class="all-type flex" @click="selectType">
  32. <text style="margin-right: 10rpx;">{{typeName?typeName:'全部分类'}}</text>
  33. <uni-icons type="bottom" size="18" color="#fff"></uni-icons>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- :style='cardHolderList.length>0?"top:376rpx;":"top:276rpx;"' -->
  38. <view class="content3 relative" style="top: 380rpx;">
  39. <mescroll-uni v-if='cardHolderList' :up="upOption" :down="downOption" ref="mescrollRef" @init="mescrollInit"
  40. @up="upCallback" @down="downCallback" height="1060">
  41. <view v-for='(item,index) in cardHolderList' @longpress="longpress" class="item flex">
  42. <!-- <view class="card-list-item" style="background:red"> -->
  43. <view class="card-list-item"
  44. :style="'background: url('+item.currentBackground+');background-size:100% 100%'">
  45. <view class="card-content style1" v-if="item.cuttentTemplate==1">
  46. <view class="left">
  47. <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
  48. shape="circle"></u--image>
  49. </view>
  50. <view class="right">
  51. <view class="row1">
  52. <text class="name">{{item.name}}</text>
  53. <text class="post">{{item.post}}</text>
  54. </view>
  55. <view class="row2">
  56. {{item.companyName}}
  57. </view>
  58. <view class="row3 flex" @click="toMap(item)">
  59. <u--image :showLoading="true" src="/static/imgs/card/address1.png" width="13px"
  60. height="16px"></u--image>
  61. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  62. </view>
  63. <view @click="freeTell(item)" class="row4 flex">
  64. <u--image :showLoading="true" src="/static/imgs/card/phone1.png" width="12px"
  65. height="13px"></u--image>
  66. <view class='icon-text'>{{ item.phone }}</view>
  67. </view>
  68. <view @click='remarkEdit(item)' class="row2 flex" style="color: #808080">
  69. <u--image :showLoading="true" src="/static/imgs/card/remark1.png" width="10px"
  70. height="12px"></u--image>
  71. <view class='icon-text' style="color: #808080;">{{item.remark?item.remark:'单击添加备注'}}
  72. </view>
  73. </view>
  74. </view>
  75. <u-checkbox-group v-if='islongPress' placement="column"
  76. @change="checkboxChange($event,index)">
  77. <u-checkbox iconColor='#4977FC' activeColor="#fff" :name='index+1'
  78. :checked='item.checked' :customStyle="{marginBottom: '8px'}">
  79. </u-checkbox>
  80. </u-checkbox-group>
  81. </view>
  82. <view class="card-content style1 flex-between" v-if="item.cuttentTemplate==2">
  83. <view class="right">
  84. <view class="row1">
  85. <text class="name">{{item.name}}</text>
  86. <text class="post">{{item.post}}</text>
  87. </view>
  88. <view class="row2">
  89. {{item.companyName}}
  90. </view>
  91. <view @click="toMap(item)" class="row3 flex">
  92. <u--image :showLoading="true" src="/static/imgs/card/address3.png" width="13px"
  93. height="16px"></u--image>
  94. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  95. </view>
  96. <view @click="freeTell(item)" class="row4 flex">
  97. <u--image :showLoading="true" src="/static/imgs/card/phone3.png" width="12px"
  98. height="13px"></u--image>
  99. <view class='icon-text'>{{ item.phone }}</view>
  100. </view>
  101. <view @click='remarkEdit(item)' class="row2 flex" style="color: #808080">
  102. <u--image :showLoading="true" src="/static/imgs/card/remark3.png" width="10px"
  103. height="12px"></u--image>
  104. <view class='icon-text' style="color: #808080;">{{item.remark?item.remark:'单击添加备注'}}
  105. </view>
  106. </view>
  107. </view>
  108. <view class="left">
  109. <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
  110. shape="circle" v-if="item.headSculpture"></u--image>
  111. <u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px"
  112. height="66px" shape="circle" v-else></u--image>
  113. </view>
  114. <u-checkbox-group v-if='islongPress' placement="column"
  115. @change="checkboxChange($event,index)">
  116. <u-checkbox iconColor='#4977FC' activeColor="#fff" :name='index+1'
  117. :checked='item.checked' :customStyle="{marginBottom: '8px'}">
  118. </u-checkbox>
  119. </u-checkbox-group>
  120. </view>
  121. <view class="card-content style2" v-if="item.cuttentTemplate==3">
  122. <view class="top">
  123. <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
  124. shape="circle" v-if="item.headSculpture"></u--image>
  125. <u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px"
  126. height="66px" shape="circle" v-else></u--image>
  127. </view>
  128. <view class="bottom flex">
  129. <view class="left">
  130. <view class="row1">
  131. <text class="name">{{item.name}}</text>
  132. <text class="post">{{item.post}}</text>
  133. </view>
  134. <view class="row2">
  135. {{item.companyName}}
  136. </view>
  137. </view>
  138. <view class="right">
  139. <view @click="toMap(item)" class="row1 flex">
  140. <u--image :showLoading="true" src="/static/imgs/card/address1.png" width="13px"
  141. height="16px"></u--image>
  142. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  143. </view>
  144. <view @click="freeTell(item)" class="row2 flex">
  145. <u--image :showLoading="true" src="/static/imgs/card/phone1.png" width="12px"
  146. height="13px"></u--image>
  147. <view class='icon-text'>{{ item.phone }}</view>
  148. </view>
  149. <view @click='remarkEdit(item)' class="row2 flex" style="color: #808080">
  150. <u--image :showLoading="true" src="/static/imgs/card/remark1.png" width="10px"
  151. height="12px"></u--image>
  152. <view class='icon-text' style="color: #808080;">
  153. {{item.remark?item.remark:'单击添加备注'}}
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <u-checkbox-group v-if='islongPress' placement="column"
  159. @change="checkboxChange($event,index)">
  160. <u-checkbox iconColor='#4977FC' activeColor="#fff" :name='index+1'
  161. :checked='item.checked' :customStyle="{marginBottom: '8px'}">
  162. </u-checkbox>
  163. </u-checkbox-group>
  164. </view>
  165. <view class="card-content style2" v-if="item.cuttentTemplate==4">
  166. <view class="top">
  167. <view class="row1">
  168. <text class="name">{{item.name}}</text>
  169. <text class="post">{{item.post}}</text>
  170. </view>
  171. <view class="row2">
  172. {{item.companyName}}
  173. </view>
  174. </view>
  175. <view class="bottom flex">
  176. <view class="left">
  177. <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
  178. shape="circle" v-if="item.headSculpture"></u--image>
  179. <u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png"
  180. width="66px" height="66px" shape="circle" v-else></u--image>
  181. </view>
  182. <view class="right">
  183. <view @click="toMap(item)" class="row1 flex">
  184. <u--image :showLoading="true" src="/static/imgs/card/address2.png" width="13px"
  185. height="16px"></u--image>
  186. <view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
  187. </view>
  188. <view @click="freeTell(item)" class="row2 flex">
  189. <u--image :showLoading="true" src="/static/imgs/card/phone2.png" width="12px"
  190. height="13px"></u--image>
  191. <view class='icon-text'>{{ item.phone }}</view>
  192. </view>
  193. <view @click='remarkEdit(item)' class="row2 flex" style="color: #808080">
  194. <u--image :showLoading="true" src="/static/imgs/card/remark2.png" width="10px"
  195. height="12px"></u--image>
  196. <view :style='item.remark?"color:#000;":"color:#808080;"' class='icon-text'>
  197. {{item.remark?item.remark:'单击添加备注'}}
  198. </view>
  199. </view>
  200. </view>
  201. </view>
  202. <u-checkbox-group v-if='islongPress' placement="column"
  203. @change="checkboxChange($event,index)">
  204. <u-checkbox iconColor='#4977FC' activeColor="#fff" :name='index+1'
  205. :checked='item.checked' :customStyle="{marginBottom: '8px'}">
  206. </u-checkbox>
  207. </u-checkbox-group>
  208. </view>
  209. <view class="car-bottom flex">
  210. <view class="left">
  211. <image src="../../static/imgs/card/home.png" mode="widthFix" style="width: 32rpx;height: auto;"
  212. @click="toHome(item)"></image>
  213. <text @click='switchType(item)'
  214. style="color: #fff;font-size: 36rpx;font-weight: 700;">{{item.classify?item.classifyName:'默'}}</text>
  215. <image v-if='item.shareCard==1' src="../../static/imgs/card/share.png" mode="widthFix"
  216. style="width: 35rpx;height: auto;" @click="share(item)"></image>
  217. <image v-if='item.shareCard==0' src="../../static/imgs/card/share_grey.png"
  218. mode="widthFix" style="width: 40rpx;height: auto;"></image>
  219. </view>
  220. <view class="right">
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. </mescroll-uni>
  226. </view>
  227. <view class="del-style" v-if="islongPress">
  228. <view class="left">
  229. <text class="qx" @click="islongPress=false">取消</text>
  230. <text class="del" @click="del">删除</text>
  231. </view>
  232. <view style='width:128rpx;' class="right flex">
  233. <view>全选</view>
  234. <u-checkbox-group class='' placement="column" @change="checkboxChange($event,'')">
  235. <u-checkbox iconColor='#4977FC' activeColor="#fff" name='全选' :checked='checked'
  236. :customStyle="{marginBottom: '8px',position: 'relative',top: '-19px',right:'-8px'}">
  237. </u-checkbox>
  238. </u-checkbox-group>
  239. </view>
  240. </view>
  241. <u-picker :show="isShowType" :columns="typeColumns" keyName="circleName" :title="type == 2?'修改分类':'选择分类'"
  242. @close="isShowType=false" @cancel="isShowType=false" closeOnClickOverlay @confirm="typeConfirm"></u-picker>
  243. <u-toast ref="uToast"></u-toast>
  244. <u-modal :show="delShow" title="提示" confirmText='确定' showCancelButton='true' @cancel="delShow=false"
  245. @confirm="delConfirm" :content='"已选中"+this.checkedList.length+"张名片,确定删除?"'></u-modal>
  246. <u-modal :show="modalShow" @confirm='remarkConfirm' :confirmColor="remark?'#2979ff':'#ccc'"
  247. showCancelButton='true' title="备注" @cancel="modalShow=false">
  248. <view class="slot-content">
  249. <u--textarea v-model="remark" placeholder="输入备注,不超过150个字"></u--textarea>
  250. </view>
  251. </u-modal>
  252. <u-popup :show="qrcodeShow" @close="qrcodeShow=false" mode="center" :round='10'>
  253. <image style='margin:10px;height: auto;' :src="currectData.qrCode" mode="widthFix"></image>
  254. </u-popup>
  255. <u-popup :show="popupshow" :closeOnClickOverlay='true' :overlayOpacity='0.4' @close='handleHiddenShare'
  256. :round="10" mode="bottom">
  257. <view>
  258. <!-- <view class="share-to">
  259. <text>分享到</text>
  260. </view> -->
  261. <view class="share-content">
  262. <view class="block" @click="toUrl()">
  263. <button class="moment">
  264. <image style='width:108rpx;height:108rpx;' src="@/static/imgs/scancode.png"
  265. mode="aspectFill"></image>
  266. <view>扫码分享</view>
  267. </button>
  268. </view>
  269. <view class="block">
  270. <button class="shareBtn" type="default" data-name="shareBtn" open-type="share">
  271. <image style='width:108rpx;height:108rpx;' src="@/static/imgs/shade.png" mode="aspectFill">
  272. </image>
  273. <view>分享微信好友</view>
  274. </button>
  275. </view>
  276. </view>
  277. </view>
  278. </u-popup>
  279. <!-- <image :src="poster" style="width: 750rpx;height: 1334rpx;"></image> -->
  280. <!-- 生成图片 -->
  281. <poster :data="canvasData" background-color="#FFF" :width='750' :height='420' @on-success="posterSuccess"
  282. ref="poster" @on-error="posterError"></poster>
  283. <!-- #ifdef MP-WEIXIN -->
  284. <!-- <u-popup :show="isPhone" mode="center" :round="10">
  285. <view class='sq-view'>
  286. <view class="text">
  287. 手机登录后才能查看名片哦~
  288. </view>
  289. <button class="confirm" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">授权手机号</button>
  290. </view>
  291. </u-popup> -->
  292. <u-modal :show="showAuthorizePhone"
  293. :showConfirmButton="false">
  294. <view class="slot-content">
  295. <div class="auth-card">
  296. <div class="img">
  297. <img class="avatar-img"
  298. src="@/static/imgs/logo.png"
  299. mode="widthFix">
  300. </div>
  301. <!-- <div class="title">手机登录后才能查看名片哦~</div> -->
  302. <div class="content">手机登录后才能查看名片哦~</div>
  303. </div>
  304. <div class="auth-btncard">
  305. <div class="btn-unok"><u-button :customStyle="customStyleUnOk" @click="showAuthorizePhone=false"> 拒绝</u-button></div>
  306. <div class="btn-ok"><u-button :customStyle="customStyleOk" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"> 立即登录</u-button></div>
  307. </div>
  308. </view>
  309. </u-modal>
  310. <u-modal :show="showAuthorizeUser"
  311. :showConfirmButton="false">
  312. <view class="slot-content">
  313. <div class="auth-card">
  314. <div class="img">
  315. <img class="avatar-img"
  316. src="/static/imgs/logo.png"
  317. mode="widthFix">
  318. </div>
  319. <div class="content">邀请您补全个人信息<br></br>(昵称、头像)</div>
  320. <div style="margin-left: 100rpx;margin-right: 100rpx">
  321. <u-form :model="userInfo" ref="uForm">
  322. <u-form-item label="头像">
  323. <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" slot="right">
  324. <image class="avatar" :src="userInfo.head?userInfo.head:'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'"></image>
  325. </button>
  326. </u-form-item>
  327. <u-form-item label="昵称">
  328. <u-input inputAlign='right' v-model="userInfo.nickname" class="weui-input" @blur="userNameInput" placeholder="请输入昵称" border="false"/>
  329. <!-- <input type="nickname" :value="userInfo.nickname" class="weui-input" @blur="userNameInput" placeholder="请输入昵称"/> -->
  330. </u-form-item>
  331. </u-form>
  332. </div>
  333. </div>
  334. <div class="auth-btncard">
  335. <div class="btn-unok"><u-button :customStyle="customStyleUnOk" @click="showAuthorizeUser=false"> 拒绝</u-button></div>
  336. <div class="btn-ok"><u-button :customStyle="customStyleOk" @click="authUser"> 允许</u-button></div>
  337. </div>
  338. </view>
  339. </u-modal>
  340. <!-- #endif -->
  341. <u-toast ref="uToast"></u-toast>
  342. </view>
  343. </template>
  344. <script>
  345. var that;
  346. import Poster from '../../components/zhangyuhao-poster/Poster.vue'
  347. import { pathToBase64, base64ToPath } from 'image-tools'
  348. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  349. export default {
  350. mixins: [MescrollMixin],
  351. components: {
  352. Poster
  353. },
  354. data() {
  355. return {
  356. userInfo: {head:'',nickname:''},
  357. downOption: {
  358. auto: false,
  359. },
  360. upOption: {
  361. page: {
  362. size: 10 // 每页数据的数量,默认10
  363. },
  364. auto: false,
  365. noMoreSize: 1,
  366. empty: {
  367. tip: '暂无相关数据'
  368. }
  369. },
  370. params: {
  371. encryptedData: '',
  372. session_key: '',
  373. iv: '',
  374. },
  375. key: '',
  376. isPhone: false,
  377. canReset: false,
  378. poster: '',
  379. canvasData: {},
  380. searchVal: '',
  381. isShowType: false,
  382. loading: true,
  383. typeName: '',
  384. typeColumns: [],
  385. cardHolderList: [],
  386. currectData: [],
  387. type: 1,
  388. popupshow: false,
  389. modalShow: false,
  390. remark: '',
  391. islongPress: false,
  392. checked: false,
  393. checkedList: [],
  394. delShow: false,
  395. qrcodeShow: false,
  396. unread: 0,
  397. clicknum: 0,
  398. noticeList: [],
  399. status: 0,
  400. // 是否弹出登录注册授权弹窗
  401. showAuthorizeUser: false,
  402. showAuthorizePhone: false,
  403. customStyleUnOk: {
  404. marginTop: '20rpx', // 注意驼峰命名,并且值必须用引号包括,因为这是对象
  405. border:'none',
  406. color:'gray'
  407. },
  408. customStyleOk: {
  409. marginTop: '20rpx', // 注意驼峰命名,并且值必须用引号包括,因为这是对象
  410. border:'none',
  411. color:'#157DFB'
  412. },
  413. };
  414. },
  415. mounted() {
  416. },
  417. onShow:function(){
  418. this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
  419. receiveId: uni.getStorageSync("userInfo").id,
  420. }, failres => {
  421. console.log('res+++++', failres.errmsg)
  422. this.$refs.uToast.show({
  423. type: 'error',
  424. message: failres.errmsg,
  425. })
  426. }).then(res => {
  427. this.noticeList = res.data.items
  428. if (this.noticeList.length > 0) {
  429. var data = this.noticeList.filter((item) => {
  430. return item.newsFlag == 0
  431. })
  432. this.unread = data ? data.length : 0
  433. }
  434. console.log(this.unread)
  435. })
  436. this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
  437. if(this.searchVal) this.mescroll.resetUpScroll();
  438. },
  439. onLoad: function(options) {
  440. that = this
  441. console.log(uni.getLaunchOptionsSync().scene, 1011)
  442. if (uni.getStorageSync("userInfo").phone) {
  443. this.userInfo = uni.getStorageSync("userInfo")
  444. this.$nextTick(function() {
  445. this.mescroll.resetUpScroll()
  446. wx.showShareMenu({
  447. withShareTicket: true,
  448. menus: ["shareAppMessage", "shareTimeline"]
  449. })
  450. });
  451. } else {
  452. if (uni.getLaunchOptionsSync().scene != 1154) {
  453. this.login()
  454. }
  455. }
  456. this.status = uni.getLaunchOptionsSync().scene
  457. if (uni.getLaunchOptionsSync().scene == 1154) {
  458. uni.showToast({
  459. title: '请前往小程序查看名片',
  460. icon: 'none',
  461. duration: 10000
  462. });
  463. }
  464. },
  465. onShareAppMessage(res) {
  466. console.log(res, this.popupshow)
  467. let that = this;
  468. //生成名片图片
  469. let imageUrl = this.poster
  470. console.log("imageUrl", imageUrl)
  471. if (res.from === 'button') {
  472. let path = `/pages/cardHolder/scanCodeAddCard?id=${that.currectData.id}`
  473. return {
  474. title: this.popupshow ? `${that.currectData.name}分享的名片~` : '电子名片',
  475. path: path,
  476. imageUrl: this.popupshow ? imageUrl : '',
  477. };
  478. }
  479. if (res.from === 'menu') {
  480. return {
  481. title: '名片夹',
  482. path: '/pages/tabBarPro/index/index',
  483. imageUrl: this.popupshow ? imageUrl : ''
  484. };
  485. }
  486. },
  487. methods: {
  488. //获取昵称输入内容
  489. userNameInput(e){
  490. this.userInfo.nickname = e.detail.value
  491. },
  492. async onChooseAvatar(e) {
  493. this.$set(this.userInfo,"head",await this.toBase64(e.detail.avatarUrl))
  494. },
  495. toBase64(url){
  496. return new Promise(resolve => {
  497. pathToBase64(url).then(path => {
  498. resolve(path);
  499. }).catch(error => {
  500. console.log(error)
  501. })
  502. })
  503. },
  504. authUser(){
  505. if(this.userInfo.nickname==''){
  506. uni.showToast({
  507. icon:"none",
  508. title: '请输入您的昵称',
  509. duration: 2000
  510. });
  511. return;
  512. }
  513. this.getTokenAsync1()
  514. },
  515. downCallback(){
  516. this.mescroll.resetUpScroll()
  517. },
  518. freeTell(item) {
  519. uni.makePhoneCall({
  520. phoneNumber: item.phone, //仅为示例,并非真实的电话号码
  521. success: function() {
  522. console.log("拨打电话成功!")
  523. },
  524. fail: function() {
  525. console.log("拨打电话失败!")
  526. }
  527. })
  528. },
  529. getPhoneNumber(e) {
  530. console.log(e)
  531. if (e.mp.detail.errMsg === "getPhoneNumber:ok") {
  532. this.isPhone = false
  533. this.params.iv = e.mp.detail.iv
  534. this.params.encryptedData = e.mp.detail.encryptedData
  535. this.params.session_key = this.accessToken
  536. console.log(this.params)
  537. let appId = 'wx5d8906c2208c899f'
  538. let sessionKey = this.userInfo.sessionKey
  539. let encryptedData = this.params.encryptedData
  540. let iv = this.params.iv
  541. let pc = this.$WXBizDataCrypt(appId, sessionKey)
  542. let data = this.$WXBizDataCrypt.prototype.decryptData(encryptedData, iv, appId, sessionKey)
  543. console.log('解密后 data: ', data)
  544. this.showAuthorizePhone = false
  545. this.getTokenAsync(data)
  546. }
  547. },
  548. async getTokenAsync(val) {
  549. let that = this
  550. that.userInfo.phone = val.phoneNumber
  551. that.$request.baseRequest('commonUserApp', 'edit', {
  552. commonUserInfo: JSON.stringify(that.userInfo)
  553. }, failres => {
  554. uni.showToast({
  555. icon:"none",
  556. title: failres.errmsg,
  557. duration: 3000
  558. });
  559. uni.hideLoading()
  560. }).then(res1 => {
  561. that.userInfo = res1.data
  562. uni.setStorageSync("userInfo", that.userInfo)
  563. that.showAuthorizeUser = true
  564. that.mescroll.resetUpScroll()
  565. })
  566. },
  567. async getTokenAsync1() {
  568. let that = this
  569. that.$request.baseRequest('commonUserApp', 'edit', {
  570. commonUserInfo: JSON.stringify(that.userInfo)
  571. }, failres => {
  572. uni.showToast({
  573. icon:"none",
  574. title: failres.errmsg,
  575. duration: 3000
  576. });
  577. uni.hideLoading()
  578. }).then(res1 => {
  579. that.userInfo = res1.data
  580. uni.setStorageSync("userInfo", that.userInfo)
  581. that.showAuthorizeUser = false
  582. that.mescroll.resetUpScroll()
  583. })
  584. },
  585. delVal() {
  586. this.searchVal = ""
  587. this.mescroll.resetUpScroll()
  588. },
  589. handleHiddenShare() {
  590. console.log(11111)
  591. this.popupshow = false
  592. },
  593. posterError(err) {
  594. console.log(err)
  595. uni.hideLoading()
  596. },
  597. posterSuccess(url) {
  598. console.log("hahahah", url)
  599. // 生成成功,会把临时路径在这里返回
  600. this.poster = url;
  601. this.popupshow = true
  602. console.log(url)
  603. uni.hideLoading()
  604. },
  605. toHome(item) {
  606. uni.navigateTo({
  607. url: "/pages/circle/lookHome?id=" + item.personalHomeId
  608. })
  609. },
  610. delSearchVal() {
  611. this.searchVal = ""
  612. uni.removeStorageSync('search_val')
  613. this.mescroll.resetUpScroll()
  614. },
  615. toUrl() {
  616. console.log(this.currectData)
  617. this.popupshow = false
  618. this.qrcodeShow = true
  619. },
  620. share(item) {
  621. uni.showLoading({
  622. title: '加载中',
  623. mask: true
  624. })
  625. this.currectData = item
  626. var data = [{
  627. type: 'image',
  628. path: this.currectData.currentBackground,
  629. use: 'bg',
  630. x: -10,
  631. y: 0,
  632. width: 530,
  633. height: 325
  634. },
  635. {
  636. type: 'image',
  637. path: this.currectData.headSculpture?this.currectData.headSculpture:'../../static/imgs/card/defaulthead.png',
  638. shape: 'circle',
  639. use: 'head',
  640. imageType:this.currectData.headSculpture?'wl':'bd',
  641. x: 30,
  642. y: 30,
  643. width: 100,
  644. height: 100
  645. },
  646. {
  647. type: 'text',
  648. text: this.currectData.name,
  649. use: 'name',
  650. x: 150,
  651. y: 50,
  652. size: 24,
  653. color: '#000'
  654. },
  655. {
  656. type: 'text',
  657. text: this.currectData.post,
  658. use: 'post',
  659. x: 240,
  660. y: 55,
  661. size: 18,
  662. color: '#666666'
  663. },
  664. {
  665. type: 'text',
  666. text: this.currectData.companyName,
  667. use: 'companyName',
  668. x: 150,
  669. y: 95,
  670. size: 18,
  671. color: '#000'
  672. },
  673. {
  674. type: 'image',
  675. path: '../../static/imgs/card/address1.png',
  676. use: 'address-icon',
  677. x: 145,
  678. y: 130,
  679. width: 15,
  680. height: 20
  681. },
  682. {
  683. type: 'textarea',
  684. text: this.currectData.province + this.currectData.city + this.currectData.area + this
  685. .currectData.detailedAddress,
  686. lineSpace: 1,
  687. width: 320,
  688. use: 'address',
  689. x: 175,
  690. y: 135,
  691. size: 14,
  692. color: '#000'
  693. },
  694. {
  695. type: 'image',
  696. path: '../../static/imgs/card/phone1.png',
  697. use: 'phone-icon',
  698. x: 145,
  699. y: 163,
  700. width: 16,
  701. height: 16
  702. },
  703. {
  704. type: 'text',
  705. text: this.currectData.phone,
  706. use: 'phone',
  707. x: 175,
  708. y: 167,
  709. size: 14,
  710. color: '#000'
  711. },
  712. {
  713. type: 'image',
  714. path: '../../static/imgs/card/remark1.png',
  715. use: 'remark-icon',
  716. x: 145,
  717. y: 197,
  718. width: 13,
  719. height: 16
  720. },
  721. {
  722. type: 'textarea',
  723. text: this.currectData.remark ? this.currectData.remark : '单击添加备注',
  724. use: 'remark',
  725. lineSpace: 2,
  726. width: 200,
  727. x: 175,
  728. y: 200,
  729. size: 13,
  730. color: '#000'
  731. },
  732. {
  733. type: 'image',
  734. path: '../../static/imgs/card/bg3.png',
  735. use: 'bg1',
  736. x: 0,
  737. y: 243,
  738. width: 370,
  739. height: 67
  740. },
  741. {
  742. type: 'image',
  743. path: '../../static/imgs/card/bg4.png',
  744. use: 'bg2',
  745. x: 355,
  746. y: 243,
  747. width: 150,
  748. height: 67
  749. },
  750. {
  751. type: 'image',
  752. path: '../../static/imgs/card/home.png',
  753. use: 'home',
  754. x: 65,
  755. y: 260,
  756. width: 33,
  757. height: 33
  758. },
  759. {
  760. type: 'text',
  761. text: this.currectData.classifyName ? this.currectData.classifyName : '默',
  762. use: 'classify',
  763. x: 145,
  764. y: 263,
  765. size: 34,
  766. color: '#fff'
  767. },
  768. {
  769. type: 'image',
  770. path: '../../static/imgs/card/share.png',
  771. use: 'share',
  772. x: 235,
  773. y: 263,
  774. width: 33,
  775. height: 28
  776. },
  777. ]
  778. console.log(this.currectData.cuttentTemplate, 111111)
  779. for (var i = 0; i < data.length; i++) {
  780. switch (this.currectData.cuttentTemplate) {
  781. case '2':
  782. if (data[i].use === 'name' ||
  783. data[i].use === 'companyName' ||
  784. data[i].use === 'address-icon' ||
  785. data[i].use === 'phone-icon' ||
  786. data[i].use === 'remark-icon') {
  787. data[i].x = 30
  788. }
  789. if (data[i].use === 'address-icon') {
  790. data[i].path = '../../static/imgs/card/address3.png'
  791. }
  792. if (data[i].use === 'phone-icon') {
  793. data[i].path = '../../static/imgs/card/phone3.png'
  794. }
  795. if (data[i].use === 'remark-icon') {
  796. data[i].path = '../../static/imgs/card/remark3.png'
  797. }
  798. if (data[i].use === 'post') {
  799. data[i].x = 100
  800. }
  801. if (data[i].use === 'address' ||
  802. data[i].use === 'phone' ||
  803. data[i].use === 'remark') {
  804. data[i].x = 60
  805. }
  806. if (data[i].use == 'head') {
  807. data[i].x = 370
  808. }
  809. break;
  810. case '3':
  811. if (data[i].use === 'name') {
  812. data[i].x = 30
  813. data[i].y = 150
  814. }
  815. if (data[i].use === 'companyName') {
  816. data[i].x = 30
  817. data[i].y = 180
  818. }
  819. if (data[i].use === 'post') {
  820. data[i].x = 100
  821. data[i].y = 153
  822. }
  823. if (data[i].use === 'address-icon' ||
  824. data[i].use === 'phone-icon' ||
  825. data[i].use === 'remark-icon') {
  826. data[i].x = 170
  827. }
  828. if (data[i].use === 'address-icon') {
  829. data[i].y = 150
  830. }
  831. if (data[i].use === 'address') {
  832. data[i].y = 155;
  833. data[i].width = 300
  834. }
  835. if (data[i].use === 'phone-icon') {
  836. data[i].y = 180
  837. }
  838. if (data[i].use === 'phone') {
  839. data[i].y = 183
  840. }
  841. if (data[i].use === 'remark-icon') {
  842. data[i].y = 210
  843. }
  844. if (data[i].use === 'remark') {
  845. data[i].y = 212
  846. }
  847. if (data[i].use === 'address' ||
  848. data[i].use === 'phone' ||
  849. data[i].use === 'remark') {
  850. data[i].x = 190
  851. }
  852. break;
  853. case '4':
  854. if (data[i].use === 'name' ||
  855. data[i].use === 'companyName') {
  856. data[i].x = 30
  857. }
  858. if (data[i].use === 'companyName') {
  859. data[i].y = 90
  860. }
  861. if (data[i].use === 'post') {
  862. data[i].x = 100
  863. }
  864. if (data[i].use == 'head') {
  865. data[i].x = 25
  866. data[i].y = 120
  867. }
  868. if (data[i].use === 'address-icon') {
  869. data[i].path = '../../static/imgs/card/address2.png'
  870. }
  871. if (data[i].use === 'phone-icon') {
  872. data[i].path = '../../static/imgs/card/phone2.png'
  873. }
  874. if (data[i].use === 'remark-icon') {
  875. data[i].path = '../../static/imgs/card/remark2.png'
  876. }
  877. if (data[i].use === 'address-icon' ||
  878. data[i].use === 'phone-icon' ||
  879. data[i].use === 'remark-icon') {
  880. data[i].x = 170
  881. }
  882. if (data[i].use === 'address') {
  883. data[i].width = 300
  884. }
  885. if (data[i].use === 'address' ||
  886. data[i].use === 'phone' ||
  887. data[i].use === 'remark') {
  888. data[i].x = 190
  889. }
  890. break;
  891. default:
  892. }
  893. }
  894. this.canvasData = {
  895. clicknum: this.clicknum++,
  896. list: data,
  897. page: 'cardHolder'
  898. }
  899. },
  900. async delConfirm() {
  901. uni.showLoading({
  902. title: '数据加载中',
  903. mask: true
  904. })
  905. for (var i = 0; i < this.checkedList.length; i++) {
  906. await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'delete', {
  907. id: this.checkedList[i].data.id,
  908. }, failres => {
  909. console.log('res+++++', failres.errmsg)
  910. uni.showToast({
  911. icon:"none",
  912. title: failres.errmsg,
  913. duration: 3000
  914. });
  915. }).then(res => {
  916. console.log(i, this.checkedList.length - 1)
  917. if (i == this.checkedList.length - 1) {
  918. uni.hideLoading()
  919. uni.showToast({
  920. icon:"success",
  921. title: '删除成功!',
  922. duration: 2000
  923. });
  924. this.delShow = false
  925. this.islongPress = false
  926. this.mescroll.resetUpScroll()
  927. }
  928. })
  929. }
  930. },
  931. del() {
  932. if (this.checkedList.length > 0) {
  933. this.delShow = true
  934. } else {
  935. uni.showToast({
  936. icon:"none",
  937. title: '请勾选后再进行删除',
  938. duration: 2000
  939. });
  940. }
  941. },
  942. longpress() {
  943. console.log("长按事件", 1111111111);
  944. this.islongPress = true;
  945. },
  946. checkboxChange(e, i) {
  947. console.log(e, i, 111111111)
  948. if (i === '') {
  949. console.log(this.checked)
  950. this.checked = !this.checked;
  951. this.cardHolderList.map(item => item.checked = this.checked);
  952. this.$forceUpdate()
  953. var checkList = this.cardHolderList.filter((item) => {
  954. return item.checked == true
  955. })
  956. var data = checkList.map((item, index) => {
  957. return {
  958. index: index,
  959. data: item
  960. }
  961. })
  962. this.checkedList = JSON.parse(JSON.stringify(data))
  963. } else {
  964. if (e[0]) {
  965. this.checkedList.push({
  966. index: i,
  967. data: this.cardHolderList[i]
  968. })
  969. } else {
  970. var index = this.checkedList.findIndex((item) => {
  971. return item.index == i
  972. })
  973. this.checkedList.splice(index, 1)
  974. }
  975. if (this.checkedList.length != this.cardHolderList.length) {
  976. this.checked = false
  977. }
  978. }
  979. // for(var i=0;i<this.cardList.length;i++){
  980. // console.log(this.cardList[i].checked)
  981. // // if(this.cardList[i].checkedList.length>0){
  982. // // this.checkedList.push(i)
  983. // // }
  984. // }
  985. console.log(this.checkedList)
  986. },
  987. remarkConfirm() {
  988. if (this.remark) {
  989. this.currectData.remark = this.remark
  990. this.$request.baseRequest('admin.unimall.cardHolderInfo', 'update', {
  991. cardHolderInfo: JSON.stringify(this.currectData),
  992. }, failres => {
  993. console.log('res+++++', failres.errmsg)
  994. uni.showToast({
  995. icon:"none",
  996. title: failres.errmsg,
  997. duration: 3000
  998. });
  999. }).then(res => {
  1000. uni.showToast({
  1001. icon:"success",
  1002. title: '修改备注成功!',
  1003. duration: 2000
  1004. });
  1005. this.remark=''
  1006. this.modalShow = false
  1007. this.mescroll.resetUpScroll()
  1008. })
  1009. }
  1010. },
  1011. remarkEdit(item) {
  1012. this.currectData = item
  1013. this.remark = this.currectData.remark
  1014. this.modalShow = true
  1015. },
  1016. switchType(item) {
  1017. this.type = 2
  1018. this.typeColumns[0].shift()
  1019. this.currectData = item
  1020. this.isShowType = true
  1021. },
  1022. typeConfirm(e) {
  1023. if (this.type == 2) {
  1024. console.log(e.value[0].circleName,"123312132")
  1025. this.$set(this.currectData,'classify',e.value[0].circleName)
  1026. this.$request.baseRequest('admin.unimall.cardHolderInfo', 'update', {
  1027. cardHolderInfo: JSON.stringify(this.currectData),
  1028. }, failres => {
  1029. console.log('res+++++', failres.errmsg)
  1030. uni.showToast({
  1031. icon:"none",
  1032. title: failres.errmsg,
  1033. duration: 3000
  1034. });
  1035. }).then(res => {
  1036. uni.showToast({
  1037. icon:"success",
  1038. title: '修改分类成功!',
  1039. duration: 2000
  1040. });
  1041. this.mescroll.resetUpScroll()
  1042. })
  1043. } else {
  1044. this.typeName = e.value[0].circleName
  1045. if(this.typeName =="全部分类") this.typeName = ''
  1046. this.mescroll.resetUpScroll()
  1047. }
  1048. this.isShowType = false
  1049. },
  1050. async upCallback(page) {
  1051. if (uni.getLaunchOptionsSync().scene == 1154) {
  1052. uni.showToast({
  1053. title: '请前往小程序查看名片',
  1054. icon: 'none',
  1055. duration: 10000
  1056. });
  1057. } else {
  1058. var that = this
  1059. if(uni.getStorageSync("userInfo").id){
  1060. uni.showLoading({
  1061. title: '数据加载中'
  1062. })
  1063. await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list', {
  1064. page: page.num,
  1065. limit: page.size,
  1066. commonId: uni.getStorageSync("userInfo").id,
  1067. searchContent: this.searchVal,
  1068. classify:this.typeName
  1069. }, failres => {
  1070. console.log('res+++++', failres.errmsg)
  1071. uni.showToast({
  1072. icon:"none",
  1073. title: failres.errmsg,
  1074. duration: 3000
  1075. });
  1076. uni.hideLoading()
  1077. }).then(res => {
  1078. console.log(res)
  1079. if (page.num == 1) this.cardHolderList = [];
  1080. let curPageLen = res.data.items.length;
  1081. let totalPage = res.data.total;
  1082. for (var i = 0; i < res.data.items.length; i++) {
  1083. res.data.items[i].checked = false
  1084. if (res.data.items[i].classify) {
  1085. res.data.items[i].classifyName = res.data.items[i].classify[0]
  1086. }
  1087. }
  1088. this.cardHolderList = res.data.items
  1089. this.loading = false
  1090. this.$nextTick(() => {
  1091. that.mescroll.endBySize(curPageLen, totalPage)
  1092. });
  1093. uni.hideLoading()
  1094. })
  1095. await this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list', {
  1096. page: 1,
  1097. limit: 9999,
  1098. commonId: uni.getStorageSync("userInfo").id
  1099. }, failres => {
  1100. console.log('res+++++', failres.errmsg)
  1101. uni.showToast({
  1102. icon:"none",
  1103. title: failres.errmsg,
  1104. duration: 3000
  1105. });
  1106. }).then(res => {
  1107. res.data.items.unshift({
  1108. circleName:'全部分类'
  1109. })
  1110. this.typeColumns = [res.data.items]
  1111. console.log(this.typeColumns)
  1112. })
  1113. // await this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
  1114. // receiveId: uni.getStorageSync("userInfo").id,
  1115. // }, failres => {
  1116. // console.log('res+++++', failres.errmsg)
  1117. // uni.showToast({
  1118. // icon:"none",
  1119. // title: failres.errmsg,
  1120. // duration: 3000
  1121. // });
  1122. // }).then(res => {
  1123. // this.noticeList = res.data.items
  1124. // if (this.noticeList.length > 0) {
  1125. // var data = this.noticeList.filter((item) => {
  1126. // return item.newsFlag == 0
  1127. // })
  1128. // this.unread = data ? data.length : 0
  1129. // }
  1130. // console.log(this.unread)
  1131. // })
  1132. }
  1133. }
  1134. },
  1135. login() {
  1136. let that = this
  1137. uni.login({
  1138. "provider": "weixin",
  1139. success: function(wxres) {
  1140. that.$request.baseRequest('commonUserApp', 'commonUserLogin', {
  1141. loginType: 1,
  1142. raw: JSON.stringify(wxres)
  1143. }, failres => {
  1144. uni.showToast({
  1145. icon:"none",
  1146. title: failres.errmsg,
  1147. duration: 3000
  1148. });
  1149. uni.hideLoading()
  1150. }).then(res => {
  1151. console.log(res.data)
  1152. that.isPhone = true
  1153. that.showAuthorizePhone = true
  1154. that.userInfo = res.data
  1155. })
  1156. },
  1157. fail: function(err) {
  1158. uni.showToast({
  1159. icon:"none",
  1160. title: err.code,
  1161. duration: 3000
  1162. });
  1163. // 登录授权失败
  1164. // err.code是错误码
  1165. }
  1166. })
  1167. },
  1168. toNotice() {
  1169. uni.navigateTo({
  1170. url: "/pages/cardHolder/notice"
  1171. })
  1172. },
  1173. micOpen: function() {
  1174. uni.navigateTo({
  1175. url: "/pages/cardHolder/search?mic=1"
  1176. })
  1177. },
  1178. uploadFile: function(tempFilePath) {
  1179. return new Promise((resolve, reject) => {
  1180. //调用你的接口把音频文件转为文字
  1181. this.$minApi.upload('txasr/SentenceRecognition', null, tempFilePath)
  1182. .then(res => {
  1183. if (res.code == 1) {
  1184. resolve(res.data.Result);
  1185. } else {
  1186. reject(e);
  1187. }
  1188. })
  1189. .catch(e => {
  1190. reject(e);
  1191. });
  1192. });
  1193. },
  1194. search() {
  1195. uni.navigateTo({
  1196. url: "/pages/cardHolder/search"
  1197. })
  1198. },
  1199. input(res) {
  1200. console.log('----input:', res)
  1201. },
  1202. clear(res) {
  1203. uni.showToast({
  1204. title: 'clear事件,清除值为:' + res.value,
  1205. icon: 'none'
  1206. })
  1207. },
  1208. blur(res) {
  1209. uni.showToast({
  1210. title: 'blur事件,输入值为:' + res.value,
  1211. icon: 'none'
  1212. })
  1213. },
  1214. focus(e) {
  1215. uni.showToast({
  1216. title: 'focus事件,输出值为:' + e.value,
  1217. icon: 'none'
  1218. })
  1219. },
  1220. cancel(res) {
  1221. uni.showToast({
  1222. title: '点击取消,输入值为:' + res.value,
  1223. icon: 'none'
  1224. })
  1225. },
  1226. selectType() {
  1227. this.isShowType = true
  1228. this.type = 1
  1229. },
  1230. scan() {
  1231. // console.log(1)
  1232. // uni.navigateTo({
  1233. // url: "/pages/cardHolder/scancode"
  1234. // })
  1235. uni.scanCode({
  1236. success: function(res) {
  1237. console.log('条码类型:' + res.scanType);
  1238. console.log('条码内容:' + res.result);
  1239. uni.navigateTo({
  1240. url: "/pages/cardHolder/scanCodeAddCard?id=" + res.result.split("=")[1]
  1241. })
  1242. }
  1243. });
  1244. },
  1245. toMap(item) {
  1246. uni.navigateTo({
  1247. url: "/pages/cardHolder/map?val=" + JSON.stringify(item)
  1248. })
  1249. },
  1250. }
  1251. }
  1252. </script>
  1253. <style lang="scss" scoped>
  1254. .content {
  1255. // padding: 0 20rpx;
  1256. }
  1257. .u-nav-slot {
  1258. /deep/.u-badge {
  1259. position: absolute;
  1260. top: 0;
  1261. right: 6rpx;
  1262. }
  1263. }
  1264. .content1 {
  1265. padding: 20rpx;
  1266. background-color: #112253;
  1267. .search {
  1268. color: #9199af;
  1269. background: #22325f;
  1270. border-radius: 50rpx;
  1271. width: 93%;
  1272. padding: 10rpx 0 10rpx 30rpx;
  1273. box-sizing: border-box;
  1274. margin-right: 20rpx;
  1275. }
  1276. .left{
  1277. width:82%;
  1278. text{
  1279. height: 46rpx;
  1280. white-space: nowrap;
  1281. overflow: scroll;
  1282. position: relative;
  1283. top: -3px;
  1284. }
  1285. }
  1286. .right{
  1287. width:14%;
  1288. }
  1289. }
  1290. .content2 {
  1291. background: #112253;
  1292. color: #fff;
  1293. padding: 20rpx 20rpx 200rpx 20rpx;
  1294. border-radius: 0px 0px 20px 20px;
  1295. }
  1296. .content3 {
  1297. // padding:0 20rpx;
  1298. // position: relative;
  1299. // top: 376rpx;
  1300. margin: 0 20rpx;
  1301. background: #f5f5f5;
  1302. // height: 1000px;
  1303. border-radius: 30rpx;
  1304. .style1 {
  1305. display: flex;
  1306. padding: 20rpx 30rpx;
  1307. width: 85%;
  1308. margin-bottom: 90rpx;
  1309. .left {
  1310. width: 132rpx;
  1311. height: 132rpx;
  1312. border-radius: 50%;
  1313. }
  1314. .right {
  1315. margin-left: 40rpx;
  1316. .row1 {
  1317. .name {
  1318. font-size: 38rpx;
  1319. font-weight: bold;
  1320. color: #040000;
  1321. margin-right: 20rpx;
  1322. }
  1323. .post {
  1324. font-size: 26rpx;
  1325. font-weight: 500;
  1326. color: #666666;
  1327. }
  1328. }
  1329. .row2 {
  1330. font-size: 24rpx;
  1331. font-weight: bold;
  1332. color: #323333;
  1333. }
  1334. .row3 {
  1335. margin-top: 30rpx;
  1336. font-size: 24rpx;
  1337. font-weight: 500;
  1338. color: #323333;
  1339. }
  1340. .row2,
  1341. .row4 {
  1342. margin-top: 10rpx;
  1343. }
  1344. }
  1345. }
  1346. .style2 {
  1347. padding: 15rpx;
  1348. margin-bottom: 80rpx;
  1349. .top {
  1350. .row1 {
  1351. .name {
  1352. font-size: 38rpx;
  1353. font-weight: bold;
  1354. color: #040000;
  1355. margin-right: 20rpx;
  1356. }
  1357. .post {
  1358. font-size: 26rpx;
  1359. font-weight: 500;
  1360. color: #666666;
  1361. }
  1362. }
  1363. .row2 {
  1364. margin-top: 10rpx;
  1365. font-size: 24rpx;
  1366. font-weight: bold;
  1367. color: #323333;
  1368. }
  1369. }
  1370. .bottom {
  1371. margin-top: 20rpx;
  1372. .left {
  1373. margin-right: 40rpx;
  1374. .row1 {
  1375. .name {
  1376. font-size: 38rpx;
  1377. font-weight: bold;
  1378. color: #040000;
  1379. margin-right: 20rpx;
  1380. }
  1381. .post {
  1382. font-size: 26rpx;
  1383. font-weight: 500;
  1384. color: #666666;
  1385. }
  1386. }
  1387. .row2 {
  1388. margin-top: 10rpx;
  1389. font-size: 26rpx;
  1390. font-weight: bold;
  1391. color: #323333;
  1392. }
  1393. }
  1394. .right {
  1395. .row1,
  1396. .row2 {
  1397. font-size: 24rpx;
  1398. font-weight: 500;
  1399. color: #323333;
  1400. }
  1401. .row2,
  1402. .row4 {
  1403. margin-top: 10rpx;
  1404. }
  1405. }
  1406. }
  1407. }
  1408. .card-list-item {
  1409. width: calc(100%);
  1410. // left:-20rpx;
  1411. position: relative;
  1412. border-radius: 30rpx;
  1413. padding: 40rpx;
  1414. box-sizing: border-box;
  1415. .car-bottom {
  1416. position: absolute;
  1417. bottom: 63rpx;
  1418. left: 20rpx;
  1419. bottom: 24rpx;
  1420. width: 94.9%;
  1421. background: url("../../static/imgs/card/bg5.png") no-repeat center;
  1422. background-size: 100% 100%;
  1423. height: 80rpx;
  1424. // width: calc(100% - 40rpx);
  1425. .left {
  1426. // top: -40rpx;
  1427. position: absolute;
  1428. padding: 20rpx 0;
  1429. width: 70vw;
  1430. height: 80rpx;
  1431. box-sizing: border-box;
  1432. display: flex;
  1433. align-items: center;
  1434. justify-content: space-evenly;
  1435. left: 0px;
  1436. // background-size: 100% 100%;
  1437. overflow-y: hidden;
  1438. }
  1439. }
  1440. .left {
  1441. width: 30%;
  1442. .top {
  1443. margin-bottom: 20rpx;
  1444. }
  1445. .img {
  1446. width: 80%;
  1447. }
  1448. .bottom {}
  1449. }
  1450. .right {
  1451. .row1 {
  1452. .line {
  1453. width: 1px;
  1454. height: 20px;
  1455. margin: 0 20rpx;
  1456. background: black;
  1457. }
  1458. }
  1459. }
  1460. }
  1461. }
  1462. .slot-content {
  1463. width: 100%;
  1464. }
  1465. .shade {
  1466. background: rgba(0, 0, 0, 0.2);
  1467. width: 100%;
  1468. height: 100vh;
  1469. position: fixed;
  1470. top: 0;
  1471. left: 0;
  1472. }
  1473. .qrCode {
  1474. position: absolute;
  1475. top: 50%;
  1476. left: 0;
  1477. right: 0;
  1478. transform: translateY(-50%);
  1479. text-align: center;
  1480. }
  1481. /deep/.u-checkbox-group {
  1482. position: absolute;
  1483. right: 20px;
  1484. z-index: 99;
  1485. top: 30px;
  1486. }
  1487. .del-style {
  1488. background: #fff;
  1489. padding: 20rpx;
  1490. width: calc(100vw - 40rpx);
  1491. position: fixed;
  1492. display: flex;
  1493. z-index: 100;
  1494. justify-content: space-between;
  1495. bottom: 0;
  1496. font-size: 28rpx;
  1497. .right {
  1498. color: #344577;
  1499. }
  1500. }
  1501. .del,
  1502. .qx {
  1503. padding: 10rpx;
  1504. }
  1505. .del {
  1506. color: #FF4040;
  1507. }
  1508. .qx {
  1509. color: #666;
  1510. bottom: 0
  1511. }
  1512. .share-content {
  1513. display: flex;
  1514. padding: 20rpx;
  1515. justify-content: center;
  1516. font-size: 24rpx;
  1517. button {
  1518. background: transparent;
  1519. line-height: 1;
  1520. }
  1521. button:after {
  1522. border: none;
  1523. }
  1524. }
  1525. .sq-view {
  1526. padding: 60rpx 80rpx 80rpx 80rpx;
  1527. .text {
  1528. display: flex;
  1529. justify-content: center;
  1530. font-size: 32rpx;
  1531. font-weight: bold;
  1532. color: #1A1A1A;
  1533. margin-bottom: 60rpx;
  1534. }
  1535. .confirm {
  1536. display: flex;
  1537. justify-content: center;
  1538. color: white;
  1539. // margin: 40rpx auto;
  1540. background: #18254C;
  1541. border-radius: 20rpx;
  1542. }
  1543. }
  1544. .icon-text {
  1545. margin-left: 10px;
  1546. font-size: 26rpx;
  1547. font-weight: 500;
  1548. color: #323333;
  1549. }
  1550. /deep/.u-checkbox__icon-wrap.u-checkbox__icon-wrap--square {
  1551. border-color: #D7DEEB !important;
  1552. }
  1553. .wrap {
  1554. position: fixed;
  1555. top: 0;
  1556. width: 100%;
  1557. }
  1558. /deep/.mescroll-body {
  1559. min-height: 558px !important;
  1560. height: 558px !important;
  1561. background-color: green;
  1562. overflow: scroll !important;
  1563. }
  1564. .auth-btncard{
  1565. .btn-unok{
  1566. width: 50%;
  1567. float: left;
  1568. }
  1569. .btn-ok{
  1570. width: 50%;
  1571. float: left;
  1572. margin: 0;
  1573. padding: 0;
  1574. border: 0px solid transparent; //自定义边框
  1575. outline: none; //消除默认点击蓝色边框效果
  1576. u-button{
  1577. margin: 0;
  1578. padding: 0;
  1579. border: 0px solid transparent; //自定义边框
  1580. outline: none; //消除默认点击蓝色边框效果
  1581. }
  1582. }
  1583. }
  1584. .auth-card{
  1585. text-align: center;
  1586. .avatar-img{
  1587. width: 150rpx;
  1588. height: 150rpx;
  1589. overflow: hidden;
  1590. border-radius: 100%;
  1591. margin-top: 30rpx;
  1592. }
  1593. .title{
  1594. font-size: 20rpx;
  1595. }
  1596. .content{
  1597. margin-top: 10rpx;
  1598. margin-bottom: 30rpx;
  1599. }
  1600. }
  1601. .avatar-wrapper{
  1602. color: #333 !important;
  1603. border: none !important;
  1604. border-radius:0 !important;
  1605. background-color:transparent !important;
  1606. padding: 0;
  1607. }
  1608. .avatar-wrapper::after {
  1609. border: none !important;
  1610. }
  1611. .avatar{
  1612. width: 100rpx;
  1613. height: 100rpx;
  1614. overflow: hidden;
  1615. border-radius: 100%;
  1616. }
  1617. </style>