Browse Source

对接登录

master
前端-胡立永 8 months ago
parent
commit
68855df7e5
7 changed files with 178 additions and 24 deletions
  1. +25
    -5
      api/api.js
  2. +2
    -0
      pages_order/center/addressListManage.vue
  3. +85
    -13
      pages_order/order/offerOrBillLading.vue
  4. +35
    -4
      pages_order/tradingPlatform/nowOrder.vue
  5. +22
    -0
      uni.scss
  6. +2
    -2
      uni_modules/uv-number-box/components/uv-number-box/props.js
  7. +7
    -0
      utils/oss-upload/oss/index.js

+ 25
- 5
api/api.js View File

@ -45,28 +45,36 @@ const config = {
loginUser: { loginUser: {
url: '/alUser/login', url: '/alUser/login',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
//用户注册 //用户注册
registerUser: { registerUser: {
url: '/alUser/regUesr', url: '/alUser/regUesr',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 发送短信接口 // 发送短信接口
sendSms: { sendSms: {
url: '/alUser/sendSms', url: '/alUser/sendSms',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 选择身份 // 选择身份
roleOption: { roleOption: {
url: '/alUser/role', url: '/alUser/role',
method: 'POST', method: 'POST',
limit : 1000, limit : 1000,
showLoading: true,
}, },
// 忘记密码 // 忘记密码
newPassword: { newPassword: {
url: '/alUser/newPassword', url: '/alUser/newPassword',
method: 'POST', method: 'POST',
limit : 1000, limit : 1000,
showLoading: true,
}, },
// ========================产品报价=============================== // ========================产品报价===============================
@ -75,21 +83,28 @@ const config = {
url: '/product/addCustoms', url: '/product/addCustoms',
method: 'POST', method: 'POST',
limit : 1000, limit : 1000,
showLoading: true,
}, },
// 产品报价 // 产品报价
addProduct: { addProduct: {
url: '/product/addProduct', url: '/product/addProduct',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 下订单 // 下订单
addProductOrder: { addProductOrder: {
url: '/product/addProductOrder', url: '/product/addProductOrder',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 确认-取消订单 // 确认-取消订单
updateOrder: { updateOrder: {
url: '/product/updateOrder', url: '/product/updateOrder',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 我的挂单列表 // 我的挂单列表
getMyProductlist: { getMyProductlist: {
@ -100,6 +115,8 @@ const config = {
noShow: { noShow: {
url: '/product/noShow', url: '/product/noShow',
method: 'GET', method: 'GET',
limit: 500,
showLoading: true,
}, },
// 现货/期货列表 // 现货/期货列表
productList: { productList: {
@ -116,16 +133,22 @@ const config = {
addAddress: { addAddress: {
url: '/address/add', url: '/address/add',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 用户地址表-编辑 // 用户地址表-编辑
editAddress: { editAddress: {
url: '/address/edit', url: '/address/edit',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 用户地址表-删除 // 用户地址表-删除
deleteAddress: { deleteAddress: {
url: '/address/edit', url: '/address/edit',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 用户地址表-分页列表查询 // 用户地址表-分页列表查询
addressList: { addressList: {
@ -137,6 +160,8 @@ const config = {
addSuggest: { addSuggest: {
url: '/index/addSuggest', url: '/index/addSuggest',
method: 'POST', method: 'POST',
limit: 500,
showLoading: true,
}, },
// 铝价接口 // 铝价接口
getAlPrice: { getAlPrice: {
@ -147,31 +172,26 @@ const config = {
getImagePhoneOther: { getImagePhoneOther: {
url: '/index/index', url: '/index/index',
method: 'POST', method: 'POST',
limit: 500,
}, },
// 我的订单列表 // 我的订单列表
myOrderlist: { myOrderlist: {
url: '/product/myOrderlist', url: '/product/myOrderlist',
method: 'GET', method: 'GET',
limit: 500,
}, },
// 采购商根据订单id查询订单信息 // 采购商根据订单id查询订单信息
getMyOrderInfo: { getMyOrderInfo: {
url: '/product/myOrderlist', url: '/product/myOrderlist',
method: 'GET', method: 'GET',
limit: 500,
}, },
// 供应商根据挂单id查询挂单详情的接口 // 供应商根据挂单id查询挂单详情的接口
getProductInfo: { getProductInfo: {
url: '/product/myOrderlist', url: '/product/myOrderlist',
method: 'GET', method: 'GET',
limit: 500,
}, },
// 获取banner列表 // 获取banner列表
bannerList: { bannerList: {
url: '/index/bannerList', url: '/index/bannerList',
method: 'POST', method: 'POST',
limit: 500,
}, },


+ 2
- 0
pages_order/center/addressListManage.vue View File

@ -82,6 +82,8 @@
if (addressDetail.id) { if (addressDetail.id) {
data.id = addressDetail.id data.id = addressDetail.id
}else{
// data.defaultFlag = 1
} }
this.$api(data.id ? 'editAddress' : 'addAddress', data, res => { this.$api(data.id ? 'editAddress' : 'addAddress', data, res => {


+ 85
- 13
pages_order/order/offerOrBillLading.vue View File

@ -37,7 +37,7 @@
<!--商品详情--> <!--商品详情-->
<view class="item"> <view class="item">
<view>商品内容</view>
<view>详情图片</view>
<view class=""> <view class="">
<uv-upload <uv-upload
:fileList="contentFileList" :fileList="contentFileList"
@ -51,6 +51,22 @@
:previewFullImage="true"></uv-upload> :previewFullImage="true"></uv-upload>
</view> </view>
</view> </view>
<view class="item">
<view>详情视频</view>
<view class="">
<uv-upload
:fileList="contentFileVideoList"
:maxCount="3"
multiple
accept="video"
width="150rpx"
height="150rpx"
name="contentFileVideoList"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true"></uv-upload>
</view>
</view>
<!--商品规格--> <!--商品规格-->
<view class="item" <view class="item"
@ -106,7 +122,8 @@
</view> </view>
</view> </view>
<view class="item">
<view class="item"
@click="$refs.startDateRef.open()">
<view>{{ $t('components.deliveryDate') }}</view> <view>{{ $t('components.deliveryDate') }}</view>
<view> <view>
{{ form.transactionTime }} {{ form.transactionTime }}
@ -132,7 +149,9 @@
<view class="item"> <view class="item">
<view>{{ $t('components.unitPrice') }}</view> <view>{{ $t('components.unitPrice') }}</view>
<view> <view>
<input v-model="form.price" clearable></input>
<input v-model="form.price" clearable
class="input-color"
placeholder="请输入单价"></input>
</view> </view>
</view> </view>
@ -152,6 +171,22 @@
:previewFullImage="true"></uv-upload> :previewFullImage="true"></uv-upload>
</view> </view>
</view> </view>
<view class="item">
<view>检测视频</view>
<view class="">
<uv-upload
:fileList="reportFileVideoList"
:maxCount="3"
multiple
accept="video"
width="150rpx"
height="150rpx"
name="reportFileVideoList"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true"></uv-upload>
</view>
</view>
<!--提交报价和提交审核--> <!--提交报价和提交审核-->
<view class="btns"> <view class="btns">
@ -174,6 +209,10 @@
<!-- 地址选择弹框 --> <!-- 地址选择弹框 -->
<uv-popup ref="addressPopup" :round="30"> <uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" /> <addressList ref="addressList" height="60vh" @select="selectAddress" />
<view class="uni-color-btn"
@click="toAddress">
添加地址
</view>
</uv-popup> </uv-popup>
<uv-picker ref="unitListPicker" <uv-picker ref="unitListPicker"
@ -215,7 +254,7 @@
form: { form: {
"addressId": "", "addressId": "",
"num": 1, "num": 1,
"price": 0,
"price": '',
"transactionTime": dayjs(new Date()).format("YYYY-MM-DD") "transactionTime": dayjs(new Date()).format("YYYY-MM-DD")
}, },
address: { address: {
@ -225,7 +264,9 @@
addressTotal: 0, addressTotal: 0,
fileList : [],// fileList : [],//
reportFileList : [],// reportFileList : [],//
reportFileVideoList : [],//
contentFileList : [],// contentFileList : [],//
contentFileVideoList : [],//
unitList : [],// unitList : [],//
unit : {// unit : {//
specsName : '请选择规格' specsName : '请选择规格'
@ -234,8 +275,24 @@
}, },
onShow() { onShow() {
this.getUnitList() this.getUnitList()
this.getAddressDefault()
},
onLoad() {
}, },
methods: { methods: {
//
getAddressDefault() {
return new Promise((success, fail) => {
this.$api('addressList', {
pageNo: 1,
pageSize: 1,
}, res => {
if (res.code == 200) {
this.address = res.result.records[0];
}
})
})
},
// //
getUnitList(){ getUnitList(){
@ -244,24 +301,28 @@
pageSize : 9999999, pageSize : 9999999,
}, res => { }, res => {
if(res.code == 200){ if(res.code == 200){
this.unitList.push(res.result.records)
this.unitList = [res.result.records]
} }
}) })
}, },
// //
getAddressListA() {
getAddressList() {
this.$refs.addressList this.$refs.addressList
.getAddressList() .getAddressList()
.then(res => { .then(res => {
if (res.total == 0) { if (res.total == 0) {
this.$refs.addressPopup.close()
return uni.navigateTo({
url: '/pages_order/center/addressListManage?type=back'
})
this.toAddress()
} }
}) })
}, },
//
toAddress(){
this.$refs.addressPopup.close()
return uni.navigateTo({
url: '/pages_order/center/addressListManage?type=back'
})
},
// / // /
confirmBtn() { confirmBtn() {
@ -270,13 +331,20 @@
this.form.addressId = this.address.id this.form.addressId = this.address.id
this.form.specsId = this.unit.id this.form.specsId = this.unit.id
//
this.form.pic = this.fileList.map(n => n.url).join(',') this.form.pic = this.fileList.map(n => n.url).join(',')
//
this.form.report = this.reportFileList.map(n => n.url).join(',') this.form.report = this.reportFileList.map(n => n.url).join(',')
//
this.form.reportVideo = this.reportFileVideoList.map(n => n.url).join(',')
// -
this.form.picDetail = this.contentFileList.map(n => n.url).join(',') this.form.picDetail = this.contentFileList.map(n => n.url).join(',')
// -
this.form.video = this.contentFileVideoList.map(n => n.url).join(',')
if (this.$utils.verificationAll(this.form, { if (this.$utils.verificationAll(this.form, {
"pic": '请上传主图', "pic": '请上传主图',
"picDetail": '请上传内容图片',
// "picDetail": '',
specsId : "请选择规格", specsId : "请选择规格",
"addressId": '请选择提货地点', "addressId": '请选择提货地点',
"num": '请选择吨数', "num": '请选择吨数',
@ -311,7 +379,7 @@
// this.getAddressList() // this.getAddressList()
this.$nextTick(() => { this.$nextTick(() => {
this.getAddressListA()
this.getAddressList()
}) })
}, },
// //
@ -521,7 +589,7 @@
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
input { input {
background-color: #FFF;
background-color: #00000011;
font-size: 28rpx; font-size: 28rpx;
padding: 16rpx 8rpx 16rpx 15rpx; padding: 16rpx 8rpx 16rpx 15rpx;
} }
@ -530,5 +598,9 @@
} }
} }
// .input-color{
// padding: 20rpx;
// border-radius: 20rpx;
// }
} }
</style> </style>

+ 35
- 4
pages_order/tradingPlatform/nowOrder.vue View File

@ -23,8 +23,19 @@
v-if="fatherData.picDetail"> v-if="fatherData.picDetail">
<view>详情图</view> <view>详情图</view>
<view> <view>
<uv-album :urls="fatherData.picDetail &&
fatherData.picDetail.split(',')"></uv-album>
<uv-album :urls="fatherData.picDetail.split(',')"></uv-album>
</view>
</view>
<!--详情视频-->
<view class="item"
v-if="fatherData.video">
<view>详情视频</view>
<view class="list-video">
<view class="video"
:key="index"
v-for="(item, index) in fatherData.video.split(',')">
<video :src="item"></video>
</view>
</view> </view>
</view> </view>
@ -33,8 +44,19 @@
v-if="fatherData.report"> v-if="fatherData.report">
<view>检测报告</view> <view>检测报告</view>
<view> <view>
<uv-album :urls="fatherData.report &&
fatherData.report.split(',')"></uv-album>
<uv-album :urls="fatherData.report.split(',')"></uv-album>
</view>
</view>
<!--检测视频-->
<view class="item"
v-if="fatherData.video">
<view>检测视频</view>
<view class="list-video">
<view class="video"
:key="index"
v-for="(item, index) in fatherData.video.split(',')">
<video :src="item"></video>
</view>
</view> </view>
</view> </view>
@ -471,6 +493,15 @@
padding: 16rpx 8rpx 16rpx 15rpx; padding: 16rpx 8rpx 16rpx 15rpx;
} }
} }
.list-video{
display: flex;
flex-wrap: wrap;
video{
width: 480rpx;
height: 270rpx;
}
}
} }
.performanceBond { .performanceBond {


+ 22
- 0
uni.scss View File

@ -74,3 +74,25 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px; $uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px; $uni-font-size-paragraph:15px;
.uni-color-btn{
border-radius: 40rpx;
padding: 20rpx;
margin: 40rpx;
background: $uni-color;
color: #fff;
text-align: center;
font-size: 28rpx;
}
.uni-uncolor-btn{
border-radius: 40rpx;
padding: 20rpx;
margin: 40rpx;
border: 1px solid $uni-color;
color: $uni-color;
text-align: center;
font-size: 28rpx;
}

+ 2
- 2
uni_modules/uv-number-box/components/uv-number-box/props.js View File

@ -51,7 +51,7 @@ export default {
// 输入框宽度,单位为px // 输入框宽度,单位为px
inputWidth: { inputWidth: {
type: [String, Number], type: [String, Number],
default: 35
default: 160
}, },
// 是否显示减少按钮 // 是否显示减少按钮
showMinus: { showMinus: {
@ -81,7 +81,7 @@ export default {
// 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致 // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
buttonSize: { buttonSize: {
type: [String, Number], type: [String, Number],
default: 30
default: 60
}, },
// 输入框和按钮的背景颜色 // 输入框和按钮的背景颜色
bgColor: { bgColor: {


+ 7
- 0
utils/oss-upload/oss/index.js View File

@ -44,6 +44,11 @@ function storeFolder() {
*/ */
export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) { export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.showLoading({
title: '上传中...'
})
if (folder && folder?.length > 0) { if (folder && folder?.length > 0) {
if (folder[0] == "/") folder = folder.slice(1, folder.length) if (folder[0] == "/") folder = folder.slice(1, folder.length)
if (folder[folder.length - 1] != "/") folder += "/" if (folder[folder.length - 1] != "/") folder += "/"
@ -63,6 +68,7 @@ export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
signature: OSSConfig.signature, signature: OSSConfig.signature,
}, },
success(res) { success(res) {
uni.hideLoading()
if (res.errMsg.includes("uploadFile:ok")) { if (res.errMsg.includes("uploadFile:ok")) {
resolve(ossConfig.aliOss.url + key) resolve(ossConfig.aliOss.url + key)
} else { } else {
@ -70,6 +76,7 @@ export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
} }
}, },
fail(err) { fail(err) {
uni.hideLoading()
reject(err) reject(err)
} }
} }


Loading…
Cancel
Save