Browse Source

app端权限修改

zyh
Aaron 4 years ago
parent
commit
8d4fe84606
  1. 28
      manifest.json
  2. 100
      pages/activity/Poster/index.vue

28
manifest.json

@ -28,28 +28,22 @@
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
]
},
/* ios */

100
pages/activity/Poster/index.vue

@ -4,7 +4,7 @@
<text class="iconfont icon-shuoming"></text>提示长按图片保存至手机相册
</view>
<view class="poster">
<image :src="image" mode="widthFix" show-menu-by-longpress />
<image :src="image" mode="widthFix" @longtap="longtap" show-menu-by-longpress />
</view>
</view>
</template>
@ -36,54 +36,56 @@
}
},
methods: {
//
getBargainPoster: function () {
var that = this;
let from = this.$deviceType
if (from == 'weixin' || this.$deviceType == 'weixinh5') {
from = 'uniappH5'
}
getBargainPoster({
bargainId: that.id,
from
})
.then(res => {
that.image = res.data.url;
that.status = false;
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
},
//
getCombinationPoster: function () {
var that = this;
console.log(this.$deviceType)
let from = this.$deviceType
if (from == 'weixin' || this.$deviceType == 'weixinh5') {
from = 'uniappH5'
}
console.log(from)
getCombinationPoster({
id: that.id,
from
})
.then(res => {
that.image = res.data.url;
that.status = false;
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
}
//
getBargainPoster: function () {
var that = this;
let from = this.$deviceType
if (from == 'weixin' || this.$deviceType == 'weixinh5') {
from = 'uniappH5'
}
getBargainPoster({
bargainId: that.id,
from
})
.then(res => {
that.image = res.data.url;
that.status = false;
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
},
//
getCombinationPoster: function () {
var that = this;
console.log(this.$deviceType)
let from = this.$deviceType
if (from == 'weixin' || this.$deviceType == 'weixinh5') {
from = 'uniappH5'
}
console.log(from)
getCombinationPoster({
id: that.id,
from
})
.then(res => {
that.image = res.data.url;
that.status = false;
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
},
//
longtap () {}
}
};
</script>

Loading…
Cancel
Save