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.
1 lines
15 KiB
1 lines
15 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-browsingHistory-index"],{"20b5":function(t,i,e){var a=e("f442");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=e("4f06").default;n("4ef08599",a,!0,{sourceMap:!1,shadowMode:!1})},"5bca":function(t,i,e){"use strict";var a=e("20b5"),n=e.n(a);n.a},6229:function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return n})),e.d(i,"a",(function(){}));var a=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)},n=[]},"713e":function(t,i,e){"use strict";var a=e("93e4"),n=e.n(a);n.a},8669:function(t,i,e){var a=e("24fb");i=a(!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-46377bcc]{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:%?200?%}.empty-box uni-image[data-v-46377bcc]{width:%?414?%;height:%?240?%}.empty-box .txt[data-v-46377bcc]{font-size:%?26?%;color:#999}',""]),t.exports=i},"8c6b":function(t,i,e){"use strict";e("7a82");var a=e("4ea4").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("d3b7"),e("159b"),e("99af"),e("14d9"),e("a434"),e("4de4");var n=a(e("c61e")),o=e("c6c3"),s=e("bd9e"),c=a(e("ae65")),r=e("26cb"),l={components:{emptyPage:n.default,easyLoadimage:c.default},computed:(0,r.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,o.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,a="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:a,success:function(t){if(t.confirm)(0,o.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,o.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,o.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,s.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(a,n){if("goodsCheck"==t){var o=a.list.filter((function(t){return 1==t.check}));a.list.length==o.length?(a.allCheck=!0,e.push(a)):a.allCheck=!1}else a.list.forEach((function(t){t.check=i.isAllSelect})),a.allCheck=i.isAllSelect,a.allCheck&&e.push(a)})),this.isAllSelect=e.length==this.list.length}},onReachBottom:function(){this.getList()},onPageScroll:function(t){uni.$emit("scroll")}};i.default=l},"8c78":function(t,i,e){"use strict";e.r(i);var a=e("a005"),n=e("d985");for(var o in n)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(o);e("5bca");var s=e("f0c5"),c=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"4f3a65df",null,!1,a["a"],void 0);i["default"]=c.exports},"93e4":function(t,i,e){var a=e("8669");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=e("4f06").default;n("172dfd1c",a,!0,{sourceMap:!1,shadowMode:!1})},a005:function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){return a}));var a={easyLoadimage:e("ae65").default},n=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,a){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,a)}}},[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,a){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,a)}}},[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)},o=[]},b821:function(t,i,e){"use strict";e.r(i);var a=e("d4b0"),n=e.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(o);i["default"]=n.a},bd9e:function(t,i,e){"use strict";e("7a82"),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("d3b7"),e("99af")},c61e:function(t,i,e){"use strict";e.r(i);var a=e("6229"),n=e("b821");for(var o in n)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(o);e("713e");var s=e("f0c5"),c=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"46377bcc",null,!1,a["a"],void 0);i["default"]=c.exports},d4b0:function(t,i,e){"use strict";e("7a82"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a={props:{title:{type:String,default:"暂无记录"}}};i.default=a},d985:function(t,i,e){"use strict";e.r(i);var a=e("8c6b"),n=e.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(o);i["default"]=n.a},f442:function(t,i,e){var a=e("24fb");i=a(!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-4f3a65df]{background:#fff}body.?%PAGE?%[data-v-4f3a65df]{background:#fff}.history[data-v-4f3a65df]{margin-bottom:%?96?%}.history .history_count[data-v-4f3a65df]{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-4f3a65df]{justify-content:space-between;margin:%?30?% 0}.history .history_header uni-text[data-v-4f3a65df]{font-size:%?26?%;color:#666}.history .history_header .text[data-v-4f3a65df]{color:var(--view-theme)}.history .list[data-v-4f3a65df]{margin-top:%?20?%}.history .list .item_time[data-v-4f3a65df]{font-size:%?36?%;color:#282828;font-weight:700;display:flex;align-items:center}.history .list .item_main[data-v-4f3a65df]{margin-top:%?30?%}.history .item[data-v-4f3a65df]{width:%?217?%;border-radius:%?16?%;margin:0 %?20?% %?20?% 0;position:relative}.history .item[data-v-4f3a65df]:nth-child(3n){margin-right:0}.history .item[data-v-4f3a65df] uni-image, .history .item[data-v-4f3a65df] .easy-loadimage, .history .item uni-image[data-v-4f3a65df]{width:%?217?%;height:%?217?%;border-radius:%?16?%}.history .item .info[data-v-4f3a65df]{margin-top:%?20?%;color:var(--view-priceColor);font-size:%?24?%}[data-v-4f3a65df] .loadfail-img, .easy-img[data-v-4f3a65df]{width:%?217?%;height:%?217?%;border-radius:%?16?%;display:block}.item_time .checkbox .iconfont[data-v-4f3a65df]{font-size:%?38?%;color:#999;margin-right:%?10?%}.item_time .checkbox .iconfont.icon-xuanzhong1[data-v-4f3a65df]{color:var(--view-theme)}.item_main .checkbox .iconfont[data-v-4f3a65df]{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-4f3a65df]::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-4f3a65df]{color:var(--view-theme)}.history .footer[data-v-4f3a65df]{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)}.area-edit[data-v-4f3a65df]{justify-content:center}.area-edit .area-item[data-v-4f3a65df]{width:50%;text-align:center;position:relative;align-items:center;color:#333}.area-edit .area-item .text[data-v-4f3a65df]{position:relative;top:-1px}.area-edit .area-item .iconfont[data-v-4f3a65df]{color:#333}.area-edit .area-item[data-v-4f3a65df]:nth-child(1)::after{content:"";display:inline-block;width:%?2?%;height:%?42?%;background:#ccc;position:absolute;top:0;right:0}.history .footer .checkAll[data-v-4f3a65df]{font-size:%?28?%;color:#282828;margin-left:%?16?%}.allcheckbox .iconfont[data-v-4f3a65df]{margin-right:11px;font-size:%?40?%;color:#ccc}.allcheckbox .icon-xuanzhong1[data-v-4f3a65df]{color:var(--view-theme)}.history .footer .button .bnt[data-v-4f3a65df]{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-4f3a65df]{color:var(--view-theme);border-color:var(--view-theme)}',""]),t.exports=i}}]); |