一键登录

dev
zhouzhenyuan 1 year ago
parent 5ece2d6aad
commit af98d83b3c
  1. 7
      api/help.js
  2. 27
      api/member/index.js
  3. 34
      pages/login/components/mp-weixin-mobile.vue
  4. 25
      pages/login/index.vue
  5. 253
      pages/member/index.vue
  6. 20
      pages/memberInfo/index.vue
  7. 59
      pages/news1/help.vue
  8. 435
      pages/news1/huoyuan.vue
  9. 46
      pages/user/index.vue

@ -3,7 +3,8 @@ import request from '@/utils/request'
// api地址 // api地址
const api = { const api = {
list: 'help/list', list: 'help/list',
helpList:'article/helpCenter' helpList:'article/helpCenter',
addGoodsSource:'user/addGoodsSource'
} }
// 帮助中心列表 // 帮助中心列表
@ -13,4 +14,8 @@ export const list = (param) => {
// 帮助中心列表 // 帮助中心列表
export const helpList = (param) => { export const helpList = (param) => {
return request.get(api.helpList, param) return request.get(api.helpList, param)
}
// 我要找货
export const addGoodsSource = (param) => {
return request.post(api.addGoodsSource, param)
} }

@ -0,0 +1,27 @@
import request from '@/utils/request'
// api地址
const api = {
info: 'identity/userPriceList',
submit:'identity/submit',
dealerPriceList:'identity/dealerPriceList',
userOpenCardLog:'identity/userOpenCardLog'
}
// 会员信息
export const info = (param) => {
return request.post(api.info, param)
}
// 分销会员信息
export const dealerPriceList = (param) => {
return request.post(api.dealerPriceList, param)
}
// 会员信息
export const submit = (param) => {
return request.post(api.submit, param)
}
//
export const userOpenCardLog = (param) => {
return request.post(api.userOpenCardLog, param)
}

@ -15,23 +15,18 @@
import { isEmpty, inArray } from '@/utils/util' import { isEmpty, inArray } from '@/utils/util'
export default { export default {
props: {
//
isParty: {
type: Boolean,
default: () => false
},
//
partyData: {
type: Object
}
},
data() { data() {
return { return {
// (code) // (code)
// openid // openid
code: '' code: '',
userInfo:{},
partyData:{
// oauth:'MP-WEIXIN'
},
isParty:true,
} }
}, },
@ -59,7 +54,7 @@
encryptedData: detail.encryptedData, encryptedData: detail.encryptedData,
iv: detail.iv, iv: detail.iv,
isParty: app.isParty, isParty: app.isParty,
partyData: app.partyData, partyData: app.userInfo,
refereeId: store.getters.refereeId refereeId: store.getters.refereeId
}) })
.then(result => { .then(result => {
@ -88,11 +83,24 @@
// code // code
// https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html // https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html
getCode() { getCode() {
const that = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: res => { success: res => {
console.log('code', res.code) console.log('code', res.code)
uni.getUserInfo({
provider: 'weixin',
success: function(info) {
console.log(info,'用户信息')
that.userInfo.nickName = info.userInfo.nickName
that.userInfo.gender = info.userInfo.gender
that.userInfo.avatarUrl = info.userInfo.avatarUrl
// if(info.userInfo){
// that.isParty = true
// }
}
})
resolve(res.code) resolve(res.code)
}, },
fail: reject fail: reject

@ -10,9 +10,8 @@
<view class="login-bd"> <view class="login-bd">
<view class="a">+86<input v-model="phoneNum" type="tel" placeholder="请输入手机号" /></view> <view class="a">+86<input v-model="phoneNum" type="tel" placeholder="请输入手机号" /></view>
<view class="b"> <view class="b">
<input v-model="semCode" placeholder="请输入验证码" /> <input v-model="semCode" placeholder="请输入验证码" />
<text @click="getCode" <text @click="getCode" v-if="!showCountDown">获取验证码</text>
v-if="!showCountDown">获取验证码</text>
<text v-if="showCountDown">{{countdown}}</text> <text v-if="showCountDown">{{countdown}}</text>
</view> </view>
<view class="c"> <view class="c">
@ -20,14 +19,23 @@
</view> </view>
</view> </view>
<view class="login-fd login-fd-on" @click="login">登录</view> <view class="login-fd login-fd-on" @click="login">登录</view>
<view class="">
<mpWeiXinMobile></mpWeiXinMobile>
</view>
</view> </view>
</template> </template>
<script> <script>
import img from "@/static/news/login-bg.png"
import img from "@/static/news/login-bg.png";
import * as CaptchaApi from '@/api/captcha'; import * as CaptchaApi from '@/api/captcha';
import store from '@/store' import mpWeiXinMobile from './components/mp-weixin-mobile.vue'
import store from '@/store';
import { isEmpty } from '@/utils/util'
export default { export default {
components:{
mpWeiXinMobile
},
data() { data() {
return { return {
showCountDown: false, showCountDown: false,
@ -40,9 +48,14 @@
semCode: '', semCode: '',
countdown: 60, countdown: 60,
countDownFun: null, countDownFun: null,
code: '',
} }
},
onShow() {
}, },
methods: { methods: {
validatePhoneNumber(phone) { validatePhoneNumber(phone) {
// //
var regExp = /^1[3456789]\d{9}$/; var regExp = /^1[3456789]\d{9}$/;
@ -71,7 +84,7 @@
that.countdown = 60 that.countdown = 60
clearInterval(that.countDownFun) clearInterval(that.countDownFun)
} }
}, 1000) }, 1000)
CaptchaApi.sendSmsCaptcha({ CaptchaApi.sendSmsCaptcha({
form: { form: {

@ -5,22 +5,21 @@
:background="background"></u-navbar> :background="background"></u-navbar>
</view> </view>
<view class="khy"> <view class="khy">
开通Ultra会员人均立省<text>2389</text> 开通<text v-if="type=='fx'">分销</text>会员人均立省<text>2389</text>
<image src="/static/order/left.png" mode=""></image>
</view> </view>
<view class="tips"> <view class="tips">
<image src="/static/default-logo.png" mode="" class="headIcon"></image> <image src="/static/default-logo.png" mode="" class="headIcon"></image>
<view class="meInfo"> <view class="meInfo">
<view class="info"> <view class="info">
<view class="name"> <view class="name">
Deioio {{userInfo.nick_name}}
</view> </view>
<view class="hy"> <view class="hy">
v月卡会员 {{userInfo.user_type_text}}
</view> </view>
</view> </view>
<view class="time"> <view class="time">
有效期至2024.01.21 有效期至{{userInfo.effective_time}}
</view> </view>
</view> </view>
<view class="buyInfo" @click="goBuyInfo"> <view class="buyInfo" @click="goBuyInfo">
@ -30,174 +29,257 @@
</view> </view>
<view class="notVip"> <view class="notVip">
<view class="openVip"> <view class="openVip">
开通Ultra会员获得以下 <text>10</text>特权 开通<text v-if="type=='fx'">分销</text>会员获得以下 <text>10</text>特权
</view> </view>
<view class="vipList"> <view class="vipList">
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/my.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
天天免邮
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/lp.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 超低会员价
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/dz.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 折上95折
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/th.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 退换免运费
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/cx.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 促销福利
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/tq.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 极速售后
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/my.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 门店特权
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/cj.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 不回本退差价
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/tg.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 团购优惠券
</view> </view>
</view> </view>
<view class="vipItem"> <view class="vipItem">
<image src="/static/member/my.png" mode="" class="itemImg"></image> <image src="/static/member/jf.png" mode="" class="itemImg"></image>
<view class="vipInfo"> <view class="vipInfo">
{{item.name}} 双倍积分
</view> </view>
</view> </view>
</view> </view>
<view class="choseType"> <view class="choseType">
<view class="typeTitle"> <view class="typeTitle">
选择开卡套餐 选择 <text v-if="userInfo.effective_time">续费</text> <text v-if="!userInfo.effective_time">开卡</text> 套餐
</view> </view>
<view class="typeList"> <view class="typeList">
<view class="first common" v-for="(item,index) in 3" :key="index" <view class="first common" v-for="(item,index) in packageList" :key="index"
:style="{'border':isChose==index?'2rpx solid #F34A40':none}"> :style="{'border':isChose==index?'2rpx solid #F34A40':none}" @click="chosePackage(item,index)">
<view class="limitPrice" v-if="index==0"> <view class="limitPrice" v-if="index==0">
限时活动价 限时活动价
</view> </view>
<view class="timeLong" :style="{'marginTop':isChose!=index?'62rpx':0}"> <view class="timeLong" :style="{'marginTop':isChose!=index?'62rpx':0}">
3个月 {{item.month}}个月
</view> </view>
<view class="firPrice"> <view class="firPrice">
99 {{item.price}}
</view> </view>
<view class="avePrice"> <view class="avePrice">
12/ {{Number(item.price)/Number(item.month)}}/
</view> </view>
</view> </view>
</view> </view>
<view class="payType"> <view class="payType">
<view class="firLine"> <view v-for="(item,index) in paymentMethods" :key="index" @click="chosePayType(item,index)">
<view class="left"> <view class="firLine">
<image src="/static/order/wChat.png" mode="" class="weChatImg"></image> <view class="left">
<text>微信支付</text> <image src="/static/order/wChat.png" mode="" class="weChatImg"
v-if="item.method=='wechat'"></image>
<image src="/static/member/others.png" mode="" class="weChatImg"
v-if="item.method=='balance'"></image>
<text v-if="item.method=='wechat'">微信支付</text>
<text v-if="item.method=='balance'">余额支付</text>
</view>
<image src="../../static/order/right.png" mode="" class="choseImg" v-if="item.is_default">
</image>
</view> </view>
<image src="../../static/order/right.png" mode="" class="choseImg" v-if="payTypeChose"></image> <view class="line">
</view>
<view class="line">
</view>
<view class="firLine">
<view class="left">
<image src="/static/member/others.png" mode="" class="weChatImg" ></image>
<text>找微信好友代付</text>
</view> </view>
<image src="../../static/order/right.png" mode="" class="choseImg" v-if="!payTypeChose"></image>
</view>
<view class="line">
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view class="fLeft"> <view class="fLeft">
<view class="ys"> <view class="ys">
已省 <text>3.2</text> 已省 <text>{{choseItem.cheap_price}}</text>
</view> </view>
<view class="yj"> <view class="yj">
原价 30 原价 {{choseItem.price}}
</view> </view>
</view> </view>
<view class="btn"> <view class="btn" @click="gotoPay">
<text>36</text>开卡3个月 <text>{{choseItem.price}}</text>开卡{{choseItem.month}}个月
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import img from "@/static/member/top.png" import img from "@/static/member/top.png";
import * as member from '@/api/member/index.js';
import {
Wechat
} from '@/core/payment'
export default { export default {
data() { data() {
return { return {
equityList:[{ packageList: [],
name:'天天免邮', userInfo: {},
// url:require('@/static/member/my.png') payTypeChose: true,
},{
name:'超低会员价'
},{
name:'折上95折'
},{
name:'退换免运费'
},{
name:'促销福利'
},{
name:'极速售后'
},{
name:'门店特权'
},{
name:'不回本退差价'
},{
name:'团购优惠券'
},{
name:'双倍积分'
}],
payTypeChose:true,
isChose: 0, isChose: 0,
isVip: false, isVip: false,
background: { background: {
background: 'url(' + img + ') center top no-repeat', background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100% auto', backgroundSize: '100% auto',
}, },
paymentMethods: [],
choseItem: {},
payType: 'wechat',
type: 'hy',
} }
}, },
methods:{ onShow() {
goBuyInfo(){ this.getMemberInfo()
},
onLoad(options) {
this.type = options.type
},
methods: {
getMemberInfo() {
const that = this
let params = {
client: 'MP-WEIXIN'
}
if (that.type == 'hy') {
member.info(params)
.then(res => {
if (res.status == 200) {
that.userInfo = res.data.list.personal;
that.packageList = res.data.list.list;
that.paymentMethods = res.data.list.paymentMethods;
that.choseItem = that.packageList[0]
}
})
.finally(() => that.isLoading = false)
} else {
member.dealerPriceList(params)
.then(res => {
if (res.status == 200) {
that.userInfo = res.data.list.personal;
that.packageList = res.data.list.list;
that.paymentMethods = res.data.list.paymentMethods;
that.choseItem = that.packageList[0]
}
})
.finally(() => that.isLoading = false)
}
},
chosePackage(item, index) {
this.isChose = index;
this.choseItem = item;
},
goBuyInfo() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/memberInfo/index' url: '/pages/memberInfo/index'
}) })
}, },
chosePayType(item, index) {
//
this.paymentMethods[index].is_default = true;
this.payType = item.method;
for (var i = 0; i < this.paymentMethods.length; i++) {
if (i != index) {
this.paymentMethods[i].is_default = false
}
}
},
gotoPay() {
//
if (this.payType == 'wechat') {
this.weChatPay()
} else if (this.payType == 'balance') {
this.balancePay()
}
},
weChatPay() {
//
const that = this
let params = {
identity_id: that.choseItem.identity_id,
method: 'wechat',
client: 'MP-WEIXIN'
}
member.submit(params)
.then(res => {
let paymentData = res.data.payment
Wechat.payment({
orderKey: res.data.payment.out_trade_no,
...paymentData
})
.then((result) => {
console.log(result)
})
.catch(err => {
console.log(err)
})
})
.finally(() => that.isLoading = false)
},
balancePay() {
//
const that = this
let params = {
identity_id: that.choseItem.identity_id,
method: 'balance',
client: 'MP-WEIXIN'
}
member.submit(params)
.then(res => {
that.$toast(res.message)
})
.finally(() => that.isLoading = false)
},
} }
} }
</script> </script>
@ -252,6 +334,7 @@
height: 114rpx; height: 114rpx;
margin-right: 30rpx; margin-right: 30rpx;
margin-top: 12rpx; margin-top: 12rpx;
border-radius: 50%;
} }
.meInfo { .meInfo {
@ -295,7 +378,8 @@
} }
} }
.buyInfo{
.buyInfo {
// width: 112rpx; // width: 112rpx;
height: 40rpx; height: 40rpx;
font-size: 28rpx; font-size: 28rpx;
@ -303,11 +387,13 @@
font-weight: 400; font-weight: 400;
color: #785B45; color: #785B45;
line-height: 40rpx; line-height: 40rpx;
margin-left: 86rpx; // margin-left: 86rpx;
} }
} }
.notVip { .notVip {
padding-bottom: 200rpx;
.openVip { .openVip {
height: 44rpx; height: 44rpx;
font-size: 32rpx; font-size: 32rpx;
@ -334,6 +420,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-right: 6rpx; margin-right: 6rpx;
margin-bottom: 8rpx;
.itemImg { .itemImg {
width: 88rpx; width: 88rpx;
@ -392,6 +479,7 @@
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1; opacity: 1;
margin: 0 0 20rpx 32rpx; margin: 0 0 20rpx 32rpx;
text-align: center;
} }
.timeLong { .timeLong {
@ -414,7 +502,7 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
height: 72rpx; height: 72rpx;
font-size: 52rpx; font-size: 36rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 600; font-weight: 600;
color: #F34A40; color: #F34A40;
@ -475,6 +563,7 @@
} }
} }
} }
.footer { .footer {
position: fixed; position: fixed;
bottom: 0rpx; bottom: 0rpx;
@ -483,6 +572,8 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
z-index: 99;
background-color: #fff;
.fLeft { .fLeft {
margin: 24rpx 0 0 74rpx; margin: 24rpx 0 0 74rpx;

@ -65,7 +65,8 @@
</template> </template>
<script> <script>
import img from "@/static/member/top.png" import img from "@/static/member/top.png";
import * as member from '@/api/member/index.js'
export default { export default {
data() { data() {
return { return {
@ -77,7 +78,22 @@
backgroundSize: '100% auto', backgroundSize: '100% auto',
}, },
} }
} },
onLoad(options){
this.getListInfo()
},
methods:{
getListInfo(){
const that = this
member.info()
.then(res => {
if (res.status == 200) {
}
})
.finally(() => that.isLoading = false)
},
},
} }
</script> </script>

@ -5,7 +5,7 @@
<view class="helpItem" v-for="(item,index) in itemList" :key="index"> <view class="helpItem" v-for="(item,index) in itemList" :key="index">
<view class="helpMain"> <view class="helpMain">
<u-icon name="arrow-left" class="zhishi" color="#dfdbdb" size="28"></u-icon> <u-icon name="arrow-left" class="zhishi" color="#dfdbdb" size="28"></u-icon>
<image :src="item.icon" class="titleIcon" mode="widthFix"></image> <image :src="item.img_url" class="titleIcon" mode="widthFix"></image>
<view class="mainText"> <view class="mainText">
<text>{{item.name}}</text> <text>{{item.name}}</text>
<u-icon name="arrow-right" v-if="item.name!=''" color="#8B8B8B" size="22"></u-icon> <u-icon name="arrow-right" v-if="item.name!=''" color="#8B8B8B" size="22"></u-icon>
@ -30,62 +30,7 @@
export default { export default {
data() { data() {
return { return {
itemList: [{ itemList: [],
title: '物流问题',
icon: '/static/news1/n1.png',
children: ['发货失效', '发货时间', '催促物流', '修改收货地址']
},
{
title: '',
icon: '',
children: ['延迟发货', '物流状态不更新', '商品验货与签收', '配送快递']
},
{
title: '售后问题',
icon: '/static/news1/n2.png',
children: ['如何申请退货', '如何申请换货', '退换货运费政策', '退换货何时退款']
},
{
title: '',
icon: '',
children: ['退换货政策', '极速售后服务', '维修政策', '退换货地址如何查看']
},
{
title: '订单问题',
icon: '/static/news1/n3.png',
children: ['修改订单', '取消订单', '价格保护', '发票服务']
},
{
title: '',
icon: '',
children: ['商城理的商品1234567', '商城实物与图片3456768', '违规订单处理123456', '话费充值说明']
},
{
title: '活动问题',
icon: '/static/news1/n4.png',
children: ['余额', '秒杀说明', '预售说明', '积分规则']
},
{
title: '',
icon: '',
children: ['红包说明', 'plus会员', '分销员', '团购说明']
},
{
title: '风控规则',
icon: '/static/news1/n5.png',
children: ['风控规则', '', '', '']
},
{
title: '服务政策',
icon: '/static/news1/n6.png',
children: ['隐私政策', '商务合作', '会员协议', '分销协议']
},
{
title: '',
icon: '',
children: ['常见问题', '', '退换货细则', '争议处理判定标准']
},
],
} }
}, },

@ -1,111 +1,118 @@
<template> <template>
<view class="huoyuan"> <view class="huoyuan">
<view style="width:100%;position: fixed;top:0;z-index:99"> <view style="width:100%;position: fixed;top:0;z-index:99">
<view class="navBarContent"> <view class="navBarContent">
<u-navbar title="我要货源" :border-bottom="false" :background="background" title-color="#fff"></u-navbar> <u-navbar title="我要货源" :border-bottom="false" :background="background" title-color="#fff"></u-navbar>
<!-- <u-icon name="arrow-left" style="position: absolute;top:50%;left:40upx;transform: translateY(-50%);" color="#ffffff" size="24"></u-icon>
<text>我要货源</text> -->
</view>
</view>
<image src="../../static/news1/walletBg.png" class="bgImg" mode="widthFix"></image>
<view style="border:1px solid transparent;margin-top:-190px;position: relative;z-index: 9;">
<view class="process">
<view class="pItem" v-for="(item,index) in list" :key="index">
<image :src="item.icon" mode="widthFix" class="icon"></image>
<view class="title">{{item.title}}</view>
<view class="subTitle">{{item.subTitle}}</view>
</view> </view>
</view> </view>
<view class="formContent"> <image src="../../static/news1/walletBg.png" class="bgImg" mode="widthFix"></image>
<u-form :model="form" ref="uForm"> <view style="border:1px solid transparent;margin-top:-190px;position: relative;z-index: 9;">
<u-form-item label="商品名称" label-width="150"><u-input placeholder="请填写您求购的商品名称" v-model="form.name" /></u-form-item> <view class="process">
<u-form-item label="产品描述" label-width="150"><u-input maxlength="200" placeholder="如品牌、型号、参数 、配置、规格等,可复制电商标题、链接。" v-model="form.intro" type="textarea"/></u-form-item>
<u-form-item label="求购类型" label-width="150" @click="typeShow = true"> <view class="pItem" v-for="(item,index) in list" :key="index">
<u-input v-model="form.type" type="select" @click="typeShow = true"/> <image :src="item.icon" mode="widthFix" class="icon"></image>
<u-action-sheet :list="type" :cancel-btn="false" v-model="typeShow" @click="actionSheetCallback"></u-action-sheet> <view class="title">{{item.title}}</view>
</u-form-item> <view class="subTitle">{{item.subTitle}}</view>
<u-form-item label="交货日期" label-width="150" @click="timeShow = true"> </view>
<u-input v-model="form.date" type="select" @click="timeShow = true"/> </view>
<u-picker mode="time" v-model="timeShow" :params="timeParams"></u-picker> <view class="formContent">
</u-form-item> <u-form :model="form" ref="uForm">
<u-form-item label="求购数量" label-width="150"><u-input placeholder="请输入数量及单位" v-model="form.num" /></u-form-item> <u-form-item label="商品名称" label-width="150"><u-input placeholder="请填写您求购的商品名称"
<u-form-item label="预估单价" label-width="150"> v-model="form.name" /></u-form-item>
<view class=""> <u-form-item label="产品描述" label-width="150"><u-input maxlength="200"
<view class="qujian"> placeholder="如品牌、型号、参数 、配置、规格等,可复制电商标题、链接。" v-model="form.intro"
<u-input placeholder="请输入价格区间" border v-model="form.startNum" /> type="textarea" /></u-form-item>
<text style="margin:0 10upx;">-</text> <u-form-item label="求购类型" label-width="150" @click="typeShow = true">
<u-input placeholder="请输入价格区间" border v-model="form.endNum" /> <u-input v-model="form.type" type="select" @click="typeShow = true" />
<text style="margin-left:10upx"></text> <u-action-sheet :list="type" :cancel-btn="false" v-model="typeShow"
@click="actionSheetCallback"></u-action-sheet>
</u-form-item>
<u-form-item label="交货日期" label-width="150" @click="timeShow = true">
<u-input v-model="form.date" type="select" @click="timeShow = true" />
<u-picker mode="time" v-model="timeShow" :params="timeParams" @confirm="timeChage"></u-picker>
</u-form-item>
<u-form-item label="求购数量" label-width="150"><u-input placeholder="请输入数量及单位"
v-model="form.num" /></u-form-item>
<u-form-item label="预估单价" label-width="150">
<view class="">
<view class="qujian">
<u-input placeholder="请输入价格区间" border v-model="form.startNum" />
<text style="margin:0 10upx;">-</text>
<u-input placeholder="请输入价格区间" border v-model="form.endNum" />
<text style="margin-left:10upx"></text>
</view>
<u-checkbox-group>
<u-checkbox active-color="#FE483B" shape="circle" v-model="form.mianyi"
v-for="(item, index) in radioList" :key="index" :name="item.name">
{{ item.name }}
</u-checkbox>
</u-checkbox-group>
</view> </view>
<u-checkbox-group> </u-form-item>
<u-checkbox active-color="#FE483B" shape="circle" v-model="form.mianyi" v-for="(item, index) in radioList" :key="index" :name="item.name"> <u-upload :fileList="finishImageList" :previewFullImage="true" @afterRead="afterRead" :maxCount="8"
{{ item.name }} width="180" height="180" upload-text="上传照片" @delete="deletePic" name="1" multiple></u-upload>
</u-checkbox> <u-form-item label="收货地址" label-width="150" @click="addrshow = true">
</u-checkbox-group> <u-input v-model="form.addr" type="select" @click="addrshow = true" />
<u-picker mode="region" v-model="addrshow"></u-picker>
</view> </u-form-item>
</u-form-item> <u-form-item label="备注" label-width="150" label-position="top">
<u-upload <u-input v-model="form.remark" class="remarkInput" placeholder="请填写您要补充的内容,如规格、包装和运输等要求"
:fileList="finishImageList" type="textarea" />
:previewFullImage="true" </u-form-item>
@afterRead="afterRead" </u-form>
:maxCount="8" width="180" height="180" <button class="submitBtn" @click="sureSubmit">确认发布</button>
upload-text="上传照片" </view>
@delete="deletePic"
name="1"
multiple
></u-upload>
<u-form-item label="收货地址" label-width="150" @click="addrshow = true">
<u-input v-model="form.addr" type="select" @click="addrshow = true"/>
<u-picker mode="region" v-model="addrshow"></u-picker>
</u-form-item>
<u-form-item label="备注" label-width="150" label-position="top">
<u-input v-model="form.remark" class="remarkInput" placeholder="请填写您要补充的内容,如规格、包装和运输等要求" type="textarea"/>
</u-form-item>
</u-form>
<button class="submitBtn">确认发布</button>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
import img from "@/static/news1/walletBg.png" import img from "@/static/news1/walletBg.png";
import * as help from '@/api/help'
export default { export default {
data() { data() {
return { return {
background: { background: {
background: 'url('+ img+') center top no-repeat', background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100%', backgroundSize: '100%',
}, },
list:[ list: [{
{icon:'/static/news1/m1.png',title:'发采购询价单',subTitle:'填写所需信息一键发布询价'}, icon: '/static/news1/m1.png',
{icon:'/static/news1/m2.png',title:'卖家实时报价',subTitle:'60分钟获取卖家报价'}, title: '发采购询价单',
{icon:'/static/news1/m3.png',title:'卖家上架商品',subTitle:'采购方案根据需要下单采购'}, subTitle: '填写所需信息一键发布询价'
},
{
icon: '/static/news1/m2.png',
title: '卖家实时报价',
subTitle: '60分钟获取卖家报价'
},
{
icon: '/static/news1/m3.png',
title: '卖家上架商品',
subTitle: '采购方案根据需要下单采购'
},
], ],
form: { form: {
name: '', name: '',
intro: '', intro: '',
type: '', type: '',
date:'', date: '',
num:'', num: '',
startNum:'', startNum: '',
endNum:'', endNum: '',
mianyi:true, mianyi: true,
addr:'', addr: '',
remark:'' remark: ''
}, },
typeShow:false, typeShow: false,
timeShow:false, timeShow: false,
addrshow:false, addrshow: false,
type: [ type: [{
{ text: '一件代发'
text: '一件代发' }],
} timeParams: {
],
timeParams:{
year: true, year: true,
month: true, month: true,
day: true, day: true,
@ -113,25 +120,52 @@
minute: false, minute: false,
second: false second: false
}, },
radioList: [ radioList: [{
{
name: '面议' name: '面议'
}, },
], ],
radio: '', radio: '',
// //
finishImageList:[] finishImageList: [],
imgage_ids:[10001,10002]
} }
}, },
methods:{ methods: {
timeChage(e) {
//
console.log(e, '时间值')
this.form.date = e.year + '-' + e.month + '-' + e.day
},
sureSubmit() {
// 0000
const that = this;
let params = {
goods_name: that.form.name,
goods_desc: that.form.intro,
type: that.form.type,
deliver_at: that.form.date,
num: that.form.num,
min_price: that.form.startNum,
max_price: that.form.endNum,
is_face: that.form.mianyi,
address_id: '10001',
remark: that.form.remark,
}
help.addGoodsSource(params)
.then(res => {
console.log(res, '确认发布')
})
.finally()
},
actionSheetCallback(index) { actionSheetCallback(index) {
this.form.type = this.type[index].text; this.form.type = this.type[index].text;
}, },
// //
async afterRead(event) { async afterRead(event) {
let lists = [].concat(event.file) let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => { lists.map((item) => {
@ -143,8 +177,8 @@
}) })
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url) const result = await this.uploadFilePromise(lists[i].url)
if(JSON.parse(result).code==1){ if (JSON.parse(result).code == 1) {
let item = this[`fileList${event.name}`][fileListLen] let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success', status: 'success',
@ -152,12 +186,12 @@
url: result url: result
})) }))
fileListLen++ fileListLen++
}else{ } else {
this[`fileList${event.name}`].splice(fileListLen, 1) this[`fileList${event.name}`].splice(fileListLen, 1)
} }
} }
}, },
// //
uploadFilePromise(url) { uploadFilePromise(url) {
@ -178,7 +212,7 @@
// }, 1000) // }, 1000)
// }else{ // }else{
// uni.$u.toast(JSON.parse(res.data).msg) // uni.$u.toast(JSON.parse(res.data).msg)
// resolve(res.data) // resolve(res.data)
// } // }
// }, // },
@ -190,7 +224,7 @@
}, },
// //
deletePic(event) { deletePic(event) {
this.finishImageList.splice(event.index, 1) this.finishImageList.splice(event.index, 1)
}, },
} }
@ -198,110 +232,123 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page {
min-height:100%; min-height: 100%;
padding-bottom:100upx; padding-bottom: 100upx;
} }
.huoyuan{
.process{ .huoyuan {
height: 266upx; .process {
background: #FFFFFF; height: 266upx;
border-radius: 14upx; background: #FFFFFF;
opacity: 1; border-radius: 14upx;
display: flex; opacity: 1;
align-items: center;
justify-content: space-between;
margin:0 30upx;
// padding:0 28upx;
position: relative;
.pItem{
flex: 1;
height: 100%;
display: flex; display: flex;
flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
image{ justify-content: space-between;
width:56upx; margin: 0 30upx;
height: auto; // padding:0 28upx;
position: relative;
.pItem {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image {
width: 56upx;
height: auto;
}
.title {
font-size: 24upx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #2D2D2D;
margin: 16upx 0;
}
.subTitle {
font-size: 24upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #8A8A8A;
width: 75%;
text-align: center;
}
}
}
.formContent {
margin: 0 30upx;
background-color: #fff;
border-radius: 14upx;
margin-top: 20upx;
padding: 0 38upx;
padding-bottom: 64upx;
::v-deep .u-form-item--left {
align-items: flex-start;
} }
.title{
font-size: 24upx; ::v-deep .u-form-item--left__content__label {
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #2D2D2D; color: #2D2D2D;
margin:16upx 0; font-size: 28upx;
} }
.subTitle{
font-size: 24upx; .qujian {
font-family: PingFang SC, PingFang SC; width: 100%;
font-weight: 400; display: flex;
color: #8A8A8A; align-items: center;
width: 75%;
text-align: center;
} }
} }
} }
.formContent{
margin:0 30upx; .remarkInput {
background-color: #fff; width: 100%;
border-radius: 14upx; height: 246upx;
margin-top:20upx; background: #F7F8FA;
padding:0 38upx; border-radius: 3px 3px 3px 3px;
padding-bottom: 64upx; opacity: 1;
::v-deep .u-form-item--left{ padding: 20upx !important;
align-items: flex-start;
}
::v-deep .u-form-item--left__content__label{
color: #2D2D2D;
font-size: 28upx;
}
.qujian{
width: 100%;
display: flex;
align-items: center;
}
} }
}
.remarkInput{ .submitBtn {
width: 100%; height: 88upx;
height: 246upx; margin: 64upx 0;
background: #F7F8FA; margin-bottom: 0;
border-radius: 3px 3px 3px 3px; line-height: 88upx;
opacity: 1; // background: #FFAAA4;
padding:20upx !important; background: #FE483B;
} border-radius: 36px 36px 36px 36px;
.submitBtn{ opacity: 1;
height: 88upx; font-size: 28upx;
margin:64upx 0;
margin-bottom: 0;
line-height: 88upx;
// background: #FFAAA4;
background: #FE483B;
border-radius: 36px 36px 36px 36px;
opacity: 1;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
text-align: center;
}
.navBarContent{
height:88upx;
line-height: 88upx;
text-align: center;
position: relative;
text{
font-size: 32upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
text-align: center;
}
.navBarContent {
height: 88upx;
line-height: 88upx;
text-align: center;
position: relative;
text {
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
}
.bgImg {
width: 100%;
} }
}
.bgImg{
width: 100%;
}
</style> </style>

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<view > <view>
<u-navbar title="" :background="background"></u-navbar> <u-navbar title="" :background="background"></u-navbar>
</view> </view>
<view class="section_1"> <view class="section_1">
<view class="box_1"> <view class="box_1">
@ -29,18 +29,22 @@
<image src="/static/user/code.png" class="thumbnail_2"></image> <image src="/static/user/code.png" class="thumbnail_2"></image>
<text lines="1" class="text_3">会员码</text> <text lines="1" class="text_3">会员码</text>
</view> </view>
<view class="group_5" v-if="userInfo.user_type!=20&&userInfo.user_type!=10" @click="lookMemberCode('3')"> <view class="group_5" v-if="userInfo.user_type!=20&&userInfo.user_type!=10"
@click="lookMemberCode('3')">
<image src="/static/user/code.png" class="thumbnail_3"></image> <image src="/static/user/code.png" class="thumbnail_3"></image>
<text lines="1" class="text_4">分销码</text> <text lines="1" class="text_4">分销码</text>
</view> </view>
</view> </view>
<!-- <view class="plus" v-if="userType!=3&&userType!=1" @click="goMember"> <view class="plus" v-if="userInfo.user_type!=40&&userInfo.user_type!=10&&userInfo.effective_time"
@click="goMember(userInfo.user_type==20?'hy':'fx')">
<view class="plusLeft"> <view class="plusLeft">
<view class="leftTop"> <view class="leftTop">
Plus会员 <text v-if="userInfo.user_type==20">Plus</text>
<text v-if="userInfo.user_type==30">分销</text>
会员
</view> </view>
<view class="leftBottom"> <view class="leftBottom">
2026.7.20到期 {{userInfo.effective_time}}到期
</view> </view>
</view> </view>
<view class="plusLine"> <view class="plusLine">
@ -54,9 +58,10 @@
兑换好物别浪费 兑换好物别浪费
</view> </view>
</view> </view>
</view> --> </view>
<view class="newplus" v-if="userInfo.user_type!=30&&userInfo.user_type!=40"> <!-- v-if="userInfo.user_type!=30&&userInfo.user_type!=40" -->
<view class="memVip" @click="goMember"> <view class="newplus" v-if="userInfo.effective_time==''">
<view class="memVip" @click="goMember('hy')">
<view class="vipLine"> <view class="vipLine">
<image src="/static/user/vip.png" mode="" class="vipIcon"></image> <image src="/static/user/vip.png" mode="" class="vipIcon"></image>
<text>Plus会员</text> <text>Plus会员</text>
@ -67,7 +72,7 @@
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="memVip fxVip"> <view class="memVip fxVip" @click="goMember('fx')">
<view class="vipLine"> <view class="vipLine">
<image src="/static/user/vip.png" mode="" class="vipIcon"></image> <image src="/static/user/vip.png" mode="" class="vipIcon"></image>
<text>分销会员</text> <text>分销会员</text>
@ -361,7 +366,8 @@
</view> </view>
</view> </view>
<view class="serveIcon"> <view class="serveIcon">
<image src="/static/user/complaint.png" mode="" class="icons" @click="goPage('/pages/news1/feedback')"></image> <image src="/static/user/complaint.png" mode="" class="icons"
@click="goPage('/pages/news1/feedback')"></image>
<view class="serveInfo"> <view class="serveInfo">
投诉 投诉
</view> </view>
@ -396,7 +402,8 @@
会员管理 会员管理
</view> </view>
</view> </view>
<view class="serveIcon" @click="goPage('/pages/news1/jinqun')" v-if="userInfo.user_type!=10&&userInfo.user_type!=20"> <view class="serveIcon" @click="goPage('/pages/news1/jinqun')"
v-if="userInfo.user_type!=10&&userInfo.user_type!=20">
<image src="/static/user/help.png" mode="" class="icons"></image> <image src="/static/user/help.png" mode="" class="icons"></image>
<view class="serveInfo"> <view class="serveInfo">
进群有礼 进群有礼
@ -459,14 +466,14 @@
data() { data() {
return { return {
background: { background: {
background: 'url('+ img+') center top no-repeat', background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100% auto', backgroundSize: '100% auto',
}, },
userType: 2, userType: 2,
memberCode: false, memberCode: false,
isLogin: false, isLogin: false,
userInfo: { userInfo: {
user_type:40 user_type: 40
}, },
} }
}, },
@ -477,7 +484,7 @@
// //
onRefreshPage() { onRefreshPage() {
this.isLogin = checkLogin() this.isLogin = checkLogin()
console.log(this.isLogin,'是否登录') console.log(this.isLogin, '是否登录')
// //
this.getUserInfo() this.getUserInfo()
}, },
@ -508,9 +515,9 @@
url: '/pages/login/index' url: '/pages/login/index'
}) })
}, },
goMember() { goMember(type) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/member/index' url: '/pages/member/index?type=' + type
}) })
}, },
goOrder() { goOrder() {
@ -587,6 +594,7 @@
.image_2 { .image_2 {
width: 114rpx; width: 114rpx;
height: 114rpx; height: 114rpx;
border-radius: 50%;
} }
.group_1 { .group_1 {
@ -634,7 +642,7 @@
margin-top: 2rpx; margin-top: 2rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 126rpx; width: 100rpx;
} }
.text_1 { .text_1 {
@ -771,7 +779,7 @@
} }
.leftBottom { .leftBottom {
width: 162rpx; // width: 162rpx;
height: 34rpx; height: 34rpx;
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;

Loading…
Cancel
Save