商品详情. 新闻详情和厂家详情登录拦截

This commit is contained in:
clay
2023-01-11 22:08:59 +08:00
parent c834416b98
commit 201037eeb6
5 changed files with 133 additions and 20 deletions

View File

@@ -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();
});