1.对接进件接口

huipay-master
杨杰 3 years ago
parent b67c67fa43
commit 170d05bc5b
  1. 11
      App.vue
  2. 55
      Utils/Api.js
  3. 2
      Utils/Request.js
  4. 5
      components/yunmiao-jobSelect/yunmiao-jobSelect.vue
  5. 64
      pages/index/business-category/business-category.vue
  6. 1247
      pages/index/merchant-incoming-parts/merchant-incoming-parts.vue
  7. 138
      pages/login/login.vue
  8. 1
      pages/tabBar/home/home.vue
  9. 36
      pages/tabBar/user/user.vue

@ -2,20 +2,21 @@
export default {
globalData: {
// url: 'http://192.168.3.4:9301/crest',
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//
url: 'https://hlt.dctpay.com/crest',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
url: 'https://paycs.dctpay.com/crest',
imgUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com',
userInfo: "",
openId: '',
code: '',
token: '',
//id
businessid:'',
//
businessname:''
},
}
</script>

@ -3,12 +3,55 @@ import {
} from './Request.js';
let app = getApp();
let base = app.globalData.url;
//H5 获取用户信息
export const mpLogin = params => {
return POST('POST', `${base}/wechat/mpLogin`, params).then(res => res.data);
// 登录接口
export const userLogin = params => {
return POST('POST', `${base}/login/userLogin`, params).then(res => res.data);
}
//退出登录
export const logout = params => {
return POST('POST', `${base}/login/logout`, params).then(res => res.data);
}
//银行卡识别
export const recognizeBankCard = params => {
return POST('GET', `${base}/ocr/recognizeBankCard`, params).then(res => res.data);
}
//营业执照识别
export const recognizeBusinessLicense = params => {
return POST('GET', `${base}/ocr/recognizeBusinessLicense`, params).then(res => res.data);
}
// 身份证识别【正反面】
export const recognizeIdCard = params => {
return POST('GET', `${base}/ocr/recognizeIdCard`, params).then(res => res.data);
}
// 查询行业
export const getIndustry = params => {
return POST('GET', `${base}/common/getIndustry`, params).then(res => res.data);
}
// 上传商户图片
export const uploadFile = params => {
return POST('POST', `${base}/mer/uploadFile`, params).then(res => res.data);
}
//查询优惠券
export const getDiscountList = params => {
return POST('GET', `${base}/discount/getDiscountList`, params).then(res => res.data);
//第一步上传商户信息
export const configMerAccount = params => {
return POST('POST', `${base}/mer/configMerAccount`, params).then(res => res.data);
}
//查询商户详情
export const getMerDetail = params => {
return POST('GET', `${base}/mer/getMerDetail`, params).then(res => res.data);
}
//第二步商户基本信息
export const configMerBasis = params => {
return POST('POST', `${base}/mer/configMerBasis`, params).then(res => res.data);
}
//第三步商户结算信息
export const configMerSettlement = params => {
return POST('POST', `${base}/mer/configMerSettlement`, params).then(res => res.data);
}
//第四步商户门店信心
export const configMerStore = params => {
return POST('POST', `${base}/mer/configMerStore`, params).then(res => res.data);
}

@ -34,7 +34,7 @@ function request(method, url, data) {
uni.navigateTo({
url: '/pages/login/login'
})
}, 800);
}, 2000);
}
})
}

@ -23,7 +23,7 @@
<view class="page-view">
<view class="class-item">
<view class="item-container">
<view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1"
<view class="thumb-box" v-for="(item1, index1) in item.childIndustry" :key="index1"
@click="selval(item1)">
<view :class="[value==item1[valueName] ? 'item-active' : '']">
<text>{{item1[labelName]}}</text>
@ -291,6 +291,7 @@
width: 100%;
padding: 0 20rpx;
align-items: center;
font-size: 32rpx;
font-size: 30rpx;
color: #999999;
}
</style>

@ -6,6 +6,10 @@
<script>
import jobSelect from '../../../components/yunmiao-jobSelect/yunmiao-jobSelect.vue';
import {
getIndustry
} from '../../../Utils/Api.js';
let app = getApp();
export default {
components: {
jobSelect
@ -13,53 +17,29 @@
data() {
return {
//
listData: [{
"id": 1,
"name": "餐饮",
"children": [{
"id": 2,
"name": "服务员",
}, {
"id": 3,
"name": "送餐员",
}, {
"id": 4,
"name": "传菜员",
},
{
"id": 5,
"name": "厨师",
}
]
}, {
"id": 6,
"name": "家政保洁",
"children": [{
"id": 7,
"name": "保洁",
}, {
"id": 8,
"name": "保姆",
}, {
"id": 9,
"name": "月嫂",
}]
}, {
"id": 10,
"name": "美容美发",
"children": [{
"id": 11,
"name": "发型师",
}]
}],
listData: [],
}
},
onLoad() {},
onLoad() {
this.getIndustry();
},
methods: {
//
getIndustry() {
getIndustry().then(res => {
if (res.return_code == '000000') {
this.listData = res.return_data;
}
})
},
//
confiremJob(e) {
console.log(e);
// uni.navigateBack({})
app.globalData.businessid = e.id;
app.globalData.businessname = e.name;
uni.navigateBack({})
},
}
}
</script>

@ -7,8 +7,8 @@
</view>
<!-- 主体表单 -->
<view class="main">
<wInput v-model="phoneData" type="text" maxlength="11" placeholder="用户名/电话" :focus="isFocus"></wInput>
<wInput v-model="passData" type="password" maxlength="11" placeholder="密码" isShowPass="true"></wInput>
<wInput v-model="phoneData" type="text" placeholder="用户名/电话" :focus="isFocus"></wInput>
<wInput v-model="passData" type="password" placeholder="密码" isShowPass="true"></wInput>
</view>
<wButton class="wbutton" text="登 录" :rotate="isRotate" @click="startLogin"></wButton>
</view>
@ -16,9 +16,12 @@
</template>
<script>
let _this;
import wInput from '../../components/watch-login/watch-input.vue' //input
import wButton from '../../components/watch-login/watch-button.vue' //button
import {
userLogin
} from '../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
@ -33,29 +36,42 @@
wButton,
},
mounted() {
_this = this;
//this.isLogin();
this.isLogin();
},
methods: {
isLogin() {
//
// try {
// const value = uni.getStorageSync('setUserData');
// if (value) {
// //
// console.log("",value);
// _this.$store.dispatch("setUserData",value); //
// uni.reLaunch({
// url: '../../../pages/index',
// });
// }
// } catch (e) {
// // error
// }
isLogin() {
uni.getStorage({
key: 'payuser',
success: (res) => {
app.globalData.userInfo = res.data;
uni.getStorage({
key: "paytoken",
success: (res) => {
app.globalData.token = res.data;
uni.reLaunch({
url: '../tabBar/home/home'
})
}
})
}
});
uni.getStorage({
key: 'loginaccount',
success: (res) => {
this.phoneData = res.data
}
});
uni.getStorage({
key: 'loginpass',
success: (res) => {
this.passData = res.data
}
});
},
//
startLogin(e) {
console.log(e)
uni.showLoading({
title: '登录中'
});
@ -79,54 +95,48 @@
});
return;
}
_this.isRotate = true
setTimeout(function() {
_this.isRotate = false;
this.isRotate = true
let params = {
loginName: this.phoneData,
password: this.passData
}
userLogin(params).then(res => {
uni.hideLoading();
this.isRotate = false;
if (res.return_code == '000000' && res.return_data) {
app.globalData.userInfo = res.return_data
.object
.secUser;
app.globalData.token = res.return_data.uniqueCode;
uni.setStorage({
key: "loginaccount",
data: this.phoneData
})
uni.setStorage({
key: "loginpass",
data: this.passData
})
uni.setStorage({
key: "payuser",
data: res.return_data
.object
.secUser
})
uni.setStorage({
key: "paytoken",
data: res.return_data.uniqueCode
})
uni.reLaunch({
url: '../tabBar/home/home'
})
}, 3000)
// uni.showLoading({
// title: ''
// });
// getLogin()
// .then(res => {
// //console.log(res)
// //
// if(_this.phoneData==res.data.username && _this.passData==res.data.password){
// let userdata={
// "username":res.data.username,
// "nickname":res.data.nickname,
// "accesstoken":res.data.accesstoken,
// } //accesstoken
// _this.$store.dispatch("setUserData",userdata); //
// try {
// uni.setStorageSync('setUserData', userdata); //
// } catch (e) {
// // error
// }
// uni.showToast({
// icon: 'success',
// position: 'bottom',
// title: ''
// });
// uni.reLaunch({
// url: '../../../pages/index',
// });
// }else{
// _this.passData=""
// uni.showToast({
// icon: 'error',
// position: 'bottom',
// title: 'adminadmin'
// });
// }
// uni.hideLoading();
// }).catch(err => {
// uni.hideLoading();
// })
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
}
}
}

@ -85,7 +85,6 @@
};
},
onLoad() {
this.getDiscountList();
},
methods: {
getDiscountList() {

@ -16,6 +16,9 @@
</template>
<script>
import wButton from '../../../components/watch-login/watch-button.vue' //button
import {
logout
} from '../../../Utils/Api.js';
let app = getApp();
export default {
components: {
@ -32,13 +35,37 @@
methods: {
//退
exitLogin() {
this.isRotate = true
setTimeout(function() {
uni.showModal({
title: '退出登录',
content: '是否确认退出当前账号',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '退出中...'
})
this.isRotate = true;
logout().then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isRotate = false;
app.globalData.userInfo = '';
app.globalData.token = '';
uni.removeStorage({
key: "payuser"
})
uni.removeStorage({
key: "paytoken"
})
uni.reLaunch({
url: '../../login/login'
})
this.isRotate = false;
}, 3000)
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}
@ -47,6 +74,7 @@
page {
background-color: #f6f6f6;
}
.notes {
width: calc(100% - 40rpx);
display: flex;

Loading…
Cancel
Save