|
|
@@ -46,7 +46,7 @@
|
|
|
<view class="bg-white padding-sm">
|
|
|
<view class="flex justify-around">
|
|
|
<block v-for="(item,index) in boostDetail.presentList" :key="index">
|
|
|
- <view class="text-center padding-top-xs" :class="current == index ? 'boder':''" @click="change(index)">
|
|
|
+ <view class="text-center padding-top-xs" :class="current == index ? 'boder':''" @click="change(item.id,index)">
|
|
|
<image :src="item.icon" style="width: 80upx;height: 80upx;"></image>
|
|
|
<view class="text-sm margin-tb-xs">金额: {{+item.price}}</view>
|
|
|
<view style="margin-bottom: 10upx;">
|
|
|
@@ -77,11 +77,11 @@
|
|
|
</view>
|
|
|
<u-popup v-model="shareShow" mode="bottom" height="460rpx" border-radius="30">
|
|
|
<view class="flex align-center justify-around" style="padding: 90upx 60upx 70upx 60upx;">
|
|
|
- <view class="text-center">
|
|
|
+ <view class="text-center" @click="wxShare">
|
|
|
<image src="/static/wx-share.png" style="width: 125upx;height: 125upx;"></image>
|
|
|
<view class="text-sm">分享好友</view>
|
|
|
</view>
|
|
|
- <view class="text-center">
|
|
|
+ <view class="text-center" @click="pyqShare">
|
|
|
<image src="/static/wx-pyq.png" style="width: 129upx;height: 124upx;"></image>
|
|
|
<view class="text-sm">分享朋友圈</view>
|
|
|
</view>
|
|
|
@@ -94,15 +94,38 @@
|
|
|
<view class="bg-img text-center" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/e914f556be414767aca011a30961560a-dialogBgImg.png');height: 600rpx;">
|
|
|
<view style="height: 120upx;"></view>
|
|
|
<u-avatar src="/static/avatar.png" size="160"></u-avatar>
|
|
|
- <view class="margin-top" style="font-size: 24upx;font-family: PingFang SC;font-weight: bold;color: #323035;">你将为{{boostDetail.nickName}}增加50热力值</view>
|
|
|
+ <view class="margin-top" style="font-size: 24upx;font-family: PingFang SC;font-weight: bold;color: #323035;">你将为{{boostDetail.nickName}}增加{{+boostDetail.presentList[current].hotValue}}热力值</view>
|
|
|
<view class="text-gray text-sm">公益勋章X1</view>
|
|
|
<view class="text-gray text-sm">立白助力礼包A</view>
|
|
|
- <view class="text-gray text-sm">可得300积分,可用于国信商城兑换</view>
|
|
|
+ <view class="text-gray text-sm">可得{{+boostDetail.presentList[current].pointsValue}}积分,可用于国信商城兑换</view>
|
|
|
<view class="padding">
|
|
|
<u-button class="custom-style" shape="circle" @click="pay">去支付</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <u-popup v-model="successShow" mode="center" width="500rpx" height="600rpx" border-radius="30">
|
|
|
+ <view class="bg-img text-center" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/e914f556be414767aca011a30961560a-dialogBgImg.png');height: 600rpx;">
|
|
|
+ <view style="height: 120upx;"></view>
|
|
|
+ <u-avatar src="/static/avatar.png" size="160"></u-avatar>
|
|
|
+ <view class="margin-top" style="font-size: 30upx;font-family: PingFang SC;font-weight: bold;color: #323035;">恭喜您已为{{boostDetail.nickName}}注入{{+boostDetail.presentList[current].hotValue}}热力值</view>
|
|
|
+ <view class="margin-tb-xs">{{+boostDetail.presentList[current].pointsValue}}已到账,可用于商城兑换消费</view>
|
|
|
+ <view class="text-gray text-sm">购买成功!快去我的订单兑换或捐赠</view>
|
|
|
+ <view class="padding">
|
|
|
+ <u-button class="custom-style" shape="circle" @click="successShow = false">确定</u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <view class="cu-modal" :class="wxShareShow ? 'show' : ''" style="z-index: 9999;">
|
|
|
+ <view class="cu-dialog">
|
|
|
+ <view style="height:150px;">
|
|
|
+ <view style="color: #000000;font-size: 38upx;padding: 40upx;">1. 先点击右上角<text class="text-bold" style="font-size: 38upx;">"···"</text></view>
|
|
|
+ <view style="color: #000000;font-size: 38upx;padding: 40upx;">2. 选择<text class="text-bold" style="font-size: 38upx;">"{{type}}"</text></view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-bar text-green text-lg bg-white">
|
|
|
+ <view class="action margin-0 flex-sub solid-left" @tap="wxShareShow = false">知道了</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -116,11 +139,15 @@
|
|
|
boostDetail: {},
|
|
|
dialogShow: false,
|
|
|
shareShow: false,
|
|
|
+ wxShareShow: false,
|
|
|
count: 1,
|
|
|
currentPresentSum: 0,
|
|
|
activityId: '',
|
|
|
senderId: '',
|
|
|
receiverId: '',
|
|
|
+ type: '',
|
|
|
+ presentId:'',
|
|
|
+ successShow: false,
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
@@ -156,7 +183,30 @@
|
|
|
let path = 'pages/activityList/activity/authorBoost?activityId=' + this.activityId + '&receiverId=' + this.receiverId;
|
|
|
window.location.href = authUrl(path);
|
|
|
} else {
|
|
|
-
|
|
|
+ console.log("发起支付");
|
|
|
+ //支付成功后:
|
|
|
+ // this.$u.api.boost.billRecord({
|
|
|
+ // userId: this.senderId,
|
|
|
+ // openId: uni.getStorageSync("openid"),
|
|
|
+ // activityId: this.activityId,
|
|
|
+ // price: this.count * this.currentPresentSum,
|
|
|
+ // presentId: this.presentId,
|
|
|
+ // presentCount: this.count,
|
|
|
+ // type: 2,
|
|
|
+ // payStatus: '',
|
|
|
+ // }).then(res => {
|
|
|
+ // this.$u.api.boost.doReward({
|
|
|
+ // activityId: this.activityId,
|
|
|
+ // presentId: this.presentId,
|
|
|
+ // senderId: this.senderId,
|
|
|
+ // receiverId: this.receiverId,
|
|
|
+ // type: 3,
|
|
|
+ // count: this.count,
|
|
|
+ // }).then(res => {
|
|
|
+ // this.successShow = true;
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ this.successShow = true;
|
|
|
}
|
|
|
},
|
|
|
//获取助力详情
|
|
|
@@ -166,7 +216,8 @@
|
|
|
this.currentPresentSum = res.presentList[this.current].price;
|
|
|
})
|
|
|
},
|
|
|
- change(index) {
|
|
|
+ change(id,index) {
|
|
|
+ this.presentId = id;
|
|
|
this.currentPresentSum = 0;
|
|
|
this.count = 1;
|
|
|
this.current = index;
|
|
|
@@ -187,6 +238,7 @@
|
|
|
let params = getUrlParams(window.location.search);
|
|
|
if (!this.$u.test.isEmpty(params.code)) {
|
|
|
let res = await this.$u.api.wxInfo.getUserInfo({userCode: params.code});
|
|
|
+ uni.setStorageSync("openid", res.openid);
|
|
|
let datas = {
|
|
|
nickName: res.nickname,
|
|
|
avatar: res.headimgurl,
|
|
|
@@ -203,12 +255,23 @@
|
|
|
if (result) {
|
|
|
this.senderId = result.id;
|
|
|
uni.setStorageSync("userId", result.id);
|
|
|
+ this.getBoostDetail(this.activityId, this.receiverId);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
//邀请
|
|
|
invite() {
|
|
|
this.shareShow = true;
|
|
|
+ },
|
|
|
+ wxShare() {
|
|
|
+ this.shareShow = false;
|
|
|
+ this.wxShareShow = true;
|
|
|
+ this.type = "发送给朋友";
|
|
|
+ },
|
|
|
+ pyqShare() {
|
|
|
+ this.shareShow = false;
|
|
|
+ this.wxShareShow = true;
|
|
|
+ this.type = "分享到朋友圈"
|
|
|
}
|
|
|
}
|
|
|
}
|