master
parent
a772797ef0
commit
2e07e8beac
|
|
@ -298,7 +298,7 @@
|
|||
</block>
|
||||
<view class="padding-main tc">
|
||||
<view class="dis-inline-block cp" data-value="/pages/plugins/realstore/search/search" @tap="url_event">
|
||||
<text class="cr-grey text-size-xs va-m">{{ $t('goods-list.goods-list.h3t0f1') }}</text>
|
||||
<text class="cr-grey text-size-xs va-m">{{ $t('common.view_more') }}</text>
|
||||
<view class="dis-inline-block va-m margin-left-xs">
|
||||
<iconfont name="icon-arrow-right" size="24rpx" propClass="lh-il cr-grey"></iconfont>
|
||||
</view>
|
||||
|
|
@ -1303,8 +1303,8 @@
|
|||
.scroll-box.realstore .content {
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
.scroll-box.cart .content {
|
||||
padding-bottom: 260rpx;
|
||||
.scroll-box.cart .content {
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
.scroll-box.cart.realstore .content {
|
||||
padding-bottom: 120rpx;
|
||||
|
|
|
|||
|
|
@ -2,16 +2,25 @@
|
|||
<view :class="theme_view">
|
||||
<!-- 简洁的数据,一般列表展示使用 -->
|
||||
<view v-if="propIsTerse" class="content margin-top cp">
|
||||
<block v-if="propData != null && propDataField.length > 0">
|
||||
<view v-for="(item, index) in propDataField" :key="index">
|
||||
<view class="single-text margin-top-xs">
|
||||
<block v-if="data != null && data_field.length > 0">
|
||||
<view v-for="(item, index) in data_field" :key="index">
|
||||
<view v-if="(item.is_hide || 0) == 0 " class="single-text margin-top-xs">
|
||||
<text class="cr-grey margin-right-xl">{{ item.name }}</text>
|
||||
<text class="cr-base">{{ propData[item.field] }}</text>
|
||||
<view v-if="(item.is_copy || 0) == 1" class="dis-inline-block margin-left" data-event="copy" :data-value="propData[item.field]" @tap.stop="text_event_handle">
|
||||
<text class="cr-base">
|
||||
<block v-if="item.type == 'images'">
|
||||
<image :src="data[item.field]" mode="aspectFit" class="radius panel-item-images"></image>
|
||||
</block>
|
||||
<text v-else>{{ data[item.field] }}</text>
|
||||
</text>
|
||||
<view v-if="(item.is_copy || 0) == 1" class="dis-inline-block margin-left" data-event="copy" :data-value="data[item.field]" @tap.stop="text_event_handle">
|
||||
<iconfont name="icon-copy" size="28rpx" class="cr-grey"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="propIsItemShowMax > 0 && propIsItemShowMax < data_field.length" @tap="item_more_event" class="margin-top-sm tc">
|
||||
<text class="cr-grey-c margin-right-sm">{{$t('common.view_more')}}</text>
|
||||
<iconfont :name="'icon-arrow-'+(more_status ? 'top' : 'bottom')" size="28rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
</block>
|
||||
<slot></slot>
|
||||
</view>
|
||||
|
|
@ -20,16 +29,25 @@
|
|||
<view class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view v-if="(propTitle || null) != null" class="br-b padding-bottom-main fw-b text-size">{{propTitle}}</view>
|
||||
<view class="panel-content oh">
|
||||
<block v-if="propData != null && propDataField.length > 0">
|
||||
<view v-for="(item, index) in propDataField" :key="index" class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">
|
||||
<text>{{ propData[item.field] }}</text>
|
||||
<view v-if="(item.is_copy || 0) == 1" class="dis-inline-block margin-left" data-event="copy" :data-value="propData[item.field]" @tap.stop="text_event_handle">
|
||||
<iconfont name="icon-copy" size="28rpx" class="cr-grey lh-il"></iconfont>
|
||||
<block v-if="data != null && data_field.length > 0">
|
||||
<view v-for="(item, index) in data_field" :key="index">
|
||||
<view v-if="(item.is_hide || 0) == 0 " class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">
|
||||
<block v-if="item.type == 'images'">
|
||||
<image :src="data[item.field]" mode="aspectFit" class="panel-item-images"></image>
|
||||
</block>
|
||||
<text v-else>{{ data[item.field] }}</text>
|
||||
<view v-if="(item.is_copy || 0) == 1" class="dis-inline-block margin-left" data-event="copy" :data-value="data[item.field]" @tap.stop="text_event_handle">
|
||||
<iconfont name="icon-copy" size="28rpx" class="cr-grey lh-il"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="propIsItemShowMax > 0 && propIsItemShowMax < data_field.length" @tap="item_more_event" class="margin-top-sm tc">
|
||||
<text class="cr-grey-c margin-right-sm">{{$t('common.view_more')}}</text>
|
||||
<iconfont :name="'icon-arrow-'+(more_status ? 'top' : 'bottom')" size="28rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
</block>
|
||||
<slot></slot>
|
||||
</view>
|
||||
|
|
@ -44,6 +62,9 @@
|
|||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data: null,
|
||||
data_field: [],
|
||||
more_status: false
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
|
@ -65,6 +86,11 @@
|
|||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
// 数据项最大展示数量(0则显示全部)
|
||||
propIsItemShowMax: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
// 无数据提示状态
|
||||
propNoDataStatus: {
|
||||
type: [Number, String],
|
||||
|
|
@ -81,12 +107,55 @@
|
|||
default: false,
|
||||
}
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
// 数据改变
|
||||
propData(value, old_value) {
|
||||
this.data = this.value;
|
||||
},
|
||||
|
||||
// 字段改变
|
||||
propDataField(value, old_value) {
|
||||
this.data_field = this.value;
|
||||
}
|
||||
},
|
||||
// 页面被展示
|
||||
created: function(e) {
|
||||
this.setData({
|
||||
data: this.propData
|
||||
});
|
||||
this.data_field_handle(this.propDataField);
|
||||
},
|
||||
methods: {
|
||||
// 数据字段处理
|
||||
data_field_handle(data) {
|
||||
var temp_data = data;
|
||||
for(var i in temp_data) {
|
||||
temp_data[i]['is_hide'] = (temp_data[i]['is_hide'] || 0) == 0 ? ((i >= this.propIsItemShowMax && this.propIsItemShowMax > 0) ? 1 : 0) : 0;
|
||||
}
|
||||
this.setData({
|
||||
data_field: temp_data
|
||||
});
|
||||
},
|
||||
|
||||
// 文本事件
|
||||
text_event_handle(e) {
|
||||
app.globalData.text_event_handle(e);
|
||||
},
|
||||
|
||||
// 数据项更多事件
|
||||
item_more_event(e) {
|
||||
this.data_field_handle(this.data_field);
|
||||
this.setData({
|
||||
more_status: !this.more_status
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
<style scoped>
|
||||
.panel-item-images {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
"gift": "Gift",
|
||||
"more": "More",
|
||||
"more_null": "",
|
||||
"view_more": "View more",
|
||||
"search": "Search",
|
||||
"num": "quantity",
|
||||
"order": "order form",
|
||||
|
|
@ -111,7 +112,7 @@
|
|||
"plugins-membershiplevelvip-order-detail": "Order details",
|
||||
"plugins-membershiplevelvip-profit": "Revenue details",
|
||||
"plugins-membershiplevelvip-profit-detail": "Revenue details",
|
||||
"plugins-membershiplevelvip-poster": "Promotion rebate",
|
||||
"plugins-membershiplevelvip-poster": "Promotion rewards",
|
||||
"plugins-membershiplevelvip-team": "My team",
|
||||
"plugins-membershiplevelvip-member-code": "Membership code",
|
||||
"plugins-distribution-user": "My Distribution",
|
||||
|
|
@ -124,7 +125,7 @@
|
|||
"plugins-distribution-recommend-list": "My Recommended Treasure",
|
||||
"plugins-distribution-recommend-detail": "Recommended Treasure Details",
|
||||
"plugins-distribution-recommend-form": "Recommended Treasure Add/Edit",
|
||||
"plugins-distribution-poster": "Promotion rebate",
|
||||
"plugins-distribution-poster": "Promotion rewards",
|
||||
"plugins-distribution-extraction": "Pickup point",
|
||||
"plugins-distribution-extraction-apply": "Pickup point information",
|
||||
"plugins-distribution-extraction-order": "Pickup order",
|
||||
|
|
@ -734,7 +735,6 @@
|
|||
"rw12i7": "answer",
|
||||
"278qr1": "View All",
|
||||
"8y3cc7": "Answers",
|
||||
"h3t0f1": "View more",
|
||||
"aem3e6": "Put away the answer",
|
||||
"nr77jf": "There is currently no source of goods available"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
"gift": "礼物",
|
||||
"more": "更多",
|
||||
"more_null": "更 多",
|
||||
"view_more": "查看更多",
|
||||
"search": "搜索",
|
||||
"num": "数量",
|
||||
"order": "订单",
|
||||
|
|
@ -113,7 +114,7 @@
|
|||
"plugins-membershiplevelvip-order-detail": "订单详情",
|
||||
"plugins-membershiplevelvip-profit": "收益明细",
|
||||
"plugins-membershiplevelvip-profit-detail": "收益详情",
|
||||
"plugins-membershiplevelvip-poster": "推广返利",
|
||||
"plugins-membershiplevelvip-poster": "推广奖励",
|
||||
"plugins-membershiplevelvip-team": "我的团队",
|
||||
"plugins-membershiplevelvip-member-code": "会员码",
|
||||
"plugins-distribution-user": "我的分销",
|
||||
|
|
@ -126,7 +127,7 @@
|
|||
"plugins-distribution-recommend-list": "我的推荐宝",
|
||||
"plugins-distribution-recommend-detail": "推荐宝详情",
|
||||
"plugins-distribution-recommend-form": "推荐宝添加/编辑",
|
||||
"plugins-distribution-poster": "推广返利",
|
||||
"plugins-distribution-poster": "推广奖励",
|
||||
"plugins-distribution-extraction": "取货点",
|
||||
"plugins-distribution-extraction-apply": "取货点信息",
|
||||
"plugins-distribution-extraction-order": "取货订单",
|
||||
|
|
@ -724,7 +725,6 @@
|
|||
"rw12i7": "答",
|
||||
"278qr1": "查看全部",
|
||||
"8y3cc7": "个回答",
|
||||
"h3t0f1": "查看更多",
|
||||
"aem3e6": "收起回答",
|
||||
"nr77jf": "暂无货源"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1608,13 +1608,6 @@
|
|||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "gift-detail/gift-detail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "code/code",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
</block>
|
||||
<view v-if="item.comments_count > 0" class="more flex-row jc-e align-c br-t-f9 padding-top-main">
|
||||
<view v-if="(item.hide_more || false) === false && ((item.hide_comments_list_num === 0 && !item.bool_more) || (item.hide_comments_list_num == undefined || item.hide_comments_list_num > 0))" class="cr-red text-size-xs" @tap="open_more(item.id, index)">
|
||||
<text v-if="item.hide_comments_list_num === 0 && !item.bool_more">{{$t('goods-list.goods-list.h3t0f1')}}</text>
|
||||
<text v-if="item.hide_comments_list_num === 0 && !item.bool_more">{{$t('common.view_more')}}</text>
|
||||
<text v-if="item.hide_comments_list_num == undefined || item.hide_comments_list_num > 0">{{$t('goods-list.goods-list.278qr1')}}{{ item.hide_comments_list_num || item.comments_count }}{{$t('goods-list.goods-list.8y3cc7')}}</text>
|
||||
<iconfont :name="item.bool_more ? 'icon-arrow-bottom' : 'icon-arrow-top'" size="24rpx" propClass="pr top-xs"></iconfont>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* 用户
|
||||
*/
|
||||
.user-images {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
|
@ -1,8 +1,282 @@
|
|||
<template>
|
||||
</template>
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<!-- 导航 -->
|
||||
<view class="nav-base bg-white flex-row jc-sa align-c">
|
||||
<block v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view :class="'item fl tc ' + (nav_status_index == index ? 'cr-main nav-active-line' : '')" :data-index="index" @tap="nav_event">{{ item.name }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box scroll-box-ece-nav" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view v-if="data_list.length > 0" 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">
|
||||
<block v-if="(item.use_user || null) != null">
|
||||
<image :src="item.use_user.avatar" mode="aspectFill" class="radius user-images dis-inline-block va-m"></image>
|
||||
<text class="va-m margin-left-sm">{{item.use_user.user_name_view}}</text>
|
||||
</block>
|
||||
<text class="fr cr-main">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<component-panel-content :propData="item" :propDataField="content_field_list" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view v-if="item.status == 0" class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<button class="round bg-white cr-green br-green" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/givegift/receive/receive?code='+item.code" hover-class="none">{{$t('common.link')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentPanelContent from "@/components/panel-content/panel-content";
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
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,
|
||||
content_field_list: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
componentPanelContent,
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
props: {},
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 是否指定状态
|
||||
var nav_status_index = 0;
|
||||
if ((params.status || null) != null) {
|
||||
for (var i in this.nav_status_list) {
|
||||
if (this.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() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
// 下拉刷新
|
||||
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) {
|
||||
this.get_data();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
<script>
|
||||
// 获取公共数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('init', 'giftcode', 'givegift'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
nav_status_list: data.nav_status_list || [],
|
||||
content_field_list: data.content_field_list || [],
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list();
|
||||
} else {
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_base')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 列表数据
|
||||
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
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
|
||||
// 请求数据
|
||||
var data = {...this.params, ...{
|
||||
page: this.data_page,
|
||||
}};
|
||||
|
||||
// 状态
|
||||
var status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
if (status != -1) {
|
||||
data['status'] = status;
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'giftcode', 'givegift'),
|
||||
method: 'POST',
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
if (data.data_list.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data_list;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = data.data_list;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: data.data_total,
|
||||
data_page_total: data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
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_list: [],
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
}
|
||||
} 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: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1,
|
||||
data_list: [],
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style>
|
||||
@import './code.css';
|
||||
</style>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
/**
|
||||
* 商品
|
||||
*/
|
||||
.goods-images {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
}
|
||||
.goods-title {
|
||||
width: calc(100% - 90rpx);
|
||||
}
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<block v-if="detail != null">
|
||||
<!-- 商品数据 -->
|
||||
<component-panel-content :propTitle="$t('recommend-list.recommend-list.x74z3o')">
|
||||
<view class="oh padding-top-main padding-bottom-sm" :data-value="detail.goods.goods_url" @tap="url_event">
|
||||
<image :src="detail.goods.images" mode="aspectFill" class="radius goods-images fl"></image>
|
||||
<view class="goods-title multi-text fr">{{detail.goods.title}}</view>
|
||||
</view>
|
||||
</component-panel-content>
|
||||
<!-- 详情数据 -->
|
||||
<component-panel-content :propData="detail" :propDataField="form_field_data" :propTitle="$t('common.detail_text')"></component-panel-content>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentPanelContent from "@/components/panel-content/panel-content";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
data_bottom_line_status: false,
|
||||
detail: null,
|
||||
form_field_data: []
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentPanelContent,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("detail", "gift", "givegift"),
|
||||
method: "POST",
|
||||
data: this.params,
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
detail: data.data || null,
|
||||
form_field_data: data.form_field_data || [],
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: "",
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, "init")) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './gift-detail.css';
|
||||
</style>
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
<text class="cr-base">{{ item.add_time }}</text>
|
||||
<text class="fr cr-main">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/givegift/gift-detail/gift-detail?id=' + item.id" @tap="url_event" class="margin-top">
|
||||
<view class="oh">
|
||||
<view class="margin-top">
|
||||
<view class="oh" :data-value="item.goods.goods_url" @tap="url_event">
|
||||
<image :src="item.goods.images" mode="aspectFill" class="radius goods-images fl"></image>
|
||||
<view class="goods-title multi-text fr">{{item.goods.title}}</view>
|
||||
</view>
|
||||
<component-panel-content :propData="item" :propDataField="content_field_list" :propIsTerse="true"></component-panel-content>
|
||||
<component-panel-content :propData="item" :propDataField="content_field_list" propIsItemShowMax="6" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<button class="round bg-white cr-base br-grey" type="default" size="mini" @tap="popup_edit_open_event" :data-index="index" hover-class="none">{{$t('common.edit')}}</button>
|
||||
|
|
@ -122,7 +122,10 @@
|
|||
edit_data: null,
|
||||
popup_edit_status: false,
|
||||
edit_item_index: 0,
|
||||
form_submit_disabled_status: false,
|
||||
form_submit_disabled_status: false,
|
||||
nav_status_list: [],
|
||||
nav_status_index: 0,
|
||||
content_field_list: [],
|
||||
// 支付弹窗参数
|
||||
pay_url: '',
|
||||
qrcode_url: '',
|
||||
|
|
@ -133,9 +136,6 @@
|
|||
default_payment_id: 0,
|
||||
is_show_payment_popup: false,
|
||||
pay_price: 0,
|
||||
nav_status_list: [],
|
||||
nav_status_index: 0,
|
||||
content_field_list: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue