From f4e23270953f4c609d4990af6fe630324a4d8e64 Mon Sep 17 00:00:00 2001
From: hejinfu1026 <18537720348@163.com>
Date: Fri, 31 Dec 2021 15:52:11 +0800
Subject: [PATCH] =?UTF-8?q?12.31=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=BC=80?=
=?UTF-8?q?=E6=BA=90=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/app.js | 4 +-
manifest.json | 2 +-
.../goods_combination_details/index.vue | 15 +-
.../activity/goods_seckill_details/index.vue | 30 +-
pages/goods_details/index.vue | 18 +-
pages/index/index.vue | 778 +-----------------
pages/user/index.vue | 4 +-
pages/users/user_info/index.vue | 4 +-
utils/util.js | 4 +-
9 files changed, 86 insertions(+), 773 deletions(-)
diff --git a/config/app.js b/config/app.js
index 73eb1968..dfef6ad2 100644
--- a/config/app.js
+++ b/config/app.js
@@ -1,12 +1,12 @@
-let domain = 'https://api.dev.java.crmeb.net/'
+let domain = 'https://xxx.xxx'
module.exports = {
// 请求域名 格式: https://您的域名
// #ifdef MP
HTTP_REQUEST_URL: domain,
// #endif
-
+ HTTP_ADMIN_URL:'https://xxx.xxx.xxx', //PC后台的API请求地址,上传图片用
// #ifdef H5
//H5接口是浏览器地址
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
diff --git a/manifest.json b/manifest.json
index d3a70029..2b885fa7 100644
--- a/manifest.json
+++ b/manifest.json
@@ -59,7 +59,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "11",
+ "appid" : "123",
"setting" : {
"urlCheck" : true,
"minified" : true,
diff --git a/pages/activity/goods_combination_details/index.vue b/pages/activity/goods_combination_details/index.vue
index 8fc2bc63..bcc405ee 100644
--- a/pages/activity/goods_combination_details/index.vue
+++ b/pages/activity/goods_combination_details/index.vue
@@ -534,7 +534,7 @@
that.attribute.productAttr = res.data.productAttr || [];
that.productValue = res.data.productValue;
that.onceNum = res.data.storeCombination.onceNum;
- that.DefaultSelect();
+
// that.PromotionCode = res.data.storeInfo.code_base
// #ifdef H5
that.setShare();
@@ -548,8 +548,19 @@
// #ifndef H5
that.downloadFilestoreImage();
// #endif
+ let productAttr = res.data.productAttr.map(item => {
+ return {
+ attrName : item.attrName,
+ attrValues: item.attrValues.split(','),
+ id:item.id,
+ isDel:item.isDel,
+ productId:item.productId,
+ type:item.type
+ }
+ });
+ that.$set(that.attribute,'productAttr',productAttr);
// that.setProductSelect();
-
+ that.DefaultSelect();
setTimeout(function() {
that.infoScroll();
diff --git a/pages/activity/goods_seckill_details/index.vue b/pages/activity/goods_seckill_details/index.vue
index 0f9c020d..fcaaba7d 100644
--- a/pages/activity/goods_seckill_details/index.vue
+++ b/pages/activity/goods_seckill_details/index.vue
@@ -315,7 +315,6 @@
that.$store.commit("PRODUCT_TYPE", 'normal');
let statusBarHeight = '';
var pages = getCurrentPages();
- //that.returnShow = pages.length === 1 ? false : true;
//设置商品列表高度
uni.getSystemInfo({
success: function(res) {
@@ -324,18 +323,29 @@
//res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
},
});
- this.isLogin && silenceBindingSpread();
+ // #ifndef APP-PLUS
this.navH = app.globalData.navHeight
+ // #endif
+ // #ifdef APP-PLUS
+ this.navH = 90
+ // #endif
// #ifdef MP
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.meunHeight = menuButtonInfo.height
this.backH = (that.navH / 2) + (this.meunHeight / 2)
+
+ // #ifdef MP || APP-NVUE
+ // 小程序链接进入获取绑定关系id
+ // if(options.spread) app.globalData.spread = options.spread;
setTimeout(()=>{
if(options.spread){
app.globalData.spread = options.spread;
spread(options.spread).then(res => {})
}
},2000)
+ // #endif
+ that.$set(that,'theme',that.$Cache.get('theme')); //用户从分享卡片进入的场景下获取主题色配置
+ // #endif
if (!options.scene && !options.id){
this.showSkeleton = false;
this.$util.Tips({
@@ -358,14 +368,12 @@
this.id = options.id;
}
}
- // #endif
if (this.isLogin) {
- this.id = options.id;
this.getSeckillDetail();
} else {
this.$Cache.set('login_back_url',
- '/pages/activity/goods_seckill_details/index?id=' + this.id + '&spread=' + app.globalData.spid?app.globalData.spid:0);
+ '/pages/activity/goods_seckill_details/index?id=' + this.id + '&spread=' + app.globalData.spread?app.globalData.spread:0);
toLogin();
}
this.$nextTick(() => {
@@ -380,6 +388,7 @@
.exec();
// #endif
})
+ silenceBindingSpread();
},
methods: {
kefuClick(){
@@ -444,6 +453,17 @@
this.getProductReplyList();
this.getProductReplyCount();
+ let productAttr = res.data.productAttr.map(item => {
+ return {
+ attrName : item.attrName,
+ attrValues: item.attrValues.split(','),
+ id:item.id,
+ isDel:item.isDel,
+ productId:item.productId,
+ type:item.type
+ }
+ });
+ this.$set(this.attribute,'productAttr',productAttr);
// #ifdef H5
that.storeImage = that.storeInfo.image;
that.make();
diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue
index 4bb35ab9..71dc31a7 100644
--- a/pages/goods_details/index.vue
+++ b/pages/goods_details/index.vue
@@ -507,7 +507,7 @@
return {
title: that.productInfo.storeName || '',
imageUrl: that.productInfo.image || '',
- path: '/pages/goods_details/index?id=' + that.id + '&spid=' + that.uid,
+ path: '/pages/goods_details/index?id=' + that.id + '&spread=' + that.uid,
}
},
// #endif
@@ -769,11 +769,17 @@
uni.setNavigationBarTitle({
title: productInfo.storeName.substring(0, 7) + "..."
})
- // var navList = ['商品', '评价', '详情'];
- // if (goodArray.length) {
- // navList.splice(2, 0, '推荐')
- // }
- //that.$set(that, 'navList', navList);
+ let productAttr = this.attr.productAttr.map(item => {
+ return {
+ attrName : item.attrName,
+ attrValues: item.attrValues.split(','),
+ id:item.id,
+ isDel:item.isDel,
+ productId:item.productId,
+ type:item.type
+ }
+ });
+ this.$set(this.attr,'productAttr',productAttr);
if (that.isLogin) {
that.getCartCount();
//#ifdef H5
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6659b88b..554e32ca 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -94,11 +94,11 @@
-
- {{item.name}}
- {{item.money?Number(item.money):''}}元
- 领取
- 已领取
+
+ {{item.name}}
+ {{item.money?Number(item.money):''}}元
+ 领取
+ 已领取
满{{item.minPrice?Number(item.minPrice):''}}元可用
@@ -110,20 +110,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -132,7 +118,7 @@
- {{item.title}}
+ {{item.name}}
{{item.info}}
@@ -170,56 +156,6 @@
-
-
-
-
-
-
-
- 秒杀
- 砍价
- 拼团
-
-
- {{item.storeName}}
- ¥{{item.price}}
-
- ¥{{item.vipPrice}}
-
-
- 已售{{Number(item.sales) + Number(item.ficti) || 0 }}{{item.unitName}}
-
-
-
-
- {{loadTitle}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -325,7 +261,6 @@
imgUrls: [],
itemNew: [],
menus: [],
- bastBanner: [],
bastInfo: '',
fastInfo: '',
fastList: [],
@@ -361,7 +296,6 @@
limit: 10,
},
is_switch: true,
- hostProduct: [],
hotPage: 1,
hotLimit: 10,
hotScroll: false,
@@ -409,11 +343,6 @@
uni.getSystemInfo({
success(res) {
that.$store.commit("SYSTEM_PLATFORM", res.platform);
- console.log(res.platform) //手机牌子
- console.log(res.model) //手机型号
- console.log(res.screenWidth) //屏幕宽度
- console.log(res.screenHeight) //屏幕高度
-
}
});
uni.getLocation({
@@ -460,7 +389,7 @@
let that = this;
//领取优惠券
setCouponReceive(id).then(function(res) {
- that.$set(that.couponList[index], 'isGet', true);
+ that.$set(that.couponList[index], 'isUse', true);
that.$util.Tips({
title: '领取成功'
});
@@ -540,55 +469,6 @@
})
},
// #endif
- // 关闭优惠券弹窗
- onColse() {
- this.$set(this, "window", false);
- },
- //分类产品
- get_product_list: function(isPage) {
- let that = this;
- if (that.loadend) return;
- if (that.loading) return;
- that.loading = true;
- that.loadTitle = '';
- getProductslist(that.where).then(res => {
- if (that.where.page == 1 && res.data.list.length == 0) {
- that.hotScroll = false
- that.hotPage = 1
- that.hostProduct = []
- this.get_host_product()
- }
- let list = res.data.list;
- let productList = that.$util.SplitArray(list, that.sortProduct);
- let loadend = list.length < that.where.limit;
- that.loadend = loadend;
- that.loading = false;
- that.loadTitle = loadend ? '已全部加载' : '加载更多';
- that.$set(that, 'sortProduct', productList);
- that.$set(that.where, 'page', that.where.page + 1);
- }).catch(err => {
- that.loading = false;
- that.loadTitle = '加载更多';
- });
- },
- /**
- * 获取我的推荐
- */
- get_host_product: function() {
- let that = this;
- that.loading = true;
-
- if (that.hotScroll) return
- getProductHot(
- that.hotPage,
- that.hotLimit,
- ).then(res => {
- that.hotPage++
- that.hotScroll = res.data.list.length < that.hotLimit
- that.hostProduct = that.hostProduct.concat(res.data.list)
- });
- },
-
// 首页数据
getIndexConfig: function() {
let that = this;
@@ -601,8 +481,6 @@
that.$set(that, "imgUrls", res.data.banner);
that.$set(that, "menus", res.data.menus);
that.$set(that, "roll", res.data.roll ? res.data.roll : []);
- that.$set(that, "bastBanner", res.data.bastBanner || []);
- that.$set(that, "couponList", res.data.couponList || []);
// #ifdef H5
that.$store.commit("SET_CHATURL", res.data.yzfUrl);
Cache.set('chatUrl', res.data.yzfUrl);
@@ -611,6 +489,7 @@
that.goodType = res.data.explosiveMoney[0].type
this.getGroomList();
this.shareApi();
+ this.getcouponList();
// #ifdef H5
// that.subscribe = res.data.subscribe;
// #endif
@@ -665,46 +544,6 @@
Cache.set('chatUrl', data.yzfUrl);
})
},
- // setOpenShare:function(mss){
- // getWechatConfig()
- // .then(res => {
- // let data = res.data;
- // console.log('调试配置');
- // console.log(data);
- // WechatJSSDK.config({
- // debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- // appId: data.appId, // 必填,公众号的唯一标识
- // timestamp: data.timestamp, // 必填,生成签名的时间戳
- // nonceStr: data.nonceStr, // 必填,生成签名的随机串
- // signature: data.signature,// 必填,签名
- // jsApiList: data.jsApiList // 必填,需要使用的JS接口列表
- // });
- // WechatJSSDK.error(function(res){
- // console.log('error')
- // console.log(res);
- // });
- // WechatJSSDK.ready(function () { //需在用户可能点击分享按钮前就先调用
- // WechatJSSDK.onMenuShareAppMessage({
- // title: mss.title, // 分享标题
- // desc: mss.synopsis, // 分享描述
- // link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- // imgUrl: mss.img, // 分享图标
- // success: function (res) {
- // console.log('success');
- // console.log(res);
- // // 设置成功
- // },
- // fail:function(err){
- // console.log('err');
- // console.log(err);
- // }
- // })
- // });
- // }).catch(err => {
- // console.log(err);
- // reject(err);
- // });
- // },
// 微信分享;
setOpenShare: function(data) {
let that = this;
@@ -776,7 +615,24 @@
this.params.page++
this.tempArr = this.tempArr.concat(data.list)
})
- }
+ },
+ /**
+ * 获取我的推荐
+ */
+ get_host_product: function() {
+ let that = this;
+ that.loading = true;
+
+ if (that.hotScroll) return
+ getProductHot(
+ that.hotPage,
+ that.hotLimit,
+ ).then(res => {
+ that.hotPage++
+ that.hotScroll = res.data.list.length < that.hotLimit
+ that.hostProduct = that.hostProduct.concat(res.data.list)
+ });
+ },
},
mounted() {
let self = this
@@ -802,9 +658,7 @@
};
},
// #endif
- // 滚动到底部
onReachBottom() {
-
if (this.navIndex == 0) {
// 首页加载更多
if (this.params.page != 1) {
@@ -819,14 +673,6 @@
}
}
},
- // 滚动监听
- // onPageScroll(e) {
- // console.log(e)
- // let self = this
- // if (e.scrollTop == 1276) {
- // self.isFixed = true
- // }
- // }
}