增加新模块
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const api_address = require("../api/address.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
addressList: [],
|
||||
selectAddress: {}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getAddressList();
|
||||
},
|
||||
methods: {
|
||||
// 添加地址
|
||||
jumpAddAddress() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_address_add/mine_address_add"
|
||||
});
|
||||
},
|
||||
// 查询地址
|
||||
async getAddressList() {
|
||||
const res = await api_address.getAddress();
|
||||
if (res && res.bizcode === 100) {
|
||||
this.addressList = res.data;
|
||||
}
|
||||
},
|
||||
checkAddress(item) {
|
||||
this.selectAddress = item;
|
||||
this.$emit("valueFunc", item);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
_easycom_up_image2();
|
||||
}
|
||||
const _easycom_up_image = () => "../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
if (!Math) {
|
||||
_easycom_up_image();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.addressList && $data.addressList.length !== 0
|
||||
}, $data.addressList && $data.addressList.length !== 0 ? {
|
||||
b: common_vendor.f($data.addressList, (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.countryName),
|
||||
b: common_vendor.t(item.provinceName),
|
||||
c: common_vendor.t(item.cityName),
|
||||
d: common_vendor.t(item.areaName),
|
||||
e: common_vendor.t(item.address),
|
||||
f: common_vendor.t(item.name),
|
||||
g: common_vendor.t(item.phone),
|
||||
h: item.id,
|
||||
i: common_vendor.n($data.selectAddress && $data.selectAddress.id === item.id ? "address_item address_item_sel" : "address_item"),
|
||||
j: common_vendor.o(($event) => $options.checkAddress(item), item.id)
|
||||
};
|
||||
})
|
||||
} : {
|
||||
c: common_vendor.p({
|
||||
src: "/static/common/not_search.png",
|
||||
width: "100",
|
||||
height: "100",
|
||||
bgColor: "#f1f6ff00"
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7183a377"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/address.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"up-image": "../uni_modules/uview-plus/components/u-image/u-image"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="mine_address_warp data-v-7183a377"><block wx:if="{{a}}"><view wx:for="{{b}}" wx:for-item="item" wx:key="h" class="{{['data-v-7183a377', item.i]}}" bindtap="{{item.j}}"><view class="address_item_country_name data-v-7183a377">{{item.a}} {{item.b}} {{item.c}} {{item.d}}</view><view class="address_item_address data-v-7183a377">{{item.e}}</view><view class="address_item_info data-v-7183a377"><view class="data-v-7183a377">{{item.f}}</view><view class="data-v-7183a377" style="margin-left:20rpx">{{item.g}}</view></view></view></block><view wx:else class="not_order_warp data-v-7183a377"><view class="not_order_warp_img data-v-7183a377"><up-image wx:if="{{c}}" class="data-v-7183a377" u-i="7183a377-0" bind:__l="__l" u-p="{{c}}"></up-image></view><view class="not_order_msg_warp data-v-7183a377">暂时地址,快去地址管理添加吧~</view></view></view>
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.address_item.data-v-7183a377 {
|
||||
background: #FFFFFF;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #9e9e9e26;
|
||||
}
|
||||
.address_item_sel.data-v-7183a377 {
|
||||
color: #FF7C41 !important;
|
||||
background-color: #ff57220d;
|
||||
}
|
||||
.address_item_info.data-v-7183a377 {
|
||||
font-size: 26rpx;
|
||||
color: #868383;
|
||||
display: flex;
|
||||
}
|
||||
.address_item_address.data-v-7183a377 {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
.address_item_country_name.data-v-7183a377 {
|
||||
color: #9E9E9E;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "choiceness",
|
||||
data() {
|
||||
return {
|
||||
productList: [
|
||||
{
|
||||
id: 1,
|
||||
url: "/static/common/product_def2.png",
|
||||
name: "美的双开门冰箱大容量多层速冷冰箱",
|
||||
price: "7088.",
|
||||
priceDouble: "00",
|
||||
sell: "1.4万",
|
||||
type: 0
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
url: "/static/common/product_def2.png",
|
||||
name: "西门子双开门家庭冰箱大开口设计",
|
||||
price: "7088.",
|
||||
priceDouble: "00",
|
||||
sell: "1.4万",
|
||||
type: 1
|
||||
//1 哈希优选
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
url: "/static/common/product_def2.png",
|
||||
name: "西门子双开门家庭冰箱大开口设计",
|
||||
price: "7088.",
|
||||
priceDouble: "00",
|
||||
sell: "1.4万",
|
||||
type: 1
|
||||
//1 哈希优选
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//
|
||||
jumpInfo(item) {
|
||||
common_vendor.index.__f__("log", "at components/choiceness/choiceness.vue:62", "item", item);
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/productInfo/productInfo?id=" + item.id
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
_easycom_up_image2();
|
||||
}
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
if (!Math) {
|
||||
_easycom_up_image();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
src: "/static/common/jingxuan_left.png",
|
||||
width: "50",
|
||||
height: "12",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
src: "/static/common/jingxuan_right.png",
|
||||
width: "50",
|
||||
height: "12",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.f($data.productList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "3619806e-2-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "100%",
|
||||
height: "140",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: common_vendor.t(item.price),
|
||||
e: common_vendor.t(item.priceDouble),
|
||||
f: common_vendor.t(item.sell),
|
||||
g: item.id,
|
||||
h: common_vendor.o(($event) => $options.jumpInfo(item), item.id)
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3619806e"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/choiceness/choiceness.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="choiceness_warp data-v-3619806e"><view class="choiceness_title data-v-3619806e"><up-image wx:if="{{a}}" class="data-v-3619806e" u-i="3619806e-0" bind:__l="__l" u-p="{{a}}"></up-image><view class="choiceness_title_msg data-v-3619806e">为您精选</view><up-image wx:if="{{b}}" class="data-v-3619806e" u-i="3619806e-1" bind:__l="__l" u-p="{{b}}"></up-image></view><view class="choiceness_product data-v-3619806e"><view wx:for="{{c}}" wx:for-item="item" wx:key="g" class="choiceness_product_item data-v-3619806e" bindtap="{{item.h}}"><up-image wx:if="{{item.b}}" class="data-v-3619806e" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="product_item_name data-v-3619806e">{{item.c}}</view><view class="product_item_price data-v-3619806e"><view class="price_ data-v-3619806e"><text class="data-v-3619806e">¥</text><text class="data-v-3619806e" style="color:36rpx">{{item.d}}</text><text class="data-v-3619806e">{{item.e}}</text></view><view class="price_sell data-v-3619806e">已售{{item.f}}件</view></view></view></view></view>
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.choiceness_warp.data-v-3619806e {
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
.choiceness_title.data-v-3619806e {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.choiceness_title .choiceness_title_msg.data-v-3619806e {
|
||||
margin: 0 18rpx;
|
||||
}
|
||||
.choiceness_product.data-v-3619806e {
|
||||
margin-top: 40rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.choiceness_product .choiceness_product_item.data-v-3619806e {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 10rpx 0rpx #EEEEEE;
|
||||
border-radius: 24rpx;
|
||||
width: 43%;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.choiceness_product .product_item_name.data-v-3619806e {
|
||||
font-weight: bold;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.choiceness_product .product_item_price.data-v-3619806e {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.choiceness_product .product_item_price .price_.data-v-3619806e {
|
||||
font-weight: bold;
|
||||
font-size: 26rpx;
|
||||
color: #FF7C41;
|
||||
}
|
||||
.choiceness_product .product_item_price .price_sell.data-v-3619806e {
|
||||
font-weight: 400;
|
||||
font-size: 18rpx;
|
||||
color: #999999;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
common_vendor.ref(null);
|
||||
const _sfc_main = {
|
||||
name: "inputComm",
|
||||
props: ["modelValue", "codeNumberRef", "emptyCountdownRef"],
|
||||
watch: {
|
||||
emptyCountdownRef(value, oldValue) {
|
||||
if (value) {
|
||||
this.countdown = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
countdown: false,
|
||||
emptyCountdown: this.emptyCountdownRef,
|
||||
inputCss: {
|
||||
"height": "80rpx",
|
||||
"background": "#F3F3F3FF",
|
||||
"border-radius": "30rpx",
|
||||
"border": "0rpx",
|
||||
"padding-left": "16px"
|
||||
}
|
||||
};
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
getCode(val) {
|
||||
this.emptyCountdown;
|
||||
if (val) {
|
||||
const codeNumber = this.codeNumberRef;
|
||||
if (codeNumber) {
|
||||
this.$emit("getCode");
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: this.$t("login.comm.email")
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: this.$t("login.comm.email")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_count_down2 = common_vendor.resolveComponent("up-count-down");
|
||||
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
|
||||
(_easycom_up_count_down2 + _easycom_up_toast2)();
|
||||
}
|
||||
const _easycom_up_count_down = () => "../../uni_modules/uview-plus/components/u-count-down/u-count-down.js";
|
||||
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_count_down + _easycom_up_toast)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.$t("login.comm.code"),
|
||||
b: $props.modelValue,
|
||||
c: common_vendor.o(($event) => _ctx.$emit("update:modelValue", $event.target.value)),
|
||||
d: $data.countdown
|
||||
}, $data.countdown ? {
|
||||
e: common_vendor.o(($event) => $options.getCode(false)),
|
||||
f: common_vendor.p({
|
||||
time: 60 * 1e3,
|
||||
format: "ss"
|
||||
})
|
||||
} : {
|
||||
g: common_vendor.t(_ctx.$t("login.comm.get.code")),
|
||||
h: common_vendor.o(($event) => $options.getCode(true))
|
||||
}, {
|
||||
i: common_vendor.sr("uToastRef", "fa3fd76f-1")
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-fa3fd76f"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/code-comm/code-comm.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"up-count-down": "../../uni_modules/uview-plus/components/u-count-down/u-count-down",
|
||||
"up-toast": "../../uni_modules/uview-plus/components/u-toast/u-toast"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="comm-input-warp data-v-fa3fd76f"><input class="data-v-fa3fd76f" placeholder="{{a}}" border="false" v-model="{{b}}" color="#EEEEEE" type="number" bindinput="{{c}}" style="height:64rpx;width:70%"></input><view wx:if="{{d}}" class="code-warp data-v-fa3fd76f"><up-count-down wx:if="{{f}}" class="data-v-fa3fd76f" bindfinish="{{e}}" u-i="fa3fd76f-0" bind:__l="__l" u-p="{{f}}"></up-count-down><text class="data-v-fa3fd76f" style="margin-left:10rpx">s</text></view><view wx:else class="code-warp data-v-fa3fd76f" bindtap="{{h}}"><view class="data-v-fa3fd76f">{{g}}</view></view><up-toast class="r data-v-fa3fd76f" u-r="uToastRef" u-i="fa3fd76f-1" bind:__l="__l"></up-toast></view>
|
||||
@@ -0,0 +1,9 @@
|
||||
.code-warp.data-v-fa3fd76f {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.wrap.data-v-fa3fd76f {
|
||||
padding: 24rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user