shuxiaoquan 11 months ago
commit 3f4eb7374b
  1. 7
      api/user/vip.js
  2. 2
      pages.json
  3. 9
      pages/login/index.vue
  4. 48
      pages/news/user/index.vue
  5. 297
      pages/news/user/vip.vue
  6. 12
      pages/news3/JoinDistribution.vue
  7. 21
      pages/user/index.vue

@ -4,7 +4,8 @@ import request from '@/utils/request'
const api = {
brandList: 'goods/brandList',
category: 'category/list',
getImage: 'goods/getCommonConfig'
getImage: 'goods/getCommonConfig',
vipList:'user/list'
}
// 大牌
@ -19,3 +20,7 @@ export const category = (data) => {
export const getImage = (data) => {
return request.get(api.getImage, data)
}
//会员管理
export const getVipList = (data) => {
return request.get(api.vipList, data)
}

@ -1115,7 +1115,7 @@
// "enablePullDownRefresh": true,
"navigationStyle": "custom",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "加入分销"
"navigationBarTitleText": "分销中心"
}
},
{

@ -15,7 +15,7 @@
<text v-if="showCountDown">{{countdown}}</text>
</view>
<view class="c">
查看并同意<text>用户服务协议</text><text>隐私政策</text>
查看并同意<text @click="toTextPage(1)">用户服务协议</text><text @click="toTextPage(2)">隐私政策</text>
</view>
</view>
<view class="login-fd login-fd-on" @click="login">登录</view>
@ -26,6 +26,7 @@
</template>
<script>
import * as UserApi from '@/api/user'
import * as CaptchaApi from '@/api/captcha';
import mpWeiXinMobile from './components/mp-weixin-mobile.vue'
@ -57,7 +58,11 @@
this.share_user_id = o.share_user_id
},
methods: {
toTextPage(n) {
uni.navigateTo({
url: "/pages/news1/text?pageFlag=" + n
})
},
validatePhoneNumber(phone) {
//
var regExp = /^1[3456789]\d{9}$/;

@ -5,21 +5,21 @@
</view>
<view class="user-hd">
<view class="avater">
<image :src="$picUrl+'/static/news/avater.png'"></image>
<image :src="form.avatar_url?form.avatar_url:`${$picUrl}/static/news/avater.png`"></image>
</view>
<view class="info">
<!-- p会员 无p游客 -->
<view class="name">我是昵称<text class="p">游客</text></view>
<view class="desc">真实姓名张三</view>
<view class="desc">18089800909</view>
<view class="name">{{form.nick_name}}<text class="p">{{form.user_type_text}}</text></view>
<!-- <view class="desc">真实姓名张三</view> -->
<view class="desc">{{form.mobile}}</view>
</view>
</view>
<view class="user-show">
<view class="a">
<text>余额(</text>¥0.00
<text>余额(</text>¥{{form.expend_money?form.expend_money:0.00}}
</view>
<view class="a">
<text>积分(</text>0.00
<text>积分(</text>{{form.grade?form.grade:0.00}}
</view>
</view>
<view class="user-order">
@ -93,13 +93,42 @@
export default {
data() {
return {
form:{
address_id: null,
avatar: null,
avatar_id: null,
avatar_url: null,
balance: "",
city: null,
country: null,
create_time: "",
effective_time: null,
expend_money: "",
gender: "",
grade: null,
grade_id: null,
is_delete: null,
last_login_time: null,
mobile: "",
nick_name: "",
pay_money: "",
platform: "",
points: null,
province: null,
store_id: null,
update_time: "",
user_id: null,
user_type: null,
user_type_text: ""
},
checked: true,
isScroll: true,
background: {
background: 'url(https://www.royaum.com.cn/static/news/login-bg.png) centertop no-repeat',
// background: 'url('+ img+') center top no-repeat',
backgroundSize: '100% auto',
}
},
}
},
onPageScroll(e){
@ -111,6 +140,11 @@
},
methods: {
},
onLoad(option) {
console.log(option)
this.form = Object.assign({},this.form,JSON.parse(option.item))
console.log(this.form)
}
}
</script>

@ -1,33 +1,48 @@
<template>
<view class="user">
<view class="search">
<view class="box">
<!-- <view class="box">
<image src="/static/news/icon-search.png"></image>
<input type="search" placeholder="商品名称/编码" />
</view>
</view> -->
<u-search placeholder="输入用户昵称/姓名/手机号" shape="round" :show-action="false" height="60" bg-color="#ffffff" v-model="keyword"></u-search>
</view>
<view class="user-bd">
<view class="li" v-for="i in 2" :key="i">
<view class="li" v-for="i in list" :key="i.user_id" @click="goVipDetails(i)">
<view class="a">
<view class="l">
<image :src="$picUrl+'/static/news/avater.png'"></image>
<image :src="i.avatar_url?i.avatar_url:$picUrl+'/static/news/avater.png'"></image>
</view>
<view class="m">
<view class="n">昵称</view>
<view class="r">
<view class="m">
<view class="n">{{i.nick_name}}</view>
<view class="btn">{{i.user_type_text}}</view>
</view>
<view class="n">
<view>
<text>{{i.mobile}}</text>
<image @click="copyText(i.mobile)" :src="$picUrl+'/static/news/icon-copy.png'" style="margin-top:-4rpx;"></image>
</view>
<image :src="$picUrl+'/static/news/tel.png'" @click="makeCall(i.mobile)"></image>
</view>
</view>
<!-- <view class="m">
<view class="n">{{nick_name}}</view>
<view class="n">真实姓名张三</view>
<view class="n">18089800909<image :src="$picUrl+'/static/news/icon-copy.png'"></image></view>
<view class="n">{{mobile}}<image :src="$picUrl+'/static/news/icon-copy.png'"></image></view>
</view>
<view class="r">
<view class="btn">会员</view>
<image :src="$picUrl+'/static/news/tel.png'"></image>
</view>
</view> -->
</view>
<view class="b">
<view class="l">余额(<text>¥0.00</text></view>
<view class="l">积分(<text>0.00</text></view>
<view class="l">余额(<text>¥{{i.expend_money?i.expend_money:0.00}}</text></view>
<view class="l">积分(<text>{{i.grade?i.grade:0}}</text></view>
</view>
</view>
<view class="li" v-for="i in 2" :key="i">
<!-- <view class="li" v-for="i in 2" :key="i">
<view class="a">
<view class="l">
<image :src="$picUrl+'/static/news/avater.png'"></image>
@ -46,21 +61,104 @@
<view class="l">余额(<text>¥0.00</text></view>
<view class="l">积分(<text>0.00</text></view>
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
<script>
import * as Vip from '@/api/user/vip'
export default {
data() {
return {
keyword:'',
page:1,
total:0,
list:[],
title:'会员管理'
};
},
methods: {
}
async getList(){
let res = await Vip.getVipList({page:this.page,search:this.keyword,user_type:this.title=='会员管理'?"10,20":'30'})
console.log(res,"===")
this.list.push(...res.data.list.data);
this.total = res.data.list.total;
},
copyText(text) {
uni.setClipboardData({
data: text,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'success',
duration: 2000
});
},
fail: () => {
uni.showToast({
title: '复制失败',
icon: 'none'
});
}
});
},
makeCall(phoneNumber) {
uni.getSetting({
success(res) {
if (!res.authSetting['scope.phoneCall']) {
//
uni.authorize({
scope: 'scope.phoneCall',
success() {
//
uni.makePhoneCall({
phoneNumber: phoneNumber //
});
},
fail() {
//
uni.showModal({
title: '提示',
content: '需要电话权限',
success: function(modalRes) {
if (modalRes.confirm) {
uni.openSetting();
}
}
});
}
});
} else {
//
uni.makePhoneCall({
phoneNumber: phoneNumber //
});
}
}
});
},
goVipDetails(item){
let details = JSON.stringify(item)
uni.navigateTo({
url:"/pages/news/user/index?item="+details
})
}
},
onLoad(option) {
this.title = option.title
uni.setNavigationBarTitle({
title: this.title
});
this.list = []
this.getList()
},
onReachBottom() {
if (this.list.length < this.total) {
this.page++;
this.getList()
}
},
}
</script>
@ -70,42 +168,43 @@
overflow: hidden;
.search{
width: 750rpx;
padding: 35rpx;
padding: 34rpx 34rpx 0 34rpx;
box-sizing: border-box;
.box{
padding: 15rpx 25rpx;
box-sizing: border-box;
display: flex;
align-items: center;
background: #F3F3F3;
border-radius: 60rpx;
image{
width: 28rpx;
height: 28rpx;
margin-right: 22rpx;
}
input{
flex: 1;
font-size: 28rpx;
line-height: 30rpx;
}
}
// .box{
// padding: 15rpx 25rpx;
// box-sizing: border-box;
// display: flex;
// align-items: center;
// background: #F3F3F3;
// border-radius: 60rpx;
// image{
// width: 28rpx;
// height: 28rpx;
// margin-right: 22rpx;
// }
// input{
// flex: 1;
// font-size: 28rpx;
// line-height: 30rpx;
// }
// }
}
&-bd{
padding: 0 30rpx;
padding: 0 34rpx;
overflow: hidden;
.li{
padding: 0 20rpx;
padding:0 12rpx;
background-color: #FFFFFF;
overflow: hidden;
border-radius: 12rpx;
margin-top: 20rpx;
&:first-child{
margin-top: 0;
}
border-radius: 8rpx;
margin-top: 18rpx;
// &:first-child{
// margin-top: 0;
// }
.a{
display: flex;
align-items: flex-start;
// align-items: flex-start;
align-items: center;
justify-content: space-between;
padding: 15rpx 0 30rpx;
border-bottom: 1px solid #F2F2F2;
@ -119,54 +218,88 @@
border-radius: 50%;
}
}
.m{
.r{
flex: 1;
max-width: 400rpx;
margin-right: 20rpx;
// width: 98rpx;
// overflow: hidden;
.m{
// flex: 1;
// max-width: 400rpx;
// margin-right: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
.btn{
// width: 98rpx;
padding:0 10rpx;
height: 56rpx;
line-height: 56rpx;
background: #FFFFFF;
border-radius: 3px 3px 3px 3px;
border: 1px solid #FFA928;
text-align: center;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #FFA928;
&-on{
border-color:#FFA928;
color: #FFA928;
}
}
}
.n{
font-size: 28rpx;
font-weight: 400;
color: #545454;
height: 50rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-top:20rpx;
text{
font-size: 28rpx;
color: #454545;
}
image{
width: 30rpx;
height: 30rpx;
margin-left: 10rpx;
vertical-align: middle;
margin-top: -1px;
}
}
// image{
// display: block;
// width: 30rpx;
// height: 30rpx;
// float: right;
// margin-top: 20rpx;
// margin-right: 20rpx;
// }
}
.r{
width: 98rpx;
overflow: hidden;
.btn{
width: 98rpx;
line-height: 64rpx;
background: #FFFFFF;
border-radius: 10rpx;
text-align: center;
border: 1px solid #FF6257;
font-size: 28rpx;
font-weight: 400;
color: #FF6257;
&-on{
border-color:#FFA928;
color: #FFA928;
}
}
image{
display: block;
width: 30rpx;
height: 30rpx;
float: right;
margin-top: 20rpx;
margin-right: 20rpx;
}
}
// .m{
// flex: 1;
// max-width: 400rpx;
// margin-right: 20rpx;
// .n{
// font-size: 28rpx;
// font-weight: 400;
// color: #545454;
// height: 50rpx;
// image{
// width: 30rpx;
// height: 30rpx;
// margin-left: 10rpx;
// vertical-align: middle;
// margin-top: -1px;
// }
// }
// }
}
.b{
padding-top: 30rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
overflow: hidden;
display: flex;
@ -176,13 +309,13 @@
text-align: center;
font-size: 28rpx;
font-weight: 400;
color: #454545;
color: #B1B1B1;
text{
font-size: 28rpx;
font-weight: 400;
color: #B1B1B1;
color: #454545;
display: block;
margin-top: 10rpx;
margin-top: 12rpx;
}
}
}

@ -12,10 +12,12 @@
<view class="userInfo">
<image :src="$picUrl+'/static/news3/join.png'" mode="widthFix"></image>
<view class="userContent">
<image :src="user.avatar_url" mode="aspectFill" class="avatar"></image>
<view v-if="user">
<image src="{{user.avatar_url?'/static/news3/walletBg.png':'/static/news3/walletBg.png'}}" mode="aspectFill" class="avatar"></image>
</view>
<view class="user">
<view class="userTop">
<text class="name">{{ user.nick_name }}</text>
<text class="name">{{ user.nick_name||'' }}</text>
<view class="flag">
分销商
</view>
@ -81,11 +83,11 @@
//
isLoading: true,
//
user: undefined,
user: {},
//
isDealer: false,
//
dealer: undefined,
dealer: {},
//
refereeName: undefined,
//
@ -119,7 +121,7 @@
// api
const data = result.data
app.isDealer = data.isDealer
app.user = data.user
app.user = data.user||{};
app.dealer = data.dealer
app.refereeName = data.refereeName
app.setting = data.setting

@ -119,7 +119,7 @@
<view class="typeLeft common">
会员管理<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
<view class="typeRight common" @click="goJump('/pages/news/user/vip')">
<view class="typeRight common" @click="goManagementHandle('/pages/news/user/vip','分销管理')">
<image :src="$picUrl+'/static/user/sale.png'" class="sale"></image>
分销管理<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
@ -426,7 +426,7 @@
数据统计
</view>
</view>
<view class="serveIcon" @click="goJump('/pages/news/user/vip')" v-if="userInfo.user_type == 40">
<view class="serveIcon" @click="goManagementHandle('/pages/news/user/vip','会员管理')" v-if="userInfo.user_type == 40">
<image :src="$picUrl+'/static/user/hygl.png'" class="icons"></image>
<view class="serveInfo">
会员管理
@ -537,11 +537,12 @@
if(type==30){
this.goJump('/pages/news3/JoinDistribution?dataType=all');
}else if(type==10 || type==20){
uni.showToast({
title: '请先购买分销会员',
icon: 'none',
duration: 2000
})
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// })
this.goJump('/pages/member/index');
}
},
openScrollTo(){
@ -660,6 +661,12 @@
url
})
},
goManagementHandle(url,title){
uni.navigateTo({
url:url+'?title='+title
})
},
goLogin() {
//
uni.navigateTo({

Loading…
Cancel
Save