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

@ -127,6 +127,8 @@ export const getDiscountByUserDiscountId = params => {
export const getUserNormalDiscountList = params => { export const getUserNormalDiscountList = params => {
return POST('GET', `${base}/userDiscount/getUserNormalDiscountList`, params).then(res => res.data); return POST('GET', `${base}/userDiscount/getUserNormalDiscountList`, params).then(res => res.data);
} }
//**门店//
export const userLogin = params => { export const userLogin = params => {
return POST('POST', `${brestBase}/login/userLogin`, params).then(res => res.data); 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); 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", "path": "pages/login/login",
"style": { "style": {
"navigationBarTitleText": "门店登录",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#f06c7a",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {

File diff suppressed because one or more lines are too long

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

@ -151,16 +151,15 @@
img: '/static/img/user/kefu.png' img: '/static/img/user/kefu.png'
}, },
{ {
url: '../../login/login', url: '../../login/login?id=1',
text: '商户入口', text: '商户入口',
img: '/static/img/user/point.png' 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>
<view class="width100 line1 mart5"></view> <view class="width100 line1 mart5"></view>
<view class="width90"> <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 class="agent_ts font15 fcor333 fotrt">出售时间:2021.4.13 23:14</view>
</view> </view>
</view> </view>
@ -63,14 +63,49 @@
</template> </template>
<script> <script>
import {
getCodeListByAgentCoupon,
generateCode
} from "../../../Utils/Api.js";
export default { export default {
data() { data() {
return { return {
} }
}, },
onLoad() {
this.getCodeListByAgentCoupon();
},
methods: { 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> </script>

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

Loading…
Cancel
Save