Browse Source

上传

master
前端-胡立永 2 weeks ago
parent
commit
f6cd20ccb6
15 changed files with 767 additions and 218 deletions
  1. +7
    -7
      api/api.js
  2. +15
    -1
      pages.json
  3. +0
    -39
      pages/index/area.vue
  4. +78
    -0
      pages/index/article - 副本.vue
  5. +119
    -29
      pages/index/article.vue
  6. +0
    -36
      pages/index/back.vue
  7. +97
    -35
      pages/index/cancelArticle.vue
  8. +82
    -0
      pages/index/end.vue
  9. +3
    -1
      pages/index/home.vue
  10. +64
    -15
      pages/index/preAppoint.vue
  11. +144
    -0
      pages/index/title.vue
  12. +98
    -54
      pages_order/info/appoint.vue
  13. +4
    -0
      store/store.js
  14. +53
    -0
      utils/authorize.js
  15. +3
    -1
      utils/index.js

+ 7
- 7
api/api.js View File

@ -68,13 +68,13 @@ const config = {
// },
//提交预约信息
// submit: {
// url: '/applet_post/submit',
// method: 'POST',
// limit : 1000,
// showLoading : true,
// auth: true,
// },
submit: {
url: '/applet_post/submit',
method: 'POST',
limit : 1000,
showLoading : true,
auth: true,
},
// //查询我的问答记录
// queryMyLog: {
// url: '/applet_post/queryMyLog',


+ 15
- 1
pages.json View File

@ -7,6 +7,13 @@
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/index/preAppoint",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path": "pages/index/index",
"style": {
@ -40,7 +47,14 @@
}
},
{
"path" : "pages/index/preAppoint",
"path" : "pages/index/title",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/index/end",
"style" :
{
"navigationBarTitleText" : ""


+ 0
- 39
pages/index/area.vue View File

@ -1,39 +0,0 @@
<template>
<view class="home">
<view class="content">
<span class="font-bold mb-60">请选择您所在的区域</span>
<view class="flex-col query" style="gap: 0rpx;">
<view class="btn2" @click="next">
确定
</view>
<text class="second-color">欢快无限饮&nbsp;&nbsp;饮酒有限度</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
next(){
uni.navigateTo({
url:'/pages/index/checkAge'
})
}
}
}
</script>
<style lang="scss" scoped>
.query{
position: absolute;
bottom: -25vh;
}
</style>

+ 78
- 0
pages/index/article - 副本.vue View File

@ -0,0 +1,78 @@
<template>
<view class="home">
<image src="/static/image/bg/1.png"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<view class="article">
<uv-parse :content="articleList[index].details"></uv-parse>
</view>
</view>
<view class="an">
<view class="btn2"
@click="next">
下一页
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed : {
...mapState(['articleList', 'configList']),
},
data() {
return {
index : 0,
}
},
methods: {
next(){
if(this.index == this.articleList.length - 1){
this.$store.commit('getQueryMyLog')
// uni.navigateTo({
// url: '/pages/index/home'
// })
}else{
this.index++
}
},
}
}
</script>
<style lang="scss" scoped>
.article{
width: 600rpx;
font-size: 28rpx;
line-height: 50rpx;
}
.an{
position: fixed;
bottom: 330rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.second-color{
margin-top: 20rpx;
}
.btn2 {
border: 4rpx solid $uni-color;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx 200rpx;
color: $uni-color;
border-radius: 10rpx;
}
</style>

+ 119
- 29
pages/index/article.vue View File

@ -1,11 +1,21 @@
<template>
<view class="home">
<image src="/static/image/bg/1.png"
<view class="page">
<image :src="configList.img_13"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<image :src="configList.img_7"
class="logo"
mode="widthFix"></image>
<!-- next1 -->
<view class="content">
<image :src="configList.img_11"
class="content-bg"
mode="aspectFill"></image>
<view class="article">
<uv-parse :content="articleList[index].details"></uv-parse>
</view>
@ -13,33 +23,48 @@
</view>
<view class="an">
<view class="btn2"
@click="next">
下一页
<view style="display: flex;gap: 30rpx;"
>
<!-- <view class="next-btn-2"
v-if="index > 0"
@click="ret">
上一题
</view> -->
<view class="next-btn"
@click="next">
下一页
</view>
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed : {
...mapState(['articleList', 'configList']),
},
data() {
return {
index : 0,
}
},
computed : {
...mapState(['articleList', 'configList']),
},
onLoad() {
},
onShow() {
},
methods: {
next(){
if(this.index == this.articleList.length - 1){
this.$store.commit('getQueryMyLog')
// uni.navigateTo({
// url: '/pages/index/home'
// })
uni.navigateTo({
url: '/pages/index/preAppoint'
})
}else{
this.index++
}
@ -49,30 +74,95 @@
</script>
<style lang="scss" scoped>
.article{
width: 600rpx;
font-size: 28rpx;
line-height: 50rpx;
.page{
.logo{
width: 600rpx;
margin: 150rpx 75rpx;
}
.content{
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0 60rpx;
text-align: center;
width: 700rpx;
height: 650rpx;
margin: 0 25rpx;
z-index: 999;
.content-bg{
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
}
}
.region{
display: flex;
align-items: center;
&>view{
width: 140rpx;
height: 50rpx;
border-radius: 10rpx;
border: 1px solid #e6bf7f;
margin: 0 10rpx;
line-height: 50rpx;
text-align: center;
}
}
.b-btn{
width: 86%;
display: flex;
justify-content: center;
padding-top: 130rpx;
.pre-btn{
border: 4rpx solid #f1e0c6;
padding: 16rpx 90rpx;
border-radius: 66rpx;
color: #e6bf7f;
}
}
.next-btn{
width: 120rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
background-color: $uni-color;
border-radius: 30rpx;
}
.next-btn-2{
width: 120rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
background-color: $uni-color-primary;
border-radius: 30rpx;
}
.an{
position: fixed;
bottom: 330rpx;
bottom: 300rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
.second-color{
margin-top: 20rpx;
}
.btn2 {
border: 4rpx solid $uni-color;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx 200rpx;
color: $uni-color;
border-radius: 10rpx;
}
</style>
</style>

+ 0
- 36
pages/index/back.vue View File

@ -1,36 +0,0 @@
<template>
<view>
<greetCmponents title="" :textList="textList" :path="back" :btn="btn"/>
</view>
</template>
<script>
import greetCmponents from "../../components/home/greetComponents.vue"
export default {
data() {
return {
textList:[
'很抱歉,您的所在区域暂时',
'无法提供上门威士忌品鉴服务。',
'但我们仍为您准备了其他专属体',
'验敬请期待。'
],
back:'/pages/index/appointment',
btn:[
'返回'
]
}
},
components:{
greetCmponents
},
methods: {
}
}
</script>
<style>
</style>

+ 97
- 35
pages/index/cancelArticle.vue View File

@ -1,76 +1,138 @@
<template>
<view class="home">
<view class="page">
<image src="/static/image/bg/1.png"
<image :src="configList.img_13"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<view class="article">
<uv-parse :content="configList[key]"></uv-parse>
<image :src="configList.img_7"
class="logo"
mode="widthFix"></image>
<view class="service">
<image :src="configList[mapKey[key].icon]"
class="img_2"
mode="widthFix"></image>
<view class="title">
{{ mapKey[key].title }}
</view>
<view class="stext">
{{ mapKey[key].stext }}
</view>
</view>
<view class="an"
>
<view class="btn2"
@click="next">
<view class="btn-list">
<view class="next-btn-2"
v-if="mapKey[key].next"
@click="next(mapKey[key])">
点击预约
</view>
<view class="next-btn"
v-if="mapKey[key].rep"
@click="rep(mapKey[key])">
返回
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed : {
...mapState(['articleList', 'configList']),
},
data() {
return {
key : 'cancel_value'
mapKey : {
success_text : {
rep : '/pages/index/end',
icon : 'img_3',
title : '提交成功',
stext : '提交成功! 后台正在为您匹配合适的品鉴资源, 我们会在匹配结束后 发送微信推送及电话联系您确认!',
},
reservationSuccessful : {
rep : true,
icon : 'img_3',
title : '预约成功',
stext : '提交成功! 后台正在为您匹配合适的品鉴资源, 我们会在匹配结束后 发送微信推送及电话联系您确认!',
},
},
key : '',
}
},
onLoad(args) {
this.key = args.key || 'cancel_value'
onLoad({key}) {
this.key = key
},
methods: {
next(){
rep(map){
uni.reLaunch({
url: '/pages/index/index'
url: map.rep
})
},
next(map){
uni.navigateTo({
url: '/pages_order/info/appoint'
})
},
}
}
</script>
<style lang="scss" scoped>
.article{
<style scoped lang="scss">
.page{
.logo{
width: 600rpx;
font-size: 28rpx;
line-height: 50rpx;
margin: 150rpx 75rpx;
}
.an{
position: fixed;
bottom: 330rpx;
text-align: center;
.service{
display: flex;
flex-direction: column;
align-items: center;
.img_2{
margin: 0 auto;
width: 100rpx;
}
.title{
font-weight: 900;
margin: 30rpx 0;
}
.stext{
width: 600rpx;
margin-bottom: 150rpx;
line-height: 50rpx;
font-size: 26rpx;
color: #777;
}
}
.btn-list{
display: flex;
flex-direction: column;
gap: 40rpx;
width: 100%;
justify-content: center;
align-items: center;
}
.second-color{
margin-top: 20rpx;
.next-btn{
width: 400rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 22rpx 90rpx;
background-color: $uni-color;
border-radius: 40rpx;
}
.btn2 {
border: 4rpx solid $uni-color;
.next-btn-2{
width: 400rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx 200rpx;
color: $uni-color;
border-radius: 10rpx;
color: white;
padding: 22rpx 90rpx;
background-color: $uni-color-primary;
border-radius: 40rpx;
}
</style>
}
</style>

+ 82
- 0
pages/index/end.vue View File

@ -0,0 +1,82 @@
<template>
<view class="page">
<image :src="configList.img_1"
class="page-bg"
mode="aspectFill"></image>
<image :src="configList.img_6"
class="logo"
mode="widthFix"></image>
<view class="service">
<view class="top4">
专属品鉴之旅告一段落
</view>
<view class="title">
Genius Journey Club
</view>
<view class="stext">
期待与您的
<br />
再次见面
<br />
...
</view>
</view>
<image :src="configList.img_7"
class="logo"
style="margin: 75rpx;"
mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
.logo{
width: 600rpx;
margin: 150rpx 75rpx;
}
.service{
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
color: #6A3F1F;
.img_2{
margin: 0 auto;
width: 100rpx;
}
.title{
font-weight: 900;
margin: 30rpx 0;
}
.stext{
width: 600rpx;
margin-bottom: 150rpx;
line-height: 50rpx;
font-size: 26rpx;
color: #777;
}
}
}
</style>

+ 3
- 1
pages/index/home.vue View File

@ -119,7 +119,9 @@
methods: {
select(item){
this.answerIds.splice(this.index, 1, item.id)
this.isActive = item.toMainId
if(item.isEnd != 'Y'){
this.isActive = item.toMainId
}
},
ret(){
this.index--


+ 64
- 15
pages/index/preAppoint.vue View File

@ -1,23 +1,38 @@
<template>
<view class="page">
<image src="/static/image/bg/bg1x2.png"
<image :src="configList.img_13"
class="page-bg"
mode="aspectFill"></image>
<image src="/static/image/bg/logolist2.png"
<image :src="configList.img_7"
class="logo"
mode="widthFix"></image>
<view class="service">
<image :src="configList.img_2"
class="img_2"
mode="widthFix"></image>
<view class="title">
专属品鉴服务
</view>
<view class="stext">
专属品鉴服务 根据您的称号我们为您匹配了专属的单桶品鉴组合, 并且为您提供一次专属上门品鉴服务, 您可以点击下方按钮进行预约
</view>
</view>
<view class="btn-list">
<view class="next-btn-2"
@click="">
保存
@click="next">
点击预约
</view>
<view class="next-btn"
@click="next">
下一页
@click="rep">
返回
</view>
</view>
@ -28,11 +43,25 @@
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
rep(){
uni.navigateBack(-1)
// uni.reLaunch({
// url: '/pages/index/agreement'
// })
// uni.navigateTo({
// url: '/pages/index/end'
// })
},
next(){
uni.navigateTo({
url: '/pages_order/info/appoint'
})
},
}
}
</script>
@ -43,6 +72,26 @@
width: 600rpx;
margin: 150rpx 75rpx;
}
.service{
display: flex;
flex-direction: column;
align-items: center;
.img_2{
margin: 0 auto;
width: 100rpx;
}
.title{
font-weight: 900;
margin: 30rpx 0;
}
.stext{
width: 600rpx;
margin-bottom: 150rpx;
line-height: 50rpx;
font-size: 26rpx;
color: #777;
}
}
.btn-list{
display: flex;
flex-direction: column;
@ -52,24 +101,24 @@
align-items: center;
}
.next-btn{
width: 220rpx;
width: 400rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
padding: 22rpx 90rpx;
background-color: $uni-color;
border-radius: 30rpx;
border-radius: 40rpx;
}
.next-btn-2{
width: 220rpx;
width: 400rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
padding: 22rpx 90rpx;
background-color: $uni-color-primary;
border-radius: 30rpx;
border-radius: 40rpx;
}
}
</style>

+ 144
- 0
pages/index/title.vue View File

@ -0,0 +1,144 @@
<template>
<view class="page">
<image :src="configList.img_13"
class="page-bg"
mode="aspectFill"></image>
<image :src="configList.img_7"
class="logo"
mode="widthFix"></image>
<!-- next1 -->
<view class="content">
<image :src="titleBy.image"
class="content-bg"
mode="widthFix"></image>
</view>
<view class="btn-list">
<view class="next-btn-2"
@click="save">
保存
</view>
<view class="next-btn"
@click="next">
下一页
</view>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
index : 0,
}
},
computed : {
...mapState(['titleBy', 'configList']),
},
onLoad() {
console.log(this.$store.state.titleBy.image);
},
onShow() {
},
methods: {
next(){
uni.navigateTo({
url: '/pages/index/article'
})
},
async save(){
await this.$authorize('scope.writePhotosAlbum')
uni.getImageInfo({
src: this.titleBy.image,
success: function(image) {
/* 保存图片到手机相册 */
uni.saveImageToPhotosAlbum({
filePath: image.path,
success: function() {
uni.showModal({
title: '保存成功',
content: '图片已成功保存到相册',
showCancel: false
});
},
complete(res) {
console.log(res);
}
});
}
});
},
}
}
</script>
<style lang="scss" scoped>
.page{
.logo{
width: 600rpx;
margin: 150rpx 75rpx;
}
.content{
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0 60rpx;
text-align: center;
width: 600rpx;
margin: 0 auto;
margin-bottom: 50rpx;
z-index: 999;
.content-bg{
width: 100%;
top: 0;
left: 0;
}
}
}
.btn-list{
display: flex;
flex-direction: column;
gap: 40rpx;
width: 100%;
justify-content: center;
align-items: center;
}
.next-btn{
width: 400rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
background-color: $uni-color;
border-radius: 30rpx;
}
.next-btn-2{
width: 400rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
background-color: $uni-color-primary;
border-radius: 30rpx;
}
.second-color{
margin-top: 20rpx;
}
</style>

+ 98
- 54
pages_order/info/appoint.vue View File

@ -1,14 +1,23 @@
<template>
<view class="home">
<image src="/static/image/bg/1.png"
<image :src="configList.img_13"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<view class="flex-col"
v-if="!id"
style="width: 600rpx; padding: 20rpx 0; gap: 10rpx; border-radius: 12rpx; border: 2rpx solid #ecb864;">
<image :src="configList.img_7"
class="logo"
mode="widthFix"></image>
<view class="content">
<image :src="configList.img_11"
class="content-bg"
mode="scaleToFill"></image>
<view
class="topt"
v-if="!id">
<span style="font-size: 25rpx;">请选择您方便的时间</span>
<span style="font-size: 25rpx;">我们将根据您的日程为您安排上门威士忌品鉴服务</span>
<span style="font-size: 25rpx;">确保您能在舒适的环境中尽享专属体验</span>
@ -36,51 +45,49 @@
<span>姓名:</span>
<input v-model="form.username"
:disabled="id"
type="text" class="input" style="width: 20vw;"></input>
placeholder="请输入姓名"
type="text" class="input" style="width: 580rpx;"></input>
</view>
<!-- <span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span> -->
</view>
<view class="flex-center" style="align-items: flex-end;">
<view class="flex-start-col" style="gap: 10rpx;">
<span>联系电话:</span>
<input v-model="form.phone"
:disabled="id"
type="tel" class="input"></input>
placeholder="请输入联系电话"
type="tel" class="input" style="width: 580rpx;"></input>
</view>
<!-- <span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span> -->
</view>
<view class="flex-center">
<view class="flex-start-col" style="gap: 10rpx; width: 80vw;">
<span>地址: {{ addressCity }}</span>
<input v-model="address.address"
<view class="flex-start-col">
<span>详细地址</span>
<input v-model="form.address"
:disabled="id"
placeholder="请输入详情地址"
type="text" class="input"
style="width: 100%; height: 60rpx;"></input>
style="width: 580rpx;"></input>
</view>
</view>
</view>
</view>
</view>
<view class="an">
<view class="flex-center" style="gap: 30rpx;">
<view class="btn2" style="padding: 16rpx 80rpx;" @click="pre">
返回
</view>
<view class="btn2"
v-if="!id"
style="padding: 16rpx 80rpx;" @click="submit">
预约
</view>
<view class="btn2"
v-else
style="padding: 16rpx 80rpx;" @click="closeSubmit">
取消预约
</view>
<view class="flex-center" style="gap: 30rpx;">
<view class="next-btn" style="padding: 16rpx 80rpx;" @click="pre">
返回
</view>
<view class="next-btn-2"
v-if="!id"
style="padding: 16rpx 80rpx;" @click="submit">
确认/提交
</view>
<view class="next-btn-2"
v-else
style="padding: 16rpx 80rpx;" @click="closeSubmit">
取消预约
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
<view class="second-color">{{ configList.bg_title }}</view>
<uv-datetime-picker
@ -166,12 +173,10 @@
},
pre(){
// uni.navigateBack({
// delta:1
uni.navigateBack(-1)
// uni.reLaunch({
// url: '/pages/index/index'
// })
uni.reLaunch({
url: '/pages/index/index'
})
},
confirm(e){
this.date = e.value
@ -181,6 +186,7 @@
if(this.$utils.verificationAll(this.form, {
username : '请输入姓名',
phone : '请输入电话号码',
address : '请输入详情地址',
})){
return
}
@ -193,19 +199,9 @@
return
}
if(this.$utils.verificationAll(this.address, {
address : '请输入详情地址',
})){
return
}
uni.setStorageSync('user_address', this.address)
this.$api('submit', {
...this.address,
...this.form,
name : this.form.username,
area : this.address.district,
yearValue : this.$dayjs(this.date).format('YYYY'),
monthDay : this.$dayjs(this.date).format('MM-DD'),
dayTime : this.$dayjs(this.date).format('HH:mm'),
@ -246,18 +242,46 @@
<style lang="scss" scoped>
.home{
font-size: 28rpx;
.logo{
width: 600rpx;
height: 100rpx;
margin: 150rpx 75rpx;
}
.content{
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 60rpx;
text-align: center;
width: 720rpx;
margin: 0 auto;
.content-bg{
height: 100%;
width: 700rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.topt{
width: 600rpx;
padding: 20rpx 0;
gap: 10rpx;
border-radius: 12rpx;
border: 2rpx solid #ecb864;
display: flex;
flex-direction: column;
}
}
.second-color{
text-align: center;
margin-top: 40rpx;
}
}
.an{
position: fixed;
bottom: 300rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
.date {
border: 2rpx solid $uni-color;
@ -274,4 +298,24 @@
border-radius: 10rpx;
padding: 4rpx 10rpx;
}
.next-btn{
width: 160rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
background-color: $uni-color;
border-radius: 30rpx;
}
.next-btn-2{
width: 160rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
background-color: $uni-color-primary;
border-radius: 30rpx;
}
</style>

+ 4
- 0
store/store.js View File

@ -90,6 +90,10 @@ const store = new Vuex.Store({
api('getTitleByIds', {ids}, res => {
if(res.code == 200){
state.titleBy = res.result
state.articleList = res.result.answerObjectRuleNewsList
setTimeout(uni.navigateTo, 0, {
url: '/pages/index/title'
})
}
})
},


+ 53
- 0
utils/authorize.js View File

@ -0,0 +1,53 @@
function authorize(scope){
return new Promise((success, error) => {
uni.authorize({
/* scope.writePhotosAlbum 类型是保存到相册 */
scope,
success,
complete(res) {
/* 判断如果没有授权就打开设置选项让用户重新授权 */
uni.getSetting({
success(res) {
if (!res.authSetting[scope]) {
setting()
}
}
});
}
});
function setting(){
uni.showModal({
title: '当前操作未授权,请授权!',
content: '拒绝授权将影响本小程序部分功能的使用',
confirmText: '授权',
success(e) {
if(!e.confirm){
return error()
}
uni.openSetting({
success(res) {
if (!res.authSetting[scope]) {
uni.showToast({
title: '授权失败',
icon: 'none',
})
return error()
}
success()
}
});
}
})
}
})
}
export default authorize

+ 3
- 1
utils/index.js View File

@ -20,6 +20,7 @@ dayjs.locale('zh-cn')
import Oss from '@/utils/oss-upload/oss/index.js'
import { handleTree } from './tree.js'
import authorize from './authorize.js'
Vue.prototype.$handleTree = handleTree
Vue.prototype.$Oss = Oss
@ -27,4 +28,5 @@ Vue.prototype.$dayjs = dayjs
Vue.prototype.$timeUtils = time
Vue.prototype.$utils = util
Vue.prototype.$md5 = md5
Vue.prototype.$md5 = md5
Vue.prototype.$authorize = authorize

Loading…
Cancel
Save