增加新模块
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user