Commit 776dfd1f by 高淑倩

add: imageUrl_globalData

parent c7b2c4b0
......@@ -105,7 +105,7 @@ App({
storeId: '',
storeName: '',
loginFirst: false,
imageUrl:"", //图片地址
imageUrl: envInfo.imgCtx, //图片地址
isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc,
// brandId: 2711,
......
......@@ -9,10 +9,15 @@ const needMock = '' //
// const devCtx = 'http://111.231.86.64'
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 prodCtx = 'https://crm-b.bigaka.com/api' // 发生产时解开此注释
const devImgCtx = 'http://testimg3.bigaka.com' // 开发环境图片地址
const testImgCtx = 'http://testimgww.bigaka.com' // 测试环境图片地址
const preImgCtx = 'http://testimgpp.bigaka.com' // 预生产环境图片地址
const prodImgCtx = 'http://testimgoooo.bigaka.com' // 生产环境图片地址
const config = {
dev: devCtx,
test: testCtx,
......@@ -20,10 +25,18 @@ const config = {
prod: prodCtx
}
const imgConfig = {
dev: devImgCtx,
test: testImgCtx,
pre: preImgCtx,
prod: prodImgCtx
}
const envInfo = (() => {
return {
ctx: config[PROJECT_ENV],
env: PROJECT_ENV
env: PROJECT_ENV,
imgCtx: imgConfig[PROJECT_ENV]
}
})()
......
......@@ -68,6 +68,7 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow () {
console.log('---', app.globalData.imageUrl)
// 取会员卡号
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const cardMember = wx.getStorageSync('_cardMember')
......
......@@ -2,7 +2,6 @@
<view class='user-center'>
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}-->
<!-- 轮播 -->
<view class="pd1530" wx:if="{{pItem.type == 1}}">
......
......@@ -2,6 +2,7 @@ const wxService = require('./wxService')
const moment = require('../lib/moment.min')
const Promise = require('../lib/bluebird')
const _ = require('../lib/underscore.min')
const envInfo = require('../config/index').envInfo
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
......@@ -28,7 +29,9 @@ function getCurrentPageUrlWithArgs() {
var url = currentPage.route // 当前页面url
var options = currentPage.options // 如果要获取url中所带的参数可以查看options
// 拼接url的参数
/**
* 拼接url的参数
*/
var urlWithArgs = url + '?'
for (var key in options) {
var value = options[key]
......@@ -38,7 +41,6 @@ function getCurrentPageUrlWithArgs() {
return urlWithArgs
}
/**
* 获取当前帐号信息
*/
......
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