gukai 1 year ago
parent abeedca86c
commit 639a45ab29

@ -178,4 +178,13 @@ export default {
needLogin: true,
});
},
getAliCard(data = {}) {
return request({
url: "/common/getAliCard",
method: "POST",
data,
needLogin: true,
});
},
};

@ -174,5 +174,21 @@ export default {
data,
needLogin: true,
});
}
},
openAliCard(data = {}) {
return request({
url: "/user/openAliCard",
method: "POST",
data,
needLogin: true,
});
},
creatCard(data = {}) {
return request({
url: "/user/creatCard",
method: "POST",
data,
needLogin: true,
});
},
};

@ -187,7 +187,7 @@
backPage() {
if (this.type == 0) {
this.$emit('isLogin')
} else if (this.type != 2) {
setTimeout(() => {
const backPage = uni.getStorageSync("backPage")

@ -24,6 +24,18 @@
}
}
},
{
"path": "pages/card/loading",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "会员卡",
"enablePullDownRefresh": true,
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES"
}
}
},
{
"path": "pages/my/my",
"style": {

@ -1,11 +1,13 @@
<template>
<view class="tabbar-page page-box" style="position: relative;display: flex;align-items: center;">
<view style="display: flex;flex-direction: column;align-items: center;width: 100%;">
<view>
<image style="width: 200rpx;height: 200rpx;border-radius: 20rpx;" :src="storeDetail.logo_url"></image>
</view>
<view style="margin-top: 20rpx;">
{{ storeDetail.name }}
<view class="tabbar-page page-box" >
<view style="position: relative;display: flex;align-items: center;height: 100vh;">
<view style="display: flex;flex-direction: column;align-items: center;width: 100%;">
<view>
<image style="width: 200rpx;height: 200rpx;border-radius: 20rpx;" :src="storeDetail.logo_url"></image>
</view>
<view style="margin-top: 20rpx;">
{{ storeDetail.name }}
</view>
</view>
</view>
</view>
@ -13,57 +15,51 @@
<script>
import theTabBar from "@/components/the/the-tabbar";
import logins from '@/components/login/logins.vue'
export default {
mixins: [],
components: {
theTabBar
theTabBar,
logins
},
data() {
return {
card: null,
vip_user: null,
from: {
sex: `MALE`
},
show_birthday: false
}
},
onLoad(opt) {
uni.hideTabBar({
animation: true,
success: function (res) {
console.log(res); // { "success": true}
},
fail: function (err) {
console.log(err);
}
});
this.getData()
},
computed: {
shareData() {
return {
path: "/pages/index/index",
desc: "多彩时尚,一站式购物体验"
}
}
},
async onPullDownRefresh() {
},
async onPullDownRefresh() {},
//
onShareAppMessage(res) {
},
onReachBottom() {
this.on_reach_bottom = true;
},
onPullDownRefresh() {
this.getTemplate();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 200);
},
onShareAppMessage(res) {},
onReachBottom() {},
onPullDownRefresh() {},
methods: {
async getData() {
try {
uni.showLoading({
title: '加载中'
})
const res = await this.$api.common.getAliCard();
uni.hideLoading()
this.card = res.data.card
if (res.data.card && res.data.card.create_user_link) {
location.href = res.data.card.create_user_link
}
} catch (e) {
// throw new Error(e);
}
}
}
}
</script>

@ -0,0 +1,65 @@
<template>
<view class="tabbar-page page-box" style="display: flex;align-items: center;justify-content: center;height: 100vh;">
<template v-if="code == 0">
<view>
<u-icon name="checkbox-mark" color="#19be6b" size="100"></u-icon>
<view style="text-align: center;font-size: 46rpx;color: #000;margin-top: 40rpx;">
开卡成功
</view>
</view>
</template>
<template v-if="code == 1">
<view>
<u-icon name="close-circle-fill" color="#fa3534" size="100"></u-icon>
<view style="text-align: center;font-size: 46rpx;color: red;margin-top: 40rpx;">
开卡失败
</view>
</view>
</template>
</view>
</template>
<script>
import theTabBar from "@/components/the/the-tabbar";
import logins from '@/components/login/logins.vue'
export default {
mixins: [],
components: {
theTabBar,
logins
},
data() {
return {
code: -1
}
},
onLoad(opt) {
this.code = opt.code
},
computed: {
},
async onPullDownRefresh() {},
//
onShareAppMessage(res) {},
onReachBottom() {},
onPullDownRefresh() {},
methods: {
isLogin() {
},
async getData() {
}
}
}
</script>
<style lang="scss">
// #ifndef H5
.content {
padding-top: calc(44px + var(--status-bar-height));
}
// #endif
</style>

@ -21,28 +21,20 @@
},
data() {
return {
opt: {}
}
},
onLoad(opt) {
uni.hideTabBar({
animation: true,
success: function (res) {
console.log(res); // { "success": true}
},
fail: function (err) {
console.log(err);
}
});
this.opt = opt
this.$nextTick(() => {
if (opt.auth_code) {
this.getData()
}
})
},
computed: {
shareData() {
return {
path: "/pages/index/index",
desc: "多彩时尚,一站式购物体验"
}
}
},
async onPullDownRefresh() {
@ -58,13 +50,10 @@
this.on_reach_bottom = true;
},
onPullDownRefresh() {
this.getTemplate();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 200);
},
methods: {
}
}
</script>

@ -122,6 +122,15 @@
}
},
async onLoad(query) {
if (!this.$utils.isInAliBrowser()) {
return uni.showModal({
title: '提示',
content: '请使用支付宝扫码',
showCancel: false
})
}
let qrCode = '';
// #ifdef MP-ALIPAY
@ -247,6 +256,11 @@
break;
case 2:
return uni.showModal({
title: '提示',
content: '请使用支付宝扫码',
showCancel: false
})
// #ifndef MP
await this.wechatPayNow({
payType,

Loading…
Cancel
Save