Browse Source

对接登录

master
前端-胡立永 7 months ago
parent
commit
cf46f82062
10 changed files with 921 additions and 823 deletions
  1. +2
    -0
      api/api.js
  2. +2
    -2
      components/config/customerServicePopup.vue
  3. +4
    -4
      pages/index/center2.vue
  4. +3
    -3
      pages/index/tradingPlatform.vue
  5. +1
    -1
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  6. +409
    -387
      pages_order/auth/registerShop.vue
  7. +87
    -80
      pages_order/auth/selectionIdentity.vue
  8. +231
    -213
      pages_order/center/helpFeedback.vue
  9. +172
    -130
      pages_order/center/systemSet.vue
  10. +10
    -3
      store/store.js

+ 2
- 0
api/api.js View File

@ -60,6 +60,7 @@ const config = {
roleOption: {
url: '/alUser/role',
method: 'POST',
limit : 1000,
},
// ========================产品报价===============================
@ -67,6 +68,7 @@ const config = {
addCustoms: {
url: '/product/addCustoms',
method: 'POST',
limit : 1000,
},
// 产品报价
addProduct: {


+ 2
- 2
components/config/customerServicePopup.vue View File

@ -65,8 +65,8 @@
},
methods: {
getCustomPhone(){
this.$api('getImagePhoneOther', {}, res => {
console.log(res)
this.$api('getImagePhoneOther', res => {
console.log(res)
this.phone = res.result.phone
})
},


+ 4
- 4
pages/index/center2.vue View File

@ -18,12 +18,12 @@
{{ $t('components.phoneNumber') }} {{userInfo.phone}}
</view>
</view>
<view class="headBtn" @click="headBtn">
<!-- <view class="headBtn" @click="headBtn">
{{ $t('components.roleSwitching') }}
</view>
<view class="setting">
</view> -->
<!-- <view class="setting">
<uv-icon name="setting" size="40rpx"></uv-icon>
</view>
</view> -->
</view>
<!-- 供应商 -->


+ 3
- 3
pages/index/tradingPlatform.vue View File

@ -75,10 +75,10 @@
},
onLoad() {
if(this.userShop){
// /
// /
this.mixinsListApi = 'productList'
}else{
//
//
this.mixinsListApi = 'productlist'
this.queryParams.productType = this.actionIndex
@ -98,6 +98,7 @@
<style scoped lang="scss">
.trading-platform {
background-image: url('../../static/image/index/1.png');
.frame {
display: flex;
@ -146,7 +147,6 @@
.purchaser {
height: 60%;
padding: 20rpx 0;
background-image: url('../../static/image/index/1.png');
color: #FFF;
font-size: 32rpx;


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

@ -123,7 +123,7 @@
titleList: ['注册', '登录', '重置密码'],
checkboxValue: [],
form: {
username: 'h',
username: 'h1',
password: 'l',
loginModel : 0,
captcha : '',


+ 409
- 387
pages_order/auth/registerShop.vue View File

@ -1,395 +1,417 @@
<template>
<view class="registerShop">
<navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack"/>
<view class="frame">
<!--基本信息-->
<view class="basicInfo">
<!--用户名-->
<view class="item">
<view>{{ $t('components.username')}}</view>
<view>
<input v-model="form.userName" :placeholder="$t('components.enterUserName')" clearable></input>
</view>
</view>
<!--密码-->
<view class="item">
<view>{{ $t('components.password')}}</view>
<view>
<input v-model="form.password" password clearable :placeholder="$t('components.enterYourPassword')" clearable></input>
</view>
</view>
<!--公司名称-->
<view class="item">
<view>{{ $t('other.companyName')}}</view>
<view>
<input v-model="form.companyName" type="number" :placeholder="$t('other.enterCompanyName')" clearable></input>
</view>
</view>
<!--税收编码-->
<view class="item">
<view>{{ $t('other.taxCode')}}</view>
<view>
<input v-model="form.taxCode" :placeholder="$t('other.enterTaxCode')" clearable></input>
</view>
</view>
<!--公司地址-->
<view class="item">
<view>{{ $t('other.companyAddress')}}</view>
<view>
<input v-model="form.address" :placeholder="$t('other.enterCompanyAddress')" clearable></input>
</view>
</view>
<!--联系电话-->
<view class="item">
<view>{{ $t('components.lxPhone')}}</view>
<view>
<input v-model="form.phone" :placeholder="$t('components.plePhoneNumber')" clearable></input>
</view>
</view>
<!---->
<view class="item">
<view>{{ $t('other.companyAccount')}}</view>
<view>
<input v-model="form.bankAccount" :placeholder="$t('other.enterCompanyAccount')" clearable></input>
</view>
</view>
<view class="item">
<view>{{ $t('components.bankName')}}</view>
<view>
<input v-model="form.bankNama" :placeholder="$t('components.enterBankName')" clearable></input>
</view>
</view>
</view>
<!--证件信息-->
<view class="certificateInfo">
<!--营业执照-->
<view class="certificateInfoItem">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>{{ $t('components.businessLicense')}}</span>
</view>
<view class="upload">
<uv-upload
:fileList="yyzzfileList"
:maxCount="4"
multiple
width="150rpx"
height="150rpx"
@delete="(file) => deleteImage(0, file)"
@afterRead="(file) => afterRead(0, file)"
:previewFullImage="true"></uv-upload>
</view>
</view>
<!--基本户信息-->
<view class="certificateInfoItem">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>{{ $t('components.basicAccountInfo')}}</span>
</view>
<view class="upload">
<uv-upload
:fileList="jbhxxfileList"
:maxCount="4"
multiple
width="150rpx"
height="150rpx"
@delete="(file) => deleteImage(1, file)"
@afterRead="(file) => afterRead(1, file)"
:previewFullImage="true"></uv-upload>
</view>
</view>
<!--收款银行-->
<view class="certificateInfoItem">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>{{ $t('components.receivingBank')}}</span>
</view>
<view class="upload">
<uv-upload
:fileList="skyhfileList"
:maxCount="4"
multiple
width="150rpx"
height="150rpx"
@delete="(file) => deleteImage(2, file)"
@afterRead="(file) => afterRead(2, file)"
:previewFullImage="true"></uv-upload>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="btns">
<!--申请审核-->
<span @click="applyReview" class="sqsh">
{{ $t('components.submitReview') }}
</span>
<!--联系我们-->
<span @click="contactUs" class="lxwm">
{{ $t('components.contactUs') }}
</span>
</view>
<view class="others">
<!--注册须知-->
<span @click="applyReview" class="zcxz">
{{ $t('components.registrationNotice') }}
</span>
<!--框架合同预览-->
<span @click="contactUs" class="kjhtyl">
{{ $t('other.frameworkContractPreview') }}
</span>
</view>
</view>
<!-- 联系客服弹框 -->
<customerServicePopup ref="customerServicePopup" />
</view>
<view class="registerShop">
<navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<!--基本信息-->
<view class="basicInfo">
<!--用户名-->
<view class="item">
<view>{{ $t('components.username')}}</view>
<view>
<input v-model="form.userName" :placeholder="$t('components.enterUserName')" clearable></input>
</view>
</view>
<!--密码-->
<view class="item">
<view>{{ $t('components.password')}}</view>
<view>
<input v-model="form.password" password clearable
:placeholder="$t('components.enterYourPassword')" clearable></input>
</view>
</view>
<!--公司名称-->
<view class="item">
<view>{{ $t('other.companyName')}}</view>
<view>
<input v-model="form.companyName" type="number" :placeholder="$t('other.enterCompanyName')"
clearable></input>
</view>
</view>
<!--税收编码-->
<view class="item">
<view>{{ $t('other.taxCode')}}</view>
<view>
<input v-model="form.taxCode" :placeholder="$t('other.enterTaxCode')" clearable></input>
</view>
</view>
<!--公司地址-->
<view class="item">
<view>{{ $t('other.companyAddress')}}</view>
<view>
<input v-model="form.address" :placeholder="$t('other.enterCompanyAddress')" clearable></input>
</view>
</view>
<!--联系电话-->
<view class="item">
<view>{{ $t('components.lxPhone')}}</view>
<view>
<input v-model="form.phone" :placeholder="$t('components.plePhoneNumber')" clearable></input>
</view>
</view>
<!---->
<view class="item">
<view>{{ $t('other.companyAccount')}}</view>
<view>
<input v-model="form.bankAccount" :placeholder="$t('other.enterCompanyAccount')"
clearable></input>
</view>
</view>
<view class="item">
<view>{{ $t('components.bankName')}}</view>
<view>
<input v-model="form.bankNama" :placeholder="$t('components.enterBankName')" clearable></input>
</view>
</view>
</view>
<!--证件信息-->
<view class="certificateInfo">
<!--营业执照-->
<view class="certificateInfoItem">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>{{ $t('components.businessLicense')}}</span>
</view>
<view class="upload">
<uv-upload :fileList="yyzzfileList" :maxCount="4" multiple width="150rpx" height="150rpx"
@delete="(file) => deleteImage(0, file)" @afterRead="(file) => afterRead(0, file)"
:previewFullImage="true"></uv-upload>
</view>
</view>
<!--基本户信息-->
<view class="certificateInfoItem">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>{{ $t('components.basicAccountInfo')}}</span>
</view>
<view class="upload">
<uv-upload :fileList="jbhxxfileList" :maxCount="4" multiple width="150rpx" height="150rpx"
@delete="(file) => deleteImage(1, file)" @afterRead="(file) => afterRead(1, file)"
:previewFullImage="true"></uv-upload>
</view>
</view>
<!--收款银行-->
<view class="certificateInfoItem">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>{{ $t('components.receivingBank')}}</span>
</view>
<view class="upload">
<uv-upload :fileList="skyhfileList" :maxCount="4" multiple width="150rpx" height="150rpx"
@delete="(file) => deleteImage(2, file)" @afterRead="(file) => afterRead(2, file)"
:previewFullImage="true"></uv-upload>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="btns">
<!--申请审核-->
<span @click="applyReview" class="sqsh">
{{ $t('components.submitReview') }}
</span>
<!--联系我们-->
<span @click="contactUs" class="lxwm">
{{ $t('components.contactUs') }}
</span>
</view>
<view class="others">
<!--注册须知-->
<span @click="applyReview" class="zcxz">
{{ $t('components.registrationNotice') }}
</span>
<!--框架合同预览-->
<span @click="contactUs" class="kjhtyl">
{{ $t('other.frameworkContractPreview') }}
</span>
</view>
</view>
<!-- 联系客服弹框 -->
<customerServicePopup ref="customerServicePopup" />
</view>
</template>
<script>
import customerServicePopup from "@/components/config/customerServicePopup.vue";
export default {
components: {customerServicePopup},
onLoad(option) {
this.titleIndex = option.identity
},
data() {
return {
titleIndex: 0,
titleList: [
//
this.$t('other.buyerRegistration'),
this.$t('other.supplierRegistration'),
this.$t('other.domesticCustomsClearanceApplication')
],
form: {
"address": "",
"auditStatus": 0,
"bankAccount": "",
"bankInfo": "",
"bankNama": "",
"basicAccount": "",
"businessLicense": "",
"companyName": "",
"password": "",
"phone": "",
"role": 0,
"taxCode": "",
"userName": ""
},
yyzzfileList: [],
jbhxxfileList: [],
skyhfileList: [],
}
},
methods: {
//
applyReview() {
this.$api('roleOption',this.form, res => {
if (res.code == 200) {
uni.removeStorageSync('token')
this.$store.state.userInfo = {}
uni.redirectTo({
url: '/pages/index/index'
})
}
})
},
//
contactUs() {
console.log("打开客服弹框")
this.$refs.customerServicePopup.open();
},
//
afterRead(type, e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
if (type == 0) {
self.yyzzfileList.push({url})
} else if (type == 1) {
self.jbhxxfileList.push({url})
} else if (type == 2) {
self.skyhfileList.push({url})
}
})
})
},
//
deleteImage(type, e) {
console.log(e, type, "===========")
if (type == 0) {
this.yyzzfileList.splice(e.index, 1)
} else if (type == 1) {
this.jbhxxfileList.splice(e.index, 1)
} else if (type == 2) {
this.skyhfileList.splice(e.index, 1)
}
},
}
}
import customerServicePopup from "@/components/config/customerServicePopup.vue";
export default {
components: {
customerServicePopup
},
onLoad(option) {
this.titleIndex = option.identity
this.form.role = option.identity
},
data() {
return {
titleIndex: 0,
titleList: [
//
this.$t('other.buyerRegistration'),
this.$t('other.supplierRegistration'),
this.$t('other.domesticCustomsClearanceApplication')
],
form: {
"address": "",
"auditStatus": 0,
"bankAccount": "",
"bankInfo": "",
"bankNama": "",
"basicAccount": "",
"businessLicense": "",
"companyName": "",
"password": "",
"phone": "",
"role": 0,
"taxCode": "",
"userName": ""
},
yyzzfileList: [],//
jbhxxfileList: [],//
skyhfileList: [],//
}
},
methods: {
//
applyReview() {
let data = JSON.parse(JSON.stringify(this.form))
data.businessLicense = this.yyzzfileList.map((item) => item.url).join(",")
data.basicAccount = this.jbhxxfileList.map((item) => item.url).join(",")
data.bankInfo = this.skyhfileList.map((item) => item.url).join(",")
if(this.$utils.verificationAll(data, {
"userName": this.$t('components.enterUserName'),
"password": this.$t('components.enterYourPassword'),
"companyName": this.$t('other.enterCompanyName'),
"taxCode": this.$t('other.enterTaxCode'),
"address": this.$t('other.enterCompanyAddress'),
"phone": this.$t('components.plePhoneNumber'),
"bankAccount": this.$t('other.enterCompanyAccount'),
"bankNama": this.$t('components.enterBankName'),
"businessLicense": '请上传营业执照',
"basicAccount": '请上传基本户信息照片',
"bankInfo": '请上传收款银行照片',
})){
return
}
this.$api(this.titleIndex == 2 ?
'addCustoms'
: 'roleOption', this.form, res => {
if (res.code == 200) {
uni.removeStorageSync('token')
this.$store.state.userInfo = {}
// uni.redirectTo({
// url: '/pages/index/index'
// })
uni.showToast({
title: '提交成功!耐心等待审核',
icon: 'none'
})
}
})
},
//
contactUs() {
console.log("打开客服弹框")
this.$refs.customerServicePopup.open();
},
//
afterRead(type, e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
if (type == 0) {
self.yyzzfileList.push({
url
})
} else if (type == 1) {
self.jbhxxfileList.push({
url
})
} else if (type == 2) {
self.skyhfileList.push({
url
})
}
})
})
},
//
deleteImage(type, e) {
console.log(e, type, "===========")
if (type == 0) {
this.yyzzfileList.splice(e.index, 1)
} else if (type == 1) {
this.jbhxxfileList.splice(e.index, 1)
} else if (type == 2) {
this.skyhfileList.splice(e.index, 1)
}
},
}
}
</script>
<style scoped lang="scss">
.registerShop {
.frame {
height: 79vh;
overflow: auto;
.basicInfo {
display: flex;
flex-direction: column;
gap: 5rpx;
background-color: #FFF;
margin-top: 20rpx;
padding: 20rpx;
.item {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
> view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
> view:nth-of-type(2) {
width: 70%;
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #f5f5f5;
font-size: 28rpx;
padding: 16rpx 8rpx 16rpx 15rpx;
}
}
}
}
.certificateInfo {
display: flex;
flex-direction: column;
gap: 20rpx;
background-color: #FFF;
margin-top: 20rpx;
padding: 20rpx;
.certificateInfoItem {
.title {
display: flex;
// padding-top: 40rpx;
font-size: 30rpx;
font-weight: 700;
padding: 0 0 0 20rpx;
> span:nth-of-type(1) {
margin: 4rpx 0 0 8rpx;
background-color: #FFF;
}
> span:nth-of-type(2) {
margin: 0 0 0 8rpx;
background-color: #FFF;
}
}
.upload {
margin: 5rpx 0 0 40rpx;
}
}
}
}
.bottom {
position: fixed;
bottom: 10rpx;
left: 0;
right: 0;
background-color: #FFF;
.btns {
display: flex;
justify-content: center;
align-items: center;
gap: 40rpx;
.sqsh {
display: flex;
align-items: center;
justify-content: center;
width: 40%;
height: 70rpx;
border-radius: 40rpx;
color: white;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: #293143;
//margin-top: 20rpx;
border-radius: 40rpx;
}
.lxwm {
display: flex;
align-items: center;
justify-content: center;
width: 40%;
height: 70rpx;
border-radius: 40rpx;
color: #000000;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: #f2f2f2;
//margin-top: 20rpx;
border-radius: 40rpx;
}
}
.others {
display: flex;
justify-content: center;
align-items: center;
gap: 200rpx;
color: #707070;
font-size: 24rpx;
.zcxz {
text-decoration: underline;
}
.kjhtyl {
text-decoration: underline;
}
}
}
}
</style>
.registerShop {
.frame {
height: 79vh;
overflow: auto;
.basicInfo {
display: flex;
flex-direction: column;
gap: 5rpx;
background-color: #FFF;
margin-top: 20rpx;
padding: 20rpx;
.item {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #f5f5f5;
font-size: 28rpx;
padding: 16rpx 8rpx 16rpx 15rpx;
}
}
}
}
.certificateInfo {
display: flex;
flex-direction: column;
gap: 20rpx;
background-color: #FFF;
margin-top: 20rpx;
padding: 20rpx;
.certificateInfoItem {
.title {
display: flex;
// padding-top: 40rpx;
font-size: 30rpx;
font-weight: 700;
padding: 0 0 0 20rpx;
>span:nth-of-type(1) {
margin: 4rpx 0 0 8rpx;
background-color: #FFF;
}
>span:nth-of-type(2) {
margin: 0 0 0 8rpx;
background-color: #FFF;
}
}
.upload {
margin: 5rpx 0 0 40rpx;
}
}
}
}
.bottom {
position: fixed;
bottom: 10rpx;
left: 0;
right: 0;
background-color: #FFF;
.btns {
display: flex;
justify-content: center;
align-items: center;
gap: 40rpx;
.sqsh {
display: flex;
align-items: center;
justify-content: center;
width: 40%;
height: 70rpx;
border-radius: 40rpx;
color: white;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: #293143;
//margin-top: 20rpx;
border-radius: 40rpx;
}
.lxwm {
display: flex;
align-items: center;
justify-content: center;
width: 40%;
height: 70rpx;
border-radius: 40rpx;
color: #000000;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: #f2f2f2;
//margin-top: 20rpx;
border-radius: 40rpx;
}
}
.others {
display: flex;
justify-content: center;
align-items: center;
gap: 200rpx;
color: #707070;
font-size: 24rpx;
.zcxz {
text-decoration: underline;
}
.kjhtyl {
text-decoration: underline;
}
}
}
}
</style>

+ 87
- 80
pages_order/auth/selectionIdentity.vue View File

@ -1,100 +1,107 @@
<template>
<view>
<view>
<navbar :title="$t('pageTitle.selectIdentity')"
:leftClick="!$route.query.back" @leftClick="$utils.navigateBack"/>
<navbar :title="$t('pageTitle.selectIdentity')" :leftClick="!$route.query.back"
@leftClick="$utils.navigateBack" />
<view class="container">
<view class="container">
<view class="title">{{ $t('components.selectIdentity') }}</view>
<view class="button-group">
<!--供应商-->
<view class="identity-button" @click="selectIdentity(0)">
<view class="identity-text"> {{ $t('other.iAmBuyer') }}</view>
<view class="identity-icon">
<img src="../../static/image/index/5.png" style="width: 100%; height: 100%;">
</view>
</view>
<!--采购-->
<view class="identity-button" @click="selectIdentity(1)">
<view class="identity-text"> {{ $t('other.iAmSupplier') }}</view>
<view class="identity-icon">
<img src="../../static/image/index/6.png" style="width: 100%; height: 100%;">
</view>
</view>
</view>
</view>
</view>
<view class="title">{{ $t('components.selectIdentity') }}</view>
<view class="button-group">
<!--供应商-->
<view class="identity-button" @click="selectIdentity(0)">
<view class="identity-text"> {{ $t('other.iAmBuyer') }}</view>
<view class="identity-icon">
<img src="../../static/image/index/5.png" style="width: 100%; height: 100%;">
</view>
</view>
<!--采购-->
<view class="identity-button" @click="selectIdentity(1)">
<view class="identity-text"> {{ $t('other.iAmSupplier') }}</view>
<view class="identity-icon">
<img src="../../static/image/index/6.png" style="width: 100%; height: 100%;">
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {mapGetters} from 'vuex'
import {
mapGetters
} from 'vuex'
export default {
computed: {
...mapGetters(['userShop', "userInfo"]),
},
methods: {
selectIdentity(identity) {
// if (userInfo)
uni.navigateTo({
url: `/pages_order/auth/registerShop?identity=${identity}`
})
},
}
}
export default {
computed: {
...mapGetters(['userShop', "userInfo", 'buy', 'shopData']),
},
methods: {
selectIdentity(identity) {
// if (userInfo)
if (identity == 0 && this.buy) {
this.$store.commit('setShop', false)
} else if (identity == 1 && this.shopData) {
this.$store.commit('setShop', true)
} else {
uni.navigateTo({
url: `/pages_order/auth/registerShop?identity=${identity}`
})
}
},
}
}
</script>
<style scoped lang="scss">
* {
box-sizing: border-box;
}
* {
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
//height: 100vh;
background-color: #f5f5f5;
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
//height: 100vh;
background-color: #f5f5f5;
.title {
font-size: 40rpx;
color: #333;
margin: 80rpx 0;
}
.title {
font-size: 40rpx;
color: #333;
margin: 80rpx 0;
}
.button-group {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.button-group {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100vw;
//padding: 0 20px;
width: 100vw;
//padding: 0 20px;
.identity-button {
display: flex;
align-items: center;
justify-content: space-between;
width: 80%;
margin-bottom: 40rpx;
padding: 40rpx 50rpx;
background-color: #2d2f59;
border-radius: 20rpx;
color: white;
.identity-button {
display: flex;
align-items: center;
justify-content: space-between;
width: 80%;
margin-bottom: 40rpx;
padding: 40rpx 50rpx;
background-color: #2d2f59;
border-radius: 20rpx;
color: white;
.identity-text {
font-size: 40rpx;
}
.identity-text {
font-size: 40rpx;
}
.identity-icon {
width: 130rpx;
height: 130rpx;
}
}
}
}
.identity-icon {
width: 130rpx;
height: 130rpx;
}
}
}
}
</style>

+ 231
- 213
pages_order/center/helpFeedback.vue View File

@ -1,221 +1,239 @@
<template>
<view class="page">
<navbar :title="$t('components.helpFeedback')" leftClick @leftClick="$utils.navigateBack"/>
<view class="frame">
<!--帮助与反馈-->
<view class="helpFeedback">
<view class="title"> {{ $t('components.helpAndFeedback') }} <span style="color: red;">*</span></view>
<view class="desc">
<textarea :placeholder="$t('components.pleaseSubmit')"/>
</view>
</view>
<!--问题截图-->
<view class="problemImg">
<view class="title">{{ $t('components.screenshot') }} <span style="color: red;">*</span></view>
<view class="img">
<uv-upload
:fileList="fileList"
:maxCount="5"
multiple
width="150rpx"
height="150rpx"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true">
</uv-upload>
</view>
</view>
<!--联系方式-->
<view class="name_phone">
<view class="title">{{ $t('components.contactInfo') }} <span style="color: red;">*</span></view>
<view class="items">
<view class="item">
<view>{{ $t('components.contactName') }}</view>
<view>
<input :placeholder="$t('components.enterContactName')" clearable></input>
</view>
</view>
<view class="item">
<view>{{ $t('components.lxPhone') }}</view>
<view>
<input :placeholder="$t('components.plePhoneNumber')" clearable></input>
</view>
</view>
</view>
</view>
<!--提交反馈-->
<view class="btns">
<view @click="submitFeedback" class="btn">
{{ $t('components.submitFeedback') }}
</view>
</view>
</view>
</view>
<view class="page">
<navbar :title="$t('components.helpFeedback')" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<!--帮助与反馈-->
<view class="helpFeedback">
<view class="title"> {{ $t('components.helpAndFeedback') }} <span style="color: red;">*</span></view>
<view class="desc">
<textarea :placeholder="$t('components.pleaseSubmit')" v-model="form.content"/>
</view>
</view>
<!--问题截图-->
<view class="problemImg">
<view class="title">{{ $t('components.screenshot') }} <span style="color: red;">*</span></view>
<view class="img">
<uv-upload :fileList="fileList" :maxCount="5" multiple width="150rpx" height="150rpx"
@delete="deleteImage" @afterRead="afterRead" :previewFullImage="true">
</uv-upload>
</view>
</view>
<!--联系方式-->
<view class="name_phone">
<view class="title">{{ $t('components.contactInfo') }} <span style="color: red;">*</span></view>
<view class="items">
<view class="item">
<view>{{ $t('components.contactName') }}</view>
<view>
<input :placeholder="$t('components.enterContactName')" clearable v-model="form.userName"></input>
</view>
</view>
<view class="item">
<view>{{ $t('components.lxPhone') }}</view>
<view>
<input :placeholder="$t('components.plePhoneNumber')" clearable v-model="form.userPhone"></input>
</view>
</view>
</view>
</view>
<!--提交反馈-->
<view class="btns">
<view @click="submitFeedback" class="btn">
{{ $t('components.submitFeedback') }}
</view>
</view>
</view>
</view>
</template>
<script>
import topbar from "@/components/base/topbar.vue";
import tabber from "@/components/base/tabbar.vue";
export default {
name: "helpFeedback",
components: {tabber, topbar},
data() {
return {
fileList: [],
form: {
"content": "",
"proofImg": "",
"userName": "",
"userPhone": ""
}
}
},
methods: {
//
submitFeedback() {
this.form.proofImg = this.fileList.join(",")
this.$api('addSuggest', this.form, res => {
if (res.code === 200) {
uni.showToast({
title: '',
icon: 'success',
duration: 2000
})
setTimeout(() => {
uni.navigateBack(-1)
}, 1000)
}
})
},
deleteImage(e) {
this.fileList.splice(e.index, 1)
},
afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
},
}
import topbar from "@/components/base/topbar.vue";
import tabber from "@/components/base/tabbar.vue";
export default {
name: "helpFeedback",
components: {
tabber,
topbar
},
data() {
return {
fileList: [],
form: {
"content": "",
"proofImg": "",
"userName": "",
"userPhone": ""
}
}
},
methods: {
//
// submitFeedback() {
// this.form.proofImg = this.fileList.join(",")
// this.$api('addSuggest', this.form, res => {
// if (res.code === 200) {
// uni.showToast({
// title: '',
// icon: 'success',
// duration: 2000
// })
// setTimeout(() => {
// uni.navigateBack(-1)
// }, 1000)
// }
// })
// },
submitFeedback(){
let data = JSON.parse(JSON.stringify(this.form))
data.proofImg = this.fileList.map((item) => item.url).join(",")
if(this.$utils.verificationAll(data, {
content : this.$t('components.pleaseSubmit'),//
proofImg : this.$t('components.screenshot'),//
userName : this.$t('components.enterContactName'),//
userPhone : this.$t('components.plePhoneNumber'),//
})){
return
}
this.$api('addSuggest', data, res => {
if(res.code == 200){
uni.showToast({
title: res.message,
icon:'none'
})
setTimeout(uni.navigateBack, 800, -1)
}
})
},
deleteImage(e) {
this.fileList.splice(e.index, 1)
},
afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
},
}
</script>
<style scoped lang="scss">
.page {
height: 100vh;
background-color: #f2f5f5;
.frame {
padding: 40rpx;
display: flex;
flex-direction: column;
justify-content: center;
gap: 40rpx;
.helpFeedback {
.title {
}
.desc {
margin-top: 20rpx;
height: 300rpx;
border-radius: 40rpx;
overflow: hidden;
padding: 20rpx;
font-size: 28rpx;
background-color: #fff;
}
}
.problemImg {
.img {
margin-top: 20rpx;
height: 150rpx;
border-radius: 40rpx;
overflow: hidden;
padding: 20rpx;
font-size: 28rpx;
background-color: #fff;
}
}
.name_phone {
.title {
}
.items {
margin-top: 20rpx;
.item {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
padding: 10rpx 0 0 20rpx;
border-bottom: 1px solid #efefef;
> view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
> view:nth-of-type(2) {
width: 70%;
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #FFF;
font-size: 28rpx;
padding: 16rpx 8rpx 16rpx 15rpx;
}
}
}
}
}
.btns {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 20rpx;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 500rpx;
height: 70rpx;
border-radius: 40rpx;
color: #FFF;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: $uni-color;
//margin-top: 20rpx;
border-radius: 40rpx;
}
}
}
}
.page {
height: 100vh;
background-color: #f2f5f5;
.frame {
padding: 40rpx;
display: flex;
flex-direction: column;
justify-content: center;
gap: 40rpx;
.helpFeedback {
.title {}
.desc {
margin-top: 20rpx;
height: 300rpx;
border-radius: 40rpx;
overflow: hidden;
padding: 20rpx;
font-size: 28rpx;
background-color: #fff;
}
}
.problemImg {
.img {
margin-top: 20rpx;
height: 150rpx;
border-radius: 40rpx;
overflow: hidden;
padding: 20rpx;
font-size: 28rpx;
background-color: #fff;
}
}
.name_phone {
.title {}
.items {
margin-top: 20rpx;
.item {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
padding: 10rpx 0 0 20rpx;
border-bottom: 1px solid #efefef;
>view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #FFF;
font-size: 28rpx;
padding: 16rpx 8rpx 16rpx 15rpx;
}
}
}
}
}
.btns {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 20rpx;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 500rpx;
height: 70rpx;
border-radius: 40rpx;
color: #FFF;
font-size: 28rpx;
margin: 20rpx 10rpx 0 0;
background: $uni-color;
//margin-top: 20rpx;
border-radius: 40rpx;
}
}
}
}
</style>

+ 172
- 130
pages_order/center/systemSet.vue View File

@ -1,138 +1,180 @@
<template>
<view class="page">
<navbar :title="$t('pageTitle.systemSettings')" leftClick @leftClick="$utils.navigateBack"/>
<view class="frame">
<view class="content" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.title }}</view>
<view class="item" v-for="(item2, index) in item.itemList" :key="index" @click="tapItem(item2, index)">
<view class="key">
<view class="img">
<img :src="item2.leftIcon" style="width: 100%; height: 100%;"/>
</view>
<view class="text">
{{ item2.text }}
</view>
</view>
<view class="value">
{{ item.rightIcon }}
</view>
</view>
</view>
</view>
<!-- 语言切换 -->
<!--<view style="padding: 20rpx;"-->
<!-- @click="$refs.changeLanguage.open()">-->
<!-- {{ $t('pages.index.index.language') }}-->
<!--</view>-->
<changeLanguage ref="changeLanguage"/>
</view>
<view class="page">
<navbar :title="$t('pageTitle.systemSettings')" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<view class="content" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.title }}</view>
<view class="item" v-for="(item2, index) in item.itemList" :key="index" @click="tapItem(item2, index)">
<view class="key">
<view class="img">
<img :src="item2.leftIcon" style="width: 100%; height: 100%;" />
</view>
<view class="text">
{{ item2.text }}
</view>
</view>
<view class="value">
{{ item.rightIcon }}
</view>
</view>
</view>
</view>
<!-- 语言切换 -->
<!--<view style="padding: 20rpx;"-->
<!-- @click="$refs.changeLanguage.open()">-->
<!-- {{ $t('pages.index.index.language') }}-->
<!--</view>-->
<changeLanguage ref="changeLanguage" />
</view>
</template>
<script>
import topbar from "@/components/base/topbar.vue";
import tabber from "@/components/base/tabbar.vue";
import ChangeLanguage from "@/components/base/changeLanguage.vue";
import {navigateTo} from "@/utils/utils";
export default {
name: "systemSet",
components: {ChangeLanguage, tabber, topbar},
data() {
return {
list: [
{
title: `${this.$t('pageTitle.accountSetting')}`,
itemList: [
// text: `${this.$t('pageTitle.switchAccount')}`
{leftIcon: "../../static/image/center/1.svg", text: `${this.$t('pageTitle.switchAccount')}`, rightIcon: ">"},
{leftIcon: "../../static/image/center/2.svg", text: `${this.$t('pageTitle.changePassword')}`, rightIcon: ">"},
{leftIcon: "../../static/image/center/3.svg", text: this.$t('pageTitle.logout'), rightIcon: ">"},
{leftIcon: "../../static/image/center/4.svg", text: this.$t('pageTitle.addressList'), rightIcon: ">",toUrl:'/pages_order/center/addressListManage'},
]
},
{
title: `${this.$t('pageTitle.systemSetting')}`,
itemList: [
{leftIcon: "../../static/image/center/1.svg", text: `${this.$t('pageTitle.languageSwitch')}`, rightIcon: ">"},
{leftIcon: "../../static/image/center/2.svg", text: `${this.$t('pageTitle.versionUpdate')}`, rightIcon: ">"},
{leftIcon: "../../static/image/center/3.svg", text: this.$t('pageTitle.clearCache'), rightIcon: ">"},
]
},
{
title: `${this.$t('pageTitle.identitySetting')}`,
itemList: [
{leftIcon: "../../static/image/center/1.svg", text: this.$t('pageTitle.switchIdentity'), rightIcon: ">"},
]
}
],
}
},
methods: {
tapItem(item, index) {
if (item.text === this.$t('pageTitle.languageSwitch')) {
this.$refs.changeLanguage.open();
}
uni.navigateTo({
url: item.toUrl
})
}
},
}
import topbar from "@/components/base/topbar.vue";
import tabber from "@/components/base/tabbar.vue";
import ChangeLanguage from "@/components/base/changeLanguage.vue";
import {
navigateTo
} from "@/utils/utils";
export default {
name: "systemSet",
components: {
ChangeLanguage,
tabber,
topbar
},
data() {
return {
list: [{
title: `${this.$t('pageTitle.accountSetting')}`,
itemList: [
// text: `${this.$t('pageTitle.switchAccount')}`
{
leftIcon: "../../static/image/center/1.svg",
text: `${this.$t('pageTitle.switchAccount')}`,
rightIcon: ">"
},
{
leftIcon: "../../static/image/center/2.svg",
text: `${this.$t('pageTitle.changePassword')}`,
rightIcon: ">"
},
{
leftIcon: "../../static/image/center/3.svg",
text: this.$t('pageTitle.logout'),
rightIcon: ">",
type : 'logout',
},
{
leftIcon: "../../static/image/center/4.svg",
text: this.$t('pageTitle.addressList'),
rightIcon: ">",
toUrl: '/pages_order/center/addressListManage'
},
]
},
{
title: `${this.$t('pageTitle.systemSetting')}`,
itemList: [{
leftIcon: "../../static/image/center/1.svg",
text: `${this.$t('pageTitle.languageSwitch')}`,
rightIcon: ">"
},
{
leftIcon: "../../static/image/center/2.svg",
text: `${this.$t('pageTitle.versionUpdate')}`,
rightIcon: ">"
},
{
leftIcon: "../../static/image/center/3.svg",
text: this.$t('pageTitle.clearCache'),
rightIcon: ">"
},
]
},
{
title: `${this.$t('pageTitle.identitySetting')}`,
itemList: [{
leftIcon: "../../static/image/center/1.svg",
text: this.$t('pageTitle.switchIdentity'),
rightIcon: ">"
}, ]
}
],
}
},
methods: {
tapItem(item, index) {
if (item.text === this.$t('pageTitle.languageSwitch')) {
this.$refs.changeLanguage.open();
}else if(item.type){
this[item.type]()
}else{
uni.navigateTo({
url: item.toUrl
})
}
},
logout(){
this.$store.commit('logout')
},
},
}
</script>
<style scoped lang="scss">
.page {
background-color: #FFF;
height: 100vh;
.frame {
padding: 40rpx;
.content {
margin-bottom: 40rpx;
.title {
font-size: 30rpx;
color: #b0b0b0;
}
.item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 40rpx;
.key {
display: flex;
justify-content: center;
align-items: center;
color: #333333;
font-size: 32rpx;
.img {
width: 40rpx;
height: 40rpx;
}
.text {
margin-left: 20rpx;
}
}
.value {
color: #999999;
font-size: 36rpx;
}
}
}
}
}
.page {
background-color: #FFF;
height: 100vh;
.frame {
padding: 40rpx;
.content {
margin-bottom: 40rpx;
.title {
font-size: 30rpx;
color: #b0b0b0;
}
.item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 40rpx;
.key {
display: flex;
justify-content: center;
align-items: center;
color: #333333;
font-size: 32rpx;
.img {
width: 40rpx;
height: 40rpx;
}
.text {
margin-left: 20rpx;
}
}
.value {
color: #999999;
font-size: 36rpx;
}
}
}
}
}
</style>

+ 10
- 3
store/store.js View File

@ -4,6 +4,7 @@ import Vuex from 'vuex'
Vue.use(Vuex); //vue的插件机制
import api from '@/api/api.js'
import { date } from '../uni_modules/uv-ui-tools/libs/function/test';
//Vuex.Store 构造器选项
const store = new Vuex.Store({
@ -13,6 +14,7 @@ const store = new Vuex.Store({
userInfo : {}, //用户信息
shopData : {},
buy : {},
customerPhone : '',//客服电话
},
getters: {
// 角色 true 为供应商 false 为采购商
@ -56,7 +58,8 @@ const store = new Vuex.Store({
}
state.userInfo = res.result.userInfo
state.buy = res.result.buy
state.shop = res.result.shop
state.shopData = res.result.shop
state.shop = !!res.result.shop
uni.setStorageSync('token', res.result.token)
if(!state.shop && !state.buy){
@ -71,9 +74,10 @@ const store = new Vuex.Store({
})
},
getUserInfo(state){
api('infoGetInfo', res => {
api('getImagePhoneOther', res => {
if(res.code == 200){
state.userInfo = res.result
state.userInfo = res.result.my
state.customerPhone = res.result.phone
}
})
},
@ -92,6 +96,9 @@ const store = new Vuex.Store({
}
})
},
setShop(state, date){
state.shop = date
},
},
actions: {},
})


Loading…
Cancel
Save