Browse Source

上传

master
前端-胡立永 5 months ago
parent
commit
163e5cd2f4
11 changed files with 157 additions and 61 deletions
  1. +16
    -0
      api/api.js
  2. +3
    -0
      components/config/configPopup.vue
  3. +21
    -6
      config.js
  4. +18
    -0
      mixins/order.js
  5. +1
    -1
      pages/index/index.vue
  6. +10
    -0
      pages/index/order.vue
  7. +8
    -1
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  8. +29
    -3
      pages_order/components/commodity/commoditySelect.vue
  9. +39
    -42
      pages_order/mine/updateUserInfo.vue
  10. +10
    -3
      pages_order/order/applyLaundryStore.vue
  11. +2
    -5
      pages_order/order/refundsOrExchange.vue

+ 16
- 0
api/api.js View File

@ -221,6 +221,14 @@ const config = {
// showLoading : true,
auth: true,
},
// 修改店铺信息
shopEditInfo: {
url: '/shop/edit/info',
method: 'POST',
showLoading : true,
auth: true,
},
// 获取绑定店铺的数据
bindShop: {
url: '/shop/bind',
@ -250,6 +258,14 @@ const config = {
limit: 500,
auth: true,
},
// 取消订单
orderCancel: {
url: '/order/cancel',
method: 'POST',
showLoading : true,
limit: 500,
auth: true,
},
// 商品租赁订单支付
orderPay: {


+ 3
- 0
components/config/configPopup.vue View File

@ -40,6 +40,9 @@
.configPopup {
.content{
padding: 30rpx 20rpx;
overflow: scroll;
height: 100%;
box-sizing: border-box;
}
}
</style>

+ 21
- 6
config.js View File

@ -24,18 +24,33 @@ const config = {
const defaultConfig = {
// 生产环境地图XHJBZ-JNL3U-LOHVO-G5LSQ-SPQ4S-AWFN4
mapKey : 'XHJBZ-JNL3U-LOHVO-G5LSQ-SPQ4S-AWFN4',//已改成生产环境
// aliOss : {
// url : 'https://tennis-oss.xzaiyp.top/',
// config : {
// //桶的地址
// region: 'oss-cn-guangzhou',
// //id
// accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
// //密钥
// accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
// //桶的名字
// bucket: 'zhuoqiu-image',
// endpoint:'oss-cn-guangzhou.aliyuncs.com',
// }
// },
aliOss : {
url : 'https://tennis-oss.xzaiyp.top/',
url : 'https://buzhoudao.java996.icu/',
config : {
//桶的地址
region: 'oss-cn-guangzhou',
region: 'oss-rg-china-mainland',
//id
accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
accessKeyId:'LTAI5tK9V9BxeSmLLb5gzmuU',
//密钥
accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
accessKeySecret:'ADo0WcBfOkeBX6SPAKT5yURvHeBq8T',
//桶的名字
bucket: 'zhuoqiu-image',
endpoint:'oss-cn-guangzhou.aliyuncs.com',
bucket: 'buzhoudao',
endpoint:'oss-rg-china-mainland.aliyuncs.com',
}
},
}


+ 18
- 0
mixins/order.js View File

@ -34,6 +34,24 @@ export default {
}
})
},
// 酒店取消订单
orderCancel(item){
let self = this
uni.showModal({
title: '您确认取消吗?',
success(res) {
if (res.confirm) {
self.$api('orderCancel', {
id: item.id
}, res => {
if (res.code == 200) {
self.getData()
}
})
}
}
})
},
// 确认收货
confirmReceiveGoods(item) {
let self = this


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

@ -210,7 +210,7 @@
noticeList(){
this.$api('noticeList', res => {
if(res.code == 200){
this.notice = res.result.content
this.notice = res.result && res.result.content
}
})
},


+ 10
- 0
pages/index/order.vue View File

@ -163,6 +163,16 @@
</view>
<!-- 取消订单 -->
<view class="">
<view
@click.stop="orderCancel(item)" class="b1"
v-if="[0, 3].includes(item.status)">
取消订单
</view>
</view>
<!-- 待支付 -->
<view class="">
<view


+ 8
- 1
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -150,12 +150,19 @@
}
if(this.$utils.verificationAll(this.form, {
account: '请输入账号',
account: '请输入账号/手机号',
password: '请输入密码',
})){
return
}
if(!this.$utils.verificationPhone(this.form.account)){
return uni.showToast({
title: '手机号格式不正确',
icon:'none'
})
}
this.$store.commit('accountLogin', this.form)
},
//


+ 29
- 3
pages_order/components/commodity/commoditySelect.vue View File

@ -5,13 +5,13 @@
<view class="itme1" @click="selectSp(item)">
<view class="left">
<image :src="item.goodsPic || 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'" mode="aspectFill"/>
<view class="imageTag" v-if="item.statusInfo">
{{ item.statusInfo }}
</view>
</view>
<view class="center">
<view>
{{ item.goodsName }}
<!-- <view class="leaseFlag" v-if="item.leaseFlag">
</view> -->
</view>
<view>规格:{{ item.sku }}</view>
<view>下单时间:{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}</view>
@ -32,7 +32,9 @@
</template>
<script>
import leaseMixins from '@/mixins/lease.js'
export default {
mixins : [leaseMixins],
props: {
height: {
default: 'calc(90vh - 180rpx)'
@ -57,6 +59,12 @@
methods: {
//
selectSp(e) {
if(e.statusInfo){
return uni.showToast({
title: '该物品' + e.statusInfo,
icon: 'none',
})
}
this.$emit('selectSp', e)
},
//
@ -72,6 +80,12 @@
this.$api('getLeasePage', queryParams, res => {
if (res.code == 200) {
this.commodityList = res.result.records || [];
this.commodityList.forEach(n => {
n.statusInfo = this.isLeaseStatus(n)
})
this.total = res.result.total || 0;
success(res.result)
}
@ -104,11 +118,23 @@
border-radius: 20rpx;
background-color: #ffffff;
flex-shrink: 0;
position: relative;
image{
width: 100%;
height: 100%;
border-radius: 20rpx;
}
.imageTag{
position: absolute;
bottom: 0;
left: 0;
font-size: 22rpx;
color: #fff;
background-color: rgba(#000, 0.5);
padding: 20rpx 0;
width: 100%;
text-align: center;
}
}
.center {


+ 39
- 42
pages_order/mine/updateUserInfo.vue View File

@ -17,22 +17,14 @@
</button>
</view>
<view class="item">
<view class="label">昵称</view>
<view class="label">{{ userShop ? '店铺名称' : '昵称' }}</view>
<view class="value">
<input type="nickname" placeholder="请输入昵称" style="text-align: right;" id="nickName"
<input type="nickname" :placeholder="'请输入' + (userShop ? '店铺名称' : '昵称') " style="text-align: right;" id="nickName"
v-model="form.nickName" />
</view>
</view>
<!-- <view class="item" @click="sexChange">
<view class="label">性别</view>
<view>{{form.sex}}</view>
</view> -->
<!-- <view class="item">
<view class="label">联系方式</view>
<view class="value">
<uv-input v-model="form.phone" placeholder="联系方式" border="bottom" clearable></uv-input>
</view>
</view> -->
</view>
<!-- ActionSheet 操作菜单 -->
@ -49,39 +41,29 @@
<script>
import {
mapState,
mapGetters,
} from 'vuex'
export default {
computed: {
...mapState(['userInfo']),
...mapGetters(['userShop']),
},
data() {
return {
form: {
sex: '',
nickName: '1',
phone: '',
headImage: '',
},
// itemUserImage: userInfo.headImage,
fileList: [],
sexList: [{
name: '男',
value: 1
},
{
name: '女',
value: 0
},
],
}
},
onLoad() {
this.form.phone = this.userInfo.phone
this.form.headImage = this.userInfo.headImage
this.form.nickName = this.userInfo.nickName
this.form.sex = this.userInfo.sex
if (this.userInfo.sex == '' || this.userInfo.sex == null) {
this.form.sex = '未知'
if(this.userShop){
this.form.headImage = this.userInfo.shop.pic
this.form.nickName = this.userInfo.shop.name
}else{
this.form.headImage = this.userInfo.headImage
this.form.nickName = this.userInfo.nickName
}
},
methods: {
@ -110,21 +92,36 @@
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称'
nickName: '请填写' + (this.userShop ? '店铺名称' : '昵称')
})) {
return
}
self.$api('updateInfo', {
headImg : self.form.headImage,
nickname : self.form.nickName,
}, res => {
if (res.code == 200) {
uni.redirectTo({
url: '/pages/index/center'
})
}
})
if(this.userShop){
self.$api('shopEditInfo', {
pic : self.form.headImage,
name : self.form.nickName,
}, res => {
if (res.code == 200) {
uni.reLaunch({
url: '/pages/index/center'
})
}
})
}else{
self.$api('updateInfo', {
headImg : self.form.headImage,
nickname : self.form.nickName,
}, res => {
if (res.code == 200) {
uni.reLaunch({
url: '/pages/index/center'
})
}
})
}
})
},


+ 10
- 3
pages_order/order/applyLaundryStore.vue View File

@ -32,9 +32,9 @@
</view>
</view>
<view class="shopName">
<view>联系方式</view>
<view>联系电话</view>
<view>
<input v-model="form.phone" type="number" placeholder="请输入联系方式" clearable></input>
<input v-model="form.phone" type="number" placeholder="请输入联系电话" clearable></input>
</view>
</view>
<view class="shopName">
@ -138,7 +138,7 @@
pic: '请上传店铺照片',
name: '请输入店铺名称',
userName: '请输入您的姓名',
phone: '请输入联系方式',
phone: '请输入联系电话',
currentRegion: '请选择所在地区',
address: '请输入详细地址',
password : '请设置密码',
@ -146,6 +146,13 @@
return
}
if(!this.$utils.verificationPhone(this.form.phone)){
return uni.showToast({
title: '手机号格式不正确',
icon:'none'
})
}
this.form.address = this.form.currentRegion + this.form.address
this.$api('applyShopHotel', this.form, res => {
if (res.code == 200) {


+ 2
- 5
pages_order/order/refundsOrExchange.vue View File

@ -224,11 +224,7 @@
icon: "success",
title: "申请成功"
})
setTimeout(() => {
uni.navigateTo({
url: '/pages/index/center'
})
}, 3000)
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
@ -239,6 +235,7 @@
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
console.log(url);
self.fileList.push({
url
})


Loading…
Cancel
Save