Commit e448c92b by chenwq

查看更多

1 parent eb981817
...@@ -33,6 +33,10 @@ Component({ ...@@ -33,6 +33,10 @@ Component({
sharephone: { sharephone: {
type: String, type: String,
value: '' value: ''
},
showLeftFlag: {
type: Boolean,
value: false
} }
}, },
...@@ -146,5 +150,8 @@ Component({ ...@@ -146,5 +150,8 @@ Component({
let { phone } = e.currentTarget.dataset; let { phone } = e.currentTarget.dataset;
wx.$api.phoneCall(phone); wx.$api.phoneCall(phone);
}, },
getUserInfo(e) {
this.triggerEvent('getUserInfo', { detail: e.detail })
},
} }
}) })
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
<!-- <button class="check-act" type="default" plain="true" bindtap="checkActive">查看活动详情</button> --> <!-- <button class="check-act" type="default" plain="true" bindtap="checkActive">查看活动详情</button> -->
</block> </block>
<!-- 获取更多详情 --> <!-- 获取更多详情 -->
<!-- <block wx:if="{{ index == 2 && showLeftFlag}}"> <block wx:if="{{ index == 2 && showLeftFlag}}">
<button class="more-btn" data-index="{{index}}" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber"> <button class="more-btn" data-index="{{index}}" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber">
点击查看更多详情 点击查看更多详情
</button> </button>
</block> --> </block>
</image> </image>
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}" webp class="img-item {{item.className?item.className:''}} img-item{{index}} img-item{{actNum}}{{index}}" src="{{item.url?item.url:item}}?v={{img_version}}" /> <image webp wx:if="{{ index >= 3 && !showLeftFlag}}" webp class="img-item {{item.className?item.className:''}} img-item{{index}} img-item{{actNum}}{{index}}" src="{{item.url?item.url:item}}?v={{img_version}}" />
</block> </block>
......
...@@ -273,14 +273,13 @@ Page({ ...@@ -273,14 +273,13 @@ Page({
}) })
}, },
// 获取用户信息(手机号) // 获取用户信息(手机号)
getUserInfo({ detail }) { getUserInfo(e) {
// console.log(detail); let { detail } = e?.detail
if (!detail.code) return; if (!detail.code) return;
// this.setBtnLoading() // this.setBtnLoading()
USERAPI.getUserProfile(this.loginToken, detail) USERAPI.getUserProfile(this.loginToken, detail)
.then((result) => { .then((result) => {
// console.log(result)
let userInfo = wx.$storage.get("wx_user_info"); let userInfo = wx.$storage.get("wx_user_info");
// console.log('userInfo: ', userInfo); // console.log('userInfo: ', userInfo);
let { phone } = result; let { phone } = result;
......
<!--packagesList/pages/productDetail/productDetail.wxml--> <!--packagesList/pages/productDetail/productDetail.wxml-->
<pro-detail id="pro-detail" custom-class="{{showLeftFlag?'max_page_height':''}}" sharephone="{{sharephone}}" actNum="{{actNum}}" activeNavIdx="{{activeNavIdx}}" activeUrl="{{activeUrl}}"></pro-detail> <pro-detail id="pro-detail" showLeftFlag="{{showLeftFlag}}" sharephone="{{sharephone}}" actNum="{{actNum}}" activeNavIdx="{{activeNavIdx}}" activeUrl="{{activeUrl}}" bind:getUserInfo="getUserInfo"></pro-detail>
<block wx:if="{{showLeftFlag}}"> <!-- <block wx:if="{{showLeftFlag}}">
<button class="more-btn" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber"> <button class="more-btn" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber">
点击查看更多详情 点击查看更多详情
</button> </button>
</block> </block> -->
<!-- 申请按钮 不是分享出去的显示按钮 --> <!-- 申请按钮 不是分享出去的显示按钮 -->
<apply-button wx:if="{{!isShare}}" downShow="{{false}}"></apply-button> <apply-button wx:if="{{!isShare}}" downShow="{{false}}"></apply-button>
<!-- 授权昵称 --> <!-- 授权昵称 -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!