mirror of
https://gitee.com/zongzhige/shopxo-uniapp.git
synced 2026-06-05 18:25:48 +08:00
新增超级会员开通提示
This commit is contained in:
@ -233,18 +233,19 @@
|
||||
}
|
||||
},
|
||||
"__usePrivacyCheck__" : true,
|
||||
"plugins" : {}
|
||||
"plugins" : {
|
||||
// 腾讯地图路线规划插件(需要到小程序后台设置->第三方设置->插件管理里面添加【腾讯位置服务路线规划】插件,教程 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a)
|
||||
// "routePlan" : {
|
||||
// "version" : "1.0.19",
|
||||
// "provider" : "wx50b5593e81dd937a"
|
||||
// },
|
||||
// 直播(需要到小程序后台设置->第三方设置->插件管理里面添加【小程序直播组件】插件,教程 https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370)
|
||||
// "live-player-plugin" : {
|
||||
// "version" : "1.3.5",
|
||||
// "provider" : "wx2b03c6e691cd7370"
|
||||
// }
|
||||
}
|
||||
},
|
||||
// 腾讯地图路线规划插件(需要到小程序后台设置->第三方设置->插件管理里面添加【腾讯位置服务路线规划】插件,教程 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a)
|
||||
// "routePlan" : {
|
||||
// "version" : "1.0.19",
|
||||
// "provider" : "wx50b5593e81dd937a"
|
||||
// },
|
||||
// 直播(需要到小程序后台设置->第三方设置->插件管理里面添加【小程序直播组件】插件,教程 https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370)
|
||||
// "live-player-plugin" : {
|
||||
// "version" : "1.3.5",
|
||||
// "provider" : "wx2b03c6e691cd7370"
|
||||
// }
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true,
|
||||
"appid" : "2021001173639600"
|
||||
|
||||
@ -510,4 +510,31 @@
|
||||
.plugins-fullgive-popup .goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 超级会员 - 开通提示
|
||||
*/
|
||||
.plugins-vip-goods-detail-open-tips-inner {
|
||||
padding: 24rpx 28rpx;
|
||||
background: #3c332e;
|
||||
border: 1rpx solid rgba(243, 217, 177, 0.35);
|
||||
color: #f3d9b1;
|
||||
}
|
||||
.plugins-vip-goods-detail-open-tips .tips-icon {
|
||||
flex-shrink: 0;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.plugins-vip-goods-detail-open-tips .tips-text {
|
||||
font-size: 26rpx;
|
||||
color: #f3d9b1;
|
||||
min-width: 0;
|
||||
}
|
||||
.plugins-vip-goods-detail-open-tips .tips-btn {
|
||||
flex-shrink: 0;
|
||||
padding: 10rpx 28rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.4;
|
||||
color: #3c332e;
|
||||
background: #ffcc8e;
|
||||
}
|
||||
@ -223,6 +223,17 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 超级会员-开通提示 -->
|
||||
<view v-if="(plugins_vip_goods_detail_open_tips_data || null) != null" class="plugins-vip-goods-detail-open-tips padding-horizontal-main padding-top-main">
|
||||
<view class="plugins-vip-goods-detail-open-tips-inner border-radius-main flex-row jc-sb align-c">
|
||||
<view class="tips-content flex-row align-c flex-1 flex-width margin-right-sm">
|
||||
<iconfont name="icon-admin-store-vip" color="#f3d9b1" size="32rpx" propClass="tips-icon"></iconfont>
|
||||
<text class="tips-text single-text flex-1 flex-width">{{ plugins_vip_goods_detail_open_tips_data.tips_text }}</text>
|
||||
</view>
|
||||
<text class="tips-btn round cp" :data-value="(plugins_vip_goods_detail_open_tips_data.is_login || 0) == 1 ? plugins_vip_goods_detail_open_tips_data.buy_url : plugins_vip_goods_detail_open_tips_data.login_url" @tap.stop="url_event">{{ plugins_vip_goods_detail_open_tips_data.btn_text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="padding-horizontal-main">
|
||||
@ -968,6 +979,8 @@
|
||||
plugins_categorylimit_data: null,
|
||||
// 订单商品表单插件
|
||||
plugins_ordergoodsform_data: null,
|
||||
// 超级会员开通提示
|
||||
plugins_vip_goods_detail_open_tips_data: null,
|
||||
};
|
||||
},
|
||||
|
||||
@ -1176,6 +1189,7 @@
|
||||
plugins_ask_data: data.plugins_ask_data || null,
|
||||
plugins_categorylimit_data: data.plugins_categorylimit_data || null,
|
||||
plugins_ordergoodsform_data: data.plugins_ordergoodsform_data || null,
|
||||
plugins_vip_goods_detail_open_tips_data: data.plugins_vip_goods_detail_open_tips_data || null,
|
||||
};
|
||||
this.setData(upd_data);
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<!-- 付费购买 -->
|
||||
<block v-if="(user_vip.user_vip_model || null) == 'pay'">
|
||||
<view v-if="(user_vip || null) != null" class="single-text vip-badge round bg-black pr text-size-xss">
|
||||
<image v-if="(user_vip.icon || null) != null" class="level-icon pa" :src="user_vip.icon" mode="widthFix"></image>
|
||||
<image v-if="(user_vip.icon || null) != null" class="level-icon pa radius" :src="user_vip.icon" mode="widthFix"></image>
|
||||
<text v-if="(user_vip.name || null) != null">{{ user_vip.level_name }}</text>
|
||||
<!-- 判断会员永久 -->
|
||||
<block v-if="(user_vip.is_permanent || 0) == 1">
|
||||
@ -36,7 +36,7 @@
|
||||
</block>
|
||||
<block v-else>
|
||||
<view v-if="(user_vip || null) != null" class="single-text vip-badge round bg-black pr text-size-xss">
|
||||
<image v-if="(user_vip.icon || null) != null" class="level-icon pa" :src="user_vip.icon" mode="widthFix"></image>
|
||||
<image v-if="(user_vip.icon || null) != null" class="level-icon pa border-radius-sm" :src="user_vip.icon" mode="widthFix"></image>
|
||||
<text v-if="(user_vip.name || null) != null">{{ user_vip.level_name }}</text>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
background-size: 100% auto;
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
}
|
||||
.top-content .content .user-top {
|
||||
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || MP-ALIPAY || H5 || APP */
|
||||
padding-top: var(--status-bar-height);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.top-content .content .user-top {
|
||||
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || MP-ALIPAY || H5 || APP */
|
||||
padding-top: var(--status-bar-height);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部
|
||||
*/
|
||||
@ -30,11 +30,11 @@
|
||||
.head-avatar {
|
||||
width: 116rpx;
|
||||
height: 116rpx !important;
|
||||
}
|
||||
.head-base .base-info {
|
||||
max-width: 340rpx;
|
||||
}
|
||||
|
||||
.head-base .base-info {
|
||||
max-width: 340rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部右上角
|
||||
*/
|
||||
@ -45,7 +45,7 @@
|
||||
top: -10px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 会员码
|
||||
*/
|
||||
@ -70,19 +70,19 @@
|
||||
top: calc(50% - 10rpx);
|
||||
right: 48rpx;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 底部内容
|
||||
*/
|
||||
.user-bottom {
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
}
|
||||
|
||||
.user-bottom.box-shadow {
|
||||
box-shadow: 0px -8px 8px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
|
||||
.user-bottom.box-shadow {
|
||||
box-shadow: 0px -8px 8px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行内导航列表
|
||||
*/
|
||||
@ -131,7 +131,7 @@
|
||||
left: calc(50% + 35rpx);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 聚合导航
|
||||
*/
|
||||
@ -153,4 +153,45 @@
|
||||
height: 50rpx !important;
|
||||
top: 18rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 超级会员 - 我的页开通提示
|
||||
*/
|
||||
.plugins-vip-user-center-open-tips {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.plugins-vip-user-center-open-tips-inner {
|
||||
padding: 24rpx 28rpx;
|
||||
background: #3c332e;
|
||||
border: 1rpx solid rgba(243, 217, 177, 0.35);
|
||||
color: #f3d9b1;
|
||||
}
|
||||
.plugins-vip-user-center-open-tips .tips-icon {
|
||||
flex-shrink: 0;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.plugins-vip-user-center-open-tips .vip-level-icon {
|
||||
width: 52rpx;
|
||||
height: 52rpx !important;
|
||||
flex-shrink: 0;
|
||||
margin-right: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.plugins-vip-user-center-open-tips .tips-text {
|
||||
font-size: 26rpx;
|
||||
color: #f3d9b1;
|
||||
min-width: 0;
|
||||
}
|
||||
.plugins-vip-user-center-open-tips .tips-expire {
|
||||
margin-top: 4rpx;
|
||||
color: rgba(243, 217, 177, 0.75);
|
||||
}
|
||||
.plugins-vip-user-center-open-tips .tips-btn {
|
||||
flex-shrink: 0;
|
||||
padding: 10rpx 28rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.4;
|
||||
color: #3c332e;
|
||||
background: #ffcc8e;
|
||||
}
|
||||
@ -43,6 +43,42 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 超级会员-开通提示 -->
|
||||
<view v-if="(plugins_vip_user_center_open_tips_data || null) != null" class="plugins-vip-user-center-open-tips padding-horizontal-main">
|
||||
<view class="plugins-vip-user-center-open-tips-inner border-radius-main flex-row jc-sb align-c">
|
||||
<!-- 未开通/未登录 -->
|
||||
<block v-if="(plugins_vip_user_center_open_tips_data.show_type || 'open') == 'open'">
|
||||
<view class="tips-content flex-row align-c flex-1 flex-width margin-right-sm">
|
||||
<iconfont name="icon-admin-store-vip" color="#f3d9b1" size="32rpx" propClass="tips-icon"></iconfont>
|
||||
<text class="tips-text single-text flex-1 flex-width">{{ plugins_vip_user_center_open_tips_data.tips_text }}</text>
|
||||
</view>
|
||||
<text class="tips-btn round cp" :data-value="(plugins_vip_user_center_open_tips_data.is_login || 0) == 1 ? plugins_vip_user_center_open_tips_data.buy_url : plugins_vip_user_center_open_tips_data.login_url" @tap.stop="url_event">{{ plugins_vip_user_center_open_tips_data.btn_text }}</text>
|
||||
</block>
|
||||
<!-- 已开通会员 -->
|
||||
<block v-else>
|
||||
<view class="tips-content flex-row align-c flex-1 flex-width margin-right-sm">
|
||||
<image v-if="(plugins_vip_user_center_open_tips_data.user_vip.icon || null) != null" class="vip-level-icon radius" :src="plugins_vip_user_center_open_tips_data.user_vip.icon" mode="widthFix"></image>
|
||||
<iconfont v-else name="icon-admin-store-vip" color="#f3d9b1" size="32rpx" propClass="tips-icon"></iconfont>
|
||||
<view class="flex-1 flex-width oh">
|
||||
<view class="tips-text single-text">{{ plugins_vip_user_center_open_tips_data.user_vip.level_name }}</view>
|
||||
<view v-if="(plugins_vip_user_center_open_tips_data.user_vip.user_vip_model || null) == 'pay'" class="tips-expire text-size-xss cr-grey-9 single-text">
|
||||
<block v-if="(plugins_vip_user_center_open_tips_data.user_vip.is_permanent || 0) == 1">
|
||||
<text>{{ plugins_vip_user_center_open_tips_data.user_vip.permanent_value }}{{ plugins_vip_user_center_open_tips_data.user_vip.permanent_unit }}</text>
|
||||
</block>
|
||||
<block v-else-if="(plugins_vip_user_center_open_tips_data.user_vip.surplus_time_number || 0) > 0">
|
||||
<text>{{ plugins_vip_user_center_open_tips_data.user_vip.surplus_time_number }}{{ plugins_vip_user_center_open_tips_data.user_vip.surplus_time_unit }}</text>
|
||||
<text v-if="(plugins_vip_user_center_open_tips_data.user_vip.expire_time || null) != null" class="margin-left-xs">| {{ plugins_vip_user_center_open_tips_data.user_vip.expire_time }}</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text>{{$t('user.user.528t26')}}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text v-if="(plugins_vip_user_center_open_tips_data.vip_btn || null) != null && (plugins_vip_user_center_open_tips_data.vip_btn.show || 0) == 1" class="tips-btn round cp" :data-value="plugins_vip_user_center_open_tips_data.vip_btn.url" @tap.stop="vip_tips_btn_event">{{ plugins_vip_user_center_open_tips_data.vip_btn.btn_text }}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 会员码 付款码 -->
|
||||
<view v-if="(payment_page_url || null) !== null || (vip_page_url || null) !== null" class="qrcode padding-horizontal-main pr oh">
|
||||
<view class="qrcode-content flex-row align-c text-size-md" :style="'background-image: url(' + static_url + 'qrcode-bg.png)'" :class="(payment_page_url || null) == null || (vip_page_url || null) == null ? 'jc-sb' : 'jc-sa divider-r'">
|
||||
@ -202,6 +238,10 @@
|
||||
vip_page_url: null,
|
||||
// 付款码地址
|
||||
payment_page_url: null,
|
||||
// 超级会员开通提示
|
||||
plugins_vip_user_center_open_tips_data: null,
|
||||
// 会员续费按钮状态
|
||||
vip_submit_disabled_status: false,
|
||||
// 用户中心菜单展示模式
|
||||
nav_show_model_type: app.globalData.data.user_center_nav_show_model_type,
|
||||
};
|
||||
@ -448,6 +488,7 @@
|
||||
head_nav_list: temp_head_nav_list,
|
||||
navigation: temp_navigation,
|
||||
main_navigation_data: main_navigation_data,
|
||||
plugins_vip_user_center_open_tips_data: data.plugins_vip_user_center_open_tips_data || null,
|
||||
};
|
||||
|
||||
// 用户基础信息处理
|
||||
@ -534,6 +575,67 @@
|
||||
}
|
||||
},
|
||||
|
||||
// 已开通会员提示按钮(开通/续费/连续开通,逻辑与会员中心页一致)
|
||||
vip_tips_btn_event(e) {
|
||||
var btn = (this.plugins_vip_user_center_open_tips_data || null) != null ? this.plugins_vip_user_center_open_tips_data.vip_btn : null;
|
||||
if ((btn || null) == null || (btn.show || 0) != 1) {
|
||||
return;
|
||||
}
|
||||
if ((btn.action || '') == 'renew') {
|
||||
this.uservip_renew_event(e);
|
||||
return;
|
||||
}
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 连续开通会员(超级会员提示)
|
||||
uservip_renew_event(e) {
|
||||
var self = this;
|
||||
uni.showModal({
|
||||
title: this.$t('common.warm_tips'),
|
||||
content: this.$t('user.user.95s1ez'),
|
||||
confirmText: this.$t('common.confirm'),
|
||||
cancelText: this.$t('common.not_yet'),
|
||||
success: (result) => {
|
||||
if (result.confirm) {
|
||||
self.setData({
|
||||
vip_submit_disabled_status: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('renew', 'buy', 'vip'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
self.setData({
|
||||
vip_submit_disabled_status: false,
|
||||
});
|
||||
if (res.data.code == 0) {
|
||||
uni.setStorageSync(app.globalData.data.cache_page_pay_key, res.data.data.id);
|
||||
app.globalData.url_open('/pages/plugins/vip/order/order', true);
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, self, 'uservip_renew_event')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
self.setData({
|
||||
vip_submit_disabled_status: false,
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 是否登录
|
||||
is_login() {
|
||||
if((this.user || null) == null) {
|
||||
|
||||
Reference in New Issue
Block a user