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.
shop-app/h5/static/js/pages-account-address-creat...

1 line
7.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-account-address-create"],{"34f2":function(t,e,a){var n=a("24fb");e=n(!1),e.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/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.form[data-v-76317880]{background:#fff;margin:%?20?% 0}.form--item[data-v-76317880]{padding:0 %?40?%}.form--item__last[data-v-76317880]{border:0}.form--city[data-v-76317880]{padding:0}.form--itemInput[data-v-76317880]{flex:1;font-size:%?28?%;padding-left:%?40?%}.saveBtn[data-v-76317880]{position:fixed;bottom:%?89?%;left:%?30?%;width:%?670?%}[data-v-76317880] .form--city .ui-cell{padding:0 %?40?%}',""]),t.exports=e},"3b9f":function(t,e,a){var n=a("24fb");e=n(!1),e.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/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-page-body[data-v-76317880]{background:#f8f8f8}body.?%PAGE?%[data-v-76317880]{background:#f8f8f8}',""]),t.exports=e},"4bee":function(t,e,a){"use strict";a.r(e);var n=a("f623"),s=a("e033");for(var r in s)"default"!==r&&function(t){a.d(e,t,(function(){return s[t]}))}(r);a("bbc1"),a("eb64");var i,o=a("f0c5"),c=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"76317880",null,!1,n["a"],i);e["default"]=c.exports},6348:function(t,e,a){var n=a("3b9f");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var s=a("4f06").default;s("bc329abc",n,!0,{sourceMap:!1,shadowMode:!1})},"9c68":function(t,e,a){var n=a("34f2");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var s=a("4f06").default;s("a808befe",n,!0,{sourceMap:!1,shadowMode:!1})},bbc1:function(t,e,a){"use strict";var n=a("6348"),s=a.n(n);s.a},ce75:function(t,e,a){"use strict";var n=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n(a("5530"));a("96cf");var r=n(a("1da1")),i=n(a("d1b7")),o=n(a("359f")),c=n(a("f196")),u=a("5767"),d=a("87c9"),l={components:{UiCell:c.default,UiButton:o.default,BsSelectCity:i.default},data:function(){return{address:{},isDefault:!1,city:[]}},onShow:function(){"true"===this.$Route.query.first&&(this.isDefault=!0)},methods:{save:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){var a,n,r,i,o,c,l,f,p;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=uni.$u.toast,t.address.name){e.next=4;break}return a("请填写收货人姓名"),e.abrupt("return",!1);case 4:if(t.address.phone&&(0,u.IsPhone)(t.address.phone)){e.next=7;break}return a("请填写正确的手机号"),e.abrupt("return",!1);case 7:if(t.city.length){e.next=10;break}return a("请选择地区"),e.abrupt("return",!1);case 10:if(t.address.detailAddress){e.next=13;break}return a("请填写详细地址"),e.abrupt("return",!1);case 13:return n=t.city[2].code,r=t.city[2].name,i=t.city[1].name,o=t.city[1].code,c=t.city[0].code,l=t.city[0].name,e.next=21,(0,d.ApiPostAddress)((0,s.default)((0,s.default)({},t.address),{},{isDefault:t.isDefault,province:l,provinceCode:c,areaCode:n,area:r,city:i,cityCode:o}));case 21:if(f=e.sent,p=f.error,!p){e.next=26;break}return a(p.message),e.abrupt("return",!1);case 26:a("保存成功"),t.$Router.back();case 28:case"end":return e.stop()}}),e)})))()}}};e.default=l},e033:function(t,e,a){"use strict";a.r(e);var n=a("ce75"),s=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=s.a},eb64:function(t,e,a){"use strict";var n=a("9c68"),s=a.n(n);s.a},f623:function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var n={uSwitch:a("538b").default},s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"container"},[a("v-uni-view",{staticClass:"form"},[a("UiCell",{staticClass:"form--item",attrs:{title:"收货人",rightIcon:!1}},[a("template",{slot:"value"},[a("v-uni-input",{staticClass:"form--itemInput",attrs:{maxlength:10,placeholder:"请输入收货人姓名"},model:{value:t.address.name,callback:function(e){t.$set(t.address,"name",e)},expression:"address.name"}})],1)],2),a("UiCell",{staticClass:"form--item",attrs:{title:"手机号码",rightIcon:!1}},[a("template",{slot:"value"},[a("v-uni-input",{staticClass:"form--itemInput",attrs:{placeholder:"请输入收货手机号码"},model:{value:t.address.phone,callback:function(e){t.$set(t.address,"phone",e)},expression:"address.phone"}})],1)],2),a("BsSelectCity",{staticClass:"form--item form--city",model:{value:t.city,callback:function(e){t.city=e},expression:"city"}}),a("UiCell",{staticClass:"form--item form--item__last",attrs:{title:"详细地址",rightIcon:!1}},[a("template",{slot:"value"},[a("v-uni-input",{staticClass:"form--itemInput",attrs:{placeholder:"请输入详细地址"},model:{value:t.address.detailAddress,callback:function(e){t.$set(t.address,"detailAddress",e)},expression:"address.detailAddress"}})],1)],2)],1),a("UiCell",{staticClass:"form--item form--item__last",attrs:{title:"设为默认地址"}},[a("template",{slot:"right-icon"},[a("u-switch",{attrs:{activeColor:"#FF875B",inactiveColor:"#F3F3F3"},model:{value:t.isDefault,callback:function(e){t.isDefault=e},expression:"isDefault"}})],1)],2),a("UiButton",{staticClass:"saveBtn",attrs:{type:"solid",size:"max"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.save.apply(void 0,arguments)}}},[t._v("保存")])],1)},r=[]}}]);