|
|
@@ -4,16 +4,16 @@
|
|
|
<div class="callback-wrap">
|
|
|
<div class="callback-blo" :class="{ 'paddingTop' : pageStatus == 7 }">
|
|
|
<block v-if="pageStatus == 7">
|
|
|
- <div class="module-wrap">
|
|
|
- <div class="module-tit">提示</div>
|
|
|
- <div class="module-det">
|
|
|
- <div class="module-list" v-for="(item, index) in promptData" :key="index">
|
|
|
- <span class="dot-wrap"></span>
|
|
|
- <span>{{ item }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </block>
|
|
|
+ <div class="module-wrap">
|
|
|
+ <div class="module-tit">提示</div>
|
|
|
+ <div class="module-det">
|
|
|
+ <div class="module-list" v-for="(item, index) in promptData" :key="index">
|
|
|
+ <span class="dot-wrap"></span>
|
|
|
+ <span>{{ item }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </block>
|
|
|
<block v-else>
|
|
|
<!-- 使用icon -->
|
|
|
<!-- 成功 icon -->
|
|
|
@@ -47,13 +47,15 @@
|
|
|
</div>
|
|
|
<!-- qr-code -->
|
|
|
<!-- <div class="qr-code-wrap" v-if="option.focus == 0"> -->
|
|
|
- <div class="qr-code-wrap">
|
|
|
- <div class="qr-code-img">
|
|
|
- <img :src="`${constant.imgUrl}/retail/common/qr-code.png`" alt="" />
|
|
|
+ <block v-if="pageStatus == 2">
|
|
|
+ <div class="qr-code-wrap">
|
|
|
+ <div class="qr-code-img">
|
|
|
+ <img :src="`${constant.imgUrl}/retail/common/qr-code.png`" alt />
|
|
|
+ </div>
|
|
|
+ <div>识别二维码关注花卉宝</div>
|
|
|
+ <div>审核结果将通过微信通知您</div>
|
|
|
</div>
|
|
|
- <div>识别二维码关注花卉宝</div>
|
|
|
- <div>审核结果将通过微信通知您</div>
|
|
|
- </div>
|
|
|
+ </block>
|
|
|
</block>
|
|
|
<!-- button -->
|
|
|
<div class="button-wrap">
|
|
|
@@ -70,7 +72,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-/** *
|
|
|
+ /** *
|
|
|
* 页面状态
|
|
|
* @parmas pageStatus 进入页面的状态
|
|
|
* @parmas 1 续订成功
|
|
|
@@ -81,115 +83,117 @@
|
|
|
* @parmas 6 授权成功 - 扫码支付 -- successPayCode
|
|
|
* @parmas 7 授权提示 - 扫码支付 -- successPayCode
|
|
|
*/
|
|
|
-import { accountDet, applyStatus, getAuthUrl } from '@/api/official'
|
|
|
-// import { getShopUser } from '@/utils/auth'
|
|
|
-export default {
|
|
|
- name: 'callback',
|
|
|
- data() {
|
|
|
- return {
|
|
|
- constant: this.$constant,
|
|
|
- data: {},
|
|
|
- // pageStatus: '2',
|
|
|
- pageStatus: '2',
|
|
|
- promptData: [
|
|
|
- '确认你已经有公众号(服务号),并且已认证和申请微 信支付',
|
|
|
- '满足以上条件,可以点下方按钮开始授权。',
|
|
|
- '点击之后会跳到新页面,页面有个二维码,识别后按确 认授权即可。'
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- btnText() {
|
|
|
- let text = ''
|
|
|
- switch (this.pageStatus) {
|
|
|
- case '1':
|
|
|
- text = '返回管理中心'
|
|
|
- break
|
|
|
- case '2':
|
|
|
- text = '返回首页'
|
|
|
- break
|
|
|
- case '3':
|
|
|
- text = '返回首页'
|
|
|
- break
|
|
|
- case '4':
|
|
|
- text = '返回首页'
|
|
|
- break
|
|
|
- case '5':
|
|
|
- text = '开始授权'
|
|
|
- break
|
|
|
- case '6':
|
|
|
- text = '管理中心'
|
|
|
- break
|
|
|
- case '7':
|
|
|
- text = '开始授权'
|
|
|
- break
|
|
|
- default:
|
|
|
- text = '返回管理中心'
|
|
|
- break
|
|
|
+ import { getFirstHost } from '@/utils/common'
|
|
|
+ // api
|
|
|
+ import { accountDet, applyStatus, getAuthUrl } from '@/api/official'
|
|
|
+ // import { getShopUser } from '@/utils/auth'
|
|
|
+ export default {
|
|
|
+ name: 'callback',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ constant: this.$constant,
|
|
|
+ data: {},
|
|
|
+ // pageStatus: '2',
|
|
|
+ pageStatus: '2',
|
|
|
+ promptData: ['确认你已经有公众号(服务号),并且已认证和申请微 信支付', '满足以上条件,可以点下方按钮开始授权。', '点击之后会跳到新页面,页面有个二维码,识别后按确 认授权即可。']
|
|
|
}
|
|
|
- return text
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad() {
|
|
|
- // if (!this.$util.isLogin()) {
|
|
|
- // getShopUser()
|
|
|
- // return false
|
|
|
- // }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- // this.pageStatus = this.option.pageStatus
|
|
|
- // this.init()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- init() {
|
|
|
- this.$util.getCheckLogin().then(res => {
|
|
|
- if (res) {
|
|
|
- this._getStatus()
|
|
|
- if (this.pageStatus == 1 || this.pageStatus == 5) {
|
|
|
- this._accountDet()
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
- // 获取状态
|
|
|
- _getStatus() {
|
|
|
- applyStatus().then(res => {
|
|
|
- let status = res.data.status
|
|
|
- if (status == 1) {
|
|
|
- this.pageStatus = 2
|
|
|
+ computed: {
|
|
|
+ btnText() {
|
|
|
+ let text = ''
|
|
|
+ switch (this.pageStatus) {
|
|
|
+ case '1':
|
|
|
+ text = '返回管理中心'
|
|
|
+ break
|
|
|
+ case '2':
|
|
|
+ text = '返回首页'
|
|
|
+ break
|
|
|
+ case '3':
|
|
|
+ text = '返回首页'
|
|
|
+ break
|
|
|
+ case '4':
|
|
|
+ text = '返回首页'
|
|
|
+ break
|
|
|
+ case '5':
|
|
|
+ text = '开始授权'
|
|
|
+ break
|
|
|
+ case '6':
|
|
|
+ text = '管理中心'
|
|
|
+ break
|
|
|
+ case '7':
|
|
|
+ text = '开始授权'
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ text = '返回管理中心'
|
|
|
+ break
|
|
|
}
|
|
|
- })
|
|
|
+ return text
|
|
|
+ }
|
|
|
},
|
|
|
- // 获取用户信息
|
|
|
- _accountDet() {
|
|
|
- accountDet().then(res => {
|
|
|
- this.data = res.data
|
|
|
- })
|
|
|
+ onLoad() {
|
|
|
+ // if (!this.$util.isLogin()) {
|
|
|
+ // getShopUser()
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
},
|
|
|
- jumpPage() {
|
|
|
- if (this.btnText == '返回首页') {
|
|
|
- this.$util.pageTo({
|
|
|
- url: '/official/index',
|
|
|
- query: {
|
|
|
- id: this.option.id
|
|
|
+ mounted() {
|
|
|
+ // this.pageStatus = this.option.pageStatus
|
|
|
+ // this.init()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ if (this.option.pagestatus == 1) {
|
|
|
+ this.pageStatus = 1
|
|
|
+ }
|
|
|
+ this.$util.getCheckLogin().then(res => {
|
|
|
+ if (res) {
|
|
|
+ // this._getStatus()
|
|
|
+ if (this.pageStatus == 1 || this.pageStatus == 5) {
|
|
|
+ this._accountDet()
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- } else if (this.btnText == '返回管理中心') {
|
|
|
- this.$util.pageTo({
|
|
|
- url: '/official/index',
|
|
|
- query: {
|
|
|
- id: this.option.id
|
|
|
+ },
|
|
|
+ // 获取状态
|
|
|
+ _getStatus() {
|
|
|
+ applyStatus().then(res => {
|
|
|
+ let status = res.data.status
|
|
|
+ if (status == 1) {
|
|
|
+ this.pageStatus = 2
|
|
|
}
|
|
|
})
|
|
|
- } else if (this.btnText == '开始授权') {
|
|
|
- getAuthUrl().then(res => {
|
|
|
- location.href = res.data.url
|
|
|
+ },
|
|
|
+ // 获取用户信息
|
|
|
+ _accountDet() {
|
|
|
+ accountDet().then(res => {
|
|
|
+ this.data = res.data
|
|
|
})
|
|
|
- // this.$msg('功能待对接!')
|
|
|
+ },
|
|
|
+ jumpPage() {
|
|
|
+ if (this.btnText == '返回首页') {
|
|
|
+ this.$util.pageTo({
|
|
|
+ url: '/official/index',
|
|
|
+ query: {
|
|
|
+ id: this.option.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.btnText == '返回管理中心') {
|
|
|
+ // this.$util.pageTo({
|
|
|
+ // url: '/official/index',
|
|
|
+ // query: {
|
|
|
+ // id: this.option.id
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ location.href = `${window.location.protocol}//b.${getFirstHost()}.com/#/`
|
|
|
+ } else if (this.btnText == '开始授权') {
|
|
|
+ getAuthUrl().then(res => {
|
|
|
+ location.href = res.data.url
|
|
|
+ })
|
|
|
+ // this.$msg('功能待对接!')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -202,10 +206,10 @@ export default {
|
|
|
background-color: #fff;
|
|
|
box-shadow: 2px 2px 16px 0px rgba(181, 181, 181, 0.29);
|
|
|
border-radius: 10px;
|
|
|
- text-align: center;
|
|
|
- &.paddingTop {
|
|
|
- padding-top: 40px;
|
|
|
- }
|
|
|
+ text-align: center;
|
|
|
+ &.paddingTop {
|
|
|
+ padding-top: 40px;
|
|
|
+ }
|
|
|
// 使用icon
|
|
|
.icon {
|
|
|
.iconfont {
|
|
|
@@ -220,30 +224,30 @@ export default {
|
|
|
width: 294px;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
- }
|
|
|
- // module
|
|
|
- .module-wrap {
|
|
|
- padding: 0 32px;
|
|
|
- text-align: left;
|
|
|
- .module-tit {
|
|
|
- font-size: 38px;
|
|
|
- // margin-bottom: 20px;
|
|
|
- }
|
|
|
- .module-det {
|
|
|
- .module-list {
|
|
|
- @include disFlex(flex-start, flex-start);
|
|
|
- margin-top: 30px;
|
|
|
- .dot-wrap {
|
|
|
- width: 10px;
|
|
|
- height: 10px;
|
|
|
- border-radius: 50%;
|
|
|
- background-color: $mainColor;
|
|
|
- margin-top: 12px;
|
|
|
- margin-right: 24px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ // module
|
|
|
+ .module-wrap {
|
|
|
+ padding: 0 32px;
|
|
|
+ text-align: left;
|
|
|
+ .module-tit {
|
|
|
+ font-size: 38px;
|
|
|
+ // margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ .module-det {
|
|
|
+ .module-list {
|
|
|
+ @include disFlex(flex-start, flex-start);
|
|
|
+ margin-top: 30px;
|
|
|
+ .dot-wrap {
|
|
|
+ width: 10px;
|
|
|
+ height: 10px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background-color: $mainColor;
|
|
|
+ margin-top: 12px;
|
|
|
+ margin-right: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// prompt
|
|
|
.prompt-wrap {
|
|
|
margin-top: 60px;
|