Commit b3337d18 by 谢中龙

修改导航是分类时不能跳转的问题

parent 47d9e9b0
...@@ -25,7 +25,11 @@ Component({ ...@@ -25,7 +25,11 @@ Component({
*/ */
methods: { methods: {
handelGoHome() { handelGoHome() {
wxService.router('/pages/userCenter/userCenter').replace() // wxService.router('/pages/userCenter/userCenter').replace()
//关闭小程序内所有已经打开的页面
wx.reLaunch({
url: '/pages/userCenter/userCenter',
});
} }
} }
}) })
...@@ -42,6 +42,7 @@ wxService.page({ ...@@ -42,6 +42,7 @@ wxService.page({
this.setData({ this.setData({
pageNum: 1 pageNum: 1
}) })
this.getContentList(this.data.pageNum,current) this.getContentList(this.data.pageNum,current)
}, },
/** /**
...@@ -61,11 +62,42 @@ wxService.page({ ...@@ -61,11 +62,42 @@ wxService.page({
this.generatePointObject(tentacleInfo); this.generatePointObject(tentacleInfo);
} }
//获取种草分类数据
this.getCategoryList()
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getPageData();
this.updateFavoriteAndShareNumById();
},
//根据详情那边过来的点赞分享数据 更改列表中对应的数据
updateFavoriteAndShareNumById(){
console.log(wx.getStorageSync('articleInfo'))
let articleInfo = wx.getStorageSync('articleInfo');
if (articleInfo){
//更新数据
if (this.data.contentList.length != 0){
let obj = this.data.contentList.filter(item => item.id == articleInfo.id);
obj = obj.length != 0 ? obj[0] : null;
if(obj){
obj.enjoySum = articleInfo.enjoySum;
obj.transmitSum = articleInfo.transmitSum;
obj.type = articleInfo.type ? articleInfo.type : 0;
wx.removeStorageSync('articleInfo');
this.setData({
contentList : this.data.contentList
})
}
}
}
},
//获取界面数据信息
getPageData(){
// 原来放到onshow中的事件 现在放到这里
const { memberId, member } = wx.getStorageSync('_baseUserInfo') const { memberId, member } = wx.getStorageSync('_baseUserInfo')
const premiumExpireTime = member && member.premiumExpireTime || '' const premiumExpireTime = member && member.premiumExpireTime || ''
// ios 兼容 是不是plus vip // ios 兼容 是不是plus vip
...@@ -81,7 +113,7 @@ wxService.page({ ...@@ -81,7 +113,7 @@ wxService.page({
}) })
} }
this.getValidContentSetExplain() // 获取有效的种草配置文案 this.getValidContentSetExplain() // 获取有效的种草配置文案
this.getCategoryList()
this.getContentPermission() this.getContentPermission()
this.data.currentShareContent = null; this.data.currentShareContent = null;
}, },
...@@ -162,7 +194,7 @@ wxService.page({ ...@@ -162,7 +194,7 @@ wxService.page({
totalPages: data.totalPages, totalPages: data.totalPages,
totalElements: data.totalElements totalElements: data.totalElements
},()=>{ },()=>{
console.log('666666',this.data.contentList) // console.log('666666',this.data.contentList)
}) })
}else{ }else{
this.setData({ this.setData({
......
...@@ -35,6 +35,8 @@ wxService.page({ ...@@ -35,6 +35,8 @@ wxService.page({
skuVOList: [], skuVOList: [],
benefitData: '', benefitData: '',
isQiye: false, isQiye: false,
x : 0,
y : 0,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -42,6 +44,11 @@ wxService.page({ ...@@ -42,6 +44,11 @@ wxService.page({
onLoad(options) { onLoad(options) {
this.initPage(); this.initPage();
// this.setData({
// x: utils.configSliderBlock(app).x,
// y: utils.configSliderBlock(app).y,
// })
// 判断环境是不是企业微信 // 判断环境是不是企业微信
let env = wx.getStorageSync('_qyWeChat'); let env = wx.getStorageSync('_qyWeChat');
this.setData({ this.setData({
......
<!--pages/userCenter.wxml--> <!--pages/userCenter.wxml-->
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px"> <view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)--> <!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem"> <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
...@@ -38,8 +39,15 @@ ...@@ -38,8 +39,15 @@
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/> <plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view> </view>
</block> </block>
</view>
<view class="cell-me" wx:if="{{!isQiye}}"> <guide-page-modal show="{{guidePageModalShow}}" />
<share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/>
<!--<authorization-modal isAuthorization='{{isAuthorization}}'/>-->
<!-- 底部补充高度 防止被遮盖 -->
<view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view>
<!--联系我 客服ID-->
<!-- style='left:{{x}}px;top:{{y}}px' -->
<view class="cell-me" wx:if="{{!isQiye}}" >
<cell <cell
bind:startmessage='startmessage' bind:startmessage='startmessage'
isMask="0" isMask="0"
...@@ -50,11 +58,4 @@ ...@@ -50,11 +58,4 @@
bubbleColor="cb3c3c" bubbleColor="cb3c3c"
bind:completemessage="completemessage" bind:completemessage="completemessage"
plugid='766c50920993bf9c41c6c3d2761a2df5' /> plugid='766c50920993bf9c41c6c3d2761a2df5' />
</view>
</view> </view>
<guide-page-modal show="{{guidePageModalShow}}" />
<share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/>
<!--<authorization-modal isAuthorization='{{isAuthorization}}'/>-->
<!-- 底部补充高度 防止被遮盖 -->
<view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view>
<!--联系我 客服ID-->
...@@ -8,7 +8,6 @@ page{ ...@@ -8,7 +8,6 @@ page{
right: 10rpx; right: 10rpx;
top: 76%; top: 76%;
z-index: 2; z-index: 2;
} }
.bottom-fixed{ .bottom-fixed{
padding-bottom: 40rpx; padding-bottom: 40rpx;
......
...@@ -195,7 +195,7 @@ wxService.page({ ...@@ -195,7 +195,7 @@ wxService.page({
}, },
// 获取内容详情 // 获取内容详情
getContentDetail(){ getContentDetail(needStorage,type){
const { memberId, member } = wx.getStorageSync('_baseUserInfo') const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.post(`/merchant/contentMobileTerminal/getContentParticulars`,{ wxService.post(`/merchant/contentMobileTerminal/getContentParticulars`,{
id: this.data.id, id: this.data.id,
...@@ -206,7 +206,17 @@ wxService.page({ ...@@ -206,7 +206,17 @@ wxService.page({
if (result == 0) { if (result == 0) {
this.setData({ this.setData({
contentInfo: data contentInfo: data
}) });
if(needStorage){
wx.setStorageSync('articleInfo',{
id : data.id,
enjoySum: data.enjoySum ,
type : type,
transmitSum: data.transmitSum
});
}
this.getProList() this.getProList()
} }
...@@ -220,7 +230,8 @@ wxService.page({ ...@@ -220,7 +230,8 @@ wxService.page({
productIds: this.data.contentInfo.productIds productIds: this.data.contentInfo.productIds
} }
if (this.data.contentInfo.productIds && this.data.contentInfo.productIds.length > 0){ if (this.data.contentInfo.productIds && this.data.contentInfo.productIds.length > 0){
wxService.post(`/sale/product/buyer/listPage?pageNo=${this.data.pageNo}&pageSize=${this.data.pageSize}`, params).then(res => { wxService.post(`/sale/product/buyer/listPage?pageNo=${this.data.pageNo}&pageSize=${this.data.pageSize}`,
params).then(res => {
if (!res) return false if (!res) return false
const { result, data } = res.data const { result, data } = res.data
if (result == 0 && data.content) { if (result == 0 && data.content) {
...@@ -251,7 +262,7 @@ wxService.page({ ...@@ -251,7 +262,7 @@ wxService.page({
title: '点赞成功', title: '点赞成功',
icon: 'none' icon: 'none'
}) })
this.getContentDetail() this.getContentDetail(true,1);
} }
}).finally(() => { }).finally(() => {
...@@ -269,7 +280,7 @@ wxService.page({ ...@@ -269,7 +280,7 @@ wxService.page({
title: '取消点赞成功', title: '取消点赞成功',
icon: 'none' icon: 'none'
}) })
this.getContentDetail() this.getContentDetail(true,0)
} }
}).finally(() => { }).finally(() => {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
left: 0; left: 0;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
z-index: 99999; z-index: 99;
} }
.bottom-tab-bar .tab-bar-item{ .bottom-tab-bar .tab-bar-item{
......
...@@ -33,6 +33,12 @@ wxService.page({ ...@@ -33,6 +33,12 @@ wxService.page({
list: [], list: [],
currentPage: 1, currentPage: 1,
noData : false noData : false
},
showShareGoods : false,
shareGoodsObj : {
title: '',
path: '',
imageUrl: '',
} }
}, },
...@@ -42,13 +48,16 @@ wxService.page({ ...@@ -42,13 +48,16 @@ wxService.page({
onLoad: function (options) { onLoad: function (options) {
//首次进来先加载导购学院的列表 //首次进来先加载导购学院的列表
this.getGuidCollegeList(); this.getGuidCollegeList();
wx.hideShareMenu();
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.setData({
showShareGoods : false,
})
}, },
//点击事件 //点击事件
...@@ -179,27 +188,51 @@ wxService.page({ ...@@ -179,27 +188,51 @@ wxService.page({
} }
}); });
// 先不管触点 测试调用企业微信接口 },
// let inner_id = Integer.digit(item.productId, 10, 64);
// var path = 'pages/productDetail/productDetail' + '?i=' + inner_id; //定向转发商品给用户 分享功能
// wx.qy.shareToExternalContact({ onTapToShare(e){
// appid: app.globalData.appId,//小程序的appid let item = e.currentTarget.dataset.item;
// title: item.productName, //小程序消息的title // 生成触点对象
// imgUrl: item.productImgUrl,//小程序消息的封面图 let content = {
// page: path, //小程序消息打开后的路径 title: item.productName,
// success: function (res) { id: item.productId,
// //todo: url: item.productImgUrl
// wx.showToast({ }
// title: '推荐成功!' let tentacleInfo = {
// }); content: JSON.stringify(content),
// }, contentId: item.productId,
// fail: function (err) { contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型
// console.log('error---------------', err); title: item.productName, //标题
// } type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
// }); }
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
let tentacleId = res.id;
let inner_id = Integer.digit(item.productId, 10, 64);
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'pages/productDetail/productDetail' + '?i=' + inner_id + '&t=' + inner_tentacleId;
this.data.shareGoodsObj.title = item.productName;
this.data.shareGoodsObj.imageUrl = item.productImgUrl;
this.data.shareGoodsObj.path = path;
this.setData({
shareGoodsObj: this.data.shareGoodsObj,
showShareGoods : true,
});
}
});
},
//取消分享
onTapCancelShare(){
this.setData({
showShareGoods: false,
});
}, },
//去商城 //去商城
onTapToMall(){ onTapToMall(){
wx.redirectTo({ wx.redirectTo({
...@@ -348,7 +381,13 @@ wxService.page({ ...@@ -348,7 +381,13 @@ wxService.page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function (res) {
if (res.from == 'button'){
return {
title : this.data.shareGoodsObj.title,
path : this.data.shareGoodsObj.path,
imageUrl: this.data.shareGoodsObj.imageUrl
}
}
} }
}) })
\ No newline at end of file
...@@ -55,7 +55,11 @@ ...@@ -55,7 +55,11 @@
</view> --> </view> -->
</view> </view>
<view class='rg-btn'> <view class='rg-btn'>
<button class='theme-color' data-item="{{item}}" bindtap='onTapToRecommandProduct'>立即推荐</button> <button class='theme-color' data-item="{{item}}"
bindtap='onTapToRecommandProduct'>立即群发</button>
<!-- style='background-color:#0091FF' -->
<button class='theme-color'
data-item="{{item}}" bindtap='onTapToShare'>定向发送</button>
</view> </view>
</view> </view>
<!-- 优惠券 --> <!-- 优惠券 -->
...@@ -109,3 +113,14 @@ ...@@ -109,3 +113,14 @@
</view> </view>
<!-- tabbar --> <!-- tabbar -->
<tab-bar index="{{2}}"></tab-bar> <tab-bar index="{{2}}"></tab-bar>
<!-- 分享好友 -->
<view class='bg' style='display:{{showShareGoods ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
<view class='share-container {{showShareGoods ? "sliderUp" : ""}}'>
<button open-type="share">
<view class='share-item'>
<image src='/assets/imgs/7_1_0/wx-icon.png' mode='aspectFit'></image>
<text>微信好友</text>
</view>
</button>
</view>
\ No newline at end of file
...@@ -146,16 +146,14 @@ view{ ...@@ -146,16 +146,14 @@ view{
.price-btn .rg-btn{ .price-btn .rg-btn{
flex: 0; flex: 0;
min-width: 160rpx;
max-width: 160rpx;
height: 100%; height: 100%;
min-width: 300rpx;
max-width: 300rpx;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
justify-content: flex-end; justify-content: flex-end;
} }
.price-btn .rg-btn button{ .price-btn .rg-btn button{
font-size: 24rpx; font-size: 24rpx;
height: 50rpx; height: 50rpx;
...@@ -315,3 +313,56 @@ view{ ...@@ -315,3 +313,56 @@ view{
justify-content: center; justify-content: center;
font-size: 24rpx; font-size: 24rpx;
} }
.bg{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 1000;
display: none;
}
.share-container{
position: fixed;
width: 100%;
height: 200rpx;
background: #ffffff;
bottom: 0;
left: 0;
z-index: 1001;
display: flex;
align-items: center;
justify-content: space-around;
transition: all 0.3s;
transform: translateY(100%);
}
.share-container button{
appearance: none;
background: transparent;
border: none !important;
-webkit-appearance: none;
color:#333333;
}
.share-container button::after { border: none; }
.sliderUp{
transform: translateY(0) !important;
}
.share-container .share-item{
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
.share-container .share-item image{
width: 80rpx;
height: 80rpx;
margin-bottom: 5rpx;
}
\ No newline at end of file
...@@ -24,17 +24,26 @@ ...@@ -24,17 +24,26 @@
</view> </view>
<view class="title-border-text"> <view class="title-border-text">
<!--<input placeholder="这一刻想说什么..." name="article" value="{{params.article}}" />--> <!--<input placeholder="这一刻想说什么..." name="article" value="{{params.article}}" />-->
<textarea bindblur="bindWordLimit" style="width: 100%;" class='textarea-text' name="article" value="{{params.article}}" auto-height placeholder="这一刻想说什么..." /> <textarea bindblur="bindWordLimit"
</view> style="width: 100%;"
<view class="title-border" bindtap="selectTab"> class='textarea-text' name="article"
<image class="tab-icon" src="/assets/imgs/7_1_0/tab.png"></image> value="{{params.article}}"
auto-height
placeholder="这一刻想说什么..." />
</view>
<view class="tips-container" bindtap="selectTab">
<view class='tip-lf'>
<image class="tab-icon" src="/assets/imgs/7_1_0/relation.png" mode='aspectFit'></image>
<input class="tab-input" placeholder="选择标签" value="{{tabName}}" disabled="true" /> <input class="tab-input" placeholder="选择标签" value="{{tabName}}" disabled="true" />
</view> </view>
<view class='tip-rg'>
<image class="tab-icon" src="/assets/imgs/7_1_0/arrow-right-sku.png" mode='aspectFit'></image>
</view>
</view>
<view class="related-goods" bindtap="handleRelatedGoods"> <view class="related-goods" bindtap="handleRelatedGoods">
<image class="relate-img" mode="widthFix" src="/assets/imgs/7_1_0/relation.png"></image> <image class="relate-img" mode="widthFix" src="/assets/imgs/7_1_0/relation.png"></image>
<text class="relate-text">关联商品</text> <text class="relate-text">关联商品</text></view>
</view>
<view class="gress-list"> <view class="gress-list">
<grass-item pro-goods="{{proGoods}}"/> <grass-item pro-goods="{{proGoods}}"/>
</view> </view>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
@import './../../../../base/base.wxss'; @import './../../../../base/base.wxss';
page{ page{
padding-bottom: 100rpx; padding-bottom: 100rpx;
font-size: 26rpx;
} }
.grass-community{ .grass-community{
padding: 30rpx; padding: 30rpx;
...@@ -9,6 +10,12 @@ page{ ...@@ -9,6 +10,12 @@ page{
.upload-img { .upload-img {
margin: 0 20rpx 20rpx 0; margin: 0 20rpx 20rpx 0;
} }
.textarea-text{
width: 100%;
min-height: 300rpx;
}
.upload-tip { .upload-tip {
height: 28prx; height: 28prx;
color: rgba(170, 170, 170, 1); color: rgba(170, 170, 170, 1);
...@@ -50,6 +57,35 @@ page{ ...@@ -50,6 +57,35 @@ page{
line-height: 66rpx; line-height: 66rpx;
border-bottom: 1px solid rgba(151, 151, 151, 0.3); border-bottom: 1px solid rgba(151, 151, 151, 0.3);
} }
.tips-container{
display: flex;
align-items: center;
border-bottom: 1px solid rgba(151, 151, 151, 0.3);
height: 70rpx;
width: 100%;
}
.tips-container:active{
background: #f2f2f2;
}
.tips-container .tip-lf{
flex: 1;
display: flex;
align-items: center;
}
.tips-container .tip-rg{
flex: 0;
min-width: 60rpx;
max-width: 60rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.tab-icon{ .tab-icon{
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;
...@@ -70,6 +106,9 @@ page{ ...@@ -70,6 +106,9 @@ page{
background-color: rgba(216, 216, 216, 1); background-color: rgba(216, 216, 216, 1);
margin-top: 97rpx; margin-top: 97rpx;
display: flex;
align-items: center;
justify-content: center;
} }
.gress-list { .gress-list {
margin: 0 auto; margin: 0 auto;
......
...@@ -57,6 +57,7 @@ wxService.page({ ...@@ -57,6 +57,7 @@ wxService.page({
handlerDataOnPage.init(this, 'pages') handlerDataOnPage.init(this, 'pages')
if (this.options['scene']) { if (this.options['scene']) {
let idParam = decodeURIComponent(this.options['scene']).split('&')[0]; let idParam = decodeURIComponent(this.options['scene']).split('&')[0];
// let hasPageId = idParam ? (idParam.indexOf('pageId') > -1 ? true : false) : false;
let shareId = idParam && idParam.split('=')[1] || 0; let shareId = idParam && idParam.split('=')[1] || 0;
this.options.pageId = shareId; this.options.pageId = shareId;
} }
......
...@@ -116,7 +116,7 @@ class Http { ...@@ -116,7 +116,7 @@ class Http {
post (url, parmas, channel) { post (url, parmas, channel) {
let baseUserInfo = wx.getStorageSync('_baseUserInfo') let baseUserInfo = wx.getStorageSync('_baseUserInfo')
let guideUserInfo = wx.getStorageSync('guidBaseInfo'); let guideUserInfo = wx.getStorageSync('guidBaseInfo');
console.log('getTentacle------',this.getTentacle()) // console.log('getTentacle------',this.getTentacle())
// console.log('--------------header-----------------', this.getTentacle()) // console.log('--------------header-----------------', this.getTentacle())
// console.log('--------------token-----------------', this.getToken()) // console.log('--------------token-----------------', this.getToken())
......
...@@ -5,9 +5,11 @@ function currentLinkRouter(event, _this) { ...@@ -5,9 +5,11 @@ function currentLinkRouter(event, _this) {
const ev = event.currentTarget.dataset; const ev = event.currentTarget.dataset;
let curItemType = ev.item let curItemType = ev.item
const userInfo = wx.getStorageSync('_baseUserInfo') const userInfo = wx.getStorageSync('_baseUserInfo')
// link row // link row
if (curItemType.link) { if (curItemType.link) {
//处理返回值是空对象时 导致跳转失败
if (Object.keys(curItemType.link).length > 0){
let currentClickType = app.globalData.commonFunc.getLink(curItemType.link.type, curItemType) let currentClickType = app.globalData.commonFunc.getLink(curItemType.link.type, curItemType)
if (curItemType.link.type == 1) { if (curItemType.link.type == 1) {
...@@ -42,6 +44,27 @@ function currentLinkRouter(event, _this) { ...@@ -42,6 +44,27 @@ function currentLinkRouter(event, _this) {
} else if (curItemType.link.type == 9) { } else if (curItemType.link.type == 9) {
wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?${currentClickType}`) wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?${currentClickType}`)
} }
}
else{
let rowObj = typeof (curItemType.row) == "string" ? JSON.parse(curItemType.row) : curItemType.row
let currentClickRow = app.globalData.commonFunc.getLinkRow(rowObj.type, rowObj)
if (rowObj.type == 1) { }
else if (rowObj.type == 2) { }
else if (rowObj.type == 3) { }
else if (rowObj.type == 4) { }
else if (rowObj.type == 5) { }
else if (rowObj.type == 6) { }
else if (rowObj.type == 7) { }
else if (rowObj.type == 8) {
// 商品
wxService.router(`/pages/productDetail/productDetail?id=${currentClickRow}`)
}
else if (rowObj.type == 9) {
// 分类
wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?${currentClickRow}`)
}
}
} else if (curItemType.row) { } else if (curItemType.row) {
let rowObj = typeof(curItemType.row) == "string" ? JSON.parse(curItemType.row) : curItemType.row let rowObj = typeof(curItemType.row) == "string" ? JSON.parse(curItemType.row) : curItemType.row
let currentClickRow = app.globalData.commonFunc.getLinkRow(rowObj.type, rowObj) let currentClickRow = app.globalData.commonFunc.getLinkRow(rowObj.type, rowObj)
...@@ -63,7 +86,7 @@ function currentLinkRouter(event, _this) { ...@@ -63,7 +86,7 @@ function currentLinkRouter(event, _this) {
} }
} }
} }
//导出
module.exports = { module.exports = {
currentLinkRouter: currentLinkRouter currentLinkRouter: currentLinkRouter
} }
\ No newline at end of file
...@@ -266,7 +266,6 @@ class Logger { ...@@ -266,7 +266,6 @@ class Logger {
tip += ',%o' tip += ',%o'
}) })
params[0] = tip params[0] = tip
console.log.apply(console, params)
} }
} }
...@@ -294,7 +293,6 @@ function getUserInfoByBtn(userInfo) { ...@@ -294,7 +293,6 @@ function getUserInfoByBtn(userInfo) {
const currentEnv = wx.getStorageSync('_qyWeChat') const currentEnv = wx.getStorageSync('_qyWeChat')
// let currentLoginUrl = currentEnv ? `/member/qiyeweixin/minaLogin` : `/member/minaLogin` // let currentLoginUrl = currentEnv ? `/member/qiyeweixin/minaLogin` : `/member/minaLogin`
let currentLoginUrl = `/member/minaLogin` let currentLoginUrl = `/member/minaLogin`
console.log('登陆', currentLoginUrl)
return wxService.post(`${currentLoginUrl}`, { return wxService.post(`${currentLoginUrl}`, {
code: res[1].code, code: res[1].code,
...@@ -304,7 +302,6 @@ function getUserInfoByBtn(userInfo) { ...@@ -304,7 +302,6 @@ function getUserInfoByBtn(userInfo) {
}, (err) => { }, (err) => {
return Promise.reject(err) return Promise.reject(err)
}).then(response => { }).then(response => {
console.log('登陆response', response)
logger.log('getCrmUserInfo response', response) logger.log('getCrmUserInfo response', response)
if (response.data.data.rspCode === -1) { if (response.data.data.rspCode === -1) {
return Promise.reject(response.data.data) return Promise.reject(response.data.data)
...@@ -340,7 +337,6 @@ function _getUserInfo(ev) { ...@@ -340,7 +337,6 @@ function _getUserInfo(ev) {
setUserInfo() // 判断有无开卡 setUserInfo() // 判断有无开卡
}).catch(err => { }).catch(err => {
if (err) { if (err) {
console.log('err', err)
wx.showToast({ wx.showToast({
title: `您已拒绝授权!`, title: `您已拒绝授权!`,
icon: 'none' icon: 'none'
...@@ -352,11 +348,9 @@ function setUserInfo() { ...@@ -352,11 +348,9 @@ function setUserInfo() {
const userInfo = wx.getStorageSync('_baseUserInfo') const userInfo = wx.getStorageSync('_baseUserInfo')
// 新用户去激活领卡 // 新用户去激活领卡
if (userInfo && userInfo.member && !userInfo.member.mobile) { if (userInfo && userInfo.member && !userInfo.member.mobile) {
console.log('去开')
wxService.openCard() wxService.openCard()
return false return false
} else { } else {
console.log('已开')
} }
// 跳转 // 跳转
const urls = getCurrentPages() const urls = getCurrentPages()
...@@ -377,6 +371,17 @@ function setUserInfo() { ...@@ -377,6 +371,17 @@ function setUserInfo() {
}, 200) }, 200)
} }
//根据系统屏幕宽高设置联系我们滑块
function configSliderBlock(app){
let system = app.globalData.systemInfo;
let screenWidth = system.windowWidth,
screenHeight = system.windowHeight;
return {
x: screenWidth-70,
y: screenHeight-240
}
}
wxService.setGetAuthUserInfo(_getUserInfo); wxService.setGetAuthUserInfo(_getUserInfo);
module.exports = { module.exports = {
...@@ -403,5 +408,6 @@ module.exports = { ...@@ -403,5 +408,6 @@ module.exports = {
getAccountInfo, getAccountInfo,
aspectRatio, aspectRatio,
imageUtil, imageUtil,
validateEmail validateEmail,
configSliderBlock
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment