Browse Source

对接登录

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


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

@ -82,6 +82,8 @@
if (addressDetail.id) {
data.id = addressDetail.id
}else{
// data.defaultFlag = 1
}
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>商品内容</view>
<view>详情图片</view>
<view class="">
<uv-upload
:fileList="contentFileList"
@ -51,6 +51,22 @@
:previewFullImage="true"></uv-upload>
</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"
@ -106,7 +122,8 @@
</view>
</view>
<view class="item">
<view class="item"
@click="$refs.startDateRef.open()">
<view>{{ $t('components.deliveryDate') }}</view>
<view>
{{ form.transactionTime }}
@ -132,7 +149,9 @@
<view class="item">
<view>{{ $t('components.unitPrice') }}</view>
<view>
<input v-model="form.price" clearable></input>
<input v-model="form.price" clearable
class="input-color"
placeholder="请输入单价"></input>
</view>
</view>
@ -152,6 +171,22 @@
:previewFullImage="true"></uv-upload>
</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">
@ -174,6 +209,10 @@
<!-- 地址选择弹框 -->
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
<view class="uni-color-btn"
@click="toAddress">
添加地址
</view>
</uv-popup>
<uv-picker ref="unitListPicker"
@ -215,7 +254,7 @@
form: {
"addressId": "",
"num": 1,
"price": 0,
"price": '',
"transactionTime": dayjs(new Date()).format("YYYY-MM-DD")
},
address: {
@ -225,7 +264,9 @@
addressTotal: 0,
fileList : [],//
reportFileList : [],//
reportFileVideoList : [],//
contentFileList : [],//
contentFileVideoList : [],//
unitList : [],//
unit : {//
specsName : '请选择规格'
@ -234,8 +275,24 @@
},
onShow() {
this.getUnitList()
this.getAddressDefault()
},
onLoad() {
},
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(){
@ -244,24 +301,28 @@
pageSize : 9999999,
}, res => {
if(res.code == 200){
this.unitList.push(res.result.records)
this.unitList = [res.result.records]
}
})
},
//
getAddressListA() {
getAddressList() {
this.$refs.addressList
.getAddressList()
.then(res => {
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() {
@ -270,13 +331,20 @@
this.form.addressId = this.address.id
this.form.specsId = this.unit.id
//
this.form.pic = this.fileList.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.video = this.contentFileVideoList.map(n => n.url).join(',')
if (this.$utils.verificationAll(this.form, {
"pic": '请上传主图',
"picDetail": '请上传内容图片',
// "picDetail": '',
specsId : "请选择规格",
"addressId": '请选择提货地点',
"num": '请选择吨数',
@ -311,7 +379,7 @@
// this.getAddressList()
this.$nextTick(() => {
this.getAddressListA()
this.getAddressList()
})
},
//
@ -521,7 +589,7 @@
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #FFF;
background-color: #00000011;
font-size: 28rpx;
padding: 16rpx 8rpx 16rpx 15rpx;
}
@ -530,5 +598,9 @@
}
}
// .input-color{
// padding: 20rpx;
// border-radius: 20rpx;
// }
}
</style>

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

@ -23,8 +23,19 @@
v-if="fatherData.picDetail">
<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>
@ -33,8 +44,19 @@
v-if="fatherData.report">
<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>
@ -471,6 +493,15 @@
padding: 16rpx 8rpx 16rpx 15rpx;
}
}
.list-video{
display: flex;
flex-wrap: wrap;
video{
width: 480rpx;
height: 270rpx;
}
}
}
.performanceBond {


+ 22
- 0
uni.scss View File

@ -74,3 +74,25 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$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
inputWidth: {
type: [String, Number],
default: 35
default: 160
},
// 是否显示减少按钮
showMinus: {
@ -81,7 +81,7 @@ export default {
// 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
buttonSize: {
type: [String, Number],
default: 30
default: 60
},
// 输入框和按钮的背景颜色
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()) {
return new Promise((resolve, reject) => {
uni.showLoading({
title: '上传中...'
})
if (folder && folder?.length > 0) {
if (folder[0] == "/") folder = folder.slice(1, folder.length)
if (folder[folder.length - 1] != "/") folder += "/"
@ -63,6 +68,7 @@ export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
signature: OSSConfig.signature,
},
success(res) {
uni.hideLoading()
if (res.errMsg.includes("uploadFile:ok")) {
resolve(ossConfig.aliOss.url + key)
} else {
@ -70,6 +76,7 @@ export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
}
},
fail(err) {
uni.hideLoading()
reject(err)
}
}


Loading…
Cancel
Save