index.vue 50 KB

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