uniapp 支付宝支付复制
parent
a6eb645d54
commit
0799a89b0e
|
@ -15,6 +15,13 @@ export function memberOrderInfo(){
|
|||
return request.get('api/order/member/memberOrderInfo', {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员头部信息
|
||||
*/
|
||||
export function memberHeadInfo(){
|
||||
return request.get('api/order/member/memberHeadInfo', {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员充值
|
||||
*/
|
||||
|
@ -27,4 +34,4 @@ export function memberTopUp(data) {
|
|||
*/
|
||||
export function memberApplyRefund(data) {
|
||||
return request.post('api/order/member/memberApplyRefund',data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
</view>
|
||||
<view class="mask" @click='close' v-if="pay_close"></view>
|
||||
<!-- 支付宝支付界面 -->
|
||||
<u-modal :show="alipayShow" title="支付宝支付">
|
||||
<view class="slot-content">
|
||||
<u-modal :show="alipayShow" title="支付宝支付" @confirm="handleConfirm">
|
||||
<view class="slot-content">
|
||||
<rich-text :nodes="alipayForm"></rich-text>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
@ -65,11 +65,35 @@
|
|||
data() {
|
||||
return {
|
||||
alipayShow: false,
|
||||
alipayForm: ''
|
||||
alipayForm:`链接已复制,请到外部浏览器完成支付`
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['systemPlatform', 'openId']),
|
||||
methods: {
|
||||
handleConfirm(){
|
||||
this.alipayShow = false
|
||||
window.location.reload()
|
||||
},
|
||||
// 复制操作
|
||||
_copy(context) {
|
||||
// 创建输入框元素
|
||||
let oInput = document.createElement('input');
|
||||
// 将想要复制的值
|
||||
oInput.value = context;
|
||||
// 页面底部追加输入框
|
||||
document.body.appendChild(oInput);
|
||||
// 选中输入框
|
||||
oInput.select();
|
||||
// 执行浏览器复制命令
|
||||
document.execCommand('Copy');
|
||||
// 弹出复制成功信息
|
||||
this.$util.Tips({
|
||||
title: '复制链接成功'
|
||||
})
|
||||
this.alipayShow = true
|
||||
// 复制后移除输入框
|
||||
oInput.remove();
|
||||
},
|
||||
close: function() {
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
|
@ -134,11 +158,13 @@
|
|||
break;
|
||||
case 'ALIPAY':
|
||||
uni.hideLoading();
|
||||
const div = document.createElement('div')
|
||||
/* 下面的data.content就是后台返回接收到的数据 */
|
||||
div.innerHTML = jsConfig.body
|
||||
document.body.appendChild(div)
|
||||
document.forms[0].submit()
|
||||
this._copy(jsConfig.body)
|
||||
this.alipayShow = true
|
||||
// const div = document.createElement('div')
|
||||
// /* 下面的data.content就是后台返回接收到的数据 */
|
||||
// div.innerHTML = jsConfig.body
|
||||
// document.body.appendChild(div)
|
||||
// document.forms[0].submit()
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
|
@ -172,7 +198,7 @@
|
|||
<style scoped lang="scss">
|
||||
.payment {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
bottom: 4%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
|
|
|
@ -16,7 +16,7 @@ function prePage(){
|
|||
|
||||
export const toLogin = Debounce(_toLogin,800)
|
||||
|
||||
export function _toLogin(push, pathLogin) {
|
||||
export function _toLogin(push, pathLogin) {
|
||||
|
||||
store.commit("LOGOUT");
|
||||
let path = prePage();
|
||||
|
@ -31,29 +31,35 @@ export function _toLogin(push, pathLogin) {
|
|||
}
|
||||
|
||||
// #ifdef H5
|
||||
if (isWeixin()) {
|
||||
let urlData = location.pathname + location.search
|
||||
if (urlData.indexOf('?') !== -1) {
|
||||
urlData += '&go_longin=1';
|
||||
} else {
|
||||
urlData += '?go_longin=1';
|
||||
}
|
||||
if (!Cache.has('snsapiKey')) {
|
||||
auth.oAuth('snsapi_base', urlData);
|
||||
} else {
|
||||
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/wechat_login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
}
|
||||
|
||||
// if (isWeixin()) {
|
||||
// let urlData = location.pathname + location.search
|
||||
// if (urlData.indexOf('?') !== -1) {
|
||||
// urlData += '&go_longin=1';
|
||||
// } else {
|
||||
// urlData += '?go_longin=1';
|
||||
// }
|
||||
// if (!Cache.has('snsapiKey')) {
|
||||
// auth.oAuth('snsapi_base', urlData);
|
||||
// } else {
|
||||
// if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/users/wechat_login/index'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// if (['/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/users/login/index'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
|
||||
if (['pages/user/index','/pages/user/index'].indexOf(login_back_url) == -1) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name" : "crmeb",
|
||||
"appid" : "__UNI__B5A2217",
|
||||
"description" : "crmeb商城",
|
||||
"name" : "创盈云",
|
||||
"appid" : "__UNI__C8AF139",
|
||||
"description" : "创盈商城",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 1001,
|
||||
"transformPx" : false,
|
||||
|
@ -109,7 +109,7 @@
|
|||
"async" : {
|
||||
"timeout" : 200000
|
||||
},
|
||||
"title" : "CRMEB"
|
||||
"title" : "创盈云"
|
||||
},
|
||||
"plus" : {
|
||||
"statusbar" : {
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
|
||||
};
|
||||
},
|
||||
|
||||
async onLoad() {
|
||||
const res = await memberGradeInfo()
|
||||
if(res.data.some((item) => !!parseInt(item.isExist))){
|
||||
|
@ -113,6 +114,7 @@
|
|||
this.memberData = res.data
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleSelect(value){
|
||||
switch (value.name){
|
||||
case "购买记录":
|
||||
|
@ -121,7 +123,6 @@
|
|||
})
|
||||
break;
|
||||
case "为他人充值":
|
||||
console.log(123)
|
||||
uni.navigateTo({
|
||||
url:'/pages/member_others/index'
|
||||
})
|
||||
|
@ -216,10 +217,14 @@
|
|||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
|
||||
::v-deep .u-popup__content{
|
||||
margin-bottom: 11%;
|
||||
|
||||
.u-nav-slot{
|
||||
::v-deep .u-popup__content{
|
||||
padding-bottom: 20% !important;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.phone-money {
|
||||
width: 604rpx;
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<view class="box">
|
||||
<view class="box-member">
|
||||
<view class="member-left">
|
||||
<text class="left-title">创盈普通会员</text>
|
||||
<text class="left-title">{{memberDetail.grade}}</text>
|
||||
<view class="left-info">
|
||||
<text>152****0693</text>
|
||||
<text>会员积分:240/640</text>
|
||||
<text>{{userInfo.mobile}}</text>
|
||||
<text>会员积分:{{memberDetail.integral}}</text>
|
||||
</view>
|
||||
<text>再升1级即可获得【XX】等6项权益</text>
|
||||
</view>
|
||||
|
@ -22,7 +22,7 @@
|
|||
</view>
|
||||
<view class="equity-item" v-for="(item,index) in 2" :key="index">
|
||||
<view class="equity-grade">
|
||||
<text>办理档次【640元】档</text>
|
||||
<image src='../../static/images/member240.png'></image>
|
||||
<text>办理日期:2021.12.30</text>
|
||||
</view>
|
||||
<view class="equity-money">
|
||||
|
@ -58,6 +58,12 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
memberHeadInfo
|
||||
} from '@/api/member.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
export default {
|
||||
name: "member_application",
|
||||
data() {
|
||||
|
@ -74,32 +80,13 @@
|
|||
},
|
||||
],
|
||||
show: false,
|
||||
form: {
|
||||
phone: ''
|
||||
},
|
||||
rules: {
|
||||
phone: [{
|
||||
pattern: /^[0-9a-zA-Z]*$/g,
|
||||
// 正则检验前先将值转为字符串
|
||||
transform(value) {
|
||||
return String(value);
|
||||
},
|
||||
message: '只能包含字母或数字'
|
||||
},
|
||||
{
|
||||
message: '手机号不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
]
|
||||
}
|
||||
memberDetail:{}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
computed: mapGetters(['userInfo']),
|
||||
async onLoad() {
|
||||
const res = await memberHeadInfo()
|
||||
this.memberDetail = res.data
|
||||
},
|
||||
methods: {
|
||||
handleSelect(value){
|
||||
|
@ -141,6 +128,12 @@
|
|||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
|
||||
.u-nav-slot{
|
||||
::v-deep .u-popup__content{
|
||||
padding-bottom: 20% !important;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.box-member {
|
||||
|
@ -247,12 +240,19 @@
|
|||
border-radius: 20rpx;
|
||||
margin: 0 20rpx 20rpx 20rpx;
|
||||
|
||||
// padding: 30rpx 24rpx;
|
||||
.equity-grade {
|
||||
border-radius: 10rpx 10rpx;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
image{
|
||||
width: 295rpx;
|
||||
height: 35rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.equity-money {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<div class="login-wrapper">
|
||||
<div class="logo-wrap">
|
||||
<img src="/static/images/logo.png" style="width:127rpx;height:45rpx;"></image>
|
||||
<img src="/static/images/mallLogo.png" style="width:105rpx;height:105rpx;"></image>
|
||||
<img src="/static/images/mall.png" style="width:233rpx;height:43rpx;"></image>
|
||||
</div>
|
||||
<view class="title">登录</view>
|
||||
<div class="whiteBg">
|
||||
|
@ -378,6 +379,11 @@
|
|||
|
||||
.logo-wrap {
|
||||
margin: 285rpx 0 85rpx 0;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
img{
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
|
||||
<title>CRMEB</title>
|
||||
<title>创盈云</title>
|
||||
<meta name="Copyright" content="helang">
|
||||
<!-- <link rel="shortcut icon" type="image/png" href="/uniapp-extend/static/logo.png"> -->
|
||||
<meta name="keywords" content="CRMEB">
|
||||
<meta name="description" content="CRMEB">
|
||||
<meta name="keywords" content="创盈云">
|
||||
<meta name="description" content="创盈云">
|
||||
<style type="text/css">
|
||||
body{
|
||||
margin: 0;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -1,13 +1,3 @@
|
|||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
import { EXPIRE } from '../config/app';
|
||||
|
||||
class Cache {
|
||||
|
|
|
@ -26,6 +26,7 @@ function baseRequest(url, method, data, {
|
|||
if (!noAuth) {
|
||||
//登录过期自动登录
|
||||
if (!store.state.app.token && !checkLogin()) {
|
||||
console.log(store.state.app.token,checkLogin(),123123)
|
||||
toLogin();
|
||||
return Promise.reject({
|
||||
msg: '未登录'
|
||||
|
|
Loading…
Reference in New Issue