index.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view :style="{ minHeight: sys.windowHeight + 'px' }" :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
  3. <tm-menubars title="衣柜" :shadow="0" :showback="true"></tm-menubars>
  4. <view class="C1b1b1b">
  5. <view class="dingwei ml-20" v-if="itemuser!=0">
  6. <image class="touxiang" style="vertical-align: middle;" src="/static/img/41.png" mode="widthFix"></image>
  7. <text style="vertical-align: middle;" class="text-size-m mr-20">{{itemuser.username}}的衣橱</text>
  8. <!-- <image @click="qiehuanFun" style="vertical-align: middle;" src="/static/img/42.png" mode="widthFix"></image> -->
  9. <!-- <text @click="qiehuanFun" style="vertical-align: middle;" class="text-size-m">切换</text> -->
  10. </view>
  11. <view class="dingwei" v-if="itemuser==0">
  12. <text style="vertical-align: middle;" class="text-size-m mr-20">暂无家庭成员去添加</text>
  13. <image @click="tianjia" style="vertical-align: middle;" src="/static/img/42.png" mode="widthFix"></image>
  14. </view>
  15. </view>
  16. <!-- 推荐 -->
  17. <view class="zhuti">
  18. <!-- 衣橱 -->
  19. <tm-sheet class="yichu" style="margin-bottom: 70px !important;">
  20. <tm-tabs class="C1b1b1b qiehuan" @change="fenleichange" color="white" align="left" v-model="activeIndex" :list="list" range-key="title"></tm-tabs>
  21. <<<<<<< HEAD
  22. <view class="yiguicla black pa-6 ma-4 fl" v-for="(item,index) in quanbuList" @click="yifu(index,item)">
  23. =======
  24. <view class="yiguicla black pa-6 ma-4 fl" :class="item.off?'C0178FD':''" v-for="(item,index) in quanbuList" @click="yifu(index,item)">
  25. >>>>>>> e34c4cd0946b018b2b1c677817c08c382bc29746
  26. <image :src="item.src" mode="widthFix"></image>
  27. <view class="text-align-center text-size-m mt-8">{{item.text}}</view>
  28. <view class="text-align-center text-size-m mt-6 mb-6">{{item.type}}</view>
  29. </view>
  30. <view style="clear: both;" class="more ma-30 pt-40" @click="gengmore()">
  31. <image src="/static/img/30.png" mode="widthFix"></image>
  32. <text class="text-size-s">下拉加载更多~</text>
  33. </view>
  34. </tm-sheet>
  35. <view class="anniu">
  36. <tm-button @click="quxiao" :round="24" class="fl" theme="gray" size="n">取消</tm-button>
  37. <tm-button :round="24" class="fl" theme="primary" size="n">取出</tm-button>
  38. </view>
  39. <view class="anniu">
  40. <tm-button :round="24" class="fl" theme="red" size="n">删除</tm-button>
  41. <tm-button :round="24" class="fl" theme="primary" size="n">保存</tm-button>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import{myRequest} from '@/api/request.js'
  48. export default {
  49. data() {
  50. return {
  51. itemuser:0,
  52. soso:'',
  53. activeIndex:0,
  54. list:[],
  55. listlx:[],
  56. quanbuList:[{
  57. src:'/static/img/45.png',
  58. text:'NEO CITY 涂鸦',
  59. <<<<<<< HEAD
  60. type:'手提包'
  61. },{
  62. src:'/static/img/46.png',
  63. text:'满印迷你标识',
  64. type:'围巾'
  65. },{
  66. src:'/static/img/47.png',
  67. text:'大号版型夹克',
  68. type:'新品'
  69. },{
  70. src:'/static/img/45.png',
  71. text:'NEO CITY 涂鸦',
  72. type:'手提包'
  73. },{
  74. src:'/static/img/46.png',
  75. text:'满印迷你标识',
  76. type:'围巾'
  77. },{
  78. src:'/static/img/47.png',
  79. text:'大号版型夹克',
  80. type:'新品'
  81. =======
  82. type:'手提包',
  83. off:false
  84. },{
  85. src:'/static/img/46.png',
  86. text:'满印迷你标识',
  87. type:'围巾',
  88. off:false
  89. },{
  90. src:'/static/img/47.png',
  91. text:'大号版型夹克',
  92. type:'新品',
  93. off:false
  94. },{
  95. src:'/static/img/45.png',
  96. text:'NEO CITY 涂鸦',
  97. type:'手提包',
  98. off:false
  99. },{
  100. src:'/static/img/46.png',
  101. text:'满印迷你标识',
  102. type:'围巾',
  103. off:false
  104. },{
  105. src:'/static/img/47.png',
  106. text:'大号版型夹克',
  107. type:'新品',
  108. off:false
  109. >>>>>>> e34c4cd0946b018b2b1c677817c08c382bc29746
  110. }],
  111. chooseindex:-1
  112. };
  113. },
  114. onLoad() {
  115. console.log("111")
  116. },
  117. created() {
  118. this.sys = uni.getSystemInfoSync();
  119. console.log("222")
  120. // this.getfenltext()
  121. this.fenleichange();
  122. },
  123. methods: {
  124. quxiao(){
  125. for(let i=0;i<this.quanbuList.length;i++){
  126. this.quanbuList[i].off=false;
  127. }
  128. },
  129. chuku(){
  130. uni.navigateTo({
  131. url: "/pages/quchu/index",
  132. })
  133. },
  134. sosoFun(){
  135. uni.navigateTo({
  136. url: "/pages/shopsoso/index",
  137. })
  138. },
  139. fenleichange(e){
  140. var that=this;
  141. myRequest({
  142. url: "/api/MemberInfo/getFamilyMember",
  143. method:'post',
  144. data:{family_id:uni.getStorageSync("family_id")}
  145. }).then(res => {
  146. console.log(res.data)
  147. if (res.data.code == 200) {
  148. if(res.data.data.length != 0){
  149. var wu=0;
  150. for(let i=0;i<res.data.data.length;i++){
  151. if(res.data.data[i].checked==1){
  152. wu=1;
  153. that.itemuser=res.data.data[i];
  154. }
  155. }
  156. if(wu==0){
  157. that.itemuser=res.data.data[0];
  158. }
  159. }else{
  160. that.itemuser=0;
  161. }
  162. }else{
  163. that.itemuser=0;
  164. }
  165. })
  166. },
  167. getfenltext(){
  168. var that=this;
  169. myRequest({
  170. url: "/api/Category/list",
  171. method:'post',
  172. data:{}
  173. }).then(res => {
  174. console.log(res.data)
  175. if (res.data.code == 200) {
  176. if(res.data.data.length != 0){
  177. that.list=['全部'];
  178. for(let i=0;i<res.data.data.length;i++){
  179. that.list.push(res.data.data[i].category_name)
  180. }
  181. that.listlx=res.data.data;
  182. }
  183. }else{
  184. that.list=[];
  185. that.listlx=[];
  186. }
  187. })
  188. },
  189. yifu(index,item){
  190. item.off=! item.off
  191. console.log(item)
  192. },
  193. qiehuanFun(){
  194. uni.navigateTo({
  195. url: "/pages/qiehuan/index",
  196. })
  197. },
  198. randouh(){
  199. let list2 = [],that=this;
  200. for(let i=0;i<6;i++){
  201. list2.push({
  202. src:'/static/img/47.png',
  203. text:'大号版型夹克',
  204. type:'新品',
  205. off:false
  206. })
  207. }
  208. this.quanbuList=this.quanbuList.concat(list2)
  209. console.log(this.quanbuList)
  210. },
  211. gengmore(){
  212. this.randouh()
  213. },
  214. change(e){
  215. uni.$tm.toast(`你选中了${e}`);
  216. },
  217. changece(e){
  218. uni.$tm.toast(`您选中了:${e}`)
  219. },
  220. dapei(item){
  221. console.log(item)
  222. },
  223. xiangqing(item){
  224. console.log(item)
  225. },
  226. ruku(){
  227. uni.navigateTo({
  228. url: "/pages/putstorage/index",
  229. })
  230. },
  231. tianjia(){
  232. uni.navigateTo({
  233. url: "/pages/chuanghome/index",
  234. })
  235. }
  236. },
  237. }
  238. </script>
  239. <style lang="scss">
  240. /deep/ uni-scroll-view{
  241. height: auto !important;
  242. }
  243. /deep/ .tm-menubars .body{
  244. background-color: #1b1b1b !important;
  245. }
  246. .shangright{
  247. padding: 10px;
  248. }
  249. //
  250. .xiangji image{
  251. width: 30px;
  252. height: 22px;
  253. }
  254. .suosou image{
  255. width: 40px;
  256. }
  257. /deep/ .icon-search{
  258. font-size: 23px !important;
  259. color: #8E8E93 !important;
  260. }
  261. /deep/ .tm-search{
  262. width: 94%;
  263. margin: 0 auto;
  264. background-color: #414141 !important;
  265. border-radius: 10px;
  266. }
  267. /deep/ .tm-search .grey-darken-5{
  268. background-color: #414141 !important;
  269. }
  270. .dingwei{padding-bottom: 20px;}
  271. .dingwei image{width: 25px;margin-right: 10px; }
  272. .dingwei .touxiang{width: 50px;margin-right: 3px; }
  273. /deep/ .lunbo1{margin:0 !important;padding: 4px !important;margin-top: 5px !important;width: 46.6% !important;}
  274. .tuijiantp{width: 100%;}
  275. .tuijiantp image{width: 97% !important;}
  276. .yichu{margin:0 !important;padding: 4px !important;margin-top: 10px !important;}
  277. /deep/ .qiehuan .text-white{
  278. font-size: 14px;
  279. background: #303440;
  280. height: 28px;
  281. vertical-align: middle;
  282. line-height: 28px;
  283. border-radius: 20px;
  284. padding-left: 14px;
  285. padding-right: 14px;
  286. margin-top: 17%;
  287. }
  288. /deep/ .qiehuan .tm-tabs-con-item-border{display: none;}
  289. .yiguicla image{width: 95%;display: block;margin: 0 auto;margin-top: 5px;}
  290. .yiguicla{width: 30%;border-radius: 10px;}
  291. .more{text-align: center;}
  292. .more image{margin-right: 10px;vertical-align: middle;width: 30px;}
  293. .fudong{position:fixed;right:10px;bottom:150px;background: #303030;width: 130px;height: 60px;
  294. border-radius: 30px 0px 0px 30px;font-size: 14px;text-align: center;}
  295. .fudimg{width: 60px;height:60px}
  296. .anniu{width: 78%;margin: 0 auto;margin-top: 20px;padding-bottom: 30px;text-align: center;}
  297. /deep/ .tm-button .tm-button-btn uni-button{min-width: 120px !important;}
  298. /deep/ .tm-button .red{color: white !important;}
  299. </style>