Commit e448c92b by chenwq

查看更多

1 parent eb981817
......@@ -33,6 +33,10 @@ Component({
sharephone: {
type: String,
value: ''
},
showLeftFlag: {
type: Boolean,
value: false
}
},
......@@ -146,5 +150,8 @@ Component({
let { phone } = e.currentTarget.dataset;
wx.$api.phoneCall(phone);
},
getUserInfo(e) {
this.triggerEvent('getUserInfo', { detail: e.detail })
},
}
})
......@@ -36,11 +36,11 @@
<!-- <button class="check-act" type="default" plain="true" bindtap="checkActive">查看活动详情</button> -->
</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>
</block> -->
</block>
</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}}" />
</block>
......
......@@ -273,14 +273,13 @@ Page({
})
},
// 获取用户信息(手机号)
getUserInfo({ detail }) {
// console.log(detail);
getUserInfo(e) {
let { detail } = e?.detail
if (!detail.code) return;
// this.setBtnLoading()
USERAPI.getUserProfile(this.loginToken, detail)
.then((result) => {
// console.log(result)
let userInfo = wx.$storage.get("wx_user_info");
// console.log('userInfo: ', userInfo);
let { phone } = result;
......
<!--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>
</block>
</block> -->
<!-- 申请按钮 不是分享出去的显示按钮 -->
<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!