暂存code
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_address = require("../../api/address.js");
|
||||
const api_common = require("../../api/common.js");
|
||||
const Header = () => "../../components/header.js";
|
||||
const _sfc_main = {
|
||||
components: { Header },
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
@@ -26,7 +28,8 @@ const _sfc_main = {
|
||||
},
|
||||
regionShow: false,
|
||||
regionColumns: [],
|
||||
regionLoading: false
|
||||
regionLoading: false,
|
||||
leftPath: "/pages/mine_address/mine_address"
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -34,6 +37,10 @@ const _sfc_main = {
|
||||
if (id && id !== 0) {
|
||||
this.getById(id);
|
||||
}
|
||||
const ids = option.ids;
|
||||
if (ids && ids !== 0) {
|
||||
this.leftPath = "/pages/order_submit/order_submit?ids=" + ids + "&addressShow = true";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -191,9 +198,10 @@ const _sfc_main = {
|
||||
type: "success",
|
||||
message: params.id && params.id !== 0 ? "修改成功" : "添加成功"
|
||||
});
|
||||
const leftPath = this.leftPath;
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_address/mine_address"
|
||||
url: leftPath
|
||||
});
|
||||
}, 2e3);
|
||||
}
|
||||
@@ -201,11 +209,12 @@ const _sfc_main = {
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _component_Header = common_vendor.resolveComponent("Header");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
|
||||
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
|
||||
(_easycom_up_input2 + _easycom_up_image2 + _easycom_up_toast2 + _easycom_up_picker2)();
|
||||
(_component_Header + _easycom_up_input2 + _easycom_up_image2 + _easycom_up_toast2 + _easycom_up_picker2)();
|
||||
}
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
@@ -216,8 +225,13 @@ if (!Math) {
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o(($event) => $data.form.name = $event),
|
||||
b: common_vendor.p({
|
||||
a: common_vendor.p({
|
||||
leftTitle: _ctx.$t("address.add.title"),
|
||||
["left-path-type"]: "navigateTo",
|
||||
leftPath: $data.leftPath
|
||||
}),
|
||||
b: common_vendor.o(($event) => $data.form.name = $event),
|
||||
c: common_vendor.p({
|
||||
placeholder: "收货人",
|
||||
border: "surround",
|
||||
customStyle: {
|
||||
@@ -225,25 +239,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
},
|
||||
modelValue: $data.form.name
|
||||
}),
|
||||
c: common_vendor.o(($event) => $data.form.mobile = $event),
|
||||
d: common_vendor.p({
|
||||
d: common_vendor.o(($event) => $data.form.mobile = $event),
|
||||
e: common_vendor.p({
|
||||
placeholder: "请填写收货人手机号",
|
||||
border: "surround",
|
||||
customStyle: {
|
||||
"border": "0rpx"
|
||||
},
|
||||
type: "number",
|
||||
modelValue: $data.form.mobile
|
||||
}),
|
||||
e: common_vendor.t($data.form.regionStr && $data.form.regionStr.join("/") || "所在地区"),
|
||||
f: common_vendor.p({
|
||||
f: common_vendor.t($data.form.regionStr && $data.form.regionStr.join("/") || "所在地区"),
|
||||
g: common_vendor.p({
|
||||
src: "/static/common/right_soild.png",
|
||||
width: "14",
|
||||
height: "14",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
g: common_vendor.o(($event) => $options.regionShowCheck(true)),
|
||||
h: common_vendor.o(($event) => $data.form.address = $event),
|
||||
i: common_vendor.p({
|
||||
h: common_vendor.o(($event) => $options.regionShowCheck(true)),
|
||||
i: common_vendor.o(($event) => $data.form.address = $event),
|
||||
j: common_vendor.p({
|
||||
placeholder: "门牌号、小区、楼栋号、单元室等",
|
||||
border: "surround",
|
||||
customStyle: {
|
||||
@@ -252,12 +267,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
},
|
||||
modelValue: $data.form.address
|
||||
}),
|
||||
j: common_vendor.o((...args) => $options.addAddress && $options.addAddress(...args)),
|
||||
k: common_vendor.sr("uToastRef", "40d63b91-4"),
|
||||
l: common_vendor.sr("uPickerRef", "40d63b91-5"),
|
||||
m: common_vendor.o($options.regionConfirm),
|
||||
n: common_vendor.o($options.regionChange),
|
||||
o: common_vendor.p({
|
||||
k: common_vendor.o((...args) => $options.addAddress && $options.addAddress(...args)),
|
||||
l: common_vendor.sr("uToastRef", "58644e4b-5"),
|
||||
m: common_vendor.sr("uPickerRef", "58644e4b-6"),
|
||||
n: common_vendor.o($options.regionConfirm),
|
||||
o: common_vendor.o($options.regionChange),
|
||||
p: common_vendor.o(($event) => $data.regionShow = false),
|
||||
q: common_vendor.o(($event) => $data.regionShow = false),
|
||||
r: common_vendor.p({
|
||||
show: $data.regionShow,
|
||||
columns: $data.regionColumns,
|
||||
loading: $data.regionLoading,
|
||||
@@ -266,6 +283,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-40d63b91"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_address_add/mine_address_add.js.map
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "添加地址",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarTextStyle": "black",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "default",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"header": "../../components/header",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
|
||||
"up-toast": "../../uni_modules/uview-plus/components/u-toast/u-toast",
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="address_add_warp data-v-40d63b91"><view class="address_form data-v-40d63b91"><view class="add_form_item add_form_item_but data-v-40d63b91"><view class="add_form_title data-v-40d63b91">收货人</view><up-input wx:if="{{b}}" class="data-v-40d63b91" u-i="40d63b91-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-input></view><view class="add_form_item add_form_item_but data-v-40d63b91"><view class="add_form_title data-v-40d63b91">手机号码</view><up-input wx:if="{{d}}" class="data-v-40d63b91" u-i="40d63b91-1" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></up-input></view><view class="add_form_item add_form_item_but data-v-40d63b91"><view class="add_form_title data-v-40d63b91">所在地区</view><view class="region_warp data-v-40d63b91" bindtap="{{g}}"><view class="data-v-40d63b91" style="color:#808080;margin-left:22rpx;font-size:28rpx">{{e}}</view><up-image wx:if="{{f}}" class="data-v-40d63b91" u-i="40d63b91-2" bind:__l="__l" u-p="{{f}}"></up-image></view></view><view class="add_form_item data-v-40d63b91"><view class="add_form_title data-v-40d63b91">详细地址</view><up-input wx:if="{{i}}" class="data-v-40d63b91" u-i="40d63b91-3" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"></up-input></view></view><view class="add_but data-v-40d63b91" bindtap="{{j}}"> 保存地址 </view><up-toast class="r data-v-40d63b91" u-r="uToastRef" u-i="40d63b91-4" bind:__l="__l"></up-toast><up-picker wx:if="{{o}}" class="r data-v-40d63b91" u-r="uPickerRef" bindconfirm="{{m}}" bindchange="{{n}}" u-i="40d63b91-5" bind:__l="__l" u-p="{{o}}"></up-picker></view>
|
||||
<view class="address_add_warp"><header wx:if="{{a}}" u-i="58644e4b-0" bind:__l="__l" u-p="{{a}}"/><view class="address_form"><view class="add_form_item add_form_item_but"><view class="add_form_title">收货人</view><up-input wx:if="{{c}}" u-i="58644e4b-1" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"></up-input></view><view class="add_form_item add_form_item_but"><view class="add_form_title">手机号码</view><up-input wx:if="{{e}}" u-i="58644e4b-2" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"></up-input></view><view class="add_form_item add_form_item_but"><view class="add_form_title">所在地区</view><view class="region_warp" bindtap="{{h}}"><view style="color:#808080;margin-left:22rpx;font-size:28rpx">{{f}}</view><up-image wx:if="{{g}}" u-i="58644e4b-3" bind:__l="__l" u-p="{{g}}"></up-image></view></view><view class="add_form_item"><view class="add_form_title">详细地址</view><up-input wx:if="{{j}}" u-i="58644e4b-4" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></up-input></view></view><view class="add_but" bindtap="{{k}}"> 保存地址 </view><up-toast class="r" u-r="uToastRef" u-i="58644e4b-5" bind:__l="__l"></up-toast><up-picker wx:if="{{r}}" class="r" u-r="uPickerRef" bindconfirm="{{n}}" bindchange="{{o}}" bindcancel="{{p}}" bindclose="{{q}}" u-i="58644e4b-6" bind:__l="__l" u-p="{{r}}"></up-picker></view>
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.address_add_warp.data-v-40d63b91 {
|
||||
height: calc(100vh - 58rpx);
|
||||
background-color: #F5F5F5;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.address_form.data-v-40d63b91 {
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 30rpx 30rpx;
|
||||
}
|
||||
.region_warp.data-v-40d63b91 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: calc(100% - 160rpx);
|
||||
}
|
||||
.address_default.data-v-40d63b91 {
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.address_default .title.data-v-40d63b91 {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #222222;
|
||||
}
|
||||
Reference in New Issue
Block a user