index.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763
  1. <template>
  2. <view class="container column hb">
  3. <view class="headbox">
  4. <view style="padding: 10px 10px 0 10px;" class="mb20">
  5. <view>
  6. <u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe"
  7. activeColor="#1677ff" :fontSize="15" :bold="false" @change="sectionChange"></u-subsection>
  8. </view>
  9. <!-- <view style="width: 70%;">
  10. <u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe" activeColor="#1677ff"
  11. :fontSize="15" :bold="false" @change="sectionChange" ></u-subsection>
  12. </view> -->
  13. <view style="margin-top: 10px;" class="justify-between align-center">
  14. <u-search placeholder="搜索微信名称、手机、标签" v-model="keyword" :showAction="false" height="30px"
  15. @search='searchKeyword'></u-search>
  16. <view v-if="current==1" class="fs24 ml20" @click="blackSel()">{{!isShowSelectAll?'批量管理':'取消批量'}}
  17. </view>
  18. </view>
  19. <view class="x-bc" v-if="current==0">
  20. <u-tabs :list="list2" :current='currentType' :lineWidth="40" lineColor="#1677ff"
  21. :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTypeTab"></u-tabs>
  22. <view class="participate-order x-f">
  23. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/order_icon2.png"
  24. mode="aspectFill" v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
  25. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/order_icon.png"
  26. mode="aspectFill" v-else></image>
  27. <picker @change="bindPickerChange" :value="searchTypeIndex" :range="typeArray">
  28. {{typeoption[searchTypeIndex]}}
  29. </picker>
  30. </view>
  31. </view>
  32. <view class="tagbox x-bc" v-if="current==0">
  33. <view class="tagbox-left x-f">
  34. <!-- <view class="x-f" @click="openPop('search')">{{array[queryParam.typeIndex].name}}<u-icon name="arrow-down-fill" color="#2979ff" size="11" style="margin: 0 3px;"></u-icon></view> -->
  35. <view v-if="showCompanytag.length<=0" style="color: #888;" class="ml30">请点击筛选,选择标签</view>
  36. <view class="tagbox-list x-f">
  37. <view class="tagbox-item x-f" v-for="(item,index) in showCompanytag" :key='item.tagId'
  38. :class="item.checked?'checked-bg':''">
  39. {{item.tagName}}
  40. </view>
  41. </view>
  42. </view>
  43. <view class="tagbox-right x-f" @click="openPop('tag')">筛选<u-icon name="arrow-down" color="#1677ff"
  44. size="12"></u-icon></view>
  45. </view>
  46. </view>
  47. <view v-if="current==0">
  48. <dropdownPanel :filterData='filterData' @onClick="getactNav" :itemname='itemname' @onChange="onChange"
  49. @confirm="confirm" @reset="reset" :ispopshow='ispopshow' :top="tops">
  50. <view v-if="filterData[searchbarNav].type == 'userStatus'">
  51. <view class="boxnav x-bc">
  52. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
  53. :key="index">
  54. <view class="boxnav-item-info one-t"
  55. :class="userStatusIndex == index ? 'boxnav-active':''"
  56. @click="handleParamItem('userStatus',index,item.id)">{{item.label}}</view>
  57. </view>
  58. </view>
  59. </view>
  60. <view v-if="filterData[searchbarNav].type == 'registerTime'">
  61. <view class="boxnav x-bc ">
  62. <view class="boxnav-item" style="width: 25%;"
  63. v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  64. <view class="boxnav-item-info one-t"
  65. :class="registerTimeIndex == index ? 'boxnav-active':''"
  66. @click="handleParamItem('registerTime',index)">{{item.label}}</view>
  67. </view>
  68. <view class="boxnav-item x-ac" style="width: 100%;" v-show="registerTimeIndex == 4">
  69. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  70. <u-icon name="calendar" color="#999"
  71. size="20"></u-icon>{{queryParam.startTime || '选择日期'}}
  72. </view>
  73. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  74. <u-icon name="calendar" color="#999"
  75. size="20"></u-icon>{{queryParam.endTime || '选择日期'}}
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view v-if="filterData[searchbarNav].type == 'watchStatus'">
  81. <view class="boxnav x-bc">
  82. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
  83. :key="index">
  84. <view class="boxnav-item-info one-t"
  85. :class="watchStatusIndex == index ? 'boxnav-active':''"
  86. @click="handleParamItem('watchStatus',index)">{{item.label}}</view>
  87. </view>
  88. </view>
  89. </view>
  90. <view v-if="filterData[searchbarNav].type == 'courseStatus'">
  91. <view class="boxnav x-bc">
  92. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
  93. :key="index">
  94. <view class="boxnav-item-info one-t"
  95. :class="courseStatusIndex == index ? 'boxnav-active':''"
  96. @click="handleParamItem('courseStatus',index)">{{item.label}}</view>
  97. </view>
  98. </view>
  99. </view>
  100. </dropdownPanel>
  101. </view>
  102. </view>
  103. <uni-calendar ref="calendar" :clear-date="true" :date="date" :insert="false" :lunar="false"
  104. :startDate="$u.timeFormat(new Date().getTime() - (3600 * 24 * 365 * 1000), 'yyyy-mm-dd')" :range='true'
  105. @confirm="confirmCalendar" :endDate="$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')" />
  106. <!-- 搜索选择弹窗/标签筛选 -->
  107. <u-popup :show="showPop" :round="12" @close="closePop" class="model" :zIndex="10076" style="flex: 0;">
  108. <view class="popbox">
  109. <view class="popbox-head">
  110. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24" @click="closePop"></u-icon>
  111. {{popTitle}}
  112. </view>
  113. <view class="popbox-body">
  114. <view class="radiobox" v-show="popTitle == '搜索选择'">
  115. <label class="radiobox-item x-bc mbline" v-for="(item, index) in array" :key="item.value"
  116. @click="bindTypeChange(index)">
  117. <view>{{item.name}}</view>
  118. <radio :value="item.value" :checked="index === typeIndex" style="transform:scale(0.75)" />
  119. </label>
  120. </view>
  121. <!-- <input placeholder="请输入标签 多个标签用 , 隔开" /> -->
  122. <view class="mb20" v-if="current==0">
  123. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagkeywords" :showAction="false"
  124. height="30px" @search='getcompanyTag'></u-search>
  125. </view>
  126. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  127. :refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)"
  128. @refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
  129. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
  130. @scrolltolower="reachBottoms">
  131. <view class="tagbox-list x-f">
  132. <view class="tagbox-item x-f tag-active" v-if="companytag.length<=0">暂无标签</view>
  133. <view class="mlr10 mb10" v-for="(item,index) in companytag" :key='item.tagId'>
  134. <u-tag :text="item.tagName" :plain="!item.checked" :name="index"
  135. @click="chooseTag(index)"></u-tag>
  136. </view>
  137. </view>
  138. <view class="center fs24 mt20">
  139. <text class="mr20" @click="getTagpage('last')">上一页</text>
  140. <text class="base-color-red">{{pagetag.pageNum}}/{{pagetag.pages}}</text>
  141. <text class="ml20" @click="getTagpage('next')">下一页</text>
  142. </view>
  143. </scroll-view>
  144. </view>
  145. <view class="popbox-footer x-bc">
  146. <button class="popbox-footer-btn" @click="resetPop" v-show="popTitle == '标签筛选'">重置</button>
  147. <button class="popbox-footer-btn" @click="closePop" v-show="popTitle == '搜索选择'">取消</button>
  148. <button class="popbox-footer-btn con-btn" @click="confirmPop">确定</button>
  149. </view>
  150. </view>
  151. </u-popup>
  152. <view class="userbox column hb hidden ">
  153. <!-- <mescroll-body bottom="0" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback"> -->
  154. <view class="userlist column hb hidden">
  155. <vipUserItem :viplist='userList' :isShowSelectAll="isShowSelectAll" @changeItem="changeItem"
  156. @getuserId='singleChange' @getlableId='singleChangeLable' @change='changesinglevip'
  157. @getuserIds='singleDelete' @pullDownRefresh="getfsuserListdata('refresh')"
  158. @changelistname="getfsuserListdata('more')" @reachBottom="getfsuserListdata('more')"
  159. @changePageOptions="e=>pageOptions=e" :pageOptions="pageOptions" :status="status"
  160. @changeStatus="e=>status=e" class="pb2 hb" />
  161. <view class="justify-between base-bg-f foot-select" v-if="isShowSelectAll">
  162. <view class="align-center justify-between" v-if="isShowSelectAll">
  163. <u-checkbox-group @change="selectAll">
  164. <u-checkbox :checked="isSelectAll" shape="circle" activeColor="#FF6C47" :name="true"
  165. label="全选" labelColor="#333" /><text class="fs24 base-color-9 ml12">已选 {{selectedCount}}
  166. 个</text>
  167. </u-checkbox-group>
  168. </view>
  169. <view class="justify-center ">
  170. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeProhibit"
  171. v-if="current==0">禁用</button>
  172. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeblack"
  173. v-else>取消禁用</button>
  174. <button class="base-bg-blue radius100 colorf h62 fs28 lh62" @click="changetagall"
  175. v-if="current==0">改标签</button>
  176. <!-- <button class="base-bg-f radius100 base-color-red h62 ml10 fs28 lh60"
  177. style="border: #ef4c50 solid 2rpx;"
  178. @click="changevipuser" v-if="current==0">更换归属</button> -->
  179. </view>
  180. </view>
  181. </view>
  182. <!-- </mescroll-body> -->
  183. </view>
  184. <!-- <u-picker :show="showTagSelect" :columns="companytag" keyName="tag" @cancel='showTagSelect=false'
  185. @confirm='singleChangeLable' ></u-picker> -->
  186. <u-popup :show="showTagSelect" @close='closetagselect' :closeOnClickOverlay='true' mode="bottom"
  187. style="z-index: 999;">
  188. <view class=" w100 bgf">
  189. <view class="plr28 ptb16 justify-between" style="flex-direction: row-reverse">
  190. <u-icon class="" name="close-circle" color="#ccc" size="24" @click="closetagselect"></u-icon>
  191. </view>
  192. <view class="mb20">
  193. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagchangekeywords" :showAction="false"
  194. height="30px" @search='getcompanyTags'></u-search>
  195. </view>
  196. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  197. :refresher-triggered="triggeredsA" refresher-background="rgba(0,0,0,0)"
  198. @refresherrefresh="pullDownRefreshsA" @refresherrestore="triggeredsA = false" :upper-threshold="100"
  199. :lower-threshold="100" @refresherabort="triggeredsA = false">
  200. <view class="justify-start p32 wrap">
  201. <view class="mlr10 mt10 " v-for="(item,index) in changetag" :key='item.tagId'>
  202. <u-tag :text="item.tag" :plain="!item.checked" :name="index"
  203. @click="choosechangeTag"></u-tag>
  204. </view>
  205. </view>
  206. <view class="center fs24 mt20">
  207. <text class="mr20" @click="getTagpageS('last')">上一页</text>
  208. <text class="base-color-red">{{pagetagA.pageNum}}/{{pagetagA.pages}}</text>
  209. <text class="ml20" @click="getTagpageS('next')">下一页</text>
  210. </view>
  211. </scroll-view>
  212. <view class="justify-between p32 " :class="isShowSelectAll?'pb120':''">
  213. <view class="changetagbtn base-bg-f8" @click="showTagSelect=!showTagSelect">取消</view>
  214. <view class="changetagbtn colorf base-bg-blue" @click="suretagchangeAll">确定</view>
  215. </view>
  216. </view>
  217. </u-popup>
  218. <view class="invite-member" :style="{right:vipInviteshow?'-72rpx':'20rpx'}">
  219. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/invite-member-icon.png"
  220. mode="aspectFill" @click="vipInvite" style="position: relative;" class="intimg"> </image>
  221. <image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/tc_close_icon.png'
  222. class="falseimg" @click="showinimg"></image>
  223. </view>
  224. <!-- 邀请弹窗 -->
  225. <u-popup :show="invitePop" :round="12" @close="invitePop = false" :zIndex="10074" style="flex: 0;">
  226. <view class="popbox">
  227. <view class="popbox-head">
  228. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24"
  229. @click="invitePop = false"></u-icon>
  230. 分享方式
  231. </view>
  232. <view class="popbox-body">
  233. <view class="choosetitle x-bc">
  234. <view>选择标签</view>
  235. <view v-if="sharetaglist" style="color:#1677ff" @click="addtag(0)">{{zhanshitag}}</view>
  236. <view class="x-f" style="color:#1677ff;" v-else @click="addtag(0)">
  237. <u-icon name="plus" color="#1677ff" size="14" style="margin-right: 5px;"></u-icon>添加标签
  238. </view>
  239. </view>
  240. <view class="invitetip">选择标签,当会员注册成功后,即可自动打标签</view>
  241. <!-- <view class="tagbox-list x-f" style="margin-top: 10px;margin-left: 0px;">
  242. <view class="tagbox-item x-f" @click="chooseTag">未打标签</view>
  243. <view class="tagbox-item x-f tag-active">未打标签</view>
  244. </view> -->
  245. <!--#ifdef MP-WEIXIN-->
  246. <view class="justify-center" style="margin-top: 10px;">
  247. <!--#endif-->
  248. <!--#ifdef H5-->
  249. <view class="justify-center" style="margin-top: 10px;">
  250. <!--#endif-->
  251. <!-- <view class="x-bc " style="margin-top: 30px;"> -->
  252. <!--#ifdef MP-WEIXIN-->
  253. <view class="sharePop-item y-f " style="text-align: center;">
  254. <!--#endif-->
  255. <!--#ifdef H5-->
  256. <view class="sharePop-item y-f card-share" @click="shareimg"
  257. style="text-align: center;">
  258. <!--#endif-->
  259. <image
  260. src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/card_icon.png"
  261. mode="aspectFill" style="width: 80rpx; height: 80rpx;margin-top: 20rpx;">
  262. </image>
  263. <view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
  264. <view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
  265. <!-- #ifdef MP-WEIXIN -->
  266. <button open-type="share" class="share">分享卡片</button>
  267. <!-- #endif -->
  268. </view>
  269. <!--#ifdef H5-->
  270. <view class="sharePop-item y-f " @click="buildimg" style="text-align: center;">
  271. <image
  272. src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/poster_icon.png"
  273. mode="aspectFill"></image>
  274. <view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
  275. <view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
  276. </view>
  277. <view class="sharePop-item y-f " @click="copyLink" style="text-align: center;">
  278. <image
  279. src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/link_icon.png"
  280. mode="aspectFill"></image>
  281. <view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
  282. <view style="font-size: 12px;color: #888; ">生成链接一键复制</view>
  283. </view>
  284. <!--#endif-->
  285. </view>
  286. </view>
  287. </view>
  288. </u-popup>
  289. <!-- 设置链接有效时长弹窗 -->
  290. <u-modal :show="setTimeShow" content='content' class="model" @confirm="confirmTime">
  291. <view class="setTimebox">
  292. <view class="timetip">不传默认以系统参数为准</view>
  293. <view class="x-f">
  294. <text style="margin-right: 20px;">链接有效时长(分钟)</text>
  295. <u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time" maxlength="5"></u-input>
  296. </view>
  297. </view>
  298. </u-modal>
  299. <!-- 长按保存海报 -->
  300. <u-popup :show="setImg" @close="closeimg" :round="12">
  301. <view class="w100 h500 center">
  302. <image :src="codeLink.url" mode="aspectFill"></image>
  303. </view>
  304. <view class="justify-around mb40">
  305. <view class="column justify-center align-center" @click="downimg">
  306. <image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/downicon.png'
  307. class="w80 h80"></image>
  308. <view class="mt10">长按图片保存</view>
  309. </view>
  310. </view>
  311. </u-popup>
  312. <!-- 卡片分享引导 -->
  313. <u-overlay :show="showzhidao" @click="showzhidao = false" style="z-index: 9999;">
  314. <view class="point-box">
  315. <view class="imgshe">
  316. <image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/point.png'
  317. class="w300 h300"></image>
  318. </view>
  319. <view class="column colorf fs32 xu-box fs40
  320. align-center justify-center">
  321. <view class="justify-center">点击右上角
  322. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/wxmore.png"
  323. class="w50 h50 mlr10"></image>
  324. </view>
  325. <view class="mt20">选择 “转发给朋友”</view>
  326. <view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
  327. </view>
  328. </view>
  329. </u-overlay>
  330. <!-- 更改归属 -->
  331. <u-picker :show="showcol" :columns="columns" @cancel='showcol=!showcol' @confirm='receiveA'
  332. keyName="nickName"></u-picker>
  333. </view>
  334. </template>
  335. <script>
  336. import {
  337. getfsuserList,
  338. getcompanyTaglist,
  339. Addblacklist,
  340. changeLable,
  341. getvipNum,
  342. changevipUser,
  343. getgroupList,
  344. becomeVipuser,
  345. becomeVipuserImg,
  346. getSDK,
  347. getusersales,
  348. removebalcklist,
  349. getallTags
  350. } from "@/api/courseManage.js";
  351. import vipUserItem from "@/components/vipUserItem.vue"
  352. import dropdownPanel from "@/components/dropdownPanel.vue"
  353. import wx from 'weixin-js-sdk'
  354. export default {
  355. components: {
  356. vipUserItem,
  357. dropdownPanel,
  358. },
  359. data() {
  360. return {
  361. showcol: false,
  362. setImg: false,
  363. columns: [],
  364. showTagSelect: false,
  365. list: [{
  366. name: '会员(0)',
  367. }, {
  368. name: '小黑屋(0)'
  369. }],
  370. userList: [],
  371. current: 0,
  372. keyword: "",
  373. companytag: [],
  374. showCompanytag: [],
  375. selectedList: [], //已经选中标签列表
  376. list2: [{
  377. name: '全部',
  378. }, {
  379. name: '今日新增',
  380. }, {
  381. name: '今日完播'
  382. }, {
  383. name: '未看过课'
  384. }],
  385. currentType: 0,
  386. activeStyle: {
  387. color: '#1677ff',
  388. fontSize: '14px',
  389. fontWeight: 'bold'
  390. },
  391. inactiveStyle: {
  392. fontSize: '14px'
  393. },
  394. searchTypeIndex: 0,
  395. typeArray: ['连续缺课天数多到少', '连续缺课天数少到多', '按注册时间晚到早', '会员姓名0-9-A-Z'],
  396. typeoption: ['连续缺课', '连续缺课', '注册时间', '会员姓名'],
  397. array: [{
  398. value: '0',
  399. name: '关联搜索',
  400. },
  401. {
  402. value: '1',
  403. name: '精准搜索'
  404. }
  405. ],
  406. typeIndex: 0,
  407. popTitle: '搜索选择',
  408. showPop: false,
  409. filterData: [{
  410. name: '销售',
  411. value: 0,
  412. type: 'userStatus',
  413. option: [{
  414. label: '全部',
  415. id: ''
  416. }, ]
  417. },
  418. {
  419. name: '注册',
  420. value: 1,
  421. type: 'registerTime',
  422. option: [{
  423. label: '全部',
  424. }, {
  425. label: '今天',
  426. }, {
  427. label: '昨天',
  428. }, {
  429. label: '近7天',
  430. }, {
  431. label: '自定义',
  432. }]
  433. }, {
  434. name: '看课',
  435. value: 2,
  436. type: 'watchStatus',
  437. option: [{
  438. label: '全部',
  439. }, {
  440. label: '未看过课',
  441. }, {
  442. label: '正常看课',
  443. }, {
  444. label: '停止看课',
  445. }]
  446. },
  447. {
  448. name: '缺课',
  449. value: 3,
  450. type: 'courseStatus',
  451. option: [{
  452. label: '全部',
  453. }, {
  454. label: '已缺课',
  455. }, {
  456. label: '未缺课',
  457. }]
  458. },
  459. {
  460. name: '批量',
  461. value: 4,
  462. type: 'piliang',
  463. special: true,
  464. stopPrevent: true
  465. }
  466. ],
  467. searchbarNav: 0,
  468. userStatusIndex: 0,
  469. registerTimeIndex: 0,
  470. watchStatusIndex: 0,
  471. courseStatusIndex: 0,
  472. showCalendar: false,
  473. date: '',
  474. mode: 'range',
  475. queryParam: {
  476. typeIndex: 0,
  477. startTime: '',
  478. endTime: ''
  479. },
  480. mescroll: null,
  481. downOption: {
  482. use: true,
  483. auto: false
  484. },
  485. upOption: {
  486. onScroll: false,
  487. use: true, // 是否启用上拉加载; 默认true
  488. auto: true,
  489. page: {
  490. pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  491. size: 10 // 每页数据的数量,默认10
  492. },
  493. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  494. textNoMore: "已经到底了",
  495. empty: {
  496. icon: 'https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png',
  497. tip: '暂无数据'
  498. }
  499. },
  500. dataList: [],
  501. invitePop: false,
  502. setTimeShow: false,
  503. time: "",
  504. user: {},
  505. idx: [],
  506. todayday: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
  507. startTime: '',
  508. endTime: '',
  509. isShowSelectAll: false, //是否显示全选
  510. isSelectAll: false, //是否全选
  511. ispopshow: false,
  512. selectidAll: [],
  513. changetag: [],
  514. selectidtag: '',
  515. itemname: '',
  516. userid: '',
  517. groupid: [],
  518. pageOptions: {
  519. pageNum: 1,
  520. pageSize: 8,
  521. },
  522. status: 'loadmore',
  523. sharetag: 1,
  524. sharetaglist: [],
  525. codeLink: [],
  526. zhanshitag: '',
  527. copyLinks: '',
  528. showzhidao: false,
  529. imgs: 'https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/fs/20250416/1744811256845.png',
  530. currentIsBlack: false,
  531. tagpageNum: 1,
  532. tagpageSize: 16,
  533. triggereds: false,
  534. statusA: 'loadmore',
  535. isEnableds: true,
  536. pagetag: [],
  537. tagkeywords: '',
  538. salesid: '',
  539. tagchangekeywords: '',
  540. tagpageNums: 1,
  541. tagpageSizes: 16,
  542. triggeredsA: false,
  543. statusAs: 'loadmore',
  544. isEnabledsA: true,
  545. pagetagA: [],
  546. tops: '464rpx',
  547. showInvite: false,
  548. vipInviteshow: false
  549. }
  550. },
  551. onLoad() {
  552. // #ifdef MP-WEIXIN
  553. uni.showShareMenu({
  554. withShareTicket: true,
  555. menus: ['shareAppMessage']
  556. });
  557. // #endif
  558. },
  559. onShow() {
  560. // #ifdef H5
  561. this.getjssdklist()
  562. // #endif
  563. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
  564. this.getcompanyTag()
  565. this.getvipListnum()
  566. this.getsalelist()
  567. this.userList = []
  568. this.getfsuserListdata()
  569. },
  570. // 这个是分享聊天
  571. onShareAppMessage() {
  572. return {
  573. title: this.user.userName + '邀请您成为会员!',
  574. path: '/pages/user/users/becomeVIP?companyId=' +
  575. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
  576. imageUrl: this.imgs,
  577. }
  578. },
  579. // 这是朋友圈
  580. onShareTimeline() {
  581. },
  582. mounted() {
  583. },
  584. computed: {
  585. selectedCount() {
  586. return this.userList.filter(item => item.checked).length;
  587. },
  588. },
  589. methods: {
  590. changetagall() {
  591. this.showTagSelect = !this.showTagSelect
  592. this.tagchangekeywords = ''
  593. this.selectidtag = ''
  594. this.showInvite = false
  595. this.sharetag = 1
  596. this.getalltagtaglist()
  597. },
  598. getTagpageS(type) {
  599. if (type == 'last') {
  600. if (this.tagpageNums >= 2) {
  601. this.tagpageNums--
  602. this.getalltagtaglist()
  603. } else {
  604. uni.showToast({
  605. title: '已经是第一页',
  606. icon: 'none',
  607. duration: 1000
  608. });
  609. }
  610. } else {
  611. if (this.tagpageNums < this.pagetagA.pages) {
  612. this.tagpageNums++
  613. this.getalltagtaglist()
  614. } else {
  615. uni.showToast({
  616. title: '已经是最后一页',
  617. icon: 'none',
  618. duration: 1000
  619. });
  620. }
  621. }
  622. },
  623. getcompanyTags(value) {
  624. this.tagchangekeywords = value
  625. this.getalltagtaglist()
  626. },
  627. singleDelete(data) {
  628. this.pageOptions.pageNum = 1
  629. this.$emit('update:parentValue', '新值');
  630. this.userList = []
  631. this.selectidAll[0] = data
  632. this.changeblack()
  633. },
  634. changeblack() {
  635. // console.log(this.selectidAll[0])
  636. //取消禁用
  637. if (this.selectidAll.length < 1) {
  638. uni.showToast({
  639. icon: 'none',
  640. title: '所选列表为空'
  641. })
  642. return
  643. }
  644. removebalcklist(this.selectidAll).then(res => {
  645. if (res.code == 200) {
  646. this.pageOptions.pageNum = 1
  647. // console.log(this.pageOptions.pageNum)
  648. this.getfsuserListdata()
  649. // 创建一个在**秒后执行的定时器
  650. const timer = setTimeout(function() {
  651. uni.showToast({
  652. icon: 'none',
  653. title: '取消禁用成功'
  654. })
  655. }, 200);
  656. this.getvipListnum()
  657. this.isShowSelectAll = false
  658. } else {
  659. uni.showToast({
  660. icon: 'none',
  661. title: res.msg
  662. })
  663. }
  664. })
  665. },
  666. blackSel() {
  667. this.isShowSelectAll = !this.isShowSelectAll
  668. // if (data.value == 4) {
  669. // this.itemname = data.name
  670. // this.isShowSelectAll = !this.isShowSelectAll
  671. // } else {
  672. // this.isShowSelectAll = false
  673. // }
  674. },
  675. getsalelist() {
  676. const oldlist = this.filterData[0].option
  677. getusersales().then(res => {
  678. if (res.code == 200) {
  679. const list = res.data
  680. this.filterData[0].option = oldlist.concat(list.map(item => {
  681. return {
  682. id: item.userId,
  683. label: item.nickName
  684. };
  685. }));
  686. } else {
  687. uni.showToast({
  688. title: res.msg,
  689. icon: 'none',
  690. });
  691. }
  692. })
  693. },
  694. getTagpage(type) {
  695. if (type == 'last') {
  696. if (this.tagpageNum >= 2) {
  697. this.tagpageNum--
  698. this.getcompanyTag()
  699. } else {
  700. uni.showToast({
  701. title: '已经是第一页',
  702. icon: 'none',
  703. duration: 1000
  704. });
  705. }
  706. } else {
  707. if (this.tagpageNum < this.pagetag.pages) {
  708. this.tagpageNum++
  709. this.getcompanyTag()
  710. } else {
  711. uni.showToast({
  712. title: '已经是最后一页',
  713. icon: 'none',
  714. duration: 1000
  715. });
  716. }
  717. }
  718. },
  719. //标签展示下拉
  720. pullDownRefreshs() {
  721. // 下拉
  722. this.triggereds = true; //下拉了状态为true
  723. setTimeout(() => {
  724. this.triggereds = false;
  725. uni.stopPullDownRefresh()
  726. this.tagpageNum = 1;
  727. this.getcompanyTag('refresh') //触底 不穿执行else
  728. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  729. // 请求接口
  730. }, 1000)
  731. },
  732. getjssdklist() {
  733. const param = {
  734. url: window.location.href
  735. }
  736. getSDK(param).then(res => {
  737. wx.config({
  738. appId: res.data.appId, // 必填,公众号的唯一标识
  739. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  740. nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  741. signature: res.data.signature, // 必填,签名
  742. jsApiList: ["updateAppMessageShareData"] // 必填,需要使用的JS接口列表
  743. });
  744. })
  745. },
  746. shareimg() {
  747. //分享好友
  748. this.getlink()
  749. let self = this
  750. // 配置--你到时候把配置全局 --就是这些东西 调接口拿
  751. wx.ready(function() { //需在用户可能点击分享按钮前就先调用
  752. wx.updateAppMessageShareData({
  753. title: self.user.userName + "邀请您成为会员", // 分享标题
  754. desc: self.user.deptName, // 分享描述
  755. link: self.copyLinks,
  756. imgUrl: self.codeLink.url || self.imgs, // 分享图标
  757. success: function(res) {
  758. self.showzhidao = true
  759. self.setImg = false
  760. self.showShare = false
  761. // 设置成功
  762. uni.showToast({
  763. title: '卡片已生成',
  764. icon: 'none',
  765. duration: 1000
  766. });
  767. },
  768. fail: function(err) {
  769. console.log(err);
  770. uni.showToast({
  771. title: '卡片生成失败,请重试',
  772. icon: 'none',
  773. duration: 2000
  774. })
  775. }
  776. })
  777. });
  778. },
  779. downimg() {},
  780. closeimg() {
  781. this.setImg = false
  782. this.invitePop = false
  783. },
  784. buildimg() {
  785. this.setImg = !this.setImg
  786. this.getshareimg()
  787. },
  788. addtag(add) {
  789. this.sharetag = add
  790. this.showTagSelect = !this.showTagSelect
  791. this.invitePop = !this.invitePop
  792. this.showInvite = true
  793. this.getalltagtaglist()
  794. },
  795. changevipuser() {
  796. this.showcol = !this.showcol
  797. this.getgrouplist()
  798. },
  799. getgrouplist() {
  800. //获取群管列表
  801. getgroupList().then(res => {
  802. if (res.code == 200) {
  803. this.columns = [res.data]
  804. // console.log(this.columns)
  805. } else {
  806. uni.showToast({
  807. icon: 'none',
  808. title: res.msg
  809. })
  810. }
  811. })
  812. },
  813. changeall() {
  814. //更换全部会员
  815. console.log(1)
  816. const param = {
  817. companyId: this.user.companyId,
  818. companyUserId: this.userid,
  819. userId: this.groupid
  820. }
  821. changevipUser(param).then(res => {
  822. if (res.code == 200) {
  823. uni.showToast({
  824. icon: 'none',
  825. title: '更换会员归属成功'
  826. })
  827. } else {
  828. uni.showToast({
  829. icon: 'none',
  830. title: res.msg
  831. })
  832. }
  833. })
  834. },
  835. receiveA(e) {
  836. console.log(e)
  837. this.userid = e.value[0].userId
  838. if (this.isShowSelectAll == true) {
  839. this.groupid = this.selectidAll
  840. this.changeall()
  841. this.showcol = !this.showcol
  842. setTimeout(() => {
  843. this.getfsuserListdata()
  844. }, 200)
  845. } else {
  846. this.changeall()
  847. this.showcol = !this.showcol
  848. this.getfsuserListdata()
  849. }
  850. this.isSelectAll = false
  851. },
  852. getvipListnum() {
  853. getvipNum().then(res => {
  854. if (res.code == 200) {
  855. this.list[0].name = "会员" + '(' + res.data.number + ')'
  856. this.list[1].name = "小黑屋" + '(' + res.data.blackNum + ')'
  857. } else {
  858. uni.showToast({
  859. icon: 'none',
  860. title: res.msg
  861. })
  862. }
  863. })
  864. },
  865. getactNav(data) {
  866. if (data.value == 4) {
  867. this.itemname = data.name
  868. this.isShowSelectAll = !this.isShowSelectAll
  869. } else {
  870. this.isShowSelectAll = false
  871. }
  872. },
  873. closetagselect() {
  874. this.showTagSelect = !this.showTagSelect
  875. },
  876. suretagchangeAll() {
  877. if (this.sharetag == 0) {
  878. this.sharetaglist = this.changetag.filter(item => item.checked).map(v => v.tagId).join(',')
  879. this.showTagSelect = !this.showTagSelect
  880. this.zhanshitag = this.changetag.filter(item => item.checked).map(v => v.tag).join(',')
  881. // console.log(this.sharetaglist)
  882. } else {
  883. //多选改标签确认按钮
  884. this.showTagSelect = !this.showTagSelect
  885. if (this.selectidAll.length == 0) {
  886. uni.showToast({
  887. icon: 'none',
  888. title: '未选中用户'
  889. })
  890. return
  891. }
  892. this.selectidtag = this.changetag.filter(item => item.checked).map(v => v.tagId)
  893. this.changeLabelmore()
  894. }
  895. if (this.showInvite) {
  896. this.invitePop = true
  897. }
  898. },
  899. singleChangeLable(data) {
  900. this.showTagSelect = !this.showTagSelect
  901. this.selectidAll[0] = data
  902. this.tagchangekeywords = ''
  903. this.selectidtag = []
  904. this.sharetag = 1
  905. this.showInvite = false
  906. this.getalltagtaglist()
  907. },
  908. getalltagtaglist(type) {
  909. //获取公司标签列表
  910. const data = {
  911. pageNum: this.tagpageNums,
  912. pageSize: this.tagpageSizes,
  913. keyword: this.tagchangekeywords
  914. }
  915. getallTags(data).then(res => {
  916. if (res.code == 200) {
  917. const dataList = res.data.list.map(item => {
  918. return {
  919. ...item,
  920. checked: false,
  921. }
  922. })
  923. if (type == 'refresh') {
  924. this.changetag = dataList
  925. } else {
  926. this.changetag = dataList
  927. }
  928. if (res.data.isLastPage) {
  929. this.statusAs = 'nomore'
  930. } else {
  931. this.statusAs = 'loadmore'
  932. }
  933. this.pagetagA = res.data
  934. } else {
  935. uni.showToast({
  936. icon: 'none',
  937. title: res.msg
  938. })
  939. }
  940. })
  941. },
  942. changesinglevip(data) {
  943. this.showcol = !this.showcol
  944. // console.log(data)
  945. this.groupid[0] = data
  946. this.getgrouplist()
  947. },
  948. changeLabelmore() {
  949. //改标签选择按钮
  950. const params = {
  951. tagIds: this.selectidtag,
  952. fsUserIds: this.selectidAll
  953. }
  954. changeLable(params).then(res => {
  955. if (res.code == 200) {
  956. this.userList = []
  957. this.getfsuserListdata()
  958. const timer = setTimeout(function() {
  959. uni.showToast({
  960. icon: 'none',
  961. title: '标签更改成功'
  962. })
  963. }, 500);
  964. } else {
  965. uni.showToast({
  966. icon: 'none',
  967. title: res.msg
  968. })
  969. }
  970. })
  971. },
  972. changeOwnership() {
  973. //更换归属(经销商功能)
  974. },
  975. getcompanyTag(type) {
  976. this.companytag = []
  977. this.tagkeywords = this.tagkeywords.replace(/,/g, ',')
  978. const data = {
  979. pageNum: this.tagpageNum,
  980. pageSize: this.tagpageSize,
  981. keyword: this.tagkeywords
  982. }
  983. getcompanyTaglist(data).then(res => {
  984. if (res.code == 200) {
  985. // this.showCompanytag = res.data.list
  986. const dataList = res.data.list.map(item => {
  987. return {
  988. ...item,
  989. checked: false,
  990. }
  991. })
  992. if (type == 'refresh') {
  993. this.companytag = dataList
  994. } else {
  995. this.companytag = [...this.companytag, ...dataList]
  996. }
  997. if (res.data.isLastPage) {
  998. this.statusA = 'nomore'
  999. } else {
  1000. this.statusA = 'loadmore'
  1001. }
  1002. this.pagetag = res.data
  1003. } else {
  1004. uni.showToast({
  1005. icon: 'none',
  1006. title: res.msg
  1007. })
  1008. }
  1009. })
  1010. },
  1011. getfsuserListdata(type) {
  1012. // this.userList=[]
  1013. const param = {
  1014. userId: this.user.userId,
  1015. tabValue: this.currentType,
  1016. registerStartTime: this.startTime, //注册开始
  1017. registerEndTime: this.endTime, //注册结束
  1018. watchCourseType: this.watchStatusIndex,
  1019. missCourseStatus: this.courseStatusIndex,
  1020. keyword: this.keyword,
  1021. tagIds: this.idx,
  1022. isBlack: this.currentIsBlack,
  1023. companyUserId: this.salesid,
  1024. continueMissCourseSort: this.searchTypeIndex,
  1025. ...this.pageOptions
  1026. }
  1027. getfsuserList(param).then(res => {
  1028. if (res.code == 200) {
  1029. let dataList = res.data.list.map(item => {
  1030. return {
  1031. ...item,
  1032. checked: false,
  1033. }
  1034. })
  1035. if (type == 'refresh') {
  1036. this.userList = dataList
  1037. } else {
  1038. this.userList = [...this.userList, ...dataList]
  1039. }
  1040. if (res.data.isLastPage) {
  1041. this.status = 'nomore'
  1042. } else {
  1043. this.status = 'loadmore'
  1044. }
  1045. } else {
  1046. uni.showToast({
  1047. icon: 'none',
  1048. title: res.msg
  1049. })
  1050. }
  1051. })
  1052. },
  1053. onChange(index) {
  1054. if (index == 4) return
  1055. this.searchbarNav = index
  1056. },
  1057. searchKeyword(value) {
  1058. this.keyword = value
  1059. this.getfsuserListdata()
  1060. },
  1061. singleChange(data) {
  1062. this.userList = []
  1063. this.selectidAll[0] = data
  1064. this.changeProhibit()
  1065. },
  1066. changeProhibit() {
  1067. //批量禁用选择按钮
  1068. if (this.selectidAll.length < 1) {
  1069. uni.showToast({
  1070. icon: 'none',
  1071. title: '所选列表为空'
  1072. })
  1073. return
  1074. }
  1075. Addblacklist(this.selectidAll).then(res => {
  1076. if (res.code == 200) {
  1077. this.pageOptions.pageNum = 1
  1078. this.getfsuserListdata()
  1079. // 创建一个在**秒后执行的定时器
  1080. const timer = setTimeout(function() {
  1081. uni.showToast({
  1082. icon: 'none',
  1083. title: '禁用成功'
  1084. })
  1085. }, 200);
  1086. this.getvipListnum()
  1087. this.isShowSelectAll = false
  1088. } else {
  1089. uni.showToast({
  1090. icon: 'none',
  1091. title: res.msg
  1092. })
  1093. }
  1094. })
  1095. },
  1096. // 全选
  1097. selectAll() {
  1098. // 先设置全选
  1099. this.isSelectAll = !this.isSelectAll
  1100. // 然后设置列表 checked没得this不会报错吗 这是返回新数组
  1101. console.log(this.isSelectAll)
  1102. this.userList = this.userList.map(item => {
  1103. // 每一项的 checked为 全选的状态
  1104. return {
  1105. ...item,
  1106. checked: this.isSelectAll
  1107. }
  1108. })
  1109. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userId)
  1110. console.log(this.isSelectAll)
  1111. },
  1112. // 单选 /反选
  1113. changeItem(i) {
  1114. let arr = {
  1115. ...this.userList[i],
  1116. checked: !this.userList[i].checked
  1117. }
  1118. this.$set(this.userList, i, arr)
  1119. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userId)
  1120. console.log(this.selectidAll)
  1121. this.isSelectAll = this.userList.every(item => item.checked)
  1122. if (this.isSelectAll) {
  1123. this.userList = this.userList.map(item => {
  1124. return {
  1125. ...item,
  1126. checked: this.isSelectAll
  1127. }
  1128. })
  1129. }
  1130. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userId)
  1131. },
  1132. reset() {
  1133. //重置时间选择等筛选
  1134. const type = this.filterData[this.searchbarNav].type
  1135. console.log(this.registerTimeIndex)
  1136. if (type == 'registerTime') {
  1137. this.registerTimeIndex = ''
  1138. this.endTime = ''
  1139. this.startTime = ''
  1140. this.getfsuserListdata()
  1141. // console.log(this.getfsuserListdata())
  1142. } else if (type == 'watchStatus') {
  1143. this.watchStatusIndex = 0
  1144. this.getfsuserListdata()
  1145. } else if (type == 'userStatus') {
  1146. this.userStatusIndex = 0
  1147. this.salesid = ''
  1148. this.getfsuserListdata()
  1149. } else if (type == 'courseStatus') {
  1150. this.courseStatusIndex = 0
  1151. this.getfsuserListdata()
  1152. } else {
  1153. }
  1154. },
  1155. confirm(e) {
  1156. this.pageOptions.pageNum = 1
  1157. this.userList = []
  1158. const type = this.filterData[this.searchbarNav].type
  1159. const value = this.registerTimeIndex
  1160. if (type == 'registerTime') {
  1161. if (value == 0) {
  1162. this.startTime = ''
  1163. this.endTime = ''
  1164. this.getfsuserListdata()
  1165. } else if (value == 1) {
  1166. this.startTime = this.todayday + ' 00:00:00'
  1167. this.endTime = this.todayday + ' 23:59:59'
  1168. this.getfsuserListdata()
  1169. } else if (value == 2) {
  1170. let yesterday = new Date();
  1171. yesterday.setDate(yesterday.getDate() - 1);
  1172. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1173. this.endTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 23:59:59'
  1174. this.getfsuserListdata()
  1175. } else if (value == 3) {
  1176. let yesterday = new Date();
  1177. yesterday.setDate(yesterday.getDate() - 6);
  1178. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1179. this.endTime = this.todayday + ' 23:59:59'
  1180. this.getfsuserListdata()
  1181. } else {
  1182. this.getfsuserListdata()
  1183. }
  1184. } else if (type == 'watchStatus') {
  1185. // this.watchStatusIndex=value
  1186. this.getfsuserListdata()
  1187. // console.log(this.filterData)
  1188. } else if (type == 'userStatus') {
  1189. if (this.userStatusIndex == 0) {
  1190. this.salesid = ''
  1191. this.getfsuserListdata()
  1192. } else {
  1193. this.getfsuserListdata()
  1194. }
  1195. // console.log(this.userStatusIndex)
  1196. } else if (type == 'courseStatus') {
  1197. this.getfsuserListdata()
  1198. console.log(this.courseStatusIndex)
  1199. }
  1200. // this.mescroll.resetUpScroll()
  1201. },
  1202. handleParamItem(type, index, id) {
  1203. if (type == 'registerTime') {
  1204. this.registerTimeIndex = index
  1205. } else if (type == 'watchStatus') {
  1206. this.watchStatusIndex = index
  1207. // console.log('watchStatus',index)
  1208. } else if (type == 'userStatus') {
  1209. this.userStatusIndex = index
  1210. this.salesid = id
  1211. console.log(this.salesid)
  1212. } else if (type == 'courseStatus') {
  1213. this.courseStatusIndex = index
  1214. } else {
  1215. this.ispopshow = false
  1216. }
  1217. },
  1218. sectionChange(index) {
  1219. this.current = index;
  1220. this.currentType = 0
  1221. this.startTime = '' //注册开始
  1222. this.endTime = '' //注册结束
  1223. this.watchStatusIndex = 0
  1224. this.salesid = ''
  1225. this.courseStatusIndex = 0
  1226. this.keyword = ''
  1227. this.idx = []
  1228. this.pageOptions.pageNum = 1
  1229. this.isShowSelectAll = false
  1230. this.userList = []
  1231. if (index == 0) {
  1232. this.currentIsBlack = false
  1233. this.getfsuserListdata()
  1234. } else {
  1235. this.currentIsBlack = true
  1236. this.getfsuserListdata()
  1237. }
  1238. this.getvipListnum()
  1239. },
  1240. clickTypeTab(e) {
  1241. this.currentType = e.index
  1242. this.userList = []
  1243. // 在这里更新
  1244. this.pageOptions.pageNum = 1
  1245. this.getfsuserListdata()
  1246. },
  1247. bindPickerChange(e) {
  1248. console.log('picker发送选择改变,携带值为', e.detail.value)
  1249. this.userList = []
  1250. this.searchTypeIndex = e.detail.value
  1251. this.getfsuserListdata()
  1252. },
  1253. openPop(type) {
  1254. this.popTitle = type == 'search' ? '搜索选择' : type == 'tag' ? '标签筛选' : ''
  1255. this.typeIndex = this.queryParam.typeIndex
  1256. this.showPop = true
  1257. if (type == 'tag') {}
  1258. },
  1259. closePop() {
  1260. this.showPop = false
  1261. },
  1262. resetPop(i) {
  1263. this.idx = []
  1264. this.tagkeywords = ''
  1265. this.tagpageNum = 1
  1266. this.showCompanytag = []
  1267. this.companytag.forEach(tag => {
  1268. tag.checked = false; // 将所有标签的show属性重置为true
  1269. });
  1270. this.showPop = false
  1271. this.$nextTick(() => {
  1272. this.getcompanyTag()
  1273. this.getfsuserListdata()
  1274. })
  1275. },
  1276. closeCalendar() {
  1277. this.showCalendar = false
  1278. },
  1279. confirmCalendar(e) {
  1280. // this.startTime = e[0]
  1281. // this.endTime = e[e.length-1]
  1282. this.showCalendar = false
  1283. this.queryParam.startTime = e.range.after
  1284. this.queryParam.endTime = e.range.before
  1285. this.endTime = e.range.before + ' 23:59:59'
  1286. this.startTime = e.range.after + ' 00:00:00'
  1287. console.log(e)
  1288. // this.getCount()
  1289. },
  1290. bindTypeChange(i) {
  1291. this.typeIndex = i
  1292. },
  1293. confirmPop() {
  1294. this.queryParam.typeIndex = this.typeIndex
  1295. this.showPop = false
  1296. this.showCompanytag = this.companytag.filter(item => item.checked)
  1297. this.idx = this.showCompanytag.map(v => v.tagId)
  1298. //filtter(过滤) 筛选所有checked==true的 然后map返回每一项的id
  1299. if (this.idx.length == 0) {
  1300. this.showCompanytag = this.companytag
  1301. }
  1302. this.$nextTick(() => {
  1303. this.getfsuserListdata("refresh")
  1304. })
  1305. },
  1306. chooseTag(i) {
  1307. this.companytag[i].checked = !this.companytag[i].checked
  1308. },
  1309. choosechangeTag(i) {
  1310. this.changetag[i].checked = !this.changetag[i].checked
  1311. },
  1312. vipInvite() {
  1313. if (!this.vipInviteshow) {
  1314. this.invitePop = true
  1315. this.sharetaglist = null
  1316. this.getlink('preload')
  1317. this.getjssdklist()
  1318. } else {
  1319. this.vipInviteshow = false
  1320. }
  1321. },
  1322. showinimg() {
  1323. this.vipInviteshow = true
  1324. },
  1325. copyLink() {
  1326. this.setTimeShow = true
  1327. },
  1328. confirmTime() {
  1329. this.setTimeShow = false
  1330. this.showShare = false
  1331. console.log(this.showInvite)
  1332. this.getshareLink()
  1333. },
  1334. getshareimg() {
  1335. //生成海报
  1336. this.getlink()
  1337. this.codeLink = ''
  1338. uni.showLoading({
  1339. title: '正在生成中...'
  1340. })
  1341. const url = window.location.href.split('#')[0]
  1342. const param = {
  1343. companyId: this.user.companyId,
  1344. companyUserId: this.user.userId,
  1345. realLink: url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1346. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
  1347. tagIds: this.sharetaglist,
  1348. }
  1349. becomeVipuserImg(param).then(res => {
  1350. if (res.code == 200) {
  1351. this.codeLink = res.posterImage
  1352. console.log(res)
  1353. } else {
  1354. uni.showToast({
  1355. title: res.msg,
  1356. icon: 'none',
  1357. duration: 2000
  1358. });
  1359. }
  1360. })
  1361. },
  1362. getlink(type) {
  1363. //生成链接
  1364. const param = {
  1365. companyId: this.user.companyId,
  1366. companyUserId: this.user.userId,
  1367. tagids: this.sharetaglist,
  1368. limitTime: this.time
  1369. }
  1370. const url = window.location.href.split('#')[0]
  1371. // console.log(url)
  1372. this.copyLinks = url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1373. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  1374. },
  1375. getshareLink() {
  1376. //生成链接
  1377. this.copyLinks = []
  1378. const param = {
  1379. code: '',
  1380. companyId: this.user.companyId,
  1381. companyUserId: this.user.userId,
  1382. tagids: this.sharetaglist,
  1383. limitTime: this.time
  1384. }
  1385. const url = window.location.href.split('#')[0]
  1386. console.log(url)
  1387. this.copyLinks = url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1388. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  1389. console.log(this.copyLinks)
  1390. setTimeout(() => {
  1391. uni.setClipboardData({
  1392. data: String(this.copyLinks),
  1393. success: () => {
  1394. uni.showToast({
  1395. title: '复制成功',
  1396. icon: 'none',
  1397. duration: 2000
  1398. });
  1399. setTimeout(() => {
  1400. this.invitePop = false
  1401. }, 200)
  1402. },
  1403. })
  1404. }, 100)
  1405. },
  1406. mescrollInit(mescroll) {
  1407. this.mescroll = mescroll;
  1408. },
  1409. /*下拉刷新的回调 */
  1410. downCallback(mescroll) {
  1411. mescroll.resetUpScroll()
  1412. },
  1413. upCallback(page) {
  1414. //联网加载数据
  1415. var that = this;
  1416. var data = {
  1417. courseId: this.courseId,
  1418. status: '',
  1419. pageNum: page.num,
  1420. pageSize: page.size
  1421. };
  1422. uni.showLoading({
  1423. title: "加载中..."
  1424. })
  1425. },
  1426. }
  1427. }
  1428. </script>
  1429. <style lang="scss" scoped>
  1430. .card-share {
  1431. position: relative;
  1432. }
  1433. .share {
  1434. display: inline-block;
  1435. position: absolute;
  1436. bottom: 0;
  1437. left: 0;
  1438. width: 100%;
  1439. height: 50%;
  1440. opacity: 0;
  1441. }
  1442. .imgshe {
  1443. display: flex;
  1444. flex-direction: row-reverse
  1445. }
  1446. .point-box {
  1447. height: 100%;
  1448. width: 100%;
  1449. .xu-box {
  1450. border: #f5f5f5 4rpx dashed;
  1451. padding: 20rpx 20rpx;
  1452. }
  1453. }
  1454. .codeimg {
  1455. position: absolute;
  1456. z-index: 9999;
  1457. left: 40rpx;
  1458. top: 40rpx;
  1459. }
  1460. #codeurl {
  1461. position: relative;
  1462. }
  1463. .checked-bg {
  1464. border: 1px solid #1677ff !important;
  1465. color: #1677ff !important;
  1466. background-color: #e7f1fe !important;
  1467. }
  1468. .changetagbtn {
  1469. width: 45%;
  1470. height: 80rpx;
  1471. border-radius: 50rpx;
  1472. text-align: center;
  1473. line-height: 80rpx;
  1474. }
  1475. ::v-deep {
  1476. .foot-select {
  1477. width: 100%;
  1478. padding: 20rpx 20rpx;
  1479. z-index: 10000 !important;
  1480. position: fixed;
  1481. bottom: 0;
  1482. margin-left: -24rpx !important;
  1483. }
  1484. }
  1485. ::v-deep {
  1486. .model .u-fade-enter-active {
  1487. z-index: 10075 !important;
  1488. }
  1489. }
  1490. ::v-deep {
  1491. .uni-calendar__mask {
  1492. z-index: 11000 !important;
  1493. }
  1494. .uni-calendar__content {
  1495. z-index: 12000 !important;
  1496. }
  1497. }
  1498. .container {
  1499. font-family: PingFang SC, PingFang SC;
  1500. font-weight: 400;
  1501. font-size: 14px;
  1502. color: #222222;
  1503. height: 100%;
  1504. overflow: hidden;
  1505. }
  1506. .boxnav {
  1507. flex-wrap: wrap;
  1508. padding: 0 0 0 10px;
  1509. &-item {
  1510. width: 50%;
  1511. overflow: hidden;
  1512. }
  1513. &-item-info {
  1514. border: 1px solid #f5f5f5;
  1515. text-align: center;
  1516. color: #222;
  1517. background-color: #f5f5f5;
  1518. border-radius: 3px;
  1519. padding: 5px;
  1520. margin: 0 10px 10px 0;
  1521. }
  1522. &-active {
  1523. border: 1px solid #1677ff !important;
  1524. color: #1677ff !important;
  1525. background-color: #e7f1fe !important;
  1526. }
  1527. }
  1528. .calendar-day {
  1529. font-family: PingFang SC, PingFang SC;
  1530. font-weight: 400;
  1531. font-size: 12px;
  1532. color: #999;
  1533. flex: 1;
  1534. min-height: 30px;
  1535. background-color: #f5f5f5;
  1536. border-radius: 4px;
  1537. margin: 0 10px 10px 0;
  1538. }
  1539. .setTimebox {
  1540. font-family: PingFang SC, PingFang SC;
  1541. font-weight: 400;
  1542. font-size: 14px;
  1543. width: fit-content;
  1544. height: fit-content;
  1545. }
  1546. .timetip {
  1547. font-family: PingFang SC, PingFang SC;
  1548. font-weight: 400;
  1549. font-size: 14px;
  1550. color: #2979ff;
  1551. text-align: center;
  1552. margin-bottom: 5px;
  1553. }
  1554. .popbox {
  1555. background-color: #fff;
  1556. border-radius: 12px;
  1557. font-family: PingFang SC, PingFang SC;
  1558. font-weight: 400;
  1559. font-size: 14px;
  1560. color: #333;
  1561. &-head {
  1562. padding: 15px;
  1563. font-weight: bold;
  1564. font-size: 15px;
  1565. text-align: center;
  1566. position: relative;
  1567. }
  1568. .close-circle {
  1569. position: absolute;
  1570. right: 10px;
  1571. top: 50%;
  1572. transform: translateY(-50%);
  1573. }
  1574. &-body {
  1575. padding: 10px 10px;
  1576. }
  1577. .radiobox {
  1578. &-item {
  1579. padding: 10px 0;
  1580. border-bottom: 1px solid #f5f5f5;
  1581. &:last-child {
  1582. border-bottom: none;
  1583. }
  1584. }
  1585. }
  1586. &-footer {
  1587. padding: 15px 0;
  1588. }
  1589. &-footer-btn {
  1590. flex: 1;
  1591. height: 44px;
  1592. line-height: 44px;
  1593. margin: 0 10px;
  1594. border-radius: 50px;
  1595. border: none;
  1596. font-family: PingFang SC, PingFang SC;
  1597. font-weight: 400;
  1598. font-size: 14px;
  1599. color: #333;
  1600. &::after {
  1601. border: none;
  1602. }
  1603. }
  1604. .con-btn {
  1605. background-color: #1677ff;
  1606. color: #fff;
  1607. }
  1608. .choosetitle {
  1609. font-family: PingFang SC, PingFang SC;
  1610. font-weight: 400;
  1611. font-size: 15px;
  1612. color: #333;
  1613. }
  1614. .invitetip {
  1615. margin-top: 10px;
  1616. background-color: #ebf5fb;
  1617. color: #1677ff;
  1618. padding: 5px 10px;
  1619. border-radius: 5px;
  1620. }
  1621. .sharePop-item {
  1622. padding: 0 10px;
  1623. box-sizing: border-box;
  1624. font-family: PingFang SC, PingFang SC;
  1625. font-weight: 400;
  1626. font-size: 14px;
  1627. display: inline-flex !important;
  1628. image {
  1629. height: 48px;
  1630. width: 48px;
  1631. margin-bottom: 10px;
  1632. }
  1633. }
  1634. }
  1635. .headbox {
  1636. background-color: #fff;
  1637. flex: 1;
  1638. height: 100%;
  1639. .subsection {
  1640. height: 45px;
  1641. padding: 4px;
  1642. }
  1643. .participate-order {
  1644. font-size: 12px;
  1645. image {
  1646. width: 15px;
  1647. height: 15px;
  1648. }
  1649. }
  1650. }
  1651. .tag-active {
  1652. background-color: #ffeceb !important;
  1653. color: #f93e3e !important;
  1654. border: 1px solid #f93e3e !important;
  1655. }
  1656. .tagbox {
  1657. padding-top: 10rpx;
  1658. font-size: 12px;
  1659. color: #1677ff;
  1660. &-list {
  1661. margin: 0 0 -6px 6px;
  1662. flex-wrap: wrap;
  1663. }
  1664. &-item {
  1665. height: 26px;
  1666. padding: 0 8px;
  1667. margin: 0 6px 6px 0;
  1668. border-radius: 4px;
  1669. background-color: #f5f5f5;
  1670. color: #999;
  1671. border: 1px solid #f5f5f5;
  1672. box-sizing: border-box;
  1673. font-size: 12px;
  1674. }
  1675. }
  1676. .invite-member {
  1677. height: 55px;
  1678. width: 50px;
  1679. position: fixed;
  1680. bottom: 110px;
  1681. right: 10px;
  1682. cursor: pointer;
  1683. .intimg {
  1684. width: 50px;
  1685. height: 55px;
  1686. }
  1687. }
  1688. .invite-members {
  1689. right: -68rpx;
  1690. }
  1691. .falseimg {
  1692. position: absolute;
  1693. width: 30rpx;
  1694. height: 30rpx;
  1695. top: 0rpx;
  1696. right: -8rpx;
  1697. }
  1698. .userlist {
  1699. padding: 24rpx;
  1700. }
  1701. </style>