1.对接代理商接口

yj-dev
杨杰 4 years ago
parent f1f8726917
commit c135169cdb
  1. 4
      pages/goods/HM-search/HM-search.vue
  2. 16
      pages/goods/coupons-info-details/coupons-info-details.vue
  3. 4
      pages/goods/externalCoupon/externalCoupon.vue
  4. 4
      pages/goods/goods-list/goods-list.vue
  5. 4
      pages/goods/goods.vue
  6. 29
      pages/login/login.vue
  7. 4
      pages/tabBar/home/home.vue
  8. 62
      pages/user/agentCoupons/agentCoupons.vue
  9. 4
      pages/user/mineCoupons/mineCoupons.vue
  10. 4
      pages/user/mineCouponsDestails/mineCouponsDestails.vue
  11. 55
      pages/user/minePromotion/minePromotion.vue

@ -279,10 +279,10 @@
.name {
width: 92%;
padding: 10upx 4%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;

@ -1,10 +1,10 @@
<template>
<view>
<view class="width100 fotct coupon-status font20 fcorred" v-if="couponDesInfo.highUserCoupon.status == 2">使用
<view class="width100 fotct coupon-status font20 fcorred" v-if="couponDesInfo.couponAgentCode.status == 2">使用
</view>
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.highUserCoupon.status == 1">未使用
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.couponAgentCode.status == 1">待销售
</view>
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.highUserCoupon.status == 0">已过期
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.couponAgentCode.status == 3">已使用
</view>
<view class="line1"></view>
<view class="coupon-cont width90">
@ -24,7 +24,7 @@
<view class="line1 mart15"></view>
<view class="width90 mart10 fcor666" v-if="couponDesInfo.highUserCoupon.status != 0">核销码(商户扫客户)</view>
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image>
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCode.ext1"></image>
</view>
<!-- <view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i">
@ -107,10 +107,10 @@
}
getCodeById(params).then(res => {
if (res.return_code == '000000') {
// this.couponDesInfo = res.return_data;
// this.oneTime = res.return_data.highUserCoupon.createTime;
// this.twoTime = res.return_data.highUserCoupon.useEndTime;
// this.threeTime = res.return_data.highUserCoupon.consumeTime;
this.couponDesInfo = res.return_data;
this.oneTime = res.return_data.couponCode.receiveTime;
this.twoTime = res.return_data.couponCode.useEndTime;
this.threeTime = res.return_data.couponCode.consumeTime;
uni.hideLoading()
} else {
uni.hideLoading()

@ -295,10 +295,10 @@
.name {
width: 92%;
padding: 10upx 4%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;

@ -216,10 +216,10 @@
}
.name{
width: 92%;
padding: 10upx 4%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;

@ -519,10 +519,10 @@
.name {
width: 92%;
padding: 10upx 4%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;

@ -60,8 +60,9 @@
},
onLoad(options) {
this.typeId = options.id;
if(this.typeId == 1){
let that = this;
that.typeId = options.id;
if(that.typeId == 1){
uni.setNavigationBarTitle({
title:'门店登录'
})
@ -70,12 +71,24 @@
title:'代理商登录'
})
}
uni.getStorage({
key: 'phoneNum',
success(e) {
that.phoneNumber = e.data;
}
})
uni.getStorage({
key: 'pasNum',
success(e) {
that.passwd = e.data;
}
})
//APP
// #ifdef APP-PLUS
this.isShowOauth = true;
that.isShowOauth = true;
// #endif
this.getProvider();
that.getProvider();
},
methods: {
@ -175,6 +188,14 @@
}
userLogin(datas).then(res => {
if (res.return_code == '000000') {
uni.setStorage({
key: "phoneNum",
data: this.phoneNumber
})
uni.setStorage({
key: "pasNum",
data: this.passwd
})
uni.hideLoading();
if(this.typeId == 1){
uni.navigateTo({

@ -744,10 +744,10 @@
.name {
width: 92%;
padding: 10upx 4%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;

@ -3,19 +3,20 @@
<view class="onorder width90" v-if="agentCouponList.length==0">
<image src="../../../static/img/noorder.png"></image>
<view class="text">
暂无数据...
暂无数据
</view>
</view>
<view class="width90 height120 backcorfff mart15" v-for="(agent,index) in agentCouponList" :key="index">
<image class="flleft agent_img margle mart10" src='../../../static/img/logo.png'></image>
<image class="flleft agent_img margle mart10" v-if="agent.merchantLogo == null" src='../../../static/img/logo.png'></image>
<image class="flleft agent_img margle mart10" v-else :src="image_url+agent.merchantLogo"></image>
<view class="agent_title paddtop13">
<view class="font18 fcor333 width100">重庆中石化码商券</view>
<view class="font18 fcor333 width100">{{agent.highCoupon.couponName}}</view>
<view class="width100 mart5 font14 fcor333 height22">
<view class="agent_left_num flleft">
42342424234234
<view class="agent_left_num flleft text1">
{{agent.highCouponCode.salesCode}}
</view>
<view class="agent_right_num flright fotrt">
300.00
{{agent.highCoupon.salesPrice}}.00
</view>
</view>
</view>
@ -25,7 +26,8 @@
v-if="typeId == 1">生成油码</button>
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)"
v-if="typeId == 2">查看详情</button>
<view class="agent_ts font15 fcor333 fotrt">出售时间:2021.4.13 23:14</view>
<view class="agent_ts font15 fcor333 fotrt" v-if="typeId == 2">
出售时间:{{agent.highCouponCode.receiveTime | formatDate('-')}}</view>
</view>
</view>
</view>
@ -36,6 +38,7 @@
getCodeListByAgentCoupon,
generateCode
} from "../../../Utils/Api.js";
let app =getApp();
export default {
data() {
return {
@ -44,12 +47,32 @@
agentCouponList: [],
isNoMoreData: false,
typeId: '',
reFreshs: ""
reFreshs: '',
couponId: '',
image_url : app.globalData.imgUrl
}
},
filters: {
//
formatDate: function(value, spe = '/') {
let data = new Date(value);
let year = data.getFullYear();
let month = data.getMonth() + 1;
let day = data.getDate();
let h = data.getHours();
let mm = data.getMinutes();
let s = data.getSeconds();
month = month > 10 ? month : "0" + month;
day = day > 10 ? day : "0" + day;
h = h > 10 ? h : "0" + h;
mm = mm > 10 ? mm : "0" + mm;
s = s > 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day}`;
}
},
onLoad(option) {
this.typeId = option.id;
this.couponId = option.couponsId;
},
onShow() {
this.getCodeListByAgentCoupon();
@ -74,12 +97,23 @@
return false;
}
let pagenum = this.pageNum;
let params = {
pageNum: pagenum,
couponId: 23423529,
status: this.typeId,
pageSize: this.pageSize
let params;
if (this.typeId == 1) {
params = {
pageNum: pagenum,
couponId: this.couponId,
status: 1,
pageSize: this.pageSize
}
} else if(this.typeId == 2){
params = {
pageNum: pagenum,
couponId: this.couponId,
status: '2,3',
pageSize: this.pageSize
}
}
getCodeListByAgentCoupon(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {

@ -195,10 +195,10 @@
.name {
width: 92%;
padding: 10upx 4%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;

@ -165,10 +165,10 @@
.name {
width: 92%;
padding: 10upx 4%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;

@ -10,8 +10,8 @@
<view class="promotion_xg flleft" style="margin-left: -6px;"></view>
</view>
<view class="width90 mart5 height22">
<view class="width50 flleft font18 fcor333 fontwig6 fotlt">7</view>
<view class="width50 flright font18 fcor333 fontwig6 fotrt">5300.00</view>
<view class="width50 flleft font18 fcor333 fontwig6 fotlt">{{agentList.orderCount}}</view>
<view class="width50 flright font18 fcor333 fontwig6 fotrt">{{agentList.turnoverPrice}}</view>
</view>
<view class="width90 mart10">
<view class="width50 flleft font15 fcor666 fontwig6 fotlt">今日订单</view>
@ -33,22 +33,23 @@
</image>
<view class="pro_cont paddtop15">
<view class="flleft font16 fcor333 fontwig6 pro_title">
剩余库存(24)
剩余库存({{agentList.laveStockCount}})
</view>
<view class="pro_price fotrt fcor333 font15 fontwig6">
总计 9500.00
总计 {{agentList.surplusCountPrice}}
</view>
</view>
<!-- //:class="[index==0?'colorfe':'']" -->
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore7" @click="jumpAgent(1)">
<view v-if="minepros == ''">暂无数据</view>
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore7" @click="jumpAgent(1,mers.couponId)">
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
面额100
面额{{mers.salesPrice}}
</view>
<view class="width100 font14 fcor999 fotct mart10">
13
{{mers.stockCount}}
</view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10">
1300
{{mers.salesPrice*mers.stockCount}}
</view>
</view>
</view>
@ -67,22 +68,23 @@
</image>
<view class="pro_cont paddtop15">
<view class="flleft font16 fcor333 fontwig6 pro_title">
已销售(24)
已销售({{agentList.soldCount}})
</view>
<view class="pro_price fotrt fcor333 font15 fontwig6">
总计 1129500.00
总计 {{agentList.salesCountPrice}}
</view>
</view>
<view v-if="minepros == ''">暂无数据</view>
<!-- // -->
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore9" @click="jumpAgent(2)">
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore9" @click="jumpAgent(2,mers.couponId)">
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
面额100
面额{{mers.salesPrice}}
</view>
<view class="width100 font14 fcor999 fotct mart10">
13
{{mers.salesCount}}
</view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10">
1300
{{mers.salesPrice*mers.salesCount}}
</view>
</view>
</view>
@ -96,26 +98,23 @@
export default {
data() {
return {
minepros: [{
id: 1
},
{
id: 1
},
{
id: 1
}
]
minepros: [],
agentList :[]
}
},
onLoad() {
onShow(){
this.getAgentCount();
},
methods: {
//
getAgentCount() {
getAgentCount().then(res => {
if (res.return_code == '000000') {} else {
if (res.return_code == '000000') {
this.agentList = res.return_data;
this.minepros = res.return_data.list
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
@ -124,9 +123,9 @@
})
},
//
jumpAgent(item) {
jumpAgent(item,items) {
uni.navigateTo({
url: '../agentCoupons/agentCoupons?id='+item
url: '../agentCoupons/agentCoupons?id='+item +'&couponsId='+ items
})
}
}

Loading…
Cancel
Save