|
|
@@ -0,0 +1,105 @@
|
|
|
+<template>
|
|
|
+ <view>
|
|
|
+ <view style="padding:40upx 20upx 40upx 20upx;height:auto;width:95vw;font-size:36upx;">
|
|
|
+ <view>为了加快系统的开发进度,实现大家需要的<text style="font-weight:bold;color:#3385FF;">上下游连通</text>、<text style="font-weight:bold;color:#3385FF;">连麦芽田一键发跑腿</text>、<text style="font-weight:bold;color:#3385FF;">会员充值</text>、<text style="font-weight:bold;color:#3385FF;">散客到店自助下单</text>等重要功能</view>
|
|
|
+ <view style="margin-top:24upx;">特向您收取未来时间的年费,感谢您对公司的支持</view>
|
|
|
+ <view style="margin-top:24upx;">当前系统到期时间:{{ currentDeadline }}</view>
|
|
|
+ <view style="margin-top:24upx;">续期一年到期时间:<text style="color:#3385FF;">{{ newDeadline }}</text></view>
|
|
|
+ <view style="margin-top:40upx;text-align:center;">
|
|
|
+ <button class="admin-button-com big default" @click="closeRenew()">稍后再说</button>
|
|
|
+ <button class="admin-button-com big blue" @click="startRenew()" style="margin-left:80upx;">支持公司,续期一年</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import wexinPay from "@/utils/pay/wxPay";
|
|
|
+import { renewShop,needRemind } from "@/api/renew"
|
|
|
+export default {
|
|
|
+ name: "renew",
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ currentDeadline:'',
|
|
|
+ newDeadline:''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ },
|
|
|
+ onLoad(){
|
|
|
+ let that = this
|
|
|
+ needRemind().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.currentDeadline = res.data.currentDeadline
|
|
|
+ that.newDeadline = res.data.newDeadline
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onUnload() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(){
|
|
|
+
|
|
|
+ },
|
|
|
+ startRenew(){
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ let that = this
|
|
|
+ let type = uni.getSystemInfoSync().platform
|
|
|
+ that.$msg("请在小程序上续期")
|
|
|
+ if(type == 'android'){
|
|
|
+ if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
|
|
|
+ plus.share.getServices(function(s){
|
|
|
+ var sweixin
|
|
|
+ for (var i = 0; i < s.length; i++) {
|
|
|
+ var t = s[i];
|
|
|
+ if (t.id == 'weixin') {
|
|
|
+ sweixin = t;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
|
|
|
+ if (sweixin && sweixin.nativeClient) {
|
|
|
+ sweixin.launchMiniProgram({
|
|
|
+ id: miniOriginalId,
|
|
|
+ path: '/admin/home/workbench',
|
|
|
+ type: 0
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.$msg("没有找到微信服务")
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
+ }
|
|
|
+ }, function(e){
|
|
|
+ that.$msg("没有找到微信服务哦")
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.$msg("请安装微信,再打开小程序")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ renewShop().then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ wexinPay(res.data, this.getSuccess, this.getError)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
+ getSuccess(){
|
|
|
+ this.$util.pageTo({url:"/admin/shop/renewSuccess",type:2})
|
|
|
+ },
|
|
|
+ getError(){
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+</style>
|