扫码核销

huipay-h5
游梦婷 12 months ago
parent 1973aee590
commit 4477c8b71e
  1. 9
      App.vue
  2. 79
      pages.json
  3. 4
      pages/index/merchant-details/merchant-details.vue
  4. 6
      pages/index/normal-Merchant/normal-Merchant.vue
  5. 8
      pages/login/login.vue
  6. 79
      pages/welcome/welcome.vue
  7. 22
      subpackages/groupBuyingConfiguration/groupVerify/groupVerify.vue

@ -38,7 +38,10 @@
//
receiverName: '',
//
storeAddress: ''
storeAddress: '',
accountId:'',
urlKey:'',
urlCode:'',
},
onLaunch: function() {
/* let that = this;
@ -61,6 +64,10 @@
this.globalData.userInfo = uni.getStorageSync("payuser") || '';
this.globalData.token = uni.getStorageSync("paytoken") || '';
this.globalData.openId = uni.getStorageSync("openId") || '';
this.globalData.accountId = uni.getStorageSync("accountId") || '';
this.globalData.urlKey = uni.getStorageSync("urlKey") || '';
this.globalData.urlCode = uni.getStorageSync("urlCode") || '';
},
onHide: function() {}
}

@ -646,35 +646,20 @@
{
"path":"groupBuyingConfiguration/groupBuyingConfiguration",
"style": {
"navigationBarTitleText": "团购配置",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
"navigationBarTitleText": "团购配置"
}
},
{
"path":"groupBuyingConfiguration/storeImg/storeImg",
"style": {
"navigationBarTitleText": "门店图片",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
"navigationBarTitleText": "门店图片"
}
},
{
"path":"groupBuyingConfiguration/storeImg/storeImgAdd",
"style": {
"navigationBarTitleText": "添加图片",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
"navigationBarTitleText": "添加图片"
}
},
@ -682,67 +667,49 @@
"path":"groupBuyingConfiguration/storeProduct/storeProduct",
"style": {
"navigationBarTitleText": "门店产品",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
"navigationBarTitleText": "门店产品"
}
},
{
"path":"groupBuyingConfiguration/storeProduct/storeProductAdd",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
"navigationBarTitleText": ""
}
},{
"path":"groupBuyingConfiguration/groupProduct/groupProduct",
"style": {
"navigationBarTitleText": "团购产品",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
"navigationBarTitleText": "团购产品"
}
},{
"path":"groupBuyingConfiguration/groupProduct/groupProductAdd",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
"navigationBarTitleText": ""
}
},
{
"path":"groupBuyingConfiguration/storeMessage/storeMessage",
"style": {
"navigationBarTitleText": "门店信息",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}
"navigationBarTitleText": "门店信息"
}
},
{
"path":"groupBuyingConfiguration/groupVerify/groupVerify",
"style": {
"navigationBarTitleText": "核销订单",
"enablePullDownRefresh": false
}
}
]
}],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
"backgroundColor": "#F8F8F8",
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}

@ -54,7 +54,7 @@
<view class="width94 backcorfff border-r mart15" v-for="(item,index) in storeList" :key="index"
@click="jumpstoredes(item.id)">
<view class="notes" style="border-bottom: 0px;">
<image src="../../../static/img/store/store7.png" mode="widthFix" class="iconw40"></image>
<image src="../../../static/img/store/store7.png" mode="widthFix" class="iconw40 height40p"></image>
<view class="width65 margle">
<view class="font14 fcor333">{{item.name}}</view>
<view class="font12 fcor999">{{item.updateTime | timeFormat('yyyy-mm-dd')}}
@ -93,7 +93,7 @@
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,1)">绑定二维码</button>
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,2)">二维码列表</button>
<button class="btns mart10 margle10" @click.stop="jumpService(item.id)">绑定设备</button>
<!-- <button class="btns mart10 margle10" @click.stop="jumpGroupService(item.id)">团购配置</button> -->
<button class="btns mart10 margle10" @click.stop="jumpGroupService(item.id)">团购配置</button>
<!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,2)">设备列表</button> -->
</view>
<view class="lin10"></view>

@ -1,5 +1,5 @@
<template>
<view>
<view class="paddtop15">
<view class="input-box">
<view class="icon search"></view>
<input placeholder="请输入商户名称" v-model="mersearchName" placeholder-style="color:#c0c0c0;"
@ -12,7 +12,7 @@
<view class="width94 backcorfff border-r mart15" v-for="(item,index) in merchantlist" :key="index"
@click="jumpmerdes(item.id)">
<view class="notes">
<image src="../../../static/img/merchantstu.png" mode="widthFix" class="iconw40"></image>
<image src="../../../static/img/merchantstu.png" mode="widthFix" class="iconw40 height40p"></image>
<view class="width60 margle">
<view class="font14 fcor333">{{item.merName}}</view>
<view class="font12 fcor999">
@ -125,7 +125,7 @@
.input-box {
width: 90%;
margin-left: 5%;
margin-top: 15px;
// margin-top: 15px;
margin-bottom: 15px;
height: 70rpx;
background-color: #fff;

@ -124,6 +124,14 @@
key: "paytoken",
data: res.return_data.uniqueCode
})
if(app.globalData.accountId == '0001'&& app.globalData.urlKey){ //
uni.redirectTo({
url: '/subpackages/groupBuyingConfiguration/groupVerify/groupVerify?orderKey='+app.globalData.urlKey,
})
return
}
uni.reLaunch({
url: '../tabBar/home/home'
})

@ -16,28 +16,51 @@
}
},
onLoad(options) {
let that = this;
// uni.reLaunch({
// url: '../tabBar/home/home'
// })
// return
let that = this;
/*
重定向前:https://gratia-pay.dctpay.com/cweb?accountId=0001&key=123#/
https://gratia-pay.dctpay.com/cweb?accountId=0001&key=123&code=456#/
重定向后 -微信
https://gratia-pay.dctpay.com/cweb/?redirect_uri=https://gratia-pay.dctpay.com/cweb&code=0111BKGa1EvjoG0sm9Ha1u8wG111BKGR&state=1#/
["https://gratia-pay.dctpay.com/cweb/?redirect_uri", "https://gratia-pay.dctpay.com/cweb&code", "0111BKGa1EvjoG0sm9Ha1u8wG111BKGR&state", "1#/"]
*/
// #ifdef H5
let arr1 = window.location.href;
let arr2 = arr1.split('=');
if (arr2[2]) {
var arr3 = arr2[2].split('&');
if (arr3[0] != undefined && arr3[0]) {
app.globalData.h5code = arr3[0];
uni.setStorage({
key: "h5code",
data: arr3[0]
})
}
let locationPathStr = window.location.href;
let locationPathArr = locationPathStr.split('=');
let codeArr = locationPathArr[2] ? locationPathArr[2].split('&') : [];
if (locationPathArr[locationPathArr.length-1]=='1#/'&&codeArr[0]) {
app.globalData.h5code = codeArr[0];
uni.setStorageSync("h5code",codeArr[0])
this.getAccessToken();//openID
} else {
// openid
that.jumpcdx();
}
if (app.globalData.h5code) {
that.getAccessToken();
if(locationPathArr[1]){
let accountId = locationPathArr[1].split("&")[0];
app.globalData.accountId=accountId;
uni.setStorageSync("accountId",accountId);
}
if(locationPathArr[2]){
let key;
if(!locationPathArr[3]){
key = locationPathArr[2].split("#")[0];
}else{
key = locationPathArr[2].split("&")[0];
}
app.globalData.urlKey = key;
uni.setStorageSync("urlKey",key);
}
if(locationPathArr[3]&&!locationPathArr[4]){
let code = locationPathArr[3].split("#")[0];
app.globalData.code = code;
uni.setStorageSync("urlCode",code);
}
this.jumpcdx();//
}
// #endif
},
@ -50,12 +73,11 @@
getAccessToken(params).then(res => {
if (res.return_code == '000000' && res.return_data.openid) {
app.globalData.openId = res.return_data.openid;
/* uni.setStorage({
key: "openId",
data: res.return_data.openid
}) */
uni.setStorageSync("openId",res.return_data.openid);
if (this.userInfo) {
if(!this.isGoHomeUrl()) return;
uni.reLaunch({
url: '../tabBar/home/home'
})
@ -70,10 +92,23 @@
}
});
},
isGoHomeUrl(){
// 0001https://gratia-pay.dctpay.com/cweb?accountId=0001&key=123
if (app.globalData.accountId == '0001' && app.globalData.h5code){
let orderKey = uni.getStorageSync("urlKey");
if(orderKey){
uni.redirectTo({
url: '/subpackages/groupBuyingConfiguration/groupVerify/groupVerify?orderKey='+orderKey,
})
return false;
}
}
return true;
},
jumpcdx() {
let redirectUrl = app.globalData.redirectUrl;
location.href =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https://hsg.dctpay.com/wechat_authorize/?redirect_uri=${redirectUrl}&response_type=code&scope=snsapi_base#wechat_redirect`;
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https://hsg.dctpay.com/wechat_authorize/?redirect_uri=${redirectUrl}&response_type=code&scope=snsapi_base&state=1#wechat_redirect`;
},
}
}

@ -0,0 +1,22 @@
<template>
<view>
========={{key}}========
</view>
</template>
<script>
export default {
data(){
return{
key:'',
}
},
onLoad(option){
this.key = option.orderKey;
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save