pages-MyGiftPack-GiftPackBuy.f6c9390d.js
18.3 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-MyGiftPack-GiftPackBuy"],{"0203":function(t,e,n){"use strict";n.r(e);var i=n("1f10"),o=n("89bc");for(var a in o)"default"!==a&&function(t){n.d(e,t,function(){return o[t]})}(a);n("4bb1");var r,c=n("f0c5"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"21bfcf1a",null,!1,i["a"],r);e["default"]=s.exports},"1df0":function(t,e,n){e=t.exports=n("2350")(!1),e.push([t.i,'@charset "UTF-8";\n/*引用样式路径*/\n/* Author XGQ\r\n * 2019-11-12\r\n */uni-page-body[data-v-21bfcf1a]{background-color:#fb7454}.top_img[data-v-21bfcf1a]{-webkit-align-content:center;align-content:center}.top_img uni-image[data-v-21bfcf1a]{width:100%}.top_title[data-v-21bfcf1a]{display:-webkit-box;display:-webkit-flex;display:flex;background-color:#fff;height:%?85?%;border-radius:%?10?% %?10?% %?0?% %?0?%;margin:%?0?% %?20?% %?0?% %?20?%;-webkit-align-content:center;align-content:center}.top_title_box[data-v-21bfcf1a]{width:49%;-webkit-align-content:center;align-content:center;text-align:center;padding:%?15?%}.top_title_box_S[data-v-21bfcf1a]{width:1%;-webkit-align-content:center;align-content:center;text-align:center;margin:%?20?% %?0?% %?20?% %?0?%;border-left:#000 solid %?3?%}.top_title_redtext[data-v-21bfcf1a]{font-size:%?30?%;color:#d61b30}.top_title_blacktext[data-v-21bfcf1a]{font-size:%?30?%;color:#000}.content_box[data-v-21bfcf1a]{background-color:#fff;height:%?375?%;margin:%?10?% %?20?% %?0?% %?20?%;border-radius:%?10?%}.content_box_ware[data-v-21bfcf1a]{border-bottom:#f5f5f5 solid %?2?%;display:-webkit-box;display:-webkit-flex;display:flex}.content_box_img[data-v-21bfcf1a]{margin:%?20?% %?20?% %?20?% %?25?%;width:35%;display:-webkit-box;display:-webkit-flex;display:flex;font-size:%?8?%;position:relative}.content_box_img uni-image[data-v-21bfcf1a]{width:100%;height:%?230?%}.content_box_title[data-v-21bfcf1a]{width:65%;margin:%?25?% %?25?% %?10?% %?0?%;position:relative}.content_ware_title[data-v-21bfcf1a]{font-size:%?30?%;word-break:break-all;\r\n\t/*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/text-overflow:ellipsis;display:-webkit-box;\r\n\t/** 对象作为伸缩盒子模型显示 **/-webkit-box-orient:vertical;\r\n\t/** 设置或检索伸缩盒对象的子元素的排列方式 **/-webkit-line-clamp:2;\r\n\t/** 显示的行数 **/overflow:hidden\r\n\t/** 隐藏超出的内容 **/}.content_ware_type[data-v-21bfcf1a]{font-size:%?28?%;color:#c61a34;margin-top:%?10?%;position:absolute;left:0;bottom:%?100?%}.content_ware_price[data-v-21bfcf1a]{font-size:%?20?%;color:#b9b5b5;margin-top:%?2?%;text-decoration:line-through;position:absolute;left:0;bottom:%?70?%}.content_ware_time[data-v-21bfcf1a]{font-size:%?25?%;color:#000;margin-top:%?20?%;position:absolute;left:0;bottom:%?25?%}.content_box_button[data-v-21bfcf1a]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;position:relative}.box_button_remark[data-v-21bfcf1a]{margin:%?15?% %?0?% %?0?% %?30?%;width:50%;position:absolute;left:%?5?%;bottom:%?15?%}.box_button_remark uni-text[data-v-21bfcf1a]{font-size:%?28?%;color:#b9b5b5}.box_button_buy[data-v-21bfcf1a]{text-align:right;margin:%?22?% %?25?% %?0?% %?0?%}.box_button_buy uni-button[data-v-21bfcf1a]{display:inline-block;width:%?160?%;height:%?50?%;font-size:%?20?%;background:#d41c34;color:#fff;line-height:%?50?%}.box_button_dui[data-v-21bfcf1a]{text-align:right;margin:%?22?% %?25?% %?0?% %?0?%}.box_button_dui uni-button[data-v-21bfcf1a]{display:inline-block;width:%?160?%;height:%?50?%;font-size:%?20?%;background:#fff;color:#000;line-height:%?50?%}.foot_box[data-v-21bfcf1a]{-webkit-align-content:center;align-content:center;text-align:center;margin-top:%?15?%;margin-bottom:%?50?%}.foot_box uni-text[data-v-21bfcf1a]{font-size:%?25?%;color:#fff}.foot_empty[data-v-21bfcf1a]{background-color:#fff;height:%?375?%;margin:%?10?% %?20?% %?0?% %?20?%;border-radius:%?10?%;text-align:center;padding:%?150?% %?0?% %?300?% %?0?%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.foot_empty uni-image[data-v-21bfcf1a]{width:%?400?%;height:%?273?%}.foot_empty uni-text[data-v-21bfcf1a]{font-size:%?30?%;color:#999}.foot_empty_button[data-v-21bfcf1a]{background:#ff6363;margin:%?60?% %?230?% %?0?% %?230?%;padding:%?10?%;border-radius:%?70?%;line-height:%?40?%}.foot_empty_button uni-text[data-v-21bfcf1a]{font-size:%?28?%;color:#fff}body.?%PAGE?%[data-v-21bfcf1a]{background-color:#fb7454}',""])},"1f10":function(t,e,n){"use strict";var i,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"top_img"},[n("v-uni-view",{staticClass:"top_img"},[n("v-uni-image",{attrs:{src:t.$GetInfo.imgHttp+"/miniapp/images/giftbag/gift00.jpg"}})],1),n("v-uni-view",{staticClass:"top_title"},[n("v-uni-view",{staticClass:"top_title_box"},[n("v-uni-text",{staticClass:"top_title_redtext"},[t._v("礼包列表")])],1),n("v-uni-view",{staticClass:"top_title_box_S"}),n("v-uni-view",{staticClass:"top_title_box"},[n("v-uni-text",{staticClass:"top_title_blacktext",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.MyGift.apply(void 0,arguments)}}},[t._v("我的礼包")])],1)],1),t._l(t.wareCard,function(e,i){return n("v-uni-view",{key:i,staticClass:"content_box"},[n("v-uni-view",{staticClass:"content_box_ware"},[n("v-uni-view",{staticClass:"content_box_img",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.GetGiftPackList(e.lbId,e)}}},[n("v-uni-image",{attrs:{src:t.$GetInfo.imgHttp+e.lbUrl}})],1),n("v-uni-view",{staticClass:"content_box_title"},[n("v-uni-view",{staticClass:"content_ware_title"},[n("v-uni-text",{on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.GetGiftPackList(e.lbId,e)}}},[t._v(t._s(e.giftTitle))])],1),n("v-uni-view",{staticClass:"content_ware_type"},[e.payMoney>0?n("v-uni-text",[t._v("¥"+t._s(e.payMoney))]):t._e(),e.payMoney>0&&e.payIntegral>0?n("v-uni-text",[t._v("/")]):t._e(),e.payIntegral>0?n("v-uni-text",[t._v(t._s(e.payIntegral)+"积分")]):t._e()],1),n("v-uni-view",{staticClass:"content_ware_price"},[n("v-uni-text",[t._v("原价:¥"+t._s(e.giftPosPrice))])],1),n("v-uni-view",{staticClass:"content_ware_time"},[n("v-uni-text",[t._v("活动结束时间:"+t._s(e.endTime))])],1)],1)],1),n("v-uni-view",{staticClass:"content_box_button"},[n("v-uni-view",{staticClass:"box_button_remark"},[n("v-uni-text",[t._v("已售:"+t._s(e.giftQty)+"件")])],1),e.payMoney>0?n("v-uni-view",{class:e.payMoney>0&e.payIntegral>0?"box_button_dui":"box_button_buy"},[n("v-uni-button",{on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.GetBuyPrice(e.lbId,e)}}},[t._v("立即购买")])],1):t._e(),e.payIntegral>0?n("v-uni-view",{class:(e.payMoney,e.payIntegral,"box_button_buy")},[n("v-uni-button",{on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.GetBuyIntegral(e.lbId,e)}}},[t._v("立即兑换")])],1):t._e(),0==e.payMoney&0==e.payIntegral?n("v-uni-view",{staticClass:"box_button_dui"},[n("v-uni-button",{on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.GetBuyPrice(e.lbId,e)}}},[t._v("立即购买")])],1):t._e(),0==e.payMoney&0==e.payIntegral?n("v-uni-view",{staticClass:"box_button_buy"},[n("v-uni-button",{on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.GetBuyIntegral(e.lbId,e)}}},[t._v("立即兑换")])],1):t._e()],1)],1)}),1==this.isEmpty?n("v-uni-view",{staticClass:"foot_empty"},[n("v-uni-view",[n("v-uni-image",{attrs:{src:t.$GetInfo.imgHttp+"/miniapp/images/giftbag/gift07.png"}})],1),n("v-uni-view",[n("v-uni-text",[t._v("当前暂无礼包")])],1),n("v-uni-view",{staticClass:"foot_empty_button"},[n("v-uni-text",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.GetWebHttp.apply(void 0,arguments)}}},[t._v("返回首页")])],1)],1):t._e(),n("v-uni-view",{staticClass:"foot_box"},[n("v-uni-text",[t._v("———— 到底了 ————")])],1)],2)},a=[];n.d(e,"b",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"a",function(){return i})},"202d":function(t,e,n){"use strict";var i=n("288e");n("28a5"),n("c5f6");var o=i(n("f499"));n("3b2b"),n("a481"),function(){var e={expires:"1d",path:"; path=/",domain:"",secure:"",sameSite:""},n={install:function(t){t.prototype.$cookies=this,t.$cookies=this},config:function(t,n,i,o,a){e.expires=t||"1d",e.path=n?"; path="+n:"; path=/",e.domain=i?"; domain="+i:"",e.secure=o?"; Secure":"",e.sameSite=a?"; SameSite="+a:""},get:function(t){var e=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(e&&"{"===e.substring(0,1)&&"}"===e.substring(e.length-1,e.length))try{e=JSON.parse(e)}catch(n){return e}return e},set:function(t,n,i,a,r,c,s){if(!t)throw new Error("Cookie name is not find in first argument.");if(/^(?:expires|max\-age|path|domain|secure|SameSite)$/i.test(t))throw new Error("Cookie key name illegality, Cannot be set to ['expires','max-age','path','domain','secure','SameSite']\t current key name: "+t);n&&n.constructor===Object&&(n=(0,o.default)(n));var l="";if(i=void 0===i?e.expires:i,i&&0!=i)switch(i.constructor){case Number:l=i===1/0||-1===i?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+i;break;case String:if(/^(?:\d{1,}(y|m|d|h|min|s))$/i.test(i)){var d=i.replace(/^(\d{1,})(?:y|m|d|h|min|s)$/i,"$1");switch(i.replace(/^(?:\d{1,})(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":l="; max-age="+2592e3*+d;break;case"d":l="; max-age="+86400*+d;break;case"h":l="; max-age="+3600*+d;break;case"min":l="; max-age="+60*+d;break;case"s":l="; max-age="+d;break;case"y":l="; max-age="+31104e3*+d;break;default:new Error("unknown exception of 'set operation'")}}else l="; expires="+i;break;case Date:l="; expires="+i.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(n)+l+(r?"; domain="+r:e.domain)+(a?"; path="+a:e.path)+(void 0===c?e.secure:c?"; Secure":"")+(void 0===s?e.sameSite:s?"; SameSite="+s:""),this},remove:function(t,n,i){return!(!t||!this.isKey(t))&&(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(i?"; domain="+i:e.domain)+(n?"; path="+n:e.path),this)},isKey:function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),e=0;e<t.length;e++)t[e]=decodeURIComponent(t[e]);return t}};t.exports=n,"undefined"!==typeof window&&(window.$cookies=n)}()},"3a9c":function(t,e,n){"use strict";var i,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"uni-load-more"},["loading"===t.status&&t.showIcon?n("v-uni-view",{staticClass:"uni-load-more__img"},[n("v-uni-view",{staticClass:"loadingView",style:{color:t.color}},[t._v("")])],1):t._e(),n("v-uni-text",{staticClass:"uni-load-more__text",style:{color:t.color}},[t._v(t._s("more"===t.status?t.contentText.contentdown:"loading"===t.status?t.contentText.contentrefresh:t.contentText.contentnomore))])],1)},a=[];n.d(e,"b",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"a",function(){return i})},"4bb1":function(t,e,n){"use strict";var i=n("a6d7"),o=n.n(i);o.a},6447:function(t,e,n){var i=n("7bf1");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("e8132bde",i,!0,{sourceMap:!1,shadowMode:!1})},"793c":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"uLi-load-more",props:{status:{type:String,default:"loading"},showIcon:{type:Boolean,default:!0},color:{type:String,default:"#777777"},contentText:{type:Object,default:function(){return{contentdown:"上拉显示更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"}}}},data:function(){return{}}};e.default=i},"7bf1":function(t,e,n){e=t.exports=n("2350")(!1),e.push([t.i,'@font-face{font-family:iconfont;src:url(https://at.alicdn.com/t/font_1288772_8nmx02hevxl.ttf) format("truetype")}.loadingView[data-v-9a2b4550]{font-family:iconfont;line-height:1;font-size:%?40?%;-webkit-animation:rotate-data-v-9a2b4550 3s linear infinite;animation:rotate-data-v-9a2b4550 3s linear infinite}@-webkit-keyframes rotate-data-v-9a2b4550{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate-data-v-9a2b4550{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.uni-load-more[data-v-9a2b4550]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;height:%?80?%;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.uni-load-more__text[data-v-9a2b4550]{font-size:%?28?%;color:#999}.uni-load-more__img[data-v-9a2b4550]{height:24px;width:24px;margin-right:10px;line-height:1;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}',""])},"89bc":function(t,e,n){"use strict";n.r(e);var i=n("acf7"),o=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,function(){return i[t]})}(a);e["default"]=o.a},"8b7c":function(t,e,n){"use strict";n.r(e);var i=n("3a9c"),o=n("aea3");for(var a in o)"default"!==a&&function(t){n.d(e,t,function(){return o[t]})}(a);n("a66d");var r,c=n("f0c5"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"9a2b4550",null,!1,i["a"],r);e["default"]=s.exports},a66d:function(t,e,n){"use strict";var i=n("6447"),o=n.n(i);o.a},a6d7:function(t,e,n){var i=n("1df0");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("03d10609",i,!0,{sourceMap:!1,shadowMode:!1})},acf7:function(t,e,n){"use strict";var i=n("288e");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("8b7c")),a=(n("202d"),{data:function(){return{getStorageID:"",getUserID:"",wareCard:[],page:0,pageSize:10,isEmpty:!1,loadingType:0,contentText:{contentdown:"加载更多",contentrefresh:"加载中...",contentnomore:"已加载全部"}}},components:{uLiLoadMore:o.default},onLoad:function(t){this.getStorageID=t.stoid,this.getUserID=$cookies.get("user_id"),this.page=1,this.pageSize=10,this.loadingType=0,""!=this.getUserID&&void 0!=this.getUserID&&null!=this.getUserID&&this.getUserID&&"undefined"!=this.getUserID?this.getList():window.location.href=this.$GetInfo.HtmlHttp+"/mobile/userhelp/user_login/stoid/"+this.getStorageID+"/url/"+encodeURIComponent("MyGiftPack/GiftPackBuy?stoid="+this.getStorageID),document.addEventListener("WeixinJSBridgeReady",function(){WeixinJSBridge.call("hideOptionMenu")})},onShow:function(){},onReachBottom:function(){0==this.loadingType&&(this.page++,this.getList())},methods:{MyGift:function(){uni.reLaunch({url:"/pages/MyGiftPack/MyGiftPack?stoid="+this.getStorageID+"&userid="+this.getUserID})},GetGiftPackList:function(t,e){uni.navigateTo({url:"/pages/MyGiftPack/GiftPackList?isBuy=1&stoid="+this.getStorageID+"&userid="+this.getUserID+"&id="+t})},GetBuyPrice:function(t,e){var n=this;uni.showModal({title:"",content:"是否确定购买该礼包",success:function(e){e.confirm?(console.log("用户点击确定"),console.log(n.$GetInfo.ApiHttp+"/api/weshop/marketing/buy/receive/gift/record/insert"),console.log('{"actId":"","actType":"","buyType":"1","lbId":"'+t+'","storeId":"1","userId":"5682130"}'),uni.showLoading({title:"加载中",mask:!0}),uni.request({url:n.$GetInfo.ApiHttp+"/api/weshop/marketing/buy/receive/gift/record/insert",data:{actId:"",actType:"",buyType:"2",giftBagId:t,storeId:n.getStorageID,userId:n.getUserID,buyFrom:"0"},method:"POST",header:{"Content-Type":"application/json"},success:function(t){console.log(t.data),0==t.data.code?(console.log(t.data.msg),console.log(n.$GetInfo.HtmlHttp+"/mobile/Payment/getPay/stoid/"+n.getStorageID+"/order_sn/"+t.data.data.orderSn),window.location.href=n.$GetInfo.HtmlHttp+"/Mobile/Payment/getPay.html?stoid="+n.getStorageID+"&order_sn="+t.data.data.orderSn+"&recharge_type=6"):(console.log(t.data.msg),uni.showToast({icon:"none",title:t.data.msg})),uni.hideLoading()},fail:function(t){uni.showToast({icon:"none",title:"网络繁忙,请重试!"}),uni.hideLoading()}})):e.cancel&&console.log("用户点击取消")}})},GetBuyIntegral:function(t,e){var n=this;uni.showModal({title:"",content:"是否确定兑换该礼包",success:function(e){e.confirm?(console.log("用户点击确定"),console.log(n.$GetInfo.ApiHttp+"/api/weshop/marketing/buy/receive/gift/record/insert"),console.log('{"actId":"","actType":"","buyType":"1","lbId":"'+t+'","storeId":"1","userId":"5682130"}'),uni.showLoading({title:"加载中",mask:!0}),uni.request({url:n.$GetInfo.ApiHttp+"/api/weshop/marketing/buy/receive/gift/record/insert",data:{actId:"",actType:"",buyType:"1",giftBagId:t,storeId:n.getStorageID,userId:n.getUserID},method:"POST",header:{"Content-Type":"application/json"},success:function(t){console.log(t.data),0==t.data.code?(console.log(t.data.msg),uni.showToast({icon:"none",title:"兑换成功!"})):(console.log(t.data.msg),uni.showToast({icon:"none",title:t.data.msg})),uni.hideLoading()},fail:function(t){uni.showToast({icon:"none",title:"网络繁忙,请重试!"}),uni.hideLoading()}})):e.cancel&&console.log("用户点击取消")}})},getList:function(){var t=this;if(0!=t.loadingType)return!1;t.loadingType=1,uni.showLoading({title:"加载中",mask:!0}),uni.request({url:t.$GetInfo.ApiHttp+"/api/weshop/marketing/giftbag/page",data:{storeId:t.getStorageID,userId:t.getUserID,page:t.page,pageSize:t.pageSize},method:"GET",header:{"Content-Type":"application/x-www-form-urlencoded"},success:function(e){if(0==e.data.code)if(e.data.data.total>0?t.isEmpty=!1:t.isEmpty=!0,0==e.data.data.pageData.length)t.loadingType=2;else{for(var n=0;n<e.data.data.pageData.length;n++)t.wareCard.push(e.data.data.pageData[n]);t.loadingType=0}uni.hideLoading()},fail:function(t){uni.showToast({icon:"none",title:"网络繁忙,请重试!"}),uni.hideLoading()}})},GetWebHttp:function(){window.location.href=this.$GetInfo.HtmlHttp+"/mobile/index/index/stoid/"+this.getStorageID+".html"}}});e.default=a},aea3:function(t,e,n){"use strict";n.r(e);var i=n("793c"),o=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,function(){return i[t]})}(a);e["default"]=o.a}}]);