Browse Source

行业产品核销功能/一些逻辑优化

master
Enzo 4 years ago
parent
commit
a87bf0d0a9
  1. 4
      common/api.js
  2. 2
      manifest.json
  3. 10
      pages/goodsDetail/index.vue
  4. 5
      pages/index/index.vue
  5. 2
      pages/notice/article.vue
  6. 2
      pages/notice/notice.vue
  7. 64
      pages/verification/index.vue

4
common/api.js

@ -41,7 +41,9 @@ export const API_ORDERPAY = '/api/order/pay'; //订单立即支付
export const API_WECHAT_SETPHONE = '/api/user/profile'; //手机绑定
export const API_CONFIRM_CODE = '/api/verification/verify'; //核销订单
export const API_CONFIRM_CODE = '/api/verification/verify'; //商品核销订单
export const API_CONFIRMPRODUCT_CODE = '/api/verification/industry_verify'; // 产品核销订单
export const API_MESSAGELIST = '/api/message/list'; //消息列表
export const API_MESSAGEDETAILS = '/api/message/show'; //消息详情

2
manifest.json

@ -50,7 +50,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx27c51a989127de12",
"appid" : "wxeb58570b5e04d147",
"setting" : {
"urlCheck" : true,
"es6" : false,

10
pages/goodsDetail/index.vue

@ -53,7 +53,7 @@
<view class="lf-iconfont lf-icon-dizhi lf-color-blue"></view>
</view>
</view>
<view class="goods-detail">
<view class="goods-detail" v-if="goods_detail.product.extends.field_2.project">
<view class="lf-font-32 lf-font-bold lf-m-b-20">包含项目</view>
<view class="lf-flex-column">
<!-- <view class="lf-row-between lf-m-b-20">
@ -114,16 +114,16 @@
</view>
</view>
</view>
<view class="goods-detail" @click="openMap(goods_detail.product.extends.field_1.address,goods_detail.product.extends.field_1.latitude,goods_detail.product.extends.field_1.longitude)">
<view class="lf-font-32 lf-font-bold lf-m-b-20">{{goods_detail.product.extends.field_1.name}}</view>
<view class="lf-row-between">
<view class="goods-detail" v-if="goods_detail.product.extends.field_1" @click="openMap(goods_detail.product.extends.field_1.address,goods_detail.product.extends.field_1.latitude,goods_detail.product.extends.field_1.longitude)">
<view class="lf-font-32 lf-font-bold lf-m-b-20" v-if="goods_detail.product.extends.field_1.name">{{goods_detail.product.extends.field_1.name}}</view>
<view class="lf-row-between" v-if="goods_detail.product.extends.field_1.address">
<view class="lf-line-2 lf-font-28 lf-color-333">{{goods_detail.product.extends.field_1.address}}</view>
<view class="lf-iconfont lf-icon-dizhi lf-color-blue"></view>
</view>
</view>
</view>
<!-- 旅游路线类型 -->
<view v-if="goods_detail.product && goods_detail.product.type == 0 && goods_detail.product.extends">
<view v-if="goods_detail.product && goods_detail.product.type == 0 && goods_detail.product.extends.field_0.project">
<view class="goods-detail">
<view class="lf-font-32 lf-font-bold lf-m-b-20">包含项目</view>
<view class="lf-flex-column">

5
pages/index/index.vue

@ -59,7 +59,7 @@
<view class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></view>
</view>
</view>
<view class="recomm lf-m-t-20 lf-m-b-30">
<view class="recomm lf-m-t-20 lf-m-b-30" v-if="$isRight(hot_list)">
<view class="lf-row-between">
<view class="max-recomm-img" @click="$url('/pages/goodsDetail/index?goods_id='+hot_list[0].id)">
<image :src="hot_list[0].picture" class="lf-w-100 lf-h-100"></image>
@ -84,6 +84,9 @@
</view>
</view>
</view>
<view class="recomm lf-m-t-20 lf-m-b-30" v-else>
<lf-nocontent></lf-nocontent>
</view>
<!-- tab标签 -->
<!-- <view class="lf-m-t-40">
<u-tabs :list="tab_list" :is-scroll="true" :current="current" @change="tabChange"></u-tabs>

2
pages/notice/article.vue

@ -1,6 +1,6 @@
<template>
<view>
<view class="lf-m-l-32 lf-m-r-32">
<view class="lf-m-l-32 lf-m-r-32" v-if="$isRight(title_content)">
<view>
<view class="lf-font-32 lf-color-333 lf-m-t-30 lf-m-b-20">
{{title_content.title}}

2
pages/notice/notice.vue

@ -1,6 +1,6 @@
<template>
<view class="lf-m-l-32 lf-m-r-32">
<view>
<view v-if="$isRight(title_content)">
<view class="lf-font-32 lf-color-333 lf-m-t-30 lf-m-b-20">
{{title_content.title}}
</view>

64
pages/verification/index.vue

@ -16,22 +16,24 @@
return {
userInfo: '',
loadOptions: '',
haveVerfiy: false
haveVerfiy: false,
ifProduct: false,
strVerfiy: ''
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userinfo')
this.loadOptions = options.scene
// if (options.scene) {
// //
// let str = decodeURIComponent(options.scene);
// this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
// this.$msg('!');
// });
// }
this.userInfo = uni.getStorageSync('userinfo');
this.loadOptions = decodeURIComponent(options.scene);
this.strVerfiy = this.loadOptions.slice(2,this.loadOptions.length);
var search_0$ = this.loadOptions.slice(0,2);
if(search_0$ == '0$') {
this.ifProduct = false;
}else {
this.ifProduct = true
}
},
methods: {
//
//
getPhoneNumber(event){
if(this.userInfo.mobile == '') {
if(event.detail.errMsg == 'getPhoneNumber:ok'){
@ -44,19 +46,39 @@
}).then(res => {
this.$msg('更新成功', {icon: 'success'});
uni.setStorageSync('userinfo', res.data);
let str = decodeURIComponent(this.loadOptions);
this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
this.$msg('核销成功!');
this.haveVerfiy = true
});
if(this.ifProduct == true) {
this.$http(this.API.API_CONFIRMPRODUCT_CODE, {verify_code: this.strVerfiy}).then(res => {
this.$msg('核销成功!');
this.haveVerfiy = true
}).catch(err => {
this.$msg(JSON.stringify(err.msg))
});
}else {
this.$http(this.API.API_CONFIRM_CODE, {verify_code: this.strVerfiy}).then(res => {
this.$msg('核销成功!');
this.haveVerfiy = true
}).catch(err => {
this.$msg(JSON.stringify(err.msg))
});
}
})
}
}else {
let str = decodeURIComponent(this.loadOptions);
this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
this.haveVerfiy = true
this.$msg('核销成功!');
});
if(this.ifProduct == true) {
this.$http(this.API.API_CONFIRMPRODUCT_CODE, {verify_code: this.strVerfiy}).then(res => {
this.$msg('核销成功!');
this.haveVerfiy = true
}).catch(err => {
this.$msg(JSON.stringify(err.msg))
});
}else {
this.$http(this.API.API_CONFIRM_CODE, {verify_code: this.strVerfiy}).then(res => {
this.$msg('核销成功!');
this.haveVerfiy = true
}).catch(err => {
this.$msg(JSON.stringify(err.msg))
});
}
}
},
}

Loading…
Cancel
Save