index.vue 50 KB

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