buffeyu 4 years ago
parent
commit
d9e1f768ee
12 changed files with 1036 additions and 701 deletions
  1. 96
      apis/add-paper.js
  2. 1
      manifest.json
  3. 128
      pages/add-paper/index.vue
  4. 5
      pages/client-credit/index.vue
  5. 90
      pages/mall/index.vue
  6. 115
      pages/mine/index.vue
  7. 466
      pages/paper-detail/index.vue
  8. 456
      pages/store-settings/index.vue
  9. 190
      pages/switching-mall/index.vue
  10. 188
      pages/user-info/index.vue
  11. BIN
      static/imgs/mall/top-bg.png
  12. 2
      utils/hook.js

96
apis/add-paper.js

@ -2,70 +2,90 @@ import http from '../utils/http/index.js'
// 添加纸品
export function createProduct(data) {
return http.post({
url: '/base-paper-trading/create/product',
data
})
return http.post({
url: '/base-paper-trading/create/product',
data
})
}
// 更新纸品
export function updateProduct(data) {
return http.post({
url: '/base-paper-trading/update/product',
data
})
return http.post({
url: '/base-paper-trading/update/product',
data
})
}
// 纸品种类列表
export function getCategoryList(data) {
return http.get({
url: '/base-paper-trading/get/product/category-list',
data
})
return http.get({
url: '/base-paper-trading/get/product/category-list',
data
})
}
// 纸品详情
export function getSupplierDteail(data) {
return http.get({
url: '/base-paper-trading/get/product-detail/for/supplier',
data
})
export function getSupplierDetail(data) {
return http.get({
url: '/base-paper-trading/get/product-detail/for/supplier',
data
})
}
// 店铺纸品列表(供应商端)
export function SupplierList(data) {
return http.get({
url: '/base-paper-trading/get/store/product-list/for/supplier',
data
})
return http.get({
url: '/base-paper-trading/get/store/product-list/for/supplier',
data
})
}
// 上下架纸品
export function productStatus(data) {
return http.post({
url: '/base-paper-trading/update/product/status',
data
})
return http.post({
url: '/base-paper-trading/update/product/status',
data
})
}
// 编辑店铺、
export function updataStore(data) {
return http.post({
url: '/base-paper-trading/update/store?mallSupplierId='+data.mallSupplierId,
data
})
return http.post({
url: '/base-paper-trading/update/store?mallSupplierId=' + data.mallSupplierId,
data
})
}
/**
* 获取我店铺列表
* 获取我店铺列表
* swagger:http://api-ops-yyt-test.qniao.cn/base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/店铺/getMyStoreListUsingGET
*/
export function getStoreList(data) {
return http.get({
url: '/base-paper-trading/get/my/store-list',
data
})
return http.get({
url: '/base-paper-trading/get/my/store-list',
data
})
}
//获取店铺信息(供应商端)
export function storeDetail(data) {
return http.get({
url: '/base-paper-trading/get/store-detail/for/supplier?supplierId='+data,
data
})
return http.get({
url: '/base-paper-trading/get/store-detail/for/supplier?supplierId=' + data,
data
})
}
/**
* 获取供应商二维码图片 mallSupplierId
*/
export function getSupplierQrCode(data) {
return http.get({
url: '/base-paper-trading/get/supplier/store/home/img',
data
})
}
/**
* 获取供应商纸品二维码图片 mallSupplierId paperId
*/
export function getPaperQrCode(data) {
return http.get({
url: '/base-paper-trading/get/supplier/store/paper/details/img',
data
})
}

1
manifest.json

@ -40,6 +40,7 @@
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",

128
pages/add-paper/index.vue

@ -201,21 +201,35 @@
<view class="paper-price">
<view class="paper-price-image-title"><text class="paper-price-title">纸品图片</text></view>
<view class="paper-price-image">
<uni-file-picker
<view class="imgs flex-row-start-start">
<view v-for="(item, index) in imgList" :key="index" class="upload_img">
<uni-icons type="clear" size="16" class="close-icon" @click="deleteVoucher(index)"></uni-icons>
<image style="width: 120rpx; height: 120rpx" :src="item"></image>
</view>
<view class="default-upload" @click="uploadVoucher()">
<image src="/static/imgs/order/camera.png" class="icon"></image>
<text style="font-size: 26rpx; color: #4c4a58">上传图片</text>
</view>
</view>
<!-- <uni-file-picker
v-model="imgList"
ref="files"
:auto-upload="false"
file-mediatype="image"
mode="grid"
file-extname="png,jpg"
:limit="5"
:image-styles="imageStyles"
@progress="progress"
@success="success"
@fail="fail"
@select="select"
@delete="deleteImage"
>
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker>
<image @click="uploadVoucher()" class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker> -->
<!-- mode="grid"
file-extname="png,jpg"
:limit="5"
@progress="progress"
@success="success"
@fail="fail"
@select="select" -->
<!-- <image @click="uploadVoucher()" class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image> -->
</view>
</view>
<uGap></uGap>
@ -304,10 +318,10 @@
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
import { back, go2, uploadFile, uploadImage } from '@/utils/hook.js'
import qnEasyinput from '@/components/qn-easyinput/qn-easyinput.vue'
import uGap from '@/components/u-gap/u-gap.vue'
import { getCategoryList, createProduct, getSupplierDteail, updateProduct } from '@/apis/add-paper.js'
import { getCategoryList, createProduct, getSupplierDetail, updateProduct } from '@/apis/add-paper.js'
const validateFields = ['name', 'isMainProductRep', 'manufacturerName', 'brandName', 'categoryName']
const validatePriceFields = ['isPromoting', 'listPrice', 'minimum', 'stock', 'stockUnit', 'weight']
export default {
@ -411,7 +425,7 @@ export default {
mallSupplierIds: this.$store.state.supplierInfo.supplierId,
productId: this.option.id
}
getSupplierDteail(params).then((res) => {
getSupplierDetail(params).then((res) => {
if (res) {
this.form = res
if (this.form.isMainProduct === true) {
@ -432,17 +446,18 @@ export default {
// this.$set(this.form,'categoryName',this.paperList[x].name)
// }
// }
this.imgList = []
for (let i = 0; i < res.imgList.length; i++) {
var params = {
name: 'text',
extname: 'text',
url: res.imgList[i],
pathUrl: res.imgList[i]
}
this.imgList.push(params)
}
console.log('this.form', this.form)
// this.imgList = []
// for (let i = 0; i < res.imgList.length; i++) {
// var params = {
// name: 'text',
// extname: 'text',
// url: res.imgList[i],
// pathUrl: res.imgList[i]
// }
// this.imgList.push(params)
// }
this.imgList = res.imgList
console.log('this.imgList', this.imgList)
}
})
},
@ -482,6 +497,20 @@ export default {
this.imgList[this.imgList.length - 1].pathUrl = val
})
},
uploadVoucher() {
uploadImage(['album'], 5)
.then((urls) => {
if (urls) {
this.imgList.push(urls[0])
}
})
.catch((e) => {
uni.showToast({
title: '上传失败',
icon: 'fail'
})
})
},
//
deleteImage(item) {
console.log('deleteImage', item)
@ -492,6 +521,9 @@ export default {
}
console.log(this.imgList)
},
deleteVoucher(index) {
this.imgList.splice(index, 1)
},
uploadPrice() {
if (this.skuList.length === 0) {
uni.showToast({
@ -520,10 +552,10 @@ export default {
}
}
}
var upImage = []
for (let i = 0; i < this.imgList.length; i++) {
upImage.push(this.imgList[i].pathUrl)
}
// var upImage = []
// for (let i = 0; i < this.imgList.length; i++) {
// upImage.push(this.imgList[i].pathUrl)
// }
for (let j = 0; j < this.skuList.length; j++) {
if (this.skuList[j].isPromoting === 0) {
this.skuList[j].isPromoting = true
@ -535,7 +567,7 @@ export default {
...this.form,
isMainProduct: this.form.isMainProductRep === 0 ? true : false,
skuList: this.skuList,
imgList: upImage,
imgList: this.imgList,
supplierId: this.$store.state.supplierInfo.supplierId
}
if (this.eidtFor === 0) {
@ -775,5 +807,43 @@ export default {
.paper-backColor {
background-color: rgba(220, 222, 224, 1);
}
.imgs {
// padding: 16rpx 32rpx 32rpx;
min-height: 120rpx;
}
.default-upload {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
background-color: #dcdee0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.icon {
width: 56rpx;
height: 56rpx;
margin-bottom: 8rpx;
}
}
.upload_img {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
background-color: #dcdee0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
margin-right: 12rpx;
overflow: hidden;
.close-icon {
position: absolute;
top: 0;
right: 0;
z-index: 5;
}
}
}
</style>

5
pages/client-credit/index.vue

@ -115,6 +115,11 @@ export default {
this.searchList = res.records
if (this.searchList.length > 0) {
this.$refs.popup.open('bottom')
} else {
uni.showToast({
title: '没有搜索到该公司',
icon: 'none'
})
}
}
})

90
pages/mall/index.vue

@ -19,7 +19,7 @@
<view class="set" @click="setting">设置</view>
</view>
</view>
<view class="" v-if="pageShow">
<view>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback">
<view v-for="(item, index) in listData" :key="index" style="margin-bottom: 20rpx">
<view class="content" @click="detailInfo(item)">
@ -55,12 +55,14 @@
</view>
</view>
</view>
<view slot="empty">
<no-data></no-data>
</view>
</scroll-list>
</view>
<view>
<view class="offer-prices" @click="nativeTo()"><image class="my-image" src="../../static/imgs/trade/camera.png"></image></view>
</view>
<no-data v-if="!pageShow"></no-data>
</view>
<view v-else>
<uni-nav-bar :fixed="true" :status-bar="true">
@ -70,13 +72,24 @@
<text style="font-size: 30rpx; text-align: center; font-weight: 600">请先完善企业基本信息</text>
</view>
</view>
<view class="share-area" v-if="visible">
<view class="close-icon">
<uni-icons @click="closeShare" type="close" size="35" color="white"></uni-icons>
</view>
<view class="share-content">
<view class="flex-col-center-start">
<text style="font-size: 34rpx">截图分享店铺</text>
<image style="width: 250rpx; height: 250rpx; margin-top: 30rpx" :src="storeCodeImg"></image>
</view>
</view>
</view>
</view>
</template>
<script>
import uGap from '@/components/u-gap/u-gap.vue'
import { back, go2, loginGo2 } from '@/utils/hook.js'
import { SupplierList, productStatus, storeDetail } from '@/apis/add-paper.js'
import { SupplierList, productStatus, storeDetail, getSupplierQrCode } from '@/apis/add-paper.js'
import { getTimer } from '@/utils/index.js'
import noData from './no-data.vue'
export default {
@ -92,7 +105,8 @@ export default {
},
data() {
return {
pageShow: true,
storeCodeImg: '', //
visible: false, //
storeInformation: {
supplierId: null,
name: null,
@ -122,7 +136,7 @@ export default {
},
listData: [],
logo: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif',
backgroundStyle: 'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;',
backgroundStyle: 'background: url("/static/imgs/mall/top-bg.png") no-repeat;',
storeInfo: ''
}
},
@ -151,13 +165,13 @@ export default {
this.$set(this.storeInformation, 'productNumber', res.productNumber)
this.$set(this.storeInformation, 'currentProductNumber', res.currentProductNumber)
this.$set(this.storeInformation, 'name', res.name)
if (res.logo === '') {
this.logo = 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'
if (!res.logo) {
this.logo = 'bug 默认logo'
} else {
this.logo = res.logo
}
if (res.backgroundImg === '') {
this.backgroundStyle = 'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;'
if (!res.backgroundImg) {
this.backgroundStyle = 'background: url("/static/imgs/mall/top-bg.png") no-repeat;'
} else {
this.backgroundStyle = 'background: url(' + res.backgroundImg + ') no-repeat;'
}
@ -167,16 +181,12 @@ export default {
reject(err)
})
},
// pageShow
//
queryData() {
return new Promise((resolve, reject) => {
SupplierList({ ...this.orderPagination })
.then((res) => {
if (res) {
if (res.records.length === 0) {
this.pageShow = false
return
}
if (this.orderPagination.pageNum == 1) {
this.listData = res.records
} else {
@ -257,7 +267,24 @@ export default {
})
},
//
shareTap() {}
shareTap() {
if (this.hasCompany) {
getSupplierQrCode({ mallSupplierId: this.$store.state.supplierInfo.supplierId }).then((res) => {
if (res) {
this.visible = true
this.storeCodeImg = `data:image/png;base64,${res}`
}
})
} else {
uni.showToast({
title: '请先完善企业信息',
icon: 'none'
})
}
},
closeShare() {
this.visible = false
}
}
}
</script>
@ -421,7 +448,7 @@ export default {
}
.offer-prices {
position: absolute;
z-index: 9999;
z-index: 100;
right: 32rpx;
bottom: 122rpx;
border-radius: 50%;
@ -435,4 +462,35 @@ export default {
height: 100rpx;
}
}
.share-area {
width: 750rpx;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
position: fixed;
z-index: 1000;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.close-icon {
width: 750rpx;
padding: 0 32rpx;
height: 70rpx;
flex-grow: 0;
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.share-content {
width: 560rpx;
margin-top: 26rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 42rpx;
}
}
</style>

115
pages/mine/index.vue

@ -48,7 +48,7 @@
<text class="text">VIP会员</text>
</view>
<text class="center">立即开通会员 尊享特权</text>
<view class="right">
<view class="right" @click="makeVip">
<text class="text">{{ isVip ? '续费会员' : '开通会员' }}</text>
</view>
</view>
@ -128,6 +128,28 @@
</view>
<view @click="go2('client-credit')">client-credit</view>
<view @click="go2('enterprise-info')">enterprise-info</view>
<view class="share-area" v-if="visible">
<view class="close-icon">
<uni-icons @click="closeShare" type="close" size="35" color="white"></uni-icons>
</view>
<view class="share-content">
<view class="flex-col-center-start">
<view class="vip-top flex-col-start-start">
<text class="text">线上开通会员暂未上线</text>
<text class="text">请添加客服开通</text>
</view>
<text style="font-size: 34rpx; margin-top: 44rpx">扫码或添加会员专属客服微信号</text>
<text style="font-size: 34rpx; color: #ff7e3b; margin: 8rpx 0">{{ customerServicer }}</text>
<image
style="width: 250rpx; height: 250rpx; margin-top: 10rpx"
src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/vip-code.png"
></image>
<view class="button flex-row-center-center" @click="copyPhone">
<text class="text">复制微信号</text>
</view>
</view>
</view>
</view>
</view>
</template>
@ -156,6 +178,8 @@ export default {
components: { qnDataPicker },
data() {
return {
visible: false,
customerServicer: '17606507108',
fddStatus: Object.freeze(fddEnterpriseStatus),
messageNum: 0,
companyNum: 0,
@ -198,14 +222,40 @@ export default {
})
}
if (this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.UNCERTIFIED) {
// uni.showToast({
// title: '~',
// icon: 'none'
// })
}
},
go2,
loginGo2,
makeVip() {
if (this.hasCompany) {
this.visible = true
} else {
uni.showToast({
title: '认证中,请稍后~',
title: '请先完善企业信息',
icon: 'none'
})
}
},
go2,
loginGo2,
closeShare() {
this.visible = false
},
//
copyPhone() {
uni.setClipboardData({
data: this.customerServicer,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'none',
duration: 2000
})
}
})
},
//
getStatistics() {
if (!this.hasLogin) {
@ -251,6 +301,9 @@ export default {
isVip() {
return this.$store.state.supplierInfo.isVip == true
},
hasCompany() {
return this.$store.state.supplierInfo.id != null
},
curAvatar() {
if (!this.hasLogin) {
return '/static/imgs/mine/user-avatar.png'
@ -551,4 +604,58 @@ export default {
align-items: center;
justify-content: flex-end;
}
.share-area {
width: 750rpx;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
position: fixed;
z-index: 200;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.close-icon {
width: 750rpx;
padding: 0 32rpx;
height: 70rpx;
flex-grow: 0;
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.share-content {
width: 560rpx;
margin-top: 26rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
}
}
.vip-top {
width: 560rpx;
height: 268rpx;
background-color: #ff883b;
padding: 54rpx 20rpx;
.text {
font-size: 40rpx;
color: #ffffff;
line-height: 72rpx;
}
}
.button {
width: 250rpx;
height: 70rpx;
background: #ff5550;
border-radius: 34rpx;
margin: 40rpx 0;
.text {
font-size: 34rpx;
color: #ffffff;
}
}
</style>

466
pages/paper-detail/index.vue

@ -1,215 +1,281 @@
<template>
<view class="paper-detail">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="paper-detail-title">纸品详情</view>
<view slot="left"></view>
<view slot="right" class="paper-detail-right-title" @tap="shareTap">分享</view>
</uni-nav-bar>
</view>
<view class="paper-detail-info">
<view class="">
<text class="paper-detail-info-text">纸品名称</text>
<text class="paper-detail-info-subtext">{{form.name}}</text>
</view>
<view class="">
<text class="paper-detail-info-text">纸厂信息</text>
<text class="paper-detail-info-subtext">{{form.manufacturerName}}</text>
</view>
<view class="">
<text class="paper-detail-info-text">品牌信息</text>
<text class="paper-detail-info-subtext">{{form.brandName}}</text>
</view>
<view class="">
<text class="paper-detail-info-text">纸种信息</text>
<text class="paper-detail-info-subtext">{{form.categoryName}}</text>
</view>
</view>
<uGap></uGap>
<view class="paper-datail-list">
<view class="paper-datail-list-title paper-bottom-border">纸品售价</view>
<view class="">
<uni-table emptyText="暂无更多数据">
<!-- 表头行 -->
<uni-tr class="paper-table-title">
<uni-th align="left" width="55">克重</uni-th>
<!-- <uni-th align="left" width="65">规格</uni-th> -->
<uni-th align="left" width="65">售价</uni-th>
<uni-th align="left" width="65">库存</uni-th>
<uni-th align="left" width="75">是否特价</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item,index) in skuList" :key="index">
<uni-td>{{item.weight}}</uni-td>
<!-- <uni-td>779*1092</uni-td> -->
<uni-td>{{item.listPrice}}</uni-td>
<uni-td>{{item.stock}}</uni-td>
<uni-td>{{item.isPromoting === true ?'是':'否'}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<uGap></uGap>
<view class="paper-datail-list ">
<view class="paper-datail-list-title">纸品图片</view>
<view class="paper-list-view">
<image v-for="(item,index) in imgList" class="paper-datail-list-image" :src="item" mode=""></image>
</view>
</view>
<uGap></uGap>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">商品买点</view>
<view class="paper-datail-list-text"><text>{{form.sellingProposition}}</text></view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">商品描述</view>
<view class="paper-datail-list-text"><text>{{form.description}}</text></view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">送货说明</view>
<view class="paper-datail-list-text"><text>{{form.shippingNote}}</text></view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">其他说明</view>
<view class="paper-datail-list-text"><text>{{form.otherNote}}</text></view>
</view>
</view>
<view class="paper-detail">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="paper-detail-title">纸品详情</view>
<view slot="left"></view>
<view slot="right" class="paper-detail-right-title" @tap="shareTap">分享</view>
</uni-nav-bar>
</view>
<view class="paper-detail-info">
<view class="">
<text class="paper-detail-info-text">纸品名称</text>
<text class="paper-detail-info-subtext">{{ form.name }}</text>
</view>
<view class="">
<text class="paper-detail-info-text">纸厂信息</text>
<text class="paper-detail-info-subtext">{{ form.manufacturerName }}</text>
</view>
<view class="">
<text class="paper-detail-info-text">品牌信息</text>
<text class="paper-detail-info-subtext">{{ form.brandName }}</text>
</view>
<view class="">
<text class="paper-detail-info-text">纸种信息</text>
<text class="paper-detail-info-subtext">{{ form.categoryName }}</text>
</view>
</view>
<uGap></uGap>
<view class="paper-datail-list">
<view class="paper-datail-list-title paper-bottom-border">纸品售价</view>
<view class="">
<uni-table emptyText="暂无更多数据">
<!-- 表头行 -->
<uni-tr class="paper-table-title">
<uni-th align="left" width="55">克重</uni-th>
<!-- <uni-th align="left" width="65">规格</uni-th> -->
<uni-th align="left" width="65">售价</uni-th>
<uni-th align="left" width="65">库存</uni-th>
<uni-th align="left" width="75">是否特价</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item, index) in skuList" :key="index">
<uni-td>{{ item.weight }}</uni-td>
<!-- <uni-td>779*1092</uni-td> -->
<uni-td>{{ item.listPrice }}</uni-td>
<uni-td>{{ transformStock(item.stock, item.stockUnit) }}</uni-td>
<uni-td>{{ item.isPromoting === true ? '是' : '否' }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<uGap></uGap>
<view class="paper-datail-list">
<view class="paper-datail-list-title">纸品图片</view>
<view class="paper-list-view">
<image v-for="(item, index) in imgList" :key="index" class="paper-datail-list-image" :src="item" mode=""></image>
</view>
</view>
<uGap></uGap>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title">商品买点</view>
<view class="paper-datail-list-text">
<text>{{ form.sellingProposition }}</text>
</view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title">商品描述</view>
<view class="paper-datail-list-text">
<text>{{ form.description }}</text>
</view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title">送货说明</view>
<view class="paper-datail-list-text">
<text>{{ form.shippingNote }}</text>
</view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title">其他说明</view>
<view class="paper-datail-list-text">
<text>{{ form.otherNote }}</text>
</view>
</view>
<view class="share-area" v-if="visible">
<view class="close-icon">
<uni-icons @click="closeShare" type="close" size="35" color="white"></uni-icons>
</view>
<view class="share-content">
<view class="flex-col-center-start">
<text style="font-size: 34rpx">截图分享纸品</text>
<image style="width: 250rpx; height: 250rpx; margin-top: 30rpx" :src="paperCodeImg"></image>
</view>
</view>
</view>
</view>
</template>
<script>
import { back, go2 } from '@/utils/hook.js'
import uGap from '@/components/u-gap/u-gap.vue'
import { getSupplierDteail } from '@/apis/add-paper.js'
import { getSupplierDetail, getPaperQrCode } from '@/apis/add-paper.js'
export default {
components: {
uGap
},
data() {
return {
form:{},
skuList:[],
imgList:[],
option:''
}
},
onLoad(option) {
this.getDteailList(option)
this.option = option
},
methods: {
back,
//
getDteailList(option) {
var params = {
mallSupplierIds : this.$store.state.supplierInfo.supplierId,
productId : option.id
}
getSupplierDteail(params).then(res => {
if (res) {
this.form = res
this.skuList = res.skuList
this.imgList = res.imgList
this.$set(this.form,'categoryName',this.option.categoryName)
}
})
},
//
shareTap() {
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: "http://uniapp.dcloud.io/",
title: "uni-app分享",
summary: "我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",
imageUrl: "https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/d8590190-4f28-11eb-b680-7980c8a877b8.png",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}
}
components: {
uGap
},
data() {
return {
paperCodeImg: '', //
visible: false, //
form: {},
skuList: [],
imgList: [],
id: null
}
},
onLoad(option) {
if (option.id) {
this.id = option.id
this.getDetailList()
} else {
uni.showToast({
title: '参数错误',
icon: 'none',
success: () => {
setTimeout(() => {
back()
}, 2000)
}
})
}
},
methods: {
back,
//
getDetailList() {
var params = {
mallSupplierIds: this.$store.state.supplierInfo.supplierId,
productId: this.id
}
getSupplierDetail(params).then((res) => {
if (res) {
this.form = res
this.skuList = res.skuList
this.imgList = res.imgList
this.$set(this.form, 'categoryName', res.categoryName)
}
})
},
transformStock(num, unit) {
if (unit == 2) {
return `${num}`
}
if (unit == 1) {
return `${num}`
}
},
//
shareTap() {
getPaperQrCode({ mallSupplierId: this.$store.state.supplierInfo.supplierId, paperId: this.id }).then((res) => {
if (res) {
this.visible = true
this.paperCodeImg = `data:image/png;base64,${res}`
}
})
},
closeShare() {
this.visible = false
}
}
}
</script>
<style lang="scss">
.paper-detail {
.paper-detail-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.paper-detail-right-title {
font-size: 28rpx;
color: #007aff;
text-align: right;
line-height: 40rpx;
font-weight: 500;
}
.paper-detail-info {
height: 260rpx;
background: #ffffff;
padding: 24rpx 32rpx;
line-height: 56rpx;
}
.paper-detail-info-text {
font-size: 28rrpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
}
.paper-detail-info-subtext {
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
}
.paper-detail-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.paper-detail-right-title {
font-size: 28rpx;
color: #007aff;
text-align: right;
line-height: 40rpx;
font-weight: 500;
}
.paper-detail-info {
height: 260rpx;
background: #ffffff;
padding: 24rpx 32rpx;
line-height: 56rpx;
}
.paper-detail-info-text {
font-size: 28rrpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
}
.paper-detail-info-subtext {
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
}
.paper-datail-list {
background: #ffffff;
.paper-datail-list-title {
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 600;
height: 80rpx;
align-items: center;
display: flex;
padding-left: 32rpx;
}
.paper-datail-list-text {
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
align-items: center;
line-height: 50rpx;
padding: 0rpx 32rpx 20rpx 32rpx;
}
.paper-table-title {
font-size: 24rpx;
color: rgba(0, 0, 0, 0.5);
letter-spacing: 0;
font-weight: 400;
background: #f7f8fa;
}
.paper-list-view {
line-height: 40rpx;
}
.paper-datail-list-image {
width: 120rpx;
height: 120rpx;
padding: 32rpx 32rpx;
}
}
.paper-bottom-border {
border-bottom: 2rpx solid #d8d8d8;
}
.paper-datail-list {
background: #ffffff;
.paper-datail-list-title {
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 600;
height: 80rpx;
align-items: center;
display: flex;
padding-left: 32rpx;
}
.paper-datail-list-text {
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
align-items: center;
line-height: 50rpx;
padding: 0rpx 32rpx 20rpx 32rpx;
}
.paper-table-title {
font-size: 24rpx;
color: rgba(0, 0, 0, 0.5);
letter-spacing: 0;
font-weight: 400;
background: #f7f8fa;
}
.paper-list-view {
line-height: 40rpx;
}
.paper-datail-list-image {
width: 120rpx;
height: 120rpx;
padding: 32rpx 32rpx;
}
}
.paper-bottom-border {
border-bottom: 2rpx solid #d8d8d8;
}
}
.share-area {
width: 750rpx;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
position: fixed;
z-index: 1000;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.close-icon {
width: 750rpx;
padding: 0 32rpx;
height: 70rpx;
flex-grow: 0;
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.share-content {
width: 560rpx;
margin-top: 26rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 42rpx;
}
}
</style>

456
pages/store-settings/index.vue

@ -1,239 +1,245 @@
<template>
<view class="store-setting">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="store-setting-title">店铺设置</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="store-setting-main">
<view class="store-setting-name"><text>店铺名称</text></view>
<view class="">
<qn-easyinput
class="store-setting-textArea"
:maxlength="100"
:styles="{ disableColor: '#F7F8FA' }"
v-model="storeName"
:inputBorder="false"
type="textarea"
placeholder="请输入店铺名称"
></qn-easyinput>
</view>
<view class="store-log">
<view class="tore-setting-name"><text>店铺logo</text></view>
<view class="store-log store-image-flex">
<uni-file-picker
class="stotr-image-width"
v-model="logoImage"
file-mediatype="image"
mode="grid"
file-extname="png,jpg"
:limit="1"
:image-styles="imageStyles"
@progress="progress"
@success="success"
@fail="fail"
@select="select"
@delete="deleteLogo"
>
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker>
<view class="store-image-text ">建议尺寸200*200像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
</view>
</view>
<view class="store-log">
<view class="tore-setting-name"><text>背景图片</text></view>
<view class="store-log store-image-flex">
<uni-file-picker @delete="deleteImage" class="stotr-image-widtht" v-model="backgroundImage" @select="backSelect" :limit="1" fileMediatype="image" :image-styles="imageStylest">
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker>
<view class="store-image-text">建议尺寸750*370像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
</view>
</view>
</view>
<view class="">
<view class="upload-btn"><button type="primary" class="btn-class" @click="uploadSet">保存设置</button></view>
</view>
</view>
<view class="store-setting">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="store-setting-title">店铺设置</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="store-setting-main">
<view class="store-setting-name"><text>店铺名称</text></view>
<view class="">
<qn-easyinput
class="store-setting-textArea"
:maxlength="100"
:styles="{ disableColor: '#F7F8FA' }"
v-model="storeName"
:inputBorder="false"
type="textarea"
placeholder="请输入店铺名称"
></qn-easyinput>
</view>
<view class="store-log">
<view class="tore-setting-name"><text>店铺logo</text></view>
<view class="store-log store-image-flex">
<uni-file-picker
class="stotr-image-width"
v-model="logoImage"
file-mediatype="image"
mode="grid"
file-extname="png,jpg"
:limit="1"
:image-styles="imageStyles"
@progress="progress"
@success="success"
@fail="fail"
@select="select"
@delete="deleteLogo"
>
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker>
<view class="store-image-text">建议尺寸200*200像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
</view>
</view>
<view class="store-log">
<view class="tore-setting-name"><text>背景图片</text></view>
<view class="store-log store-image-flex">
<uni-file-picker
@delete="deleteImage"
class="stotr-image-widtht"
v-model="backgroundImage"
@select="backSelect"
:limit="1"
fileMediatype="image"
:image-styles="imageStylest"
>
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker>
<view class="store-image-text">建议尺寸750*370像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
</view>
</view>
</view>
<view class="">
<view class="upload-btn"><button type="primary" class="btn-class" @click="uploadSet">保存设置</button></view>
</view>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
import { updataStore } from '@/apis/add-paper.js'
export default {
data() {
return {
storeName: '',
logoImage: [],
backgroundImage:[],
background: '',
logo: '',
imageStyles: {
width: 120,
height: 100,
border: false
},
imageStylest: {
width: 183,
height: 94,
border: false
},
option:''
}
},
onLoad(option) {
if (option) {
this.logoImage = []
this.backgroundImage = []
this.option = option
this.storeName = this.option.name
this.background = this.option.backgroundImg
this.logo = this.option.logo
if(this.option.logo !== ""){
var logoImage = {
name:'text',
type:'image',
url:this.option.logo
}
this.logoImage.push(logoImage)
}
if(this.option.backgroundImg !== ""){
var backgroundImage = {
name:'text',
type:'image',
url:this.option.backgroundImg
}
this.backgroundImage.push(backgroundImage)
}
}
},
methods: {
back,
//
progress() {},
//
success(item) {
console.log(item)
},
//
fail(item) {
console.log(item)
},
//
select(item) {
this.postuploadFile(item.tempFiles[0], 'logo')
},
// logo
deleteLogo(item) {
console.log('deleteImage', item)
this.logo = ''
},
//
deleteImage(item) {
console.log('deleteImage', item)
this.background = ''
},
backSelect(item) {
console.log('item',item)
this.postuploadFile(item.tempFiles[0], 'background')
},
postuploadFile(path, type) {
uploadFile(path.path).then(val => {
if (type === 'logo') {
this.logo = val
} else {
this.background = val
}
})
},
//
uploadSet() {
var params = {
backgroundImg: this.background,
id: this.$store.state.supplierInfo.id,
logo: this.logo,
name: this.storeName,
mallSupplierId: this.$store.state.supplierInfo.supplierId
}
updataStore(params).then(res => {
if (res) {
uni.showToast({
title: '设置成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
}
})
}
}
data() {
return {
storeName: '',
logoImage: [],
backgroundImage: [],
background: '',
logo: '',
imageStyles: {
width: 120,
height: 100,
border: false
},
imageStylest: {
width: 183,
height: 94,
border: false
},
option: ''
}
},
onLoad(option) {
if (option) {
this.logoImage = []
this.backgroundImage = []
this.option = option
this.storeName = this.option.name
this.background = this.option.backgroundImg
this.logo = this.option.logo
if (this.option.logo) {
var logoImage = {
name: 'text',
type: 'image',
url: this.option.logo
}
this.logoImage.push(logoImage)
}
if (this.option.backgroundImg) {
var backgroundImage = {
name: 'text',
type: 'image',
url: this.option.backgroundImg
}
this.backgroundImage.push(backgroundImage)
}
}
},
methods: {
back,
//
progress() {},
//
success(item) {
console.log(item)
},
//
fail(item) {
console.log(item)
},
//
select(item) {
this.postuploadFile(item.tempFiles[0], 'logo')
},
// logo
deleteLogo(item) {
console.log('deleteImage', item)
this.logo = ''
},
//
deleteImage(item) {
console.log('deleteImage', item)
this.background = ''
},
backSelect(item) {
console.log('item', item)
this.postuploadFile(item.tempFiles[0], 'background')
},
postuploadFile(path, type) {
uploadFile(path.path).then((val) => {
if (type === 'logo') {
this.logo = val
} else {
this.background = val
}
})
},
//
uploadSet() {
var params = {
backgroundImg: this.background,
id: this.$store.state.supplierInfo.id,
logo: this.logo,
name: this.storeName,
mallSupplierId: this.$store.state.supplierInfo.supplierId
}
updataStore(params).then((res) => {
if (res) {
uni.showToast({
title: '设置成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
}
})
}
}
}
</script>
<style lang="scss">
.store-setting {
background-color: #ffffff;
.store-setting-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.store-setting-main {
padding: 20rpx 32rpx;
background-color: #ffffff;
}
.store-setting-name {
// font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.store-setting-textArea {
background: #f7f8fa;
border-radius: 20rpx;
padding: 10rpx;
margin-top: 20rpx;
}
.store-log {
margin-top: 32rpx;
}
.store-image-flex {
display: flex;
}
.store-image-text {
font-size: 24rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
line-height: 40rpx;
margin-left: 10rpx;
}
.stotr-image-widtht {
width: 100%;
background-color: rgba(220, 222, 224, 1);
}
.stotr-image-width {
width: 48%;
background-color: rgba(220, 222, 224, 1);
}
.upload-btn {
position: absolute;
width: 92%;
bottom: 32rpx;
left: 32rpx;
}
.paper-upload-image {
width: 120rpx;
height: 120rpx;
background: rgba(220, 222, 224, 1);
border-radius: 10rpx;
}
background-color: #ffffff;
.store-setting-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.store-setting-main {
padding: 20rpx 32rpx;
background-color: #ffffff;
}
.store-setting-name {
// font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.store-setting-textArea {
background: #f7f8fa;
border-radius: 20rpx;
padding: 10rpx;
margin-top: 20rpx;
}
.store-log {
margin-top: 32rpx;
}
.store-image-flex {
display: flex;
}
.store-image-text {
font-size: 24rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
line-height: 40rpx;
margin-left: 10rpx;
}
.stotr-image-widtht {
width: 100%;
background-color: rgba(220, 222, 224, 1);
}
.stotr-image-width {
width: 48%;
background-color: rgba(220, 222, 224, 1);
}
.upload-btn {
position: absolute;
width: 92%;
bottom: 32rpx;
left: 32rpx;
}
.paper-upload-image {
width: 120rpx;
height: 120rpx;
background: rgba(220, 222, 224, 1);
border-radius: 10rpx;
}
}
</style>

190
pages/switching-mall/index.vue

@ -1,31 +1,33 @@
<template>
<view class="check-mall">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="check-mall-title">切换商城</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="" v-for="(item, index) in enterpriseList" :key="index" @click="checkCompany(item, index)">
<uni-list>
<uni-list-item>
<!-- 自定义 header -->
<view slot="header" class="slot-box"><image class="slot-image check-mall-image" :src="item.logo || '/static/logo.png'" mode="scaleToFill"></image></view>
<!-- 自定义 body -->
<view slot="body" class="slot-box check-mall-text">
<view class="check-mall-text-textTitle">
<text>{{ item.name }}</text>
</view>
<view class="check-mall-text-textSubTitle">
<text>全部商品{{ item.productNumber }}</text>
</view>
</view>
<view v-if="supplierId === item.supplierId" slot="footer" class="slot-box check-mall-sure"><icon type="success_no_circle" size="26" /></view>
</uni-list-item>
</uni-list>
</view>
</view>
<view class="check-mall">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="check-mall-title">切换商城</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="" v-for="(item, index) in enterpriseList" :key="index" @click="checkCompany(item, index)">
<uni-list>
<uni-list-item>
<!-- 自定义 header -->
<view slot="header" class="slot-box">
<image class="slot-image check-mall-image" :src="item.logo || '/static/logo.png'" mode="scaleToFill"></image>
</view>
<!-- 自定义 body -->
<view slot="body" class="slot-box check-mall-text">
<view class="check-mall-text-textTitle">
<text>{{ item.name }}</text>
</view>
<view class="check-mall-text-textSubTitle">
<text>全部商品{{ item.productNumber }}</text>
</view>
</view>
<view v-if="supplierId === item.supplierId" slot="footer" class="slot-box check-mall-sure"><icon type="success_no_circle" size="26" /></view>
</uni-list-item>
</uni-list>
</view>
</view>
</template>
<script>
@ -33,75 +35,77 @@ import { back, go2 } from '@/utils/hook.js'
import { getStoreList } from '@/apis/add-paper.js'
import store from '@/store/index'
export default {
data() {
return {
companyData: [],
enterpriseList: [],
supplierId: null
}
},
onLoad(option) {
this.supplierId = option.supplierId
this.queryData()
},
methods: {
back,
queryData() {
getStoreList().then(res => {
console.log('==', res)
this.enterpriseList = res
})
},
//
checkCompany(item) {
this.$store.commit('setSupplierInfo', {
id: item.id,
name: item.name,
fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus,
supplierId: item.supplierId
})
go2('mall')
}
}
data() {
return {
companyData: [],
enterpriseList: [],
supplierId: null
}
},
onLoad(option) {
this.supplierId = option.supplierId
this.queryData()
},
methods: {
back,
queryData() {
getStoreList().then((res) => {
console.log('==', res)
this.enterpriseList = res
})
},
//
checkCompany(item) {
let isVip = new Date().getTime() - new Date(item.vipExpireDate).getTime() < 0
this.$store.commit('setSupplierInfo', {
id: item.id,
name: item.name,
fddEnterpriseStatus: item.fddEnterpriseStatus,
supplierId: item.supplierId,
isVip
})
go2('mall')
}
}
}
</script>
<style lang="scss">
.check-mall {
.check-mall-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.check-mall-image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.check-mall-text {
line-height: 60rpx;
margin-left: 20rpx;
width: 75%;
}
.check-mall-textTitle {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
}
.check-mall-text-textSubTitle {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
line-height: 32rpx;
font-weight: 400;
}
.check-mall-sure {
padding-top: 20rpx;
}
.check-mall-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.check-mall-image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.check-mall-text {
line-height: 60rpx;
margin-left: 20rpx;
width: 75%;
}
.check-mall-textTitle {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
}
.check-mall-text-textSubTitle {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
line-height: 32rpx;
font-weight: 400;
}
.check-mall-sure {
padding-top: 20rpx;
}
}
</style>
</style>

188
pages/user-info/index.vue

@ -1,104 +1,102 @@
<template>
<view class="user-info">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="user-info-title">用户名</view>
<view slot="left"></view>
<view slot="right">
<button type="primary" class="user-btn" @click="save">保存</button>
</view>
</uni-nav-bar>
</view>
<view class="user-contant">
<text class=""><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text>
<text class="user-text">请输入新的用户名</text>
</view>
<view class="">
<uni-easyinput maxlength="100" :inputBorder="false" type="textarea" class="user-info-input" v-model="name" placeholder="请输入内容"></uni-easyinput>
</view>
</view>
<view class="user-info">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="user-info-title">用户名</view>
<view slot="left"></view>
<view slot="right">
<button type="primary" class="user-btn" @click="save">保存</button>
</view>
</uni-nav-bar>
</view>
<view class="user-contant">
<text class=""><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text>
<text class="user-text">请输入新的用户名</text>
</view>
<view class="">
<uni-easyinput maxlength="100" :inputBorder="false" type="textarea" class="user-info-input" v-model="name" placeholder="请输入内容"></uni-easyinput>
</view>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
import { employeeName, } from '@/apis/setting.js'
export default {
data() {
return {
name:''
}
},
onLoad() {
this.name = this.$store.state.userInfo.name
},
methods: {
back,
save(){
if(this.name === '' || this.name === null){
uni.showToast({
title: '请完善信息',
icon: 'none'
})
return
}
var params = {
userId:this.$store.state.userInfo.userId,
name:this.name,
enterpriseId :this.$store.state.supplierInfo.id
}
employeeName(params).then(res => {
if (res) {
uni.showToast({
title: '修改成功',
icon: 'success'
})
syncStore()
setTimeout(() => {
back()
}, 1000)
}
})
}
}
}
import { employeeName } from '@/apis/setting.js'
export default {
data() {
return {
name: ''
}
},
onLoad() {
this.name = this.$store.state.userInfo.name
},
methods: {
back,
save() {
if (this.name === '' || this.name === null) {
uni.showToast({
title: '请完善信息',
icon: 'none'
})
return
}
var params = {
userId: this.$store.state.userInfo.userId,
name: this.name,
enterpriseId: this.$store.state.supplierInfo.id
}
employeeName(params).then((res) => {
if (res) {
uni.showToast({
title: '修改成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
}
})
}
}
}
</script>
<style lang="scss">
.user-info{
background-color: #FFFFFF;
height: 800rpx;
.user-info-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.user-btn{
height: 54rpx;
background: #007AFF;
border-radius: 27rpx;
font-size: 28rpx;
color: #FFFFFF;
letter-spacing: 0;
font-weight: 500;
line-height: 54rpx;
}
.user-text{
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.user-contant{
margin: 20rpx 32rpx;
}
.user-info-input {
background: #f7f8fa;
border-radius: 20rpx;
margin: 10rpx 32rpx 32rpx 32rpx;
width: 686rpx;
}
.user-info {
background-color: #ffffff;
height: 800rpx;
.user-info-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.user-btn {
height: 54rpx;
background: #007aff;
border-radius: 27rpx;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
line-height: 54rpx;
}
.user-text {
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.user-contant {
margin: 20rpx 32rpx;
}
.user-info-input {
background: #f7f8fa;
border-radius: 20rpx;
margin: 10rpx 32rpx 32rpx 32rpx;
width: 686rpx;
}
}
</style>

BIN
static/imgs/mall/top-bg.png

Before After
Width: 750  |  Height: 180  |  Size: 33 KiB

2
utils/hook.js

@ -119,7 +119,7 @@ export function uploadImage(sourceType = ['album', 'camera'], count = 1) {
},
fail: (err) => {
console.error('chooseImage error:', err)
reject(err)
resolve(null)
}
})
})

Loading…
Cancel
Save