1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/diygw-weimall

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
app.js 1.1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
html580 Отправлено 01.06.2017 06:53 6288df4
import polyfill from 'assets/plugins/polyfill'
import WxValidate from 'helpers/WxValidate'
import HttpResource from 'helpers/HttpResource'
import HttpService from 'helpers/HttpService'
import WxService from 'helpers/WxService'
import Tools from 'helpers/Tools'
import Config from 'etc/config'
App({
onLaunch() {
console.log('onLaunch')
},
onShow() {
console.log('onShow')
},
onHide() {
console.log('onHide')
},
getUserInfo() {
return this.WxService.login()
.then(data => {
console.log(data)
return this.WxService.getUserInfo()
})
.then(data => {
console.log(data)
this.globalData.userInfo = data.userInfo
return this.globalData.userInfo
})
},
globalData: {
userInfo: null
},
renderImage(path) {
if (!path) return ''
if (path.indexOf('http') !== -1) return path
return `${this.Config.fileBasePath}${path}`
},
WxValidate: (rules, messages) => new WxValidate(rules, messages),
HttpResource: (url, paramDefaults, actions, options) => new HttpResource(url, paramDefaults, actions, options).init(),
HttpService: new HttpService,
WxService: new WxService,
Tools: new Tools,
Config: Config,
})

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/diygw-weimall.git
git@api.gitlife.ru:oschina-mirror/diygw-weimall.git
oschina-mirror
diygw-weimall
diygw-weimall
master