1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["other-page-submit-order-submit-order~other-page-submit-order-submit-tangshi-order"],{"0c8e":function(e,t,r){"use strict";r("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.setUserInfoToCache=t.setUserAddressAuthMin=t.setTokenToCache=t.setTangshiInfoDataToCache=t.setSubmitOrderChooseAddressId=t.setLocationInfoToCache=t.setKeywordToUserHistorySearchCache=t.setCopyRightCache=t.getUserInfoFromCache=t.getUserHistorySearchCacheData=t.getTokenFromCache=t.getTangshiCacheInfoData=t.getSubmitOrderChooseAddressId=t.getLocationInfoFromCache=t.getCopyRightCache=t.clearUserHistorySearchData=t.clearTangshiCacheInfoData=t.clearSubmitOrderChooseAddressId=t.clearCacheUserInfo=t.clearCacheToken=t.clearCacheLocationInfo=void 0,r("e966"),r("4626"),r("5ac7"),r("3efd");var a=r("8729"),o=r("edc8");t.setTokenToCache=function(e){(0,a.setCache)(o.TOKEN_KEY,e)};t.getTokenFromCache=function(){return(0,a.getCache)(o.TOKEN_KEY)};t.clearCacheToken=function(){(0,a.removeCache)(o.TOKEN_KEY)};t.setUserInfoToCache=function(e){var t=(0,a.getCache)(o.USER_INFO);t||(t={}),(0,a.setCache)(o.USER_INFO,Object.assign(t,e))};t.getUserInfoFromCache=function(){return(0,a.getCache)(o.USER_INFO)};t.clearCacheUserInfo=function(){(0,a.removeCache)(o.USER_INFO)};t.setLocationInfoToCache=function(e){var t=e.lat,r=e.lng,i=e.address,n=(0,a.getCache)(o.LOCATION_INFO);n||(n={});var s=0,c=(0,a.getCache)("user_address_auth_min")||0;c=parseInt(c),c&&(s=(new Date).getTime()+60*c*1e3),n.lat=t||0,n.lng=r||0,n.address=i||"",n.expireTime=s,(0,a.setCache)(o.LOCATION_INFO,n)};t.getLocationInfoFromCache=function(){var e=(0,a.getCache)(o.LOCATION_INFO);return e||(e={lat:1,lng:1,address:""}),e};t.clearCacheLocationInfo=function(){(0,a.removeCache)(o.LOCATION_INFO)};t.setSubmitOrderChooseAddressId=function(e){(0,a.setCache)(o.ORDER_ADDRESS_CHOOSE_ID,e)};t.getSubmitOrderChooseAddressId=function(){return(0,a.getCache)(o.ORDER_ADDRESS_CHOOSE_ID)};t.clearSubmitOrderChooseAddressId=function(){(0,a.removeCache)(o.ORDER_ADDRESS_CHOOSE_ID)};t.getUserHistorySearchCacheData=function(){return(0,a.getCache)(o.USER_SEARCH_HISTORY)||[]};t.setKeywordToUserHistorySearchCache=function(e){var t=(0,a.getCache)(o.USER_SEARCH_HISTORY);t||(t=[]),t.includes(e)||(t.length>=10&&t.pop(),t.unshift(e),(0,a.setCache)(o.USER_SEARCH_HISTORY,t))};t.clearUserHistorySearchData=function(){(0,a.removeCache)(o.USER_SEARCH_HISTORY)};var i=function(){var e=(0,a.getCache)(o.TANGSHI_INFO);return e||{status:!1,sid:0,tableId:0}};t.getTangshiCacheInfoData=i;t.setTangshiInfoDataToCache=function(e,t,r){var n=i();n.status=e,n.sid=t||n.sid,n.tableId=r||n.tableId,(0,a.setCache)(o.TANGSHI_INFO,n)};t.clearTangshiCacheInfoData=function(){(0,a.removeCache)(o.TANGSHI_INFO)};t.setCopyRightCache=function(e){(0,a.setCache)("copyright",e)};t.getCopyRightCache=function(e){return(0,a.getCache)("copyright")};t.setUserAddressAuthMin=function(e){(0,a.setCache)("user_address_auth_min",e)}},4098:function(e,t,r){"use strict";r("6a54");var a=r("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.formatTime=t.formatThousand=t.formatPrice=t.debounce=t.createYear=t.copyToClipBoard=t.callPhone=t.addZeroPrefix=void 0,t.isUnionpayApp=function(){var e=navigator.userAgent.toLowerCase(),t=new RegExp(/(com.unionpay.chsp)/).test(e)||new RegExp(/(com.unionpay.mobilepay)/).test(e);return t},t.throttle=void 0,t.unionPaySdkInit=function(){return n.apply(this,arguments)};var o=a(r("2634")),i=a(r("2fdc"));r("64aa"),r("5c47"),r("0506"),r("23f4"),r("7d2f"),r("9c4e"),r("ab80"),r("a1c1"),r("45da"),r("c9b5"),r("bf0f"),r("aa9c"),r("c223");t.throttle=function(e,t){var r,a,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,s=0,c=function(){s=!1===i.leading?0:Date.now(),n=null,o=e.apply(r,a),n||(r=a=null)};return function(){var d=Date.now();s||!1!==i.leading||(s=d);var u=t-(d-s);return r=this,a=arguments,u<=0||u>t?(n&&(clearTimeout(n),n=null),s=d,o=e.apply(r,a),n||(r=a=null)):n||!1===i.trailing||(n=setTimeout(c,u)),o}};t.debounce=function(e,t){var r=null;return function(){r||clearTimeout(r),r=setTimeout(e,t)}};t.formatPrice=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return e?("string"===typeof e&&(e=Number(e)),e.toFixed(t)):e};t.addZeroPrefix=function(e){return e?("string"===typeof e&&(e=Number(e)),e<10?"0"+e:e):""};t.copyToClipBoard=function(e){"number"===typeof e&&(e=String(e)),uni.setClipboardData({data:e,success:function(){uni.showToast({icon:"none",title:"复制成功"})}})};function n(){return n=(0,i.default)((0,o.default)().mark((function e(){var t;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=null,e.abrupt("return",new Promise((function(e,r){try{upsdk&&"function"===typeof upsdk.pluginReady&&e(!0)}catch(i){var a=document.createElement("script");a.src="https://open.95516.com/s/open/js/upsdk.js";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(a,o),a.onerror=r,t=setInterval((function(){try{upsdk&&"function"===typeof upsdk.pluginReady&&(upsdk.pluginReady((function(){upsdk.setNavigationBarTitle({title:"可可校园"})})),e(!0),clearInterval(t))}catch(i){console.log("upsdk error")}}),300)}})));case 2:case"end":return e.stop()}}),e)}))),n.apply(this,arguments)}t.callPhone=function(e){"number"===typeof e&&(e=String(e)),uni.makePhoneCall({phoneNumber:e,success:function(){uni.showToast({icon:"none",title:"联系成功"})}})};t.formatTime=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dd/MM/yyyy HH:mm:ss";if(e){"string"===typeof e&&(e=e.replaceAll("-","/"));var r=new Date(e),a={"M+":r.getMonth()+1,"d+":r.getDate(),"H+":r.getHours(),"m+":r.getMinutes(),"s+":r.getSeconds()};for(var o in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(r.getFullYear()+"").substr(4-RegExp.$1.length))),a)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?a[o]:("00"+a[o]).substr((""+a[o]).length)));return t||""}};t.formatThousand=function(e){return isNaN(e)?(console.error("非数字"),""):e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")};function s(e){var t=new Date(e),r=[t.getFullYear(),t.getMonth()+1,t.getDate()],a=r[0],o=r[1],i=r[2];return"".concat(a,"-").concat(o<10?"0"+o:o,"-").concat(i<10?"0"+i:i)}t.createYear=function(e){var t,r=[],a=new Date("".concat(e,"-01-01")),o=new Date("".concat(e,"-12-31"));t=a.getDay()<1?a.getTime()+864e5*(1-a.getDay()):a.getDay()>1?a.getTime()+5184e5:a.getTime();var i=o.getDay()<7?o.getTime()+864e5*(1-o.getDay()):o.getTime();return function e(t,r,a,o){var i=(new Date).getTime();a.push({week:o+1,value:"".concat(s(t),"至").concat(s(t+5184e5)),weekValue:"第".concat(o+1,"周"),start:s(t),end:s(t+5184e5)}),t+5184e5<i&&t+5184e5<r&&e(t+6048e5,r,a,o+1)}(t,i,r,0),r}},"46ea":function(e,t,r){"use strict";r("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.REFRESH_STORE_EVENT=void 0;t.REFRESH_STORE_EVENT="refresh_store"},"47da":function(e,t,r){"use strict";r("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.showToast=t.showModal=t.showLoading=t.closeLoading=void 0;t.showToast=function(e){var t=e.title,r=e.icon,a=e.mask,o=e.callback;uni.showToast({icon:r||"none",title:t,mask:a||!0}),setTimeout((function(){o&&o()}),1500)};t.showModal=function(e){var t=e.title,r=e.content,a=e.showCancel,o=e.cancelText,i=e.confirmText,n=e.callback;uni.showModal({title:t||"操作提示",content:r,showCancel:a||!1,cancelText:o||"取消",confirmText:i||"确认",success:function(e){e.confirm&&n&&n(!0),e.cancel&&n&&n(!1)}})};t.showLoading=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,r=void 0===t?"":t,a=e.mask,o=void 0!==a&&a;uni.showLoading({title:r,mask:o})};t.closeLoading=function(){uni.hideLoading()}},"4f43":function(e,t,r){"use strict";r("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.navPage=t.navMiniProgram=t.navBack=void 0,r("4626"),r("5ac7"),r("5ef2"),r("f7a5");t.navBack=function(e,t){var r=e||"/pages/index/index",a=getCurrentPages();if((null===a||void 0===a?void 0:a.length)>0){var o=a[0];1!==a.length||o.route&&o.route==r?uni.navigateBack({delta:t||1}):uni.reLaunch({url:r})}else uni.reLaunch({url:r})};t.navPage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nav";if(e)if("nav"===t)if(e.includes("miniProgram"))a(e);else if(e.includes("webview")){var r=e.split("webview:"),o=r[1];uni.navigateTo({url:"/system-page/webview/webview?url="+encodeURIComponent(o),fail:function(e){console.error("[navigateTo]跳转页面失败",e)}})}else uni.navigateTo({url:e,fail:function(e){console.error("[navigateTo]跳转页面失败",e)}});else"redirect"===t?uni.redirectTo({url:e,fail:function(e){console.error("[redirectTo]跳转页面失败",e)}}):"reLaunch"===t?uni.reLaunch({url:e,fail:function(e){console.error("[reLaunch]跳转页面失败",e)}}):"phone"===t&&uni.makePhoneCall({phoneNumber:e,fail:function(e){console.error("[phone]拨打电话失败",e)}})};var a=function(e){if(e&&-1!=e.indexOf(":")){for(var t=e.split(":"),r=t[1].split(","),a={},o=0;o<r.length;o++){var i=r[o].split("_");console.log(i);var n=i[0],s=i.slice(1).join("_");a[n]=s}console.log(a)}else{a={appId:obj.appid||obj.appId};obj.path&&(a["path"]=path)}a["fail"]=function(e){-1!=e.errMsg.indexOf("is not in navigateToMiniProgramAppIdList")&&uni.showModal({content:"跳转小程序出错了",showCancel:!1})},console.log(a),e&&e.includes("half_")?uni.openEmbeddedMiniProgram(a):uni.navigateToMiniProgram(a)};t.navMiniProgram=a},5817:function(e,t,r){"use strict";r("6a54");var a=r("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.submitTangshiOrderApi=t.submitOrderApi=t.submitOneTouchOrderApi=t.initiatePaymentApi=t.getTuangouquanOrderAddApi=t.getTangshiOrderPreInfoApi=t.getRechargeFreChargeStatusApi=t.getOrderPreInfoApi=t.getOneTouchOrderPreInfoApi=t.getIngOrderApi=t.gemMealRedpacketBuildVirtual=t.autoCreateAddressApi=t.addOrderApi=void 0;var o=a(r("b4f6"));t.gemMealRedpacketBuildVirtual=function(e){return o.default.get("api/user.mealRedpacket.meal_redpacket/mealRedpacket_build_virtual?sid="+e)};t.getOrderPreInfoApi=function(e){var t=e.sid,r=e.extra,a=e.fromzhitong,i=e.spellrice,n=e.addressId,s=e.spellrice_oid,c=e.spellrice_id,d=e.order_type,u=e.zitiType,l=e.is_api_shop,p=e.api_store_title,_=e.api_store_address,h=e.api_store_logo,f=e.storeCode,g=e.api_store_lat,m=e.api_store_lng,v=e.api_brand,C=e.table_id,b=e.predict_index,T=e.predictDayCn,y=e.use_tuangouquan_place_order_at_once_id;return o.default.post("api/user.order.orderCreate/index",{sid:t,extra:r||"",fromzhitong:a||0,spellrice:i||0,address_id:n||"",spellrice_oid:s||0,spellrice_id:c||0,order_type:d||1,zitiType:u||1,is_api_shop:l||"",api_store_title:p||"",api_store_address:_||"",api_store_logo:h||"",storeCode:f||"",api_store_lat:g||"",api_store_lng:m||"",api_brand:v||"",table_id:C||"",predict_index:b||0,predict_day_cn:T||"",use_tuangouquan_place_order_at_once_id:y||0})};t.getOneTouchOrderPreInfoApi=function(e){var t=e.sids,r=e.extra,a=e.fromzhitong,i=e.spellrice,n=e.addressId,s=e.spellrice_oid,c=e.spellrice_id,d=e.order_type,u=e.zitiType;return o.default.post("api/user.order.orderCreate/oneTouchIndex",{sids:t,extra:r||"",fromzhitong:a||0,spellrice:i||0,address_id:n||"",spellrice_oid:s||0,spellrice_id:c||0,order_type:d||1,zitiType:u||1})};t.submitOrderApi=function(e){var t=e.buy_add_mealredpacket_index,r=e.buy_mealredpacket,a=e.pre_mealredpacket_,i=e.buy_add_mealredpacket,n=e.pre_add_mealredpacket_,s=e.sid,c=e.note,d=e.fromzhitong,u=e.spellrice_oid,l=e.orderType,p=e.redpacketId,_=e.couponId,h=e.predictDayCn,f=e.predictIndex,g=e.addressId,m=e.memberChoice,v=e.zitiType,C=e.mobile,b=e.spellrice,T=e.spellrice_time,y=e.tuangouquan_id,I=e.cut_time_id,O=e.is_api_shop,k=e.api_store_title,A=e.api_store_address,S=e.api_store_logo,x=e.storeCode,R=e.api_store_lat,w=e.api_store_lng,E=e.api_brand,P=e.room_service_params,D=e.select_recharge_exemption_price,N=e.use_tuangouquan_place_order_at_once_id,F=e.is_purchase_goods,M=e.supplier_sid;return o.default.post("api/user.order.orderCreate/submit",{buy_add_mealredpacket_index:t,buy_mealredpacket:r,pre_mealredpacket_:a,buy_add_mealredpacket:i,pre_add_mealredpacket_:n,sid:s,note:c||"",fromzhitong:d||"",spellrice_oid:u||0,order_type:l,redpacket_id:p||"",coupon_id:_||"",predict_day_cn:h||"",predict_index:f||0,address_id:g||"",member_choice:m||[],ziti_type:v||"",mobile:C||"",spellrice:b||0,spellrice_time:T||"",tuangouquan_id:y||0,cut_time_id:I||"",is_api_shop:O||"",api_store_title:k||"",api_store_address:A||"",api_store_logo:S||"",storeCode:x||"",api_store_lat:R||"",api_store_lng:w||"",api_brand:E||"",room_service_params:P||[],select_recharge_exemption_price:D||0,use_tuangouquan_place_order_at_once_id:N||0,is_purchase_goods:F||1,supplier_sid:M||0})};t.submitOneTouchOrderApi=function(e){var t=e.buy_add_mealredpacket_index,r=e.buy_mealredpacket,a=e.pre_mealredpacket_,i=e.buy_add_mealredpacket,n=e.pre_add_mealredpacket_,s=e.sids,c=e.note,d=e.fromzhitong,u=e.spellrice_oid,l=e.orderType,p=e.predictDayCn,_=e.predictIndex,h=e.addressId,f=e.memberChoice,g=e.zitiType,m=e.mobile,v=e.spellrice,C=e.spellrice_time,b=e.coupons,T=e.redpackets,y=e.max_delivery_fee_sid;return o.default.post("api/user.order.orderCreate/oneTouchSubmit",{buy_add_mealredpacket_index:t,buy_mealredpacket:r,pre_mealredpacket_:a,buy_add_mealredpacket:i,pre_add_mealredpacket_:n,sids:s,note:c||"",fromzhitong:d||"",spellrice_oid:u||0,order_type:l,predict_day_cn:p||"",predict_index:_||0,address_id:h||"",member_choice:f||[],ziti_type:g||"",mobile:m||"",spellrice:v||0,spellrice_time:C||"",coupons:b||[],redpackets:T||[],max_delivery_fee_sid:y||0})};t.getTangshiOrderPreInfoApi=function(e){var t=e.sid,r=e.tableId;return o.default.post("api/user.store.table/create",{sid:t,table_id:r,coupon_id:0,redpacket_id:0,person_num:0,note:"",invoiceId:"invoiceId"})};t.getRechargeFreChargeStatusApi=function(e){var t=e.sid;return o.default.post("api/user.store.store/getRechargeFreChargeStatus",{sid:t})};t.submitTangshiOrderApi=function(e){var t=e.sid,r=e.tableId,a=e.couponId,i=e.redpacketId,n=e.personNum,s=e.note,c=e.isPindan,d=e.username,u=e.zitiType,l=e.mobile,p=e.tuangouquan_id;return o.default.post("api/user.store.table/submit",{sid:t,table_id:r,coupon_id:a||0,redpacket_id:i||0,person_num:n||0,note:s||"",invoiceId:"invoiceId",is_pindan:c||0,username:d||"",ziti_type:u,mobile:l||"",tuangouquan_id:p||0})};t.getTuangouquanOrderAddApi=function(e){var t=e.sid,r=e.id,a=e.num,i=e.finalPrice;return o.default.post("api/user.tuangouquan.order/submit",{sid:t,id:r,num:a||1,finalPrice:i})};t.getIngOrderApi=function(e){var t=e.sid,r=e.table_id;return o.default.post("api/user.store.table/getIngOrder",{sid:t,table_id:r})};t.addOrderApi=function(e){var t=e.sid,r=e.table_id;return o.default.post("api/user.store.table/addOrder",{sid:t,table_id:r})};t.initiatePaymentApi=function(e){return o.default.post("api/user.order.pay/initiatePayment",e)};t.autoCreateAddressApi=function(e){return o.default.post("api/user.member.address/autoCreateAddress",e)}},"7dcc":function(e,t,r){"use strict";r("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={data:function(){return{}},computed:{themeBgColor:function(){return this.$isTheme()?"--theme-general-color":this.vuex_themeBgColor||""},themeOpacityBgColor:function(){return this.vuex_themeBgColor?"".concat(this.vuex_themeBgColor,"7F"):""},themeFontColor:function(){return this.$isTheme()?"--general-color-text":this.vuex_themeFontColor||""},themeBtnStyle:function(){var e={};return this.vuex_themeBgColor&&(e.backgroundColor=this.vuex_themeBgColor),this.vuex_themeFontColor&&(e.color=this.vuex_themeFontColor),this.$isTheme()&&(e.backgroundColor="var(--theme-general-color)",e.color="--general-color-text"),e},themeLineBtnStyle:function(){var e={};return this.vuex_themeBgColor&&(e.border="1rpx solid ".concat(this.vuex_themeBgColor),e.color=this.vuex_themeBgColor),this.$isTheme()&&(e.border="1rpx solid var(--theme-general-color)",e.color="var(--theme-general-color)"),e}},methods:{$isTheme:function(){return!1}}}},b4f0:function(e,t,r){"use strict";r("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.checkUserIsLogin=void 0,r("bf0f");r("0c8e");var a=r("edc8");t.checkUserIsLogin=function(){return new Promise((function(e,t){var r=uni.getStorageSync(a.TOKEN_KEY);return r?e():t()}))}},d82f:function(e,t,r){"use strict";r("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new Promise((function(t,r){e&&e.length||t()}))},r("bf0f");r("47da")}}]);
|