diff --git a/common/platform/BasePlatform.js b/common/platform/BasePlatform.js
index 1017768..a77adb1 100644
--- a/common/platform/BasePlatform.js
+++ b/common/platform/BasePlatform.js
@@ -30,11 +30,8 @@ class BasePlatform {
}
async appData() {
await this.loadCacheData();
- // uni.switchTab({
- // url: '/pages/shouye/index'
- // });
uni.switchTab({
- url: '/pages/shouye/newIndex'
+ url: '/pages/shouye/index'
});
}
diff --git a/common/platform/MiniProgramPlatform.js b/common/platform/MiniProgramPlatform.js
index c599739..48116e9 100644
--- a/common/platform/MiniProgramPlatform.js
+++ b/common/platform/MiniProgramPlatform.js
@@ -227,12 +227,10 @@ class MiniProgramPlatform extends BasePlatform {
const t= await uni.getAccountInfoSync();
console.log("getAccountInfoSync",t);
await this.loadCacheData();
- // uni.switchTab({
- // url: '/pages/shouye/index'
- // });
uni.switchTab({
- url: '/pages/shouye/newIndex'
+ url: '/pages/shouye/index'
});
+
// this.getConfig().then(res => {
// console.log(res, 'res');
// })
diff --git a/common/server/goods.js b/common/server/goods.js
index 0982bfd..57c1894 100644
--- a/common/server/goods.js
+++ b/common/server/goods.js
@@ -16,7 +16,6 @@ export const getGoods = async (page, type, keyword) => {
type,
keyword
});
- await sleep(1000);
if (res.status == 1) {
let isWXShenHe = ConfigManager.GetVersion();
let _data = res.data.data;
diff --git a/components/custom-refresher/custom-refresher.vue b/components/custom-refresher/custom-refresher.vue
index 20db753..80ff2f6 100644
--- a/components/custom-refresher/custom-refresher.vue
+++ b/components/custom-refresher/custom-refresher.vue
@@ -2,7 +2,8 @@
-
+
+
{{statusText}}
@@ -19,10 +20,10 @@
// 这里可以做i18n国际化相关操作,可以通过uni.getLocale()获取当前语言(具体操作见i18n-demo.vue);
// 获取到当前语言之后,就可以自定义不同语言下的展示内容了
const statusTextMap = {
- 'default': '哎呀,用点力继续下拉!',
- 'release-to-refresh': '拉疼我啦,松手刷新~~',
- 'loading': '正在努力刷新中...',
- 'complete': '刷新成功啦~'
+ 'default': '下拉刷新',
+ 'release-to-refresh': '释放刷新',
+ 'loading': '正在努力加载中...',
+ 'complete': '加载成功'
};
return statusTextMap[this.status];
}
diff --git a/components/home-page/GoodsItem.vue b/components/home-page/GoodsItem.vue
index db3c10c..f090852 100644
--- a/components/home-page/GoodsItem.vue
+++ b/components/home-page/GoodsItem.vue
@@ -1,17 +1,24 @@
+
+
+
{{ item.title }}
+
+
{{ item.join_count }}次参与
快去参与吧!
+
+
- ¥{{ item.price }}
+ ¥{{ item.price }}
{{ item.sale_stock }}/{{ item.stock }}
@@ -19,17 +26,18 @@
-
-
-
-
- {{ item.type_text }}
-
+
+
+
+
+
+
+
+ {{ item.type_text }}
+
+
@@ -48,24 +56,24 @@ export default {
type: Number,
required: true
}
+ },
+ computed: {
+
},
methods: {
toDetails(item) {
- // 无限赏
let url = "/pages/shouye/detail";
- let params = {
+ const params = {
goods_id: item.id,
};
+ // 根据商品类型跳转不同页面
if (item.type == 2 || item.type == 8 || item.type == 16) {
- url = "/pages/shouye/detail_wuxian";
- }
-
- if (item.type == 9) {
- url = "/package/index/lian-ji";
- }
- if (item.type == 3) {
- url = "/package/index/leitai";
+ url = "/pages/shouye/detail_wuxian"; // 无限赏
+ } else if (item.type == 9) {
+ url = "/package/index/lian-ji"; // 连击
+ } else if (item.type == 3) {
+ url = "/package/index/leitai"; // 擂台
}
this.$customRouter.navigateTo(url, params);
@@ -83,6 +91,7 @@ export default {
background-color: #f8f8f8;
border-radius: 16rpx;
+ // 新品标签
.image1 {
width: 32rpx;
height: 32rpx;
@@ -92,17 +101,20 @@ export default {
right: 10rpx;
}
+ // 类型标签
.image3 {
position: absolute;
z-index: 1;
top: 10rpx;
left: 10rpx;
min-width: 68rpx;
- padding: 0 6rpx;
height: 32rpx;
- justify-content: center;
+ padding: 0 10rpx;
+ line-height: 32rpx;
display: flex;
+ justify-content: center;
align-items: center;
+ background-image: url(https://image.zfunbox.cn/static/web/static/common/label2.png);
text {
font-size: 16rpx;
@@ -111,6 +123,7 @@ export default {
}
}
+ // 折扣标签
.half-tag {
width: 160rpx;
height: 60rpx;
@@ -126,6 +139,7 @@ export default {
}
}
+// 商品图片容器
.list_1 {
width: 100%;
height: 332rpx;
@@ -133,13 +147,14 @@ export default {
align-items: center;
justify-content: center;
overflow: hidden;
+
+ >image {
+ width: 100%;
+ height: 100%;
+ }
}
-.list_1>image {
- width: 100%;
- height: 100%;
-}
-
+// 商品信息容器
.list_2 {
padding: 28rpx 20rpx 0;
font-size: 20rpx;
@@ -147,13 +162,22 @@ export default {
color: #333333;
}
+// 参与次数
.redu {
margin-top: 24rpx;
font-size: 18rpx;
font-weight: 500;
color: #6C6C6C;
+
+ >image {
+ width: 32rpx;
+ height: 32rpx;
+ border: 2rpx solid rgba(255, 255, 255, 0.8);
+ border-radius: 50%;
+ }
}
+// 价格区域
.qbt_con_item_3 {
display: flex;
justify-content: space-between;
@@ -171,27 +195,22 @@ export default {
}
}
+// 库存信息
.qbt_con_item_price {
display: flex;
align-items: center;
font-size: 18rpx;
font-weight: 400;
color: #6c6c6c;
+
+ image {
+ width: 26rpx;
+ height: 26rpx;
+ margin-left: 6rpx;
+ }
}
-.qbt_con_item_price>image {
- width: 26rpx;
- height: 26rpx;
- margin-left: 6rpx;
-}
-
-.redu>image {
- width: 32rpx;
- height: 32rpx;
- border: 2rpx solid rgba(255, 255, 255, 0.8);
- border-radius: 50%;
-}
-
+// 动画效果
@keyframes zoom {
0% {
transform: scale(1);
@@ -205,4 +224,4 @@ export default {
transform: scale(1);
}
}
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/components/home-page/home-page-coupon.vue b/components/home-page/home-page-coupon.vue
index 19d59f9..4036959 100644
--- a/components/home-page/home-page-coupon.vue
+++ b/components/home-page/home-page-coupon.vue
@@ -1,240 +1,234 @@
-
-
-
-
-
-
-
-
- ¥
- {{ Number(item.price) }}
-
-
- {{ item.title }}
- 有限期{{ item.effective_day }}天
-
-
-
- 立即收下
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ ¥
+ {{ Number(item.price) }}
+
+
+ {{ item.title }}
+ 有限期{{ item.effective_day }}天
+
+
+
+ 立即收下
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/home-page/home-page-tuijian.vue b/components/home-page/home-page-tuijian.vue
index 2d9ee88..67c5591 100644
--- a/components/home-page/home-page-tuijian.vue
+++ b/components/home-page/home-page-tuijian.vue
@@ -6,7 +6,7 @@
style="margin-top: 30rpx; flex-direction: column">
今日推荐
-
+
-
-
-
-
-
-
-
- {{ item.title }}
- {{ item.detail }}
-
-
-
-
-
-
-
-
-
diff --git a/components/sticky-swiper-next-item/sticky-swiper-next-item.vue b/components/sticky-swiper-next-item/sticky-swiper-next-item.vue
deleted file mode 100644
index 9158d80..0000000
--- a/components/sticky-swiper-next-item/sticky-swiper-next-item.vue
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
-
-
-
-
- {{ item.title }}
- {{ item.detail }}
-
-
-
-
-
-
-
-
-
diff --git a/manifest.json b/manifest.json
index 57cba19..debcca1 100644
--- a/manifest.json
+++ b/manifest.json
@@ -188,7 +188,7 @@
"enable" : false
},
"devServer" : {
- "https" : true,
+ "https" : false,
"port" : 3001,
"disableHostCheck" : true
},
diff --git a/pages.json b/pages.json
index d72eead..8dffb59 100644
--- a/pages.json
+++ b/pages.json
@@ -365,12 +365,6 @@
"style": {
"navigationStyle": "custom"
}
- },
- {
- "path": "pages/shouye/newIndex",
- "style": {
- "navigationStyle": "custom"
- }
}
],
"subPackages": [{
@@ -462,7 +456,7 @@
// "iconHeight": "10px",
"list": [
{
- "pagePath": "pages/shouye/newIndex",
+ "pagePath": "pages/shouye/index",
"iconPath": "static/tab/n1.png",
"selectedIconPath": "static/tab/c1.png",
"text": "首页"
diff --git a/pages/shouye/index.vue b/pages/shouye/index.vue
index 0a7ec54..a134a16 100644
--- a/pages/shouye/index.vue
+++ b/pages/shouye/index.vue
@@ -1,59 +1,48 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 今日推荐
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
- {{ item.title }}
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
-
-
-
-
@@ -64,62 +53,20 @@
-
\ No newline at end of file
diff --git a/pages/shouye/newIndex.vue b/pages/shouye/newIndex.vue
deleted file mode 100644
index 253e9e4..0000000
--- a/pages/shouye/newIndex.vue
+++ /dev/null
@@ -1,259 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
new file mode 100644
index 0000000..8f506ef
--- /dev/null
+++ b/vue.config.js
@@ -0,0 +1,15 @@
+module.exports = {
+ chainWebpack: (config) => {
+ // 发行或运行时启用了压缩时会生效
+ config.optimization.minimizer('terser').tap((args) => {
+ const compress = args[0].terserOptions.compress
+ // 非 App 平台移除 console 代码(包含所有 console 方法,如 log,debug,info...)
+ compress.drop_console = true
+ compress.pure_funcs = [
+ '__f__', // App 平台 vue 移除日志代码
+ // 'console.debug' // 可移除指定的 console 方法
+ ]
+ return args
+ })
+ }
+}
\ No newline at end of file