index.vue 7.1 KB

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