Browse Source

接口对接-lzx

master
主管理员 5 months ago
parent
commit
17c8ab1d8e
7 changed files with 178 additions and 36 deletions
  1. +28
    -0
      api/model/index-lzx.js
  2. +29
    -16
      pages/index/center.vue
  3. +43
    -3
      pages/index/consult.vue
  4. +16
    -5
      pages/index/index.vue
  5. +4
    -4
      pages_order/mine/GainPoints.vue
  6. +33
    -6
      pages_order/mine/redeemCode.vue
  7. +25
    -2
      pages_order/work/postConsult.vue

+ 28
- 0
api/model/index-lzx.js View File

@ -31,6 +31,34 @@ const api = {
method: 'GET', method: 'GET',
auth: true auth: true
}, },
//获取兑换码信息列表接口
queryExchangeList: {
url: '/employ/exchange/queryExchangeList',
method: 'GET',
auth: true,
},
//输入兑换码立即兑换接口
useExchange: {
url: '/employ/exchange/useExchange',
method: 'POST',
auth: true,
limit : 500,
showLoading : true,
},
//获取考证咨询列表数据信息
queryCert: {
url: '/employ/examination/queryCert',
method: 'GET',
auth: true,
},
//考证咨询-提交报名材料
addMaterial: {
url: '/employ/examination/addMaterial',
method: 'POST',
auth: true,
limit : 500,
showLoading : true,
},
} }
export default api export default api

+ 29
- 16
pages/index/center.vue View File

@ -34,21 +34,30 @@
<view class="user"> <view class="user">
<!-- 实名认证 --> <!-- 实名认证 -->
<view class="auth">
<uv-cell
<view class="auth" v-if="numInfo.status != '1'" @click="$utils.navigateTo('/pages_order/auth/certification')">
<uv-cell
icon="setting-fill" icon="setting-fill"
title="完成实名认证,信息优先推荐!" title="完成实名认证,信息优先推荐!"
value="去认证" value="去认证"
isLink></uv-cell> isLink></uv-cell>
</view> </view>
<view class="auth" v-else @click="$utils.navigateTo('/pages_order/auth/certification')">
<uv-cell
icon="setting-fill"
title="您已完成认证!"
value="去查看"
isLink></uv-cell>
</view>
<!-- 轮播图 --> <!-- 轮播图 -->
<view class="swipe"> <view class="swipe">
<uv-swiper <uv-swiper
:list="bannerList" :list="bannerList"
indicator indicator
height="220rpx" height="220rpx"
keyName="url"></uv-swiper>
keyName="image"></uv-swiper>
</view> </view>
@ -199,7 +208,7 @@
tabber, tabber,
}, },
computed: { computed: {
...mapState(['userInfo', 'role']),
...mapState(['userInfo', 'role','banner',]),
headImage(){ headImage(){
return this.userInfo.headImage return this.userInfo.headImage
}, },
@ -208,27 +217,31 @@
}, },
phone(){ phone(){
return this.userInfo.phone return this.userInfo.phone
}
},
bannerList(){
return this.banner.filter(n => n.type == 1)
},
}, },
data() { data() {
return { return {
show: false, show: false,
bannerList: [
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
},
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
},
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
},
],
// bannerList: [
// {
// url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
// },
// {
// url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
// },
// {
// url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
// },
// ],
numInfo : {}, numInfo : {},
} }
}, },
onShow() { onShow() {
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
this.$store.commit('getBanner')
// //
this.getUserCenterData(); this.getUserCenterData();
}, },


+ 43
- 3
pages/index/consult.vue View File

@ -5,11 +5,27 @@
title="考证咨询" title="考证咨询"
/> />
<view class="uni-color-btn"
@click="$utils.navigateTo('/pages_order/work/postConsult')">
去提交报名材料
<view class="list">
<view class="item"
v-for="(item, index) in list"
:key="index">
<!-- <view class="title">
{{item.name}}
</view> -->
<view class="uni-color-btn"
@click="$utils.navigateTo('/pages_order/work/postConsult')">
{{item.name}}
</view>
</view>
</view> </view>
<tabber select="2"/> <tabber select="2"/>
</view> </view>
</template> </template>
@ -26,15 +42,39 @@
}, },
data() { data() {
return { return {
list:[]
} }
}, },
onShow() { onShow() {
this.queryCert();
}, },
// //
onReachBottom() { onReachBottom() {
}, },
methods: { methods: {
queryCert(){
this.$api('queryCert',{}, res =>{
if(res.code == 200){
this.list = res.result.records;
}
})
},
// addMaterial(){
// if(this.$utils.verificationAll(this.form,{
// code:''
// })) {
// return
// }
// this.$api('addMaterial',this.form, res =>{
// if(res.code == 200){
// uni.showToast({
// title:'',
// icon: 'none'
// })
// }
// })
// },
} }
} }


+ 16
- 5
pages/index/index.vue View File

@ -72,7 +72,8 @@
mode="widthFix"></image> mode="widthFix"></image>
</view> </view>
<checkinScore ref="checkinScore"/>
<checkinScore ref="checkinScore" v-if="numInfo.signFlag == false"/>
<PrivacyAgreementPoup/> <PrivacyAgreementPoup/>
@ -112,23 +113,33 @@
return { return {
productList: [], productList: [],
keyword : '', keyword : '',
numInfo:{}
} }
}, },
// onPullDownRefresh(){
// this.$refs.videoList.queryVideoList()
// this.queryBannerList()
// },
onPullDownRefresh(){
// this.$refs.videoList.queryVideoList()
// this.queryBannerList()
},
// //
onShow() { onShow() {
this.$refs.workList.getData() this.$refs.workList.getData()
this.$store.commit('getBanner') this.$store.commit('getBanner')
this.getUserCenterData();
}, },
// //
onReachBottom() { onReachBottom() {
this.$refs.workList.loadMoreData() this.$refs.workList.loadMoreData()
}, },
methods: { methods: {
//
getUserCenterData(){
this.$api('getUserCenterData',{}, res =>{
if(res.code == 200){
this.numInfo = res.result
}
})
},
clickItem(result){ clickItem(result){
console.log(result); console.log(result);
this.$refs.workList.getData(result) this.$refs.workList.getData(result)


+ 4
- 4
pages_order/mine/GainPoints.vue View File

@ -7,16 +7,16 @@
<view class="card"> <view class="card">
<view class="top"> <view class="top">
<image src="../static/mine/characteristic.png" mode="aspectFill" /> <image src="../static/mine/characteristic.png" mode="aspectFill" />
<view>充值积分</view>
<view>签到得积分</view>
</view> </view>
<view class="txt">注册用户享受最新充值优惠活动</view>
<view class="button">充值</view>
<view class="txt">签到得积分可立即领取</view>
<view class="button">领取</view>
<view style="height: 40rpx;" /> <view style="height: 40rpx;" />
</view> </view>
<view class="card"> <view class="card">
<view class="top"> <view class="top">
<image src="../static/mine/crowd.png" mode="aspectFill" /> <image src="../static/mine/crowd.png" mode="aspectFill" />
<view>邀请工获取积分</view>
<view>邀请工获取积分</view>
</view> </view>
<view class="txt">成功邀请一名新好友注册最高可获得 <view class="txt">成功邀请一名新好友注册最高可获得
<text style="color: red;font-size: 32rpx;">2</text> <text style="color: red;font-size: 32rpx;">2</text>


+ 33
- 6
pages_order/mine/redeemCode.vue View File

@ -7,22 +7,22 @@
/> />
<view class="input"> <view class="input">
<input type="text" v-model="form.title"
<input type="text" v-model="form.code"
placeholder="请输入兑换码"/> placeholder="请输入兑换码"/>
<view class="btn">
<view class="btn" @click="useExchange()">
兑换 兑换
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="item" <view class="item"
v-for="(item, index) in 10"
v-for="(item, index) in listInfo"
:key="index"> :key="index">
<view class="title"> <view class="title">
1.用户是否能通过兑换码
{{item.question}}
</view> </view>
<view class="info"> <view class="info">
兑换码仅能够
{{item.answer}}
</view> </view>
</view> </view>
</view> </view>
@ -35,11 +35,38 @@
data() { data() {
return { return {
form : { form : {
code : '',
code:'',
}, },
listInfo:[]
} }
}, },
onShow() {
this.queryExchangeList();
},
methods: { methods: {
queryExchangeList(){
this.$api('queryExchangeList',{}, res =>{
if(res.code == 200){
this.listInfo = res.result.records;
}
})
},
useExchange(){
if(this.$utils.verificationAll(this.form,{
code:'请输入兑换码'
})) {
return
}
this.$api('useExchange',this.form, res =>{
if(res.code == 200){
uni.showToast({
title:'兑换成功',
icon: 'none'
})
}
})
},
}, },
} }


+ 25
- 2
pages_order/work/postConsult.vue View File

@ -70,7 +70,7 @@
<view class="form-item"> <view class="form-item">
<view class="label"> <view class="label">
绑定手机号
手机号
</view> </view>
<view class="input"> <view class="input">
<input type="text" <input type="text"
@ -318,7 +318,7 @@
</view> </view>
<view class="uni-color-btn">
<view class="uni-color-btn" @click="addMaterial()">
提交 提交
</view> </view>
@ -373,6 +373,29 @@
}) })
}, },
addMaterial(){
this.form.imageCardFront = this.fileFrontList.map((item) => item.url).join(",")
this.form.imageCardfBack = this.fileReverseList.map((item) => item.url).join(",")
if(this.$utils.verificationAll(this.form,{
name:'请输入用户名称',
phone:'请输入电话',
imageCardFront:'请选择身份证正面照复印件',
imageCardfBack:'请选择身份证反面照复印件'
})) {
return
}
this.$api('addMaterial',this.form, res =>{
if(res.code == 200){
uni.showToast({
title:'提交成功!等待审核',
icon: 'none'
})
}
})
},
} }
} }
</script> </script>


Loading…
Cancel
Save