多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

866 lines
26 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <view class="collection-box">
  3. <global-loading />
  4. <view class="tabsbox">
  5. <u-tabs :list="collectionTypeList" bar-width="60" :bold="false" active-color="#252744"
  6. inactive-color="#90919C" :is-scroll="false" :current="collectionTypeFlag"
  7. @change="collectionTypeActive"></u-tabs>
  8. </view>
  9. <view v-if="collectionTypeFlag == 0">
  10. <view v-if="productCollect.length>0">
  11. <view class="wid function-box">
  12. <!-- <view class="finishbox" @click="finishClick" v-if="allCheckShow">{{$t('common.finish')}}</view>-->
  13. <view v-if="allCheckShow" class="flex-row-plus editicon-box flex-items font-color-252744 fs28" @click="finishClick">
  14. <image class="editicon" src="http://36.138.125.206:8081/ceres-local-file/image/title_finish.png">
  15. </image>
  16. <!-- <text class="mar-left-10">{{$t('common.finish')}}</text>-->
  17. </view>
  18. <view v-else class="flex-row-plus editicon-box flex-items font-color-252744 fs28" @click="editClick">
  19. <image class="editicon" src="http://36.138.125.206:8081/ceres-local-file/image/title_edit.png">
  20. </image>
  21. <!-- <text class="mar-left-10">{{$t('common.edit')}}</text>-->
  22. </view>
  23. </view>
  24. <view class="swipe-box">
  25. <view class="actionBox" v-for="(item, index) in productCollect" :key="item.collectId"
  26. :index="index">
  27. <u-swipe-action :disabled="allCheckShow" ref="actionSwipe" :show="item.show" :autoClose="false" @open="productOpen(index)"
  28. @click="productActionClick" :options="options">
  29. <!-- :disabled="allCheckShow" -->
  30. <view class="flex-item" @click.stop="toGoodsDetails(item.productId,item.shopId,item.skuId)">
  31. <view class="item wid flex-row-plus flex-display">
  32. <view class="flex-items" v-show="allCheckShow">
  33. <image mode="aspectFill" v-if="item.selected == 1"
  34. @click.stop="productItemSel(index,0)"
  35. src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_active.png"
  36. class="cart-select-img"></image>
  37. <image mode="aspectFill" v-else @click.stop="productItemSel(index,1)"
  38. src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_normal.png"
  39. class="cart-select-img"></image>
  40. </view>
  41. <view class="infoCent flex-items">
  42. <image
  43. onerror="this.src='url(http://36.138.125.206:8081/ceres-local-file/image/default.png) no-repeat center';this.οnerrοr=null"
  44. class="product-img default-img" mode="aspectFill" :src="item.image" />
  45. <!-- 此层wrap在此为必写的否则可能会出现标题定位错误 -->
  46. <view class="title-wrap mar-left-20 priceBox">
  47. <text
  48. class="title u-line-2 fs28 font-color-333">{{ item.productName }}</text>
  49. <view class="flex-items">
  50. <!-- <image v-if="item.activityType" class="iconImg mar-right-10"
  51. :src="imgs[item.activityType]"></image> -->
  52. <image v-if="item.activityType===1" class="iconImg" src="http://36.138.125.206:8081/ceres-local-file/static/images/groupBuyIcon.png" alt="拼团icon"></image>
  53. <image v-if="item.activityType === 2" class="iconImg" src="http://36.138.125.206:8081/ceres-local-file/static/images/spikeIcon.png" alt="秒杀活动"></image>
  54. <image v-if="item.activityType === 3" class="iconImg discountIcon" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-03-14/38184785db4b4fbca767ada611097ae9_discount.png" alt="限时折扣活动"></image>
  55. <image v-if="item.activityType === 4" class="iconImg" src="http://36.138.125.206:8081/ceres-local-file/static/images/spikeIcon.png" alt="平台秒杀"></image>
  56. <image v-if="item.activityType===5" class="iconImg" src="http://36.138.125.206:8081/ceres-local-file/static/images/discountListIcon.png" alt="平台折扣"></image>
  57. <image v-if="item.activityType===9" class="iconImg" src="http://36.138.125.206:8081/ceres-local-file/static/images/memberCenterIcon.png" alt="会员价"></image>
  58. <image v-if="item.activityType === 8" class="iconImg" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png" alt="场景营销"></image>
  59. <text class="fs32 font-color-252744">¥</text>
  60. <text class="fs32 font-color-252744 mar-right-20">{{item.price}}</text>
  61. <text
  62. class="font-color-BCBDC6 discountsPriceLine fs22 mar-top-10">¥{{item.originalPrice}}</text>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </u-swipe-action>
  69. </view>
  70. </view>
  71. <view v-if="allCheckShow" class="pad-bot-140"></view>
  72. <view v-show="allCheckShow" class="allcheck-box flex-row-plus flex-sp-between flex-items">
  73. <view class="left">
  74. <image mode="aspectFill" v-if="isAllProCheck"
  75. src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_active.png"
  76. class="cart-select-img"
  77. @click="allProductSel(0)"></image>
  78. <image mode="aspectFill" v-else src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_normal.png"
  79. class="cart-select-img" @click="allProductSel(1)"></image>
  80. <text>全选</text>
  81. </view>
  82. <view class="right">
  83. <view class="btn-delete" @click="showCardModalPaoductDel">删除</view>
  84. </view>
  85. </view>
  86. <view v-if="allCheckShow" class="pad-bot-140"></view>
  87. </view>
  88. <view v-if="productCollect.length==0&&proCollectShow" class="mar-top-60 empty-box">
  89. <image class="collect-empty" src="http://36.138.125.206:8081/ceres-local-file/static/images/collectEmpty.png"></image>
  90. <view class="tohome-box flex-items-plus">暂无收藏</view>
  91. </view>
  92. </view>
  93. <view v-if="collectionTypeFlag == 1">
  94. <view v-if="storeCollect.length>0">
  95. <!-- <view class="finishbox" @click="finishClick" v-if="allCheckShow">{{$t('common.finish')}}</view>-->
  96. <view v-if="allCheckShow" class="flex-row-plus editicon-box flex-items font-color-252744 fs28" @click="finishClick">
  97. <image class="editicon" src="http://36.138.125.206:8081/ceres-local-file/image/title_finish.png">
  98. </image>
  99. <!-- <text class="mar-left-10">{{$t('common.finish')}}</text>-->
  100. </view>
  101. <view v-else class="flex-row-plus editicon-box flex-items font-color-252744 fs28" @click="editClick">
  102. <image class="editicon" src="http://36.138.125.206:8081/ceres-local-file/image/title_edit.png">
  103. </image>
  104. <!-- <text class="mar-left-10">{{$t('common.edit')}}</text>-->
  105. </view>
  106. <view class="swipe-box">
  107. <view class="shopBox" v-for="(item, index) in storeCollect" :key="item.collectId" :index="index">
  108. <u-swipe-action ref="shopActionSwipe" :disabled="allCheckShow" :show="item.show" :options="options" @click="storeActionClick(index)"
  109. @open="storeOpen(index)">
  110. <view class="item wid flex-row-plus flex-display">
  111. <view v-show="allCheckShow" class="flex-items">
  112. <image mode="aspectFill" v-if="item.selected == 1"
  113. @click.stop="storeItemSel(index,0)"
  114. src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_active.png"
  115. class="cart-select-img"></image>
  116. <image mode="aspectFill" v-else @click.stop="storeItemSel(index,1)"
  117. src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_normal.png"
  118. class="cart-select-img"></image>
  119. </view>
  120. <view class="infoCent">
  121. <view class="flex-row-plus flex-sp-between flex-items-plus wid" @click="toStoreClick(item.shopId)">
  122. <view class="flex-items-plus flex-row pad-topbot-10">
  123. <image class="head-img" mode="aspectFill" :src="item.shopLogo" />
  124. <!-- 此层wrap在此为必写的否则可能会出现标题定位错误 -->
  125. <view class="title-wrap mar-left-20">
  126. <text class="shop-title u-line-2 shopName">{{ item.shopName }}</text>
  127. <view style="display: flex;align-items: center;margin-top: 5rpx">
  128. <image class="shop-follow-img" src="http://36.138.125.206:8081/ceres-local-file/image/shop_follow.png"/>
  129. <text class="font-color-25274 fs24 mar-left-6">{{item.person}}</text>
  130. </view>
  131. </view>
  132. </view>
  133. <image class="shop-forward-img" src="http://36.138.125.206:8081/ceres-local-file/image/icon_common_big_forward.png"/>
  134. </view>
  135. <view class="shopImgBox" v-if="item.productList.length>0">
  136. <view class="itemImgBox" v-for="(sItem, sIndex) of item.productList.slice(0, 5)"
  137. :key="sIndex"
  138. @click.stop="goodsDateils(sItem.shopId,sItem.productId,sItem.skuId)">
  139. <image :src="sItem.image" class="pic-img default-img"
  140. onerror="this.src='url(http://36.138.125.206:8081/ceres-local-file/image/default.png) no-repeat center';this.οnerrοr=null"></image>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </u-swipe-action>
  146. </view>
  147. </view>
  148. <view v-show="allCheckShow" class="allcheck-box flex-row-plus flex-sp-between flex-items">
  149. <view class="left">
  150. <image mode="aspectFill" v-if="isAllStoreCheck"
  151. src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_active.png" class="cart-select-img"
  152. @click="allStoreSel(0)"></image>
  153. <image mode="aspectFill" v-else src="http://36.138.125.206:8081/ceres-local-file/image/icon_cart_select_normal.png"
  154. class="cart-select-img" @click="allStoreSel(1)"></image>
  155. <text>全选</text>
  156. </view>
  157. <view class="right">
  158. <view class="btn-delete" @click="showCardModalshopDel">删除</view>
  159. </view>
  160. </view>
  161. <view v-if="allCheckShow" class="pad-bot-140"></view>
  162. </view>
  163. <view v-if="storeCollect.length==0&&storeCollectShow" class="mar-top-60 empty-box">
  164. <image class="collect-empty" src="http://36.138.125.206:8081/ceres-local-file/static/images/collectEmpty.png"></image>
  165. <view class="tohome-box flex-items-plus">暂无收藏</view>
  166. </view>
  167. </view>
  168. <!-- 删除确认弹窗 -->
  169. <tui-modal :show="cardModal" :custom="true" :fadein="true">
  170. <view class="Put-box1">
  171. <view class="text-align fs34 fs-bold">
  172. {{$t('common.notice_dialog_title')}}
  173. </view>
  174. <view v-if="paoductDelSubmit" class="mar-top-40 text-align">
  175. 是否删除该商品
  176. </view>
  177. <view v-if="shopDelSubmit" class="mar-top-40 text-align">
  178. 是否删除该店铺
  179. </view>
  180. <view class="flex-display flex-sp-between">
  181. <view class="btn submit" v-if="paoductDelSubmit" @click="paoductDel">确定</view>
  182. <view class="btn submit" v-if="shopDelSubmit" @click="shopDel">确定</view>
  183. </view>
  184. </view>
  185. <view v-if="cardModal" @click="cardModal = false" class="cancelDel">
  186. <image src="http://36.138.125.206:8081/ceres-local-file/static/images/cancelClose.png" mode=""></image>
  187. </view>
  188. </tui-modal>
  189. </view>
  190. </template>
  191. <script>
  192. import tuiModal from "@/components/modal/modal";
  193. const NET = require('../../utils/request')
  194. const API = require('../../config/api')
  195. export default {
  196. components: {
  197. tuiModal
  198. },
  199. data() {
  200. return {
  201. imgs: [
  202. 'http://36.138.125.206:8081/ceres-local-file/static/images/groupBuyIcon.png',
  203. 'http://36.138.125.206:8081/ceres-local-file/static/images/spikeIcon.png',
  204. 'http://36.138.125.206:8081/ceres-local-file/static/images/discountListIcon.png',
  205. 'http://36.138.125.206:8081/ceres-local-file/static/images/spikeIcon.png',
  206. 'http://36.138.125.206:8081/ceres-local-file/static/images/discountListIcon.png',
  207. ],
  208. collectionTypeList: [{
  209. name: '商品'
  210. }, {
  211. name: '店铺'
  212. }],
  213. collectionTypeFlag: 0,
  214. disabled: false,
  215. btnWidth: 180,
  216. show: false,
  217. options: [{
  218. text: ' ',
  219. style: {
  220. backgroundColor: '#F15C48'
  221. }
  222. }],
  223. isAllProCheck: false,
  224. isAllStoreCheck: false,
  225. allCheckShow: false,
  226. productCollect: [],
  227. storeCollect: [],
  228. productPage: 1,
  229. productPageSize: 10,
  230. proloadingType: 0,
  231. storePage: 1,
  232. storePageSize: 10,
  233. storeloadingType: 0,
  234. storeCollectShow: false,
  235. proCollectShow: false,
  236. cardModal: false,
  237. paoductDelSubmit: false,
  238. shopDelSubmit: false,
  239. ids: null,
  240. currentIndex: null,
  241. currentType: null
  242. };
  243. },
  244. onLoad() {
  245. this.getProductCollect()
  246. },
  247. onReachBottom() {
  248. if (this.collectionTypeFlag == 0) {
  249. if (this.proloadingType == 1) {
  250. uni.stopPullDownRefresh()
  251. } else {
  252. this.productPage = this.productPage + 1
  253. this.getProductCollect()
  254. }
  255. } else if (this.collectionTypeFlag == 1) {
  256. if (this.storeloadingType == 1) {
  257. uni.stopPullDownRefresh()
  258. } else {
  259. this.storePage = this.storePage + 1
  260. this.getStoreCollect()
  261. }
  262. }
  263. },
  264. methods: {
  265. //批量删除
  266. showCardModalPaoductDel() {
  267. let isShowProoductDelSubmit = false
  268. // 商品
  269. this.productCollect.forEach((value, index) => {
  270. if (value.selected == 1) {
  271. isShowProoductDelSubmit = true
  272. }
  273. })
  274. if (isShowProoductDelSubmit === true) {
  275. this.cardModal = true
  276. this.paoductDelSubmit = true
  277. this.shopDelSubmit = false
  278. } else {
  279. this.$u.toast(`请先选择要删除的收藏宝贝!`);
  280. }
  281. },
  282. paoductDel() {
  283. if (this.currentType === 1) {
  284. this.cancelCollect(this.ids)
  285. this.productCollect.splice(this.currentIndex, 1);
  286. } else {
  287. let ids = []
  288. this.productCollect.forEach((value, index) => {
  289. if (value.selected == 1) {
  290. ids.push(value.collectId)
  291. }
  292. })
  293. NET.request(API.deleteCollect, {
  294. ids: ids
  295. }, 'POST').then(res => {
  296. this.productCollect = []
  297. this.cardModal = false
  298. this.$u.toast(this.$t('common.deletesuccess'));
  299. this.productPage = 1
  300. this.getProductCollect()
  301. }).catch(res => {
  302. this.cardModal = false
  303. this.$u.toast(this.$t('common.deletefail'));
  304. })
  305. }
  306. },
  307. showCardModalshopDel() {
  308. let isShowShopDelSubmit = false
  309. // 店铺
  310. this.storeCollect.forEach((value, index) => {
  311. if (value.selected == 1) {
  312. isShowShopDelSubmit = true
  313. }
  314. })
  315. if (isShowShopDelSubmit === true) {
  316. this.cardModal = true
  317. this.shopDelSubmit = true
  318. this.paoductDelSubmit = false
  319. } else {
  320. this.$u.toast(`请先选择要删除的收藏店铺!`);
  321. }
  322. },
  323. shopDel() {
  324. if (this.currentType === 2) {
  325. this.cancelCollect(this.ids)
  326. this.storeCollect.splice(this.currentIndex, 1);
  327. } else {
  328. let ids = []
  329. this.storeCollect.forEach((value, index) => {
  330. if (value.selected == 1) {
  331. ids.push(value.collectId)
  332. }
  333. })
  334. NET.request(API.deleteCollect, {
  335. ids: ids
  336. }, 'POST').then(res => {
  337. this.storeCollect = []
  338. this.cardModal = false
  339. this.$u.toast(this.$t('common.deletesuccess'));
  340. this.storePage = 1
  341. this.getStoreCollect()
  342. }).catch(res => {
  343. this.cardModal = false
  344. this.$u.toast(this.$t('common.deletefail'));
  345. })
  346. }
  347. },
  348. //去店铺
  349. toStoreClick(storeId) {
  350. uni.navigateTo({
  351. url: '../../pages_category_page1/store/index?storeId=' + storeId
  352. })
  353. },
  354. //去商品详情
  355. toGoodsDetails(productId, shopId, skuId) {
  356. uni.navigateTo({
  357. url: '../../pages_category_page1/goodsModule/goodsDetails?productId=' + productId +
  358. '&shopId=' + shopId + '&skuId=' + skuId
  359. })
  360. },
  361. collectionTypeActive(index) {
  362. this.collectionTypeFlag = index
  363. if (index == 0) {
  364. this.productPage = 1
  365. this.productCollect = []
  366. this.proloadingType = 0
  367. this.getProductCollect()
  368. } else if (index == 1) {
  369. this.storePage = 1
  370. this.storeCollect = []
  371. this.storeloadingType = 0
  372. this.getStoreCollect()
  373. }
  374. },
  375. storeClick(index, index1) {
  376. if (index1 == 0) {
  377. this.cardModal = true
  378. this.shopDelSubmit = true
  379. this.ids = this.storeCollect[index].collectId
  380. this.currentIndex = index
  381. this.currentType = 2
  382. }
  383. },
  384. // 如果打开一个的时候,不需要关闭其他,则无需实现本方法
  385. productOpen(index) {
  386. // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
  387. // 原本为'false',再次设置为'false'会无效
  388. this.productCollect[index].show = true;
  389. // console.log(this.productCollect,index)
  390. this.productCollect.map((val, idx) => {
  391. if (index != idx) this.productCollect[idx].show = false;
  392. })
  393. // 商品删除参数
  394. this.ids = this.productCollect[index].collectId
  395. this.currentIndex = index
  396. this.currentType = 1
  397. },
  398. // 打开删除层
  399. productActionClick() {
  400. this.cardModal = true
  401. this.paoductDelSubmit = true
  402. this.shopDelSubmit = false
  403. },
  404. storeOpen(index) {
  405. // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
  406. // 原本为'false',再次设置为'false'会无效
  407. this.storeCollect[index].show = true;
  408. this.storeCollect.map((val, idx) => {
  409. if (index != idx) this.storeCollect[idx].show = false;
  410. })
  411. // 店铺删除参数
  412. this.ids = this.storeCollect[index].collectId
  413. this.currentIndex = index
  414. this.currentType = 2
  415. },
  416. // 打开删除层
  417. storeActionClick() {
  418. this.cardModal = true
  419. this.paoductDelSubmit = false
  420. this.shopDelSubmit = true
  421. },
  422. //商品选中
  423. productItemSel(index, number) {
  424. this.productCollect[index].selected = number
  425. let proSelectNum = 0
  426. this.productCollect.forEach((value, index) => {
  427. if (this.productCollect[index].selected == 0) {
  428. this.isAllProCheck = false
  429. } else {
  430. proSelectNum++
  431. }
  432. })
  433. if (this.productCollect.length == proSelectNum) {
  434. this.isAllProCheck = true
  435. }
  436. },
  437. //店铺选中
  438. storeItemSel(index, number) {
  439. this.storeCollect[index].selected = number
  440. let storeSelectNum = 0
  441. this.storeCollect.forEach((value, index) => {
  442. if (this.storeCollect[index].selected == 0) {
  443. this.isAllStoreCheck = false
  444. } else {
  445. storeSelectNum++
  446. }
  447. })
  448. if (this.storeCollect.length == storeSelectNum) {
  449. this.isAllStoreCheck = true
  450. }
  451. },
  452. //全选
  453. allProductSel(type) {
  454. this.isAllProCheck = !this.isAllProCheck
  455. this.productCollect.forEach((value, index) => {
  456. this.productCollect[index].selected = type
  457. })
  458. },
  459. allStoreSel(type) {
  460. this.isAllStoreCheck = !this.isAllStoreCheck
  461. this.storeCollect.forEach((value, index) => {
  462. this.storeCollect[index].selected = type
  463. })
  464. },
  465. editClick() {
  466. this.allCheckShow = true
  467. let actionSwipe = this.$refs.actionSwipe;
  468. let shopActionSwipe = this.$refs.shopActionSwipe;
  469. if(actionSwipe){
  470. actionSwipe.forEach(item=>item.close())
  471. }
  472. if(shopActionSwipe){
  473. shopActionSwipe.forEach(item=>item.close())
  474. }
  475. },
  476. finishClick() {
  477. this.allCheckShow = false
  478. },
  479. //收藏商品查询
  480. getProductCollect() {
  481. // uni.showLoading({
  482. // mask: true,
  483. // title: '加载中...'
  484. // })
  485. NET.request(API.getProductCollect, {
  486. page: this.productPage,
  487. pageSize: this.productPageSize
  488. },
  489. 'GET').then(res => {
  490. uni.hideLoading()
  491. if (res.data.list.length == 0) {
  492. this.proCollectShow = true
  493. this.proloadingType = 1
  494. this.productPage = this.productPage
  495. } else {
  496. this.productCollect = this.productCollect.concat(res.data.list)
  497. this.productCollect.forEach((value, index) => {
  498. value['show'] = false
  499. value['selected'] = 0
  500. })
  501. }
  502. }).catch(res => {
  503. uni.showToast({
  504. title: '收藏商品查询失败',
  505. icon: "none"
  506. })
  507. })
  508. },
  509. //收藏店铺查询
  510. getStoreCollect() {
  511. // console.log(111)
  512. // uni.showLoading({
  513. // mask: true,
  514. // title: '加载中...'
  515. // })
  516. NET.request(API.getStoreCollect, {
  517. page: this.storePage,
  518. pageSize: this.storePageSize
  519. },
  520. 'GET').then(res => {
  521. uni.hideLoading()
  522. if (res.data.list.length == 0) {
  523. this.storeCollectShow = true
  524. this.storeloadingType = 1
  525. this.storePage = this.storePage
  526. }
  527. this.storeCollect = this.storeCollect.concat(res.data.list)
  528. this.storeCollect.forEach((value, index) => {
  529. value['show'] = false
  530. value['selected'] = 0
  531. })
  532. }).catch(res => {
  533. uni.showToast({
  534. title: '失败',
  535. icon: "none"
  536. })
  537. })
  538. },
  539. //取消收藏
  540. cancelCollect(ids) {
  541. NET.request(API.cancelCollect, {
  542. ids: [ids]
  543. }, 'POST').then(res => {
  544. this.$u.toast(this.$t('common.deletesuccess'));
  545. this.cardModal = false
  546. this.currentType = null
  547. this.currentIndex = null
  548. this.ids = null
  549. if (res.code == "200") {
  550. this.productCollect = []
  551. this.storeCollect = []
  552. this.getStoreCollect()
  553. this.getProductCollect()
  554. } else {
  555. this.$u.toast(res.message);
  556. }
  557. }).catch(res => {
  558. uni.showToast({
  559. title: '失败',
  560. icon: "none"
  561. })
  562. })
  563. },
  564. //商品详情
  565. goodsDateils(shopId, productId, skuId) {
  566. uni.navigateTo({
  567. url: '/pages_category_page1/goodsModule/goodsDetails?shopId=' + shopId + '&productId=' +
  568. productId + '&skuId=' + skuId
  569. })
  570. }
  571. }
  572. }
  573. </script>
  574. <style lang="scss" scoped>
  575. .collection-box {
  576. .empty-box {
  577. display: flex;
  578. justify-content: center;
  579. flex-direction: column;
  580. align-items: center;
  581. .tohome-box {
  582. color: #999999;
  583. margin-top: 50rpx;
  584. }
  585. .collect-empty {
  586. margin-top: 30%;
  587. width: 198rpx;
  588. height: 183rpx;
  589. }
  590. }
  591. .function-box {
  592. background-color: #FAFAFA;
  593. }
  594. .tabsbox {
  595. margin-top: 4rpx;
  596. background-color: #FFFFFF;
  597. }
  598. .editicon-box {
  599. display: flex;
  600. justify-content: flex-end;
  601. position: relative;
  602. left: -30rpx;
  603. padding: 16rpx 0;
  604. }
  605. .finishbox {
  606. display: flex;
  607. justify-content: flex-end;
  608. position: relative;
  609. left: -30rpx;
  610. padding: 16rpx 0;
  611. }
  612. .editicon {
  613. width: 32rpx;
  614. height: 32rpx;
  615. }
  616. .swipe-box {
  617. padding: 0 20rpx;
  618. .actionBox {
  619. margin-bottom: 20rpx;
  620. }
  621. .item {
  622. display: flex;
  623. .infoCent {
  624. width: 100%;
  625. padding: 20rpx;
  626. }
  627. .selctBtn {
  628. background: #F7F7F7;
  629. }
  630. }
  631. .shopImgBox {
  632. display: flex;
  633. justify-content: end;
  634. margin-left: 90rpx;
  635. padding-bottom: 20rpx;
  636. margin-top: 20rpx;
  637. .itemImgBox {
  638. margin-right: 20rpx;
  639. margin-left: 5rpx;
  640. image {
  641. width: 100rpx;
  642. height: 100rpx;
  643. border-radius: 10rpx;
  644. }
  645. }
  646. }
  647. .product-img {
  648. width: 150rpx;
  649. flex: 0 0 150rpx;
  650. height: 150rpx;
  651. border-radius: 30rpx;
  652. }
  653. .head-img {
  654. width: 80rpx;
  655. flex: 0 0 80rpx;
  656. height: 80rpx;
  657. border-radius: 10rpx;
  658. }
  659. .title {
  660. text-align: left;
  661. font-size: 28rpx;
  662. color: #252744;
  663. height: 100rpx;
  664. padding-right: 20rpx;
  665. }
  666. .shop-title {
  667. text-align: left;
  668. font-size: 32rpx;
  669. color: #252744;
  670. font-weight: bold;
  671. height: 100rpx;
  672. padding-right: 20rpx;
  673. }
  674. .shopName {
  675. height: auto;
  676. overflow: hidden;
  677. white-space: nowrap;
  678. text-overflow: ellipsis;
  679. width: 340rpx;
  680. }
  681. .cart-select-img {
  682. width: 40upx;
  683. height: 40upx;
  684. margin: 0upx 30upx 0upx;
  685. box-sizing: border-box;
  686. }
  687. .toStore {
  688. //color: #FFFFFF;
  689. //padding: 10rpx 27rpx;
  690. //background: #252744;
  691. //margin-right: 15rpx;
  692. //border-radius: 30rpx;
  693. image {
  694. width: 20rpx;
  695. height: 34px;
  696. margin-left: 10rpx;
  697. }
  698. }
  699. .shopBox {
  700. margin-bottom: 20rpx;
  701. }
  702. }
  703. .allcheck-box {
  704. background-color: #FFFFFF;
  705. width: 100%;
  706. position: fixed;
  707. bottom: 0upx;
  708. .left {
  709. display: flex;
  710. flex-direction: row;
  711. align-items: center;
  712. font-size: 28upx;
  713. color: #666;
  714. .cart-select-img {
  715. width: 40upx;
  716. height: 40upx;
  717. margin: 30upx;
  718. box-sizing: border-box;
  719. }
  720. }
  721. .right {
  722. display: flex;
  723. flex-direction: row;
  724. align-items: center;
  725. box-sizing: border-box;
  726. }
  727. .btn-delete {
  728. width: 232rpx;
  729. height: 80rpx;
  730. line-height: 80rpx;
  731. text-align: center;
  732. font-size: 30rpx;
  733. color: #FFFFFF;
  734. margin-right: 30rpx;
  735. background: #F54639;
  736. border-radius: 50rpx;
  737. }
  738. }
  739. .Put-box1 {
  740. .btn {
  741. text-align: center;
  742. margin-top: 40rpx;
  743. border: 1px solid #333333;
  744. height: 80upx;
  745. line-height: 80upx;
  746. width: 100%;
  747. color: #333333;
  748. }
  749. .submit {
  750. background-color: #333333;
  751. color: #FFEBC4;
  752. }
  753. }
  754. .cancelDel {
  755. position: absolute;
  756. bottom: -50px;
  757. left: 45%;
  758. image {
  759. width: 60upx;
  760. height: 60upx;
  761. }
  762. }
  763. }
  764. .priceBox {
  765. .iconImg {
  766. width: 58rpx;
  767. height: 36rpx;
  768. margin-right: 10rpx;
  769. }
  770. .discountIcon{
  771. width: 100rpx;
  772. }
  773. }
  774. </style>
  775. <style scoped>
  776. .tabsbox /deep/ #u-tab-item-0 {
  777. position: relative;
  778. }
  779. .tabsbox /deep/ .u-tab-bar {
  780. background-color: #252744 !important;
  781. }
  782. .tabsbox /deep/ #u-tab-item-0::before {
  783. content: '';
  784. width: 1rpx;
  785. height: 35rpx;
  786. display: block;
  787. background: #BCBDC6;
  788. position: absolute;
  789. right: 0;
  790. top: 30rpx;
  791. }
  792. .swipe-box /deep/ .u-swipe-del {
  793. align-items: center;
  794. justify-content: center;
  795. width: 160rpx !important;
  796. }
  797. .swipe-box /deep/ .u-btn-text {
  798. width: 60rpx;
  799. height: 60rpx;
  800. display: block;
  801. background: url("http://36.138.125.206:8081/ceres-local-file/static/images/delIcon.png") no-repeat center center;
  802. background-size: contain;
  803. }
  804. .shop-follow-img{
  805. width: 27rpx;
  806. height: 24rpx;
  807. }
  808. .shop-forward-img{
  809. width: 20rpx;
  810. height: 34rpx;
  811. margin-right: 30rpx;
  812. }
  813. </style>
  814. <style>
  815. page {
  816. background-color: #FAFAFA;
  817. }
  818. </style>