12.12 页面风格改版,增加事件详情相关概念网页跳转,增加绑定手机号功能
This commit is contained in:
@@ -33,7 +33,7 @@ const _sfc_main = {
|
||||
* @param {Object} e
|
||||
*/
|
||||
chooseAvatar(e) {
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:65", e);
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:68", e);
|
||||
this.avatar = e.detail.avatarUrl;
|
||||
},
|
||||
/**
|
||||
@@ -41,10 +41,33 @@ const _sfc_main = {
|
||||
* @param {Object} e
|
||||
*/
|
||||
sexChange(e) {
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:74", e);
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:77", e);
|
||||
let value = e.detail.value;
|
||||
this.sex = this.sexList[value];
|
||||
},
|
||||
/**
|
||||
* 获取手机号
|
||||
* @param {Object} e
|
||||
*/
|
||||
getPhoneNumData(e) {
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:87", e);
|
||||
if (e.detail.errMsg == "getPhoneNumber:ok") {
|
||||
let param = { code: e.detail.code };
|
||||
request_api.wxBindPhone(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: res.message
|
||||
});
|
||||
this.mobile = res.data.phone;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击下一步
|
||||
*/
|
||||
@@ -143,20 +166,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: $data.avatar ? $data.avatar : $data.avatarUrl,
|
||||
d: common_assets._imports_1$3,
|
||||
d: common_assets._imports_1$5,
|
||||
e: common_vendor.o((...args) => $options.chooseAvatar && $options.chooseAvatar(...args)),
|
||||
f: common_vendor.s("top:" + $data.avatarTop + "px;"),
|
||||
g: $data.nickname,
|
||||
h: common_vendor.o(($event) => $data.nickname = $event.detail.value),
|
||||
i: common_vendor.t($data.mobile),
|
||||
j: common_vendor.t($data.sex),
|
||||
k: common_assets._imports_2$5,
|
||||
l: $data.sexList,
|
||||
m: common_vendor.o((...args) => $options.sexChange && $options.sexChange(...args)),
|
||||
n: $data.profile,
|
||||
o: common_vendor.o(($event) => $data.profile = $event.detail.value),
|
||||
p: common_vendor.s("top:" + $data.contentTop + "px;"),
|
||||
q: common_vendor.o(($event) => $options.clickNext())
|
||||
j: common_vendor.o((...args) => $options.getPhoneNumData && $options.getPhoneNumData(...args)),
|
||||
k: common_vendor.t($data.sex),
|
||||
l: common_assets._imports_2$5,
|
||||
m: $data.sexList,
|
||||
n: common_vendor.o((...args) => $options.sexChange && $options.sexChange(...args)),
|
||||
o: $data.profile,
|
||||
p: common_vendor.o(($event) => $data.profile = $event.detail.value),
|
||||
q: common_vendor.s("top:" + $data.contentTop + "px;"),
|
||||
r: common_vendor.o(($event) => $options.clickNext())
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="8b6eb184-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{f}}"><image class="avatar" src="{{c}}" mode="aspectFill"></image><image class="icon absolute" src="{{d}}" mode="widthFix"></image><button class="absolute" open-type="chooseAvatar" bindchooseavatar="{{e}}"></button></view><view class="basicInfoC fixed" style="{{p}}"><view class="title">基本信息</view><view class="section">昵称</view><view class="inputC"><input type="nickname" value="{{g}}" bindinput="{{h}}"/></view><view class="section">手机号</view><view class="selectC flex">{{i}}</view><view class="section">性别</view><picker mode="selector" range="{{l}}" bindchange="{{m}}"><view class="selectC flex"><view class="flex1">{{j}}</view><image class="arrow" src="{{k}}" mode="widthFix"></image></view></picker><view class="section">个人简介</view><view class="textareaC"><block wx:if="{{r0}}"><textarea placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA" value="{{n}}" bindinput="{{o}}"></textarea></block></view></view><view class="next fixed" bindtap="{{q}}">下一步</view></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="8b6eb184-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{f}}"><image class="avatar" src="{{c}}" mode="aspectFill"></image><image class="icon absolute" src="{{d}}" mode="widthFix"></image><button class="absolute" open-type="chooseAvatar" bindchooseavatar="{{e}}"></button></view><view class="basicInfoC fixed" style="{{q}}"><view class="title">基本信息</view><view class="section">昵称</view><view class="inputC"><input type="nickname" value="{{g}}" bindinput="{{h}}"/></view><view class="section">手机号</view><view class="selectC flex relative">{{i}} <button class="absolute" open-type="getPhoneNumber" bindgetphonenumber="{{j}}"></button></view><view class="section">性别</view><picker mode="selector" range="{{m}}" bindchange="{{n}}"><view class="selectC flex"><view class="flex1">{{k}}</view><image class="arrow" src="{{l}}" mode="widthFix"></image></view></picker><view class="section">个人简介</view><view class="textareaC"><block wx:if="{{r0}}"><textarea placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA" value="{{o}}" bindinput="{{p}}"></textarea></block></view></view><view class="next fixed" bindtap="{{r}}">下一步</view></view>
|
||||
@@ -76,6 +76,12 @@
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
.basicInfoC .selectC button {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.basicInfoC .textareaC {
|
||||
background-color: #FBFBFD;
|
||||
margin: 0 60rpx;
|
||||
|
||||
@@ -108,7 +108,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, $data.getRateUpOrDown(item.related_avg_chg) ? {
|
||||
f: common_assets._imports_1$1
|
||||
} : {
|
||||
g: common_assets._imports_2$2
|
||||
g: common_assets._imports_2$1
|
||||
}, {
|
||||
h: common_vendor.t($data.getRateStr(item.related_avg_chg)),
|
||||
i: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
|
||||
@@ -116,7 +116,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, $data.getRateUpOrDown(item.related_max_chg) ? {
|
||||
k: common_assets._imports_1$1
|
||||
} : {
|
||||
l: common_assets._imports_2$2
|
||||
l: common_assets._imports_2$1
|
||||
}, {
|
||||
m: common_vendor.t($data.getRateStr(item.related_max_chg)),
|
||||
n: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
|
||||
@@ -124,7 +124,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, $data.getRateUpOrDown(item.related_week_chg) ? {
|
||||
p: common_assets._imports_1$1
|
||||
} : {
|
||||
q: common_assets._imports_2$2
|
||||
q: common_assets._imports_2$1
|
||||
}, {
|
||||
r: common_vendor.t($data.getRateStr(item.related_week_chg)),
|
||||
s: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_week_chg) ? "down" : "up")),
|
||||
@@ -145,9 +145,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
B: index
|
||||
});
|
||||
}),
|
||||
d: common_assets._imports_3,
|
||||
d: common_assets._imports_3$1,
|
||||
e: common_assets._imports_4,
|
||||
f: common_assets._imports_5$2,
|
||||
f: common_assets._imports_5$3,
|
||||
g: common_vendor.s("top:" + $data.navH + "px;")
|
||||
};
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: $data.avatar ? $data.avatar : $data.avatarUrl,
|
||||
d: common_assets._imports_1$3,
|
||||
d: common_assets._imports_1$5,
|
||||
e: common_vendor.o((...args) => $options.chooseAvatar && $options.chooseAvatar(...args)),
|
||||
f: common_vendor.s("top:" + $data.avatarTop + "px;"),
|
||||
g: common_vendor.f($data.investPreferenceList, (item, index, i0) => {
|
||||
|
||||
64
unpackage/dist/dev/mp-weixin/pages/mine/mine.js
vendored
64
unpackage/dist/dev/mp-weixin/pages/mine/mine.js
vendored
@@ -9,6 +9,9 @@ const _sfc_main = {
|
||||
menuH: common_vendor.inject("menuHeight"),
|
||||
infoTop: "",
|
||||
userInfo: null,
|
||||
//用户信息
|
||||
memberInfo: null,
|
||||
//会员信息
|
||||
menuList: [
|
||||
{
|
||||
icon: "/static/icon/mine/aboutUs.png",
|
||||
@@ -46,6 +49,7 @@ const _sfc_main = {
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfoData();
|
||||
this.getMemberStatus();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -82,6 +86,11 @@ const _sfc_main = {
|
||||
url: "/pages/mine/myLike/myLike"
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击菜单
|
||||
* @param {Object} url
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickMenuItem(url, index) {
|
||||
if (url) {
|
||||
common_vendor.index.navigateTo({
|
||||
@@ -116,6 +125,21 @@ const _sfc_main = {
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatus() {
|
||||
request_api.membershipStatus().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.memberInfo = res.data;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -132,26 +156,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
a: common_assets._imports_0,
|
||||
b: common_vendor.s("top:" + $data.menuTop + "px;line-height:" + $data.menuH + "px;"),
|
||||
c: $data.userInfo
|
||||
}, $data.userInfo ? {
|
||||
}, $data.userInfo ? common_vendor.e({
|
||||
d: $data.userInfo.basic_info.avatar_url,
|
||||
e: common_vendor.t($data.userInfo.basic_info.username),
|
||||
f: common_vendor.t($data.userInfo.basic_info.phone),
|
||||
g: common_assets._imports_1$2,
|
||||
h: common_vendor.s("margin-top:" + $data.infoTop + "px;"),
|
||||
i: common_vendor.o(($event) => $options.clickPersonalInfo())
|
||||
g: $data.memberInfo && $data.memberInfo.is_member
|
||||
}, $data.memberInfo && $data.memberInfo.is_member ? {
|
||||
h: common_vendor.t($data.memberInfo.subscription_type)
|
||||
} : {}, {
|
||||
j: $data.userInfo
|
||||
i: common_assets._imports_1$4,
|
||||
j: common_vendor.s("margin-top:" + $data.infoTop + "px;"),
|
||||
k: common_vendor.o(($event) => $options.clickPersonalInfo())
|
||||
}) : {}, {
|
||||
l: $data.userInfo
|
||||
}, $data.userInfo ? {
|
||||
k: common_vendor.t($data.userInfo.statistics.total_comments),
|
||||
l: common_vendor.o(($event) => $options.clickNumItem(0)),
|
||||
m: common_vendor.t($data.userInfo.statistics.follows_count),
|
||||
n: common_vendor.o(($event) => $options.clickNumItem(1)),
|
||||
o: common_vendor.t($data.userInfo.statistics.likes_count),
|
||||
p: common_vendor.o(($event) => $options.clickNumItem(2))
|
||||
m: common_vendor.t($data.userInfo.statistics.total_comments),
|
||||
n: common_vendor.o(($event) => $options.clickNumItem(0)),
|
||||
o: common_vendor.t($data.userInfo.statistics.follows_count),
|
||||
p: common_vendor.o(($event) => $options.clickNumItem(1)),
|
||||
q: common_vendor.t($data.userInfo.statistics.likes_count),
|
||||
r: common_vendor.o(($event) => $options.clickNumItem(2))
|
||||
} : {}, {
|
||||
q: common_assets._imports_2$4,
|
||||
r: common_vendor.o(($event) => $options.clickVip()),
|
||||
s: common_vendor.f($data.menuList, (item, index, i0) => {
|
||||
s: common_assets._imports_2$4,
|
||||
t: common_vendor.o(($event) => $options.clickVip()),
|
||||
v: common_vendor.f($data.menuList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.icon,
|
||||
b: common_vendor.t(item.title),
|
||||
@@ -159,10 +187,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickMenuItem(item.url, index), index)
|
||||
};
|
||||
}),
|
||||
t: common_assets._imports_3$3,
|
||||
v: common_assets._imports_4$2,
|
||||
w: common_vendor.sr("popup", "dd5840e4-0"),
|
||||
x: common_vendor.p({
|
||||
w: common_assets._imports_3$3,
|
||||
x: common_assets._imports_4$4,
|
||||
y: common_vendor.sr("popup", "dd5840e4-0"),
|
||||
z: common_vendor.p({
|
||||
type: "center"
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">个人中心</view><view wx:if="{{c}}" class="personalInfoC relative flex" style="{{h}}" bindtap="{{i}}"><image class="avatar" src="{{d}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{e}}</view><view class="mobile">手机号:{{f}}</view></view><image class="arrow" src="{{g}}" mode="widthFix"></image></view><view wx:if="{{j}}" class="numList relative flex"><view class="item flex1 flexColumnCenter" bindtap="{{l}}"><view class="num">{{k}}</view><view class="title">评论回复</view></view><view class="item flex1 flexColumnCenter" bindtap="{{n}}"><view class="num">{{m}}</view><view class="title">关注收藏</view></view><view class="item flex1 flexColumnCenter" bindtap="{{p}}"><view class="num">{{o}}</view><view class="title">我的点赞</view></view></view><view class="vipC relative" bindtap="{{r}}"><image class="icon" src="{{q}}" mode="widthFix"></image></view><view class="menuList relative"><view class="list"><view wx:for="{{s}}" wx:for-item="item" wx:key="c" class="item relative flex" bindtap="{{item.d}}"><image class="icon" src="{{item.a}}" mode="aspectFit"></image><view class="title flex1">{{item.b}}</view><image class="arrow" src="{{t}}" mode="widthFix"></image></view></view></view><uni-popup wx:if="{{x}}" class="r" u-s="{{['d']}}" u-r="popup" u-i="dd5840e4-0" bind:__l="__l" u-p="{{x}}"><view class="popup"><image class="icon" src="{{v}}" mode="widthFix" show-menu-by-longpress></image></view></uni-popup></view>
|
||||
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">个人中心</view><view wx:if="{{c}}" class="personalInfoC relative flex" style="{{j}}" bindtap="{{k}}"><image class="avatar" src="{{d}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{e}}</view><view class="mobile">手机号:{{f}}</view><view wx:if="{{g}}" class="mobile">{{h}}会员</view></view><image class="arrow" src="{{i}}" mode="widthFix"></image></view><view wx:if="{{l}}" class="numList relative flex"><view class="item flex1 flexColumnCenter" bindtap="{{n}}"><view class="num">{{m}}</view><view class="title">评论回复</view></view><view class="item flex1 flexColumnCenter" bindtap="{{p}}"><view class="num">{{o}}</view><view class="title">关注收藏</view></view><view class="item flex1 flexColumnCenter" bindtap="{{r}}"><view class="num">{{q}}</view><view class="title">我的点赞</view></view></view><view class="vipC relative" bindtap="{{t}}"><image class="icon" src="{{s}}" mode="widthFix"></image></view><view class="menuList relative"><view class="list"><view wx:for="{{v}}" wx:for-item="item" wx:key="c" class="item relative flex" bindtap="{{item.d}}"><image class="icon" src="{{item.a}}" mode="aspectFit"></image><view class="title flex1">{{item.b}}</view><image class="arrow" src="{{w}}" mode="widthFix"></image></view></view></view><uni-popup wx:if="{{z}}" class="r" u-s="{{['d']}}" u-r="popup" u-i="dd5840e4-0" bind:__l="__l" u-p="{{z}}"><view class="popup"><image class="icon" src="{{x}}" mode="widthFix" show-menu-by-longpress></image></view></uni-popup></view>
|
||||
@@ -1,3 +1,6 @@
|
||||
page {
|
||||
background-color: black;
|
||||
}
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -30,7 +33,7 @@
|
||||
margin-top: 6rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #FFECD3;
|
||||
color: #F3C368;
|
||||
}
|
||||
.personalInfoC .arrow {
|
||||
width: 15rpx;
|
||||
@@ -50,7 +53,7 @@
|
||||
color: #FFECD3;
|
||||
}
|
||||
.vipC {
|
||||
padding: 0 25rpx;
|
||||
margin: 0 45rpx;
|
||||
}
|
||||
.vipC .icon {
|
||||
display: block;
|
||||
@@ -59,8 +62,9 @@
|
||||
}
|
||||
.menuList {
|
||||
background-color: white;
|
||||
padding: 0 25rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
margin: 0 25rpx;
|
||||
padding: 0 20rpx 220rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.menuList .item {
|
||||
height: 100rpx;
|
||||
|
||||
@@ -87,7 +87,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
f: index
|
||||
};
|
||||
}),
|
||||
d: common_assets._imports_1$5,
|
||||
d: common_assets._imports_1$6,
|
||||
e: common_vendor.s("top:" + $data.navH + "px;")
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user