index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <template>
  2. <view class="container">
  3. <view class="headbox">
  4. <u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe" activeColor="#1677ff" :fontSize="15" :bold="false" @change="sectionChange"></u-subsection>
  5. <view style="margin-top: 10px;">
  6. <u-search placeholder="会员ID、昵称、姓名、手机" v-model="keyword" :showAction="false" height="30px"></u-search>
  7. </view>
  8. <view class="x-bc">
  9. <u-tabs :list="list2" :current='currentType' :lineWidth="40" lineColor="#1677ff" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTypeTab"></u-tabs>
  10. <view class="participate-order x-f">
  11. <image src="@/static/images/order_icon2.png" mode="aspectFill" v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
  12. <image src="@/static/images/order_icon.png" mode="aspectFill" v-else></image>
  13. <picker @change="bindPickerChange" :value="searchTypeIndex" :range="typeArray">
  14. {{typeoption[searchTypeIndex]}}
  15. </picker>
  16. </view>
  17. </view>
  18. <view class="tagbox x-bc">
  19. <view class="tagbox-left x-f">
  20. <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>
  21. <view class="tagbox-list x-f">
  22. <view class="tagbox-item x-f">未打标签</view>
  23. <view class="tagbox-item x-f">未打标签</view>
  24. </view>
  25. </view>
  26. <view class="tagbox-right x-f" @click="openPop('tag')">筛选<u-icon name="arrow-down" color="#1677ff" size="12"></u-icon></view>
  27. </view>
  28. </view>
  29. <!-- 搜索选择弹窗/标签筛选 -->
  30. <u-popup :show="showPop" :round="12" @close="closePop" class="model" :zIndex="10076">
  31. <view class="popbox">
  32. <view class="popbox-head">
  33. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24" @click="closePop"></u-icon>
  34. {{popTitle}}
  35. </view>
  36. <view class="popbox-body">
  37. <view class="radiobox" v-show="popTitle == '搜索选择'">
  38. <label class="radiobox-item x-bc mbline" v-for="(item, index) in array" :key="item.value" @click="bindTypeChange(index)">
  39. <view>{{item.name}}</view>
  40. <radio :value="item.value" :checked="index === typeIndex" style="transform:scale(0.75)" />
  41. </label>
  42. </view>
  43. <view class="tagbox-list x-f">
  44. <view class="tagbox-item x-f" @click="chooseTag">未打标签</view>
  45. <view class="tagbox-item x-f tag-active">未打标签</view>
  46. </view>
  47. </view>
  48. <view class="popbox-footer x-bc">
  49. <button class="popbox-footer-btn" @click="resetPop" v-show="popTitle == '标签筛选'">重置</button>
  50. <button class="popbox-footer-btn" @click="closePop" v-show="popTitle == '搜索选择'">取消</button>
  51. <button class="popbox-footer-btn con-btn" @click="confirmPop">确定</button>
  52. </view>
  53. </view>
  54. </u-popup>
  55. <image class="invite-member" src="@/static/images/invite-member-icon.png" mode="aspectFill" @click="vipInvite"></image>
  56. <!-- 邀请弹窗 -->
  57. <u-popup :show="invitePop" :round="12" @close="invitePop = false" :zIndex="10074">
  58. <view class="popbox">
  59. <view class="popbox-head">
  60. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24" @click="invitePop = false"></u-icon>
  61. 分享方式
  62. </view>
  63. <view class="popbox-body">
  64. <view class="choosetitle x-bc">
  65. <view>选择标签</view>
  66. <view class="x-f" style="color:#1677ff;" @click="openPop('tag')">
  67. <u-icon name="plus" color="#1677ff" size="14" style="margin-right: 5px;"></u-icon>添加标签</view>
  68. </view>
  69. <view class="invitetip">选择标签,当会员注册成功后,即可自动打标签</view>
  70. <!-- <view class="tagbox-list x-f" style="margin-top: 10px;margin-left: 0px;">
  71. <view class="tagbox-item x-f" @click="chooseTag">未打标签</view>
  72. <view class="tagbox-item x-f tag-active">未打标签</view>
  73. </view> -->
  74. <view class="x-bc" style="margin-top: 30px;">
  75. <view class="sharePop-item y-f">
  76. <image src="@/static/images/poster_icon.png" mode="aspectFill"></image>
  77. <view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
  78. <view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
  79. </view>
  80. <view class="sharePop-item y-f" @click="copyLink">
  81. <image src="@/static/images/link_icon.png" mode="aspectFill"></image>
  82. <view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
  83. <view style="font-size: 12px;color: #888;">生成链接一键复制</view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </u-popup>
  89. <!-- 设置链接有效时长弹窗 -->
  90. <u-modal :show="setTimeShow"content='content' class="model" @confirm="confirmTime">
  91. <view class="setTimebox">
  92. <view class="timetip">不传默认以系统参数为准</view>
  93. <view class="x-f">
  94. <text style="margin-right: 20px;">链接有效时长(分钟)</text>
  95. <u-input
  96. fontSize="14px"
  97. placeholder="链接有效时长"
  98. border="none"
  99. v-model="time"
  100. maxlength="5"
  101. ></u-input>
  102. </view>
  103. </view>
  104. </u-modal>
  105. </view>
  106. </template>
  107. <script>
  108. export default {
  109. data() {
  110. return {
  111. list: [{name: '会员(0)'}, {name: '小黑屋(0)'}],
  112. current: 0,
  113. keyword: "",
  114. list2: [{
  115. name: '全部',
  116. }, {
  117. name: '今日新增',
  118. }, {
  119. name: '今日完播'
  120. }, {
  121. name: '未看过课'
  122. }],
  123. currentType: 0,
  124. activeStyle:{
  125. color: '#1677ff',
  126. fontSize: '14px',
  127. fontWeight: 'bold'
  128. },
  129. inactiveStyle:{
  130. fontSize: '14px'
  131. },
  132. searchTypeIndex: 0,
  133. typeArray: ['连续缺课天数多到少', '连续缺课天数少到多', '按注册时间晚到早','会员姓名0-9-A-Z'],
  134. typeoption: ['连续缺课', '连续缺课', '注册时间','会员姓名'],
  135. array: [{
  136. value: '0',
  137. name: '关联搜索',
  138. },{
  139. value: '1',
  140. name: '精准搜索'
  141. }],
  142. typeIndex: 0,
  143. popTitle: '搜索选择',
  144. showPop: false,
  145. queryParam: {
  146. typeIndex: 0,
  147. },
  148. mescroll:null,
  149. downOption: {
  150. auto:false//不要自动加载
  151. },
  152. upOption: {
  153. onScroll:false,
  154. use: true, // 是否启用上拉加载; 默认true
  155. page: {
  156. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  157. size: 10 // 每页数据的数量,默认10
  158. },
  159. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  160. textNoMore:"已经到底了",
  161. empty: {
  162. icon:'/static/images/empty.png',
  163. tip: '暂无数据'
  164. }
  165. },
  166. dataList: [],
  167. invitePop: false,
  168. setTimeShow: false,
  169. time: "",
  170. }
  171. },
  172. onLoad() {
  173. uni.setNavigationBarTitle({
  174. title: '数据统计'
  175. });
  176. },
  177. methods: {
  178. sectionChange(index) {
  179. this.current = index;
  180. },
  181. clickTypeTab(e) {
  182. this.currentType = e.index
  183. },
  184. bindPickerChange(e) {
  185. console.log('picker发送选择改变,携带值为', e.detail.value)
  186. this.searchTypeIndex = e.detail.value
  187. },
  188. openPop(type) {
  189. this.popTitle = type == 'search' ? '搜索选择' : type == 'tag' ?'标签筛选' : ''
  190. this.typeIndex = this.queryParam.typeIndex
  191. this.showPop = true
  192. },
  193. closePop() {
  194. this.showPop = false
  195. },
  196. resetPop() {
  197. },
  198. bindTypeChange(i) {
  199. this.typeIndex = i
  200. },
  201. confirmPop() {
  202. this.queryParam.typeIndex = this.typeIndex
  203. this.showPop = false
  204. },
  205. chooseTag() {
  206. },
  207. vipInvite() {
  208. this.invitePop = true
  209. },
  210. copyLink(){
  211. this.setTimeShow = true
  212. },
  213. confirmTime() {
  214. this.setTimeShow = false
  215. this.showShare = false
  216. },
  217. }
  218. }
  219. </script>
  220. <style lang="scss" scoped>
  221. ::v-deep {
  222. .model .u-fade-enter-active {
  223. z-index: 10075 !important;
  224. }
  225. }
  226. .container {
  227. font-family: PingFang SC, PingFang SC;
  228. font-weight: 400;
  229. font-size: 14px;
  230. color: #222222;
  231. }
  232. .setTimebox {
  233. font-family: PingFang SC, PingFang SC;
  234. font-weight: 400;
  235. font-size: 14px;
  236. }
  237. .timetip {
  238. font-family: PingFang SC, PingFang SC;
  239. font-weight: 400;
  240. font-size: 14px;
  241. color: #2979ff;
  242. text-align: center;
  243. margin-bottom: 5px;
  244. }
  245. .popbox{
  246. background-color: #fff;
  247. border-radius: 12px;
  248. font-family: PingFang SC, PingFang SC;
  249. font-weight: 400;
  250. font-size: 14px;
  251. color: #333;
  252. &-head {
  253. padding: 15px;
  254. font-weight: bold;
  255. font-size: 15px;
  256. text-align: center;
  257. position: relative;
  258. }
  259. .close-circle {
  260. position: absolute;
  261. right: 10px;
  262. top: 50%;
  263. transform: translateY(-50%);
  264. }
  265. &-body {
  266. padding: 10px 15px;
  267. }
  268. .radiobox {
  269. &-item{
  270. padding: 10px 0;
  271. border-bottom: 1px solid #f5f5f5;
  272. &:last-child {
  273. border-bottom: none;
  274. }
  275. }
  276. }
  277. &-footer {
  278. padding: 15px 0;
  279. }
  280. &-footer-btn {
  281. flex: 1;
  282. height: 44px;
  283. line-height: 44px;
  284. margin: 0 10px;
  285. border-radius: 50px;
  286. border: none;
  287. font-family: PingFang SC, PingFang SC;
  288. font-weight: 400;
  289. font-size: 14px;
  290. color: #333;
  291. &::after {
  292. border: none;
  293. }
  294. }
  295. .con-btn {
  296. background-color: #1677ff;
  297. color: #fff;
  298. }
  299. .choosetitle {
  300. font-family: PingFang SC, PingFang SC;
  301. font-weight: 400;
  302. font-size: 15px;
  303. color: #333;
  304. }
  305. .invitetip {
  306. margin-top: 10px;
  307. background-color: #ebf5fb;
  308. color: #1677ff;
  309. padding: 5px 10px;
  310. border-radius: 5px;
  311. }
  312. .sharePop-item {
  313. padding: 0 10px;
  314. box-sizing: border-box;
  315. font-family: PingFang SC, PingFang SC;
  316. font-weight: 400;
  317. font-size: 14px;
  318. display: inline-flex !important;
  319. image {
  320. height: 48px;
  321. width: 48px;
  322. margin-bottom: 10px;
  323. }
  324. }
  325. }
  326. .headbox {
  327. padding: 10px;
  328. background-color: #fff;
  329. .subsection {
  330. height: 45px;
  331. padding: 4px;
  332. }
  333. .participate-order {
  334. font-size: 12px;
  335. image {
  336. width: 15px;
  337. height: 15px;
  338. }
  339. }
  340. }
  341. .tag-active {
  342. background-color: #ffeceb !important;
  343. color: #f93e3e !important;
  344. border: 1px solid #f93e3e !important;
  345. }
  346. .tagbox {
  347. padding: 10px 0;
  348. font-size: 12px;
  349. color: #1677ff;
  350. &-list {
  351. margin: 0 0 -6px 6px;
  352. flex-wrap: wrap;
  353. }
  354. &-item {
  355. height: 26px;
  356. padding: 0 8px;
  357. margin: 0 6px 6px 0;
  358. border-radius: 4px;
  359. background-color: #f5f5f5;
  360. color: #999;
  361. border: 1px solid #f5f5f5;
  362. box-sizing: border-box;
  363. font-size: 12px;
  364. }
  365. }
  366. .invite-member {
  367. height: 55px;
  368. width: 50px;
  369. position: fixed;
  370. bottom: 80px;
  371. right: 10px;
  372. cursor: pointer;
  373. }
  374. </style>