Commit 82163235 by 谢中龙

修改内容

parent 8806fba4
...@@ -118,7 +118,7 @@ App({ ...@@ -118,7 +118,7 @@ App({
systemInfo: wx.getSystemInfoSync(), systemInfo: wx.getSystemInfoSync(),
ctx: envInfo.ctx, ctx: envInfo.ctx,
openCard: false, openCard: false,
appId: 'wxc3b64b09b1d3dfc2', appId: envInfo.appId,
userNo: null, userNo: null,
storeId: '', storeId: '',
storeName: '', storeName: '',
...@@ -129,11 +129,6 @@ App({ ...@@ -129,11 +129,6 @@ App({
contants: contants, contants: contants,
isPlusVip: isPlusVip, isPlusVip: isPlusVip,
cityJson: cityJson, cityJson: cityJson,
// brandId: 2711, brandId: envInfo.brandId,
// brandId: 2005,
brandId: 1001,
// brandId: 1002,
// brandId: 3001,
// brandId: 3002,
} }
}) })
...@@ -32,6 +32,7 @@ Component({ ...@@ -32,6 +32,7 @@ Component({
let currentTab = tabBar.images let currentTab = tabBar.images
currentTab.forEach(item => { currentTab.forEach(item => {
// 存在 row 处理数据 8 商品 9 分类 // 存在 row 处理数据 8 商品 9 分类
// 1. 外部小程序_url 2. 内部动态页面_pageId 3.预览 4. 内部页面 5. 卡券__1_卡包 2_激活领卡
let newRow = null let newRow = null
if (item.link) { if (item.link) {
if (item.link.type == 2) { if (item.link.type == 2) {
......
<!--component/bottomTabs/bottomTabs.wxml--> <!--component/bottomTabs/bottomTabs.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" /> <wxs src="../../wxs/utils.wxs" module="utils" />
<!--<wxs src="./handlerData.wxs" module="tools" />--> <!--<wxs src="./handlerData.wxs" module="tools" />-->
<view class='bgc fixed-bottom0' style="background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});" wx:if="{{tabBar.num == 4}}"> <view class='bgc fixed-bottom0'
style="background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});"
wx:if="{{tabBar.num == 4}}">
<block wx:for="{{tabBarList}}" wx:key="{{index}}" wx:for-item="tab"> <block wx:for="{{tabBarList}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab"> <view class="tab">
<!--当前页面需要授权 且未授权--> <!--当前页面需要授权 且未授权-->
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
const app = getApp() const app = getApp()
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
Component({ Component({
/** /**
...@@ -44,10 +45,7 @@ Component({ ...@@ -44,10 +45,7 @@ Component({
wxService.request({ wxService.request({
url: app.globalData.ctx + '/sale/premium/query', url: app.globalData.ctx + '/sale/premium/query',
header: { header: {
// 'tunnel-token' : 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD' // 测试 'tunnel-token': envInfo.tunnelToken,
'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
// 'tunnel-token' : 'brand1001', // 开发
// 'tunnel-token' : 'brand1002', // 测试
}, },
success: (res) => { success: (res) => {
const { result, data } = res.data const { result, data } = res.data
......
...@@ -7,8 +7,12 @@ ...@@ -7,8 +7,12 @@
wx:for-item="navItem" wx:for-item="navItem"
wx:key="idx" wx:key="idx"
> >
<view wx:if="{{navItem.needAuth}}" class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%"> <view wx:if="{{navItem.needAuth}}"
<view wx:if="{{!currentHasUserInfo}}" class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width: {{navItemWidth}}%;height: 80rpx;display: flex;"> style="width:{{navItemWidth}}%"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<view wx:if="{{!currentHasUserInfo}}"
style="width: {{navItemWidth}}%;height: 80rpx;display: flex;"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<button <button
bindgetuserinfo="_getUserInfo" bindgetuserinfo="_getUserInfo"
data-jflag="false" data-jflag="false"
...@@ -19,7 +23,9 @@ ...@@ -19,7 +23,9 @@
{{navItem.title}} {{navItem.title}}
</button> </button>
</view> </view>
<view wx:else class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%"> <view wx:else
style="width:{{navItemWidth}}%"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<view <view
data-current="{{idx}}" data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}" data-redirectId="{{navItem.redirectId}}"
...@@ -29,8 +35,9 @@ ...@@ -29,8 +35,9 @@
</view> </view>
</view> </view>
</view> </view>
<view wx:else
<view wx:else class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%"> style="width:{{navItemWidth}}%"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<view <view
data-current="{{idx}}" data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}" data-redirectId="{{navItem.redirectId}}"
...@@ -39,7 +46,6 @@ ...@@ -39,7 +46,6 @@
>{{navItem.title}} >{{navItem.title}}
</view> </view>
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
<!-- showQrcode 2 购物车 1 会员码 0 隐藏 --> <!-- showQrcode 2 购物车 1 会员码 0 隐藏 -->
......
...@@ -36,6 +36,13 @@ const config = { ...@@ -36,6 +36,13 @@ const config = {
prod: prodCtx prod: prodCtx
} }
const appId = {
dev: 'wxc3b64b09b1d3dfc2',//appid_dev_wx
test: 'wxac09792264c49b5c',//appid_test_wx 1002商城
pre: 'wxac09792264c49b5c',//appid_test_wx 1002商城
prod: 'wx313ec36b710125d4',//appid_prod_3001 3001商城
}
const imgConfig = { const imgConfig = {
dev: devImgCtx, dev: devImgCtx,
test: testImgCtx, test: testImgCtx,
...@@ -43,11 +50,21 @@ const imgConfig = { ...@@ -43,11 +50,21 @@ const imgConfig = {
prod: prodImgCtx prod: prodImgCtx
} }
const token = {
dev: 'brand1001', //开发
test: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //测试
pre: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', //预生产
prod: 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8' ,// 生产
}
const envInfo = (() => { const envInfo = (() => {
return { return {
ctx: config[PROJECT_ENV], ctx: config[PROJECT_ENV],
env: PROJECT_ENV, env: PROJECT_ENV,
imgCtx: imgConfig[PROJECT_ENV] imgCtx: imgConfig[PROJECT_ENV],
tunnelToken: token[PROJECT_ENV],
appId: appId[PROJECT_ENV],
brandId: '1001',// 1001 1002 3001 3002 //2711 711生产brandId
} }
})() })()
......
...@@ -27,12 +27,12 @@ wxService.page({ ...@@ -27,12 +27,12 @@ wxService.page({
onShow: function () { onShow: function () {
//判断用户是不是已经登录了 //判断用户是不是已经登录了
let userInfo = wx.getStorageSync('_baseUserInfo'); let userInfo = wx.getStorageSync('_baseUserInfo');
// if (userInfo) { if (userInfo) {
// wx.reLaunch({ wx.reLaunch({
// url: '/pages/userCenter/userCenter', url: '/pages/userCenter/userCenter',
// }); });
// return; return;
// } }
//未登录 需要授权登录 弹出设置的开卡图片 //未登录 需要授权登录 弹出设置的开卡图片
this.setData({ this.setData({
......
...@@ -123,6 +123,14 @@ wxService.page({ ...@@ -123,6 +123,14 @@ wxService.page({
//改变二位方式 //改变二位方式
onTapChangeType(e){ onTapChangeType(e){
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
if(index == 0){
wx.showToast({
title: '对不起,暂不支持此功能',
icon : 'none'
});
return ;
}
this.data.bottomTypeArr.map(item => { this.data.bottomTypeArr.map(item => {
item.active = false; item.active = false;
}); });
......
...@@ -19,7 +19,7 @@ wxService.page({ ...@@ -19,7 +19,7 @@ wxService.page({
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log('options', options) console.log('options', options)
options.id = '651730112529698816'; // options.id = '651730112529698816';
this.setData({ this.setData({
id: options.id id: options.id
},()=>{ },()=>{
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<button class='positionAbs' bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button> <button class='positionAbs' bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button>
立即领取 立即领取
</view> </view>
<view class="title-btn"bindtap="handelGet" wx:if="{{currentHasUserInfo}}">立即领取</view> <view class="title-btn" bindtap="handelGet" wx:if="{{currentHasUserInfo}}">立即领取</view>
<view class="title-name">{{couponDetail.couponName}}</view> <view class="title-name">{{couponDetail.couponName}}</view>
<view class="title-desc">{{couponDetail.title}}</view> <view class="title-desc">{{couponDetail.title}}</view>
<view class="title-others">{{couponDetail.remark}}</view> <view class="title-others">{{couponDetail.remark}}</view>
......
...@@ -102,7 +102,7 @@ class Http { ...@@ -102,7 +102,7 @@ class Http {
// 'tunnel-token' : 'brand1002', // 测试 // 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试 // 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 // 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
'tunnel-token' : 'brand1001', // 开发 'tunnel-token': envInfo.tunnelToken, // 开发
'tentacle-content': this.getTentacle(), 'tentacle-content': this.getTentacle(),
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}' // 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
...@@ -116,9 +116,6 @@ class Http { ...@@ -116,9 +116,6 @@ 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('--------------header-----------------', this.getTentacle())
// console.log('--------------token-----------------', this.getToken())
if (baseUserInfo || guideUserInfo){ if (baseUserInfo || guideUserInfo){
return this.request({ return this.request({
...@@ -127,7 +124,6 @@ class Http { ...@@ -127,7 +124,6 @@ class Http {
header: { header: {
'buyer-token': this.getToken(), 'buyer-token': this.getToken(),
'tentacle-content': this.getTentacle() 'tentacle-content': this.getTentacle()
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
}, },
data: parmas, data: parmas,
channel: channel channel: channel
...@@ -140,9 +136,8 @@ class Http { ...@@ -140,9 +136,8 @@ class Http {
// 'tunnel-token' : 'brand1002', // 测试 // 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试 // 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 // 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
'tunnel-token' : 'brand1001', // 开发 'tunnel-token': envInfo.tunnelToken, // 开发
'tentacle-content': this.getTentacle() 'tentacle-content': this.getTentacle()
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
}, },
data: parmas, data: parmas,
channel: channel channel: channel
......
...@@ -642,7 +642,7 @@ class WXService extends Http { ...@@ -642,7 +642,7 @@ class WXService extends Http {
console.log('premiumExpireStorage', premiumExpireStorage) console.log('premiumExpireStorage', premiumExpireStorage)
console.log('当前时间 < 到期时间为vip', vipFlag) console.log('当前时间 < 到期时间为vip', vipFlag)
if (baseUserInfo) { if (baseUserInfo && wx.getStorageSync('token')) {
page.setData({ page.setData({
currentHasUserInfo: true, currentHasUserInfo: true,
isVip: vipFlag isVip: vipFlag
......
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