修复关闭按钮多端兼容性问题
parent
25b5520f82
commit
a82e2ac88e
2
App.vue
2
App.vue
|
|
@ -80,7 +80,7 @@
|
|||
// 默认logo、如 /static/images/common/logo.png
|
||||
application_logo: '',
|
||||
// 版本号
|
||||
version: 'v3.0.0',
|
||||
version: 'v3.0.1',
|
||||
// 货币价格符号
|
||||
currency_symbol: '¥',
|
||||
// 主题类型 主题颜色
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
<text>回复 @{{input_comments_modal_username}}</text>
|
||||
<view class="close pa">
|
||||
<view @tap.stop="modal_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="emoji-popup bg-white">
|
||||
<view class="close fr oh">
|
||||
<view class="fr" @tap.stop="popup_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="emoji-popup-content oh tc">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="bg-white">
|
||||
<view class="close oh padding-horizontal-main padding-top-main">
|
||||
<view class="fr" @tap.stop="popup_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plugins-batchbuy-container oh">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="goods-spec-choice-container padding-main bg-white pr">
|
||||
<view class="close fr oh">
|
||||
<view class="fr" @tap.stop="popup_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 规格基础信息 -->
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="goods-spec-choice-container padding-main bg-white pr">
|
||||
<view class="close fr oh">
|
||||
<view class="fr" @tap.stop="popup_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-spec-choice-content">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<view :class="'nav-popup-container '+common_ent">
|
||||
<view class="close oh">
|
||||
<view class="icon-right" @tap.stop="quick_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav-popup-content">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="share-popup bg-white">
|
||||
<view class="close fr oh">
|
||||
<view class="fr" @tap.stop="popup_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="share-popup-content">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view :class="'user-base-popup bg-white page-bottom-fixed '+(propIsGrayscale ? 'grayscale' : '')">
|
||||
<view class="close fr oh">
|
||||
<view class="fr" @tap.stop="popup_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<form @submit="form_submit" class="form-container">
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 积分 -->
|
||||
<view v-if="(plugins_points_data || null) != null" class="plugins-points-buy-container padding-main border-radius-main bg-white spacing-mb">
|
||||
<view v-if="(plugins_points_data || null) != null && (((plugins_points_data.discount_price || 0) > 0) || ((plugins_points_data.is_support_goods_exchange || 0) == 1))" class="plugins-points-buy-container padding-main border-radius-main bg-white spacing-mb">
|
||||
<block v-if="(plugins_points_data.discount_price || 0) > 0">
|
||||
<view class="select oh">
|
||||
<text v-if="plugins_points_data.discount_type == 1">使用{{plugins_points_data.use_integral}}个积分兑换商品</text>
|
||||
|
|
@ -175,7 +175,7 @@
|
|||
<view class="plugins-coupon-popup bg-base">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="plugins_coupon_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="plugins_coupon_list.length > 0" class="plugins-coupon-container padding-horizontal-main padding-bottom-main oh">
|
||||
|
|
@ -209,7 +209,7 @@
|
|||
<view class="bg-base padding-top-lg">
|
||||
<view class="close oh margin-right-lg padding-bottom-sm">
|
||||
<view class="fr" @tap.stop="plugins_realstore_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plugins-realstore-container padding-horizontal-main padding-bottom-main oh">
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@
|
|||
<view class="padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_params_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-params-container">
|
||||
|
|
@ -419,7 +419,7 @@
|
|||
<view class="padding-horizontal-main padding-top-main bg-base">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_wholesale_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plugins-wholesale-container">
|
||||
|
|
@ -447,7 +447,7 @@
|
|||
<view class="padding-horizontal-main padding-top-main bg-base">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_coupon_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plugins-coupon-container padding-bottom-main">
|
||||
|
|
@ -482,7 +482,7 @@
|
|||
<view class="padding-horizontal-main padding-top-main bg-base">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_realstore_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plugins-realstore-popup">
|
||||
|
|
@ -501,7 +501,7 @@
|
|||
<view class="padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_goodsservice_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plugins-goodsservice-container">
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
<!-- 限时秒杀 - 插件 -->
|
||||
<view v-if="pv.plugins == 'seckill' && (plugins_seckill_data || null) != null && (plugins_seckill_data.data || null) != null && (plugins_seckill_data.data.goods || null) != null && plugins_seckill_data.data.goods.length > 0" class="plugins-seckill-data border-radius-main padding-horizontal-main spacing-mb" :style="'background: url('+plugins_seckill_data.data.home_bg+') top/100% no-repeat;'">
|
||||
<view class="spacing-nav-title">
|
||||
<view class="spacing-nav-title">
|
||||
<image class="dis-inline-block va-m icon" :src="plugins_seckill_data.data.home_title_icon" mode="widthFix"></image>
|
||||
<view class="dis-inline-block va-m margin-left-sm">
|
||||
<component-countdown :propHour="plugins_seckill_data.data.time.hours" :propMinute="plugins_seckill_data.data.time.minutes" :propSecond="plugins_seckill_data.data.time.seconds"></component-countdown>
|
||||
|
|
@ -210,7 +210,9 @@
|
|||
<!-- 弹屏广告 - 插件 -->
|
||||
<view v-if="(plugins_popupscreen_data || null) != null && plugins_popupscreen_status == 1" class="plugins-popupscreen wh-auto ht-auto">
|
||||
<view class="content pr">
|
||||
<icon type="clear" size="46rpx" class="close pa cp" @tap.stop="plugins_popupscreen_close_event"></icon>
|
||||
<view class="close pa cp" @tap.stop="plugins_popupscreen_close_event">
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
<image class="dis-block auto" :src="plugins_popupscreen_data.images" mode="widthFix" :data-value="plugins_popupscreen_data.images_url || ''" @tap="url_event"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@
|
|||
<view class="bg-white padding-horizontal-main padding-top-main">
|
||||
<view class="fr oh">
|
||||
<view class="fr" @tap.stop="popup_image_verify_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-content margin-top-xxxl padding-top-xxl">
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="nav_type_list.length > 0" class="header bg-white">
|
||||
<!-- 导航 -->
|
||||
<view class="nav-base">
|
||||
<block v-for="(item, index) in nav_type_list" :key="index">
|
||||
<view v-if="nav_type_list.length > 0" class="header bg-white">
|
||||
<!-- 导航 -->
|
||||
<view class="nav-base">
|
||||
<block v-for="(item, index) in nav_type_list" :key="index">
|
||||
<view :class="'item fl tc cr-gray pr ' + (nav_type_index == index ? 'cr-main' : '')" :data-index="index" @tap="nav_event">
|
||||
<text>{{item.name}}</text>
|
||||
<view class="badge-icon pa">
|
||||
<component-badge :propNumber="item.count || 0"></component-badge>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 关键字搜索 -->
|
||||
<view class="padding-horizontal-main padding-bottom-main margin-top-xs">
|
||||
|
|
@ -19,21 +19,21 @@
|
|||
<button type="default" size="mini" class="br-main cr-white bg-main fr radius-0" @tap="search_submit_event">搜索</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<block v-if="data_list.length > 0">
|
||||
<view class="data-list padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b padding-bottom-main">
|
||||
<text class="cr-base">{{item.add_time_concise || item.add_time}}</text>
|
||||
<text :class="'fr '+((item.status == 4 ? 'cr-red' : (item.status == 3 ? 'cr-green' : (item.status == 2 ? 'cr-main' : 'cr-grey'))))">{{item.status_name}}</text>
|
||||
</view>
|
||||
<view class="content margin-top">
|
||||
<view class="single-text margin-top-sm">
|
||||
<text class="cr-gray">单号:</text>
|
||||
<text class="cr-base" data-event="copy" :data-value="item.main_order_no" @tap="text_event">{{item.main_order_no}}</text>
|
||||
<view class="data-list padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b padding-bottom-main">
|
||||
<text class="cr-base">{{item.add_time_concise || item.add_time}}</text>
|
||||
<text :class="'fr '+((item.status == 4 ? 'cr-red' : (item.status == 3 ? 'cr-green' : (item.status == 2 ? 'cr-main' : 'cr-grey'))))">{{item.status_name}}</text>
|
||||
</view>
|
||||
<view class="content margin-top">
|
||||
<view class="single-text margin-top-sm">
|
||||
<text class="cr-gray">单号:</text>
|
||||
<text class="cr-base" data-event="copy" :data-value="item.main_order_no" @tap="text_event">{{item.main_order_no}}</text>
|
||||
</view>
|
||||
<view v-if="(item.address_data || null) != null">
|
||||
<view class="single-text margin-top-sm">
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<view class="margin-top-lg padding-top-sm br-t-dashed">
|
||||
<text>{{item.describe}}</text>
|
||||
<text v-if="(item.distance || null) != null" class="fr cr-grey">距离您{{item.distance}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<button class="round bg-white br-base cr-base" type="default" size="mini" hover-class="none" :data-value="'/pages/plugins/delivery/order-detail/order-detail?id='+item.id" @tap="url_event">详情</button>
|
||||
|
|
@ -71,17 +71,17 @@
|
|||
<button class="round bg-white br-green cr-green" type="default" size="mini" hover-class="none" :data-index="index" @tap="success_delivery_event">完成配送</button>
|
||||
<button class="round bg-white br-red cr-red" type="default" size="mini" hover-class="none" :data-index="index" @tap="popup_abnormal_content_event">异常</button>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</block>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</block>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 异常订单原因填写 -->
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
<view class="padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_abnormal_content_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<form @submit="form_delivery_submit_event" class="form-container">
|
||||
|
|
@ -106,89 +106,89 @@
|
|||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</component-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
</component-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
|
||||
import componentBadge from "../../../../components/badge/badge";
|
||||
import componentPopup from "../../../../components/popup/popup";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: null,
|
||||
nav_type_list: [],
|
||||
import componentPopup from "../../../../components/popup/popup";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: null,
|
||||
nav_type_list: [],
|
||||
nav_type_index: 0,
|
||||
latitude: 0,
|
||||
longitude: 0,
|
||||
search_input_keywords_value: '',
|
||||
popup_abnormal_content_status: false,
|
||||
popup_abnormal_data_index: null
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
popup_abnormal_data_index: null
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentBadge,
|
||||
componentPopup
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
componentPopup
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
this.init();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 位置实时监听
|
||||
this.start_location_update();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
this.start_location_update();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
return false;
|
||||
// 初始化
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
// 位置权限、回调并获取数据
|
||||
app.globalData.get_location_check('scope.userLocation', this, 'location_back_handle');
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
app.globalData.get_location_check('scope.userLocation', this, 'location_back_handle');
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 位置实时监听
|
||||
|
|
@ -243,108 +243,108 @@
|
|||
self.get_data_list();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 是否加载中
|
||||
if(this.data_is_loading == 1) {
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
data_is_loading: 1,
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
|
||||
// 参数
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 是否加载中
|
||||
if(this.data_is_loading == 1) {
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
data_is_loading: 1,
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
|
||||
// 参数
|
||||
var type = (this.nav_type_list[this.nav_type_index] || null) == null ? -1 : this.nav_type_list[this.nav_type_index]['value'];
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "order", "delivery"),
|
||||
method: 'POST',
|
||||
data: {
|
||||
page: this.data_page,
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "order", "delivery"),
|
||||
method: 'POST',
|
||||
data: {
|
||||
page: this.data_page,
|
||||
type: type,
|
||||
keywords: this.search_input_keywords_value || '',
|
||||
lat: this.latitude,
|
||||
lng: this.longitude
|
||||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
lng: this.longitude
|
||||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data || [];
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
var data = res.data.data;
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data || [];
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
nav_type_list: data.nav_type_list || [],
|
||||
data_list: temp_data_list,
|
||||
data_total: data.total,
|
||||
data_page_total: data.page_total,
|
||||
data_list_loding_status: (temp_data_list.length > 0) ? 3 : 0,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: (this.data_page > 1 && this.data_page > this.data_page_total)
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_is_loading: 0
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0
|
||||
});
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_type_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
nav_type_list: data.nav_type_list || [],
|
||||
data_list: temp_data_list,
|
||||
data_total: data.total,
|
||||
data_page_total: data.page_total,
|
||||
data_list_loding_status: (temp_data_list.length > 0) ? 3 : 0,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: (this.data_page > 1 && this.data_page > this.data_page_total)
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_is_loading: 0
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0
|
||||
});
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_type_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// 文本事件
|
||||
|
|
@ -503,10 +503,10 @@
|
|||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './order.css';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './order.css';
|
||||
</style>
|
||||
|
|
@ -1,40 +1,40 @@
|
|||
<template>
|
||||
<template>
|
||||
<view class="page-bottom-fixed">
|
||||
<block v-if="data_list_loding_status == 3">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="padding-main oh">
|
||||
<view class="form-gorup bg-white form-container-upload oh">
|
||||
<view class="form-gorup-title">图标<text class="form-group-tips">建议100*100px</text></view>
|
||||
<view class="oh">
|
||||
<view class="form-upload-data fl">
|
||||
<block v-if="(recommend_data.icon || null) != null">
|
||||
<view class="item fl">
|
||||
<text class="delete-icon" @tap="upload_delete_event">x</text>
|
||||
<image :src="recommend_data.icon" @tap="upload_show_event" mode="aspectFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<image class="upload-icon" :src="common_static_url+'upload-icon.png'" mode="aspectFill" @tap="file_upload_event"></image>
|
||||
</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="title" :value="recommend_data.title || ''" placeholder-class="cr-grey" class="cr-base" placeholder="标题格式1~60个字符">
|
||||
</view>
|
||||
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">描述</view>
|
||||
<input type="text" name="describe" :value="recommend_data.describe || ''" placeholder-class="cr-grey" class="cr-base" placeholder="描述格式最多200个字符">
|
||||
<block v-if="data_list_loding_status == 3">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="padding-main oh">
|
||||
<view class="form-gorup bg-white form-container-upload oh">
|
||||
<view class="form-gorup-title">图标<text class="form-group-tips">建议100*100px</text></view>
|
||||
<view class="oh">
|
||||
<view class="form-upload-data fl">
|
||||
<block v-if="(recommend_data.icon || null) != null">
|
||||
<view class="item fl">
|
||||
<text class="delete-icon" @tap="upload_delete_event">x</text>
|
||||
<image :src="recommend_data.icon" @tap="upload_show_event" mode="aspectFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<image class="upload-icon" :src="common_static_url+'upload-icon.png'" mode="aspectFill" @tap="file_upload_event"></image>
|
||||
</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="title" :value="recommend_data.title || ''" placeholder-class="cr-grey" class="cr-base" placeholder="标题格式1~60个字符">
|
||||
</view>
|
||||
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">描述</view>
|
||||
<input type="text" name="describe" :value="recommend_data.describe || ''" placeholder-class="cr-grey" class="cr-base" placeholder="描述格式最多200个字符">
|
||||
</view>
|
||||
|
||||
<view class="form-gorup anonymous">
|
||||
<view class="form-gorup-title">是否启用</view>
|
||||
<switch name="is_enable" style="transform:scale(0.9)" class="margin-top-sm" :checked="recommend_data.is_enable == 1"></switch>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">关联商品<text class="form-group-tips-must">*</text></view>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">关联商品<text class="form-group-tips-must">*</text></view>
|
||||
<view v-if="(recommend_data.detail_list || null) != null && recommend_data.detail_list.length > 0" class="margin-top-lg view-goods-list">
|
||||
<block v-for="(item, index) in recommend_data.detail_list" :key="index">
|
||||
<view :class="'item oh pr '+(index > 0 ? 'br-t-dashed padding-top-lg margin-top-lg' : '')">
|
||||
|
|
@ -55,13 +55,13 @@
|
|||
</view>
|
||||
<view class="margin-top-sm padding-vertical-main">
|
||||
<text class="br-dashed-gray cr-base text-size-sm padding-horizontal-main padding-top-xs padding-bottom-xs round cp" @tap="goods_add_event">+ 选择商品</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-fixed padding-main">
|
||||
<button class="bg-main br-main cr-white round text-size" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-fixed padding-main">
|
||||
<button class="bg-main br-main cr-white round text-size" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
<!-- 商品选择弹窗 -->
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<view class="padding-horizontal-main">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_goods_choice_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -115,24 +115,24 @@
|
|||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../../../common/js/lib/base64.js';
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentPopup from "../../../../components/popup/popup";
|
||||
import componentGoodsSpecChoice from "../../../../components/goods-spec-choice/goods-spec-choice";
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
common_static_url: common_static_url,
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
recommend_data: {},
|
||||
import componentGoodsSpecChoice from "../../../../components/goods-spec-choice/goods-spec-choice";
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
common_static_url: common_static_url,
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
recommend_data: {},
|
||||
form_submit_disabled_status: false,
|
||||
currency_symbol: app.globalData.currency_symbol(),
|
||||
// 商品选择弹窗
|
||||
|
|
@ -142,21 +142,21 @@
|
|||
popup_keywords_value: '',
|
||||
popup_search_goods_list: [],
|
||||
search_data_list_loding_status: 1,
|
||||
search_data_list_loding_msg: '请先搜索数据!'
|
||||
};
|
||||
},
|
||||
|
||||
search_data_list_loding_msg: '请先搜索数据!'
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentPopup,
|
||||
componentGoodsSpecChoice
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
|
|
@ -167,85 +167,85 @@
|
|||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, "init");
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: '请先绑定手机号码'
|
||||
// 初始数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, "init");
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: '请先绑定手机号码'
|
||||
});
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
} else {
|
||||
if((this.params.id || null) != null) {
|
||||
if((this.params.id || null) != null) {
|
||||
this.get_data();
|
||||
} else {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 3
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: '请先授权用户信息'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 自提点信息
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("savedata", "recommend", "distribution"),
|
||||
method: 'POST',
|
||||
data: {id: this.params.id},
|
||||
dataType: 'json',
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: '请先授权用户信息'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 自提点信息
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("savedata", "recommend", "distribution"),
|
||||
method: 'POST',
|
||||
data: {id: this.params.id},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
// 如果存在分类则在最前面增加全部分类额度选项
|
||||
var goods_category_list = data.goods_category_list || [];
|
||||
if(goods_category_list.length > 0) {
|
||||
goods_category_list.unshift({id: null, name: '全部分类'});
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list_loding_status: 3,
|
||||
data_list_loding_status: 3,
|
||||
recommend_data: data.data || {},
|
||||
goods_category_list: goods_category_list,
|
||||
editor_path_type: data.editor_path_type || ''
|
||||
});
|
||||
goods_category_list: goods_category_list,
|
||||
editor_path_type: data.editor_path_type || ''
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: '获取数据失败'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
// 表单数据
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
// 表单数据
|
||||
var form_data = e.detail.value;
|
||||
|
||||
// 基础数据
|
||||
|
|
@ -266,7 +266,7 @@
|
|||
form_data['goods_data'] = encodeURIComponent(base64.encode(JSON.stringify(goods_data)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 校验参数并提交
|
||||
var validation = [
|
||||
|
|
@ -311,92 +311,92 @@
|
|||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 上传图片预览
|
||||
upload_show_event(e) {
|
||||
uni.previewImage({
|
||||
current: this.recommend_data.icon,
|
||||
urls: [this.recommend_data.icon]
|
||||
});
|
||||
},
|
||||
|
||||
// 图片删除
|
||||
upload_delete_event(e) {
|
||||
var self = this;
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '删除后不可恢复、继续吗?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
var temp_data = self.recommend_data || {};
|
||||
temp_data['icon'] = '';
|
||||
self.setData({
|
||||
recommend_data: temp_data
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 文件上传
|
||||
file_upload_event(e) {
|
||||
var self = this;
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success(res) {
|
||||
var success = 0;
|
||||
var fail = 0;
|
||||
var length = res.tempFilePaths.length;
|
||||
var count = 0;
|
||||
self.upload_one_by_one(res.tempFilePaths, success, fail, count, length);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 采用递归的方式上传多张
|
||||
upload_one_by_one(img_paths, success, fail, count, length) {
|
||||
var self = this;
|
||||
uni.uploadFile({
|
||||
url: app.globalData.get_request_url("index", "ueditor"),
|
||||
filePath: img_paths[count],
|
||||
name: 'upfile',
|
||||
formData: {
|
||||
action: 'uploadimage',
|
||||
path_type: self.editor_path_type
|
||||
},
|
||||
success: function(res) {
|
||||
success++;
|
||||
if (res.statusCode == 200) {
|
||||
var data = typeof res.data == 'object' ? res.data : JSON.parse(res.data);
|
||||
if (data.code == 0 && (data.data.url || null) != null) {
|
||||
var temp_data = self.recommend_data || {};
|
||||
temp_data['icon'] = data.data.url;
|
||||
self.setData({
|
||||
recommend_data: temp_data
|
||||
});
|
||||
} else {
|
||||
app.globalData.showToast(data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function(e) {
|
||||
fail++;
|
||||
},
|
||||
complete: function(e) {
|
||||
count++;
|
||||
|
||||
// 下一张
|
||||
if (count >= length) {
|
||||
// 上传完毕,作一下提示
|
||||
//app.showToast('上传成功' + success +'张', 'success');
|
||||
} else {
|
||||
// 递归调用,上传下一张
|
||||
self.upload_one_by_one(img_paths, success, fail, count, length);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 上传图片预览
|
||||
upload_show_event(e) {
|
||||
uni.previewImage({
|
||||
current: this.recommend_data.icon,
|
||||
urls: [this.recommend_data.icon]
|
||||
});
|
||||
},
|
||||
|
||||
// 图片删除
|
||||
upload_delete_event(e) {
|
||||
var self = this;
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '删除后不可恢复、继续吗?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
var temp_data = self.recommend_data || {};
|
||||
temp_data['icon'] = '';
|
||||
self.setData({
|
||||
recommend_data: temp_data
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 文件上传
|
||||
file_upload_event(e) {
|
||||
var self = this;
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success(res) {
|
||||
var success = 0;
|
||||
var fail = 0;
|
||||
var length = res.tempFilePaths.length;
|
||||
var count = 0;
|
||||
self.upload_one_by_one(res.tempFilePaths, success, fail, count, length);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 采用递归的方式上传多张
|
||||
upload_one_by_one(img_paths, success, fail, count, length) {
|
||||
var self = this;
|
||||
uni.uploadFile({
|
||||
url: app.globalData.get_request_url("index", "ueditor"),
|
||||
filePath: img_paths[count],
|
||||
name: 'upfile',
|
||||
formData: {
|
||||
action: 'uploadimage',
|
||||
path_type: self.editor_path_type
|
||||
},
|
||||
success: function(res) {
|
||||
success++;
|
||||
if (res.statusCode == 200) {
|
||||
var data = typeof res.data == 'object' ? res.data : JSON.parse(res.data);
|
||||
if (data.code == 0 && (data.data.url || null) != null) {
|
||||
var temp_data = self.recommend_data || {};
|
||||
temp_data['icon'] = data.data.url;
|
||||
self.setData({
|
||||
recommend_data: temp_data
|
||||
});
|
||||
} else {
|
||||
app.globalData.showToast(data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function(e) {
|
||||
fail++;
|
||||
},
|
||||
complete: function(e) {
|
||||
count++;
|
||||
|
||||
// 下一张
|
||||
if (count >= length) {
|
||||
// 上传完毕,作一下提示
|
||||
//app.showToast('上传成功' + success +'张', 'success');
|
||||
} else {
|
||||
// 递归调用,上传下一张
|
||||
self.upload_one_by_one(img_paths, success, fail, count, length);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 商品移除
|
||||
|
|
@ -563,10 +563,10 @@
|
|||
} else {
|
||||
app.globalData.showToast('已存在选择列表');
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './recommend-form.css';
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './recommend-form.css';
|
||||
</style>
|
||||
|
|
@ -38,53 +38,53 @@
|
|||
<view class="notice-content">
|
||||
<view v-for="(item, index) in data_base.user_center_notice" :key="index" class="item">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 数据统计 -->
|
||||
<view v-if="stats_user_promotion_data_list.length > 0 || stats_base_data_list.length > 0 || stats_profit_data_list.length > 0" class="padding-horizontal-main oh">
|
||||
<view class="stats-container padding-main border-radius-main bg-white pr spacing-mb">
|
||||
<view class="title border-color-main padding-left-lg text-size fw-b">基础统计</view>
|
||||
<button type="default" size="mini" class="br-gray cr-gray bg-white round arrow-bottom pa stats-switch-submit" @tap="popup_time_event">{{popup_time_value.name}}</button>
|
||||
<!-- 推广统计 -->
|
||||
<view v-if="stats_user_promotion_data_list.length > 0" class="stats-container-3 margin-top-lg oh tc">
|
||||
<block v-for="(item, index) in stats_user_promotion_data_list" :key="index">
|
||||
<view class="item fl padding-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view class="single-text margin-top-sm">
|
||||
<text :class="'fw-b text-size '+item.ent">{{item.value}}</text>
|
||||
<text v-if="(item.unit || null) != null" class="cr-grey text-size-xs margin-left-sm">人</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 基础统计 -->
|
||||
<view v-if="stats_base_data_list.length > 0" class="margin-top padding-top oh tc br-t-dashed">
|
||||
<block v-for="(item, index) in stats_base_data_list" :key="index">
|
||||
<view class="item fl padding-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view class="single-text margin-top-sm">
|
||||
<text :class="'fw-b text-size '+item.ent">{{((item.first || null) == null) ? '' : item.first}}{{item.value}}</text>
|
||||
<text v-if="(item.unit || null) != null" class="cr-grey text-size-xs margin-left-sm">人</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 返佣统计 -->
|
||||
<view v-if="stats_profit_data_list.length > 0" class="stats-container padding-main border-radius-main bg-white pr spacing-mb">
|
||||
<view class="title border-color-main padding-left-lg text-size fw-b">返佣统计</view>
|
||||
<view class="margin-top-lg oh tc">
|
||||
<block v-for="(item, index) in stats_profit_data_list" :key="index">
|
||||
<view class="item fl padding-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view class="single-text margin-top-sm">
|
||||
<text :class="'fw-b text-size '+item.ent">{{currency_symbol}}{{item.value}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 数据统计 -->
|
||||
<view v-if="stats_user_promotion_data_list.length > 0 || stats_base_data_list.length > 0 || stats_profit_data_list.length > 0" class="padding-horizontal-main oh">
|
||||
<view class="stats-container padding-main border-radius-main bg-white pr spacing-mb">
|
||||
<view class="title border-color-main padding-left-lg text-size fw-b">基础统计</view>
|
||||
<button type="default" size="mini" class="br-gray cr-gray bg-white round arrow-bottom pa stats-switch-submit" @tap="popup_time_event">{{popup_time_value.name}}</button>
|
||||
<!-- 推广统计 -->
|
||||
<view v-if="stats_user_promotion_data_list.length > 0" class="stats-container-3 margin-top-lg oh tc">
|
||||
<block v-for="(item, index) in stats_user_promotion_data_list" :key="index">
|
||||
<view class="item fl padding-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view class="single-text margin-top-sm">
|
||||
<text :class="'fw-b text-size '+item.ent">{{item.value}}</text>
|
||||
<text v-if="(item.unit || null) != null" class="cr-grey text-size-xs margin-left-sm">人</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 基础统计 -->
|
||||
<view v-if="stats_base_data_list.length > 0" class="margin-top padding-top oh tc br-t-dashed">
|
||||
<block v-for="(item, index) in stats_base_data_list" :key="index">
|
||||
<view class="item fl padding-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view class="single-text margin-top-sm">
|
||||
<text :class="'fw-b text-size '+item.ent">{{((item.first || null) == null) ? '' : item.first}}{{item.value}}</text>
|
||||
<text v-if="(item.unit || null) != null" class="cr-grey text-size-xs margin-left-sm">人</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 返佣统计 -->
|
||||
<view v-if="stats_profit_data_list.length > 0" class="stats-container padding-main border-radius-main bg-white pr spacing-mb">
|
||||
<view class="title border-color-main padding-left-lg text-size fw-b">返佣统计</view>
|
||||
<view class="margin-top-lg oh tc">
|
||||
<block v-for="(item, index) in stats_profit_data_list" :key="index">
|
||||
<view class="item fl padding-main">
|
||||
<view class="cr-base">{{item.name}}</view>
|
||||
<view class="single-text margin-top-sm">
|
||||
<text :class="'fw-b text-size '+item.ent">{{currency_symbol}}{{item.value}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 导航 -->
|
||||
|
|
@ -110,44 +110,44 @@
|
|||
<view v-if="(profit_ladder || null) != null" class="padding-horizontal-main padding-bottom-main">
|
||||
<text class="cr-blue">{{profit_ladder.msg}}</text>
|
||||
<navigator url="/pages/plugins/distribution/poster/poster" hover-class="none" class="bg-green cr-white dis-inline-block round padding-top-xs padding-bottom-xs padding-horizontal-main">去推广</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 时间选择弹窗 -->
|
||||
<component-popup :propShow="popup_time_status" propPosition="bottom" @onclose="popup_time_close_event">
|
||||
<view class="padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_time_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-time-container page-bottom-fixed">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view v-if="(time_data || null) != null" class="quit-time oh">
|
||||
<block v-for="(item, index) in time_data" :key="index">
|
||||
<view class="item fl padding-main bs-bb">
|
||||
<view class="br-gray cr-gray text-size-xs round padding-top-xs padding-bottom-xs padding-horizontal-main tc" :data-index="index" @tap="quit_time_event">{{item.name}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">开始时间</view>
|
||||
<view class="br-b">
|
||||
<uni-datetime-picker @change="time_start_change_event" v-model="popup_time_value.start" :border="false" :showFirstIcon="false" :hide-second="true" type="datetime" placeholder="开始时间" placeholder-class="cr-grey" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">结束时间</view>
|
||||
<view class="br-b">
|
||||
<uni-datetime-picker @change="time_end_change_event" v-model="popup_time_value.end" :border="false" :showFirstIcon="false" :hide-second="true" type="datetime" placeholder="结束时间" placeholder-class="cr-grey" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed padding-main">
|
||||
<button class="bg-main br-main cr-white round text-size" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">查询</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 时间选择弹窗 -->
|
||||
<component-popup :propShow="popup_time_status" propPosition="bottom" @onclose="popup_time_close_event">
|
||||
<view class="padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="close oh">
|
||||
<view class="fr" @tap.stop="popup_time_close_event">
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-time-container page-bottom-fixed">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view v-if="(time_data || null) != null" class="quit-time oh">
|
||||
<block v-for="(item, index) in time_data" :key="index">
|
||||
<view class="item fl padding-main bs-bb">
|
||||
<view class="br-gray cr-gray text-size-xs round padding-top-xs padding-bottom-xs padding-horizontal-main tc" :data-index="index" @tap="quit_time_event">{{item.name}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">开始时间</view>
|
||||
<view class="br-b">
|
||||
<uni-datetime-picker @change="time_start_change_event" v-model="popup_time_value.start" :border="false" :showFirstIcon="false" :hide-second="true" type="datetime" placeholder="开始时间" placeholder-class="cr-grey" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">结束时间</view>
|
||||
<view class="br-b">
|
||||
<uni-datetime-picker @change="time_end_change_event" v-model="popup_time_value.end" :border="false" :showFirstIcon="false" :hide-second="true" type="datetime" placeholder="结束时间" placeholder-class="cr-grey" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed padding-main">
|
||||
<button class="bg-main br-main cr-white round text-size" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">查询</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
</component-popup>
|
||||
</view>
|
||||
<view v-else>
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentPopup from "../../../../components/popup/popup";
|
||||
var currency_symbol = app.globalData.currency_symbol();
|
||||
export default {
|
||||
|
|
@ -166,31 +166,31 @@
|
|||
return {
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
currency_symbol: currency_symbol,
|
||||
avatar: app.globalData.data.default_user_head_src,
|
||||
data_list_loding_msg: '',
|
||||
currency_symbol: currency_symbol,
|
||||
avatar: app.globalData.data.default_user_head_src,
|
||||
nickname: '用户名',
|
||||
data_base: null,
|
||||
user_level: null,
|
||||
extraction: null,
|
||||
superior: null,
|
||||
profit_ladder: null,
|
||||
nav_list: [],
|
||||
time_data: null,
|
||||
base_data: null,
|
||||
user_promotion_data: null,
|
||||
profit_data: null,
|
||||
stats_user_promotion_data_list: [],
|
||||
stats_base_data_list: [],
|
||||
stats_profit_data_list: [],
|
||||
popup_time_status: false,
|
||||
form_submit_disabled_status: false,
|
||||
nav_list: [],
|
||||
time_data: null,
|
||||
base_data: null,
|
||||
user_promotion_data: null,
|
||||
profit_data: null,
|
||||
stats_user_promotion_data_list: [],
|
||||
stats_base_data_list: [],
|
||||
stats_profit_data_list: [],
|
||||
popup_time_status: false,
|
||||
form_submit_disabled_status: false,
|
||||
popup_time_value: {name: '自定义', start: '', end: '', index: ''},
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentNoData,
|
||||
componentPopup
|
||||
},
|
||||
props: {},
|
||||
|
|
@ -257,15 +257,15 @@
|
|||
success: res => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
// 选择时间处理
|
||||
var time_data = data.time_data || null;
|
||||
var temp_value = this.popup_time_value;
|
||||
if(time_data != null) {
|
||||
var temp = time_data[data.default_day];
|
||||
temp_value.start = temp.start;
|
||||
temp_value.end = temp.end;
|
||||
temp_value.name = temp.name;
|
||||
var data = res.data.data;
|
||||
// 选择时间处理
|
||||
var time_data = data.time_data || null;
|
||||
var temp_value = this.popup_time_value;
|
||||
if(time_data != null) {
|
||||
var temp = time_data[data.default_day];
|
||||
temp_value.start = temp.start;
|
||||
temp_value.end = temp.end;
|
||||
temp_value.name = temp.name;
|
||||
}
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
|
|
@ -273,11 +273,11 @@
|
|||
extraction: data.extraction || null,
|
||||
superior: data.superior || null,
|
||||
profit_ladder: data.profit_ladder || null,
|
||||
nav_list: data.nav_list || [],
|
||||
time_data: time_data,
|
||||
stats_user_promotion_data_list: data.stats_user_promotion_data_list || [],
|
||||
stats_base_data_list: data.stats_base_data_list || [],
|
||||
stats_profit_data_list: data.stats_profit_data_list || [],
|
||||
nav_list: data.nav_list || [],
|
||||
time_data: time_data,
|
||||
stats_user_promotion_data_list: data.stats_user_promotion_data_list || [],
|
||||
stats_base_data_list: data.stats_base_data_list || [],
|
||||
stats_profit_data_list: data.stats_profit_data_list || [],
|
||||
popup_time_value: temp_value,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
|
|
@ -321,100 +321,100 @@
|
|||
this.setData({
|
||||
avatar: app.globalData.data.default_user_head_src
|
||||
});
|
||||
},
|
||||
|
||||
// 时间选择开启弹层
|
||||
popup_time_event(e) {
|
||||
this.setData({
|
||||
popup_time_status: true
|
||||
});
|
||||
},
|
||||
|
||||
// 时间选择关闭弹层
|
||||
popup_time_close_event(e) {
|
||||
this.setData({
|
||||
popup_time_status: false
|
||||
});
|
||||
},
|
||||
|
||||
// 时间快捷选择
|
||||
quit_time_event(e) {
|
||||
var index = e.currentTarget.dataset.index;
|
||||
var item = this.time_data[index];
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.start = item.start;
|
||||
temp_value.end = item.end;
|
||||
temp_value.index = index;
|
||||
this.setData({
|
||||
popup_time_value: temp_value
|
||||
});
|
||||
},
|
||||
|
||||
// 自定义开始时间事件
|
||||
time_start_change_event(e) {
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.start = e;
|
||||
temp_value.index = '';
|
||||
this.setData({
|
||||
popup_time_value: temp_value
|
||||
});
|
||||
},
|
||||
|
||||
// 自定义结束时间事件
|
||||
time_end_change_event(e) {
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.end = e;
|
||||
temp_value.index = '';
|
||||
this.setData({
|
||||
popup_time_value: temp_value
|
||||
});
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
this.setData({
|
||||
form_submit_disabled_status: true
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '查询中...'
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("stats", "user", "distribution"),
|
||||
method: 'POST',
|
||||
data: this.popup_time_value,
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.name = (temp_value.index || null) == null ? (((temp_value.start || null) == null && (temp_value.end || null) == null) ? '全部' : '自定义') : this.time_data[temp_value.index]['name'];
|
||||
this.setData({
|
||||
popup_time_status: false,
|
||||
form_submit_disabled_status: false,
|
||||
stats_user_promotion_data_list: data.stats_user_promotion_data_list || [],
|
||||
stats_base_data_list: data.stats_base_data_list || [],
|
||||
popup_time_value: temp_value,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast('提交失败,请重试!');
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 时间选择开启弹层
|
||||
popup_time_event(e) {
|
||||
this.setData({
|
||||
popup_time_status: true
|
||||
});
|
||||
},
|
||||
|
||||
// 时间选择关闭弹层
|
||||
popup_time_close_event(e) {
|
||||
this.setData({
|
||||
popup_time_status: false
|
||||
});
|
||||
},
|
||||
|
||||
// 时间快捷选择
|
||||
quit_time_event(e) {
|
||||
var index = e.currentTarget.dataset.index;
|
||||
var item = this.time_data[index];
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.start = item.start;
|
||||
temp_value.end = item.end;
|
||||
temp_value.index = index;
|
||||
this.setData({
|
||||
popup_time_value: temp_value
|
||||
});
|
||||
},
|
||||
|
||||
// 自定义开始时间事件
|
||||
time_start_change_event(e) {
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.start = e;
|
||||
temp_value.index = '';
|
||||
this.setData({
|
||||
popup_time_value: temp_value
|
||||
});
|
||||
},
|
||||
|
||||
// 自定义结束时间事件
|
||||
time_end_change_event(e) {
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.end = e;
|
||||
temp_value.index = '';
|
||||
this.setData({
|
||||
popup_time_value: temp_value
|
||||
});
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
this.setData({
|
||||
form_submit_disabled_status: true
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '查询中...'
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("stats", "user", "distribution"),
|
||||
method: 'POST',
|
||||
data: this.popup_time_value,
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var temp_value = this.popup_time_value;
|
||||
temp_value.name = (temp_value.index || null) == null ? (((temp_value.start || null) == null && (temp_value.end || null) == null) ? '全部' : '自定义') : this.time_data[temp_value.index]['name'];
|
||||
this.setData({
|
||||
popup_time_status: false,
|
||||
form_submit_disabled_status: false,
|
||||
stats_user_promotion_data_list: data.stats_user_promotion_data_list || [],
|
||||
stats_base_data_list: data.stats_base_data_list || [],
|
||||
popup_time_value: temp_value,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast('提交失败,请重试!');
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<view class="content bg-white auto padding-xxxl pr radius">
|
||||
<view v-if="(data_base.is_home_choice_location_force || 0) == 0" class="close oh pa">
|
||||
<view @tap="location_tips_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-lg">
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
<view v-if="is_success_tips == 1" class="coming-tips-container am-text-center">
|
||||
<view class="coming-content tc pr">
|
||||
<view class="icon-close-submit pa" @tap="coming_success_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
<image :src="data.success_icon" mode="widthFix"></image>
|
||||
<view class="coming-tips-content pa">
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@
|
|||
<view class="delivery-popup bg-base padding-horizontal-main padding-top-main">
|
||||
<view class="fr oh">
|
||||
<view class="fr" @tap.stop="popup_delivery_close_event">
|
||||
<icon type="clear" size="46rpx"></icon>
|
||||
<uni-icons type="clear" size="46rpx" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-xxxl padding-top-xxl">
|
||||
|
|
|
|||
Loading…
Reference in New Issue