index.vue 48 KB

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