提交 d5dd5bea 编写于 作者: D devil

头条小程序开发

上级 8c1f591c
......@@ -325,11 +325,11 @@ class User extends Common
*/
public function ToutiaoUserAuth()
{
$this->data_post['config'] = [
$config = [
'appid' => MyC('common_app_mini_toutiao_appid'),
'secret' => MyC('common_app_mini_toutiao_appsecret'),
];
$result = (new \base\Toutiao())->GetAuthSessionKey($this->data_post);
$result = (new \base\Toutiao($config))->GetAuthSessionKey($this->data_post);
if($result['status'] == 0)
{
// 先从数据库获取用户信息
......
......@@ -58,7 +58,7 @@ class Baidu
{
// 登录授权session
$login_key = 'baidu_user_login_'.$openid;
$session_data = GS($login_key);
$session_data = cache($login_key);
if($session_data === false)
{
return ['status'=>-1, 'msg'=>'session key不存在'];
......@@ -114,7 +114,7 @@ class Baidu
// 缓存存储
$data_key = 'baidu_user_info_'.$openid;
SS($data_key, $data);
cache($data_key, $data);
return ['status'=>0, 'data'=>$data];
}
......@@ -147,7 +147,7 @@ class Baidu
$key = 'baidu_user_login_'.$result['openid'];
// 缓存存储
SS($key, $result);
cache($key, $result);
return ['status'=>0, 'msg'=>'授权成功', 'data'=>$result['openid']];
}
return ['status'=>-1, 'msg'=>$result['error_description']];
......
......@@ -56,7 +56,7 @@ class QQ
{
// 登录授权session
$login_key = 'qq_user_login_'.$openid;
$session_data = GS($login_key);
$session_data = cache($login_key);
if($session_data === false)
{
return 'session key不存在';
......@@ -88,7 +88,7 @@ class QQ
// 缓存存储
$data_key = 'qq_user_info_'.$openid;
SS($data_key, $data);
cache($data_key, $data);
return $data;
}
......@@ -113,7 +113,7 @@ class QQ
$key = 'qq_user_login_'.$result['openid'];
// 缓存存储
SS($key, $result);
cache($key, $result);
return $result['openid'];
}
return false;
......
......@@ -17,10 +17,21 @@ namespace base;
*/
class Toutiao
{
// 配置信息
private $config;
/**
* [__construct 构造方法]
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-10-27
* @param [array] $config [应用配置信息]
*/
public function __construct(){}
public function __construct($config = [])
{
$this->config = $config;
}
/**
* 用户授权
......@@ -37,13 +48,13 @@ class Toutiao
{
return ['status'=>-1, 'msg'=>'授权码有误'];
}
if(empty($params['config']))
if(empty($this->config['appid']) || empty($this->config['secret']))
{
return ['status'=>-1, 'msg'=>'配置有误'];
}
// 获取授权
$url = 'https://developer.toutiao.com/api/apps/jscode2session?appid='.$params['config']['appid'].'&secret='.$params['config']['secret'].'&code='.$params['authcode'];
$url = 'https://developer.toutiao.com/api/apps/jscode2session?appid='.$this->config['appid'].'&secret='.$this->config['secret'].'&code='.$params['authcode'];
$result = json_decode(file_get_contents($url), true);
if(empty($result['openid']))
{
......@@ -76,5 +87,168 @@ class Toutiao
$sign = substr($sign, 0, -1);
return md5($sign.$secret);
}
/**
* [MiniQrCodeCreate 二维码创建]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-01-02T19:53:10+0800
* @param [string] $params['page'] [页面地址]
* @param [string] $params['scene'] [参数]
* @return [string] [成功返回文件流, 失败则空]
*/
public function MiniQrCodeCreate($params)
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'page',
'error_msg' => 'page地址不能为空',
],
[
'checked_type' => 'length',
'checked_data' => '1,32',
'key_name' => 'scene',
'error_msg' => 'scene参数 1~32 个字符之间',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 获取access_token
$access_token = $this->GetMiniAccessToken();
if($access_token === false)
{
return DataReturn('access_token获取失败', -1);
}
// 获取二维码
$url = 'https://developer.toutiao.com/api/apps/qrcode?access_token='.$access_token;
$path = $params['page'].'?'.$params['scene'];
$data = [
'access_token' => $access_token,
'appname' => 'toutiao',
'path' => urlencode($path),
'width' => empty($params['width']) ? 1000 : intval($params['width']),
];
$res = $this->HttpRequestPost($url, $data, true);
if(!empty($res))
{
if(stripos($res, 'errcode') === false)
{
return DataReturn('获取成功', 0, $res);
}
$res = json_decode($res, true);
$msg = isset($res['errmsg']) ? $res['errmsg'] : '获取二维码失败';
} else {
$msg = '获取二维码失败';
}
return DataReturn($msg, -1);
}
/**
* [GetMiniAccessToken 获取access_token]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-01-02T19:53:42+0800
*/
private function GetMiniAccessToken()
{
// 缓存key
$key = $this->config['appid'].'_access_token';
$result = cache($key);
if($result !== false)
{
if($result['expires_in'] > time())
{
return $result['access_token'];
}
}
// 网络请求
$url = 'https://developer.toutiao.com/api/apps/token?grant_type=client_credential&appid='.$this->config['appid'].'&secret='.$this->config['secret'];
$result = $this->HttpRequestGet($url);
if(!empty($result['access_token']))
{
// 缓存存储
$result['expires_in'] += time();
cache($key, $result);
return $result['access_token'];
}
return false;
}
/**
* get请求
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-01-03T19:21:38+0800
* @param [string] $url [url地址]
* @return [array] [返回数据]
*/
private function HttpRequestGet($url)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);
return json_decode($res, true);
}
/**
* curl模拟post
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T21:58:54+0800
* @param [string] $url [请求地址]
* @param [array] $post [发送的post数据]
* @param [boolean] $is_json [是否使用 json 数据发送]
* @return [mixed] [请求返回的数据]
*/
private function HttpRequestPost($url, $post, $is_json = false)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_URL, $url);
// 是否 json
if($is_json)
{
$data_string = json_encode($post);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json; charset=utf-8",
"Content-Length: " . strlen($data_string)
)
);
} else {
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/x-www-form-urlencoded",
"cache-control: no-cache"
)
);
}
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
}
?>
\ No newline at end of file
......@@ -56,7 +56,7 @@ class Wechat
{
// 登录授权session
$login_key = 'wechat_user_login_'.$openid;
$session_data = GS($login_key);
$session_data = cache($login_key);
if($session_data === false)
{
return 'session key不存在';
......@@ -87,7 +87,7 @@ class Wechat
// 缓存存储
$data_key = 'wechat_user_info_'.$openid;
SS($data_key, $data);
cache($data_key, $data);
return $data;
}
......@@ -112,7 +112,7 @@ class Wechat
$key = 'wechat_user_login_'.$result['openid'];
// 缓存存储
SS($key, $result);
cache($key, $result);
return $result['openid'];
}
return false;
......@@ -190,7 +190,7 @@ class Wechat
{
// 缓存key
$key = $this->_appid.'_access_token';
$result = GS($key);
$result = cache($key);
if($result !== false)
{
if($result['expires_in'] > time())
......@@ -206,7 +206,7 @@ class Wechat
{
// 缓存存储
$result['expires_in'] += time();
SS($key, $result);
cache($key, $result);
return $result['access_token'];
}
return false;
......
......@@ -29,10 +29,10 @@ App({
// tabbar页面
tabbar_pages: [
"index",
"goods-category",
"cart",
"user",
"/pages/index/index",
"/pages/goods-category/goods-category",
"/pages/cart/cart",
"/pages/user/user",
],
// 页面标题
......@@ -67,7 +67,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
// request_url: 'http://tp5-dev.com/',
request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
// 基础信息
......@@ -463,12 +463,12 @@ App({
is_tabbar_pages(url) {
if (url.indexOf("?") == -1)
{
var all = url.split("/");
var value = url;
} else {
var temp_str = url.split("?");
var all = temp_str[0].split("/");
var value = temp_str[0];
}
if (all.length <= 0)
if ((value || null) == null)
{
return false;
}
......@@ -476,7 +476,7 @@ App({
var temp_tabbar_pages = this.data.tabbar_pages;
for (var i in temp_tabbar_pages)
{
if (temp_tabbar_pages[i] == all[all.length-1])
if (temp_tabbar_pages[i] == value)
{
return true;
}
......
{
"pages": [
"pages": ["pages/plugins/distribution/user/user",
"pages/index/index",
"pages/goods-category/goods-category",
"pages/cart/cart",
......@@ -26,9 +26,44 @@
"pages/user-goods-browse/user-goods-browse",
"pages/user-orderaftersale/user-orderaftersale",
"pages/user-orderaftersale-detail/user-orderaftersale-detail",
"pages/coupon/coupon",
"pages/user-coupon/user-coupon",
"pages/extraction-address/extraction-address"
"pages/extraction-address/extraction-address",
"pages/plugins/coupon/index/index",
"pages/plugins/coupon/user/user",
"pages/plugins/membershiplevelvip/index/index",
"pages/plugins/membershiplevelvip/buy/buy",
"pages/plugins/membershiplevelvip/user/user",
"pages/plugins/membershiplevelvip/order/order",
"pages/plugins/membershiplevelvip/order-detail/order-detail",
"pages/plugins/membershiplevelvip/profit/profit",
"pages/plugins/membershiplevelvip/profit-detail/profit-detail",
"pages/plugins/membershiplevelvip/statistics/statistics",
"pages/plugins/membershiplevelvip/poster/poster",
"pages/plugins/membershiplevelvip/team/team",
"pages/plugins/distribution/order/order",
"pages/plugins/distribution/order-detail/order-detail",
"pages/plugins/distribution/profit/profit",
"pages/plugins/distribution/profit-detail/profit-detail",
"pages/plugins/distribution/statistics/statistics",
"pages/plugins/distribution/poster/poster",
"pages/plugins/distribution/team/team",
"pages/plugins/distribution/extraction/extraction",
"pages/plugins/distribution/extraction-apply/extraction-apply",
"pages/plugins/distribution/extraction-order/extraction-order",
"pages/plugins/distribution/introduce/introduce",
"pages/plugins/wallet/user/user",
"pages/plugins/wallet/recharge/recharge",
"pages/plugins/wallet/cash-auth/cash-auth",
"pages/plugins/wallet/cash-create/cash-create",
"pages/plugins/wallet/wallet-log/wallet-log",
"pages/plugins/wallet/wallet-log-detail/wallet-log-detail",
"pages/plugins/wallet/user-recharge/user-recharge",
"pages/plugins/wallet/user-recharge-detail/user-recharge-detail",
"pages/plugins/wallet/user-cash/user-cash",
"pages/plugins/wallet/user-cash-detail/user-cash-detail"
],
"window": {
"navigationBarTitleText": "{{application_title}}",
......
......@@ -6,10 +6,9 @@ Page({
data_list_loding_msg: '',
data_list: [],
data_base: null,
// 优惠劵领取
temp_coupon_receive_index: null,
temp_coupon_receive_value: null,
temp_coupon_receive_value: null
},
onLoad(params) {
......@@ -17,7 +16,9 @@ Page({
},
onShow() {
tt.setNavigationBarTitle({ title: app.data.common_pages_title.coupon });
tt.setNavigationBarTitle({
title: app.data.common_pages_title.coupon
});
},
init() {
......@@ -28,9 +29,11 @@ Page({
// 获取数据
get_data_list() {
var self = this;
tt.showLoading({ title: "加载中..." });
if (self.data.data_list.length <= 0)
{
tt.showLoading({
title: "加载中..."
});
if (self.data.data_list.length <= 0) {
self.setData({
data_list_loding_status: 1
});
......@@ -44,27 +47,28 @@ Page({
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
var status = ((data.data || []).length > 0);
var status = (data.data || []).length > 0;
this.setData({
data_base: data.base || null,
data_list: data.data || [],
data_list_loding_msg: '',
data_list_loding_status: status ? 3 : 0,
data_bottom_line_status: status,
});
data_bottom_line_status: status
}); // 导航名称
// 导航名称
if ((data.base || null) != null && (data.base.application_name || null) != null)
{
tt.setNavigationBarTitle({ title: data.base.application_name });
if ((data.base || null) != null && (data.base.application_name || null) != null) {
tt.setNavigationBarTitle({
title: data.base.application_name
});
}
} else {
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg,
data_list_loding_msg: res.data.msg
});
app.showToast(res.data.msg);
}
......@@ -75,7 +79,7 @@ Page({
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: '服务器请求出错',
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
......@@ -85,18 +89,21 @@ Page({
// 优惠劵领取事件
coupon_receive_event(e) {
// 参数处理
if((e || null) == null)
{
if ((e || null) == null) {
var index = this.data.temp_coupon_receive_index;
var value = this.data.temp_coupon_receive_value;
} else {
var index = e.currentTarget.dataset.index;
var value = e.currentTarget.dataset.value;
this.setData({temp_coupon_receive_index: index, temp_coupon_receive_value: value});
}
this.setData({
temp_coupon_receive_index: index,
temp_coupon_receive_value: value
});
} // 登录校验
// 登录校验
var user = app.get_user_info(this, 'coupon_receive_event');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
......@@ -107,23 +114,33 @@ Page({
} else {
var self = this;
var temp_list = this.data.data_list;
if (temp_list[index]['is_operable'] != 0) {
tt.showLoading({ title: "处理中..." });
tt.showLoading({
title: "处理中..."
});
tt.request({
url: app.get_request_url("receive", "coupon", "coupon"),
method: "POST",
data: { "coupon_id": value },
data: {
"coupon_id": value
},
dataType: "json",
header: { 'content-type': 'application/x-www-form-urlencoded' },
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
tt.hideLoading();
if (res.data.code == 0) {
app.showToast(res.data.msg, "success");
if (self.data.data_base != null && self.data.data_base.is_repeat_receive != 1)
{
if (self.data.data_base != null && self.data.data_base.is_repeat_receive != 1) {
temp_list[index]['is_operable'] = 0;
temp_list[index]['is_operable_name'] = '已领取';
self.setData({ data_list: temp_list });
self.setData({
data_list: temp_list
});
}
} else {
if (app.is_login_check(res.data, self, 'coupon_receive_event')) {
......@@ -144,6 +161,6 @@ Page({
// 下拉刷新
onPullDownRefresh() {
this.get_data_list();
},
}
});
});
\ No newline at end of file
......@@ -5,13 +5,17 @@ Page({
data_list_loding_status: 1,
data_list_loding_msg: '',
data_list: null,
nav_tabs_list: [
{ name: "未使用", value: "not_use" },
{ name: "已使用", value: "already_use" },
{ name: "已过期", value: "already_expire" },
],
nav_tabs_value: 'not_use',
nav_tabs_list: [{
name: "未使用",
value: "not_use"
}, {
name: "已使用",
value: "already_use"
}, {
name: "已过期",
value: "already_expire"
}],
nav_tabs_value: 'not_use'
},
onLoad(params) {
......@@ -19,11 +23,14 @@ Page({
},
onShow() {
tt.setNavigationBarTitle({ title: app.data.common_pages_title.user_coupon });
tt.setNavigationBarTitle({
title: app.data.common_pages_title.user_coupon
});
},
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
......@@ -38,7 +45,7 @@ Page({
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false,
data_bottom_line_status: false
});
}
},
......@@ -46,7 +53,10 @@ Page({
// 获取数据
get_data_list() {
var self = this;
tt.showLoading({ title: "加载中..." });
tt.showLoading({
title: "加载中..."
});
if (this.data.data_list == null || (this.data.data_list[this.data.nav_tabs_value] || null) == null || this.data.data_list[this.data.nav_tabs_value].length <= 0) {
this.setData({
data_list_loding_status: 1
......@@ -61,18 +71,20 @@ Page({
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
self.setData({
data_list: res.data.data || null,
data_list_loding_msg: '',
data_list_loding_msg: ''
});
self.data_view_handle();
} else {
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg,
data_list_loding_msg: res.data.msg
});
if (app.is_login_check(res.data, self, 'get_data_list')) {
app.showToast(res.data.msg);
}
......@@ -84,7 +96,7 @@ Page({
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: '服务器请求出错',
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
......@@ -94,24 +106,28 @@ Page({
// 数据处理
data_view_handle() {
var status = 0;
if (this.data.data_list != null && (this.data.data_list[this.data.nav_tabs_value] || null) != null && this.data.data_list[this.data.nav_tabs_value].length > 0) {
status = 3;
}
this.setData({
data_list_loding_status: status,
data_bottom_line_status: (status == 3),
data_bottom_line_status: status == 3
});
},
// 导航事件
nav_tabs_event(e) {
this.setData({ nav_tabs_value: e.currentTarget.dataset.value});
this.setData({
nav_tabs_value: e.currentTarget.dataset.value
});
this.data_view_handle();
},
// 下拉刷新
onPullDownRefresh() {
this.get_data_list();
},
}
});
});
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
extraction_data: null,
province_list: [],
city_list: [],
county_list: [],
province_id: null,
city_id: null,
county_id: null,
default_province: "请选择省",
default_city: "请选择市",
default_county: "请选择区/县",
province_value: null,
city_value: null,
county_value: null,
user_location_cache_key: 'cache_userlocation_key',
user_location: null,
form_submit_disabled_status: false
},
onLoad(params) {
this.setData({
params: params
});
},
onReady: function () {
// 清除位置缓存信息
tt.removeStorage({
key: this.data.user_location_cache_key
});
this.init();
},
onShow() {
this.user_location_init();
},
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.redirectTo({
url: "/pages/login/login?event_callback=init"
});
this.setData({
data_list_loding_status: 2,
data_list_loding_msg: '请先绑定手机号码'
});
return false;
} else {
this.get_province_list();
this.applyinfo_init();
}
} else {
this.setData({
data_list_loding_status: 2,
data_list_loding_msg: '请先授权用户信息'
});
}
},
// 自提点信息
applyinfo_init() {
var self = this;
tt.request({
url: app.get_request_url("applyinfo", "extraction", "distribution"),
method: "POST",
data: {},
dataType: "json",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
if (res.data.code == 0) {
var data = res.data.data || null;
self.setData({
extraction_data: data
}); // 数据设置
if (data != null) {
self.setData({
province_id: data.province || null,
city_id: data.city || null,
county_id: data.county || null
}); // 地理位置
var lng = (data.lng || 0) <= 0 ? null : data.lng;
var lat = (data.lat || 0) <= 0 ? null : data.lat;
if (lng != null && lat != null) {
self.setData({
user_location: {
lng: lng,
lat: lat,
address: data.address || ''
}
});
}
} // 获取城市、区县
self.get_city_list();
self.get_county_list(); // 半秒后初始化数据
setTimeout(function () {
self.init_region_value();
}, 500);
} else {
if (app.is_login_check(res.data)) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
app.showToast("省份信息失败");
}
});
},
// 地区数据初始化
init_region_value() {
this.setData({
province_value: this.get_region_value("province_list", "province_id"),
city_value: this.get_region_value("city_list", "city_id"),
county_value: this.get_region_value("county_list", "county_id")
});
},
// 地区初始化匹配索引
get_region_value(list, id) {
var data = this.data[list];
var data_id = this.data[id];
var value = null;
data.forEach((d, i) => {
if (d.id == data_id) {
value = i;
return false;
}
});
return value;
},
// 获取省份
get_province_list() {
var self = this;
tt.request({
url: app.get_request_url("index", "region"),
method: "POST",
data: {},
dataType: "json",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
province_list: data
});
} else {
app.showToast(res.data.msg);
}
},
fail: () => {
app.showToast("省份获取失败");
}
});
},
// 获取市
get_city_list() {
var self = this;
console.log(self.data.province_id);
if (self.data.province_id) {
tt.request({
url: app.get_request_url("index", "region"),
method: "POST",
data: {
pid: self.data.province_id
},
dataType: "json",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
city_list: data
});
} else {
app.showToast(res.data.msg);
}
},
fail: () => {
app.showToast("城市获取失败");
}
});
}
},
// 获取区/县
get_county_list() {
var self = this;
if (self.data.city_id) {
// 加载loding
tt.request({
url: app.get_request_url("index", "region"),
method: "POST",
data: {
pid: self.data.city_id
},
dataType: "json",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
county_list: data
});
} else {
app.showToast(res.data.msg);
}
},
fail: () => {
app.showToast("区/县获取失败");
}
});
}
},
// 省份事件
select_province_event(e) {
var index = e.detail.value || 0;
if (index >= 0) {
var data = this.data.province_list[index];
this.setData({
province_value: index,
province_id: data.id,
city_value: null,
county_value: null,
city_id: null,
county_id: null
});
this.get_city_list();
}
},
// 市事件
select_city_event(e) {
var index = e.detail.value || 0;
if (index >= 0) {
var data = this.data.city_list[index];
this.setData({
city_value: index,
city_id: data.id,
county_value: null,
county_id: null
});
this.get_county_list();
}
},
// 区/县事件
select_county_event(e) {
var index = e.detail.value || 0;
if (index >= 0) {
var data = this.data.county_list[index];
this.setData({
county_value: index,
county_id: data.id
});
}
},
// 省市区未按照顺序选择提示
region_select_error_event(e) {
var value = e.currentTarget.dataset.value || null;
if (value != null) {
app.showToast(value);
}
},
// 选择地理位置
choose_location_event(e) {
tt.navigateTo({
url: '/pages/common/open-setting-location/open-setting-location'
});
},
// 复制百度地图坐标拾取地址
baidu_map_copy_event(e) {
tt.setClipboardData({
data: 'https://lbs.amap.com/console/show/picker',
success(res) {
app.showToast('复制成功', 'success');
}
});
},
// 地址信息初始化
user_location_init() {
var result = tt.getStorageSync(this.data.user_location_cache_key) || null;
var data = null;
if (result != null) {
data = {
name: result.name || null,
address: result.address || null,
lat: result.latitude || null,
lng: result.longitude || null
};
}
this.setData({
user_location: data
});
},
// 数据提交
form_submit(e) {
var self = this; // 表单数据
var form_data = e.detail.value; // 数据校验
var validation = [{
fields: "name",
msg: "请填写联系人"
}, {
fields: "tel",
msg: "请填写联系电话"
}, {
fields: "province",
msg: "请选择省份"
}, {
fields: "city",
msg: "请选择城市"
}, {
fields: "county",
msg: "请选择区县"
}, {
fields: "address",
msg: "请填写详细地址"
}, {
fields: "lng",
msg: "请输入经度"
}, {
fields: "lat",
msg: "请输入纬度"
}];
form_data["province"] = self.data.province_id;
form_data["city"] = self.data.city_id;
form_data["county"] = self.data.county_id; // 地理位置
// 验证提交表单
if (app.fields_check(form_data, validation)) {
if ((self.data.extraction_data || null) != null && (self.data.extraction_data.status || 0) == 1) {
tt.showModal({
title: '温馨提示',
content: '数据需重新审核后方可生效',
confirmText: '确认',
cancelText: '暂不',
success: result => {
if (result.confirm) {
self.request_data_save(form_data);
}
}
});
} else {
self.request_data_save(form_data);
}
}
},
// 数据保存
request_data_save(data) {
var self = this;
self.setData({
form_submit_disabled_status: true
});
tt.showLoading({
title: "处理中..."
});
tt.request({
url: app.get_request_url("applysave", "extraction", "distribution"),
method: "POST",
data: data,
dataType: "json",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
tt.hideLoading();
if (res.data.code == 0) {
app.showToast(res.data.msg, "success");
setTimeout(function () {
tt.navigateBack();
}, 1000);
} else {
self.setData({
form_submit_disabled_status: false
});
if (app.is_login_check(res.data)) {
app.showToast(res.data.msg);
} else {
app.showToast('提交失败,请重试!');
}
}
},
fail: () => {
self.setData({
form_submit_disabled_status: false
});
tt.hideLoading();
app.showToast("服务器请求出错");
}
});
}
});
\ No newline at end of file
{
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "取货点信息"
}
\ No newline at end of file
<form bindsubmit="form_submit" class="form-container oh">
<view class="form-gorup bg-white">
<view class="form-gorup-title">别名<text class="form-group-tips">选填</text></view>
<input type="text" name="alias" value="{{extraction_data.alias || ''}}" placeholder-class="cr-ccc" class="cr-666" placeholder="别名格式最多 16 个字符" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">联系人<text class="form-group-tips-must">必填</text></view>
<input type="text" name="name" value="{{extraction_data.name || ''}}" placeholder-class="cr-ccc" class="cr-666" placeholder="联系人格式 2~16 个字符之间" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">联系电话<text class="form-group-tips-must">必填</text></view>
<input type="text" name="tel" value="{{extraction_data.tel || ''}}" placeholder-class="cr-ccc" class="cr-666" placeholder="座机 或 手机" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">省市区<text class="form-group-tips-must">必选</text></view>
<view class="select-address oh">
<view class="section fl">
<picker name="province" bindchange="select_province_event" value="{{province_value}}" range="{{province_list}}" range-key="name">
<view class="name {{(province_value == null) ? 'cr-ccc' : 'cr-666' }}">{{province_list[province_value].name || default_province}}</view>
</picker>
</view>
<view class="section fl">
<picker tt:if="{{(province_id || null) != null}}" name="city" bindchange="select_city_event" value="{{city_value}}" range="{{city_list}}" range-key="name">
<view class="name {{(city_value == null) ? 'cr-ccc' : 'cr-666' }}">{{city_list[city_value].name || default_city}}</view>
</picker>
<text tt:else class="cr-ccc" bindtap="region_select_error_event" data-value="请先选择省份">请先选择省份</text>
</view>
<view class="section fl">
<picker tt:if="{{(city_id || null) != null}}" name="county" bindchange="select_county_event" value="{{county_value}}" range="{{county_list}}" range-key="name">
<view class="name {{(county_value == null) ? 'cr-ccc' : 'cr-666' }}">{{county_list[county_value].name || default_county}}</view>
</picker>
<text tt:else class="cr-ccc" bindtap="region_select_error_event" data-value="请先选择城市">请先选择城市</text>
</view>
</view>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">详细地址<text class="form-group-tips-must">必填</text></view>
<input type="text" name="address" value="{{extraction_data.address || ''}}" placeholder-class="cr-ccc" class="cr-666" placeholder="详细地址格式 1~80 个字符之间" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">地理位置<text class="form-group-tips-must">必填</text></view>
<input type="digit" name="lng" value="{{extraction_data.lng || ''}}" placeholder-class="cr-ccc" class="cr-666 br-b" placeholder="请输入经度,如:116.397451" />
<input type="digit" name="lat" value="{{extraction_data.lat || ''}}" placeholder-class="cr-ccc" class="cr-666" placeholder="请输入纬度,如:39.909187" />
<view class="tips">
由于当前系统不支持位置选择,您可以登录电脑端使用高德拾取坐标系统获取相应的经纬度填写对应输入框,地址:https://lbs.amap.com/console/show/picker ,可复制地址去浏览器粘贴打开。
<button type="primary" size="mini" hover-class="none" bindtap="baidu_map_copy_event">点击复制地址</button>
</view>
</view>
<view class="form-gorup">
<view tt:if="{{(extraction_data || null) != null && (extraction_data.status || 0) == 1}}" class="tips spacing-mb">
注意:编辑信息将重新审核后方可生效
</view>
<button class="submit-bottom" type="default" formType="submit" hover-class="none" disabled="{{form_submit_disabled_status}}">提交</button>
</view>
</form>
\ No newline at end of file
/*
* 三级联动
*/
.select-address {
box-sizing: border-box;
height: 70rpx;
line-height: 70rpx;
padding: 0 10rpx;
}
.select-address .section {
width: 33.33%;
box-sizing: border-box;
}
.select-address .section:not(:first-child) {
padding: 0 5rpx;
}
/*
* 表单
*/
.submit-bottom {
background-color: #ff6a80 !important;
color: #fff !important;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null,
nav_status_list: [{
name: "全部",
value: "-1"
}, {
name: "待处理",
value: "0"
}, {
name: "已处理",
value: "1"
}],
nav_status_index: 0,
is_show_take_popup: false,
extraction_value: null,
extraction_code: '',
form_submit_disabled_status: false,
is_show_search_popup: false,
search_keywords_value: ''
},
onLoad(params) {
// 是否指定状态
var nav_status_index = 0;
if (params.status != undefined) {
for (var i in this.data.nav_status_list) {
if (this.data.nav_status_list[i]['value'] == params.status) {
nav_status_index = i;
break;
}
}
}
this.setData({
params: params,
nav_status_index: nav_status_index
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
} // 加载loding
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
}); // 参数
var status = (this.data.nav_status_list[this.data.nav_status_index] || null) == null ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value']; // 获取数据
tt.request({
url: app.get_request_url("order", "extraction", "distribution"),
method: "POST",
data: {
page: this.data.data_page,
status: status || 0,
keywords: this.data.search_keywords_value || ''
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1
}); // 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({
data_bottom_line_status: true
});
} else {
this.setData({
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.currentTarget.dataset.index || 0,
data_page: 1
});
this.get_data_list(1);
},
// 取件码弹层-开启
list_submit_take_event(e) {
this.setData({
is_show_take_popup: true,
extraction_code: '',
extraction_value: {
index: e.currentTarget.dataset.index,
oid: e.currentTarget.dataset.oid,
uid: e.currentTarget.dataset.uid
}
});
},
// 取件码弹层-关闭
take_popup_event_close() {
this.setData({
is_show_take_popup: false
});
},
// 取件码输入事件
extraction_code_input_event(e) {
this.setData({
extraction_code: e.detail.value || ''
});
},
// 取件提交
form_submit_take_event(e) {
var self = this; // 参数
if ((self.data.extraction_code || null) == null) {
app.showToast('请输入取件码');
return false;
}
if ((self.data.extraction_value || null) == null) {
app.showToast('操作数据有误');
return false;
} // 提交表单
var data = {
id: self.data.extraction_value.oid,
user_id: self.data.extraction_value.uid,
extraction_code: self.data.extraction_code
};
self.setData({
form_submit_disabled_status: true
});
tt.showLoading({
title: "处理中..."
});
tt.request({
url: app.get_request_url("take", "extraction", "distribution"),
method: "POST",
data: data,
dataType: "json",
success: res => {
self.setData({
form_submit_disabled_status: false
});
tt.hideLoading();
if (res.data.code == 0) {
var temp_data_list = this.data.data_list;
var index = self.data.extraction_value.index;
temp_data_list[index]['status'] = 1;
temp_data_list[index]['status_name'] = '已处理';
self.setData({
is_show_take_popup: false,
data_list: temp_data_list
});
app.showToast(res.data.msg, "success");
} else {
app.showToast(res.data.msg);
}
},
fail: () => {
self.setData({
form_submit_disabled_status: false
});
tt.hideLoading();
app.showToast("服务器请求出错");
}
});
},
// 搜索弹层-开启
drag_event(e) {
this.setData({
is_show_search_popup: true
});
},
// 搜索弹层-关闭
search_popup_event_close() {
this.setData({
is_show_search_popup: false
});
},
// 搜索关键字输入事件
search_input_keywords_event(e) {
this.setData({
search_keywords_value: e.detail.value || ''
});
},
// 搜索确认事件
search_submit_event(e) {
this.setData({
is_show_search_popup: false,
data_page: 1
});
this.get_data_list(1);
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "取货订单",
"usingComponents": {
"component-popup": "/components/popup/popup"
}
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block tt:for="{{nav_status_list}}" tt:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<movable-area class="wh-auto ht-auto">
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" tt:if="{{data_list.length > 0}}" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<text class="fl cr-666">{{item.add_time}}</text>
<text class="fr nickname cr-888">{{item.status_name}}</text>
</view>
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单号</text>
<text class="value">{{item.order_no}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">支付金额</text>
<text class="value">{{item.pay_price}}</text>
<text class="unit cr-888">元</text>
</view>
</view>
<view tt:if="{{item.status == 0}}" class="operation tr br-t-dashed">
<button class="cr-888 br" type="default" size="mini" hover-class="none" data-index="{{index}}" data-oid="{{item.order_id}}" data-uid="{{item.order_user_id}}" bindtap="list_submit_take_event">取货</button>
</view>
</view>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
<!-- 拖拽按钮 -->
<movable-view class="search-drag tc" direction="all" bindtap="drag_event">
<icon type="search" size="30" />
</movable-view>
</movable-area>
<!-- 取货 popup -->
<component-popup prop-show="{{is_show_take_popup}}" prop-position="bottom" bindonclose="take_popup_event_close">
<view class="form-container spacing-mt">
<view class="form-gorup tc">
<view class="form-gorup-title">取货码</view>
<input type="number" value="{{extraction_code}}" placeholder-class="cr-ccc" class="cr-666 br-b spacing-mt" placeholder="请输入取货码" maxlength="4" bindinput="extraction_code_input_event" />
</view>
<view class="form-gorup">
<button class="submit-bottom" type="default" hover-class="none" disabled="{{form_submit_disabled_status}}" bindtap="form_submit_take_event">确认</button>
</view>
</view>
</component-popup>
<!-- 搜索 popup -->
<component-popup prop-show="{{is_show_search_popup}}" prop-position="bottom" bindonclose="search_popup_event_close">
<view class="form-container spacing-mt">
<view class="form-gorup tc">
<view class="form-gorup-title">搜索条件</view>
<input type="number" value="{{search_keywords_value}}" placeholder-class="cr-ccc" class="cr-666 br-b spacing-mt" placeholder="订单号/取货码" bindinput="search_input_keywords_event" />
</view>
<view class="form-gorup">
<button class="submit-bottom" type="default" hover-class="none" disabled="{{form_submit_disabled_status}}" bindtap="search_submit_event">搜索</button>
</view>
</view>
</component-popup>
\ No newline at end of file
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 33.33%;
}
.nav .active {
color: #ff6a80;
}
/*
* 列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item .base {
padding: 15rpx 10rpx;
}
.data-list .item .base .avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.data-list .item .base .nickname {
margin-top: 10rpx;
}
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
.data-list .item .operation {
padding: 20rpx 10rpx;
}
.data-list .item .submit-order {
border: 1px solid #e5e5e5;
color: #888 !important;
}
.data-list .item .operation button:not(:first-child) {
margin-left: 30rpx;
}
/*
* 表单
*/
.submit-bottom {
background-color: #ff6a80 !important;
color: #fff !important;
}
/*
* 搜索
*/
.search-drag {
width: 30px;
height: 30px;
padding: 10px;
background: hsla(0, 0%, 0%, 0.1);
border-radius: 50%;
margin-top: calc(100vh - 160px);
margin-left: calc(50% - 25px);
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.3);
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_base: null,
extraction: null,
statistical: null
},
onLoad(params) {},
onShow() {
this.init();
},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false
});
}
},
// 获取数据
get_data() {
var self = this;
tt.request({
url: app.get_request_url("index", "extraction", "distribution"),
method: "POST",
data: {},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
data_base: data.base || null,
extraction: data.extraction || null,
statistical: data.statistical || null,
data_list_loding_msg: '',
data_list_loding_status: 0,
data_bottom_line_status: true
});
} else {
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg
});
if (app.is_login_check(res.data, self, 'get_data')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.get_data();
},
// 地图查看
address_map_event(e) {
app.location_authorize(this, 'address_map_handle', e);
},
// 地图查看
address_map_handle(e) {
if ((this.data.extraction || null) == null) {
return false;
}
var ads = this.data.extraction;
var lng = parseFloat(ads.lng || 0);
var lat = parseFloat(ads.lat || 0);
if (lng <= 0 || lat <= 0) {
return false;
}
tt.openLocation({
latitude: lat,
longitude: lng,
scale: 18,
name: ads.alias || '',
address: (ads.province_name || '') + (ads.city_name || '') + (ads.county_name || '') + (ads.address || '')
});
},
// 进入取货订单管理
order_event(e) {
var value = e.currentTarget.dataset.value || 0;
tt.navigateTo({
url: '/pages/plugins/distribution/extraction-order/extraction-order?status=' + value
});
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "取货点"
}
\ No newline at end of file
<view tt:if="{{data_list_loding_status == 0}}">
<!-- 未申请 -->
<view tt:if="{{extraction == null}}" class="apply-not bg-white">
<view tt:if="{{(data_base || null) != null && (data_base.self_extraction_apply_desc || null) != null && data_base.self_extraction_apply_desc.length > 0}}" class="apply-desc">
<view tt:for="{{data_base.self_extraction_apply_desc}}" tt:key="key" class="item">
{{item}}
</view>
</view>
<view class="to-submit tc">
<navigator url="/pages/plugins/distribution/extraction-apply/extraction-apply" hover-class="none">
<button type="primary" size="mini" hover-class="none">立即申请</button>
</navigator>
</view>
</view>
<!-- 已存在申请信息 -->
<view tt:else class="apply-already">
<!-- status 状态(0待审核, 1已通过, 2已拒绝 -->
<!-- 审核中 -->
<view tt:if="{{extraction.status == 0}}" class="waiting-audit bg-white">
<view class="title-msg tc">申请信息正在审核中...</view>
<view class="operation oh tc">
<view class="cr-666 mini-msg">你可以</view>
<view class="to-submit tc">
<navigator url="/pages/plugins/distribution/extraction-apply/extraction-apply" hover-class="none">
<button type="primary" size="mini" hover-class="none">编辑信息</button>
</navigator>
</view>
</view>
</view>
<!-- 审核通过 -->
<view tt:elif="{{extraction.status == 1 || extraction.status == 3}}" class="valid">
<view class="base br-b oh bg-white">
<view class="base-title fl">取货点信息</view>
<view class="fr edit-submit">
<navigator url="/pages/plugins/distribution/extraction-apply/extraction-apply" hover-class="none">编辑信息</navigator>
</view>
</view>
<view class="content bg-white" bindtap="address_map_event">
<text tt:if="{{(extraction.alias || null) != null}}" class="alias">{{extraction.alias}}</text>
<text class="cr-666">{{extraction.province_name}}{{extraction.city_name}}{{extraction.county_name}}{{extraction.address}}</text>
</view>
<view tt:if="{{extraction.status == 1}}">
<view class="base br-b oh bg-white spacing-mt">
<view class="base-title fl">取货订单统计</view>
<view class="fr edit-submit">
<navigator url="/pages/plugins/distribution/extraction-order/extraction-order" hover-class="none">查看取货订单</navigator>
</view>
</view>
<view class="content bg-white statistics oh">
<view class="item fl tc" data-value="0" bindtap="order_event">
<view class="title cr-666">待处理</view>
<view class="value single-text order-wait-value">{{statistical.order_wait || 0}}</view>
</view>
<view class="item fl tc br-l" data-value="1" bindtap="order_event">
<view class="title cr-666">已处理</view>
<view class="value single-text order-already-value">{{statistical.order_already || 0}}</view>
</view>
</view>
</view>
<view tt:else class="spacing-mt relieve">
<view class="tips">
当前状态也解约,可重新编辑数据提交审核。
</view>
</view>
<view tt:if="{{extraction.status == 1 && (data_base || null) != null && (data_base.self_extraction_common_notice || null) != null && data_base.self_extraction_common_notice.length > 0}}" class="extraction-notice spacing-mt">
<view class="tips">
<view tt:for="{{data_base.self_extraction_common_notice}}" tt:key="key" class="item">
{{item}}
</view>
</view>
</view>
</view>
<!-- 审核失败 -->
<view tt:else="{{extraction.status == 2}}" class="refuse bg-white">
<view class="title-msg tc">申请信息审核失败</view>
<view tt:if="{{(extraction.fail_reason || null) != null}}" class="fail-tips tips">原因:{{extraction.fail_reason}}</view>
<view class="operation oh tc">
<view class="cr-666 mini-msg">你可以重新编辑信息提交</view>
<view class="to-submit tc">
<navigator url="/pages/plugins/distribution/extraction-apply/extraction-apply" hover-class="none">
<button type="primary" size="mini" hover-class="none">编辑信息</button>
</navigator>
</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view tt:else>
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
\ No newline at end of file
/*
* 公共
*/
.operation {
margin-top: 30rpx;
}
.title-msg {
font-size: 46rpx;
margin-top: 5%;
}
.mini-msg {
color: #0e90d2;
}
.to-submit {
margin-top: 15rpx;
}
.waiting-audit, .refuse {
padding: 10% 10rpx 60rpx 10rpx;
}
/*
* 未申请
*/
.apply-not {
padding: 10rpx 10rpx 60rpx 10rpx;
}
.apply-not .apply-desc {
margin: 30rpx 30rpx 0 30rpx;
}
.apply-not .to-submit {
margin-top: 10%;
}
/*
* 待审核
*/
.waiting-audit .title-msg {
color: #f37b1d;
}
/*
* 已审核
*/
.valid .base {
padding: 20rpx 10rpx;
}
.valid .base-title {
font-weight: 500;
}
.valid .alias {
border: 1px solid #ff6a80;
color: #ff6a80;
padding: 2rpx 10rpx;
border-radius: 6rpx;
margin-right: 10rpx;
}
.valid .edit-submit {
color: #0e90d2;
}
.valid .content {
line-height: 46rpx;
}
.valid .content, .valid .statistics .item {
padding: 30rpx 10rpx;
}
.valid .extraction-notice {
padding: 0 20rpx;
}
.valid .statistics .item {
width: calc(50% - 1px);
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.valid .statistics .item .value {
font-weight: bold;
font-size: 36rpx;
margin-top: 10rpx;
}
.valid .statistics .item .order-wait-value {
color: #f00;
}
.valid .statistics .item .order-already-value {
color: #2ba245;
}
.valid .relieve {
padding: 0 10rpx;
}
/*
* 拒绝
*/
.refuse .title-msg {
color: #dd514c;
}
.refuse .fail-tips {
padding-left: 10rpx;
background: #ffffeb;
margin-top: 10rpx;
}
.refuse .mini-msg {
margin-top: 50rpx;
}
/*
* 介绍
*/
.apply-desc {
background: #def2fd;
border: 1px solid #cfeeff;
color: #1490d2;
padding: 10rpx;
font-size: 26rpx;
border-radius: 2px;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
data_base: null,
level_list: []
},
onLoad(params) {
this.setData({
params: params
});
this.init();
},
onShow() {},
init() {
var self = this;
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
});
tt.request({
url: app.get_request_url("index", "introduce", "distribution"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
var data_base = data.base || null;
var level_list = (data.level_list || null) != null && data.level_list.length > 0 ? data.level_list : [];
self.setData({
data_base: data_base,
level_list: level_list,
data_list_loding_status: data_base == null || level_list.length <= 0 ? 0 : 3,
data_bottom_line_status: true,
data_list_loding_msg: ''
});
} 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: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "等级介绍"
}
\ No newline at end of file
<view tt:if="{{data_base != null}}">
<!-- 等级信息 -->
<view tt:if="{{level_list.length > 0}}" class="panel-item">
<view tt:for="{{level_list}}" tt:key="item" class="bg-white spacing-mb">
<view class="panel-title">{{item.name}}</view>
<view class="panel-content">
<view class="item br-b oh">
<view class="title fl">等级证书</view>
<view class="content cr-888 fl br-l images">
<image src="{{item.images_url}}" class="avatar dis-block fl" mode="widthFix" />
</view>
</view>
<view class="item br-b oh">
<view class="title fl">返佣比例</view>
<view class="content cr-888 fl br-l">
<view>一级 {{item.level_rate_one}}%</view>
<view>二级 {{item.level_rate_two}}%</view>
<view>三级 {{item.level_rate_three}}%</view>
</view>
</view>
<view class="item br-b oh">
<view class="title fl">消费金额</view>
<view class="content cr-888 fl br-l">{{item.rules_msg}}</view>
</view>
</view>
</view>
</view>
<!-- 等级介绍 -->
<view tt:if="{{(data_base.user_center_level_desc || null) != null && data_base.user_center_level_desc.length > 0}}" class="spacing-mt user-center-level-desc">
<view class="tips-desc">
<view tt:for="{{data_base.user_center_level_desc}}" tt:key="key" class="item">
{{item}}
</view>
</view>
</view>
<view tt:if="{{((data_base.user_center_level_desc || null) != null && data_base.user_center_level_desc.length > 0) || level_list.length > 0}}">
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</view>
<view tt:if="{{level_list.length <= 0 && ((data_base.user_center_level_desc || null) == null || data_base.user_center_level_desc.length <= 0)}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
/*
* 等级信息
*/
.panel-item .panel-title {
background: #fff;
font-weight: bold;
padding: 15rpx;
border-bottom: 2px solid #eee;
font-size: 34rpx;
}
.panel-item .panel-content .item {
padding: 20rpx 0;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
.panel-item .panel-content .item .images image {
width: 60rpx;
height: 60rpx;
}
/*
* 等级介绍
*/
.user-center-level-desc {
padding: 0 10rpx;
}
.user-center-level-desc .tips-desc {
background: #def2fd;
border: 1px solid #cfeeff;
color: #1490d2;
padding: 10rpx;
font-size: 26rpx;
border-radius: 2px;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
detail: null,
detail_list: []
},
onLoad(params) {
//params['id'] = 1;
this.setData({
params: params
});
this.init();
},
onShow() {},
init() {
var self = this;
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
});
tt.request({
url: app.get_request_url("detail", "order", "distribution"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
detail: data.data,
detail_list: [{
name: "用户昵称",
value: data.data.user_name_view || ''
}, {
name: "订单金额",
value: data.data.total_price + '' || ''
}, {
name: "退款金额",
value: data.data.refund_price + '' || ''
}, {
name: "订单状态",
value: data.data.order_status_name || ''
}, {
name: "支付状态",
value: data.data.order_pay_status_name || ''
}, {
name: "来源终端",
value: data.data.order_client_type_name || ''
}, {
name: "下单时间",
value: data.data.add_time_time || ''
}],
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: ''
});
} 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: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "订单详情"
}
\ No newline at end of file
<view tt:if="{{detail != null}}">
<view tt:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-content bg-white">
<view class="item br-b oh">
<view class="title fl">用户头像</view>
<view class="content cr-888 fl br-l">
<image src="{{detail.avatar}}" class="avatar dis-block fl" mode="widthFix" bindtap="avatar_event" data-value="{{detail.avatar}}" />
</view>
</view>
<view tt:for="{{detail_list}}" tt:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content cr-888 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view tt:if="{{detail == null}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator url="/pages/plugins/distribution/order/order" open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
.panel-item .panel-title {
background: #fff;
font-weight: bold;
padding: 15rpx;
border-bottom: 2px solid #eee;
font-size: 34rpx;
}
.panel-item .panel-content .item {
padding: 20rpx 0;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
.panel-item .panel-content .item .content .avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null,
nav_status_list: [{
name: "全部",
value: "-1"
}, {
name: "待支付",
value: "1"
}, {
name: "已支付",
value: "2"
}, {
name: "待收货",
value: "3"
}, {
name: "已完成",
value: "4"
}, {
name: "已失效",
value: "5,6"
}],
nav_status_index: 0
},
onLoad(params) {
// 是否指定状态
var nav_status_index = 0;
if ((params.status || null) != null) {
for (var i in this.data.nav_status_list) {
if (this.data.nav_status_list[i]['value'] == params.status) {
nav_status_index = i;
break;
}
}
}
this.setData({
params: params,
nav_status_index: nav_status_index
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
} // 加载loding
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
}); // 参数
var order_status = (this.data.nav_status_list[this.data.nav_status_index] || null) == null ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value']; // 获取数据
tt.request({
url: app.get_request_url("index", "order", "distribution"),
method: "POST",
data: {
page: this.data.data_page,
status: order_status,
uid: this.data.params.uid || 0,
is_more: 1
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1,
payment_list: res.data.data.payment_list || []
}); // 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({
data_bottom_line_status: true
});
} else {
this.setData({
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.currentTarget.dataset.index || 0,
data_page: 1
});
this.get_data_list(1);
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "分销订单"
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block tt:for="{{nav_status_list}}" tt:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" tt:if="{{data_list.length > 0}}" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<image src="{{item.avatar}}" class="avatar dis-block fl" mode="widthFix" bindtap="avatar_event" data-value="{{item.avatar}}" />
<text class="fr nickname cr-888">{{item.user_name_view || ''}}</text>
</view>
<navigator url="/pages/plugins/distribution/order-detail/order-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">订单状态</text>
<text class="value">{{item.order_status_name}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">来源终端</text>
<text class="value">{{item.order_client_type_name}}</text>
</view>
</view>
</navigator>
</view>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 16.66%;
}
.nav .active {
color: #ff6a80;
}
/*
* 列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item .base {
padding: 15rpx 10rpx;
}
.data-list .item .base .avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.data-list .item .base .nickname {
margin-top: 10rpx;
}
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list_loding_status: 1,
data_list_loding_msg: '加载中...',
data_bottom_line_status: false,
user_share_poster: null,
user_share_qrode: null,
user_share_url: null
},
onLoad() {
this.init();
},
init() {
var self = this;
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
});
tt.request({
url: app.get_request_url("index", "poster", "distribution"),
method: "POST",
data: {},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
user_share_poster: data.user_share_poster || null,
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_poster == null && 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: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
},
// 刷新海报
poster_refresh_event(e) {
tt.showLoading({
title: "处理中..."
});
tt.request({
url: app.get_request_url("refresh", "poster", "distribution"),
method: "POST",
data: {},
dataType: "json",
success: res => {
tt.hideLoading();
if (res.data.code == 0) {
this.setData({
user_share_poster: res.data.data
});
app.showToast(res.data.msg, "success");
} else {
if (app.is_login_check(res.data, self, 'init')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
app.showToast("服务器请求出错");
}
});
},
// 图片查看事件
images_show_event(e) {
var value = e.currentTarget.dataset.value || null;
if (value != null) {
tt.previewImage({
current: value,
urls: [value]
});
} else {
app.showToast('宣传图片地址有误');
}
},
// url事件
url_event(e) {
if ((this.data.user_share_url || null) != null) {
tt.setClipboardData({
data: this.data.user_share_url,
success(res) {
app.showToast('复制成功', 'success');
}
});
} else {
app.showToast('链接地址有误');
}
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "推广返利"
}
\ No newline at end of file
<view tt:if="{{user_share_poster != null || user_share_qrode != null || user_share_url != null}}">
<view tt:if="{{user_share_poster != 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_poster}}" class="wh-auto dis-block" mode="widthFix" />
</view>
<view class="submit submit-double oh">
<button type="primary" plain="{{true}}" hover-class="none" size="mini" data-value="{{user_share_poster}}" bindtap="images_show_event" class="fl">查看长按保存</button>
<button type="primary" plain="{{true}}" hover-class="none" size="mini" bindtap="poster_refresh_event" class="fr">重新生成</button>
</view>
</view>
<view tt: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" size="mini" class="dis-block wh-auto" data-value="{{user_share_qrode}}" bindtap="images_show_event">查看二维码长按保存</button>
</view>
</view>
<view tt: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" size="mini" class="dis-block wh-auto" bindtap="url_event">点击复制链接地址</button>
</view>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view tt:if="{{user_share_qrode == null && user_share_url == null}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
\ No newline at end of file
/*
* 公共
*/
.share {
padding: 20rpx 10rpx;
}
.share .title {
border-left: 3px solid #ff6a80;
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;
}
.share button {
height: 70rpx;
line-height: 70rpx;
}
.submit-double button {
width: 48%;
}
/*
* 链接
*/
.url .content {
font-size: 32rpx;
color: #ff6a80;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
detail: null,
detail_list: []
},
onLoad(params) {
//params['id'] = 1;
this.setData({
params: params
});
this.init();
},
onShow() {},
init() {
var self = this;
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
});
tt.request({
url: app.get_request_url("detail", "profit", "distribution"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
detail: data.data,
detail_list: [{
name: "订单金额",
value: data.data.total_price + '' || ''
}, {
name: "退款金额",
value: data.data.refund_price + '' || ''
}, {
name: "收益金额",
value: data.data.profit_price + '' || ''
}, {
name: "当前级别",
value: data.data.level_name || ''
}, {
name: "结算状态",
value: data.data.status_name || ''
}, {
name: "订单状态",
value: data.data.order_status_name || ''
}, {
name: "订单支付状态",
value: data.data.order_pay_status_name || ''
}, {
name: "来源终端",
value: data.data.order_client_type_name || ''
}, {
name: "添加时间",
value: data.data.add_time_time || ''
}, {
name: "更新时间",
value: data.data.upd_time_text || ''
}],
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: ''
});
} 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: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "收益详情"
}
\ No newline at end of file
<view tt:if="{{detail != null}}">
<view tt:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-content bg-white">
<view tt:for="{{detail_list}}" tt:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content cr-888 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view tt:if="{{detail == null}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator url="/pages/plugins/distribution/profit/profit" open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
.panel-item .panel-title {
background: #fff;
font-weight: bold;
padding: 15rpx;
border-bottom: 2px solid #eee;
font-size: 34rpx;
}
.panel-item .panel-content .item {
padding: 20rpx 0;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null,
nav_status_list: [{
name: "全部",
value: "-1"
}, {
name: "待生效",
value: "0"
}, {
name: "待结算",
value: "1"
}, {
name: "已结算",
value: "2"
}, {
name: "已失效",
value: "3"
}],
nav_status_index: 0
},
onLoad(params) {
// 是否指定状态
var nav_status_index = 0;
if ((params.status || null) != null) {
for (var i in this.data.nav_status_list) {
if (this.data.nav_status_list[i]['value'] == params.status) {
nav_status_index = i;
break;
}
}
}
this.setData({
params: params,
nav_status_index: nav_status_index
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
} // 加载loding
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
}); // 参数
var status = (this.data.nav_status_list[this.data.nav_status_index] || null) == null ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value']; // 获取数据
tt.request({
url: app.get_request_url("index", "profit", "distribution"),
method: "POST",
data: {
page: this.data.data_page,
status: status,
is_more: 1
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1
}); // 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({
data_bottom_line_status: true
});
} else {
this.setData({
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.currentTarget.dataset.index || 0,
data_page: 1
});
this.get_data_list(1);
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "收益明细"
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block tt:for="{{nav_status_list}}" tt:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" tt:if="{{data_list.length > 0}}" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/distribution/profit-detail/profit-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">退款金额</text>
<text class="value">{{item.refund_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">收益金额</text>
<text class="value">{{item.profit_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">当前级别</text>
<text class="value">{{item.level_name}}</text>
</view>
</view>
</navigator>
</view>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 20%;
}
.nav .active {
color: #ff6a80;
}
/*
* 列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item .base,
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list_loding_status: 1,
data_list_loding_msg: '加载中...',
data_bottom_line_status: false,
user_total: null,
user_profit_stay_price: 0.00,
user_profit_vaild_price: 0.00,
user_profit_already_price: 0.00,
user_profit_total_price: 0.00,
user_data: null,
profit_data: null,
},
onShow() {
this.init();
},
init() {
var self = this;
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
});
tt.request({
url: app.get_request_url("index", "statistics", "distribution"),
method: "POST",
data: {},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
user_total: data.user_total || null,
user_profit_stay_price: data.user_profit_stay_price || 0.00,
user_profit_vaild_price: data.user_profit_vaild_price || 0.00,
user_profit_already_price: data.user_profit_already_price || 0.00,
user_profit_total_price: data.user_profit_total_price || 0.00,
user_data: data.user_chart || null,
profit_data: data.profit_chart || null,
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: ''
});
} 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: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "数据统计"
}
\ No newline at end of file
<!-- 推广客户 -->
<view class="container user-container bg-white">
<view class="title">推广客户</view>
<view class="base-content oh tc">
<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="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="cr-888">人</text>
</view>
</view>
</view>
</view>
<!-- 返利概况 -->
<view class="container profit-container bg-white spacing-mt">
<view class="title">返利概况</view>
<view class="base-content oh tc">
<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>
</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>
</view>
</view>
<view class="item fl">
<view class="name cr-666">待结算</view>
<view class="value single-text">
<text class="blue">¥{{user_profit_vaild_price || '0.00'}}</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>
</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: true}}"></template>
\ No newline at end of file
/*
* 公共
*/
.container,
.user-container .item,
.profit-container .item {
padding: 20rpx 10rpx;
}
.container .item {
width: 50%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
.container .title {
border-left: 3px solid #ff6a80;
padding-left: 20rpx;
font-size: 32rpx;
font-weight: 500;
}
.container .base-content {
padding: 30rpx 10rpx;
}
.container .base-content .name {
margin-bottom: 10rpx;
}
.container .base-content .value .golden,
.container .base-content .value .yellow,
.container .base-content .value .green {
font-weight: 500;
}
.container .base-content .value .golden {
color: #ff6a80;
}
.container .base-content .value .yellow {
color: #f37b1d;
}
.container .base-content .value .blue {
color: #3bb4f2;
}
.container .base-content .value .green {
color: #5eb95e;
}
/*
* 用户、返利
*/
.user-container .base-content .value .golden,
.user-container .base-content .value .green {
margin-right: 10rpx;
}
.user-container .base-content,
.profit-container .base-content {
padding: 10rpx;
}
/*
* 图表
*/
.chart-container {
width: 100%;
height: 520rpx;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.chart-container .chart-not-data {
margin-top: 230rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null
},
onLoad(params) {
this.setData({
params: params
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
} // 加载loding
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
}); // 获取数据
tt.request({
url: app.get_request_url("index", "team", "distribution"),
method: "POST",
data: {
page: this.data.data_page
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1
}); // 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({
data_bottom_line_status: true
});
} else {
this.setData({
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 头像查看
avatar_event(e) {
var value = e.currentTarget.dataset.value || null;
if (value != null) {
tt.previewImage({
current: value,
urls: [value]
});
} else {
app.showToast('头像地址有误');
}
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "我的团队"
}
\ No newline at end of file
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" tt:if="{{data_list.length > 0}}" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<image src="{{item.avatar}}" class="avatar dis-block fl" mode="widthFix" bindtap="avatar_event" data-value="{{item.avatar}}" />
<text class="fr nickname cr-888">{{item.user_name_view || ''}}</text>
</view>
<view class="content">
<view class="multi-text">
<text class="title cr-666">消费金额</text>
<text class="value">{{item.order_total}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">下级消费</text>
<text class="value">{{item.find_order_total}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">下级用户</text>
<text class="value">{{item.referrer_count}}</text>
<text class="unit cr-888">人</text>
</view>
<view class="multi-text">
<text class="title cr-666">加入时间</text>
<text class="value">{{item.add_time_time}}</text>
</view>
</view>
<view class="operation tr br-t-dashed">
<navigator url="/pages/plugins/distribution/order/order?uid={{item.id}}" hover-class="none">
<button class="cr-888 br" type="default" size="mini" hover-class="none">用户订单</button>
</navigator>
</view>
</view>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
.scroll-box {
height: 100vh;
}
.data-list .item .base {
padding: 15rpx 10rpx;
}
.data-list .item .base .avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.data-list .item .base .nickname {
margin-top: 10rpx;
}
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
.data-list .item .operation {
padding: 20rpx 10rpx;
}
.data-list .item .submit-order {
border: 1px solid #e5e5e5;
color: #888 !important;
}
.data-list .item .operation button:not(:first-child) {
margin-left: 30rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_base: null,
user_level: null,
extraction: null,
avatar: app.data.default_user_head_src,
nickname: "用户名",
submit_disabled_status: false,
// 导航
nav_list: []
},
onLoad(params) {
this.setData({
nav_list: this.nav_list_data()
});
},
onShow() {
this.init();
},
init(e) {
var user = app.get_user_info(this, "init"),
self = this;
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.showModal({
title: '温馨提示',
content: '绑定手机号码',
confirmText: '确认',
cancelText: '暂不',
success: result => {
tt.stopPullDownRefresh();
if (result.confirm) {
tt.navigateTo({
url: "/pages/login/login?event_callback=init"
});
}
self.setData({
avatar: (self.data.avatar || null) == null ? user.avatar || app.data.default_user_head_src : self.data.avatar,
nickname: user.nickname || '用户名'
});
}
});
} else {
self.setData({
avatar: (self.data.avatar || null) == null ? user.avatar || app.data.default_user_head_src : self.data.avatar,
nickname: user.nickname || '用户名'
});
self.get_data();
}
}
},
// 导航数据
nav_list_data() {
return [{
icon: "/images/plugins/distribution/user-center-order-icon.png",
title: "分销订单",
url: "/pages/plugins/distribution/order/order"
}, {
icon: "/images/plugins/distribution/user-center-profit-icon.png",
title: "收益明细",
url: "/pages/plugins/distribution/profit/profit"
}, {
icon: "/images/plugins/distribution/user-center-team-icon.png",
title: "我的团队",
url: "/pages/plugins/distribution/team/team"
}, {
icon: "/images/plugins/distribution/user-center-poster-icon.png",
title: "推广返利",
url: "/pages/plugins/distribution/poster/poster"
}, {
icon: "/images/plugins/distribution/user-center-statistics-icon.png",
title: "数据统计",
url: "/pages/plugins/distribution/statistics/statistics"
}];
},
// 获取数据
get_data() {
var self = this;
tt.request({
url: app.get_request_url("index", "user", "distribution"),
method: "POST",
data: {},
dataType: "json",
success: res => {
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
var data_base = data.base || null;
var user_level = data.user_level || null;
self.setData({
data_base: data_base,
user_level: user_level,
extraction: data.extraction || null,
avatar: user_level == null || (user_level.images_url || null) == null ? self.data.avatar : user_level.images_url,
data_list_loding_msg: '',
data_list_loding_status: 0,
data_bottom_line_status: false
}); // 导航
var temp_data_list = self.nav_list_data(); // 等级介绍
if (data_base != null && (data_base.is_show_introduce || 0) == 1) {
temp_data_list.push({
icon: "/images/plugins/distribution/user-center-introduce-icon.png",
title: "等级介绍",
url: "/pages/plugins/distribution/introduce/introduce"
});
}
self.setData({
nav_list: temp_data_list
});
} else {
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg
});
if (app.is_login_check(res.data, self, 'get_data')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.stopPullDownRefresh();
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.get_data();
},
// 头像查看
preview_event() {
if (app.data.default_user_head_src != this.data.avatar) {
tt.previewImage({
current: this.data.avatar,
urls: [this.data.avatar]
});
}
},
// 头像加载错误
user_avatar_error(e) {
this.setData({
avatar: app.data.default_user_head_src
});
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ff6a80",
"backgroundColorTop": "#ff6a80",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "我的分销"
}
\ No newline at end of file
<!-- 头部 -->
<view class="head-box oh">
<view class="head-item tc fl">
<view class="avatar">
<image bindtap="preview_event" binderror="user_avatar_error" src="{{avatar}}" mode="widthFix" class="dis-block" />
</view>
<text class="item-name dis-block cr-fff">{{nickname}}</text>
</view>
<view class="head-base fl">
<view tt:if="{{(user_level || null) != null && (user_level.name || null) != null}}" class="single-text level-name spacing-mt">{{user_level.name}}</view>
<block tt:if="{{(data_base || null) != null && (data_base.is_enable_self_extraction || 0) == 1}}">
<navigator url="/pages/plugins/distribution/extraction/extraction" hover-class="none">
<button size="mini" type="default" hover-class="none" class="head-base-submit">{{(extraction || null) == null ? '申请' : ''}}取货点</button>
</navigator>
</block>
</view>
</view>
<!-- 导航 -->
<view tt:if="{{nav_list.length > 0}}" class="nav spacing-mt oh bg-white">
<block tt:for="{{nav_list}}" tt:key="key">
<navigator url="{{item.url}}" hover-class="none">
<view class="item fl tc">
<image src="{{item.icon}}" mode="scaleToFill" class="dis-block" />
<view class="title">{{item.title}}</view>
</view>
</navigator>
</block>
</view>
<!-- 通知 -->
<view class="tips-container spacing-mb">
<!-- 不符合分销条件描述 -->
<block tt:if="{{(user_level || null) == null}}">
<view tt:if="{{(data_base.non_conformity_desc || null) != null && data_base.non_conformity_desc.length > 0}}" class="tips-item spacing-mt">
<view class="not-opening-vip-desc">
<view tt:for="{{data_base.non_conformity_desc}}" tt:key="key" class="item">
{{item}}
</view>
</view>
</view>
</block>
<!-- 会员中心通知 -->
<view tt:if="{{(user_level || null) != null && (data_base.user_center_notice || null) != null && data_base.user_center_notice.length > 0}}" class="tips-item spacing-mt">
<view class="tips">
<view tt:for="{{data_base.user_center_notice}}" tt:key="key" class="item">
{{item}}
</view>
</view>
</view>
</view>
\ No newline at end of file
/*
* 头部
*/
.head-box{
padding-top: 20rpx;
font-size: 24rpx;
background-color: #ff6a80;
position: relative;
}
.head-item {
padding-bottom: 30rpx;
}
.head-item .avatar {
padding: 10rpx;
background: #fbbec7;
border: 1px solid #fbbec7;
}
.head-item .avatar image {
width: 140rpx;
height: 140rpx;
}
.head-item .avatar,
.head-item .avatar image {
border-radius: 50%;
}
.head-item .item-name{
font-size: 30rpx;
margin-top: 10rpx;
}
.head-item .item-icon {
width: 30rpx;
margin-right: 20rpx;
}
.head-item {
margin-left: 30rpx;
}
.head-base {
margin-left: 60rpx;
width: calc(100% - 280rpx);
}
.head-base .level-name {
font-size: 42rpx;
font-weight: 500;
margin-bottom: 30rpx;
color: #fffbe0;
}
.head-base .head-base-submit {
font-size: 26rpx;
height: 55rpx;
line-height: 55rpx;
border: 1px solid #ffe2e5;
background-color: #ffe2e5;
color: #f77076;
position: absolute;
right: 30rpx;
bottom: 35rpx;
padding: 0 20rpx;
}
/*
* 导航
*/
.nav {
border-top: 1px solid #eee;
}
.nav .item {
padding: 30rpx 0;
width: calc(50% - 1px);
border-bottom: 1px solid #eee;
}
.nav .item:nth-child(odd) {
border-right: 1px solid #eee;
}
.nav .item image {
width: 100rpx;
height: 100rpx;
margin: 0 auto;
}
.nav .item .title {
margin-top: 20rpx;
}
/*
* 提示信息
*/
.tips-container .tips-item {
padding: 0 10rpx;
}
.tips-container .not-opening-vip-desc {
background: #def2fd;
border: 1px solid #cfeeff;
color: #1490d2;
padding: 10rpx;
font-size: 26rpx;
border-radius: 2px;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_list: [],
data_base: null,
selected_tabs_index: 0,
selected_content_index: null,
submit_disabled_status: false
},
onLoad(params) {
this.init();
},
onShow() {},
init() {
// 获取数据
this.get_data_list();
},
// 获取数据
get_data_list() {
var self = this;
tt.showLoading({
title: "加载中..."
});
if (self.data.data_list.length <= 0) {
self.setData({
data_list_loding_status: 1
});
}
tt.request({
url: app.get_request_url("index", "buy", "membershiplevelvip"),
method: "POST",
data: {},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
var status = (data.data || []).length > 0;
self.setData({
data_base: data.base || null,
data_list: data.data || [],
data_list_loding_msg: '',
data_list_loding_status: status ? 3 : 0,
data_bottom_line_status: status
});
} else {
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg
});
if (app.is_login_check(res.data, self, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.get_data_list();
},
// tabs事件
tabs_event(e) {
this.setData({
selected_tabs_index: e.currentTarget.dataset.index || 0,
selected_content_index: null
});
},
// 时长事件
content_event(e) {
this.setData({
selected_content_index: e.currentTarget.dataset.index || 0
});
},
// 确认支付事件
submit_event(e) {
if (this.data.selected_tabs_index < 0 || this.data.selected_content_index === null) {
app.showToast('请选择开通时长');
return false;
} // 请求参数
var item = this.data.data_list[this.data.selected_tabs_index] || null;
if (item == null) {
app.showToast('开通时长有误');
return false;
}
var rules = (item['pay_period_rules'] || null) == null ? null : item['pay_period_rules'][this.data.selected_content_index] || null;
if (rules == null) {
app.showToast('开通时长有误');
return false;
} // 请求生成支付订单
var self = this;
self.setData({
submit_disabled_status: true
});
tt.showLoading({
title: "处理中..."
});
tt.request({
url: app.get_request_url("create", "buy", "membershiplevelvip"),
method: "POST",
data: {
"opening": item['id'] + '-' + rules['number']
},
dataType: "json",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: res => {
tt.hideLoading();
self.setData({
submit_disabled_status: false
});
if (res.data.code == 0) {
// 进入以后会员中心并发起支付
tt.redirectTo({
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')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
self.setData({
submit_disabled_status: false
});
tt.hideLoading();
app.showToast("服务器请求出错");
}
});
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#1d1611",
"backgroundColorTop": "#1d1611",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "开通时长"
}
\ No newline at end of file
<view tt:if="{{(data_list || null) != null && data_list.length > 0}}" class="page">
<!-- 导航 -->
<scroll-view class="tabs bg-white tc oh" scroll-x="true">
<block tt:for="{{data_list}}" tt:key="key">
<view class="item cr-888 {{selected_tabs_index === index ? 'active' : ''}}" bindtap="tabs_event" data-index="{{index}}">{{item.name}}</view>
</block>
</scroll-view>
<!-- 内容 -->
<view class="content spacing-mt">
<block tt:for="{{data_list}}" tt:key="key">
<block tt:if="{{selected_tabs_index == index}}">
<block tt:if="{{(item.pay_period_rules || null) != null}}">
<block tt:for="{{item.pay_period_rules}}" tt:key="keys" tt:for-item="rules">
<view class="item oh tc bg-white {{selected_content_index === index ? 'active' : ''}}" bindtap="content_event" data-index="{{index}}">
<view class="fl number single-text">
<text tt:if="{{(rules.number || null) == null}}" class="value">终身</text>
<text tt:else class="value">{{rules.value}}</text>
<text tt:if="{{(rules.unit || null) != null}}" class="unit">{{rules.unit}}</text>
</view>
<view class="fr price bg-white single-text">
<text class="symbol">¥</text>
<text class="value">{{rules.price}}</text>
<text class="unit">元</text>
</view>
</view>
</block>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: true}}"></template>
<button class="submit-fixed submit-bottom" type="default" hover-class="none" bindtap="submit_event" disabled="{{submit_disabled_status}}">确认支付</button>
</block>
<block tt:else>
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: 0, msg: '购买时长未配置'}}"></template>
</block>
</block>
</block>
</view>
</view>
<view tt:else>
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: 0, msg: '未配置会员等级'}}"></template>
</view>
\ No newline at end of file
/**
* common
*/
.page {
padding-bottom: 100rpx;
}
/**
* tabs
*/
.tabs {
width: 100%;
height: 80rpx;
white-space: nowrap;
box-sizing: border-box;
}
.tabs .item {
padding: 20rpx 30rpx;
border-bottom: 3px solid #f0f0f0;
display: inline-block;
position: relative;
}
.tabs .active {
border-bottom: 3px solid #1d1611;
color: #1d1611;
}
/**
* content
*/
.content .item {
cursor: pointer;
border: 1px solid #D6D6D6;
margin: 0 20rpx 30rpx 20rpx;
}
.content .item .number {
background: #f2f2f2;
width: calc(40% - 40rpx);
}
.content .item .price {
width: calc(60% - 40rpx)
}
.content .item .number,
.content .item .price {
padding: 20rpx;
}
.content .item .number .value {
color: #666;
}
.content .item .price .value,
.content .item .price .symbol {
color: #1d1611;
}
.content .item .value {
font-size: 38rpx;
}
.content .item .unit {
color: #888;
margin-left: 10rpx;
}
.content .active {
border-color: #1d1611;
box-shadow: 0px 0 0px 1px #1d1611
}
.content .submit-bottom {
background: #f9d681 !important;
color: #351d06 !important;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_list: [],
data_base: null
},
onLoad(params) {
this.init();
},
onShow() {},
init() {
// 获取数据
this.get_data_list();
},
// 获取数据
get_data_list() {
var self = this;
tt.showLoading({
title: "加载中..."
});
if (self.data.data_list.length <= 0) {
self.setData({
data_list_loding_status: 1
});
}
tt.request({
url: app.get_request_url("index", "index", "membershiplevelvip"),
method: "POST",
data: {},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
data_base: data.base || null,
data_list: data.data || [],
data_list_loding_msg: '',
data_list_loding_status: 0,
data_bottom_line_status: true
}); // 导航名称
if ((data.base || null) != null && (data.base.application_name || null) != null) {
tt.setNavigationBarTitle({
title: data.base.application_name
});
}
} else {
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg
});
if (app.is_login_check(res.data, self, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.get_data_list();
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#1d1611",
"backgroundColorTop": "#1d1611",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "会员VIP"
}
\ No newline at end of file
<view tt:if="{{(data_base || null) != null}}" class="banner tc" style="background-image: url({{data_base.banner_bg_images}});">
<!-- banner -->
<view tt:if="{{(data_base.banner_top_title || null) != null}}" class="single-text banner-title">
{{data_base.banner_top_title}}
</view>
<view class="submit">
<navigator url="/pages/plugins/membershiplevelvip/buy/buy" hover-class="none">
<button size="mini" type="default" hover-class="none" bindtap="buy_event">
{{data_base.banner_middle_name || '开通会员'}}
</button>
</navigator>
</view>
<!-- 数据列表 -->
<view tt:if="{{(data_list || null) != null && data_list.length > 0}}" class="data-list">
<view tt:for="{{data_list}}" tt:key="key" class="item fl">
<view class="content">
<view class="title single-text">{{item.name}}</view>
<view class="desc multi-text">{{item.desc}}</view>
<image src="{{item.images_url}}" mode="scaleToFill" class="dis-block" />
</view>
</view>
</view>
</view>
<view tt:if="{{(data_base.banner_bottom_content || null) != null}}" class="bg-white rich-text">
<rich-text nodes="{{data_base.banner_bottom_content}}"></rich-text>
</view>
<view tt:if="{{(data_base || null) == null && (data_list || null) == null && data_list.length <= 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
\ No newline at end of file
/**
* banner
*/
.banner {
background-color: #1d1611;
background-position: center center;
background-repeat: no-repeat;
background-size: auto 100%;
position: relative;
height: 1110rpx;
width: 100%;
overflow: hidden;
}
.banner .banner-title {
font-size: 60rpx;
margin-top: 50rpx;
color: #f9d681;
height: 68rpx;
overflow: hidden;
}
.banner .submit {
margin-top: 60rpx;
}
.banner .submit button {
border: 1rpx solid #f9d681;
background-color: #f9d681;
color: #351d06;
width: 320rpx;
height: 80rpx;
line-height: 80rpx;
font-size: 36rpx;
border-radius: 50rpx;
font-weight: 500;
}
/**
* 等级介绍
*/
.data-list {
margin-top: 40rpx;
}
.data-list .item {
padding: 15rpx;
width: calc(50% - 30rpx);
}
.data-list .item .content {
overflow: hidden;
border-radius: 8rpx;
background-color: #fff;
padding: 30rpx 10rpx;
}
.data-list .item .content .title {
height: 36rpx;
line-height: 36rpx;
font-size: 36rpx;
color: #333;
}
.data-list .item .content .desc {
height: 76rpx;
line-height: 38rpx;
font-size: 30rpx;
color: #999;
}
.data-list .item .content .title,
.data-list .item .content .desc {
margin-bottom: 15rpx;
}
.data-list .item .content image {
max-width: 160rpx;
max-height: 160rpx;
margin:0 auto;
}
/**
* 富文本
*/
.rich-text {
padding: 20rpx 10rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
detail: null,
detail_list: []
},
onLoad(params) {
//params['id'] = 1;
this.setData({
params: params
});
this.init();
},
onShow() {},
init() {
var self = this;
tt.showLoading({
title: "加载中..."
});
this.setData({
data_list_loding_status: 1
});
tt.request({
url: app.get_request_url("detail", "order", "membershiplevelvip"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
detail: data.data,
detail_list: [{
name: "订单号",
value: data.data.payment_user_order_no || ''
}, {
name: "开通时长",
value: data.data.period_value + ' ' + data.data.period_unit || ''
}, {
name: "订单状态",
value: data.data.status_name || ''
}, {
name: "结算状态",
value: data.data.settlement_status_name || ''
}, {
name: "类型",
value: data.data.type_name || ''
}, {
name: "订单金额",
value: data.data.price || ''
}, {
name: "支付金额",
value: data.data.pay_price <= 0 ? '' : data.data.pay_price || ''
}, {
name: "支付方式",
value: data.data.payment_name || ''
}, {
name: "创建时间",
value: data.data.add_time_time || ''
}, {
name: "更新时间",
value: data.data.upd_time || ''
}],
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: ''
});
} 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: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#1d1611",
"backgroundColorTop": "#1d1611",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "订单详情"
}
\ No newline at end of file
<view tt:if="{{detail != null}}">
<view tt:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-content bg-white">
<view tt:for="{{detail_list}}" tt:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content cr-888 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view tt:if="{{detail == null}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator url="/pages/plugins/membershiplevelvip/order/order" open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
.panel-item .panel-title {
background: #fff;
font-weight: bold;
padding: 15rpx;
border-bottom: 2px solid #eee;
font-size: 34rpx;
}
.panel-item .panel-content .item {
padding: 20rpx 0;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#1d1611",
"backgroundColorTop": "#1d1611",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "订单列表",
"usingComponents": {
"component-popup": "/components/popup/popup"
}
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block tt:for="{{nav_status_list}}" tt:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" tt:if="{{data_list.length > 0}}" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/membershiplevelvip/order-detail/order-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">开通单号</text>
<text class="value">{{item.payment_user_order_no}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">开通时长</text>
<text class="value">{{item.period_value}}</text>
<text class="unit cr-888">{{item.period_unit}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">支付金额</text>
<text class="value">{{item.pay_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">结算状态</text>
<text class="value">{{item.settlement_status_name}}</text>
</view>
</view>
</navigator>
<view tt:if="{{item.status == 0 || item.status == 2 || item.status == 3}}" class="operation tr br-t-dashed">
<button tt:if="{{item.status == 0}}" class="submit-cancel cr-666 br" type="default" size="mini" bindtap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消</button>
<button tt:if="{{item.status == 0}}" class="submit-pay cr-666 br" type="default" size="mini" bindtap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付</button>
<button tt:if="{{item.status == 2 || item.status == 3}}" class="submit-delete cr-666 br" type="default" size="mini" bindtap="delete_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">删除</button>
</view>
</view>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
<!-- 支付方式 popup -->
<component-popup prop-show="{{is_show_payment_popup}}" prop-position="bottom" bindonclose="payment_popup_event_close">
<view tt:if="{{payment_list.length > 0}}" class="payment-list oh bg-white">
<view class="item tc fl" tt:for="{{payment_list}}" tt:key="key">
<view class="item-content br" data-value="{{item.id}}" bindtap="popup_payment_event">
<image tt:if="{{(item.logo || null) != null}}" class="icon" src="{{item.logo}}" mode="widthFix" />
<text>{{item.name}}
</text>
</view>
</view>
</view>
<view tt:else class="payment-list oh bg-white tc cr-888">没有支付方式</view>
</component-popup>
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#1d1611",
"backgroundColorTop": "#1d1611",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "推广返利"
}
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#1d1611",
"backgroundColorTop": "#1d1611",
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"navigationBarTitleText": "收益详情"
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册