游客登陆 权限拦截

This commit is contained in:
@fawn-nine
2024-07-10 14:46:20 +08:00
parent d1953091a9
commit f73e521179
11 changed files with 1531 additions and 1033 deletions

View File

@@ -447,6 +447,7 @@
}
if (this.quCode == null || this.quCode == 86) { // 如果没选择国家code默认是中国大陆
if (!this.$base.phoneRegular.test(this.phone)) {
this.submitClickNum += 1
uni.showToast({
title: '手机格式不正确',
icon: 'none'

View File

@@ -172,6 +172,7 @@
</template>
<script>
import permission from "@/js_sdk/wa-permission/permission.js"
import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js';
var clear;
@@ -530,7 +531,11 @@
},
// 头像
choseAvatar(e) {
async choseAvatar(e) {
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
return false
}
let that = this
if (that.fileAvatar.length == 0) {
uni.showToast({

File diff suppressed because it is too large Load Diff

View File

@@ -64,7 +64,7 @@
<view class="input_box">
<text class="input_tit">问题截图:</text>
<view class="in" style="border: none;">
<view class="in" style="border: none;" @click="checkPermision">
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple :maxCount="4"
width="40" height="40" :previewFullImage="true">
</u-upload>
@@ -78,6 +78,7 @@
</template>
<script>
import $http from '@/config/requestConfig.js';
import permission from "@/js_sdk/wa-permission/permission.js"
import {
mapState,
mapMutations
@@ -207,8 +208,14 @@
// console.log('键盘输入',e);
this.telError = false
},
addPic(e) {
// console.log("添加图片");
async checkPermision(){
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
return false
}
},
async addPic(e) {
console.log("添加图片");
let that = this;
for (var i = 0; i < e.file.length; i++) {
//console.log(i,e.file[i].url)