From 2767e58717052718adde427ca5c80b397dd09c50 Mon Sep 17 00:00:00 2001
From: yvan.ni <765199919@qq.com>
Date: Tue, 2 Jun 2020 11:34:03 +0800
Subject: [PATCH] 1. 底部导航的优化 跳转函数,navigator的优化 2. 自定义模块 广告模块的滑块的时间,圆点的颜色 俩边间距, 图片间距功能
---
app.js | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------
app.json | 32 --------------------------------
components/diy_advertising/diy_advertising.js | 3 ++-
components/diy_advertising/diy_advertising.wxml | 43 ++++++++++++++++++++++++++++++-------------
components/diy_advertising/diy_advertising.wxss | 15 +++++----------
pages/cart/cart/cart.js | 16 ++++++++++------
pages/cart/cart/cart.wxml | 8 ++------
pages/cart/cart/cart.wxss | 4 ++--
pages/cart/cart2/cart2.js | 2 +-
pages/cart/cart2_pt/cart2_pt.js | 2 +-
pages/cart/cart_wk/cart_wk.js | 2 +-
pages/goods/categoryList/categoryList.js | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------
pages/goods/categoryList/categoryList.wxml | 43 +++++++++++++++++++++----------------------
pages/goods/categoryList/categoryList.wxss | 16 ++++++++++++----
pages/goods/goodsInfo/goodsInfo.js | 5 ++++-
pages/goods/goodsInfo/goodsInfo.wxml | 2 +-
pages/goods/goodsList/goodsList.wxml | 2 +-
pages/goods/search/search.wxml | 2 +-
pages/index/index/index.js | 55 +++++++++++++++----------------------------------------
pages/index/index/index.wxml | 12 ++++++------
pages/tabbar/tabbar.js | 67 -------------------------------------------------------------------
pages/tabbar/tabbar.wxml | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
pages/tabbar/tabbar.wxss | 1 -
pages/team/team_show/team_show.js | 2 +-
pages/user/binding_info/binding_info.js | 2 +-
pages/user/collect_list/collect_list.js | 2 +-
pages/user/comment/comment.js | 2 +-
pages/user/coupon/coupon.wxml | 4 ++--
pages/user/deposit/prepaid/msg/msg.js | 2 +-
pages/user/get_user_info/get_user_info.wxml | 2 +-
pages/user/index/index.js | 36 ++++++++++--------------------------
pages/user/index/index.wxml | 10 ++--------
pages/user/integral/msg/msg.js | 2 +-
pages/user/member/bring/msg/msg.js | 2 +-
pages/user/my_service/tment_details.js | 2 +-
pages/user/order_list/order_list.js | 3 ++-
pages/user/return_goods_list/return_goods_list.wxml | 2 +-
utils/auth.js | 2 +-
utils/request.js | 4 ++--
39 files changed, 471 insertions(+), 387 deletions(-)
diff --git a/app.js b/app.js
index 0df5ad2..35768ac 100644
--- a/app.js
+++ b/app.js
@@ -5,66 +5,112 @@ var api = require("./api/api.js")
//公共方法和变量
App({
- editTabBar: function () {
+ editTabBar: function (taht,stoid,url) {
+ var that=this;
+ var th = taht
//使用getCurrentPages可以获取当前加载中所有的页面对象的一个数组,数组最后一个就是当前页面。
-
- var curPageArr = getCurrentPages(); //获取加载的页面
- var curPage = curPageArr[curPageArr.length - 1]; //获取当前页面的对象
+ var custum_data=this.globalData.custum_data;
+ var isIpx=this.globalData.isIpx;
+ //var curPageArr = getCurrentPages(); //获取加载的页面
+ //var curPage = curPageArr[curPageArr.length - 1]; //获取当前页面的对象
+ var curPage=th;
var pagePath = curPage.route; //当前页面url
if (pagePath.indexOf('/') != 0) {
- pagePath = '/' + pagePath;
+ pagePath = '/' + pagePath;
}
- console.log("获取加载的页面:="+curPageArr)
- console.log("获取当前页面的对象:="+curPage)
- console.log("当前页面url:="+pagePath)
- var tabBar = this.globalData.tabBar;
- for (var i = 0; i < tabBar.list.length; i++) {
- tabBar.list[i].active = false;
- if (tabBar.list[i].weappurl == pagePath) {
- tabBar.list[i].active = true; //根据页面地址设置当前页面状态
- }
+ if(isIpx){
+ if(custum_data){
+ that.set_custom_nav(custum_data,isIpx,pagePath,url,curPage);
+ }else{
+ var tabBar = {
+ 'iscustom':2,
+ 'url':url,
+ 'active':pagePath,
+ 'isIpx':isIpx,
+ cartGoodsNum:this.globalData.cartGoodsNum
+ }
+ curPage.setData({
+ tabBar:tabBar,
+ isIpx:isIpx,
+ cartGoodsNum:this.globalData.cartGoodsNum
+ })
+ }
+
+ }else{
+ var isIpx = false;
+ wx.getSystemInfo({
+ success: (res) => {
+ // console.log(res)
+ let modelmes = res.model; //手机品牌
+ if (modelmes.indexOf('iPhone X') != -1) { //XS,XR,XS MAX均可以适配,因为indexOf()会将包含'iPhone X'的字段都查出来
+ isIpx = true
+ }
+ //缓存住,下次就不调用接口了
+ that.globalData.isIpx=isIpx;
+ getApp().request.promiseGet("/api/weshop/storeFooter/get/"+stoid, {
+ }).then(res => {
+ var e = res;
+ if(e.data.code != -1){
+ that.globalData.custum_data=e.data.data;
+ that.set_custom_nav(e.data.data,isIpx,pagePath,url,curPage);
+ }else{
+ var tabBar = {
+ 'iscustom':2,
+ 'url':url,
+ 'active':pagePath,
+ 'isIpx':isIpx,
+ cartGoodsNum:this.globalData.cartGoodsNum
+ }
+ curPage.setData({
+ tabBar:tabBar,
+ isIpx:isIpx,
+ cartGoodsNum:this.globalData.cartGoodsNum
+ })
+ }
+
+ })
+ },
+ })
}
- curPage.setData({
- tabBar: tabBar
- });
},
+ set_custom_nav(data,isIpx,pagePath,url,curPage){
+ //缓存住,下次就不调用接口了
+ var itemList = data.data;
+ itemList = JSON.parse(itemList)
+ //使用getCurrentPages可以获取当前加载中所有的页面对象的一个数组,数组最后一个就是当前页面。
+ for (var i = 0; i < itemList.length; i++) {
+ itemList[i].active = false;
+ if (itemList[i].weappurl == pagePath) {
+ itemList[i].active = true; //根据页面地址设置当前页面状态
+ }
+ }
+
+ //如果当服务端返回的值有数据就渲染数据到页面
+ var tabBar = {
+ 'iscustom':1,
+ 'url':url,
+ 'active':pagePath,
+ 'list':itemList,
+ 'backgroundColor': data.bkcolor,
+ 'selectedColor' : data.fontcolor_sele,
+ 'color':data.fontcolor,
+ 'length':itemList.length,
+ 'isIpx':isIpx,
+ cartGoodsNum:this.globalData.cartGoodsNum
+ }
+ curPage.setData({
+ tabBar:tabBar,
+ isIpx:isIpx,
+ cartGoodsNum:this.globalData.cartGoodsNum
+ })
+ },
+
globalData: {
- tabBar: {
- "color": "#6e6d6b",//文字未选择color
- "selectedColor": "#f23030",//文字被选择后color
- "borderStyle": "white",//
- "backgroundColor": "#ffffff",//背景color
- "iscustom":'',
- "url":"",
- "list": [
- {
- "weappurl": "/pages/index/index/index",
- "nav_name": "首页",
- "src": "/miniapp/images/bar/index.png",
- "src_sele": "/miniapp/images/bar/index_on.png"
- },
- {
- "weappurl": "/pages/goods/categoryList/categoryList",
- "nav_name": "分类",
- "src": "/miniapp/images/bar/fl.png",
- "src_sele": "/miniapp/images/bar/fl_on.png"
- },
- {
- "weappurl": "/pages/cart/cart/cart",
- "nav_name": "购物车",
- "src": "/miniapp/images/bar/car.png",
- "src_sele": "/miniapp/images/bar/car_on.png"
- },
- {
- "weappurl": "/pages/user/index/index",
- "nav_name": "我的",
- "src": "/miniapp/images/bar/user.png",
- "src_sele": "/miniapp/images/bar/user_on.png"
- }
- ]
- },
- isTabBar:false,
+ cartGoodsNum:0, //购物车总数量
+ isTabBar :false,
+ isIpx: false, //适配IPhoneX
+ url:"",
setting: t,
wechatUser: null,
userInfo: null,
@@ -86,12 +132,14 @@ App({
to_group:null, //参团传递的数据
wxapp_buy_obj:null, //微信小程序购买的Object
pk_store:null, //选择的门店
+
},
auth: o,
request: a,
onLaunch: function() {
this.initExt();
var t = this.globalData.setting;
+ //console.log(t)
t.resourceUrl = t.url + "/template/mobile/rainbow";
var clientWidth = wx.getSystemInfoSync().windowWidth;
var rpxR = 750 / clientWidth;
@@ -106,6 +154,44 @@ App({
app.globalData.user_id= app.globalData.userInfo.user_id;
}
}
+
+ wx.getSystemInfo({
+ success: (res) => {
+ // console.log(res)
+ let modelmes = res.model; //手机品牌
+ console.log('手机品牌', modelmes)
+ if (modelmes.indexOf('iPhone X') != -1) { //XS,XR,XS MAX均可以适配,因为indexOf()会将包含'iPhone X'的字段都查出来
+ this.globalData.isIpx = true
+ }
+ },
+ })
+ console.log(t.stoid,this.globalData.user_id)
+ var tha = this
+ wx.request({
+ url: t.url+'/api/weshop/cart/page',
+ data: {
+ store_id:t.stoid,
+ user_id:tha.globalData.user_id,
+ state:0,
+ is_gift:0
+ },
+ methods:'GET',
+ header: {
+ 'content-type': 'json'
+ },
+ success: function(e){
+
+ var num = 0;
+ for (var i = 0; i < e.data.data.pageData.length; i++) {
+ num += e.data.data.pageData[i].goods_num;
+ }
+ console.log("购物车数量:=",num)
+ tha.globalData.cartGoodsNum=num
+ },
+ fail: function(){}
+ })
+
+
},
//---初始化第三方----
@@ -333,6 +419,7 @@ App({
//----智能跳转,判断 非tabBar,tabBar页面的跳转----
goto:function (url) {
+
var arr_tabbar=["/pages/index/index/index","/pages/goods/categoryList/categoryList",
"/pages/goods/categoryList/categoryList?type=2",
"/pages/goods/categoryList/categoryList?type=1",
@@ -340,10 +427,12 @@ App({
if(arr_tabbar.indexOf(url)!=-1){
if(url.indexOf("categoryList?type=1")!=-1) this.globalData.cat_type=1;
if(url.indexOf("categoryList?type=2")!=-1) this.globalData.cat_type=2;
- wx.switchTab({ url: url, }) //跳到tabbar页
+ wx.navigateTo({ url: url, }) //跳到tabbar页
+
}else{
wx.navigateTo({ url: url, }) //跳到非tabbar页
}
+ //wx.navigateTo({ url: url, }) //跳到非tabbar页
},
//显示提示,word提示内容,type 0失败,提示 1成功
diff --git a/app.json b/app.json
index 80c7662..83e2937 100644
--- a/app.json
+++ b/app.json
@@ -117,38 +117,6 @@
"backgroundColor": "#ffffff",
"enablePullDownRefresh": true
},
- "tabBar": {
- "color": "#6e6d6b",
- "selectedColor": "#f23030",
- "borderStyle": "white",
- "backgroundColor": "#ffffff",
- "list": [
- {
- "pagePath": "pages/index/index/index",
- "text": "首页",
- "iconPath": "packageA/images/bar/index.png",
- "selectedIconPath": "packageA/images/bar/index_on.png"
- },
- {
- "pagePath": "pages/goods/categoryList/categoryList",
- "text": "分类",
- "iconPath": "packageA/images/bar/fl.png",
- "selectedIconPath": "packageA/images/bar/fl_on.png"
- },
- {
- "pagePath": "pages/cart/cart/cart",
- "text": "购物车",
- "iconPath": "packageA/images/bar/car.png",
- "selectedIconPath": "packageA/images/bar/car_on.png"
- },
- {
- "pagePath": "pages/user/index/index",
- "text": "我的",
- "iconPath": "packageA/images/bar/user.png",
- "selectedIconPath": "packageA/images/bar/user_on.png"
- }
- ]
- },
"debug": false,
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
diff --git a/components/diy_advertising/diy_advertising.js b/components/diy_advertising/diy_advertising.js
index a2f3aa1..6f66ec4 100644
--- a/components/diy_advertising/diy_advertising.js
+++ b/components/diy_advertising/diy_advertising.js
@@ -16,9 +16,10 @@ Component({
interval:3000,
duration:1000,
someData: {},
- max_sw_height:null,
+ max_sw_height:getApp().globalData.windowWidth,
},
methods: {
+
customMethod: function () { },
//---智能跳转---
go_url:function(e){
diff --git a/components/diy_advertising/diy_advertising.wxml b/components/diy_advertising/diy_advertising.wxml
index 08f65c4..fe1a1ae 100644
--- a/components/diy_advertising/diy_advertising.wxml
+++ b/components/diy_advertising/diy_advertising.wxml
@@ -1,9 +1,9 @@
-
+
-
+
建议宽度640
@@ -80,19 +80,31 @@
-
+
-
+
200*200
-
-
+
+
+
+
+
+ 200*200
+
+
+
+
+
+
+
@@ -137,10 +149,10 @@
300*150
-
+
-
+
@@ -388,9 +400,14 @@
-
+
+
-
@@ -400,10 +417,10 @@
-
-
-
+
+
+
diff --git a/components/diy_advertising/diy_advertising.wxss b/components/diy_advertising/diy_advertising.wxss
index 60f24cc..72e1551 100644
--- a/components/diy_advertising/diy_advertising.wxss
+++ b/components/diy_advertising/diy_advertising.wxss
@@ -17,7 +17,6 @@
}
.s1 {
- width: 100%;
display: flex;
}
@@ -152,14 +151,10 @@
.s4_gk {
/* background-color: rgb(129, 213, 249); */
- width: 32%;
color: #fff;
font-size: 32rpx;
- height: 240rpx;
text-align: center;
- margin-left: 1%;
float: left;
- margin-bottom: 8rpx;
}
.s4_gk1 {
@@ -331,8 +326,8 @@
width: 100%;
margin: 0;
}
-
-
-.zwp_s1{
- margin-bottom: 8rpx;
-}
\ No newline at end of file
+.sw_con{
+ position: relative;
+}
+.clicle{ width: 20rpx; height: 20rpx}
+.dots{ position: absolute; bottom: 10rpx; width: 100%; display: flex; justify-content: center}
diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js
index 81a9eea..05f1aae 100644
--- a/pages/cart/cart/cart.js
+++ b/pages/cart/cart/cart.js
@@ -55,11 +55,9 @@ Page({
},
onShow: function() {
var th = this;
- //th.setData({
- // isTabBar: getApp().globalData.isTabBar,
- //});
-
- t.editTabBar(); //显示自定义的底部导航
+ //调用底部导航
+ t.editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
+
this.getCardList();
if(getApp().globalData.user_id) getApp().requestCardNum();
//--获取是否又秒杀活动--
@@ -81,6 +79,12 @@ Page({
},
+ onHide(){
+ for(var i = 1; i < 100; i++) {
+ clearInterval(i);
+ }
+ },
+
//-------------获取购物车列表,要安装门店进行分类订单-----------
getCardList: function() {
var th = this;
@@ -1102,7 +1106,7 @@ Page({
},
//跳到首页
goto: function(e) {
- wx.switchTab({
+ navigateTo({
url: '/pages/index/index/index',
})
},
diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml
index 725c2da..8744b68 100644
--- a/pages/cart/cart/cart.wxml
+++ b/pages/cart/cart/cart.wxml
@@ -180,10 +180,6 @@
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/pages/cart/cart/cart.wxss b/pages/cart/cart/cart.wxss
index 4439f04..2f4dac1 100644
--- a/pages/cart/cart/cart.wxss
+++ b/pages/cart/cart/cart.wxss
@@ -31,7 +31,7 @@ page {
align-items: center;
justify-content: center;
background-color: rgb(255, 255, 255);
- margin-bottom: 99rpx;
+ margin-bottom: 160rpx;
}
radio {
@@ -143,7 +143,7 @@ radio {
height: 100rpx;
position: fixed;
left: 0;
- bottom: 0;
+ bottom: 45px;
font-size: 28rpx;
color: #666;
background-color: rgb(255, 255, 255);
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 4f5b5f6..51abda5 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -142,7 +142,7 @@ Page({
var th=this;
if (th.data.isclose==0){
- wx.switchTab({
+ wx.navigateTo({
url: "/pages/index/index/index"
})
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index 7a5c415..7d85168 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -217,7 +217,7 @@ Page({
onShow: function() {
var th=this;
if (th.data.isclose==0){
- wx.switchTab({
+ wx.navigateTo({
url: "/pages/index/index/index"
})
}else{
diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js
index 31e5b8a..0bd9bda 100644
--- a/pages/cart/cart_wk/cart_wk.js
+++ b/pages/cart/cart_wk/cart_wk.js
@@ -62,7 +62,7 @@ Page({
onShow: function() {
var th = this;
if (th.data.isclose == 0) {
- wx.switchTab({
+ wx.navigateTo({
url: "/pages/index/index/index"
})
}
diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js
index 997e781..fcd1c55 100644
--- a/pages/goods/categoryList/categoryList.js
+++ b/pages/goods/categoryList/categoryList.js
@@ -47,13 +47,14 @@ Page({
is_pl_time:0,
requestData:null, //风格三的商品数据列表 分页
stylePage:1, //商品列表分页标识
+
//风格三使用
url: t.globalData.setting.imghost,
currentPage: 1,
requestData: null,
allData: null,
openFilterModal: !1,
- baseUrl: "api/weshop/goods/page?1=1&orderField=goods_id&orderType=desc&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1",
+ baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=goods_id&orderType=desc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1",
requestUrl: "",
tabname: "goods_id", //排序的字段
adname: "desc", //升降的字段
@@ -152,10 +153,8 @@ Page({
onShow:function(){
var that=this;
- that.setData({
- isTabBar: getApp().globalData.isTabBar,
- });
- t.editTabBar(); //显示自定义的底部导航
+ //调用底部导航
+ t.editTabBar(that,getApp().globalData.setting.stoid,getApp().globalData.url);
//this.requestFirstCategoris();
if(getApp().globalData.user_id) getApp().requestCardNum();
getApp().getConfig2(function (e) {
@@ -463,9 +462,12 @@ Page({
success: function (e) {
var arr=new Array();
var dda = e.data.data.pageData;
- s.setData({brand_list:dda});
+ s.setData({brand_list:dda});
for (var i = 0; i < dda.length; i++) {
- if(dda[i].logo && dda[i].logo.indexOf("http")<0) dda[i].logo = oo.imghost+dda[i].logo;
+ //console.log(dda[i].logo)
+ if(dda[i].logo && dda[i].logo.indexOf("http")<0){
+ dda[i].logo = oo.imghost+dda[i].logo;
+ }
if (arr.length>0){
var find = 0;
//寻找字母在arr数组中是否存在,不存在就要添加,存在就在要这个数组添加元素
@@ -487,8 +489,15 @@ Page({
}
//进行排序
arr.sort(compare("zm"));
+ for(var i=0;i< arr.length;i++){
+ for(var j=0;j 1) {
//如果分页不是在第一页 那么就把返回的数据追加到原有数据后面
var arr = s.data.requestData
@@ -765,46 +777,43 @@ Page({
countDownNum: countDownNum,
requestData: []
});
- s.setData({
- timer:setInterval(function () {
- if (countDownNum == 0) {
- clearInterval(s.data.timer);
- //关闭定时器之后,可作其他处理
- s.setData({
- msgStatus: false,
- })
-
- //如果没有数据就把分页初始化成第一页
- //没有数据根据当前分类id去找到下一个分类id再次传递给服务端请求数据
- var dataArray = s.data.one_level_classify
- var index = s.data.index
- console.log(dataArray[index + 1])
- if (dataArray[index + 1] == undefined || dataArray[index + 1] == "undefined"){
- console.log("dataArray[index + 1] = undefined")
- s.setData({
- stylePage: 1,
- msgStatus: true,
- lastMsg: true
- });
- }else{
- s.setData({
- stylePage: 1,
- index: index + 1,
- select_classify_on: index + 1,
- cat_id: dataArray[index + 1]['items']['id'],
- classify_name: dataArray[index + 1]['items']['name']
- });
- s.style(s.data.stylePage, dataArray[index + 1]['items']['id']);
- }
-
- }
- countDownNum--;
+ s.data.timer=setInterval(function () {
+ if (countDownNum == 0) {
+ clearInterval(s.data.timer);
+ //关闭定时器之后,可作其他处理
s.setData({
- countDownNum: countDownNum
+ msgStatus: false,
})
- }, 1000)
- })
+ //如果没有数据就把分页初始化成第一页
+ //没有数据根据当前分类id去找到下一个分类id再次传递给服务端请求数据
+ var dataArray = s.data.one_level_classify
+ var index = s.data.index
+ console.log(dataArray[index + 1])
+ if (dataArray[index + 1] == undefined || dataArray[index + 1] == "undefined"){
+ console.log("dataArray[index + 1] = undefined")
+ s.setData({
+ stylePage: 1,
+ msgStatus: true,
+ lastMsg: true
+ });
+ }else{
+ s.setData({
+ stylePage: 1,
+ index: index + 1,
+ select_classify_on: index + 1,
+ cat_id: dataArray[index + 1]['items']['id'],
+ classify_name: dataArray[index + 1]['items']['name']
+ });
+ s.style(s.data.stylePage, dataArray[index + 1]['items']['id']);
+ }
+
+ }
+ countDownNum--;
+ s.setData({
+ countDownNum: countDownNum
+ })
+ }, 1000)
}
diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml
index f2997a4..4f86dc6 100644
--- a/pages/goods/categoryList/categoryList.wxml
+++ b/pages/goods/categoryList/categoryList.wxml
@@ -19,7 +19,7 @@
-
+
暂无分类
- 去逛逛
+ 去逛逛
商家暂未设置分类
- 去逛逛
+ 去逛逛
@@ -112,11 +112,12 @@
+
-
+
-
-
+
+
国家
@@ -184,11 +185,11 @@
-
+
-
- {{user.name}}
+
+ {{user.name}}
@@ -260,7 +261,7 @@
商家暂未设置分类
- 去逛逛
+ 去逛逛
@@ -287,8 +288,8 @@
-
-
+
+
国家
@@ -316,7 +317,7 @@
-
+
@@ -349,10 +350,10 @@
-
+
-
+
{{user.name}}
@@ -365,7 +366,7 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/goods/categoryList/categoryList.wxss b/pages/goods/categoryList/categoryList.wxss
index 2a79d0e..3f369be 100644
--- a/pages/goods/categoryList/categoryList.wxss
+++ b/pages/goods/categoryList/categoryList.wxss
@@ -244,15 +244,23 @@ margin: auto;
margin-top: 35rpx;
}
.select_classify{
- background: #d60021;
-border-radius: 30rpx;
-color: #fff;
+ /* 20200530 update */
+/* background: #d60021; */
+background:white;
+/* border-radius: 30rpx; */
+/* color: #fff; */
+color:black;
height: 48rpx;
line-height: 45rpx;
+font-weight:700;
}
.select_classify.width80{
- width: 74.5%;
+ /* 20200530updata */
+ /* width: 74.5%; */
+ width: 100%;
+ height: 100rpx;
+ line-height: 100rpx;
}
.select_classify.width80.text-indent{
text-indent: 38rpx;
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index 7a5c8b6..098e621 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -752,6 +752,9 @@ Page({
onUnload: function() {},
onHide: function() {
this.data.is_timer = 0;
+ for(var i = 1; i < 100; i++) {
+ clearInterval(i);
+ }
},
//----------三个选项按钮-----------
tabClick: function(t) {
@@ -3137,7 +3140,7 @@ Page({
var vpath = res.path;
var context = wx.createCanvasContext('share');
//先画背景
- var pg_path = "../../../images/share/share_bg.png";
+ var pg_path = "/pacj/images/share/share_bg.png";
context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
//--昵称---
context.setFontSize(24 * unit)
diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml
index 095eded..b9784b7 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxml
+++ b/pages/goods/goodsInfo/goodsInfo.wxml
@@ -824,7 +824,7 @@
收藏
-
+
{{cartGoodsNum}}
购物车
diff --git a/pages/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml
index ef97e90..2aa4d1c 100644
--- a/pages/goods/goodsList/goodsList.wxml
+++ b/pages/goods/goodsList/goodsList.wxml
@@ -127,7 +127,7 @@
没有相关的数据
- 去逛逛
+ 去逛逛
diff --git a/pages/goods/search/search.wxml b/pages/goods/search/search.wxml
index 0abc014..0666b43 100644
--- a/pages/goods/search/search.wxml
+++ b/pages/goods/search/search.wxml
@@ -110,7 +110,7 @@
没有相关的数据
- 去逛逛
+ 去逛逛
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index d25120c..0f391f0 100644
--- a/pages/index/index/index.js
+++ b/pages/index/index/index.js
@@ -15,6 +15,7 @@ var regeneratorRuntime = require('../../../utils/runtime.js');
var api = require('../../../api/api.js');
var d = getApp().globalData;
+
Page({
data: {
url: o.imghost,
@@ -71,13 +72,12 @@ Page({
new_image: "", //新人有礼弹窗图片
new_nav: "", //新人页面跳转地址
- w_holiday_pop:0
+ w_holiday_pop:0,
},
onLoad: function() {
var th = this;
-
//看一下商家是否开通了权益
//--初始化是否有打勾--
getApp().request.promiseGet("/api/weshop/users/grade/vip/init/get", {
@@ -92,7 +92,7 @@ Page({
});
}
})
-
+
},
//关闭新用户领取广告
@@ -104,42 +104,14 @@ Page({
},
async onShow() {
- var th = this;
- //获取底部导航
- // await getApp().request.promiseGet("/api/weshop/storeFooter/get/"+o.stoid, {
-
- // }).then(res => {
- // var e = res;
- // console.log(e)
- // if(e.data.code != -1){
- // getApp().globalData.isTabBar = true
- // //console.log(JSON.parse(e))
- // var itemList = e.data.data.data;
-
- // itemList = JSON.parse(itemList)
- // for(var i=0; i
-
+
全部分类
@@ -246,7 +246,7 @@
-
+
@@ -359,9 +359,9 @@
-
-
-
+
+
+
+
diff --git a/pages/tabbar/tabbar.js b/pages/tabbar/tabbar.js
index 2371de0..e69de29 100644
--- a/pages/tabbar/tabbar.js
+++ b/pages/tabbar/tabbar.js
@@ -1,67 +0,0 @@
-// pages/tabbar.js
-var d = getApp().globalData;
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- isTabBar:d.isTabBar
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
-})
\ No newline at end of file
diff --git a/pages/tabbar/tabbar.wxml b/pages/tabbar/tabbar.wxml
index b5e6a70..6abe180 100644
--- a/pages/tabbar/tabbar.wxml
+++ b/pages/tabbar/tabbar.wxml
@@ -1,13 +1,122 @@
-
-
+
+
-
-
-
- {{item.nav_name}}
-
+
+
+
+
+ {{tabBar.cartGoodsNum}}
+
+
+
+
+ {{item.nav_name}}
+
+
+
+
+
+ {{tabBar.cartGoodsNum}}
+
+
+
+
+
+
+
+
+
+
+
+ {{item.nav_name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 首页
+
+
+
+
+
+
+
+ 首页
+
+
+
+
+
+
+
+
+
+
+ 分类
+
+
+
+
+
+
+
+ 分类
+
+
+
+
+
+
+
+
+ {{tabBar.cartGoodsNum}}
+
+
+
+ 购物车
+
+
+
+
+
+ {{tabBar.cartGoodsNum}}
+
+
+
+ 购物车
+
+
+
+
+
+
+
+
+
+ 我的
+
+
+
+
+
+
+
+ 我的
+
+
+
+
diff --git a/pages/tabbar/tabbar.wxss b/pages/tabbar/tabbar.wxss
index 979f504..e69de29 100644
--- a/pages/tabbar/tabbar.wxss
+++ b/pages/tabbar/tabbar.wxss
@@ -1 +0,0 @@
-/* pages/tabbar.wxss */
\ No newline at end of file
diff --git a/pages/team/team_show/team_show.js b/pages/team/team_show/team_show.js
index 498853c..c3d2f8f 100644
--- a/pages/team/team_show/team_show.js
+++ b/pages/team/team_show/team_show.js
@@ -523,7 +523,7 @@ Page({
if(getCurrentPages()>1)
wx.navigateBack({delta: 1})
else
- wx.switchTab({
+ wx.navigateTo({
url: "/pages/index/index/index"
});
},
diff --git a/pages/user/binding_info/binding_info.js b/pages/user/binding_info/binding_info.js
index 63d3cb8..7fcf09d 100644
--- a/pages/user/binding_info/binding_info.js
+++ b/pages/user/binding_info/binding_info.js
@@ -139,7 +139,7 @@ Page({
"function" == typeof cb && cb(e.globalData.userInfo, e.globalData.wechatUser);
e.showWarning("绑定成功");
setTimeout(function(){
- wx.switchTab({
+ wx.navigateTo({
url: '/pages/user/index/index',
})
},1000);
diff --git a/pages/user/collect_list/collect_list.js b/pages/user/collect_list/collect_list.js
index 7bf50cf..396deba 100644
--- a/pages/user/collect_list/collect_list.js
+++ b/pages/user/collect_list/collect_list.js
@@ -129,7 +129,7 @@ Page({
goto: function(ee) {
- wx.switchTab({
+ wx.navigateTo({
url: '/pages/index/index/index',
})
},
diff --git a/pages/user/comment/comment.js b/pages/user/comment/comment.js
index 87eadde..051d8fa 100644
--- a/pages/user/comment/comment.js
+++ b/pages/user/comment/comment.js
@@ -150,7 +150,7 @@ Page({
},
//跳到首页
goto: function(ee) {
- wx.switchTab({
+ wx.navigateTo({
url: '/pages/index/index/index',
})
},
diff --git a/pages/user/coupon/coupon.wxml b/pages/user/coupon/coupon.wxml
index 1691ae7..b60831a 100644
--- a/pages/user/coupon/coupon.wxml
+++ b/pages/user/coupon/coupon.wxml
@@ -16,7 +16,7 @@
{{storeName}}
- {{typeId==1?'已使用':typeId==2?'已过期':'立即使用'}}
+ {{typeId==1?'已使用':typeId==2?'已过期':'立即使用'}}
限{{item.deadTimeFommat}}前使用
@@ -24,6 +24,6 @@
没有找到相关的数据
- 去逛逛
+ 去逛逛
diff --git a/pages/user/deposit/prepaid/msg/msg.js b/pages/user/deposit/prepaid/msg/msg.js
index bad6229..bc9d3ea 100644
--- a/pages/user/deposit/prepaid/msg/msg.js
+++ b/pages/user/deposit/prepaid/msg/msg.js
@@ -69,7 +69,7 @@ Page({
},
homepage:function(){
- wx.switchTab({
+ wx.navigateTo({
url: "../../../../index/index/index",
})
},
diff --git a/pages/user/get_user_info/get_user_info.wxml b/pages/user/get_user_info/get_user_info.wxml
index 2a30a3e..ffbf8ab 100644
--- a/pages/user/get_user_info/get_user_info.wxml
+++ b/pages/user/get_user_info/get_user_info.wxml
@@ -2,5 +2,5 @@
请先登录, 以便操作更多功能
- 返回首页
+ 返回首页
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 7a5acb4..21c6845 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -41,7 +41,6 @@ Page({
actImg: "",
is_assistance: 0, //助力活动
ad_img:"",
- isshow_vip:0,
},
goto_nav: function(e) {
var th = this;
@@ -79,19 +78,14 @@ Page({
onShow: function() {
this.is_assistance();
- this.getPlusCardType();
-
-
var stoid = app_d.setting.stoid;
var s = this,
th = s,
need_money = 0,
cur_g_num = 0;
- th.setData({
- isTabBar: getApp().globalData.isTabBar,
- });
- app.editTabBar(); //显示自定义的底部导航
+ //调用底部导航
+ getApp().editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
getApp().get_isbuy(th.setappdata);
if (getApp().globalData.user_id) getApp().requestCardNum();
/*------会员登录------*/
@@ -329,7 +323,11 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
- onHide: function() {},
+ onHide: function() {
+ for(var i = 1; i < 100; i++) {
+ clearInterval(i);
+ }
+ },
setappdata: function(t) {
if (t.isout == 1)
wx.navigateTo({
@@ -634,23 +632,9 @@ Page({
}
})
- },
-
- //--- 获取卡类列表 ---
- getPlusCardType: function () {
- var storid = os.stoid;
- var th = this;
- var isshow_vip=0;
- getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
- if(res.data.code==0){
- for(var i in res.data.data){
- var item=res.data.data[i];
- //IsStopBuy 如果是真的话,代表这个卡没有停用
- if(item.IsStopBuy!=true){ isshow_vip=1;break; }
- }
- th.setData({isshow_vip:isshow_vip})
- }
- })
}
+
+
+
})
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index f0225b2..efec660 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -1,4 +1,4 @@
-
+
@@ -63,9 +63,6 @@
-
-
-
@@ -89,7 +86,6 @@
-
@@ -301,7 +297,5 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/user/integral/msg/msg.js b/pages/user/integral/msg/msg.js
index dc75d89..9b67c67 100644
--- a/pages/user/integral/msg/msg.js
+++ b/pages/user/integral/msg/msg.js
@@ -68,7 +68,7 @@ Page({
},
homepage:function(){
- wx.switchTab({
+ wx.navigateTo({
url: "../../index/index",
})
},
diff --git a/pages/user/member/bring/msg/msg.js b/pages/user/member/bring/msg/msg.js
index 6dfb272..10bf1bd 100644
--- a/pages/user/member/bring/msg/msg.js
+++ b/pages/user/member/bring/msg/msg.js
@@ -63,7 +63,7 @@ Page({
},
homepage:function(){
- wx.switchTab({
+ wx.navigateTo({
url: "../../../index/index",
})
},
diff --git a/pages/user/my_service/tment_details.js b/pages/user/my_service/tment_details.js
index 2802f6e..7cdc06b 100644
--- a/pages/user/my_service/tment_details.js
+++ b/pages/user/my_service/tment_details.js
@@ -117,7 +117,7 @@ Page({
//跳到首页
goto: function(e) {
var th = this;
- wx.switchTab({
+ wx.navigateTo({
url: '/pages/index/index/index',
})
},
diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js
index bf1d6dd..ddcd462 100644
--- a/pages/user/order_list/order_list.js
+++ b/pages/user/order_list/order_list.js
@@ -501,6 +501,7 @@ Page({
if (good.goods_price != gg.shop_price) isok = 0;
}
+ var is_h=0;
if (!isok) {
wx.showModal({
title: '提示',
@@ -728,7 +729,7 @@ Page({
},
//跳到首页
goto: function(e) {
- wx.switchTab({
+ wx.navigateTo({
url: '/pages/index/index/index',
})
},
diff --git a/pages/user/return_goods_list/return_goods_list.wxml b/pages/user/return_goods_list/return_goods_list.wxml
index 9de6122..f690a85 100644
--- a/pages/user/return_goods_list/return_goods_list.wxml
+++ b/pages/user/return_goods_list/return_goods_list.wxml
@@ -24,6 +24,6 @@
没有找到相关的记录
- 去逛逛
+ 去逛逛
diff --git a/utils/auth.js b/utils/auth.js
index 0a74309..ca87f8b 100644
--- a/utils/auth.js
+++ b/utils/auth.js
@@ -282,7 +282,7 @@ module.exports = {
}, null, !0);
},
goHome: function() {
- wx.switchTab({
+ wx.navigateTo({
url: "/pages/index/index/index"
});
},
diff --git a/utils/request.js b/utils/request.js
index c7bd5b6..5eec6d7 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -69,9 +69,9 @@ module.exports = {
var i = getApp();
return i.auth.clearAuth(), i.showWarning("正在重新登录", function() {
var t = getCurrentPages();
- "pages/user/index/index" != t[t.length - 1].route ? wx.switchTab({
+ "pages/user/index/index" != t[t.length - 1].route ? wx.navigateTo({
url: "/pages/user/index/index"
- }) : wx.switchTab({
+ }) : wx.navigateTo({
url: "/pages/index/index/index"
});
}, null, !0), !1;
--
libgit2 0.21.4