增加新模块
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
infoList: [
|
||||
{
|
||||
id: 1,
|
||||
name: "余额"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "奖金"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "兑换券"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "HM"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "HMC"
|
||||
}
|
||||
],
|
||||
selInfo: 1,
|
||||
orderList: [
|
||||
{
|
||||
id: 1,
|
||||
type: 0,
|
||||
// 0:消,1:收
|
||||
name: "购物",
|
||||
time: "01-01 14:10:10",
|
||||
amount: 1e3,
|
||||
typeName: "购物消费"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
type: 1,
|
||||
// 0:消,1:收
|
||||
name: "卖出HM-到账",
|
||||
time: "01-01 14:10:10",
|
||||
amount: 1e3,
|
||||
typeName: "收入到账"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
type: 1,
|
||||
// 0:消,1:收
|
||||
name: "卖出HM-到账",
|
||||
time: "01-01 14:10:10",
|
||||
amount: 1e3,
|
||||
typeName: "收入到账"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
type: 1,
|
||||
// 0:消,1:收
|
||||
name: "卖出HM-到账",
|
||||
time: "01-01 14:10:10",
|
||||
amount: 1e3,
|
||||
typeName: "收入到账"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
type: 1,
|
||||
// 0:消,1:收
|
||||
name: "卖出HM-到账",
|
||||
time: "01-01 14:10:10",
|
||||
amount: 1e3,
|
||||
typeName: "收入到账"
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectInfo(item) {
|
||||
this.selInfo = item.id;
|
||||
},
|
||||
// 跳转到奖金
|
||||
jumpBonus() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_purse_bonus/mine_purse_bonus"
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
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.o((...args) => $options.jumpBonus && $options.jumpBonus(...args)),
|
||||
b: common_vendor.f($data.infoList, (item, k0, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.name),
|
||||
b: $data.selInfo === item.id
|
||||
}, $data.selInfo === item.id ? {} : {}, {
|
||||
c: common_vendor.n($data.selInfo === item.id ? "info_title_item_warp info_title_item_sel_warp" : "info_title_item_warp"),
|
||||
d: item.id,
|
||||
e: common_vendor.o(($event) => $options.selectInfo(item), item.id)
|
||||
});
|
||||
}),
|
||||
c: common_vendor.f($data.orderList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "00f7ce42-0-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.type === 1 ? "/static/mine/purse_sf.png" : "/static/mine/purse_xf.png",
|
||||
width: "40",
|
||||
height: "40",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: common_vendor.t(item.time),
|
||||
e: common_vendor.t(item.type === 1 ? "+" : "-"),
|
||||
f: common_vendor.t(item.amount),
|
||||
g: common_vendor.t(item.typeName),
|
||||
h: item.id
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00f7ce42"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_purse/mine_purse.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的钱包",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarTextStyle": "black",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "default",
|
||||
"usingComponents": {
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="purse_warp data-v-00f7ce42"><view class="purse_collect data-v-00f7ce42"><view class="collect_item collect_item_but data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">余额(元)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42" bindtap="{{a}}"><view class="collect_title data-v-00f7ce42">奖金(元)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">兑换券</view><view class="collect_value data-v-00f7ce42">10</view></view></view><view class="collect_item data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HM(锁仓)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42"> HM(可交易)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HMC</view><view class="collect_value data-v-00f7ce42">10</view></view></view></view><view class="info_warp data-v-00f7ce42"><view class="info_title_warp data-v-00f7ce42"><view wx:for="{{b}}" wx:for-item="item" wx:key="d" class="{{['data-v-00f7ce42', item.c]}}" bindtap="{{item.e}}"><text class="data-v-00f7ce42">{{item.a}}</text><view wx:if="{{item.b}}" class="info_title_item_sel_but_warp data-v-00f7ce42"></view></view></view><view class="info_list_warp data-v-00f7ce42"><view wx:for="{{c}}" wx:for-item="item" wx:key="h" class="purse_info_item data-v-00f7ce42"><view class="purse_info_left data-v-00f7ce42"><up-image wx:if="{{item.b}}" class="data-v-00f7ce42" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="purse_data_warp data-v-00f7ce42"><view class="purse_info_name data-v-00f7ce42">{{item.c}}</view><view class="purse_info_value data-v-00f7ce42">{{item.d}}</view></view></view><view class="ipurse_nfo_right data-v-00f7ce42"><view class="purse_info_title data-v-00f7ce42">{{item.e}} {{item.f}}</view><view class="purse_info_value data-v-00f7ce42">{{item.g}}</view></view></view></view></view></view>
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.purse_warp.data-v-00f7ce42 {
|
||||
height: calc(100vh - 58rpx);
|
||||
padding: 20rpx;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.purse_collect.data-v-00f7ce42 {
|
||||
padding: 48rpx 16px;
|
||||
background: #FF7C41;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
.purse_collect .collect_item.data-v-00f7ce42 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.purse_collect .collect_item .item_warp.data-v-00f7ce42 {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
.purse_collect .collect_item .item_right_warp.data-v-00f7ce42 {
|
||||
border-right: 1rpx solid #ffffff85;
|
||||
height: 50rpx;
|
||||
}
|
||||
.purse_collect .collect_item .collect_title.data-v-00f7ce42 {
|
||||
font-weight: 500;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.purse_collect .collect_item .collect_value.data-v-00f7ce42 {
|
||||
font-weight: 800;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.purse_collect .collect_item_but.data-v-00f7ce42 {
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
.info_warp.data-v-00f7ce42 {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.info_warp .info_title_warp.data-v-00f7ce42 {
|
||||
display: flex;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
.info_warp .info_title_item_warp.data-v-00f7ce42 {
|
||||
margin-right: 40rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.info_warp .info_title_item_sel_warp.data-v-00f7ce42 {
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.info_warp .info_title_item_sel_but_warp.data-v-00f7ce42 {
|
||||
background: #FFB541;
|
||||
border-radius: 4rpx;
|
||||
width: 40rpx;
|
||||
height: 8rpx;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
.info_warp .info_list_warp.data-v-00f7ce42 {
|
||||
margin-top: 30rpx;
|
||||
height: calc(100vh - 500rpx);
|
||||
overflow-y: auto;
|
||||
}
|
||||
Reference in New Issue
Block a user