Commit 72a42b58 by 谢中龙

直播,领券等功能

parent 13887559
...@@ -101,7 +101,8 @@ ...@@ -101,7 +101,8 @@
"usingComponents": { "usingComponents": {
"authorization-modal": "/component/authorization-modal/authorization-modal", "authorization-modal": "/component/authorization-modal/authorization-modal",
"go-guid": "/component/goGuid/goGuid", "go-guid": "/component/goGuid/goGuid",
"loading": "/component/loading/loading" "loading": "/component/loading/loading",
"floatNav": "/component/floatNav/floatNav"
}, },
"window": { "window": {
"backgroundTextStyle": "dark", "backgroundTextStyle": "dark",
...@@ -121,6 +122,10 @@ ...@@ -121,6 +122,10 @@
"contactPlugin": { "contactPlugin": {
"version": "1.0.12", "version": "1.0.12",
"provider": "wx104a1a20c3f81ec2" "provider": "wx104a1a20c3f81ec2"
},
"live-player-plugin": {
"version": "1.0.0",
"provider": "wx2b03c6e691cd7370"
} }
}, },
"permission": { "permission": {
...@@ -129,4 +134,4 @@ ...@@ -129,4 +134,4 @@
} }
}, },
"sitemapLocation": "sitemap81.json" "sitemapLocation": "sitemap81.json"
} }
\ No newline at end of file
// components/floatNav/floatNav.js // components/floatNav/floatNav.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const utilLink = require('../../utils/currentLinkRouter')
const envInfo = require('../../config/index').envInfo
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -6,30 +11,106 @@ Component({ ...@@ -6,30 +11,106 @@ Component({
properties: { properties: {
}, },
// { path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home.png', animationObj: {}, type: '', title: '主页' },
// { path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/category.png', animationObj: {}, type: '', title: '分类' },
// { path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/order.png', animationObj: {}, type: '', title: '我的订单' },
// { path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/my.png', animationObj: {}, type: '', title: '我的' },
// { path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/cart.png', animationObj: {}, type: '', title: '购物车' }
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
isPopping: false,//是否已经弹出 isPopping: false,//是否已经弹出
navBars: [ navBars: [],
{ path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home.png', animationObj: {}, type: '', title: '主页' },
{ path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/category.png', animationObj: {}, type: '', title: '分类' },
{ path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/order.png', animationObj: {}, type: '', title: '我的订单' },
{ path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/my.png', animationObj: {}, type: '', title: '我的' },
{ path: '', icon: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/cart.png', animationObj: {}, type: '', title: '购物车' },
],
animMenu: {}, animMenu: {},
userIsLogin : false,
}, },
attached(){ attached(){
console.log('attached') console.log('attached')
}, },
lifetimes: {
ready() {
console.log(123123)
this.userHasLogined();
this.getPageConfig();
}
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
_getUserInfo(res = {}) {
this.triggerEvent('getAuth', res);
},
//获取页面配置信息
getPageConfig(){
if (envInfo.isMall){
let navBars = wx.getStorageSync('navBars');
if (navBars){
let tabBar = navBars.tabBar;
let currentTab = tabBar.images
currentTab.forEach(item => {
// 存在 row 处理数据 8 商品 9 分类
// 1. 外部小程序_url 2. 内部动态页面_pageId 3.预览 4. 内部页面 5. 卡券__1_卡包 2_激活领卡
let newRow = null
if (item.link) {
if (item.link.type == 2) {
// 父组件 更新
const urls = getCurrentPages()
const currentPath = urls[0]
const pageId = item.link.url
item.link.newPath = `/${currentPath.route}`
}
return
} else if (item.row) {
newRow = JSON.parse(item.row)
if (newRow.type == 8) {
newRow.newPath = '/pages/productDetail/productDetail'
} else if (newRow.type == 9) {
newRow.newPath = '/subPackage/page/pages/categoryPro/categoryPro'
}
item.row = newRow
}
});
//处理是否授权了
// 当前匹配路径是否需要授权 true 需要 false 不需要
currentTab.forEach(item => {
let checkUrl = ''
if (item.link) {
checkUrl = item.link.newPath ? item.link.newPath : item.link.url
} else if (item.row) {
checkUrl = item.row.newPath ? item.row.newPath : item.row.url
}
wxService.NoLoginPage(checkUrl).then(res => {
if (checkUrl) item.needAuth = res.needAuth;
this.setData({ navBars: currentTab })
});
});
}
else{
this.setData({
navBars: [],
})
}
}
},
//判断用户是否已经登录
userHasLogined(){
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
if (baseUserInfo && wx.getStorageSync('token')) {
this.setData({
userIsLogin : true
});
}
else{
userIsLogin : false
}
},
//点击弹出 //点击弹出
bindShowOrCloseMenu: function () { bindShowOrCloseMenu: function () {
if (this.data.isPopping) { if (this.data.isPopping) {
...@@ -43,12 +124,12 @@ Component({ ...@@ -43,12 +124,12 @@ Component({
this.popAnimation(); this.popAnimation();
this.setData({ this.setData({
isPopping: true isPopping: true
}) });
} }
}, },
//点击menu //点击menu
bindNav(e) { bindNav(event ) {
console.log(e) utilLink.currentLinkRouter(event, this)
}, },
//弹出nav动画 //弹出nav动画
popAnimation() { popAnimation() {
...@@ -103,8 +184,8 @@ Component({ ...@@ -103,8 +184,8 @@ Component({
}, },
//处理动画逻辑分4个和5个时 //处理动画逻辑分4个和5个时
handlerAnimation(len, index, animationContext) { handlerAnimation(len, index, animationContext) {
const translateFour = [[-50, -80], [-80, -30], [-80, 30], [-50, 80]]; const translateFour = [[-50, -30], [-80, 20], [-80, 80], [-50, 130]];
const translateFive = [[-50, -100], [-90, -55], [-110, 0], [-90, 55], [-50, 100]]; const translateFive = [[-50, -45], [-90, 0], [-110, 55], [-90, 112], [-50, 155]];
if (len == 4) { if (len == 4) {
animationContext.translate(translateFour[index][0], translateFour[index][1]).rotateZ(360).opacity(1).step(); animationContext.translate(translateFour[index][0], translateFour[index][1]).rotateZ(360).opacity(1).step();
} }
......
<!--components/floatNav/floatNav.wxml--> <!--components/floatNav/floatNav.wxml-->
<!--pages/menu/menu.wxml--> <!--pages/menu/menu.wxml-->
<view> <!-- <image src="{{item.icon}}" mode="aspectFit"></image> -->
<view class="img-style" data-item="{{item}}" data-index="{{idx}}" animation="{{item.animationObj}}" bindtap="bindNav" <view wx:if="{{navBars.length > 0}}">
<view class="img-style" data-item="{{item}}" data-index="{{idx}}" animation="{{item.animationObj}}"
wx:for="{{navBars}}" wx:for="{{navBars}}"
wx:for-item="item" wx:for-item="item"
wx:for-index="idx" wx:for-index="idx"
wx:key="*this"> wx:key="*this">
<image src="{{item.icon}}" mode="aspectFit"></image> <view class="tabs-con positionRe">
<button class="positionAbs"
wx:if="{{!userIsLogin && item.needAuth}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo'></button>
<image src="{{item.activeImageUrl}}" bindtap="bindNav" data-item="{{item}}" mode="aspectFit"></image>
</view>
</view> </view>
<view class="img-plus-style" animation="{{animMenu}}" bindtap="bindShowOrCloseMenu"> <view class="img-plus-style" animation="{{animMenu}}" bindtap="bindShowOrCloseMenu">
<image src="https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/menu.png" mode="aspectFit"></image> <image src="https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/menu.png" mode="aspectFit"></image>
......
...@@ -4,9 +4,12 @@ ...@@ -4,9 +4,12 @@
height: 82rpx; height: 82rpx;
width: 82rpx; width: 82rpx;
position: fixed; position: fixed;
bottom: 330rpx; /* bottom: 330rpx;
/* right: 30rpx; */ right: 25rpx; */
bottom: 225rpx;
right: 25rpx; right: 25rpx;
z-index: 100; z-index: 100;
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
/* background-color: rgba(192, 154, 116, 1); */ /* background-color: rgba(192, 154, 116, 1); */
...@@ -29,15 +32,41 @@ ...@@ -29,15 +32,41 @@
/* right: 30rpx; */ /* right: 30rpx; */
right: 25rpx; right: 25rpx;
opacity: 0; opacity: 0;
background-color: rgba(0, 0, 0, 0.4);
/* background-color: rgba(192, 154, 116, 1); */ /* background-color: rgba(192, 154, 116, 1); */
display: flex; display: flex;
align-items: center; align-items: center;
border-radius: 50%; border-radius: 50%;
justify-content: center; justify-content: center;
box-shadow: 0 0 10rpx 6rpx rgba(0, 0, 0, 0.1);
}
.tabs-con{
width: 100%;
height: 100%;
border-radius: 50%;
/* background-color: rgba(0, 0, 0, 0.4); */
background: #ffffff;
border: solid 1rpx #dddddd;
display: flex;
align-items: center;
justify-content: center;
}
.tabs-con button{
appearance: none;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: transparent;
z-index: 2;
padding: 0;
border-radius: 50%;
} }
.img-style image{ .img-style image{
width: 40rpx; width: 76rpx;
height: 40rpx; height: 76rpx;
border-radius: 50%;
} }
\ No newline at end of file
...@@ -18,12 +18,38 @@ Component({ ...@@ -18,12 +18,38 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
hasNav : 0,
}, },
lifetimes: {
ready() {
this.getPageConfig();
}
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
//获取page信息
getPageConfig(){
if (envInfo.isMall) {
let navBars = wx.getStorageSync('navBars');
if (navBars) {
this.setData({
hasNav: 2,
});
}
else {
this.setData({
hasNav:1,
});
}
}
else{
this.setData({
hasNav: 1,
});
}
},
handelGoHome() { handelGoHome() {
// wxService.router('/pages/userCenter/userCenter').replace() // wxService.router('/pages/userCenter/userCenter').replace()
//关闭小程序内所有已经打开的页面 //关闭小程序内所有已经打开的页面
......
<!--component/goHome/goHome.wxml--> <!--component/goHome/goHome.wxml-->
<view class="bottom-img" bindtap="handelGoHome"> <view class="bottom-img" bindtap="handelGoHome" wx:if="{{hasNav == 1}}">
<text>首页</text> <text>首页</text>
<!--<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png"></image>-->
</view> </view>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// 修改 BRANCH_ID 为对应的商户id // 修改 BRANCH_ID 为对应的商户id
// app.js 中brandId 修改为对应 // app.js 中brandId 修改为对应
const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 : //仅生产环境时 配置 :
//3001 3001 , wx313ec36b710125d4 //3001 3001 , wx313ec36b710125d4
//2006 泰华 , wx40fec8944623c8b3 //2006 泰华 , wx40fec8944623c8b3
...@@ -21,7 +21,7 @@ const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门 ...@@ -21,7 +21,7 @@ const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门
//2015 花在花园 //2015 花在花园
//2016 阿吉豆 //2016 阿吉豆
//2017 ACTREE wx2aae34874e88cdf5 //2017 ACTREE wx2aae34874e88cdf5
const BRANCH_ID = 1002 const BRANCH_ID = 3001
const isMall = true const isMall = true
// const needMock = '' // // const needMock = '' //
...@@ -86,7 +86,7 @@ const isMall = true ...@@ -86,7 +86,7 @@ const isMall = true
* appId = wxf7bc302c51166dc0 //小程序 appId * appId = wxf7bc302c51166dc0 //小程序 appId
* tunnel-token = 1ea3f0c0dd0c91ee54e546a99beafbfb //token 杨辰提供 * tunnel-token = 1ea3f0c0dd0c91ee54e546a99beafbfb //token 杨辰提供
* brandId= 2007 //商户Id * brandId= 2007 //商户Id
* contactUspluginId = 64bf88d82b3f0d506bd00ed90d5706f1 联系我插件id * contactUspluginId = e61babc802dd4d0d1e819130f7aa4bc5 联系我插件id
*/ */
/** /**
...@@ -148,7 +148,7 @@ const prod_brand_config = { ...@@ -148,7 +148,7 @@ const prod_brand_config = {
brandId: 2007, brandId: 2007,
plusIsOpen: false, plusIsOpen: false,
contactUsIsOpen: true, contactUsIsOpen: true,
contactUsPluginId: '64bf88d82b3f0d506bd00ed90d5706f1', contactUsPluginId: 'e61babc802dd4d0d1e819130f7aa4bc5',
hasTrial: false, hasTrial: false,
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
...@@ -211,8 +211,8 @@ const prod_brand_config = { ...@@ -211,8 +211,8 @@ const prod_brand_config = {
tunnelToken: '3c66e77863736a32380a5d683db3520b', tunnelToken: '3c66e77863736a32380a5d683db3520b',
brandId: 2010, brandId: 2010,
plusIsOpen: false, plusIsOpen: false,
contactUsIsOpen: true, contactUsIsOpen: false,
contactUsPluginId: '70ff0880b300a95bfb1f32877e212bde', contactUsPluginId: 'f86b306023ec790b70c0b45fcf308b04',
hasTrial: false, hasTrial: false,
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
...@@ -228,7 +228,7 @@ const prod_brand_config = { ...@@ -228,7 +228,7 @@ const prod_brand_config = {
brandId: 2012, brandId: 2012,
plusIsOpen: false, plusIsOpen: false,
contactUsIsOpen: true, contactUsIsOpen: true,
contactUsPluginId: '50be97dcb2e4d35db051fa764b9e4a0c', contactUsPluginId: 'e61babc802dd4d0d1e819130f7aa4bc5',
hasTrial: false, hasTrial: false,
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
...@@ -332,6 +332,11 @@ const speadProductsBanner = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/tui ...@@ -332,6 +332,11 @@ const speadProductsBanner = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/tui
// "provider": "wx104a1a20c3f81ec2" // "provider": "wx104a1a20c3f81ec2"
// } // }
//需要直播功能时 配置 app.json plugin中增加代码
// "live-player-plugin": {
// "version": "1.0.0",
// "provider": "wx2b03c6e691cd7370"
// }
// appid_dev_wx wxc3b64b09b1d3dfc2 // appid_dev_wx wxc3b64b09b1d3dfc2
// appid_test_wx wx857ea77f4f7f4f34// wxac09792264c49b5c // 1002商城 // appid_test_wx wx857ea77f4f7f4f34// wxac09792264c49b5c // 1002商城
...@@ -383,7 +388,7 @@ const imgConfig = { ...@@ -383,7 +388,7 @@ const imgConfig = {
} }
const token = { const token = {
dev: 'brand1001', //开发 dev: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588fcc33', //开发
test: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //测试 test: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //测试
test_store: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //测试 test_store: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //测试
pre: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //预生产 pre: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //预生产
......
...@@ -41,5 +41,6 @@ ...@@ -41,5 +41,6 @@
<!--<no-more wx:if="{{noMore}}"/>--> <!--<no-more wx:if="{{noMore}}"/>-->
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
...@@ -75,5 +75,6 @@ ...@@ -75,5 +75,6 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"navigationBarTitleText": "分类", "navigationBarTitleText": "分类",
"usingComponents": { "usingComponents": {
"go-home": "/component/goHome/goHome", "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid", "go-guid": "/component/goGuid/goGuid"
"floatNav": "/component/floatNav/floatNav"
} }
} }
\ No newline at end of file
...@@ -66,5 +66,5 @@ ...@@ -66,5 +66,5 @@
<go-home/> <go-home/>
<!-- 导航 --> <!-- 导航 -->
<!-- <floatNav /> --> <floatNav bind:getAuth="_getUserInfo"/>
<go-guid /> <go-guid />
\ No newline at end of file
...@@ -248,5 +248,6 @@ ...@@ -248,5 +248,6 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<select-coupon show="{{showSelectCoupon}}" bind:updateCoupon="updateCoupon" coupon-list="{{currentOrderList.couponDiscountPreviews}}"/> <select-coupon show="{{showSelectCoupon}}" bind:updateCoupon="updateCoupon" coupon-list="{{currentOrderList.couponDiscountPreviews}}"/>
...@@ -53,4 +53,5 @@ ...@@ -53,4 +53,5 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid /> <go-guid />
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
<go-guid /> <go-guid />
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<view class="position-bottom"> <view class="position-bottom">
<button type='primary' class="redeem-now" bindtap='handelPresentCouponCode'>出示券码</button> <button type='primary' class="redeem-now" bindtap='handelPresentCouponCode'>出示券码</button>
</view> </view>
......
...@@ -88,5 +88,6 @@ ...@@ -88,5 +88,6 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid /> <go-guid />
...@@ -3,5 +3,6 @@ ...@@ -3,5 +3,6 @@
<pic-nav-serve pic-nav="{{pItem.navigation.images}}" /> <pic-nav-serve pic-nav="{{pItem.navigation.images}}" />
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</block> </block>
...@@ -201,5 +201,5 @@ pagePath="{{pagePath}}" ...@@ -201,5 +201,5 @@ pagePath="{{pagePath}}"
code-img="{{codeImg}}"></share-poster> code-img="{{codeImg}}"></share-poster>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -31,4 +31,5 @@ ...@@ -31,4 +31,5 @@
<exchange-coupon-modal exchangeId="{{integralMallDetail.id}}" exchangePoint="{{integralMallDetail.point}}" isExchange='{{isExchange}}' /> <exchange-coupon-modal exchangeId="{{integralMallDetail.id}}" exchangePoint="{{integralMallDetail.point}}" isExchange='{{isExchange}}' />
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid /> <go-guid />
...@@ -66,5 +66,5 @@ ...@@ -66,5 +66,5 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -3,5 +3,6 @@ ...@@ -3,5 +3,6 @@
<image class='rule-img' src='{{ruleImg}}' mode="widthFix" /> <image class='rule-img' src='{{ruleImg}}' mode="widthFix" />
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
<go-guid /> <go-guid />
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<share-poster <share-poster
id="getPoster" id="getPoster"
bindmyevent="myEventListener" bindmyevent="myEventListener"
......
...@@ -57,4 +57,4 @@ ...@@ -57,4 +57,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
...@@ -24,4 +24,4 @@ ...@@ -24,4 +24,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid /> <go-guid />
<floatNav bind:getAuth="_getUserInfo"/>
...@@ -185,5 +185,5 @@ ...@@ -185,5 +185,5 @@
<apply-refund show="{{showApplyRefundModal}}" refundId="{{refundId}}" bind:ok="onDeliveryOk" /> <apply-refund show="{{showApplyRefundModal}}" refundId="{{refundId}}" bind:ok="onDeliveryOk" />
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -311,8 +311,16 @@ wxService.page({ ...@@ -311,8 +311,16 @@ wxService.page({
item.count = item.canRefundNum; item.count = item.canRefundNum;
}); });
let params = JSON.stringify(copyOrderInfo); delete copyOrderInfo.store;
delete copyOrderInfo.storeAddress;
delete copyOrderInfo.storeCode;
delete copyOrderInfo.storeId;
delete copyOrderInfo.storeName;
delete copyOrderInfo.latitude;
delete copyOrderInfo.longitude;
delete copyOrderInfo.orderStore;
let params = JSON.stringify(copyOrderInfo);
// 退款申请 // 退款申请
wxService.router(`/pages/refund/refund`).search({params}) wxService.router(`/pages/refund/refund`).search({params})
}, },
......
...@@ -165,5 +165,5 @@ ...@@ -165,5 +165,5 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -88,5 +88,6 @@ ...@@ -88,5 +88,6 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
...@@ -125,4 +125,5 @@ ...@@ -125,4 +125,5 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
...@@ -285,6 +285,16 @@ wxService.page({ ...@@ -285,6 +285,16 @@ wxService.page({
if (!res) return false if (!res) return false
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
//把页面信息缓存到本地
//获取tabs
let tabs = data.paragraphs.filter(item => item.type == 5);
if(tabs.length > 0){
wx.setStorageSync('navBars', tabs[0]);
}
else{
wx.removeStorageSync('navBars');
}
this.setData({ this.setData({
pageBackgroundColor: data.page.backgroundColor || 0 pageBackgroundColor: data.page.backgroundColor || 0
}) })
......
...@@ -90,5 +90,5 @@ ...@@ -90,5 +90,5 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
"appid": "wxac09792264c49b5c", "appid": "wx313ec36b710125d4",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E", "projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
...@@ -547,9 +547,9 @@ ...@@ -547,9 +547,9 @@
}, },
{ {
"id": 75, "id": 75,
"name": "subPackage/page/pages/liveVideo/liveVideo", "name": "直播入口",
"pathName": "subPackage/page/pages/liveVideo/liveVideo", "pathName": "subPackage/page/pages/liveVideo/liveVideo",
"query": "room_id=1", "query": "room_id=2",
"scene": null "scene": null
}, },
{ {
......
...@@ -66,7 +66,6 @@ view{ ...@@ -66,7 +66,6 @@ view{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: solid 2rpx #0091FF;
} }
.task-info-top-container .info-container .info-item .rg:active{ .task-info-top-container .info-container .info-item .rg:active{
......
...@@ -65,6 +65,7 @@ wxService.page({ ...@@ -65,6 +65,7 @@ wxService.page({
this.setData({ this.setData({
code: res.code code: res.code
}); });
console.log('wx.qy.login success ----', res)
wx.removeStorageSync('guideCodeImg'); wx.removeStorageSync('guideCodeImg');
this.jscode2session(res.code); this.jscode2session(res.code);
}, },
...@@ -86,6 +87,7 @@ wxService.page({ ...@@ -86,6 +87,7 @@ wxService.page({
jscode2session(code){ jscode2session(code){
let _this = this; let _this = this;
let url = envInfo.ctx + `/member/qiyeweixin/jscode2session?brandId=${app.globalData.brandId}&code=${code}`; let url = envInfo.ctx + `/member/qiyeweixin/jscode2session?brandId=${app.globalData.brandId}&code=${code}`;
console.log('请求的url和参数---', url)
wx.request({ wx.request({
url, url,
method: 'POST', method: 'POST',
...@@ -95,6 +97,7 @@ wxService.page({ ...@@ -95,6 +97,7 @@ wxService.page({
data: {}, data: {},
channel: null, channel: null,
success(r){ success(r){
console.log('/member/qiyeweixin/jscode2session success ----', r)
_this.setData({ _this.setData({
jsCodeSession : r.data.data, jsCodeSession : r.data.data,
btnIsDisabled : false, btnIsDisabled : false,
...@@ -116,6 +119,10 @@ wxService.page({ ...@@ -116,6 +119,10 @@ wxService.page({
this.getGuidUserInfo(res); this.getGuidUserInfo(res);
}, },
fail: err => { fail: err => {
wx.showToast({
title: '获取企业微信用户信息失败,请联系商家!',
icon : 'none'
});
console.log('获取企业微信信息失败,失败信息是----', err) console.log('获取企业微信信息失败,失败信息是----', err)
} }
}); });
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
<!--<no-more wx:if="{{noMore}}"/>--> <!--<no-more wx:if="{{noMore}}"/>-->
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
<!-- 库存没了 --> <!-- 库存没了 -->
<dialog-stock-empty show="{{dialogStockEmpty}}"/> <dialog-stock-empty show="{{dialogStockEmpty}}"/>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<dialog-user-limit show="{{dialogUserLimit}}"/> <dialog-user-limit show="{{dialogUserLimit}}"/>
<dialog-stock-empty show="{{dialogStockEmpty}}" bind:btnClick="onDialogBtnCallBack"/> <dialog-stock-empty show="{{dialogStockEmpty}}" bind:btnClick="onDialogBtnCallBack"/>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<go-guid /> <go-guid />
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
......
...@@ -50,5 +50,5 @@ ...@@ -50,5 +50,5 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -11,5 +11,6 @@ ...@@ -11,5 +11,6 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
</form> </form>
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
<floatNav bind:getAuth="_getUserInfo"/>
<select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" /> <select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" />
<select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/> <select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<image src="{{isGoToInvite ? inviteBanner : speadProductsBanner}}" mode="widthFix"></image> <image src="{{isGoToInvite ? inviteBanner : speadProductsBanner}}" mode="widthFix"></image>
</view> </view>
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
<go-guid/> <go-guid/>
...@@ -26,3 +26,4 @@ ...@@ -26,3 +26,4 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<water-flow-layout <water-flow-layout
type="2" type="2"
image-data="{{contentList}}" image-data="{{contentList}}"
......
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
</view> --> </view> -->
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
<x-dialog show="{{showDialig}}" bind:_closeDialog="closeDialog" /> <x-dialog show="{{showDialig}}" bind:_closeDialog="closeDialog" />
<card-modal <card-modal
show-card-modal="{{showCardModal}}" show-card-modal="{{showCardModal}}"
......
...@@ -24,5 +24,6 @@ ...@@ -24,5 +24,6 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
<go-guid/> <go-guid/>
...@@ -42,5 +42,6 @@ ...@@ -42,5 +42,6 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo"/>
</view> </view>
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<plus sku-list="{{skuVOList}}"/> <plus sku-list="{{skuVOList}}"/>
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -191,6 +191,7 @@ wxService.page({ ...@@ -191,6 +191,7 @@ wxService.page({
delete copyOrderInfo.storeName; delete copyOrderInfo.storeName;
delete copyOrderInfo.latitude; delete copyOrderInfo.latitude;
delete copyOrderInfo.longitude; delete copyOrderInfo.longitude;
delete copyOrderInfo.orderStore;
let params = JSON.stringify(copyOrderInfo); let params = JSON.stringify(copyOrderInfo);
// 退款申请 // 退款申请
......
...@@ -67,5 +67,5 @@ ...@@ -67,5 +67,5 @@
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
<floatNav bind:getAuth="_getUserInfo"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -125,7 +125,7 @@ wxService.page({ ...@@ -125,7 +125,7 @@ wxService.page({
this.data.username = '匿名'; this.data.username = '匿名';
} }
else { else {
this.data.username = userInfo.member.name; this.data.username = userInfo.member.name ? userInfo.member.name : (userInfo.member.memberWeixin ? userInfo.member.memberWeixin.nickname : '匿名');
} }
this.setData({ this.setData({
...@@ -368,6 +368,14 @@ wxService.page({ ...@@ -368,6 +368,14 @@ wxService.page({
//按钮保存海报 //按钮保存海报
onTapSaveImg() { onTapSaveImg() {
var that = this; var that = this;
if(this.data.btnIsDisabled){
wx.showToast({
title: '请等待海报生成完成',
icon : 'none'
});
return ;
}
wx.showLoading({ wx.showLoading({
title: '正在保存', title: '正在保存',
mask: true, mask: true,
......
...@@ -34,7 +34,10 @@ function currentLinkRouter(event, _this) { ...@@ -34,7 +34,10 @@ function currentLinkRouter(event, _this) {
} else if (curItemType.link.type == 4) { } else if (curItemType.link.type == 4) {
if( currentClickType === '/pages/userCenter/userCenter') { if( currentClickType === '/pages/userCenter/userCenter') {
wxService.router(`${currentClickType}`).replace() // 是首页重定向 wx.reLaunch({
url: currentClickType,
});
// wxService.router(`${currentClickType}`).replace() // 是首页重定向
} else { } else {
wxService.router(`${currentClickType}`) wxService.router(`${currentClickType}`)
} }
......
...@@ -297,6 +297,7 @@ function getUserInfoByBtn(userInfo) { ...@@ -297,6 +297,7 @@ function getUserInfoByBtn(userInfo) {
code: res[1].code, code: res[1].code,
wechatInfo: res[0], wechatInfo: res[0],
brandId: app.globalData.brandId, brandId: app.globalData.brandId,
// appid: app.globalData.appId
}; };
if (!envInfo.isMall) { if (!envInfo.isMall) {
param.appid = app.globalData.appId param.appid = app.globalData.appId
......
...@@ -972,7 +972,8 @@ class WXService extends Http { ...@@ -972,7 +972,8 @@ class WXService extends Http {
_self.lock = false _self.lock = false
}, },
fail: function (data) { fail: function (data) {
console.log('navigateToMiniProgram fail data is %o', data) console.log('navigateToMiniProgram fail data is %o', data);
//这里开卡成功之后会跳转到首页
this.router('/pages/userCenter/userCenter') this.router('/pages/userCenter/userCenter')
// this.router('/pages/welcome/welcome') // this.router('/pages/welcome/welcome')
......
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