商品详情. 新闻详情和厂家详情登录拦截
This commit is contained in:
@@ -105,8 +105,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { apiService } from '../../service/request'
|
||||
import login from '../my/login/login.vue'
|
||||
import {
|
||||
apiService
|
||||
} from '../../service/request'
|
||||
import login from '../my/login/login.vue'
|
||||
export default {
|
||||
components: {
|
||||
login
|
||||
@@ -151,9 +153,9 @@ import login from '../my/login/login.vue'
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if (options.index == 0) {
|
||||
if (options.index == 1) {
|
||||
this.tabCurrent = 0
|
||||
} else if (options.index == 1) {
|
||||
} else if (options.index == 2) {
|
||||
this.tabCurrent = 1
|
||||
}
|
||||
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
|
||||
@@ -267,13 +269,15 @@ import login from '../my/login/login.vue'
|
||||
http.open('GET', blodurl, true);
|
||||
http.responseType = 'blob';
|
||||
http.onload = function(e) {
|
||||
if (this.status == 200 || this.status === 0) {
|
||||
// console.log('blod数据',this.response);
|
||||
// 在将blod数据转为file
|
||||
let files = new window.File([this.response], 'file.name', { type: 'image' });
|
||||
// console.log('blod数据转换file',files);
|
||||
resolve(files);
|
||||
}
|
||||
if (this.status == 200 || this.status === 0) {
|
||||
// console.log('blod数据',this.response);
|
||||
// 在将blod数据转为file
|
||||
let files = new window.File([this.response], 'file.name', {
|
||||
type: 'image'
|
||||
});
|
||||
// console.log('blod数据转换file',files);
|
||||
resolve(files);
|
||||
}
|
||||
};
|
||||
http.send();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user