myLike.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="我的" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#121212"></u-navbar>
  4. <view class="box_tab">
  5. <u-tabs
  6. @click="TabBtn"
  7. :duration="200"
  8. :list="listTab"
  9. :lineWidth="25"
  10. :lineHeight="12"
  11. :current="id1"
  12. lineColor="#4E7198"
  13. :lineColor="`url(${tabImg}) 100% 100%`"
  14. :activeStyle="{
  15. color: '#4E7198',
  16. fontSize: '34rpx'
  17. }"
  18. ></u-tabs>
  19. </view>
  20. <!-- 投稿 -->
  21. <view class="pubu" v-if="id1 == 0">
  22. <custom-waterfalls-flow :value="list" style="width: 90%; margin: auto">
  23. <view class="item" @click="itemBtn(index)" style="position: relative" v-for="(item, index) in list" :key="index" slot="slot{{index}}">
  24. <view class="title_pubu">
  25. {{ item.title }}
  26. <view class="" style="position: relative">
  27. <view class="box_checkbox">
  28. <u-checkbox-group v-model="checkboxValue1" placement="column" @change="checkboxChange(index)">
  29. <u-checkbox :customStyle="{ marginBottom: '8px' }" shape="circle"></u-checkbox>
  30. </u-checkbox-group>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </custom-waterfalls-flow>
  36. <view class="guanLi">
  37. <view style="display: flex; align-items: center" v-if="guanLiShow">
  38. <view style="margin-right: 260rpx">
  39. <u-checkbox-group v-model="checkboxValue1" placement="column" @change="checkboxChange(index)">
  40. <u-checkbox :customStyle="{ marginBottom: '8px' }" shape="circle" label="全部"></u-checkbox>
  41. </u-checkbox-group>
  42. </view>
  43. <view class="sc" @click="deleteShow = true">
  44. <uni-icons type="trash" color=" #ffffff" size="20"></uni-icons>
  45. <view class="">删除</view>
  46. </view>
  47. </view>
  48. <view class="guanLi2" @click="guanLiShow = !guanLiShow">
  49. <view class="left_jl">
  50. <uni-icons type="gear" size="20"></uni-icons>
  51. </view>
  52. <view class="left_jl">{{ guanLiShow ? '退出管理' : '管理' }}</view>
  53. </view>
  54. </view>
  55. </view>
  56. <!-- 收藏 -->
  57. <view class="pubu" v-if="id1 == 1">
  58. 2
  59. <!-- <custom-waterfalls-flow :value="list" style="width: 90%; margin: auto">
  60. <view class="item" style="position: relative" v-for="(item, index) in list" :key="index" slot="slot{{index}}">
  61. <view class="title_pubu">
  62. {{ item.title }}
  63. </view>
  64. </view>
  65. </custom-waterfalls-flow> -->
  66. <view class="guanLi">
  67. <view style="display: flex; align-items: center" v-if="guanLiShow">
  68. <view style="margin-right: 260rpx">
  69. <u-checkbox-group v-model="checkboxValue1" placement="column" @change="checkboxChange(index)">
  70. <u-checkbox :customStyle="{ marginBottom: '8px' }" shape="circle" label="全部"></u-checkbox>
  71. </u-checkbox-group>
  72. </view>
  73. <view class="sc" @click="deleteShow = true">
  74. <uni-icons type="trash" color=" #ffffff" size="20"></uni-icons>
  75. <view class="">删除</view>
  76. </view>
  77. </view>
  78. <view class="guanLi2" @click="guanLiShow = !guanLiShow">
  79. <view class="left_jl">
  80. <uni-icons type="gear" size="20"></uni-icons>
  81. </view>
  82. <view class="left_jl">{{ guanLiShow ? '退出管理' : '管理' }}</view>
  83. </view>
  84. </view>
  85. </view>
  86. <!-- 喜欢 -->
  87. <view class="pubu" v-if="id1 == 2">
  88. 3
  89. <!-- <custom-waterfalls-flow :value="list" style="width: 90%; margin: auto">
  90. <view class="item" style="position: relative" v-for="(item, index) in list" :key="index" slot="slot{{index}}">
  91. <view class="title_pubu">
  92. {{ item.title }}
  93. </view>
  94. </view>
  95. </custom-waterfalls-flow> -->
  96. <view class="guanLi">
  97. <view style="display: flex; align-items: center" v-if="guanLiShow">
  98. <view style="margin-right: 260rpx">
  99. <u-checkbox-group v-model="checkboxValue1" placement="column" @change="checkboxChange(index)">
  100. <u-checkbox :customStyle="{ marginBottom: '8px' }" shape="circle" label="全部"></u-checkbox>
  101. </u-checkbox-group>
  102. </view>
  103. <view class="sc" @click="deleteShow = true">
  104. <uni-icons type="trash" color=" #ffffff" size="20"></uni-icons>
  105. <view class="">删除</view>
  106. </view>
  107. </view>
  108. <view class="guanLi2" @click="guanLiShow = !guanLiShow">
  109. <view class="left_jl">
  110. <uni-icons type="gear" size="20"></uni-icons>
  111. </view>
  112. <view class="left_jl">{{ guanLiShow ? '退出管理' : '管理' }}</view>
  113. </view>
  114. </view>
  115. </view>
  116. <!-- 删除弹层 -->
  117. <u-popup :show="deleteShow" @close="close" mode="center" customStyle="width:600rpx;padding: 30rpx;" round="20rpx">
  118. <view style="text-align: center">确认是否删除所选内容?</view>
  119. <view class="bt_box">
  120. <view class="bt1" @click="deleteShow = false">取消</view>
  121. <view class="bt2">删除</view>
  122. </view>
  123. </u-popup>
  124. </view>
  125. </template>
  126. <script>
  127. export default {
  128. data() {
  129. return {
  130. id1: 0,
  131. deleteShow: false,
  132. guanLiShow: false,
  133. tabImg: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/tab.png',
  134. listTab: [
  135. {
  136. name: '我的投稿',
  137. tabid: 1
  138. },
  139. {
  140. name: '我的收藏',
  141. tabid: 2
  142. },
  143. {
  144. name: '我的喜欢',
  145. tabid: 3
  146. }
  147. ],
  148. list: [
  149. {
  150. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy1.png',
  151. title: '传统捏泥人',
  152. desc: '描述描述描述描述描述描述描述描述2'
  153. },
  154. {
  155. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy2.png',
  156. title: '青龙宫',
  157. desc: '描述描述描述描述描述描述描述描述1'
  158. },
  159. {
  160. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy3.png',
  161. title: '火把节',
  162. desc: '11'
  163. },
  164. {
  165. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy9.png',
  166. title: '老物件',
  167. desc: '描述描述描述描述描述描述描述描述2'
  168. },
  169. {
  170. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy4.png',
  171. title: '林后青龙宫',
  172. desc: '描述描述描述描述描述描述描述描述2'
  173. },
  174. {
  175. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy10.png',
  176. title: '书籍',
  177. desc: '描述描述描述描述描述描述描述描述2'
  178. },
  179. {
  180. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy9.png',
  181. title: '老物件',
  182. desc: '描述描述描述描述描述描述描述描述2'
  183. },
  184. {
  185. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy4.png',
  186. title: '林后青龙宫',
  187. desc: '描述描述描述描述描述描述描述描述2'
  188. },
  189. {
  190. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/mn_jy10.png',
  191. title: '书籍',
  192. desc: '描述描述描述描述描述描述描述描述2'
  193. }
  194. ],
  195. checkboxValue1: [],
  196. // 基本案列数据
  197. checkboxList1: [
  198. {
  199. disabled: false
  200. }
  201. ]
  202. };
  203. },
  204. onLoad(o) {
  205. this.id1 = o.id;
  206. },
  207. methods: {
  208. TabBtn(index) {
  209. // console.log(index);
  210. this.id1 = index.index;
  211. },
  212. checkboxChange(n, index) {
  213. // console.log(index, 'index');
  214. console.log('change', n);
  215. },
  216. itemBtn(i) {
  217. // console.log(i, 'i');
  218. },
  219. close() {
  220. this.deleteShow = false;
  221. }
  222. }
  223. };
  224. </script>
  225. <style>
  226. /deep/.u-tabs__wrapper__nav__item.data-v-48634e29 {
  227. padding: 0 40rpx !important;
  228. }
  229. /deep/.u-tabs__wrapper__nav__line.data-v-48634e29 {
  230. bottom: 16rpx !important;
  231. }
  232. /deep/.u-tabs__wrapper__nav__item.data-v-48634e29 {
  233. align-items: end !important;
  234. }
  235. .box {
  236. height: auto;
  237. width: 100%;
  238. background-color: #f8f8f8;
  239. }
  240. .box_tab {
  241. margin: 45rpx 32rpx 0 32rpx;
  242. }
  243. .pubu {
  244. margin: 10rpx 32rpx 0 32rpx;
  245. }
  246. .title_pubu {
  247. width: 100%;
  248. height: 65rpx;
  249. line-height: 65rpx;
  250. background-color: #ca5642;
  251. font-size: 30rpx;
  252. text-align: center;
  253. color: #ffffff;
  254. position: absolute;
  255. bottom: 0;
  256. left: 0;
  257. }
  258. .box_checkbox {
  259. position: absolute;
  260. top: -50rpx;
  261. left: 20rpx;
  262. z-index: 99;
  263. }
  264. .guanLi {
  265. display: flex;
  266. justify-content: flex-end;
  267. position: sticky;
  268. bottom: 0;
  269. left: 0;
  270. z-index: 99;
  271. background: #ffffff;
  272. }
  273. .guanLi2 {
  274. display: flex;
  275. align-items: center;
  276. height: 80rpx;
  277. /* width: 160rpx; */
  278. background-color: #efefef;
  279. }
  280. .sc {
  281. display: flex;
  282. align-items: center;
  283. height: 80rpx;
  284. width: 160rpx;
  285. padding-left: 28rpx;
  286. color: #ffffff;
  287. background-color: #ca5642;
  288. }
  289. .bt_box {
  290. display: flex;
  291. margin-top: 50rpx;
  292. justify-content: space-around;
  293. }
  294. .bt1 {
  295. width: 244rpx;
  296. height: 78rpx;
  297. border: 1px solid #312520;
  298. border-radius: 39rpx;
  299. text-align: center;
  300. line-height: 78rpx;
  301. color: black;
  302. }
  303. .bt2 {
  304. width: 244rpx;
  305. height: 78rpx;
  306. background: #ca5642;
  307. border-radius: 39rpx;
  308. text-align: center;
  309. line-height: 78rpx;
  310. color: #ffffff;
  311. }
  312. </style>