From 41eb15084c37ad11a1c7e9be55415dac192df287 Mon Sep 17 00:00:00 2001
From: sws <1141121512@qq.com>
Date: Wed, 13 Sep 2023 14:01:36 +0800
Subject: [PATCH] =?UTF-8?q?1=E7=A7=AF=E5=88=86+=E5=BA=97=E9=93=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 7 +-
common/css/page.css | 7 +-
components/goods-list/goods-list.vue | 688 ++++++++++++++------------
components/title/title.vue | 53 ++
pages.json | 1 -
pages/plugins/points/index/index.css | 87 ++--
pages/plugins/points/index/index.vue | 253 +++++++---
pages/plugins/seckill/index/index.css | 3 +-
pages/plugins/seckill/index/index.vue | 56 ++-
pages/plugins/shop/detail/detail.css | 99 ++--
pages/plugins/shop/detail/detail.vue | 174 ++++---
pages/plugins/shop/index/index.vue | 54 +-
pages/user-integral/user-integral.css | 10 +-
pages/user-integral/user-integral.vue | 44 +-
14 files changed, 888 insertions(+), 648 deletions(-)
create mode 100644 components/title/title.vue
diff --git a/App.vue b/App.vue
index 46f0d6ee..37cac98e 100644
--- a/App.vue
+++ b/App.vue
@@ -1198,7 +1198,7 @@
return this.data.static_url + 'static/plugins/images/' + type + '/';
} else {
// 根据配置的静态url地址+主题标识+参数类型组合远程静态文件地址
- return this.data.static_url + 'static/app/' + this.data.default_theme + '/' + type + '/';
+ return this.data.static_url + 'static/app/' + this.get_theme_value() + '/' + type + '/';
}
},
// rpx转px
@@ -1726,12 +1726,13 @@
// 蓝色 blue #1677ff
// 棕色 brown #8B4513
// 紫色 purple #623cec
- var default_theme = 'brown';
+ var default_theme = 'blue';
return uni.getStorageSync('theme') || default_theme;
},
// 设置主题
set_theme_value() {
let theme = this.get_theme_value();
+ console.log(theme);
// import `@/common/theme/theme-${mode}.scss`; //记住不能import哦
require(`./common/css/theme/${theme}.css`);
},
@@ -1793,6 +1794,8 @@
// 协议验证处理
this.globalData.weixin_privacy_setting();
// #endif
+ // 主题设置
+ this.globalData.set_theme_value();
},
// 从前台进入后台
onHide() {
diff --git a/common/css/page.css b/common/css/page.css
index d454e496..c6068d44 100644
--- a/common/css/page.css
+++ b/common/css/page.css
@@ -977,11 +977,6 @@ button[disabled].bg-gray {
right: 8rpx;
}
-.goods-list .right-cart-icon {
- bottom: 8rpx;
- right: 20rpx;
-}
-
.goods-list .error-msg {
position: absolute;
top: 0;
@@ -1044,7 +1039,7 @@ button[disabled].bg-gray {
.goods-data-grid-list .item {
width: calc(50% - 10rpx);
float: left;
- padding-bottom: 10rpx;
+ padding-bottom: 20rpx;
margin-bottom: 20rpx;
}
diff --git a/components/goods-list/goods-list.vue b/components/goods-list/goods-list.vue
index e81238ec..8d98c2c3 100644
--- a/components/goods-list/goods-list.vue
+++ b/components/goods-list/goods-list.vue
@@ -1,320 +1,370 @@
-
-
-
-
-
- {{data.title}}
- {{data.vice_title}}
-
- 更多
-
-
-
-
-
-
-
-
-
- {{item.error_msg}}
-
- {{item.title}}
- {{item.simple_desc}}
-
- {{item.price_icon}}
- {{propCurrencySymbol}}
- {{item[propPriceField]}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{lv.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.error_msg}}
-
- {{item.title}}
-
-
- {{item.price_icon}}
- {{propCurrencySymbol}}
- {{item[propPriceField]}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{lv.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.error_msg}}
-
- {{item.title}}
-
-
- {{item.price_icon}}
- {{propCurrencySymbol}}
- {{item[propPriceField]}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{lv.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/title/title.vue b/components/title/title.vue
new file mode 100644
index 00000000..96efc25c
--- /dev/null
+++ b/components/title/title.vue
@@ -0,0 +1,53 @@
+
+
+
+
+ {{propTitle}}
+ {{propViceTitle}}
+
+ {{propMore}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 98313bc7..45e1d323 100644
--- a/pages.json
+++ b/pages.json
@@ -780,7 +780,6 @@
{
"path": "detail/detail",
"style": {
- "enablePullDownRefresh": true,
"navigationBarTitleText": "店铺首页"
}
},
diff --git a/pages/plugins/points/index/index.css b/pages/plugins/points/index/index.css
index e7ebf8f8..ce1619d5 100644
--- a/pages/plugins/points/index/index.css
+++ b/pages/plugins/points/index/index.css
@@ -1,51 +1,68 @@
/**
* 顶部
*/
+.points-content {
+ padding-top: 448rpx;
+}
+
.points-user {
- background-color: #fe3e28;
- padding: 80rpx 0 100rpx 0;
+ padding: 28rpx;
}
+
.points-user .avatar {
- width: 160rpx;
- height: 160rpx;
- margin: 0 auto;
+ width: 100rpx;
+ height: 100rpx;
}
-.points-user .desc {
- color: #ffe7b2;
-}
-.points-user .login-submit {
- color: #5eb95e;
- background-color: #E4F3E4;
- border-color: #d2e8d2;
+
+.points-user .share-submit {
+ width: 112rpx;
+ height: 52rpx;
+ line-height: 52rpx;
+ padding: 0;
+ background: #D8D8D8 linear-gradient(93deg, #FF9747 0%, #FF6E01 100%);
+ border-radius: 200rpx 0 0 200rpx;
+ top: 54rpx;
+ right: 0;
}
-.points-user-menu-submit {
- border: 1px solid #ffd606;
- color: #fae501;
- top: 20rpx;
- right: 20rpx;
- padding: 6rpx 20rpx;
+
+.points-integral {
+ padding: 28rpx 28rpx 0 28rpx;
}
-.points-user .share-submit {
- bottom: 20rpx;
- right: 20rpx;
- color: #F37B1D;
- background-color: #ffe5be;
- border-color: #f8d093;
+
+.points-integral .item .list {
+ border-bottom: 2rpx solid #eee;
+ padding: 30rpx 0;
+}
+
+.points-integral .item .list:last-of-type {
+ border: 0;
}
/**
-* 商品列表
-*/
-.data-list .item {
- width: calc(50% - 10rpx);
+ * 积分规则
+ */
+.rule-btn {
+ top: 242rpx;
+ width: 148rpx;
+ height: 52rpx;
+ padding: 0;
+ line-height: 52rpx;
+ background: rgba(0, 0, 0, 0.3);
+ border-radius: 200rpx 0 0 200rpx;
}
-.data-list .item:nth-child(2n) {
- float: right;
+
+.rule {
+ padding: 56rpx 24rpx;
+ max-height: 50vh;
}
-.data-list .item:nth-child(2n+1) {
- float: left;
+
+.rule .item {
+ padding-bottom: 100rpx;
+ max-height: calc(50vh - 164rpx);
}
-.data-list .item .goods-img {
- width: 100%;
- height: 380rpx !important;
+
+.rule button {
+ margin: 20rpx 70rpx 42rpx 70rpx;
+ height: 80rpx;
+ line-height: 80rpx;
}
\ No newline at end of file
diff --git a/pages/plugins/points/index/index.vue b/pages/plugins/points/index/index.vue
index cbfd6f45..7765c07b 100644
--- a/pages/plugins/points/index/index.vue
+++ b/pages/plugins/points/index/index.vue
@@ -1,62 +1,99 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- 获知会员积分详情
-
-
-
- {{user.user_name_view}}
- 当前可用 {{user_integral.integral || 0}} 积分
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 立即登录
+ 获知会员积分详情
+
+
+
+
+
+ {{user.user_name_view}}
+ 当前可用
+
+ {{user_integral.integral || 0}}
+
+ 积分
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 原始
+ {{item.original_integral}}
+ /
+ 最新
+ {{item.new_integral}}
+
+ {{item.add_time_time}}
+
+
+ {{item.msg}}
+ {{item.type == 1 ? '+' : '-'}} {{item.operation_integral}}
+
+
+
+
+
+
+
+
+
-
-
- {{item}}
-
-
+
-
- 商品兑换
- 更多
-
-
-
-
-
-
- {{item.title}}
- {{currency_symbol}}{{item.price}}
-
- {{item.integral}}
- 积分
-
-
-
-
-
+
+
+
+
+ 积分规则
+
+ {{item}}
+
+
+
+
@@ -68,10 +105,14 @@
const app = getApp();
import componentNoData from "../../../../components/no-data/no-data";
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
-
+ import componentGoodsList from "../../../../components/goods-list/goods-list";
+ import componentPopup from "../../../../components/popup/popup";
+ import componentTitle from "../../../../components/title/title";
+ var points_static_url = app.globalData.get_static_url('points', true);
export default {
data() {
return {
+ points_static_url: points_static_url,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -82,36 +123,54 @@
user_integral: null,
avatar_default: app.globalData.data.default_user_head_src,
// 自定义分享信息
- share_info: {}
+ share_info: {},
+ // 配置商品列表按钮
+ isOpenGridBtnSet: true,
+ gridBtnConfig: {
+ name: '兑换',
+ bg_color: app.globalData.get_theme_color(),
+ padding: '8rpx 16rpx',
+ border_radius: '8rpx'
+ },
+ // 规则弹窗
+ popup_status: false,
+ propIsBar: false,
+ // 积分
+ integral_list: [],
+ integral_list_loding_status: 1,
+ integral_list_loding_msg: '',
+ integral_page: 1,
};
},
-
components: {
componentNoData,
- componentBottomLine
+ componentBottomLine,
+ componentGoodsList,
+ componentPopup,
+ componentTitle
},
props: {},
-
onLoad(params) {
this.setData({
- params: params,
+ params: params
+ });
+ console.log(app.globalData.get_theme_color());
+ },
+ onShow() {
+ // 用户信息
+ this.setData({
user: app.globalData.get_user_cache_info()
});
- },
-
- onShow() {
// 初始化配置
this.init_config();
-
// 获取数据
this.get_data();
+ this.get_integral_data_list();
},
-
// 下拉刷新
onPullDownRefresh() {
this.get_data();
},
-
methods: {
// 初始化配置
init_config(status) {
@@ -123,7 +182,6 @@
app.globalData.is_config(this, 'init_config');
}
},
-
// 获取数据
get_data() {
uni.request({
@@ -142,7 +200,6 @@
data_list_loding_status: 0,
data_bottom_line_status: true
});
-
if ((this.data_base || null) != null) {
// 基础自定义分享
this.setData({
@@ -153,9 +210,8 @@
img: this.data_base.right_images
}
});
-
// 导航名称
- if((this.data_base.application_name || null) != null) {
+ if ((this.data_base.application_name || null) != null) {
uni.setNavigationBarTitle({
title: this.data_base.application_name
});
@@ -168,7 +224,6 @@
data_list_loding_msg: res.data.msg
});
}
-
// 分享菜单处理
app.globalData.page_share_handle(this.share_info);
},
@@ -183,7 +238,6 @@
}
});
},
-
// 立即登录
login_event() {
var user = app.globalData.get_user_info(this, "login_event");
@@ -210,12 +264,10 @@
user: user || null
});
},
-
// url事件
url_event(e) {
app.globalData.url_event(e);
},
-
// 头像查看
preview_event() {
if (app.globalData.data.default_user_head_src != this.user.avatar) {
@@ -224,7 +276,78 @@
urls: [this.user.avatar]
});
}
- }
+ },
+ get_integral_data_list(is_mandatory) {
+ // 是否加载中
+ if (this.integral_is_loading == 1) {
+ return false;
+ }
+ this.setData({
+ integral_is_loading: 1,
+ integral_list_loding_status: 1
+ });
+ // 加载loding
+ uni.showLoading({
+ title: '加载中...'
+ });
+ // 获取数据
+ uni.request({
+ url: app.globalData.get_request_url("index", "userintegral"),
+ method: 'POST',
+ data: {
+ page: this.integral_page
+ },
+ dataType: 'json',
+ success: res => {
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ if (res.data.data.data.length > 0) {
+ console.log(res.data.data.data);
+ this.setData({
+ integral_list: res.data.data.data.length > 4 ? res.data.data.data.splice(0, 4) : res.data.data.data,
+ integral_list_loding_status: 3,
+ integral_is_loading: 0
+ });
+ } else {
+ this.setData({
+ integral_list_loding_status: 0,
+ integral_is_loading: 0
+ });
+ }
+ } else {
+ this.setData({
+ integral_list_loding_status: 0,
+ integral_is_loading: 0
+ });
+ if (app.globalData.is_login_check(res.data, this, 'get_integral_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('服务器请求出错');
+ }
+ });
+ },
+ // 弹层开启
+ quick_open_event(e) {
+ this.setData({
+ popup_status: true
+ });
+ },
+ // 弹层关闭
+ quick_close_event(e) {
+ this.setData({
+ popup_status: false
+ });
+ },
}
};
diff --git a/pages/plugins/seckill/index/index.css b/pages/plugins/seckill/index/index.css
index 42c10af9..ff7033b7 100644
--- a/pages/plugins/seckill/index/index.css
+++ b/pages/plugins/seckill/index/index.css
@@ -18,7 +18,6 @@
line-height: 50rpx;
}
-
.nav_seckill .item .state {
margin-top: 4rpx;
padding: 0 14rpx;
@@ -44,7 +43,7 @@
}
.rule button {
- margin: 20rpx 30rpx 42rpx 30rpx;
+ margin: 20rpx 70rpx 42rpx 70rpx;
height: 80rpx;
line-height: 80rpx;
}
\ No newline at end of file
diff --git a/pages/plugins/seckill/index/index.vue b/pages/plugins/seckill/index/index.vue
index 0c8993d2..519835de 100644
--- a/pages/plugins/seckill/index/index.vue
+++ b/pages/plugins/seckill/index/index.vue
@@ -21,16 +21,17 @@
:prop-time-background-color="seckill_status === 1 ? '#E22C08': '#333333'">
-
+
活动规则
+ color="#999">
-
+
@@ -48,7 +49,7 @@
{{item}}
-
+
@@ -65,7 +66,6 @@
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
import componentGoodsList from "../../../../components/goods-list/goods-list";
import componentPopup from "../../../../components/popup/popup";
-
var seckill_static_url = app.globalData.get_static_url('seckill', true);
export default {
data() {
@@ -94,9 +94,14 @@
// 抢购状态
// status 0未开始, 1进行中(距离结束还有), 2已结束, 3异常错误
seckill_status: 0,
+ // 配置商品列表按钮
+ isOpenGridBtnSet: false,
+ gridBtnConfig: {
+ name: '即将开抢',
+ disabled: true,
+ }
};
},
-
components: {
componentCountdown,
componentNoData,
@@ -105,22 +110,36 @@
componentPopup
},
props: {},
-
onLoad() {},
-
onShow() {
// 初始化配置
this.init_config();
-
// 获取数据
this.get_data();
},
-
// 下拉刷新
onPullDownRefresh() {
this.get_data();
},
-
+ watch: {
+ seckill_status(val) {
+ if (val === 0) {
+ let newData = {
+ name: '即将开抢'
+ }
+ this.setData({
+ gridBtnConfig: Object.assign({}, gridBtnConfig, newData),
+ });
+ } else if (val === 2) {
+ let newData = {
+ name: '已结束'
+ }
+ this.setData({
+ gridBtnConfig: Object.assign({}, gridBtnConfig, newData),
+ });
+ }
+ }
+ },
methods: {
// 初始化配置
init_config(status) {
@@ -132,7 +151,6 @@
app.globalData.is_config(this, 'init_config');
}
},
-
// 获取数据
get_data() {
uni.request({
@@ -160,16 +178,16 @@
current: current,
time: time,
time_first_text: time.time_first_text,
- seckill_status: time.status,
+ seckill_status: data.periods_list[this.nav_active_index].time.status,
+ isOpenGridBtnSet: data.periods_list[this.nav_active_index].time.status === 1 ? false : true,
goods: goods,
is_valid: is_valid,
data_list_loding_msg: '',
data_list_loding_status: 0,
data_bottom_line_status: (goods.length > 0)
});
-
if ((this.data_base || null) != null) {
- // 基础自定义分享
+ // 基础自定义分享
this.setData({
share_info: {
title: this.data_base.seo_title || this.data_base.application_name,
@@ -178,7 +196,6 @@
img: ((this.slider || null) != null && this.slider.length > 0) ? this.slider[0]['images_url'] : ''
}
});
-
// 导航名称
if ((this.data_base.application_name || null) != null) {
uni.setNavigationBarTitle({
@@ -193,7 +210,6 @@
data_list_loding_msg: res.data.msg
});
}
-
// 分享菜单处理
app.globalData.page_share_handle(this.share_info);
},
@@ -216,18 +232,16 @@
nav_active_index: index,
time_first_text: time_first_text,
seckill_status: seckill_status,
- goods: this.periods_list[index].goods
+ goods: this.periods_list[index].goods,
+ isOpenGridBtnSet: seckill_status === 1 ? false : true,
});
-
},
-
// 弹层开启
quick_open_event(e) {
this.setData({
popup_status: true
});
},
-
// 弹层关闭
quick_close_event(e) {
this.setData({
diff --git a/pages/plugins/shop/detail/detail.css b/pages/plugins/shop/detail/detail.css
index fa8cdaf0..c20d4e1f 100644
--- a/pages/plugins/shop/detail/detail.css
+++ b/pages/plugins/shop/detail/detail.css
@@ -1,59 +1,55 @@
/**
* 搜索
*/
-.search input {
- width: calc(100% - 328rpx);
- border-top-right-radius: 0 !important;
- border-bottom-right-radius: 0 !important;
- height: 52rpx;
- line-height: 52rpx;
- border-width: 1px;
- border-style: solid;
- padding-top: 0;
- padding-bottom: 0;
-}
-.header-shop-whole-search input {
- width: calc(100% - 168rpx);
+.search {
+ border: 2rpx solid;
+ padding: 2rpx;
}
-.search-btn {
- top: 20rpx;
- right: 20rpx;
-}
-.search-btn button {
- width: 150rpx;
+
+.search button {
+ width: 140rpx;
+ height: 56rpx;
+ line-height: 56rpx;
padding: 0;
- height: 57rpx;
- line-height: 57rpx;
}
-.search-btn button:first-child {
- border-top-left-radius: 0 !important;
- border-bottom-left-radius: 0 !important;
- background: #ff8c00;
- border: 1px solid #ff8c00;
+
+.search input {
+ height: 56rpx;
+ line-height: 56rpx;
}
-.search-btn button:last-child {
- background: #483E39;
- border: 1px solid #483E39;
- margin-left: 20rpx;
+
+.search-btn {
+ width: 148rpx;
+}
+
+.search-btn button {
+ width: 100%;
+ padding: 0;
+ height: 64rpx;
+ line-height: 64rpx;
}
/**
* 头部
*/
.header {
- padding: 20rpx 10rpx;
+ padding: 20rpx 24rpx;
font-size: 24rpx;
}
+
.shop-logo {
width: 90rpx;
}
+
.base-bottom image {
width: 28rpx;
height: 28rpx;
}
+
.header .base {
width: calc(100% - 110rpx);
}
+
.shop-title {
line-height: 40rpx;
}
@@ -62,49 +58,56 @@
* 导航
*/
.nav {
- height: 70rpx;
- border-width: 0 0 1px 0;
- border-style: solid;
+ height: 80rpx;
}
+
.nav .nav-scroll {
float: right;
- width: calc(100% - 230rpx);
+ width: calc(100% - 164rpx);
}
+
+.nav .nav-scroll .item {
+ height: 56rpx;
+ line-height: 56rpx;
+}
+
.nav .item {
padding: 0 20rpx;
}
+
.nav-shop-category {
- padding-right: 38rpx !important;
+ padding-right: 32rpx !important;
background-size: 14px 14px;
-}
-.nav .nav-items {
- width: 380rpx;
- left: calc(50% - 190rpx);
- top: 300rpx;
- z-index: 1;
- -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
- box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+}
+
+.nav .nav-items {
+ left: calc(50% - 212rpx);
+ top: 340rpx;
+ z-index: 1;
+ box-shadow: 0 6px 6px rgb(0 0 0 / 10%);
}
/**
* 导航商品分类
*/
.nav-category {
- width: 220rpx;
z-index: 1;
- margin-top: 12rpx;
+ margin-top: 16rpx;
box-shadow: 0 6px 6px rgb(0 0 0 / 10%);
border-bottom-right-radius: 20rpx;
border-width: 0 1px 1px 1px;
border-style: solid;
border-color: #efefef;
}
+
.nav-category .category-scroll {
max-height: 600rpx;
}
+
.nav-category .item {
padding: 20rpx;
}
+
.nav-category .item:not(:last-child) {
border-bottom: 1px dashed #f7f7f7;
}
@@ -115,9 +118,11 @@
.shop-category-list .item {
margin: 20rpx 0;
}
-.shop-category-list .item {
+
+.shop-category-list .item {
margin-left: 20rpx;
}
+
.shop-category-list .item:last-child {
margin-right: 20rpx;
}
\ No newline at end of file
diff --git a/pages/plugins/shop/detail/detail.vue b/pages/plugins/shop/detail/detail.vue
index 3ca51052..bc5dee7b 100644
--- a/pages/plugins/shop/detail/detail.vue
+++ b/pages/plugins/shop/detail/detail.vue
@@ -2,11 +2,21 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -15,10 +25,13 @@
-
+
-
-
+
+
@@ -28,23 +41,23 @@
{{shop.name}}
-
+
在线客服
-
+
{{shop_favor_info.text}}({{shop_favor_info.count}})
-
-
-
-
-
-
- {{shop.score_data.value}}分
+
+
+
+
+
+
+ {{shop.score_data.value}}分
@@ -68,38 +81,41 @@
时间:
- {{shop.open_week_name}}至{{shop.close_week_name}},{{shop.open_time}}-{{shop.close_time}}
-
-
-
-
- 长按微信咨询
-
-
-
- 长按line咨询
-
+ {{shop.open_week_name}}至{{shop.close_week_name}},{{shop.open_time}}-{{shop.close_time}}
+
+
+
+
+ 长按微信咨询
+
+
+
+ 长按line咨询
+
-
- 查看商品分类
+
+ 商品分类
-
-
-
- {{item.name}}
-
-
- {{item.name}}
-
-
- {{items.name}}
-
-
+
+
+
+
+ {{item.name}}
+
+
+ {{item.name}}
+
+
+ {{items.name}}
+
+
+
-
+
@@ -120,7 +136,8 @@
-
+
@@ -139,7 +156,8 @@
-
+
@@ -176,7 +194,6 @@
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
import componentBanner from "../../../../components/slider/slider";
import componentGoodsList from "../../../../components/goods-list/goods-list";
-
var common_static_url = app.globalData.get_static_url('common');
export default {
data() {
@@ -185,7 +202,7 @@
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
- currency_symbol: app.globalData.data.currency_symbol,
+ currency_symbol: app.globalData.data.currency_symbol,
is_shop_search_all_search_button: 0,
params: null,
user: null,
@@ -208,7 +225,6 @@
share_info: {}
};
},
-
components: {
componentLayout,
componentNoData,
@@ -217,26 +233,21 @@
componentGoodsList
},
props: {},
-
onLoad(params) {
this.setData({
params: params,
user: app.globalData.get_user_cache_info()
});
},
-
onShow() {
this.get_data();
-
// 初始化配置
this.init_config();
},
-
// 下拉刷新
onPullDownRefresh() {
this.get_data();
},
-
methods: {
// 初始化配置
init_config(status) {
@@ -248,7 +259,6 @@
app.globalData.is_config(this, 'init_config');
}
},
-
// 获取数据
get_data() {
uni.request({
@@ -261,7 +271,7 @@
success: res => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
- var data = res.data.data;
+ var data = res.data.data;
var base = data.base || null;
var temp_data = data.data || [];
this.setData({
@@ -269,7 +279,7 @@
shop: data.shop || null,
shop_favor_user: data.shop_favor_user || [],
shop_navigation: data.shop_navigation || [],
- shop_goods_category: data.shop_goods_category || [],
+ shop_goods_category: data.shop_goods_category || [],
is_shop_search_all_search_button: (base == null || parseInt(base.is_shop_search_all_search_button || 0) != 1) ? 0 : 1,
data: temp_data,
slider: data.slider || [],
@@ -277,7 +287,6 @@
data_list_loding_status: 0,
data_bottom_line_status: temp_data.length > 0
});
-
if ((this.shop || null) != null) {
// 收藏信息
var status = this.shop_favor_user.indexOf(this.shop.id) != -1 ? 1 : 0;
@@ -288,18 +297,16 @@
"text": (status == 1 ? '已' : '') + '收藏'
}
});
-
// 基础自定义分享
this.setData({
share_info: {
title: this.shop.seo_title || this.shop.name,
desc: this.shop.seo_desc || this.shop.describe,
path: '/pages/plugins/shop/detail/detail',
- query: 'id='+this.shop.id,
+ query: 'id=' + this.shop.id,
img: this.shop.logo
}
});
-
// 标题名称
uni.setNavigationBarTitle({
title: this.shop.name
@@ -312,7 +319,6 @@
data_list_loding_msg: res.data.msg
});
}
-
// 分享菜单处理
app.globalData.page_share_handle(this.share_info);
},
@@ -327,7 +333,6 @@
}
});
},
-
// 店铺收藏事件
shop_favor_event(e) {
var user = app.globalData.get_user_info(this, 'shop_favor_event');
@@ -370,14 +375,12 @@
}
}
},
-
// 搜索输入事件
search_keywords_event(e) {
this.setData({
search_keywords_value: e.detail.value || ''
});
},
-
// 搜索事件
search_button_event(e) {
var value = e.currentTarget.dataset.value || null;
@@ -385,21 +388,18 @@
url: value + 'keywords=' + this.search_keywords_value || ''
});
},
-
// 导航分类事件
header_service_event(e) {
this.setData({
header_service_status: !this.header_service_status
});
},
-
// 导航分类事件
nav_shop_category_event(e) {
this.setData({
nav_category_status: !this.nav_category_status
});
},
-
// 导航分类事件
shop_category_event(e) {
var value = e.currentTarget.dataset.value || null;
@@ -407,47 +407,43 @@
url: '/pages/plugins/shop/search/search?shop_id=' + this.shop.id + '&category_id=' + value
});
},
-
// 导航事件
- nav_event(e) {
- // 存在子级则做子级显示隐藏处理
- var value = e.currentTarget.dataset.value || null;
- if(value == null) {
- var index = e.currentTarget.dataset.index;
- var temp_nav = this.shop_navigation;
- for(var i in temp_nav) {
- if(i == index) {
- temp_nav[i]['items_status'] = ((temp_nav[i]['items_status'] || 0) == 0) ? 1 : 0;
- } else {
- temp_nav[i]['items_status'] = 0;
- }
- }
- this.setData({shop_navigation: temp_nav});
- } else {
- app.globalData.url_event(e);
+ nav_event(e) {
+ // 存在子级则做子级显示隐藏处理
+ var value = e.currentTarget.dataset.value || null;
+ if (value == null) {
+ var index = e.currentTarget.dataset.index;
+ var temp_nav = this.shop_navigation;
+ for (var i in temp_nav) {
+ if (i == index) {
+ temp_nav[i]['items_status'] = ((temp_nav[i]['items_status'] || 0) == 0) ? 1 : 0;
+ } else {
+ temp_nav[i]['items_status'] = 0;
+ }
+ }
+ this.setData({
+ shop_navigation: temp_nav
+ });
+ } else {
+ app.globalData.url_event(e);
}
},
-
// url事件
url_event(e) {
app.globalData.url_event(e);
},
-
// 剪切板
text_copy_event(e) {
app.globalData.text_copy_event(e);
},
-
// 电话
tel_event(e) {
app.globalData.call_tel(e.currentTarget.dataset.value || null);
},
-
// 图片预览
image_show_event(e) {
app.globalData.image_show_event(e);
},
-
// 进入客服系统
chat_event() {
app.globalData.chat_entry_handle(this.shop.chat_info.chat_url);
diff --git a/pages/plugins/shop/index/index.vue b/pages/plugins/shop/index/index.vue
index 87be7010..3ce39bc3 100644
--- a/pages/plugins/shop/index/index.vue
+++ b/pages/plugins/shop/index/index.vue
@@ -4,10 +4,13 @@
- {{item.name}}
+
+ {{item.name}}
+
-
+
@@ -15,10 +18,14 @@
-
-
+
+
+
+ {{item.name}}
-
+
@@ -33,13 +40,13 @@
-
- {{item.name}}
- {{item.describe}}
-
- 商品 {{item.goods_count}}
- 销量 {{item.goods_sales_count}}
+
+ {{item.describe}}
+
+
+ 商品 {{item.goods_count}}
+ 销量 {{item.goods_sales_count}}
@@ -61,7 +68,6 @@
const app = getApp();
import componentNoData from "../../../../components/no-data/no-data";
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
-
export default {
data() {
return {
@@ -81,22 +87,18 @@
share_info: {}
};
},
-
components: {
componentNoData,
componentBottomLine
},
props: {},
-
onLoad(params) {
this.setData({
params: params
});
-
// 数据加载
this.get_data();
},
-
// 下拉刷新
onPullDownRefresh() {
this.setData({
@@ -104,7 +106,6 @@
});
this.get_data_list(1);
},
-
methods: {
// 初始化
get_data() {
@@ -125,7 +126,6 @@
data_base: data.base || null,
shop_category: data.shop_category || []
});
-
if ((this.data_base || null) != null) {
// 基础自定义分享
this.setData({
@@ -135,15 +135,13 @@
path: '/pages/plugins/shop/index/index'
}
});
-
// 导航名称
- if((this.data_base.application_name || null) != null) {
+ if ((this.data_base.application_name || null) != null) {
uni.setNavigationBarTitle({
title: this.data_base.application_name
});
}
}
-
// 获取列表数据
this.get_data_list(1);
} else {
@@ -153,7 +151,6 @@
});
app.globalData.showToast(res.data.msg);
}
-
// 分享菜单处理
app.globalData.page_share_handle(this.share_info);
},
@@ -167,7 +164,6 @@
}
});
},
-
// 获取数据列表
get_data_list(is_mandatory) {
// 分页是否还有数据
@@ -177,18 +173,17 @@
return false;
}
}
-
// 是否加载中
- if(this.data_is_loading == 1) {
+ if (this.data_is_loading == 1) {
return false;
}
- this.setData({data_is_loading: 1});
-
+ this.setData({
+ data_is_loading: 1
+ });
// 加载loding
uni.showLoading({
title: '加载中...'
});
-
// 获取数据
uni.request({
url: app.globalData.get_request_url("shoplist", "index", "shop"),
@@ -221,7 +216,6 @@
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)
@@ -258,12 +252,10 @@
}
});
},
-
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
-
// 导航事件
nav_event(e) {
this.setData({
diff --git a/pages/user-integral/user-integral.css b/pages/user-integral/user-integral.css
index 68acf277..2b8255ec 100644
--- a/pages/user-integral/user-integral.css
+++ b/pages/user-integral/user-integral.css
@@ -1,4 +1,8 @@
-.item-value {
- right: 20rpx;
- bottom: 20rpx;
+.points-integral .list {
+ border-bottom: 2rpx solid #eee;
+ padding: 30rpx 0;
+}
+
+.points-integral .list:last-of-type {
+ border: 0;
}
\ No newline at end of file
diff --git a/pages/user-integral/user-integral.vue b/pages/user-integral/user-integral.vue
index 914d3bdb..89395054 100644
--- a/pages/user-integral/user-integral.vue
+++ b/pages/user-integral/user-integral.vue
@@ -1,26 +1,29 @@
-
+
-
-
-
-
- 原始
- {{item.original_integral}}
- 最新
- {{item.new_integral}}
+
+
+
+
+ 原始
+ {{item.original_integral}}
+ /
+ 最新
+ {{item.new_integral}}
- {{item.add_time_time}}
+ {{item.add_time_time}}
+
+
+ {{item.msg}}
+ {{item.type == 1 ? '+' : '-'}} {{item.operation_integral}}
- {{item.msg}}
- {{item.type == 1 ? '+' : '-'}} {{item.operation_integral}}
-
+
@@ -30,7 +33,6 @@
const app = getApp();
import componentNoData from "../../components/no-data/no-data";
import componentBottomLine from "../../components/bottom-line/bottom-line";
-
export default {
data() {
return {
@@ -42,20 +44,16 @@
data_bottom_line_status: false
};
},
-
components: {
componentNoData,
componentBottomLine
},
props: {},
-
onShow() {
this.init();
-
// 分享菜单处理
app.globalData.page_share_handle();
},
-
// 下拉刷新
onPullDownRefresh() {
this.setData({
@@ -63,7 +61,6 @@
});
this.get_data_list(1);
},
-
methods: {
init() {
var user = app.globalData.get_user_info(this, "init");
@@ -85,7 +82,6 @@
});
}
},
-
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
@@ -94,21 +90,18 @@
return false;
}
}
-
// 是否加载中
- if(this.data_is_loading == 1) {
+ if (this.data_is_loading == 1) {
return false;
}
this.setData({
data_is_loading: 1,
data_list_loding_status: 1
});
-
// 加载loding
uni.showLoading({
title: '加载中...'
});
-
// 获取数据
uni.request({
url: app.globalData.get_request_url("index", "userintegral"),
@@ -131,7 +124,6 @@
temp_data_list.push(temp_data[i]);
}
}
-
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
@@ -140,7 +132,6 @@
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)
@@ -172,7 +163,6 @@
}
});
},
-
// 滚动加载
scroll_lower(e) {
this.get_data_list();