Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
712f038112
11 changed files with 434 additions and 63 deletions
  1. +6
    -0
      api/model/login.js
  2. +5
    -1
      pages/index/index.vue
  3. +1
    -1
      pages/index/member.vue
  4. +39
    -8
      pages_order/auth/wxLogin.vue
  5. +86
    -10
      pages_order/auth/wxUserInfo.vue
  6. +68
    -14
      pages_order/home/addEnterprise.vue
  7. +89
    -0
      pages_order/mine/recommend - 副本.vue
  8. +88
    -17
      pages_order/mine/recommend.vue
  9. +26
    -9
      pages_order/mine/withdraw.vue
  10. BIN
      static/image/home/logo.png
  11. +26
    -3
      store/store.js

+ 6
- 0
api/model/login.js View File

@ -10,6 +10,12 @@ const api = {
limit : 500,
showLoading : true,
},
// 获取绑定手机号码
bindPhone: {
url: '/login_common/bindPhone',
method: 'GET',
auth: true,
},
// 修改个人信息接口
updateInfo: {
url: '/info_common/updateInfo',


+ 5
- 1
pages/index/index.vue View File

@ -7,7 +7,11 @@
<view class="page-title">
<!-- {{ configList.index_title }} -->
<image src="/static/image/home/logo.png"
<!-- <image src="/static/image/home/logo.png"
style="width: 240rpx;"
mode="widthFix"></image> -->
<image :src="configList.index_img"
style="width: 240rpx;"
mode="widthFix"></image>
</view>


+ 1
- 1
pages/index/member.vue View File

@ -336,7 +336,7 @@
.middlex-minBox {
display: flex;
flex-direction: column;
padding: 60rpx 0rpx 0rpx 40rpx;
padding: 60rpx 0rpx 30rpx 40rpx;
font-size: 24rpx;
color: #474747;


+ 39
- 8
pages_order/auth/wxLogin.vue View File

@ -6,6 +6,9 @@
<view class="title">
欢迎使用{{ configList.logo_name }}
</view>
<!-- v-if="checkboxValue.length == 0" -->
<view class="btn mt"
@click="wxLogin">
<view class="icon">
@ -15,9 +18,25 @@
微信授权登录
</view>
</view>
<!-- <view class="btn b2">
使用短信验证登录
</view> -->
<!-- <button
class="btn mt"
v-else
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber">
<view class="icon">
<image src="../static/auth/wx.png" mode=""></image>
</view>
<view
style="font-size: 30rpx;">
微信授权登录
</view>
</button> -->
<view class="btn b2"
@click="qux">
取消登录
</view>
@ -58,22 +77,29 @@
}
},
methods: {
wxLogin(){
getPhoneNumber(e){
console.log(e, e.detail.code);
this.wxLogin(phoneCode)
},
wxLogin(phoneCode){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
this.$store.commit('login')
this.$store.commit('login', phoneCode)
},
//
openConfigDetail(key){
this.$refs.popup.open(key)
}
},
qux(){
uni.reLaunch({
url: '/pages/index/index'
})
},
}
}
</script>
@ -112,6 +138,7 @@
}
}
.btn{
all: unset;
width: 80%;
height: 100rpx;
background-color: $uni-color;
@ -121,6 +148,10 @@
align-items: center;
margin: 20rpx 0;
border-radius: 20rpx;
border: none;
&::after{
}
.icon{
margin-right: 10rpx;
image{


+ 86
- 10
pages_order/auth/wxUserInfo.vue View File

@ -1,5 +1,8 @@
<template>
<view class="login">
<view class="logo">
<image :src="configList.logo_image" mode=""></image>
</view>
<view class="title">
{{ configList.logo_name }}
</view>
@ -13,7 +16,7 @@
头像
</view>
<view class="">
<image :src="userInfo.headImage" v-if="userInfo.headImage" style="width: 60rpx;height: 60rpx;"
<image :src="userInfoForm.headImage" v-if="userInfoForm.headImage" style="width: 60rpx;height: 60rpx;"
mode=""></image>
<image src="../static/auth/headImage.png" v-else style="width: 50rpx;height: 50rpx;" mode=""></image>
@ -26,9 +29,34 @@
</view>
<view class="">
<input type="nickname" placeholder="请输入昵称" style="text-align: right;" id="nickName"
v-model="userInfo.nickName" />
v-model="userInfoForm.nickName" />
</view>
</view>
<view class="line">
<view class="">
手机号
</view>
<view class=""
v-if="userInfoForm.phone">
<input placeholder="请输入手机号" style="text-align: right;"
disabled
v-model="userInfoForm.phone" />
</view>
<view class=""
v-else>
<button
class="getPhoneNumber"
open-type="getPhoneNumber"
@getphonenumber="getPhone">
获取电话号码
</button>
</view>
</view>
<view class="btn" @click="submit">
确认
</view>
@ -39,21 +67,44 @@
export default {
data() {
return {
userInfo: {
userInfoForm: {
headImage: '',
nickName: '',
phone : '',
}
};
},
onShow() {},
onLoad() {
this.userInfoForm.phone = this.userInfo.phone || ''
this.userInfoForm.nickName = this.userInfo.nickName || ''
this.userInfoForm.headImage = this.userInfo.headImage || ''
},
computed: {},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
.then(url => {
self.userInfo.headImage = url
})
.then(url => {
self.userInfoForm.headImage = url
})
},
getPhone(e){
this.$api('bindPhone', {
phoneCode : e.detail.code
}, res => {
if(res.code == 200){
let phoneObj = JSON.parse(res.result)
if(phoneObj.errmsg == 'ok'){
this.userInfoForm.phone = phoneObj.phone_info.phoneNumber
}else{
uni.showModal({
title: phoneObj.errmsg
})
}
console.log(phoneObj);
}
})
},
submit() {
let self = this
@ -65,18 +116,20 @@
})
.exec((res) => {
const nickName = res?.[0]?.value
self.userInfo.nickName = nickName
self.userInfoForm.nickName = nickName
if (self.$utils.verificationAll(self.userInfo, {
if (self.$utils.verificationAll(self.userInfoForm, {
headImage: '请选择头像',
nickName: '请填写昵称',
phone: '请填写昵称',
})) {
return
}
self.$api('updateInfo', {
avatarUrl : self.userInfo.headImage,
nickName : self.userInfo.nickName
avatarUrl : self.userInfoForm.headImage,
nickName : self.userInfoForm.nickName,
phone : self.userInfoForm.phone,
}, res => {
if (res.code == 200) {
uni.reLaunch({
@ -98,6 +151,16 @@
justify-content: center;
align-items: center;
height: 80vh;
.logo{
height: 140rpx;
width: 140rpx;
image{
height: 140rpx;
width: 140rpx;
border-radius: 30rpx;
}
margin-bottom: 20rpx;
}
.title {
line-height: 45rpx;
@ -132,5 +195,18 @@
border-radius: 15rpx;
margin-top: 10vh;
}
.getPhoneNumber{
all: unset;
display: flex;
justify-content: center;
align-items: center;
// background: $uni-linear-gradient-btn-color;
background: $uni-color;
color: #fff;
width: 200rpx;
height: 60rpx;
border-radius: 30rpx;
font-size: 24rpx;
}
}
</style>

+ 68
- 14
pages_order/home/addEnterprise.vue View File

@ -1,12 +1,27 @@
<template>
<view class="applyLaundryStore">
<navbar title="渠道合作" leftClick @leftClick="$utils.navigateBack" />
<navbar title="成为渠道商" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>申请信息</span>
<!-- <view class="title-nav"> -->
<view class="heeng"></view>
成为渠道商
</view>
<view class="desc">
<!-- configList.qu_price -->
<!-- <uv-parse :content="configList.qu_price"></uv-parse> -->
{{ configList.qu_price_keyValue }}
<br />
{{ configList.qu_price_money_keyValue }}
</view>
</view>
<view class="frame">
<view class="title">
<view class="heeng"></view>
<view>申请信息</view>
</view>
<view class="shopName">
<view>类型</view>
@ -29,7 +44,7 @@
<view class="shopName">
<view style="width: 300rpx;"
v-if="form.type">身份证</view>
v-if="form.type">身份证正反面</view>
<view style="width: 300rpx;"
v-else>营业执照</view>
@ -48,14 +63,27 @@
</uv-upload>
</view>
</view>
<view class="shopName">
<view class="shopName"
v-if="form.type">
<view>姓名</view>
<view>
<input v-model="form.name"
:disabled="isUpdate" placeholder="请输入姓名" clearable></input>
</view>
</view>
<view class="shopName">
<view class="shopName"
v-else>
<view>企业名称</view>
<view>
<input v-model="form.name"
:disabled="isUpdate" placeholder="请输入企业名称" clearable></input>
</view>
</view>
<view class="shopName"
v-if="form.type">
<view>性别</view>
<view>
<uv-radio-group v-model="form.sex">
@ -82,10 +110,10 @@
</view>
<view class="shopName" v-if="form.type">
<view>身份证号</view>
<view>身份证号</view>
<view>
<input v-model="form.no"
:disabled="isUpdate" placeholder="请输入身份证号" clearable></input>
:disabled="isUpdate" placeholder="请输入身份证号" clearable></input>
</view>
</view>
<view class="shopName" v-else>
@ -213,15 +241,17 @@
this.form.image = this.fileList.map((item) => item.url).join(",")
let p = {
image: '请上传店铺照片',
name: '请输入您的姓名',
image: '请上传营业执照',
name: '请输入您的企业名称',
phone: '请输入联系电话',
no: '请输入社会信用代码',
address: '请输入邮寄地址',
}
if(this.form.type){
p.no = '请输入身份证号'
p.no = '请输入身份证号码'
p.name = '请输您的入姓名'
p.image = '请上传身份证正反面'
}
if (this.$utils.verificationAll(this.form, p)) {
@ -251,7 +281,11 @@
this.$api('getCommonUser', res => {
if(res.code == 200){
this.form = res.result
this.form = res.result || this.form
if(!this.form.id){
return
}
delete this.form.userId
delete this.form.createTime
@ -277,9 +311,17 @@
* {
box-sizing: border-box;
}
.heeng{
width: 10rpx;
height: 40rpx;
background-color: #f78142;
border-radius: 10rpx;
overflow: hidden;
margin-right: 10rpx;
}
.applyLaundryStore {
padding: 0 20rpx 0 20rpx;
background-color: #f5f5f5;
.frame {
@ -289,6 +331,18 @@
background-color: #FFF;
margin-top: 20rpx;
padding: 20rpx;
.title-nav{
text-align: center;
font-size: 40rpx;
font-weight: 900;
}
.desc{
padding: 0 20rpx;
font-size: 28rpx;
line-height: 46rpx;
}
.title {
display: flex;


+ 89
- 0
pages_order/mine/recommend - 副本.vue View File

@ -0,0 +1,89 @@
<template>
<view class="page">
<navbar title="推广明细" leftClick @leftClick="$utils.navigateBack" />
<view class="top">
<view class="top-text">
<view>{{ total }}</view>
<view>直推人数</view>
</view>
</view>
<view class="cell">
<view class="cell-top">推广明细</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.nickName"
:label="item.createTime"
:center="true">
<template #value>
<text style="font-weight: 600; font-size: 28rpx;">
{{ vipType[item.isPay] }}
</text>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
mixinsListApi : 'getFansPageList',
vipType : ['普通会员', '黄金会员', '渠道商'],
}
},
onLoad(e) {},
methods: {
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #F3F3F3;
height: 100vh;
.top {
display: flex;
height: 400rpx;
justify-content: center;
align-items: center;
color: #474747;
.top-text {
text-align: center;
view:nth-child(1) {
font-size: 78rpx;
font-weight: 600;
}
view:nth-child(2) {
font-size: 28rpx;
}
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
}
}
}
</style>

+ 88
- 17
pages_order/mine/recommend.vue View File

@ -1,6 +1,16 @@
<template>
<view class="page">
<navbar title="推广明细" leftClick @leftClick="$utils.navigateBack" />
<view class="search">
<uv-search
placeholder="会员ID/昵称"
bgColor="#fff"
@search="getData"
@custom="getData"
v-model="queryParams.title"></uv-search>
</view>
<view class="top">
<view class="top-text">
<view>{{ total }}</view>
@ -8,22 +18,36 @@
</view>
</view>
<view class="cell">
<view class="cell-top">推广明细</view>
<!-- <view class="cell-top">推广明细</view> -->
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.nickName"
:label="item.createTime"
:center="true">
<template #value>
<text style="font-weight: 600; font-size: 28rpx;">
{{ vipType[item.isPay] }}
</text>
</template>
</uv-cell>
</uv-cell-group>
<view class="headImage">
<image :src="item.headImage" mode="aspectFill"></image>
</view>
<view class="info">
<view
style="width: 300rpx;">
<text>昵称</text>
{{ item.nickName }}
</view>
<view style="display: flex;align-items: center;"
@click="$utils.copyText(item.shareId)">
<text>上级ID</text>
{{ item.shareId && item.shareId.substring(0, 8) }}...
<uv-icon name="empty-news" color="#aaa" size="40"></uv-icon>
</view>
</view>
<view class="info">
<view class="">
<text>级别</text>
直属下级
</view>
<view class="">
<text>时间</text>
{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
</view>
</view>
</view>
</view>
</view>
@ -50,10 +74,26 @@
.page {
background-color: #F3F3F3;
height: 100vh;
.search {
position: relative;
background: #FFFFFF;
margin: 20rpx;
border-radius: 41rpx;
padding: 10rpx 20rpx;
display: flex;
align-items: center;
/deep/ .uv-search__action {
background-color: $uni-color;
color: #FFFFFF;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
}
.top {
display: flex;
height: 400rpx;
height: 200rpx;
justify-content: center;
align-items: center;
color: #474747;
@ -73,9 +113,40 @@
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-box{
border-radius: 16rpx;
margin: 20rpx;
background-color: #FFFFFF;
padding: 20rpx;
display: flex;
align-items: center;
.headImage{
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
flex-shrink: 0;
image{
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.info{
flex: 1;
font-size: 22rpx;
flex-shrink: 0;
view{
width: 240rpx;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
}
text{
font-weight: 900;
color: #474747;
}
}
}
.cell-top {


+ 26
- 9
pages_order/mine/withdraw.vue View File

@ -9,18 +9,31 @@
<view class="bg"/>
<view class="price">
<view class="title">
<!-- <view class="title">
请输入提现金额
</view>
</view> -->
<view class="input-box">
<view class="input">
<input type="text" v-model="form.money"/>
<input type="number" v-model="form.money"
placeholder="请输入提现金额"/>
</view>
<view class=""
@click="selectAll">
全部提现
</view>
</view>
<view class="input-box">
<view class="input">
<input type="text" v-model="form.bankName"
placeholder="请输入开户行"/>
</view>
</view>
<view class="input-box">
<view class="input">
<input type="text" v-model="form.bankNo"
placeholder="请输入银行卡号"/>
</view>
</view>
<view class="num">
可提现金额{{ riceInfo.canWithdraw || 0 }}
</view>
@ -80,7 +93,9 @@
type : ['+', '-'],
state : ['未到账', '已到账'],
form : {
money : 0,
money : '',
bankNo : '',
bankName : '',
},
}
},
@ -98,7 +113,9 @@
submit(){
if(this.$utils.verificationAll(this.form, {
money : '请输入金额'
money : '请输入金额',
bankName : '请输入开户行',
bankNo : 'bankNo',
})){
return
}
@ -117,7 +134,7 @@
title: '提现成功',
icon : 'none'
})
this.form.money = 0
this.form.money = ''
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
this.getData()
@ -132,7 +149,7 @@
.page{
.bg{
background-color: $uni-color;
height: 380rpx;
height: 640rpx;
position: absolute;
left: 0;
width: 100%;
@ -159,8 +176,8 @@
margin: 20rpx 0;
.input{
color: #000;
font-size: 40rpx;
font-weight: 900;
// font-size: 40rpx;
// font-weight: 900;
display: flex;
flex: 1;
input{


BIN
static/image/home/logo.png View File

Before After
Width: 2240  |  Height: 436  |  Size: 62 KiB Width: 2240  |  Height: 436  |  Size: 45 KiB

+ 26
- 3
store/store.js View File

@ -23,6 +23,7 @@ const store = new Vuex.Store({
if(res.code == 200){
res.result.forEach(n => {
state.configList[n.keyName] = n.keyContent
state.configList[n.keyName + '_keyValue'] = n.keyValue
})
}
})
@ -36,7 +37,7 @@ const store = new Vuex.Store({
// })
// })
},
login(state){
login(state, phoneCode){
uni.showLoading({
title: '登录中...'
})
@ -47,7 +48,8 @@ const store = new Vuex.Store({
}
let data = {
code : res.code
code : res.code,
phoneCode,
}
if(uni.getStorageSync('shareId')){
@ -65,7 +67,10 @@ const store = new Vuex.Store({
state.userInfo = res.result.userInfo
uni.setStorageSync('token', res.result.token)
if(!state.userInfo.nickName || !state.userInfo.headImage){
if(!state.userInfo.nickName
|| !state.userInfo.headImage
|| !state.userInfo.phone
){
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
@ -80,6 +85,24 @@ const store = new Vuex.Store({
api('getInfo', res => {
if(res.code == 200){
state.userInfo = res.result
if(!state.userInfo.nickName
|| !state.userInfo.headImage
|| !state.userInfo.phone
){
uni.showModal({
title: '小程序申请获取你的手机号!',
cancelText: '稍后补全',
confirmText: '现在补全',
success(e) {
if(e.confirm){
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
}
}
})
}
}
})
},


Loading…
Cancel
Save