| | |
| | | # 开发环境配置 |
| | | NODE_ENV = 'development' |
| | | VUE_APP_API_URL = 'http://localhost:11010' |
| | | VUE_APP_API_URL = 'http://192.168.0.7/dianjiang_admin_api/' |
| | |
| | | { |
| | | "name": "jinkuai", |
| | | "name": "zbom_dianjiang", |
| | | "version": "1.0.0", |
| | | "lockfileVersion": 1, |
| | | "requires": true, |
| | |
| | | export default { |
| | | onLaunch: function() { |
| | | var that = this |
| | | console.log('App Launch') |
| | | console.log(this.$dd) |
| | | console.log(this.$dd.env.platform) |
| | | let href = window.location.href; |
| | | if (this.$dd.env.platform !== 'notInDingTalk') { |
| | | let href = window.location.href; |
| | | let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.length) |
| | | this.$dd.requestAuthCode({ |
| | | corpId: 'dingulzemj5bynjciapg', |
| | | clientId: 'dingulzemj5bynjciapg', |
| | | onSuccess: function(result) { |
| | | that.$u.api.ddLogin({ |
| | | code: '', |
| | | corpId: '' |
| | | code: result.code, |
| | | corpId: corpId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | that.$store.commit('setToken', res.data.token) |
| | | this.$isResolve() |
| | | } |
| | | }) |
| | | }, |
| | | onFail: function(err) { |
| | | console.log(err) |
| | | } |
| | | }); |
| | | } else if (href.indexOf('?token') !== -1) { |
| | | let token = href.substring(href.lastIndexOf('?token=') + 7, href.length) |
| | | that.$store.commit('setToken', token) |
| | | this.$isResolve() |
| | | } else { |
| | | this.$isResolve() |
| | | } |
| | | }, |
| | | onShow: function() { |
| | |
| | | Vue.prototype.$isResolve = resolve |
| | | }) |
| | | Vue.prototype.$dd = dd |
| | | Vue.prototype.$baseUrl = 'http://192.168.1.40:10011/' |
| | | Vue.prototype.$baseUrl = 'http://192.168.0.7/dianjiang_web_api/' |
| | | |
| | | initDingH5RemoteDebug(); |
| | | |
| | |
| | | "uniStatistics" : { |
| | | "enable" : false |
| | | }, |
| | | "vueVersion" : "2" |
| | | "vueVersion" : "2", |
| | | "h5" : { |
| | | "router" : { |
| | | "mode" : "hash", |
| | | "base" : "/h5/" |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="item-info-d" v-else> |
| | | {{item.content}} |
| | | </view> |
| | | <view class="item-info-price"> |
| | | <view class="item-info-price" v-if="item.fee"> |
| | | <text>标准收费</text> |
| | | <text>{{item.fee}}</text> |
| | | </view> |
| | |
| | | <view class="item-info-d" v-else> |
| | | {{item.content}} |
| | | </view> |
| | | <view class="item-info-price"> |
| | | <view class="item-info-price" v-if="item.fee"> |
| | | <text>标准收费</text> |
| | | <text>{{item.fee}}</text> |
| | | </view> |
| | |
| | | |
| | | // 请求拦截器 |
| | | uni.$u.http.interceptors.request.use((config) => { |
| | | // const Headtoken = vm.$store.state.token |
| | | // if (Headtoken) { |
| | | config.header['token'] = 'eyJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEyMyIsImV4cCI6MTc2OTczODQwNn0.WcGv4N47h6X87vVKtiXW4bSsfDIqRNAqZFdpDkbY1vJDjrn6H6ioQVhjNJDF3OAGO16tkvX4MTgXkbiyW40v1Q'; |
| | | // } |
| | | const Headtoken = vm.$store.state.token |
| | | if (Headtoken) { |
| | | config.header['token'] = Headtoken; |
| | | } |
| | | return config |
| | | }, config => { |
| | | return Promise.reject(config) |