6.30 版本提交

This commit is contained in:
尚政杰
2025-06-30 19:02:44 +08:00
commit c4267a0e27
338 changed files with 27942 additions and 0 deletions

View File

@@ -0,0 +1,131 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_assets = require("../../../common/assets.js");
const _sfc_main = {
data() {
return {
avatarTop: "",
contentTop: "",
investPreferenceList: ["长期投资", "中短期投资", "风险控制型"],
selectInvestIndex: -1,
stockYearList: ["新手入门", "1年以内", "1-3年", "3-5年", "5-10年", "10年以上"],
selectYearIndex: -1,
riskPreferenceList: ["保守型", "稳健型", "保守型"],
selectRiskIndex: -1,
investmentScaleList: ["50万以下", "50-100万", "100万以上"],
selectScaleIndex: -1,
preferredMarketList: [{ title: "A股" }, { title: "港股" }, { title: "美股" }, { title: "期货" }, { title: "虚拟货币" }, { title: "新兴市场" }]
};
},
onLoad() {
this.avatarTop = common_vendor.inject("navHeight") + 60 / 750 * common_vendor.inject("windowWidth");
this.contentTop = this.avatarTop + 75 / 750 * common_vendor.inject("windowWidth");
},
methods: {
/**
* 点击选择投资偏好
* @param {Object} index
*/
clickInvestItem(index) {
if (this.selectInvestIndex != index) {
this.selectInvestIndex = index;
}
},
/**
* 点击选择风险偏好
* @param {Object} index
*/
clickYearItem(index) {
if (this.selectYearIndex != index) {
this.selectYearIndex = index;
}
},
/**
* 点击选择风险偏好
* @param {Object} index
*/
clickRiskItem(index) {
if (this.selectRiskIndex != index) {
this.selectRiskIndex = index;
}
},
/**
* 点击选择投资规模
* @param {Object} index
*/
clickScaleItem(index) {
if (this.selectScaleIndex != index) {
this.selectScaleIndex = index;
}
},
/**
* 点击选择市场偏好
* @param {Object} index
*/
clickMarketItem(index) {
this.preferredMarketList[index].select = !this.preferredMarketList[index].select;
}
}
};
if (!Array) {
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
_easycom_navBar2();
}
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
if (!Math) {
_easycom_navBar();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
leftText: "信息完善"
}),
b: common_assets._imports_0,
c: common_assets._imports_1$3,
d: common_vendor.s("top:" + $data.avatarTop + "px;"),
e: common_vendor.f($data.investPreferenceList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.n("item " + ($data.selectInvestIndex == index ? "select" : "")),
c: index,
d: common_vendor.o(($event) => $options.clickInvestItem(index), index)
};
}),
f: common_vendor.f($data.stockYearList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.n("item " + ($data.selectYearIndex == index ? "select" : "")),
c: index,
d: common_vendor.o(($event) => $options.clickYearItem(index), index)
};
}),
g: common_vendor.f($data.riskPreferenceList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.n("item " + ($data.selectRiskIndex == index ? "select" : "")),
c: index,
d: common_vendor.o(($event) => $options.clickRiskItem(index), index)
};
}),
h: common_vendor.f($data.investmentScaleList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.n("item " + ($data.selectScaleIndex == index ? "select" : "")),
c: index,
d: common_vendor.o(($event) => $options.clickScaleItem(index), index)
};
}),
i: common_vendor.f($data.preferredMarketList, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: common_vendor.n("item " + (item.select ? "select" : "")),
c: index,
d: common_vendor.o(($event) => $options.clickMarketItem(index), index)
};
}),
j: common_vendor.s("top:" + $data.contentTop + "px;")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/investPreference/investPreference.js.map

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "",
"usingComponents": {
"nav-bar": "../../../components/navBar/navBar"
}
}

View File

@@ -0,0 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="ea3a6ff8-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{d}}"><image class="avatar" src="{{''}}" mode="aspectFill"></image><image class="icon absolute" src="{{c}}" mode="widthFix"></image></view><view class="preferenceC fixed" style="{{j}}"><view class="title">投资偏好设置</view><view class="section first">投资偏好</view><view class="list flexWrap"><view wx:for="{{e}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">炒股年限</view><view class="list flexWrap"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">风险偏好</view><view class="list flexWrap"><view wx:for="{{g}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">投资规模</view><view class="list flexWrap"><view wx:for="{{h}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">偏好市场(可多选)</view><view class="list flexWrap"><view wx:for="{{i}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view></view><view class="bottomC fixed flex"><view class="pre btn">上一步</view><view class="finish btn flex1">完成</view></view></view>

View File

@@ -0,0 +1,91 @@
.topBg {
top: 0;
left: 0;
width: 100%;
height: auto;
}
.avatarC {
left: 0;
margin-left: calc((100% - 150rpx)/2);
width: 150rpx;
z-index: 10;
}
.avatarC .avatar {
background-color: red;
width: 100%;
height: 150rpx;
border-radius: 50%;
border: solid 2rpx white;
}
.avatarC .icon {
right: 20rpx;
bottom: 0;
width: 40rpx;
height: auto;
}
.preferenceC {
background-color: white;
left: 0;
right: 0;
bottom: calc(73rpx + 17rpx + 80rpx);
border-radius: 20rpx 20rpx 0 0;
overflow-y: scroll;
}
.preferenceC .title {
margin: 150rpx 0 0 60rpx;
font-size: 36rpx;
font-weight: bold;
}
.preferenceC .section {
margin: 10rpx 60rpx 0;
line-height: 66rpx;
font-size: 26rpx;
font-weight: bold;
}
.preferenceC .section.first {
margin-top: 20rpx;
}
.preferenceC .list {
padding: 0 60rpx;
}
.preferenceC .list .item {
background-color: #FBFBFD;
margin: 0 14rpx 12rpx 0;
width: calc((100% - 28rpx)/3);
line-height: 76rpx;
border: solid 2rpx #EFEFF2;
border-radius: 10rpx;
font-size: 24rpx;
font-weight: 500;
color: #555;
text-align: center;
}
.preferenceC .list .item.select {
background-color: #FFE9D9;
border: solid 2rpx #F97316;
}
.preferenceC .list .item:nth-child(3n) {
margin-right: 0;
}
.bottomC {
left: 0;
right: 0;
bottom: 73rpx;
margin: 0 25rpx;
}
.bottomC .btn {
line-height: 80rpx;
border-radius: 20rpx;
font-size: 26rpx;
text-align: center;
}
.bottomC .pre {
background-color: #FFE9D9;
width: 226rpx;
color: #F97316;
}
.bottomC .finish {
background-color: #F97316;
margin-left: 20rpx;
color: white;
}