1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-browsingHistory-index"],{"3c13":function(t,i,e){var n=e("c86c");i=n(!1),i.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-page-body[data-v-46775ce2]{background:#fff}body.?%PAGE?%[data-v-46775ce2]{background:#fff}.history[data-v-46775ce2]{margin-bottom:%?96?%}.history .history_count[data-v-46775ce2]{padding:0 %?30?% 0;padding:0 %?30?% calc(0rpx+ constant(safe-area-inset-bottom));padding:0 %?30?% calc(%?0?% + env(safe-area-inset-bottom))}.history .history_header[data-v-46775ce2]{justify-content:space-between;margin:%?30?% 0}.history .history_header uni-text[data-v-46775ce2]{font-size:%?26?%;color:#666}.history .history_header .text[data-v-46775ce2]{color:var(--view-theme)}.history .list[data-v-46775ce2]{margin-top:%?20?%}.history .list .item_time[data-v-46775ce2]{font-size:%?36?%;color:#282828;font-weight:700;display:flex;align-items:center}.history .list .item_main[data-v-46775ce2]{margin-top:%?30?%}.history .item[data-v-46775ce2]{width:%?217?%;border-radius:%?16?%;margin:0 %?20?% %?20?% 0;position:relative}.history .item[data-v-46775ce2]:nth-child(3n){margin-right:0}.history .item[data-v-46775ce2] uni-image, .history .item[data-v-46775ce2] .easy-loadimage, .history .item uni-image[data-v-46775ce2]{width:%?217?%;height:%?217?%;border-radius:%?16?%}.history .item .info[data-v-46775ce2]{margin-top:%?20?%;color:var(--view-priceColor);font-size:%?24?%}[data-v-46775ce2] .loadfail-img, .easy-img[data-v-46775ce2]{width:%?217?%;height:%?217?%;border-radius:%?16?%;display:block}.item_time .checkbox .iconfont[data-v-46775ce2]{font-size:%?38?%;color:#999;margin-right:%?10?%}.item_time .checkbox .iconfont.icon-xuanzhong1[data-v-46775ce2]{color:var(--view-theme)}.item_main .checkbox .iconfont[data-v-46775ce2]{font-size:%?40?%;color:#dedede;position:absolute;right:%?12?%;top:%?12?%;z-index:10;border-radius:100%}.item_main .checkbox .iconfont.icon-weixuanzhong[data-v-46775ce2]::after{content:"";display:block;width:%?36?%;height:%?36?%;background:rgba(0,0,0,.38);position:absolute;top:%?2?%;left:%?2?%;border-radius:100%;border:1px solid #dedede}.history .item .icon-xuanzhong1[data-v-46775ce2]{color:var(--view-theme)}.history .footer[data-v-46775ce2]{z-index:99;width:100%;height:%?100?%;height:calc(100rpx+ constant(safe-area-inset-bottom));height:calc(%?100?% + env(safe-area-inset-bottom));background-color:#fff;position:fixed;padding:0 %?20?%;box-sizing:border-box;border-top:1px solid #eee;bottom:var(--window-bottom)}.allcheckbox .iconfont[data-v-46775ce2]{margin-right:11px;font-size:%?40?%;color:#ccc}.allcheckbox .icon-xuanzhong1[data-v-46775ce2]{color:var(--view-theme)}.history .footer .button .bnt[data-v-46775ce2]{font-size:%?28?%;color:#999;border-radius:%?50?%;border:1px solid #999;width:%?160?%;height:%?60?%;text-align:center;line-height:%?60?%}.history .footer .button .bnt.collect_btn[data-v-46775ce2]{color:var(--view-theme);border-color:var(--view-theme)}',""]),t.exports=i},"4a82":function(t,i,e){"use strict";e("6a54"),Object.defineProperty(i,"__esModule",{value:!0}),i.goShopDetail=function(t,i){return new Promise((function(i){1===t.product_type?uni.navigateTo({url:"/pages/activity/goods_seckill_details/index?id=".concat(t.product_id,"&time=").concat(t.stop_time)}):2===t.product_type?uni.navigateTo({url:"/pages/activity/presell_details/index?id=".concat(t.activity_id)}):0===t.product_type||10===t.product_type?uni.navigateTo({url:"/pages/goods_details/index?id=".concat(t.product_id)}):4===t.product_type?uni.navigateTo({url:"/pages/activity/combination_details/index?id=".concat(t.activity_id)}):40===t.product_type?uni.navigateTo({url:"/pages/activity/combination_status/index?id=".concat(t.activity_id)}):i(t)}))},e("bf0f"),e("c223")},"5dce":function(t,i,e){var n=e("c86c");i=n(!1),i.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.empty-box[data-v-f1a26612]{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:%?200?%}.empty-box uni-image[data-v-f1a26612]{width:%?414?%;height:%?240?%}.empty-box .txt[data-v-f1a26612]{font-size:%?26?%;color:#999}',""]),t.exports=i},"61ef":function(t,i,e){"use strict";e("6a54");var n=e("f5bd").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("bf0f"),e("2797"),e("c223"),e("aa9c"),e("dd2b"),e("8f71");var a=n(e("8329")),s=e("672a"),o=e("4a82"),c=n(e("23ab")),l=e("8f59"),r={components:{emptyPage:a.default,easyLoadimage:c.default},computed:(0,l.mapGetters)(["viewColor"]),data:function(){return{list:[],isScroll:!0,page:1,limit:50,isAllSelect:!1,isEdit:!1,allArr:[],total:0}},onShow:function(){this.list=[],this.allArr=[],this.isScroll=!0,this.page=1,this.getList(),this.isAllSelect=!1,this.isEdit=!1},methods:{getList:function(){var t=this;(0,s.historyList)({page:t.page,limit:t.limit}).then((function(i){var e=i.data;t.total=e.count,e.list&&(e.list.forEach((function(t,i){t.check=!1})),t.isScroll=e.list.length>=t.limit,t.page+=1,t.list=t.list.concat(e.list),t.listFilter(t.list))}))},listFilter:function(t){var i=this;t.forEach((function(t,e){t.allCheck||i.$set(t,"allCheck",!1),t.list.forEach((function(t,e){t.check||i.$set(t,"check",!1)}))})),this.isAllSelect&&this.cartAllCheck("allCheck")},checkboxAllChange:function(){this.isAllSelect=!this.isAllSelect,this.cartAllCheck("allCheck")},handleEdit:function(){this.isEdit=!this.isEdit},historyCheck:function(t){t.check=!t.check,this.cartAllCheck("goodsCheck")},subDel:function(t){var i,e=this,n="empty"==t?"确定清空浏览记录?":"确定删除浏览记录?";if("batch"==t?(i=[],e.list.forEach((function(t){t.list.forEach((function(t){t.check&&i.push(t.user_history_id)}))}))):i=1,0==i.length&&"batch"==t)return e.$util.Tips({title:"请选择记录"});uni.showModal({title:"提示",content:n,success:function(t){if(t.confirm)(0,s.historyBatchDelete)({history_id:i}).then((function(t){return e.allArr=[],e.page=1,e.list=[],e.isEdit=!1,e.isScroll=!0,e.getList(),e.$util.Tips({title:t.message,icon:"success"})})).catch((function(t){return e.$util.Tips({title:t})}));else if(t.cancel)return e.$util.Tips({title:"已取消"})}})},subCollect:function(){var t=this,i=[];t.list.forEach((function(t){t.list.forEach((function(t){t.check&&i.push(t.spu.spu_id)}))})),(0,s.historyBatchCollect)({type_id:i,type:1}).then((function(i){return t.allArr=[],t.page=1,t.list=[],t.isEdit=!1,t.isScroll=!0,t.isAllSelect=!1,t.getList(),t.$util.Tips({title:i.message,icon:"success"})})).catch((function(i){return t.$util.Tips({title:i})}))},historyAllCheck:function(t,i){t.allCheck?(t.allCheck=!1,t.list.forEach((function(t,i){t.check=!1}))):(t.allCheck=!0,t.list.forEach((function(t,i){t.check=!0}))),this.cartAllCheck("goodsCheck")},bindDelete:function(t,i){var e=this;(0,s.historyDelete)(t.user_history_id).then((function(t){e.list.splice(i,1),uni.showToast({title:t.message,icon:"none"})})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},goPage:function(t){(0,o.goShopDetail)(t.spu).then((function(i){uni.navigateTo({url:"/pages/goods_details/index?id=".concat(t.spu.product_id)})}))},cartAllCheck:function(t){var i=this,e=[];this.list.forEach((function(n,a){if("goodsCheck"==t){var s=n.list.filter((function(t){return 1==t.check}));n.list.length==s.length?(n.allCheck=!0,e.push(n)):n.allCheck=!1}else n.list.forEach((function(t){t.check=i.isAllSelect})),n.allCheck=i.isAllSelect,n.allCheck&&e.push(n)})),this.isAllSelect=e.length==this.list.length}},onReachBottom:function(){this.getList()},onPageScroll:function(t){uni.$emit("scroll")}};i.default=r},"676c":function(t,i,e){"use strict";var n=e("9da7"),a=e.n(n);a.a},8329:function(t,i,e){"use strict";e.r(i);var n=e("d98d"),a=e("c4bf1");for(var s in a)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(s);e("676c");var o=e("828b"),c=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"f1a26612",null,!1,n["a"],void 0);i["default"]=c.exports},"874a":function(t,i,e){"use strict";e.r(i);var n=e("61ef"),a=e.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(s);i["default"]=a.a},"89fe":function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return s})),e.d(i,"a",(function(){return n}));var n={easyLoadimage:e("23ab").default},a=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("v-uni-view",{staticClass:"page-wrapper history",style:t.viewColor},[e("v-uni-view",{staticClass:"history_count"},[t.list.length>0?[e("v-uni-view",{staticClass:"history_header acea-row"},[e("v-uni-text",[t._v("共"+t._s(t.total)+"条")]),e("v-uni-view",{staticClass:"text",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.handleEdit.apply(void 0,arguments)}}},[t._v(t._s(t.isEdit?"完成":"管理"))])],1),t._l(t.list,(function(i,n){return e("v-uni-view",{staticClass:"list"},[e("v-uni-view",{staticClass:"item_time"},[t.isEdit?e("v-uni-view",{staticClass:"checkbox",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.historyAllCheck(i,n)}}},[i.allCheck?e("v-uni-text",{staticClass:"iconfont icon-xuanzhong1"}):e("v-uni-text",{staticClass:"iconfont icon-weixuanzhong"})],1):t._e(),e("v-uni-view",[t._v(t._s(i.date))])],1),e("v-uni-view",{staticClass:"item_main acea-row"},t._l(i.list,(function(i,n){return i.spu?e("v-uni-view",{staticClass:"item acea-row",class:{gary:i.spu&&1==i.spu.status}},[t.isEdit?e("v-uni-view",{staticClass:"item item_count",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.historyCheck(i,n)}}},[e("v-uni-view",{staticClass:"checkbox"},[i.check?e("v-uni-text",{staticClass:"iconfont icon-xuanzhong1"}):e("v-uni-text",{staticClass:"iconfont icon-weixuanzhong"})],1),e("easy-loadimage",{staticClass:"easy-img",attrs:{mode:"widthFix","image-src":i.spu.image}}),e("v-uni-view",{staticClass:"info"},[e("v-uni-view",{staticClass:"msg"},[i.spu&&1==i.spu.status?[e("v-uni-view",{staticClass:"price"},[e("v-uni-text",[t._v("¥")]),t._v(t._s(i.spu.price))],1)]:[e("v-uni-view",{staticClass:"tips"},[t._v("该商品已下架")])]],2)],1)],1):e("v-uni-view",{staticClass:"item item_count",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goPage(i)}}},[e("easy-loadimage",{staticClass:"easy-img",attrs:{mode:"widthFix","image-src":i.spu.image}}),e("v-uni-view",{staticClass:"info"},[e("v-uni-view",{staticClass:"msg"},[i.spu&&1==i.spu.status?[e("v-uni-view",{staticClass:"price"},[e("v-uni-text",[t._v("¥")]),t._v(t._s(i.spu.price))],1)]:[e("v-uni-view",{staticClass:"tips"},[t._v("该商品已下架")])]],2)],1)],1)],1):t._e()})),1)],1)}))]:[e("emptyPage",{attrs:{title:"暂无浏览记录~"}})]],2),t.isEdit?e("v-uni-view",{staticClass:"footer acea-row row-between-wrapper"},[e("v-uni-view",[e("v-uni-view",{staticClass:"allcheckbox",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.checkboxAllChange.apply(void 0,arguments)}}},[t.isAllSelect?e("v-uni-text",{staticClass:"iconfont icon-xuanzhong1"}):e("v-uni-text",{staticClass:"iconfont icon-weixuanzhong"}),t._v("全选")],1)],1),e("v-uni-view",{staticClass:"acea-row row-between-wrapper"},[e("v-uni-view",{staticClass:"button acea-row row-middle",staticStyle:{"margin-right":"20rpx"}},[e("v-uni-form",{attrs:{"report-submit":"true"},on:{submit:function(i){arguments[0]=i=t.$handleEvent(i),t.subCollect.apply(void 0,arguments)}}},[e("v-uni-button",{staticClass:"bnt collect_btn",attrs:{formType:"submit"}},[t._v("收藏")])],1)],1),e("v-uni-view",{staticClass:"button acea-row row-middle"},[e("v-uni-form",{attrs:{"report-submit":"true"},on:{submit:function(i){arguments[0]=i=t.$handleEvent(i),t.subDel("batch")}}},[e("v-uni-button",{staticClass:"bnt delete_btn",attrs:{formType:"submit"}},[t._v("删除")])],1)],1)],1)],1):t._e()],1)},s=[]},"9da7":function(t,i,e){var n=e("5dce");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=e("967d").default;a("773f4a1f",n,!0,{sourceMap:!1,shadowMode:!1})},b7b2:function(t,i,e){"use strict";e("6a54"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n={props:{title:{type:String,default:"暂无记录"}}};i.default=n},c4bf1:function(t,i,e){"use strict";e.r(i);var n=e("b7b2"),a=e.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(s);i["default"]=a.a},c6f3:function(t,i,e){var n=e("3c13");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=e("967d").default;a("72c3855c",n,!0,{sourceMap:!1,shadowMode:!1})},ce6e:function(t,i,e){"use strict";e.r(i);var n=e("89fe"),a=e("874a");for(var s in a)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(s);e("f095");var o=e("828b"),c=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"46775ce2",null,!1,n["a"],void 0);i["default"]=c.exports},d98d:function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return a})),e.d(i,"a",(function(){}));var n=function(){var t=this.$createElement,i=this._self._c||t;return i("v-uni-view",{staticClass:"empty-box"},[i("v-uni-image",{attrs:{src:"/static/images/empty-box.png"}}),i("v-uni-view",{staticClass:"txt"},[this._v(this._s(this.title))])],1)},a=[]},f095:function(t,i,e){"use strict";var n=e("c6f3"),a=e.n(n);a.a}}]); |