|
@@ -128,6 +128,14 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 播放前拍照end -->
|
|
|
|
+ <u-popup v-model="showSet" :mask-close-able="false" mode="center">
|
|
|
|
+ <view style="width: 250rpx;height: 250rpx;display: flex;align-items:center">
|
|
|
|
+ <button open-type="openSetting" @bindopensetting="openSetting" class="btnSet">相机授权</button>
|
|
|
|
+ </view>
|
|
|
|
+ </u-popup>
|
|
|
|
+
|
|
|
|
+ <u-mask :show="photoPopup" >
|
|
<!-- 播放前拍照start -->
|
|
<!-- 播放前拍照start -->
|
|
<view v-if="photoPopup" :mask-close-able="false" style="bottom: 0;position: fixed;width: 100%;z-index: 999;">
|
|
<view v-if="photoPopup" :mask-close-able="false" style="bottom: 0;position: fixed;width: 100%;z-index: 999;">
|
|
<view class="photoBox">
|
|
<view class="photoBox">
|
|
@@ -145,8 +153,8 @@
|
|
<view class="btnResult" @click="takePhoto">拍照</view>
|
|
<view class="btnResult" @click="takePhoto">拍照</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- 播放前拍照end -->
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ </u-mask>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</template>
|
|
</template>
|
|
@@ -164,6 +172,7 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ showSet:false,
|
|
startStatus: false,
|
|
startStatus: false,
|
|
detail: {},
|
|
detail: {},
|
|
courseId: 0,
|
|
courseId: 0,
|
|
@@ -340,8 +349,11 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ openSetting(res){
|
|
|
|
+ console.log(res,98)
|
|
|
|
+ },
|
|
getCameraSetting () {
|
|
getCameraSetting () {
|
|
- const _this = this
|
|
|
|
|
|
+ const self = this
|
|
wx.getSetting({
|
|
wx.getSetting({
|
|
success: res => {
|
|
success: res => {
|
|
if (res.authSetting['scope.camera']) {
|
|
if (res.authSetting['scope.camera']) {
|
|
@@ -355,21 +367,12 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
fail() { // 用户不同意授权
|
|
fail() { // 用户不同意授权
|
|
-
|
|
|
|
|
|
+ self.showSet = true
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '摄像头授权失败',
|
|
title: '摄像头授权失败',
|
|
icon: 'none',
|
|
icon: 'none',
|
|
duration: 3000
|
|
duration: 3000
|
|
})
|
|
})
|
|
- console.log(232)
|
|
|
|
- wx.openSetting({
|
|
|
|
- success (res) {
|
|
|
|
- if(res.authSetting['scope.camera']){
|
|
|
|
- console.log(232)
|
|
|
|
- // self.setData({ showCamera:true})
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -386,7 +389,8 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
openJY(){
|
|
openJY(){
|
|
- // this.openPhoto();
|
|
|
|
|
|
+ // this.getCameraSetting()
|
|
|
|
+ // this.openPhoto();
|
|
// this.getCameraSetting()
|
|
// this.getCameraSetting()
|
|
/* wx.openSetting({
|
|
/* wx.openSetting({
|
|
success (res) {
|
|
success (res) {
|
|
@@ -837,6 +841,14 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scope>
|
|
<style lang="scss" scope>
|
|
|
|
+ .btnSet{
|
|
|
|
+ width: 100px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ background: #007AFF;
|
|
|
|
+ border-radius: 40rpx;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ }
|
|
.btnReply {
|
|
.btnReply {
|
|
width: 80rpx;
|
|
width: 80rpx;
|
|
height: 40rpx;
|
|
height: 40rpx;
|