Commit 81dda8fe by 赵雅纹

Merge branch 'dev_7.0.1' into feature-zyw

parents 94387461 2837db5d
...@@ -35,18 +35,16 @@ App({ ...@@ -35,18 +35,16 @@ App({
}, },
onShow: function (options = {}) { onShow: function (options = {}) {
console.log('app-onshow', options) console.log('app-onshow', options)
// 是不是第一次进入小程序
const baseUserInfo = wx.getStorageSync('_baseUserInfo') const baseUserInfo = wx.getStorageSync('_baseUserInfo')
if (baseUserInfo) {
// wxService.getUserInfo()
}
if (options.referrerInfo.extraData!=null){ if (options.referrerInfo.extraData!=null){
const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData
let urlData = wx_activate_after_submit_url.split("?"); let urlData = wx_activate_after_submit_url.split("?");
let url = urlData[0]; let url = urlData[0];
let parmas = urlData[1]; let parmas = urlData[1];
// wxService.router(`${url}`).search(parmas); // encodeURIComponent
// decodeURIComponent
wxService.router(`${url}`).search({ wxService.router(`${url}`).search({
activate_ticket: encodeURIComponent(activate_ticket), activate_ticket: encodeURIComponent(activate_ticket),
card_id, card_id,
...@@ -54,8 +52,6 @@ App({ ...@@ -54,8 +52,6 @@ App({
errCode, errCode,
wx_activate_after_submit_url: parmas wx_activate_after_submit_url: parmas
}); });
// encodeURIComponent
// decodeURIComponent
// 激活成功 变更 _baseUserInfo // 激活成功 变更 _baseUserInfo
baseUserInfo.wechatCardId = card_id baseUserInfo.wechatCardId = card_id
...@@ -70,7 +66,7 @@ App({ ...@@ -70,7 +66,7 @@ App({
console.log(res.status) // loaded console.log(res.status) // loaded
}, },
fail: function (res) { fail: function (res) {
console.log(res.status) // error console.log(res.status) // error
} }
}) })
...@@ -91,7 +87,6 @@ App({ ...@@ -91,7 +87,6 @@ App({
checkFullSucreen () { checkFullSucreen () {
const self = this const self = this
wxService.getSystemInfo().then(res => { wxService.getSystemInfo().then(res => {
debugger
if ((res.screenHeight - res.windowHeight - res.statusBarHeight - 32) > 72) { if ((res.screenHeight - res.windowHeight - res.statusBarHeight - 32) > 72) {
     // 处理相关逻辑      // 处理相关逻辑
self.globalData.isFullSucreen = true self.globalData.isFullSucreen = true
...@@ -110,7 +105,7 @@ App({ ...@@ -110,7 +105,7 @@ App({
storeId: '', storeId: '',
storeName: '', storeName: '',
loginFirst: false, loginFirst: false,
imageUrl:"", //图片地址 imageUrl: envInfo.imgCtx, //图片地址
isFullSucreen: false, // 当前设备是否为 FullSucreen isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc, commonFunc: commonFunc,
// brandId: 2711, // brandId: 2711,
......
...@@ -9,10 +9,15 @@ const needMock = '' // ...@@ -9,10 +9,15 @@ const needMock = '' //
// const devCtx = 'http://111.231.86.64' // const devCtx = 'http://111.231.86.64'
const devCtx = 'http://buyer.devapi.bigaka.net' // 开发环境 const devCtx = 'http://buyer.devapi.bigaka.net' // 开发环境
const testCtx = 'https://crm-b.bigaka.net/api' // 发预生产时解开此注释 const testCtx = 'https://crm-b.bigaka.net/api' // 发测试时解开此注释
const preCtx = 'https://crm-b.bigaka.com/api' // 发预生产时解开此注释 const preCtx = 'https://crm-b.bigaka.com/api' // 发预生产时解开此注释
const prodCtx = 'https://crm-b.bigaka.com/api' // 发生产时解开此注释 const prodCtx = 'https://crm-b.bigaka.com/api' // 发生产时解开此注释
const devImgCtx = 'http://testimg3.bigaka.com' // 开发环境图片地址
const testImgCtx = 'http://testimg3.bigaka.com' // 测试环境图片地址
const preImgCtx = 'http://testimg3.bigaka.com' // 预生产环境图片地址
const prodImgCtx = 'http://testimg3.bigaka.com' // 生产环境图片地址
const config = { const config = {
dev: devCtx, dev: devCtx,
test: testCtx, test: testCtx,
...@@ -20,10 +25,18 @@ const config = { ...@@ -20,10 +25,18 @@ const config = {
prod: prodCtx prod: prodCtx
} }
const imgConfig = {
dev: devImgCtx,
test: testImgCtx,
pre: preImgCtx,
prod: prodImgCtx
}
const envInfo = (() => { const envInfo = (() => {
return { return {
ctx: config[PROJECT_ENV], ctx: config[PROJECT_ENV],
env: PROJECT_ENV env: PROJECT_ENV,
imgCtx: imgConfig[PROJECT_ENV]
} }
})() })()
......
{} {
\ No newline at end of file "navigationBarTitleText": "激活卡面",
"usingComponents": {}
}
\ No newline at end of file
...@@ -68,6 +68,7 @@ wxService.page({ ...@@ -68,6 +68,7 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow () { onShow () {
console.log('---', app.globalData.imageUrl)
// 取会员卡号 // 取会员卡号
const baseUserInfo = wx.getStorageSync('_baseUserInfo') const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const cardMember = wx.getStorageSync('_cardMember') const cardMember = wx.getStorageSync('_cardMember')
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<view class='user-center'> <view class='user-center'>
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部--> <!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem"> <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}--> <!--{{pItem.type}}-->
<!-- 轮播 --> <!-- 轮播 -->
<view class="pd1530" wx:if="{{pItem.type == 1}}"> <view class="pd1530" wx:if="{{pItem.type == 1}}">
......
...@@ -2,6 +2,7 @@ const wxService = require('./wxService') ...@@ -2,6 +2,7 @@ const wxService = require('./wxService')
const moment = require('../lib/moment.min') const moment = require('../lib/moment.min')
const Promise = require('../lib/bluebird') const Promise = require('../lib/bluebird')
const _ = require('../lib/underscore.min') const _ = require('../lib/underscore.min')
const envInfo = require('../config/index').envInfo
const formatTime = date => { const formatTime = date => {
const year = date.getFullYear() const year = date.getFullYear()
const month = date.getMonth() + 1 const month = date.getMonth() + 1
...@@ -28,7 +29,9 @@ function getCurrentPageUrlWithArgs() { ...@@ -28,7 +29,9 @@ function getCurrentPageUrlWithArgs() {
var url = currentPage.route // 当前页面url var url = currentPage.route // 当前页面url
var options = currentPage.options // 如果要获取url中所带的参数可以查看options var options = currentPage.options // 如果要获取url中所带的参数可以查看options
// 拼接url的参数 /**
* 拼接url的参数
*/
var urlWithArgs = url + '?' var urlWithArgs = url + '?'
for (var key in options) { for (var key in options) {
var value = options[key] var value = options[key]
...@@ -38,7 +41,6 @@ function getCurrentPageUrlWithArgs() { ...@@ -38,7 +41,6 @@ function getCurrentPageUrlWithArgs() {
return urlWithArgs return urlWithArgs
} }
/** /**
* 获取当前帐号信息 * 获取当前帐号信息
*/ */
...@@ -278,7 +280,6 @@ function getUserInfoByBtn(userInfo) { ...@@ -278,7 +280,6 @@ function getUserInfoByBtn(userInfo) {
}, (err) => { }, (err) => {
return Promise.reject(err) return Promise.reject(err)
}).then(response => { }).then(response => {
console.log(JSON.stringify(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)
......
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