Browse Source

修改图片地址

zyh
Gao xiaosong 4 years ago
parent
commit
bd14a8f88b
  1. 2
      config/index.js
  2. 47
      main.js

2
config/index.js

@ -6,4 +6,4 @@ export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static'
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static'

47
main.js

@ -8,8 +8,15 @@ import dialog from './utils/dialog'
import cookie from '@/utils/store/cookie'
import cuCustom from '@/components/colorui/components/cu-custom.vue'
import { parseRoute, _router, parseQuery } from '@/utils'
import { VUE_APP_RESOURCES_URL, VUE_APP_API_URL } from '@/config'
import {
parseRoute,
_router,
parseQuery
} from '@/utils'
import {
VUE_APP_RESOURCES_URL,
VUE_APP_API_URL
} from '@/config'
Vue.component('cu-custom', cuCustom)
Vue.config.productionTip = false
Vue.config.devtools = process.env.NODE_ENV !== 'production'
@ -64,9 +71,25 @@ deviceType = 'routine'
// #ifdef H5
// H5编译的代码
import { wechat, clearAuthStatus, oAuth, auth, toAuth, pay, openAddress, openShareAll, openShareAppMessage, openShareTimeline, wechatEvevt, ready, wxShowLocation } from '@/libs/wechat'
import { isWeixin } from '@/utils'
import {
wechat,
clearAuthStatus,
oAuth,
auth,
toAuth,
pay,
openAddress,
openShareAll,
openShareAppMessage,
openShareTimeline,
wechatEvevt,
ready,
wxShowLocation
} from '@/libs/wechat'
import {
isWeixin
} from '@/utils'
const CACHE_KEY = 'clear_0.0.1'
if (!cookie.has(CACHE_KEY)) {
@ -84,22 +107,28 @@ if (urlSpread) {
// #ifdef H5
// H5编译的代码
// 判断是否是微信浏览器
if (isWeixin()) {
async function init() {
if (isWeixin()) {
deviceType = 'weixin'
let wechatInit = await wechat()
let wechatInit = wechat();
if (wechatInit) {
await oAuth()
}
} else {
} else {
deviceType = 'weixinh5'
}
}
init()
// #endif
Vue.prototype.$deviceType = deviceType
Vue.mixin({
onLoad() {
const { $mp } = this.$root
const {
$mp
} = this.$root
this._route = parseRoute($mp)
},
onShow() {

Loading…
Cancel
Save