小程序开发
parent
0d5d9af6bc
commit
74f7e23178
|
|
@ -1722,7 +1722,7 @@ class UserService
|
|||
public static function AppUserInfoHandle($user_id = null, $where_field = null, $where_value = null, $user = [])
|
||||
{
|
||||
// 获取用户信息
|
||||
$field = 'id,username,nickname,mobile,email,avatar,alipay_openid,weixin_openid,weixin_unionid,weixin_web_openid,baidu_openid,toutiao_openid,qq_openid,qq_unionid,integral,locking_integral';
|
||||
$field = 'id,username,nickname,mobile,email,avatar,alipay_openid,weixin_openid,weixin_unionid,weixin_web_openid,baidu_openid,toutiao_openid,qq_openid,qq_unionid,integral,locking_integral,add_time';
|
||||
if(!empty($user_id))
|
||||
{
|
||||
$user = self::UserInfo('id', $user_id, $field);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -36,7 +36,8 @@
|
|||
"pages/plugins/membershiplevelvip/order-detail/order-detail",
|
||||
"pages/plugins/membershiplevelvip/shouyi-detail/shouyi-detail",
|
||||
"pages/plugins/membershiplevelvip/shouyi/shouyi",
|
||||
"pages/plugins/membershiplevelvip/tongji/tongji"
|
||||
"pages/plugins/membershiplevelvip/tongji/tongji",
|
||||
"pages/plugins/membershiplevelvip/tuiguang/tuiguang"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTitleText": "{{application_title}}",
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ Page({
|
|||
if (res.data.code == 0) {
|
||||
// 进入以后会员中心并发起支付
|
||||
wx.redirectTo({
|
||||
url: '/pages/plugins/membershiplevelvip/user/user',
|
||||
url: '/pages/plugins/membershiplevelvip/order/order?is_pay=1&order_id=' + res.data.data.id,
|
||||
});
|
||||
} else {
|
||||
if (app.is_login_check(res.data, self, 'submit_event')) {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,11 @@ Page({
|
|||
if ((this.data.params.is_pay || 0) == 1 && (this.data.params.order_id || 0) != 0) {
|
||||
for (var i in temp_data_list) {
|
||||
if (this.data.params.order_id == temp_data_list[i]['id']) {
|
||||
this.pay_handle(this.data.params.order_id, i);
|
||||
this.setData({
|
||||
is_show_payment_popup: true,
|
||||
temp_pay_value: temp_data_list[i]['id'],
|
||||
temp_pay_index: i,
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,5 +198,4 @@ Page({
|
|||
this.init();
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -5,14 +5,14 @@
|
|||
<view class="item fl">
|
||||
<view class="name cr-666">已推广用户总数</view>
|
||||
<view class="value single-text">
|
||||
<text class="golden">{{user_total.user_count || 0}}</text>
|
||||
<text class="golden">{{user_total.user_count || '...'}}</text>
|
||||
<text class="cr-888">人</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item fl">
|
||||
<view class="name cr-666">已推广用户总数</view>
|
||||
<view class="value single-text">
|
||||
<text class="green">{{user_total.valid_user_count || 0}}</text>
|
||||
<text class="green">{{user_total.valid_user_count || '...'}}</text>
|
||||
<text class="cr-888">人</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -26,19 +26,19 @@
|
|||
<view class="item fl">
|
||||
<view class="name cr-666">返佣总金额</view>
|
||||
<view class="value single-text">
|
||||
<text class="golden">¥{{user_profit_total_price || 0.00}}</text>
|
||||
<text class="golden">¥{{user_profit_total_price || '...'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item fl">
|
||||
<view class="name cr-666">待结算金额</view>
|
||||
<view class="value single-text">
|
||||
<text class="yellow">¥{{user_profit_stay_price || 0.00}}</text>
|
||||
<text class="yellow">¥{{user_profit_stay_price || '...'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item fl">
|
||||
<view class="name cr-666">已结算金额</view>
|
||||
<view class="value single-text">
|
||||
<text class="green">¥{{user_profit_already_price || 0.00}}</text>
|
||||
<text class="green">¥{{user_profit_already_price || '...'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -59,4 +59,4 @@
|
|||
</view>
|
||||
|
||||
<import src="/pages/common/bottom_line.wxml" />
|
||||
<template is="bottom_line" data="{{status: true}}"></template>
|
||||
<template is="bottom_line" data="{{status: true}}"></template>
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
const app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '加载中...',
|
||||
data_bottom_line_status: false,
|
||||
user_share_qrode: null,
|
||||
user_share_url: null,
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
init() {
|
||||
var self = this;
|
||||
wx.showLoading({ title: "加载中..." });
|
||||
this.setData({
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
||||
wx.request({
|
||||
url: app.get_request_url("index", "poster", "membershiplevelvip"),
|
||||
method: "POST",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: res => {
|
||||
wx.hideLoading();
|
||||
wx.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
self.setData({
|
||||
user_share_qrode: data.user_share_qrode || null,
|
||||
user_share_url: data.user_share_url || null,
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: '',
|
||||
});
|
||||
|
||||
// 是否全部没数据
|
||||
if (self.data.user_share_qrode == null && self.data.user_share_url == null)
|
||||
{
|
||||
self.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
self.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.is_login_check(res.data, self, 'init')) {
|
||||
app.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
wx.stopPullDownRefresh();
|
||||
self.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: '服务器请求出错',
|
||||
});
|
||||
|
||||
app.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
// 二维码事件
|
||||
qrcode_event(e) {
|
||||
if ((this.data.user_share_qrode || null) != null) {
|
||||
wx.previewImage({
|
||||
current: this.data.user_share_qrode,
|
||||
urls: [this.data.user_share_qrode]
|
||||
});
|
||||
} else {
|
||||
app.showToast('二维码地址有误');
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
if ((this.data.user_share_url || null) != null) {
|
||||
wx.setClipboardData({
|
||||
data: this.data.user_share_url,
|
||||
success(res) {
|
||||
app.showToast('复制成功', 'success');
|
||||
}
|
||||
})
|
||||
} else {
|
||||
app.showToast('链接地址有误');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarBackgroundColor": "#1d1611",
|
||||
"navigationBarTitleText": "推广返利"
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<view wx:if="{{user_share_qrode != null || user_share_url != null}}">
|
||||
<view wx:if="{{user_share_qrode != null}}" class="share qrcode bg-white spacing-mb">
|
||||
<view class="title">二维码分享</view>
|
||||
<view class="desc cr-888 br-b">
|
||||
保存二维码后,发送给微信好友/群、QQ好友/群,分享到分朋友圈,微博等进行推广,轻轻松松赚返利!
|
||||
</view>
|
||||
<view class="content">
|
||||
<image src="{{user_share_qrode}}" class="wh-auto dis-block" mode="widthFix" />
|
||||
</view>
|
||||
<view class="submit">
|
||||
<button type="primary" plain="{{true}}" hover-class="none" bindtap="qrcode_event">查看二维码长按保存</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{user_share_url != null}}" class="share url bg-white">
|
||||
<view class="title">链接分享</view>
|
||||
<view class="desc cr-888 br-b">
|
||||
复制以下链接,发送给微信好友/群、QQ好友/群,分享到分朋友圈,微博等进行推广,轻轻松松赚返利!
|
||||
</view>
|
||||
<view class="content">{{user_share_url}}</view>
|
||||
<view class="submit">
|
||||
<button type="primary" plain="{{true}}" hover-class="none" bindtap="url_event">点击复制链接地址</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<import src="/pages/common/bottom_line.wxml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{user_share_qrode == null && user_share_url == null}}">
|
||||
<import src="/pages/common/nodata.wxml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* 公共
|
||||
*/
|
||||
.share {
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
.share .title {
|
||||
border-left: 3px solid #1d1611;
|
||||
margin-left: 10rpx;
|
||||
padding-left: 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.share .desc {
|
||||
font-size: 32rpx;
|
||||
padding: 0 10rpx 20rpx 10rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.share .content {
|
||||
padding: 20rpx;
|
||||
}
|
||||
.share .submit {
|
||||
margin: 20rpx 0;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
/*
|
||||
* 链接
|
||||
*/
|
||||
.url .content {
|
||||
font-size: 32rpx;
|
||||
color: #1d1611;
|
||||
}
|
||||
Loading…
Reference in New Issue