1.修改文案

master
杨杰 3 years ago
parent e86bb96f67
commit 8377c5d683
  1. 9
      high-unionPay/Utils/Api.js
  2. 10
      high-unionPay/pages/goods/coupon-details/coupon-details.vue
  3. 52
      high-unionPay/pages/goods/externalCoupon/externalCoupon.vue
  4. 11
      high-unionPay/pages/pay/success/success.vue
  5. 36
      high-unionPay/pages/unionPay/unionPay-entrance/unionPay-entrance.vue
  6. 33
      high-unionPay/pages/userLogin/userLogin.vue

@ -14,6 +14,10 @@ export const HandleCode = params => {
export const GetPhoneNumber = params => {
return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data);
};
//银联手机号登录
export const unionPhoneLogin = params => {
return POST('GET', `${base}/user/unionPhoneLogin`, params).then(res => res.data);
};
//获取用户授权信息
export const getUserInfo = params => {
return POST('GET', `${base}/wechat/getUserInfo`, params).then(res => res.data);
@ -181,7 +185,10 @@ export const orderToUnionPayphone = params => {
export const paygetOrderById = params => {
return POST('GET', `${base}/outRechargeOrder/getOrderById`, params).then(res => res.data);
}
//获取设置用户参数
export const getUserParam = params => {
return POST('GET', `${base}/highUser/getUserParam`, params).then(res => res.data);
}
/**
* 工会卡
*/

@ -49,9 +49,15 @@
</view> -->
</view>
<view class="mart20 fotct fcorred font15 marb20 height20"
v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4">
v-if="couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0">
预约订单已成功 门店会在24小时内联系您</view>
<view class="mart20 fotct fcorred font15 marb20 height20"
v-if="!couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource == 3">
请出示核销码(商户扫客户)</view>
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4">
<view class="mart20 fotct fcorred font15 marb20 height20"
v-if="!couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 3">
请告知加油员用码商支付</view>
<view class="width90 mart20 fotct" v-if="!couponDesInfo.couponInfo.reserveStatus">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image>
</view>
<view class="fotct fcor333 font15 marb10 mart10" v-if="couponDesInfo.couponInfo.couponSource != 4">{{couponDesInfo.couponCodeInfo.codeKey}}</view>

@ -14,7 +14,7 @@
</view>
</view>
<view class="line1 mart15"></view>
<button class="coupne-btn width60w mart20 marb20" v-if="userInfo == 1" lang="zh_CN" @click="getuserinfo"
<button class="coupne-btn width60w mart20 marb20" v-if="userInfo == 1" lang="zh_CN" open-type="getPhoneNumber" @getphonenumber="loginByPhone"
withCredentials="true">点击领取</button>
<button class="coupne-btn width60w mart20 marb20" v-else @click="receiveDiscount">点击领取</button>
<view class="width90 mart10 fcor666">去使用</view>
@ -62,7 +62,8 @@
getDiscountByQrCode,
receiveDiscount,
HandleCode,
getUserInfo
getUserInfo,
loginByPhone
} from '../../../Utils/Api.js';
// import authorize from '../../../components/Authorize';
let app = getApp();
@ -124,9 +125,9 @@
})
}
})
var arr1 = decodeURIComponent(options.q);
var arr2 = arr1.split('=');
this.codes = arr2[2];
// var arr1 = decodeURIComponent(options.q);
// var arr2 = arr1.split('=');
this.codes = options.id;
this.getDiscountByQrCode();
},
@ -249,6 +250,47 @@
// })
},
//
loginByPhone(PhoneNumber) {
if(PhoneNumber.detail.iv == undefined){
uni.showToast({
title: "用户取消授权",
icon: "none"
});
return;
}
let params = {
openId: app.globalData.openId,
iv: PhoneNumber.detail.iv,
encryptedData: PhoneNumber.detail.encryptedData
}
loginByPhone(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '手机号授权成功',
icon: 'none',
duration: 2000
})
this.user = res.return_data.object.highUser;
app.globalData.token = res.return_data.uniqueCode;
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
this.receiveDiscount();
this.userInfo = 2;
}
});
},
//
toGoods(e) {
if (app.globalData.userInfo) {

@ -37,8 +37,15 @@
<view class="width100">
<view class="width90 mart10 fcor666" v-if="!couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource == 3">请出示核销码(商户扫客户)</view>
<view class="mart20 fotct fcorred font15 marb20" v-if="!couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 3">请告知加油员用码商支付</view>
<view class="mart20 fotct fcorred font15 marb20 height20"
v-if="couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0">
预约订单已成功 门店会在24小时内联系您</view>
<view class="mart20 fotct fcorred font15 marb20 height20"
v-if="!couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource == 3">
请出示核销码(商户扫客户)</view>
<view class="mart20 fotct fcorred font15 marb20 height20"
v-if="!couponDesInfo.couponInfo.reserveStatus && couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 3">
请告知加油员用码商支付</view>
<view class="width90 mart20 fotct" v-if="!couponDesInfo.couponInfo.reserveStatus">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg">
</image>

@ -12,24 +12,25 @@
</template>
<script>
import {
getUserParam
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {}
},
onLoad() {
console.log('==========')
let that = this;
uni.getStorage({
key: "user",
success(e) {
app.globalData.userInfo = e.data //token
uni.getStorage({
key: 'token',
success(e) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
success(e) {
app.globalData.token = e.data;
that.getUserParam();
},
fail() {
uni.navigateTo({
@ -46,14 +47,29 @@
})
},
methods: {
//ID
getUserParam() {
getUserParam().then(res => {
if (res.return_code == '000000' && res.return_data) {
uni.navigateTo({
url: '../../goods/externalCoupon/externalCoupon?id=' + res.return_data
})
}
})
},
//
jumprecharge(item) {
if (!app.globalData.latitude) {
this.hqaddress(item);
return;
if (app.globalData.userInfo) {
if (!app.globalData.latitude) {
this.hqaddress(item);
return;
}
this.jumpsValue(item);
} else {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
}
this.jumpsValue(item);
},
//
//

@ -1,8 +1,8 @@
<template>
<view>
<image mode="widthFix" class="width90 mart20" :src="imagewxUrl+imgadres1"></image>
<image mode="widthFix" class="width90 mart20" :src="imagewxUrl+imgadres"></image>
<!-- <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!user.phone">授权手机号</button> -->
<view class="width94">{{code}}</view>
<!-- <view class="width94">{{code}}</view> -->
<UPButton class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet bornone" @click="btnClick" :scope="scope">
授权手机号
</UPButton>
@ -24,7 +24,8 @@
const app = getApp();
import {
getUserInfo,
GetPhoneNumber
GetPhoneNumber,
unionPhoneLogin
} from "../../Utils/Api.js"
export default {
name: 'App',
@ -33,7 +34,7 @@
user: '',
scope: "scope.mobile,scope.auth",
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'login.png',
imgadres: 'loginunion.png',
imgadres1: 'loginphone.png',
resinfo: '',
scope: "scope.mobile",
@ -45,7 +46,10 @@
},
methods: {
btnClick(result) {
this.code = result.code;
this.code = result.code;
if(result.code){
this.unionPhoneLogin(result.code)
}
},
getuserinfo() {
let that = this;
@ -107,21 +111,19 @@
// })
// },
//
getPhoneNumber(PhoneNumber) {
unionPhoneLogin(item) {
let params = {
openId: app.globalData.openId,
iv: PhoneNumber.detail.iv,
encryptedData: PhoneNumber.detail.encryptedData
code: item
}
GetPhoneNumber(params).then(res => {
unionPhoneLogin(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '授权成功',
icon: 'none',
duration: 2000
})
uni.navigateBack({})
this.user = res.return_data.object.highUser;
this.user = res.return_data.object.highUser;
app.globalData.token = res.return_data.uniqueCode;
app.globalData.userInfo = res.return_data
.object
.highUser;
@ -130,7 +132,12 @@
data: res.return_data
.object
.highUser
})
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
uni.navigateBack({})
}
});
},

Loading…
Cancel
Save