index.vue 51 KB

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