index.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760
  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" mode="aspectFill"
  24. v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
  25. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/order_icon.png" mode="aspectFill" v-else></image>
  26. <picker @change="bindPickerChange" :value="searchTypeIndex" :range="typeArray">
  27. {{typeoption[searchTypeIndex]}}
  28. </picker>
  29. </view>
  30. </view>
  31. <view class="tagbox x-bc" v-if="current==0">
  32. <view class="tagbox-left x-f">
  33. <!-- <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> -->
  34. <view v-if="showCompanytag.length<=0" style="color: #888;" class="ml30">请点击筛选,选择标签</view>
  35. <view class="tagbox-list x-f">
  36. <view class="tagbox-item x-f" v-for="(item,index) in showCompanytag" :key='item.tagId'
  37. :class="item.checked?'checked-bg':''">
  38. {{item.tagName}}
  39. </view>
  40. </view>
  41. </view>
  42. <view class="tagbox-right x-f" @click="openPop('tag')">筛选<u-icon name="arrow-down" color="#1677ff"
  43. size="12"></u-icon></view>
  44. </view>
  45. </view>
  46. <view v-if="current==0">
  47. <dropdownPanel :filterData='filterData' @onClick="getactNav" :itemname='itemname' @onChange="onChange"
  48. @confirm="confirm" @reset="reset" :ispopshow='ispopshow' :top="tops">
  49. <view v-if="filterData[searchbarNav].type == 'userStatus'">
  50. <view class="boxnav x-bc">
  51. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
  52. :key="index">
  53. <view class="boxnav-item-info one-t"
  54. :class="userStatusIndex == index ? 'boxnav-active':''"
  55. @click="handleParamItem('userStatus',index,item.id)">{{item.label}}</view>
  56. </view>
  57. </view>
  58. </view>
  59. <view v-if="filterData[searchbarNav].type == 'registerTime'">
  60. <view class="boxnav x-bc ">
  61. <view class="boxnav-item" style="width: 25%;"
  62. v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  63. <view class="boxnav-item-info one-t"
  64. :class="registerTimeIndex == index ? 'boxnav-active':''"
  65. @click="handleParamItem('registerTime',index)">{{item.label}}</view>
  66. </view>
  67. <view class="boxnav-item x-ac" style="width: 100%;" v-show="registerTimeIndex == 4">
  68. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  69. <u-icon name="calendar" color="#999"
  70. size="20"></u-icon>{{queryParam.startTime || '选择日期'}}
  71. </view>
  72. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  73. <u-icon name="calendar" color="#999"
  74. size="20"></u-icon>{{queryParam.endTime || '选择日期'}}
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view v-if="filterData[searchbarNav].type == 'watchStatus'">
  80. <view class="boxnav x-bc">
  81. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
  82. :key="index">
  83. <view class="boxnav-item-info one-t"
  84. :class="watchStatusIndex == index ? 'boxnav-active':''"
  85. @click="handleParamItem('watchStatus',index)">{{item.label}}</view>
  86. </view>
  87. </view>
  88. </view>
  89. <view v-if="filterData[searchbarNav].type == 'courseStatus'">
  90. <view class="boxnav x-bc">
  91. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
  92. :key="index">
  93. <view class="boxnav-item-info one-t"
  94. :class="courseStatusIndex == index ? 'boxnav-active':''"
  95. @click="handleParamItem('courseStatus',index)">{{item.label}}</view>
  96. </view>
  97. </view>
  98. </view>
  99. </dropdownPanel>
  100. </view>
  101. </view>
  102. <uni-calendar ref="calendar" :clear-date="true" :date="date" :insert="false" :lunar="false"
  103. :startDate="$u.timeFormat(new Date().getTime() - (3600 * 24 * 365 * 1000), 'yyyy-mm-dd')" :range='true'
  104. @confirm="confirmCalendar" :endDate="$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')" />
  105. <!-- 搜索选择弹窗/标签筛选 -->
  106. <u-popup :show="showPop" :round="12" @close="closePop" class="model" :zIndex="10076" style="flex: 0;">
  107. <view class="popbox">
  108. <view class="popbox-head">
  109. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24" @click="closePop"></u-icon>
  110. {{popTitle}}
  111. </view>
  112. <view class="popbox-body">
  113. <view class="radiobox" v-show="popTitle == '搜索选择'">
  114. <label class="radiobox-item x-bc mbline" v-for="(item, index) in array" :key="item.value"
  115. @click="bindTypeChange(index)">
  116. <view>{{item.name}}</view>
  117. <radio :value="item.value" :checked="index === typeIndex" style="transform:scale(0.75)" />
  118. </label>
  119. </view>
  120. <!-- <input placeholder="请输入标签 多个标签用 , 隔开" /> -->
  121. <view class="mb20" v-if="current==0">
  122. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagkeywords" :showAction="false"
  123. height="30px" @search='getcompanyTag'></u-search>
  124. </view>
  125. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  126. :refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)"
  127. @refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
  128. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
  129. @scrolltolower="reachBottoms">
  130. <view class="tagbox-list x-f">
  131. <view class="tagbox-item x-f tag-active" v-if="companytag.length<=0">暂无标签</view>
  132. <view class="mlr10 mb10" v-for="(item,index) in companytag" :key='item.tagId'>
  133. <u-tag :text="item.tagName" :plain="!item.checked" :name="index"
  134. @click="chooseTag(index)"></u-tag>
  135. </view>
  136. </view>
  137. <view class="center fs24 mt20">
  138. <text class="mr20" @click="getTagpage('last')">上一页</text>
  139. <text class="base-color-red">{{pagetag.pageNum}}/{{pagetag.pages}}</text>
  140. <text class="ml20" @click="getTagpage('next')">下一页</text>
  141. </view>
  142. </scroll-view>
  143. </view>
  144. <view class="popbox-footer x-bc">
  145. <button class="popbox-footer-btn" @click="resetPop" v-show="popTitle == '标签筛选'">重置</button>
  146. <button class="popbox-footer-btn" @click="closePop" v-show="popTitle == '搜索选择'">取消</button>
  147. <button class="popbox-footer-btn con-btn" @click="confirmPop">确定</button>
  148. </view>
  149. </view>
  150. </u-popup>
  151. <view class="userbox column hb hidden ">
  152. <!-- <mescroll-body bottom="0" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback"> -->
  153. <view class="userlist column hb hidden">
  154. <vipUserItem :viplist='userList' :isShowSelectAll="isShowSelectAll" @changeItem="changeItem"
  155. @getuserId='singleChange' @getlableId='singleChangeLable' @change='changesinglevip'
  156. @getuserIds='singleDelete' @pullDownRefresh="getfsuserListdata('refresh')"
  157. @changelistname="getfsuserListdata('more')" @reachBottom="getfsuserListdata('more')"
  158. @changePageOptions="e=>pageOptions=e" :pageOptions="pageOptions" :status="status"
  159. @changeStatus="e=>status=e" class="pb2" />
  160. <view class="justify-between base-bg-f foot-select" v-if="isShowSelectAll">
  161. <view class="align-center justify-between" v-if="isShowSelectAll">
  162. <u-checkbox-group @change="selectAll">
  163. <u-checkbox :checked="isSelectAll" shape="circle" activeColor="#FF6C47" :name="true"
  164. label="全选" labelColor="#333" /><text class="fs24 base-color-9 ml12">已选 {{selectedCount}}
  165. 个</text>
  166. </u-checkbox-group>
  167. </view>
  168. <view class="justify-center ">
  169. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeProhibit"
  170. v-if="current==0">禁用</button>
  171. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeblack"
  172. v-else>取消禁用</button>
  173. <button class="base-bg-blue radius100 colorf h62 fs28 lh62" @click="changetagall"
  174. v-if="current==0">改标签</button>
  175. <!-- <button class="base-bg-f radius100 base-color-red h62 ml10 fs28 lh60"
  176. style="border: #ef4c50 solid 2rpx;"
  177. @click="changevipuser" v-if="current==0">更换归属</button> -->
  178. </view>
  179. </view>
  180. </view>
  181. <!-- </mescroll-body> -->
  182. </view>
  183. <!-- <u-picker :show="showTagSelect" :columns="companytag" keyName="tag" @cancel='showTagSelect=false'
  184. @confirm='singleChangeLable' ></u-picker> -->
  185. <u-popup :show="showTagSelect" @close='closetagselect' :closeOnClickOverlay='true' mode="bottom"
  186. style="z-index: 999;">
  187. <view class=" w100 bgf">
  188. <view class="plr28 ptb16 justify-between" style="flex-direction: row-reverse">
  189. <u-icon class="" name="close-circle" color="#ccc" size="24" @click="closetagselect"></u-icon>
  190. </view>
  191. <view class="mb20">
  192. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagchangekeywords" :showAction="false"
  193. height="30px" @search='getcompanyTags'></u-search>
  194. </view>
  195. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  196. :refresher-triggered="triggeredsA" refresher-background="rgba(0,0,0,0)"
  197. @refresherrefresh="pullDownRefreshsA" @refresherrestore="triggeredsA = false" :upper-threshold="100"
  198. :lower-threshold="100" @refresherabort="triggeredsA = false">
  199. <view class="justify-start p32 wrap">
  200. <view class="mlr10 mt10 " v-for="(item,index) in changetag" :key='item.tagId'>
  201. <u-tag :text="item.tag" :plain="!item.checked" :name="index"
  202. @click="choosechangeTag"></u-tag>
  203. </view>
  204. </view>
  205. <view class="center fs24 mt20">
  206. <text class="mr20" @click="getTagpageS('last')">上一页</text>
  207. <text class="base-color-red">{{pagetagA.pageNum}}/{{pagetagA.pages}}</text>
  208. <text class="ml20" @click="getTagpageS('next')">下一页</text>
  209. </view>
  210. </scroll-view>
  211. <view class="justify-between p32 " :class="isShowSelectAll?'pb120':''">
  212. <view class="changetagbtn base-bg-f8" @click="showTagSelect=!showTagSelect">取消</view>
  213. <view class="changetagbtn colorf base-bg-blue" @click="suretagchangeAll">确定</view>
  214. </view>
  215. </view>
  216. </u-popup>
  217. <view class="invite-member" :style="{right:vipInviteshow?'-72rpx':'20rpx'}">
  218. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/invite-member-icon.png" mode="aspectFill" @click="vipInvite"
  219. style="position: relative;" class="intimg"> </image>
  220. <image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/tc_close_icon.png' class="falseimg" @click="showinimg"></image>
  221. </view>
  222. <!-- 邀请弹窗 -->
  223. <u-popup :show="invitePop" :round="12" @close="invitePop = false" :zIndex="10074" style="flex: 0;">
  224. <view class="popbox">
  225. <view class="popbox-head">
  226. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24"
  227. @click="invitePop = false"></u-icon>
  228. 分享方式
  229. </view>
  230. <view class="popbox-body">
  231. <view class="choosetitle x-bc">
  232. <view>选择标签</view>
  233. <view v-if="sharetaglist" style="color:#1677ff" @click="addtag(0)">{{zhanshitag}}</view>
  234. <view class="x-f" style="color:#1677ff;" v-else @click="addtag(0)">
  235. <u-icon name="plus" color="#1677ff" size="14" style="margin-right: 5px;"></u-icon>添加标签
  236. </view>
  237. </view>
  238. <view class="invitetip">选择标签,当会员注册成功后,即可自动打标签</view>
  239. <!-- <view class="tagbox-list x-f" style="margin-top: 10px;margin-left: 0px;">
  240. <view class="tagbox-item x-f" @click="chooseTag">未打标签</view>
  241. <view class="tagbox-item x-f tag-active">未打标签</view>
  242. </view> -->
  243. <!--#ifdef MP-WEIXIN-->
  244. <view class="justify-center" style="margin-top: 10px;">
  245. <!--#endif-->
  246. <!--#ifdef H5-->
  247. <view class="justify-center" style="margin-top: 10px;">
  248. <!--#endif-->
  249. <!-- <view class="x-bc " style="margin-top: 30px;"> -->
  250. <!--#ifdef MP-WEIXIN-->
  251. <view class="sharePop-item y-f " style="text-align: center;">
  252. <!--#endif-->
  253. <!--#ifdef H5-->
  254. <view class="sharePop-item y-f card-share" @click="shareimg" style="text-align: center;">
  255. <!--#endif-->
  256. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/card_icon.png" mode="aspectFill"
  257. style="width: 80rpx; height: 80rpx;margin-top: 20rpx;"></image>
  258. <view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
  259. <view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
  260. <!-- #ifdef MP-WEIXIN -->
  261. <button open-type="share" class="share" @click="sharecard()">分享卡片</button>
  262. <!-- #endif -->
  263. </view>
  264. <!--#ifdef H5-->
  265. <view class="sharePop-item y-f " @click="buildimg" style="text-align: center;">
  266. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/poster_icon.png" mode="aspectFill"></image>
  267. <view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
  268. <view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
  269. </view>
  270. <view class="sharePop-item y-f " @click="copyLink" style="text-align: center;">
  271. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/link_icon.png" mode="aspectFill"></image>
  272. <view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
  273. <view style="font-size: 12px;color: #888; ">生成链接一键复制</view>
  274. </view>
  275. <!--#endif-->
  276. </view>
  277. </view>
  278. </view>
  279. </u-popup>
  280. <!-- 设置链接有效时长弹窗 -->
  281. <u-modal :show="setTimeShow" content='content' class="model" @confirm="confirmTime">
  282. <view class="setTimebox">
  283. <view class="timetip">不传默认以系统参数为准</view>
  284. <view class="x-f">
  285. <text style="margin-right: 20px;">链接有效时长(分钟)</text>
  286. <u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time" maxlength="5"></u-input>
  287. </view>
  288. </view>
  289. </u-modal>
  290. <!-- 长按保存海报 -->
  291. <u-popup :show="setImg" @close="closeimg" :round="12">
  292. <view class="w100 h500 center">
  293. <image :src="codeLink.url" mode="aspectFill"></image>
  294. </view>
  295. <view class="justify-around mb40">
  296. <view class="column justify-center align-center" @click="downimg">
  297. <image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/downicon.png' class="w80 h80"></image>
  298. <view class="mt10">长按图片保存</view>
  299. </view>
  300. </view>
  301. </u-popup>
  302. <!-- 卡片分享引导 -->
  303. <u-overlay :show="showzhidao" @click="showzhidao = false" style="z-index: 9999;">
  304. <view class="point-box">
  305. <view class="imgshe">
  306. <image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/point.png' class="w300 h300"></image>
  307. </view>
  308. <view class="column colorf fs32 xu-box fs40
  309. align-center justify-center">
  310. <view class="justify-center">点击右上角
  311. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/wxmore.png" class="w50 h50 mlr10"></image>
  312. </view>
  313. <view class="mt20">选择 “转发给朋友”</view>
  314. <view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
  315. </view>
  316. </view>
  317. </u-overlay>
  318. <!-- 更改归属 -->
  319. <u-picker :show="showcol" :columns="columns" @cancel='showcol=!showcol' @confirm='receiveA'
  320. keyName="nickName"></u-picker>
  321. </view>
  322. </template>
  323. <script>
  324. import {
  325. getfsuserList,
  326. getcompanyTaglist,
  327. Addblacklist,
  328. changeLable,
  329. getvipNum,
  330. changevipUser,
  331. getgroupList,
  332. becomeVipuser,
  333. becomeVipuserImg,
  334. getSDK,
  335. getusersales,
  336. removebalcklist,
  337. getallTags
  338. } from "@/api/courseManage.js";
  339. import vipUserItem from "@/components/vipUserItem.vue"
  340. import dropdownPanel from "@/components/dropdownPanel.vue"
  341. import wx from 'weixin-js-sdk'
  342. export default {
  343. components: {
  344. vipUserItem,
  345. dropdownPanel,
  346. },
  347. data() {
  348. return {
  349. showcol: false,
  350. setImg: false,
  351. columns: [],
  352. showTagSelect: false,
  353. list: [{
  354. name: '会员(0)',
  355. }, {
  356. name: '小黑屋(0)'
  357. }],
  358. userList: [],
  359. current: 0,
  360. keyword: "",
  361. companytag: [],
  362. showCompanytag: [],
  363. selectedList: [], //已经选中标签列表
  364. list2: [{
  365. name: '全部',
  366. }, {
  367. name: '今日新增',
  368. }, {
  369. name: '今日完播'
  370. }, {
  371. name: '未看过课'
  372. }],
  373. currentType: 0,
  374. activeStyle: {
  375. color: '#1677ff',
  376. fontSize: '14px',
  377. fontWeight: 'bold'
  378. },
  379. inactiveStyle: {
  380. fontSize: '14px'
  381. },
  382. searchTypeIndex: 0,
  383. typeArray: ['连续缺课天数多到少', '连续缺课天数少到多', '按注册时间晚到早', '会员姓名0-9-A-Z'],
  384. typeoption: ['连续缺课', '连续缺课', '注册时间', '会员姓名'],
  385. array: [{
  386. value: '0',
  387. name: '关联搜索',
  388. },
  389. {
  390. value: '1',
  391. name: '精准搜索'
  392. }
  393. ],
  394. typeIndex: 0,
  395. popTitle: '搜索选择',
  396. showPop: false,
  397. filterData: [{
  398. name: '销售',
  399. value: 0,
  400. type: 'userStatus',
  401. option: [{
  402. label: '全部',
  403. id: ''
  404. }, ]
  405. },
  406. {
  407. name: '注册',
  408. value: 1,
  409. type: 'registerTime',
  410. option: [{
  411. label: '全部',
  412. }, {
  413. label: '今天',
  414. }, {
  415. label: '昨天',
  416. }, {
  417. label: '近7天',
  418. }, {
  419. label: '自定义',
  420. }]
  421. }, {
  422. name: '看课',
  423. value: 2,
  424. type: 'watchStatus',
  425. option: [{
  426. label: '全部',
  427. }, {
  428. label: '未看过课',
  429. }, {
  430. label: '正常看课',
  431. }, {
  432. label: '停止看课',
  433. }]
  434. },
  435. {
  436. name: '缺课',
  437. value: 3,
  438. type: 'courseStatus',
  439. option: [{
  440. label: '全部',
  441. }, {
  442. label: '已缺课',
  443. }, {
  444. label: '未缺课',
  445. }]
  446. },
  447. {
  448. name: '批量',
  449. value: 4,
  450. type: 'piliang',
  451. special: true,
  452. stopPrevent: true
  453. }
  454. ],
  455. searchbarNav: 0,
  456. userStatusIndex: 0,
  457. registerTimeIndex: 0,
  458. watchStatusIndex: 0,
  459. courseStatusIndex: 0,
  460. showCalendar: false,
  461. date: '',
  462. mode: 'range',
  463. queryParam: {
  464. typeIndex: 0,
  465. startTime: '',
  466. endTime: ''
  467. },
  468. mescroll: null,
  469. downOption: {
  470. use: true,
  471. auto: false
  472. },
  473. upOption: {
  474. onScroll: false,
  475. use: true, // 是否启用上拉加载; 默认true
  476. auto: true,
  477. page: {
  478. pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  479. size: 10 // 每页数据的数量,默认10
  480. },
  481. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  482. textNoMore: "已经到底了",
  483. empty: {
  484. icon: 'https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png',
  485. tip: '暂无数据'
  486. }
  487. },
  488. dataList: [],
  489. invitePop: false,
  490. setTimeShow: false,
  491. time: "",
  492. user: {},
  493. idx: [],
  494. todayday: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
  495. startTime: '',
  496. endTime: '',
  497. isShowSelectAll: false, //是否显示全选
  498. isSelectAll: false, //是否全选
  499. ispopshow: false,
  500. selectidAll: [],
  501. changetag: [],
  502. selectidtag: '',
  503. itemname: '',
  504. userid: '',
  505. groupid: [],
  506. pageOptions: {
  507. pageNum: 1,
  508. pageSize: 8,
  509. },
  510. status: 'loadmore',
  511. sharetag: 1,
  512. sharetaglist: [],
  513. codeLink: [],
  514. zhanshitag: '',
  515. copyLinks: '',
  516. showzhidao: false,
  517. imgs: 'https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/fs/20250416/1744811256845.png',
  518. currentIsBlack: false,
  519. tagpageNum: 1,
  520. tagpageSize: 16,
  521. triggereds: false,
  522. statusA: 'loadmore',
  523. isEnableds: true,
  524. pagetag: [],
  525. tagkeywords: '',
  526. salesid: '',
  527. tagchangekeywords: '',
  528. tagpageNums: 1,
  529. tagpageSizes: 16,
  530. triggeredsA: false,
  531. statusAs: 'loadmore',
  532. isEnabledsA: true,
  533. pagetagA: [],
  534. tops: '464rpx',
  535. showInvite: false,
  536. vipInviteshow: false
  537. }
  538. },
  539. onLoad() {
  540. // #ifdef MP-WEIXIN
  541. uni.showShareMenu({
  542. withShareTicket: true,
  543. menus: ['shareAppMessage']
  544. });
  545. // #endif
  546. },
  547. onShow() {
  548. // #ifdef H5
  549. this.getjssdklist()
  550. // #endif
  551. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
  552. this.getcompanyTag()
  553. this.getvipListnum()
  554. this.getsalelist()
  555. this.userList=[]
  556. this.getfsuserListdata()
  557. },
  558. mounted() {
  559. },
  560. computed: {
  561. selectedCount() {
  562. return this.userList.filter(item => item.checked).length;
  563. },
  564. },
  565. methods: {
  566. sharecard(){
  567. console.log(123)
  568. uni.share({
  569. provider: 'weixin',
  570. scene: 'WXSceneSession', // 分享到会话
  571. type: 0,
  572. title: this.user.userId+'邀请您成为会员!',
  573. path: '/pages/user/users/becomeVIP?companyId='+
  574. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
  575. imageUrl: this.imgs,
  576. success: (res) => {
  577. console.log('分享成功', res);
  578. uni.showToast({
  579. title: '分享成功',
  580. icon: 'none'
  581. });
  582. },
  583. fail: (err) => {
  584. console.log('分享失败', err);
  585. uni.showToast({
  586. title: '分享失败,请稍后再试',
  587. icon: 'none'
  588. });
  589. }
  590. });
  591. },
  592. changetagall() {
  593. this.showTagSelect = !this.showTagSelect
  594. this.tagchangekeywords = ''
  595. this.selectidtag = ''
  596. this.showInvite = false
  597. this.sharetag = 1
  598. this.getalltagtaglist()
  599. },
  600. getTagpageS(type) {
  601. if (type == 'last') {
  602. if (this.tagpageNums >= 2) {
  603. this.tagpageNums--
  604. this.getalltagtaglist()
  605. } else {
  606. uni.showToast({
  607. title: '已经是第一页',
  608. icon: 'none',
  609. duration: 1000
  610. });
  611. }
  612. } else {
  613. if (this.tagpageNums < this.pagetagA.pages) {
  614. this.tagpageNums++
  615. this.getalltagtaglist()
  616. } else {
  617. uni.showToast({
  618. title: '已经是最后一页',
  619. icon: 'none',
  620. duration: 1000
  621. });
  622. }
  623. }
  624. },
  625. getcompanyTags(value) {
  626. this.tagchangekeywords = value
  627. this.getalltagtaglist()
  628. },
  629. singleDelete(data) {
  630. this.pageOptions.pageNum = 1
  631. this.$emit('update:parentValue', '新值');
  632. this.userList = []
  633. this.selectidAll[0] = data
  634. this.changeblack()
  635. },
  636. changeblack() {
  637. // console.log(this.selectidAll[0])
  638. //取消禁用
  639. if (this.selectidAll.length < 1) {
  640. uni.showToast({
  641. icon: 'none',
  642. title: '所选列表为空'
  643. })
  644. return
  645. }
  646. removebalcklist(this.selectidAll).then(res => {
  647. if (res.code == 200) {
  648. this.pageOptions.pageNum = 1
  649. // console.log(this.pageOptions.pageNum)
  650. this.getfsuserListdata()
  651. // 创建一个在**秒后执行的定时器
  652. const timer = setTimeout(function() {
  653. uni.showToast({
  654. icon: 'none',
  655. title: '取消禁用成功'
  656. })
  657. }, 200);
  658. this.getvipListnum()
  659. this.isShowSelectAll = false
  660. } else {
  661. uni.showToast({
  662. icon: 'none',
  663. title: res.msg
  664. })
  665. }
  666. })
  667. },
  668. blackSel() {
  669. this.isShowSelectAll = !this.isShowSelectAll
  670. // if (data.value == 4) {
  671. // this.itemname = data.name
  672. // this.isShowSelectAll = !this.isShowSelectAll
  673. // } else {
  674. // this.isShowSelectAll = false
  675. // }
  676. },
  677. getsalelist() {
  678. const oldlist = this.filterData[0].option
  679. getusersales().then(res => {
  680. if (res.code == 200) {
  681. const list = res.data
  682. this.filterData[0].option = oldlist.concat(list.map(item => {
  683. return {
  684. id: item.userId,
  685. label: item.nickName
  686. };
  687. }));
  688. } else {
  689. uni.showToast({
  690. title: res.msg,
  691. icon: 'none',
  692. });
  693. }
  694. })
  695. },
  696. getTagpage(type) {
  697. if (type == 'last') {
  698. if (this.tagpageNum >= 2) {
  699. this.tagpageNum--
  700. this.getcompanyTag()
  701. } else {
  702. uni.showToast({
  703. title: '已经是第一页',
  704. icon: 'none',
  705. duration: 1000
  706. });
  707. }
  708. } else {
  709. if (this.tagpageNum < this.pagetag.pages) {
  710. this.tagpageNum++
  711. this.getcompanyTag()
  712. } else {
  713. uni.showToast({
  714. title: '已经是最后一页',
  715. icon: 'none',
  716. duration: 1000
  717. });
  718. }
  719. }
  720. },
  721. //标签展示下拉
  722. pullDownRefreshs() {
  723. // 下拉
  724. this.triggereds = true; //下拉了状态为true
  725. setTimeout(() => {
  726. this.triggereds = false;
  727. uni.stopPullDownRefresh()
  728. this.tagpageNum = 1;
  729. this.getcompanyTag('refresh') //触底 不穿执行else
  730. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  731. // 请求接口
  732. }, 1000)
  733. },
  734. getjssdklist() {
  735. const param = {
  736. url: window.location.href
  737. }
  738. getSDK(param).then(res => {
  739. wx.config({
  740. appId: res.data.appId, // 必填,公众号的唯一标识
  741. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  742. nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  743. signature: res.data.signature, // 必填,签名
  744. jsApiList: ["updateAppMessageShareData"] // 必填,需要使用的JS接口列表
  745. });
  746. })
  747. },
  748. shareimg() {
  749. //分享好友
  750. this.getlink()
  751. let self = this
  752. // 配置--你到时候把配置全局 --就是这些东西 调接口拿
  753. wx.ready(function() { //需在用户可能点击分享按钮前就先调用
  754. wx.updateAppMessageShareData({
  755. title: self.user.userName + "邀请您成为会员", // 分享标题
  756. desc: self.user.deptName, // 分享描述
  757. link: self.copyLinks,
  758. imgUrl: self.codeLink.url || self.imgs, // 分享图标
  759. success: function(res) {
  760. self.showzhidao = true
  761. self.setImg = false
  762. self.showShare = false
  763. // 设置成功
  764. uni.showToast({
  765. title: '卡片已生成',
  766. icon: 'none',
  767. duration: 1000
  768. });
  769. },
  770. fail: function(err) {
  771. console.log(err);
  772. uni.showToast({
  773. title: '卡片生成失败,请重试',
  774. icon: 'none',
  775. duration: 2000
  776. })
  777. }
  778. })
  779. });
  780. },
  781. downimg() {},
  782. closeimg() {
  783. this.setImg = false
  784. this.invitePop = false
  785. },
  786. buildimg() {
  787. this.setImg = !this.setImg
  788. this.getshareimg()
  789. },
  790. addtag(add) {
  791. this.sharetag = add
  792. this.showTagSelect = !this.showTagSelect
  793. this.invitePop = !this.invitePop
  794. this.showInvite = true
  795. this.getalltagtaglist()
  796. },
  797. changevipuser() {
  798. this.showcol = !this.showcol
  799. this.getgrouplist()
  800. },
  801. getgrouplist() {
  802. //获取群管列表
  803. getgroupList().then(res => {
  804. if (res.code == 200) {
  805. this.columns = [res.data]
  806. // console.log(this.columns)
  807. } else {
  808. uni.showToast({
  809. icon: 'none',
  810. title: res.msg
  811. })
  812. }
  813. })
  814. },
  815. changeall() {
  816. //更换全部会员
  817. console.log(1)
  818. const param = {
  819. companyId: this.user.companyId,
  820. companyUserId: this.userid,
  821. userId: this.groupid
  822. }
  823. changevipUser(param).then(res => {
  824. if (res.code == 200) {
  825. uni.showToast({
  826. icon: 'none',
  827. title: '更换会员归属成功'
  828. })
  829. } else {
  830. uni.showToast({
  831. icon: 'none',
  832. title: res.msg
  833. })
  834. }
  835. })
  836. },
  837. receiveA(e) {
  838. console.log(e)
  839. this.userid = e.value[0].userId
  840. if (this.isShowSelectAll == true) {
  841. this.groupid = this.selectidAll
  842. this.changeall()
  843. this.showcol = !this.showcol
  844. setTimeout(() => {
  845. this.getfsuserListdata()
  846. }, 200)
  847. } else {
  848. this.changeall()
  849. this.showcol = !this.showcol
  850. this.getfsuserListdata()
  851. }
  852. this.isSelectAll = false
  853. },
  854. getvipListnum() {
  855. getvipNum().then(res => {
  856. if (res.code == 200) {
  857. this.list[0].name = "会员" + '(' + res.data.number + ')'
  858. this.list[1].name = "小黑屋" + '(' + res.data.blackNum + ')'
  859. } else {
  860. uni.showToast({
  861. icon: 'none',
  862. title: res.msg
  863. })
  864. }
  865. })
  866. },
  867. getactNav(data) {
  868. if (data.value == 4) {
  869. this.itemname = data.name
  870. this.isShowSelectAll = !this.isShowSelectAll
  871. } else {
  872. this.isShowSelectAll = false
  873. }
  874. },
  875. closetagselect() {
  876. this.showTagSelect = !this.showTagSelect
  877. },
  878. suretagchangeAll() {
  879. if (this.sharetag == 0) {
  880. this.sharetaglist = this.changetag.filter(item => item.checked).map(v => v.tagId).join(',')
  881. this.showTagSelect = !this.showTagSelect
  882. this.zhanshitag = this.changetag.filter(item => item.checked).map(v => v.tag).join(',')
  883. // console.log(this.sharetaglist)
  884. } else {
  885. //多选改标签确认按钮
  886. this.showTagSelect = !this.showTagSelect
  887. if (this.selectidAll.length == 0) {
  888. uni.showToast({
  889. icon: 'none',
  890. title: '未选中用户'
  891. })
  892. return
  893. }
  894. this.selectidtag = this.changetag.filter(item => item.checked).map(v => v.tagId)
  895. this.changeLabelmore()
  896. }
  897. if (this.showInvite) {
  898. this.invitePop = true
  899. }
  900. },
  901. singleChangeLable(data) {
  902. this.showTagSelect = !this.showTagSelect
  903. this.selectidAll[0] = data
  904. this.tagchangekeywords = ''
  905. this.selectidtag = []
  906. this.sharetag = 1
  907. this.showInvite = false
  908. this.getalltagtaglist()
  909. },
  910. getalltagtaglist(type) {
  911. //获取公司标签列表
  912. const data = {
  913. pageNum: this.tagpageNums,
  914. pageSize: this.tagpageSizes,
  915. keyword: this.tagchangekeywords
  916. }
  917. getallTags(data).then(res => {
  918. if (res.code == 200) {
  919. const dataList = res.data.list.map(item => {
  920. return {
  921. ...item,
  922. checked: false,
  923. }
  924. })
  925. if (type == 'refresh') {
  926. this.changetag = dataList
  927. } else {
  928. this.changetag = dataList
  929. }
  930. if (res.data.isLastPage) {
  931. this.statusAs = 'nomore'
  932. } else {
  933. this.statusAs = 'loadmore'
  934. }
  935. this.pagetagA = res.data
  936. } else {
  937. uni.showToast({
  938. icon: 'none',
  939. title: res.msg
  940. })
  941. }
  942. })
  943. },
  944. changesinglevip(data) {
  945. this.showcol = !this.showcol
  946. // console.log(data)
  947. this.groupid[0] = data
  948. this.getgrouplist()
  949. },
  950. changeLabelmore() {
  951. //改标签选择按钮
  952. const params = {
  953. tagIds: this.selectidtag,
  954. fsUserIds: this.selectidAll
  955. }
  956. changeLable(params).then(res => {
  957. if (res.code == 200) {
  958. this.userList = []
  959. this.getfsuserListdata()
  960. const timer = setTimeout(function() {
  961. uni.showToast({
  962. icon: 'none',
  963. title: '标签更改成功'
  964. })
  965. }, 500);
  966. } else {
  967. uni.showToast({
  968. icon: 'none',
  969. title: res.msg
  970. })
  971. }
  972. })
  973. },
  974. changeOwnership() {
  975. //更换归属(经销商功能)
  976. },
  977. getcompanyTag(type) {
  978. this.companytag = []
  979. this.tagkeywords = this.tagkeywords.replace(/,/g, ',')
  980. const data = {
  981. pageNum: this.tagpageNum,
  982. pageSize: this.tagpageSize,
  983. keyword: this.tagkeywords
  984. }
  985. getcompanyTaglist(data).then(res => {
  986. if (res.code == 200) {
  987. // this.showCompanytag = res.data.list
  988. const dataList = res.data.list.map(item => {
  989. return {
  990. ...item,
  991. checked: false,
  992. }
  993. })
  994. if (type == 'refresh') {
  995. this.companytag = dataList
  996. } else {
  997. this.companytag = [...this.companytag, ...dataList]
  998. }
  999. if (res.data.isLastPage) {
  1000. this.statusA = 'nomore'
  1001. } else {
  1002. this.statusA = 'loadmore'
  1003. }
  1004. this.pagetag = res.data
  1005. } else {
  1006. uni.showToast({
  1007. icon: 'none',
  1008. title: res.msg
  1009. })
  1010. }
  1011. })
  1012. },
  1013. getfsuserListdata(type) {
  1014. // this.userList=[]
  1015. const param = {
  1016. userId: this.user.userId,
  1017. tabValue: this.currentType,
  1018. registerStartTime: this.startTime, //注册开始
  1019. registerEndTime: this.endTime, //注册结束
  1020. watchCourseType: this.watchStatusIndex,
  1021. missCourseStatus: this.courseStatusIndex,
  1022. keyword: this.keyword,
  1023. tagIds: this.idx,
  1024. isBlack: this.currentIsBlack,
  1025. companyUserId: this.salesid,
  1026. continueMissCourseSort: this.searchTypeIndex,
  1027. ...this.pageOptions
  1028. }
  1029. getfsuserList(param).then(res => {
  1030. if (res.code == 200) {
  1031. let dataList = res.data.list.map(item => {
  1032. return {
  1033. ...item,
  1034. checked: false,
  1035. }
  1036. })
  1037. if (type == 'refresh') {
  1038. this.userList = dataList
  1039. } else {
  1040. this.userList = [...this.userList, ...dataList]
  1041. }
  1042. if (res.data.isLastPage) {
  1043. this.status = 'nomore'
  1044. } else {
  1045. this.status = 'loadmore'
  1046. }
  1047. } else {
  1048. uni.showToast({
  1049. icon: 'none',
  1050. title: res.msg
  1051. })
  1052. }
  1053. })
  1054. },
  1055. onChange(index) {
  1056. if (index == 4) return
  1057. this.searchbarNav = index
  1058. },
  1059. searchKeyword(value) {
  1060. this.keyword = value
  1061. this.getfsuserListdata()
  1062. },
  1063. singleChange(data) {
  1064. this.userList = []
  1065. this.selectidAll[0] = data
  1066. this.changeProhibit()
  1067. },
  1068. changeProhibit() {
  1069. //批量禁用选择按钮
  1070. if (this.selectidAll.length < 1) {
  1071. uni.showToast({
  1072. icon: 'none',
  1073. title: '所选列表为空'
  1074. })
  1075. return
  1076. }
  1077. Addblacklist(this.selectidAll).then(res => {
  1078. if (res.code == 200) {
  1079. this.pageOptions.pageNum = 1
  1080. this.getfsuserListdata()
  1081. // 创建一个在**秒后执行的定时器
  1082. const timer = setTimeout(function() {
  1083. uni.showToast({
  1084. icon: 'none',
  1085. title: '禁用成功'
  1086. })
  1087. }, 200);
  1088. this.getvipListnum()
  1089. this.isShowSelectAll = false
  1090. } else {
  1091. uni.showToast({
  1092. icon: 'none',
  1093. title: res.msg
  1094. })
  1095. }
  1096. })
  1097. },
  1098. // 全选
  1099. selectAll() {
  1100. // 先设置全选
  1101. this.isSelectAll = !this.isSelectAll
  1102. // 然后设置列表 checked没得this不会报错吗 这是返回新数组
  1103. console.log(this.isSelectAll)
  1104. this.userList = this.userList.map(item => {
  1105. // 每一项的 checked为 全选的状态
  1106. return {
  1107. ...item,
  1108. checked: this.isSelectAll
  1109. }
  1110. })
  1111. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userId)
  1112. console.log(this.isSelectAll)
  1113. },
  1114. // 单选 /反选
  1115. changeItem(i) {
  1116. let arr = {
  1117. ...this.userList[i],
  1118. checked: !this.userList[i].checked
  1119. }
  1120. this.$set(this.userList, i, arr)
  1121. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userId)
  1122. console.log(this.selectidAll)
  1123. this.isSelectAll = this.userList.every(item => item.checked)
  1124. if (this.isSelectAll) {
  1125. this.userList = this.userList.map(item => {
  1126. return {
  1127. ...item,
  1128. checked: this.isSelectAll
  1129. }
  1130. })
  1131. }
  1132. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userId)
  1133. },
  1134. reset() {
  1135. //重置时间选择等筛选
  1136. const type = this.filterData[this.searchbarNav].type
  1137. console.log(this.registerTimeIndex)
  1138. if (type == 'registerTime') {
  1139. this.registerTimeIndex = ''
  1140. this.endTime = ''
  1141. this.startTime = ''
  1142. this.getfsuserListdata()
  1143. // console.log(this.getfsuserListdata())
  1144. } else if (type == 'watchStatus') {
  1145. this.watchStatusIndex = 0
  1146. this.getfsuserListdata()
  1147. } else if (type == 'userStatus') {
  1148. this.userStatusIndex = 0
  1149. this.salesid = ''
  1150. this.getfsuserListdata()
  1151. } else if (type == 'courseStatus') {
  1152. this.courseStatusIndex = 0
  1153. this.getfsuserListdata()
  1154. } else {
  1155. }
  1156. },
  1157. confirm(e) {
  1158. this.pageOptions.pageNum = 1
  1159. this.userList = []
  1160. const type = this.filterData[this.searchbarNav].type
  1161. const value = this.registerTimeIndex
  1162. if (type == 'registerTime') {
  1163. if (value == 0) {
  1164. this.startTime = ''
  1165. this.endTime = ''
  1166. this.getfsuserListdata()
  1167. } else if (value == 1) {
  1168. this.startTime = this.todayday + ' 00:00:00'
  1169. this.endTime = this.todayday + ' 23:59:59'
  1170. this.getfsuserListdata()
  1171. } else if (value == 2) {
  1172. let yesterday = new Date();
  1173. yesterday.setDate(yesterday.getDate() - 1);
  1174. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1175. this.endTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 23:59:59'
  1176. this.getfsuserListdata()
  1177. } else if (value == 3) {
  1178. let yesterday = new Date();
  1179. yesterday.setDate(yesterday.getDate() - 6);
  1180. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1181. this.endTime = this.todayday + ' 23:59:59'
  1182. this.getfsuserListdata()
  1183. } else {
  1184. this.getfsuserListdata()
  1185. }
  1186. } else if (type == 'watchStatus') {
  1187. // this.watchStatusIndex=value
  1188. this.getfsuserListdata()
  1189. // console.log(this.filterData)
  1190. } else if (type == 'userStatus') {
  1191. if (this.userStatusIndex == 0) {
  1192. this.salesid = ''
  1193. this.getfsuserListdata()
  1194. } else {
  1195. this.getfsuserListdata()
  1196. }
  1197. // console.log(this.userStatusIndex)
  1198. } else if (type == 'courseStatus') {
  1199. this.getfsuserListdata()
  1200. console.log(this.courseStatusIndex)
  1201. }
  1202. // this.mescroll.resetUpScroll()
  1203. },
  1204. handleParamItem(type, index, id) {
  1205. if (type == 'registerTime') {
  1206. this.registerTimeIndex = index
  1207. } else if (type == 'watchStatus') {
  1208. this.watchStatusIndex = index
  1209. // console.log('watchStatus',index)
  1210. } else if (type == 'userStatus') {
  1211. this.userStatusIndex = index
  1212. this.salesid = id
  1213. console.log(this.salesid)
  1214. } else if (type == 'courseStatus') {
  1215. this.courseStatusIndex = index
  1216. } else {
  1217. this.ispopshow = false
  1218. }
  1219. },
  1220. sectionChange(index) {
  1221. this.current = index;
  1222. this.currentType = 0
  1223. this.startTime = '' //注册开始
  1224. this.endTime = '' //注册结束
  1225. this.watchStatusIndex = 0
  1226. this.salesid = ''
  1227. this.courseStatusIndex = 0
  1228. this.keyword = ''
  1229. this.idx = []
  1230. this.pageOptions.pageNum = 1
  1231. this.isShowSelectAll = false
  1232. this.userList = []
  1233. if (index == 0) {
  1234. this.currentIsBlack = false
  1235. this.getfsuserListdata()
  1236. } else {
  1237. this.currentIsBlack = true
  1238. this.getfsuserListdata()
  1239. }
  1240. this.getvipListnum()
  1241. },
  1242. clickTypeTab(e) {
  1243. this.currentType = e.index
  1244. this.userList = []
  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. top: 0;
  1437. left: 0;
  1438. width: 100%;
  1439. height: 100%;
  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>