1.提交代码 新增代理商 页面

yj-dev
杨杰 4 years ago
parent bfeecfef07
commit 33876e0857
  1. 11
      App.vue
  2. 18
      Utils/Api.js
  3. 1
      pages.json
  4. 289
      pages/goods/coupons-info-details/coupons-info-details.vue
  5. 23
      pages/login/login.vue
  6. 13
      pages/tabBar/user/user.vue
  7. 39
      pages/user/agentCoupons/agentCoupons.vue
  8. 60
      pages/user/minePromotion/minePromotion.vue

@ -1,12 +1,13 @@
<script>
export default {
globalData: {
// url: 'http://192.168.3.4:9301/crest',
// url: 'http://192.168.12.53.21:9301/crest',
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/',
brestUrl : 'https://hsg.dctpay.com/brest',
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl : 'https://hsg.dctpay.com/brest',
//
// url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest',

@ -127,6 +127,8 @@ export const getDiscountByUserDiscountId = params => {
export const getUserNormalDiscountList = params => {
return POST('GET', `${base}/userDiscount/getUserNormalDiscountList`, params).then(res => res.data);
}
//**门店//
export const userLogin = params => {
return POST('POST', `${brestBase}/login/userLogin`, params).then(res => res.data);
}
@ -135,4 +137,20 @@ export const useCouponCode = params => {
return POSTBREST('POST', `${brestBase}/couponCode/useCouponCode`, params).then(res => res.data);
}
//**代理商//
export const getAgentCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentCount`, params).then(res => res.data);
}
// 查询销售码
export const getCodeListByAgentCoupon = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeListByAgentCoupon`, params).then(res => res.data);
}
// 生成二维码
export const generateCode = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data);
}
// 查看二维码
export const getCodeById = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data);
}

@ -107,7 +107,6 @@
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "门店登录",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarTextStyle": "white",
"app-plus": {

File diff suppressed because one or more lines are too long

@ -52,13 +52,25 @@
qq: false,
sinaweibo: false,
xiaomi: false
}
},
typeId:''
}
},
onShow() {
},
onLoad() {
onLoad(options) {
this.typeId = options.id;
if(this.typeId == 1){
uni.setNavigationBarTitle({
title:'门店登录'
})
}else{
uni.setNavigationBarTitle({
title:'代理商登录'
})
}
//APP
// #ifdef APP-PLUS
this.isShowOauth = true;
@ -160,14 +172,19 @@
let datas = {
"loginName": this.phoneNumber,
"password": this.passwd
}
userLogin(datas).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
if(this.typeId == 1){
uni.navigateTo({
url: '../user/business/business'
})
}else{
uni.navigateTo({
url: '/pages/user/minePromotion/minePromotion'
})
}
app.globalData.brestUserInfo = res.return_data.object.secUser;
app.globalData.brestToken = res.return_data.uniqueCode;
} else {

@ -151,16 +151,15 @@
img: '/static/img/user/kefu.png'
},
{
url: '../../login/login',
url: '../../login/login?id=1',
text: '商户入口',
img: '/static/img/user/point.png'
},
{
url: '../../login/login?id=2',
text: '我的推广',
img: '/static/img/user/renw.png'
}
// ,
// {
// url: '../../login/login',
// text: '广',
// img: '/static/img/user/renw.png'
// }
]
}

@ -15,7 +15,7 @@
</view>
<view class="width100 line1 mart5"></view>
<view class="width90">
<button class="flright backcorf06 fcorfff font15 agent_btn mart10">生成油码</button>
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode">生成油码</button>
<view class="agent_ts font15 fcor333 fotrt">出售时间:2021.4.13 23:14</view>
</view>
</view>
@ -63,14 +63,49 @@
</template>
<script>
import {
getCodeListByAgentCoupon,
generateCode
} from "../../../Utils/Api.js";
export default {
data() {
return {
}
},
onLoad() {
this.getCodeListByAgentCoupon();
},
methods: {
//
getCodeListByAgentCoupon() {
let datas = {
couponId: 23423529,
pageNum: 1,
pageSize: 10
}
getCodeListByAgentCoupon(datas).then(res => {
if (res.return_code == '000000') {} else {
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
})
},
//
generateCode() {
let datas = {
couponAgentCodeId: 8
}
generateCode(datas).then(res => {
if (res.return_code == '000000') {} else {
uni.navigateTo({
url: '../../goods/coupons-info-details/coupons-info-details?id=1'
})
}
})
},
}
}
</script>

@ -28,7 +28,7 @@
<view class="promotion_xg flleft" style="margin-left: -6px;"></view>
</view>
</view>
<view class="promotion_kc width90 mart10" >
<view class="promotion_kc width90 mart10">
<image class="flleft pro_img mart15 margle" src="../../../static/img/wenj.png">
</image>
<view class="pro_cont paddtop15">
@ -40,15 +40,15 @@
</view>
</view>
<!-- //:class="[index==0?'colorfe':'']" -->
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colorfe" @click="jumpAgent">
<view class="width100 font15 fcor333 fontwig6 fotct paddtop10">
面额100.00
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore7" @click="jumpAgent">
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
面额100
</view>
<view class="width100 font14 fcor999 fotct mart10">
13
</view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10">
1300.00
1300
</view>
</view>
</view>
@ -75,14 +75,14 @@
</view>
<!-- // -->
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore9" @click="jumpAgent">
<view class="width100 font15 fcor333 fontwig6 fotct paddtop10">
面额100.00
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
面额100
</view>
<view class="width100 font14 fcor999 fotct mart10">
13
</view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10">
1300.00
1300
</view>
</view>
</view>
@ -90,21 +90,43 @@
</template>
<script>
import {
getAgentCount
} from "../../../Utils/Api.js";
export default {
data() {
return {
minepros : [
{id:1},
{id:1},
{id:1}
minepros: [{
id: 1
},
{
id: 1
},
{
id: 1
}
]
}
},
onLoad() {
this.getAgentCount();
},
methods: {
//
getAgentCount() {
getAgentCount().then(res => {
if (res.return_code == '000000') {} else {
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
})
},
//
jumpAgent(){
jumpAgent() {
uni.navigateTo({
url:'../agentCoupons/agentCoupons'
url: '../agentCoupons/agentCoupons'
})
}
}
@ -175,14 +197,16 @@
width: 30%;
display: inline-block;
}
.colorfe{
.colorfe {
background-color: #fef7e5;
}
.colore9{
.colore9 {
background-color: #e9f3ff;
}
.colore7{
.colore7 {
background-color: #e7fcf3;
}
</style>

Loading…
Cancel
Save