Commit 65478d1d9ed7c6679533939ff182eb114942846c

Authored by 杨鑫
1 parent c5260599

'最新'

Showing 40 changed files with 1017 additions and 140 deletions
admin-web-master/src/utils/request.js
... ... @@ -17,13 +17,11 @@ let baseURL = ''
17 17 if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528'|| host === 'localhost:9529' ) {
18 18  
19 19 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1;
20   - // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server';
  20 + baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server';
21 21 // baseURL = 'http://172.16.61.125:9003';
22   -<<<<<<< HEAD
23   - baseURL = 'http://192.168.2.107:9003';
24   -=======
25   - baseURL = 'http://10.0.0.51:9003';
26   ->>>>>>> 9ffe7fd70c4f3476b43d932385794fadee51b6f0
  22 + // baseURL = 'http://192.168.2.107:9003';
  23 +
  24 + // baseURL = 'http://10.0.0.51:9003';
27 25 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1;
28 26 // baseURL = 'http://192.168.2.225:9003';
29 27  
... ...
admin-web-master/src/views/renovation/brand/form.vue
... ... @@ -23,7 +23,8 @@
23 23 <el-input v-model="form.brandName" placeholder="请输入品牌名称" />
24 24 </el-form-item>
25 25 <el-form-item label="logo" prop="brandLogo">
26   - <ImageUpload v-model="form.brandLogo" :limit="1" />
  26 + <ImageUpload filePath="bueniss" :value="form.brandLogo" inputtype="brandLogo" :limit="1"
  27 + @changimg="e=>changimg(e,'brandLogo')"></ImageUpload>
27 28 </el-form-item>
28 29 </el-form>
29 30 <span
... ... @@ -111,6 +112,9 @@ export default {
111 112 }
112 113 },
113 114 methods: {
  115 + changimg(e, type) {
  116 + this.form[type] = e
  117 + },
114 118 handleSubmit () {
115 119 this.$refs.form.validate(async val => {
116 120 this.loading = true
... ...
admin-web-master/src/views/renovation/brand/index.vue
... ... @@ -35,7 +35,7 @@
35 35 label="Logo"
36 36 >
37 37 <template v-slot="scope">
38   - <el-image :src="scope.row.brandLogo" :preview-src-list="[scope.row.brandLogo]" style="width: 100px;height: 100px" />
  38 + <el-image :src="$baseURL+scope.row.brandLogo" :preview-src-list="[scope.row.brandLogo]" style="width: 100px;height: 100px" />
39 39 </template>
40 40 </el-table-column>
41 41 <el-table-column
... ... @@ -96,6 +96,7 @@ export default {
96 96 this.getList()
97 97 },
98 98 methods: {
  99 +
99 100 async getList () {
100 101 this.loading = true
101 102 const { data } = await getBrandAll(this.query);
... ...
admin-web-master/src/views/renovation/commoditySystem/addCommodity.vue
... ... @@ -4,9 +4,9 @@
4 4 <el-card class="box-card" >
5 5 <div style="display:flex;justify-content: space-between;">
6 6 <div class="addTitle">商品详情</div>
7   - <el-button class="buttonHover"
  7 + <div><el-button class="buttonHover"
8 8 style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" @click="back">关闭</el-button>
9   - <el-button v-if="productItem.shelveState === 2" style="background-color: #3F9B6A;color: #fff" @click="examineShow(productData)">审核</el-button>
  9 + <el-button v-if="productItem.shelveState === 2" style="background-color: #3F9B6A;color: #fff" @click="examineShow(productData)">审核</el-button></div>
10 10 </div>
11 11 </el-card>
12 12 <el-card class="box-card">
... ... @@ -18,12 +18,12 @@
18 18 <div>商品卖点:{{ productItem.productBrief }}</div>
19 19 <div>
20 20 商品图片:
21   - <div>
  21 + <div >
22 22 <img
23 23 v-for="(item, index) in productItem.images"
24 24 :key="index"
25 25 class="proImage"
26   - :src="item.imgPath"
  26 + :src="$baseURL+item.imgPath"
27 27 alt=""
28 28 @click="handlePictureCardPreview(item)"
29 29 >
... ... @@ -220,7 +220,7 @@ export default {
220 220 this.details()
221 221 },
222 222 handlePictureCardPreview (item) {
223   - this.dialogImageUrl = item.imgPath;
  223 + this.dialogImageUrl = this.$baseURL+item.imgPath;
224 224 this.dialogVisible = true;
225 225 },
226 226  
... ...
admin-web-master/src/views/renovation/commoditySystem/index.vue
... ... @@ -73,7 +73,7 @@
73 73 />
74 74 <el-table-column label="商品主图" width="150" align="center">
75 75 <template slot-scope="scope">
76   - <img height="80" width="80" :src="scope.row.image" alt srcset>
  76 + <img height="80" width="80" :src="$baseURL+msgList(scope.row.image)" alt srcset>
77 77 </template>
78 78 </el-table-column>
79 79 <el-table-column prop="productName" label="商品名称" width="180" />
... ... @@ -262,6 +262,12 @@ export default {
262 262 },
263 263 // 方法集合
264 264 methods: {
  265 + msgList(list){
  266 + if(list && list!=''){
  267 + let strin = list.split(',')
  268 + return strin[0]
  269 + }
  270 + },
265 271 // 查看详情
266 272 Godetails (row) {
267 273 this.$refs.addCommodity.show(row.productId)
... ...
admin-web-master/src/views/shopRental/manage/index.vue
... ... @@ -68,7 +68,6 @@
68 68  
69 69 </template>
70 70 </el-table-column>
71   - </el-table-column>
72 71 <el-table-column label="合同类型">
73 72 <template slot-scope="scope">
74 73 {{scope.row.contractType}}
... ...
ceres-uniapp-master/components/canvasShow/basics/banner.vue
1 1 <template>
2 2 <div class="banner" :class="'terminal' + terminal">
3 3 <swiper class="swiper" :circular="true" :indicator-dots="false" :autoplay="true" :style="{'height':bannerHeight + 'rpx'}" @change="swiperChange">
4   - <swiper-item class="banner-item" v-for="(item,index) in bannerList" :key="index" :style="{backgroundImage: 'url('+ item.imageUrl +')'}" @click="jumpLink(item.jumpUrl)">
5   - <div class="a-link" @click="jumpLink(item.jumpUrl)"><img class="img" :src="item.imageUrl" v-show="item.imageUrl" mode="widthFix"></div>
  4 + <swiper-item class="banner-item" v-for="(item,index) in bannerList" :key="index" :style="{backgroundImage: 'url('+$hostUrl+ item.imageUrl +')'}" @click="jumpLink(item.jumpUrl)">
  5 + <div class="a-link" @click="jumpLink(item.jumpUrl)"><img class="img" :src=" $hostUrl+ item.imageUrl" v-show="item.imageUrl" mode="widthFix"></div>
6 6 </swiper-item>
7 7 </swiper>
8 8 <view class="swiper-dots" v-if="bannerList && bannerList.length > 1">
... ... @@ -41,7 +41,7 @@
41 41 pageSize: 10,
42 42 }
43 43 NET.request2(API.cereCarouselImage, pagesize, 'POST').then(res => {
44   - console.log('11111111111111',res)
  44 +
45 45 this.bannerList = res.data.content
46 46  
47 47 })
... ...
ceres-uniapp-master/components/canvasShow/canvasShowPage.vue
... ... @@ -120,8 +120,8 @@
120 120 <script>
121 121 // import comComponentMap from './componentMap'
122 122  
123   -import comBanner from '@/components/canvasShow/basics/banner'
124   -import comText from '@/components/canvasShow/basics/text'
  123 +import comBanner from '@/components/canvasShow/basics/banner.vue'
  124 +import comText from '@/components/canvasShow/basics/text.vue'
125 125 import comImageText from '@/components/canvasShow/basics/imageText'
126 126 import comBrandList from '@/components/canvasShow/basics/brandList'
127 127 import comCategoryList from '@/components/canvasShow/basics/categoryList'
... ...
ceres-uniapp-master/components/canvasShow/config/api.js
... ... @@ -2,9 +2,9 @@
2 2  
3 3 // 获取当前环境变量 true => 生产环境 false => 开发环境
4 4 // const BASEURL = process.env.VUE_APP_DOMAIN_PREFIX
5   -// const BASEURL = (process.env.NODE_ENV === 'production') ? 'http://8.130.38.56:8027/api' : 'http://8.130.38.56:8027/api'
6   -const BASEURL = (process.env.NODE_ENV === 'production') ? 'https://jy.scjysm.asia:18086/meserver/api' : 'https://jy.scjysm.asia:18086/meserver/api'
7   -// const BASEURL = (process.env.NODE_ENV === 'production') ? 'http://127.0.0.1:9007' : 'http://127.0.0.1:9007'
  5 +// const BASEURL = (process.env.NODE_ENV === 'production') ? 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' : 'http://10.0.0.51/api'
  6 +const BASEURL = (process.env.NODE_ENV === 'production') ? 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' : 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api'
  7 +
8 8  
9 9  
10 10 export const api = {
... ...
ceres-uniapp-master/config/api.js
1 1  
2   -// const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/admin-server'
3   -// const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/api'
4   -// const DOMAIN_PREFIXPING = 'http://192.168.2.7:9003'
5   -// const DOMAIN_PREFIX = 'http://192.168.2.7:9007'
6   -
7   -
8   -
9 2 const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server'
10 3 const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api'
11   -// const DOMAIN_PREFIXPING = 'http://192.168.2.225:9003'
12   -// const DOMAIN_PREFIX = 'http://192.168.2.225:9007'
  4 +// const DOMAIN_PREFIXPING = 'http://10.0.0.51:9003'
  5 +// const DOMAIN_PREFIX = 'http://10.0.0.51:9007'
13 6 // const host = `${window.location.protocol}//${window.location.host}`
14 7 // const DOMAIN_PREFIXPING = `${host}/cdwlMall/meserver/admin-server`
15 8 // const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api`
... ... @@ -47,8 +40,8 @@ const TERMINAL = 1
47 40 module.exports = {
48 41 terminal: TERMINAL, // 画布设备 1 小程序,2 H5,3 App 4 电脑
49 42 SettledMerchantPrefix: 'https://jy.scjysm.asia:18086/settled-merchant', //商家入驻链接
50   - // shareLink: DOMAIN_PREFIX + '/h5', // 分享地址
51   - shareLink: 'http://172.16.61.123:9007/h5', // 分享地址
  43 + shareLink: DOMAIN_PREFIX + '/h5', // 分享地址
  44 + // shareLink: 'http://172.16.61.123:9007/h5', // 分享地址
52 45  
53 46  
54 47 //登录注册
... ...
ceres-uniapp-master/main.js
... ... @@ -9,8 +9,17 @@ Vue.config.productionTip = false
9 9 import store from './store'
10 10 import _ from 'lodash'
11 11  
12   -import {jump,jumpToTabbar,goBack,getJumpParam} from './utils/jumpUtil'
13   -import {encrypt,decrypt,decryptall} from './utils/jiami.js'
  12 +import {
  13 + jump,
  14 + jumpToTabbar,
  15 + goBack,
  16 + getJumpParam
  17 +} from './utils/jumpUtil'
  18 +import {
  19 + encrypt,
  20 + decrypt,
  21 + decryptall
  22 +} from './utils/jiami.js'
14 23 Vue.prototype.$store = store
15 24 Vue.prototype.$lodash = _
16 25 Vue.prototype.$jump = jump
... ... @@ -20,11 +29,19 @@ Vue.prototype.$getJumpParam = getJumpParam
20 29 Vue.prototype.$encrypt = encrypt;
21 30 Vue.prototype.$decrypt = decrypt;
22 31 Vue.prototype.$decryptall = decryptall;
23   -Vue.prototype.$hostUrl =`${window.location.protocol}//${window.location.host}/cdwlMall`
  32 +// Vue.prototype.$hostUrl =`${window.location.protocol}//${window.location.host}/cdwlMall`
  33 +const host = window.location.host;
  34 +Vue.prototype.$hostUrl = `https://jy.scjysm.asia:18086/cdwlMall`
  35 +if (host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528' || host ===
  36 + '192.168.31.45:9528') {
  37 + Vue.prototype.$baseURL = 'https://jy.scjysm.asia:18086/cdwlMall'
  38 +} else {
  39 + Vue.prototype.$baseURL = `${window.location.protocol}//${window.location.host}/cdwlMall`
  40 +}
24 41 App.mpType = 'app'
25 42  
26 43 const app = new Vue({
27   - ...App
  44 + ...App
28 45 })
29 46 console.log(store)
30 47 -app.$mount()
  48 +app.$mount()
31 49 \ No newline at end of file
... ...
ceres-uniapp-master/pages/tabbar/cart/index.vue
... ... @@ -11,13 +11,19 @@
11 11 <!-- 购物车 -->
12 12 <view class="u-skeleton">
13 13 <view v-if="!isEmpty">
14   - <u-sticky bg-color="#fff">
  14 + <u-sticky bg-color="#fff" offsetTop="-84">
15 15 <view class="cart-bg u-skeleton-fillet">
16 16 <view class="cart-num-box">
17 17 <!-- <image
18   - class=" u-skeleton-fillet"
  18 + class="u-skeleton-fillet"
19 19 src="@/static/logoTop.png"
20 20 ></image> -->
  21 + <view>
  22 + <text class="num-box u-skeleton-fillet">共
  23 + <text class="num">{{ settleAccountsObj.allNum }}</text>
  24 + 件宝贝
  25 + </text>
  26 + </view>
21 27 <text
22 28 class="btn-box "
23 29 @click="showManage = !showManage"
... ... @@ -31,12 +37,7 @@
31 37 >完成
32 38 </text>
33 39 </view>
34   - <view>
35   - <text class="num-box u-skeleton-fillet">共
36   - <text class="num">{{ settleAccountsObj.allNum }}</text>
37   - 件宝贝
38   - </text>
39   - </view>
  40 +
40 41 </view>
41 42 </u-sticky>
42 43 <view class="cart-list-box">
... ... @@ -279,11 +280,18 @@ export default {
279 280 onShow() {
280 281 this.isFirstComeIn = true
281 282 this.loading = true
282   - this.userInfo = uni.getStorageSync('storage_key')
  283 + if (uni.getStorageSync('storage_key')) {
  284 + this.userInfo = uni.getStorageSync('storage_key')
  285 +
  286 + }else{
  287 + this.$jump('../../../pages_category_page2/userModule/login')
  288 + return
  289 + }
283 290 cacheKey = this.userInfo.buyerUserId + "cart_info"
284 291 this.dataList = defaultCartList
285 292 this.isEmpty = false
286 293 this.getDataList()
  294 +
287 295 },
288 296 methods: {
289 297 /**
... ...
ceres-uniapp-master/pages/tabbar/category/index.vue
... ... @@ -57,7 +57,7 @@
57 57 @click="goodsDateils(groupItem.shopId,groupItem.productId,groupItem.skuId)">
58 58  
59 59 <view>
60   - <image :src="groupItem.image" mode=""
  60 + <image :src="$baseURL+groupItem.image" mode=""
61 61 style="width:240rpx;height: 240rpx;margin-right: 10rpx;border-radius: 10rpx;">
62 62 </image>
63 63 <view class="tableTitle" style="-webkit-line-clamp: 1;display: -webkit-box;-webkit-box-orient: vertical;overflow: hidden;text-overflow: ellipsis;">{{groupItem.productName}}</view>
... ...
ceres-uniapp-master/pages/tabbar/index/index.vue
... ... @@ -162,6 +162,7 @@ export default {
162 162 canvasGet() {
163 163 var _this = this
164 164 var apiUrl = api.getCanvas + '?terminal=' + this.terminal + '&type=' + this.typeId
  165 +
165 166 if (this.shopId) {
166 167 apiUrl += '&shopId=' + this.shopId
167 168 }
... ... @@ -175,6 +176,7 @@ export default {
175 176 // })
176 177 NET.request(apiUrl, {}, 'GET').then(res => {
177 178 if (JSON.stringify(res.data) !== '{}') {
  179 + console.log(res.data.json)
178 180 var componentsData = JSON.parse(res.data.json)
179 181 this.componentsData = componentsData
180 182 }
... ... @@ -257,7 +259,7 @@ export default {
257 259 .topBox {
258 260 display: flex;
259 261 align-items: center;
260   - justify-content: space-between;
  262 + justify-content: flex-end;
261 263 width: 100%;
262 264 }
263 265  
... ...
ceres-uniapp-master/pages/tabbar/user/index.vue
... ... @@ -157,10 +157,15 @@
157 157 },
158 158 onShow() {
159 159 this.isFirstComeIn = true
  160 +
160 161 if (uni.getStorageSync('storage_key')) {
  162 +
161 163 this.cacheUserItem = uni.getStorageSync('storage_key');
  164 + this.handleGetUser()
  165 + }else{
  166 + this.$jump('../../../pages_category_page2/userModule/login')
162 167 }
163   - this.handleGetUser()
  168 +
164 169 },
165 170 methods: {
166 171 /**
... ...
lvdao-miniapp/pages.json
... ... @@ -457,7 +457,7 @@
457 457 "path": "rentPay/webView",
458 458 "style": {
459 459 "navigationBarBackgroundColor": "#FFFFFF",
460   - "navigationBarTitleText": "跳转"
  460 + "navigationBarTitleText": "支付中"
461 461 }
462 462 }
463 463 ]
... ...
lvdao-miniapp/pages/message/message.vue
... ... @@ -24,14 +24,15 @@
24 24 <view class="title">
25 25 <text>通知消息</text>
26 26 </view>
  27 +
27 28 <view class="describe">
28   - <text>{{tableList[0].content}}</text>
  29 + <text>{{tableList[0]?tableList[0].content:''}}</text>
29 30 </view>
30 31 </view>
31 32 </view>
32 33 <view class="more">
33 34 <!-- <view class="more-num">{{tableList.length}}</view> -->
34   - <view class="icon-more">{{formatDateTime(tableList[0].createdAt)}}</view>
  35 + <view class="icon-more">{{formatDateTime(tableList[0]?tableList[0].createdAt:'')}}</view>
35 36 </view>
36 37 </view>
37 38 <!-- <view class="list">
... ... @@ -275,6 +276,7 @@
275 276 },
276 277 getALL(){
277 278 this.$http.sendRequest('/cereMessageNotification/queryByPage','POST',this.pagesize,1).then(res => {
  279 +
278 280 this.tableList =res.data.data.content
279 281 })
280 282 },
... ...
lvdao-miniapp/pagesA/rentPay/goPay.vue
... ... @@ -52,16 +52,21 @@
52 52 },
53 53 methods: {
54 54 submit(){
55   - console.log(this.receivedMsg)
56 55  
57   - let obj = [{
58   - orderId:this.receivedMsg[0].tenementOrder,
59   - money:this.receivedMsg[0].paymentAmount,
60   - }]
61   - this.$http.sendRequest('/order/rentAggregatePayment','POST',obj,3).then(res => {
  56 + let arr = []
  57 + this.receivedMsg.map(item=>{
  58 + let obj = {
  59 + orderId:item.tenementOrder,
  60 + money:item.paymentAmount,
  61 + }
  62 + arr.push(obj)
  63 + })
  64 +
  65 + // return
  66 + this.$http.sendRequest('/order/rentAggregatePayment','POST',arr,3).then(res => {
62 67 console.log(JSON.parse(res.data.data).data.codeUrl)
63 68 if(res.data.data){
64   - uni.navigateTo({
  69 + uni.redirectTo({
65 70 url: `/pagesA/rentPay/webView?urls=${JSON.parse(res.data.data).data.codeUrl}`
66 71 })
67 72 }
... ...
lvdao-miniapp/pagesA/rentPay/rentPay.vue
... ... @@ -66,8 +66,8 @@
66 66 payNum: 1,
67 67 dayMsg: '',
68 68 show: false,
69   - payAll: 0,
70   - yingPayAll: 0,
  69 + payAll: 0.00,
  70 + yingPayAll: 0.00,
71 71 value: '',
72 72 list1: [],
73 73 checked: [],
... ... @@ -95,21 +95,26 @@
95 95 url: '/pages/login/login'
96 96 })
97 97 } else {
98   -
  98 +
  99 + this.$http.sendRequest('/order/refundToRent', 'POST', {
  100 + orderId:'202502101739156798173156287',type:2
  101 + },3).then(res => {
  102 +
  103 + })
99 104 this.$http.sendRequest('/cerePlatformMerchant/queryByPage', 'POST', {
100 105 pageSize: 10,
101 106 pageNumber: 0,
102 107 phone: uni.getStorageSync('user').phone
103 108 }).then(res => {
104   -
  109 +
105 110 if (res.data.code == '20004' || res.data.code == '20003') {
106 111 uni.navigateTo({
107 112 url: '/pages/login/login'
108 113 })
109 114 } else {
110   -
  115 + this.relatedMerchants = res.data.data.content[0].id
111 116 this.$http.sendRequest('/cerePropertyOrder/queryByName', 'POST', {
112   - relatedMerchants: res.data.data.content[0].id
  117 + relatedMerchants: res.data.data.content[0].id,
113 118 }, 1).then(res => {
114 119 if (res.data.data.length > 0) {
115 120 const listNew = []
... ... @@ -136,6 +141,7 @@
136 141 res.data.data[0].cerePropertyOrderList.map(item => {
137 142 if (item.payState == 0) {
138 143 this.yingPayAll += item.paymentAmount
  144 + this.yingPayAll = this.roundUpToTwoDecimals(this.yingPayAll)
139 145 this.payNum = item.payType
140 146 this.dayMsg = item.payDay
141 147 const zujin = {
... ... @@ -148,8 +154,6 @@
148 154 }
149 155 })
150 156 this.recordList = redList
151   -
152   -
153 157 }
154 158 })
155 159 }
... ... @@ -158,6 +162,9 @@
158 162  
159 163 },
160 164 methods: {
  165 + roundUpToTwoDecimals(num) {
  166 + return Math.ceil(num * 100) / 100;
  167 + },
161 168 quanxuan(e) {
162 169 this.payAll = 0
163 170 const allTrue = this.recordList.every(item => item.gouxuan)
... ... @@ -179,8 +186,10 @@
179 186 xuanAll(item, e) {
180 187 if (e.value) {
181 188 this.payAll += item.paymentAmount
  189 + this.payAll = this.roundUpToTwoDecimals(this.payAll)
182 190 } else {
183 191 this.payAll -= item.paymentAmount
  192 + this.payAll = this.roundUpToTwoDecimals(this.payAll)
184 193 }
185 194 },
186 195 recordXq(item) {
... ... @@ -190,9 +199,10 @@
190 199 })
191 200 },
192 201 toDetail() {
  202 +
193 203 const msg = JSON.stringify(this.list1[this.ListIndex])
194 204 uni.navigateTo({
195   - url: `/pagesA/rentPay/rentPayDetails?msg=${msg}`
  205 + url: `/pagesA/rentPay/rentPayDetails?msg=${msg}&merchants=${this.relatedMerchants}`
196 206 })
197 207 },
198 208 joinShow() {
... ... @@ -225,15 +235,19 @@
225 235 this.yingPayAll = 0
226 236 this.payAll = 0
227 237 this.list1[index].list.map(item => {
228   - this.yingPayAll += item.paymentAmount
229   - this.payNum = item.payType
230   - this.dayMsg = item.payDay
231   - const zujin = {
232   - ...item,
233   - showItem: false,
234   - gouxuan: false,
  238 + if (item.payState == 0) {
  239 + this.yingPayAll += item.paymentAmount
  240 + this.yingPayAll = this.roundUpToTwoDecimals(this.yingPayAll)
  241 + this.payNum = item.payType
  242 + this.dayMsg = item.payDay
  243 + const zujin = {
  244 + ...item,
  245 + showItem: false,
  246 + gouxuan: false,
  247 + }
  248 + redList.push(zujin)
235 249 }
236   - redList.push(zujin)
  250 +
237 251 })
238 252 this.recordList = redList
239 253  
... ...
lvdao-miniapp/pagesA/rentPay/rentPayDetails.scss
... ... @@ -65,4 +65,12 @@
65 65 border-bottom: unset;
66 66 }
67 67 }
  68 +}
  69 +.nonemsg{
  70 + color: #0FBB59;
  71 + font-size: 18px;
  72 + width: 100%;
  73 + margin-top: 10%;
  74 + text-align: center;
  75 +
68 76 }
69 77 \ No newline at end of file
... ...
lvdao-miniapp/pagesA/rentPay/rentPayDetails.vue
... ... @@ -10,21 +10,24 @@
10 10 <view class="record-list">
11 11 <view class="record-item" v-for="(item, index) in dataList" :key="index" >
12 12 <view class="info-title">
13   - <view class="title">{{item.tenementOrderDate}}</view>
14   - <!-- <view class="right"><view class="price"><u-icon name="rmb" style="font-size: 24rpx;" />{{orderPay}}</view></view> -->
  13 + <!-- <view class="title">{{formatDate(item.tenementOrderDate)}}</view> -->
  14 + <view class="right"><view class="price"><u-icon name="rmb" style="font-size: 24rpx;" />{{item.dingPay}}</view></view>
15 15 </view>
16   - <view class="info-items">
  16 + <view class="info-items" v-for="(value, ids) in item.ziList">
17 17 <view class="info-item">
18   - <view class="left title">{{item.tenementOrder}}</view>
19   - <view class="right"><view class="price"><u-icon name="rmb" style="font-size: 24rpx;" />{{item.paymentAmount}}</view></view>
  18 + <view class="left title">{{value.tenementOrderParent==''?value.tenementOrder:value.tenementOrderParent}}</view>
  19 + <view class="right"><view class="price"><u-icon name="rmb" style="font-size: 24rpx;" />{{value.paymentAmount}}</view></view>
20 20 </view>
21 21 <view class="info-item">
22   - <view class="left" style="color: #0FBB59;">支付成功</view>
23   - <view class="right" style="color: #8A8A8A;">{{item.paymentTime}}</view>
  22 + <view class="left" style="color: #0FBB59;">{{value.payState==1?'支付成功':''}}</view>
  23 + <view class="right" style="color: #8A8A8A;">{{formatDateTime(value.paymentTime)}}</view>
24 24 </view>
25 25 </view>
26 26 </view>
27 27 </view>
  28 + <view v-if="dataList.length === 0" class="nonemsg">
  29 + 暂无数据
  30 + </view>
28 31 </view>
29 32 </template>
30 33  
... ... @@ -34,38 +37,142 @@
34 37 return {
35 38 show: false,
36 39 dataList: [],
37   - orderPay:0,
38 40 allPay:0,
39 41 pageIndex:{
40 42 time:''
41   - }
  43 + },
  44 + merchants:''
42 45 }
43 46 },
44   - onShow() {
  47 + onShow(){
45 48 this.pageIndex.time = this.getCurrentYear()
46 49 },
47 50 onLoad(options) {
48   - if(options.msg){
49   - this.orderPay = 0
  51 + if(options.msg && options.merchants){
50 52 this.allPay = 0
51 53 let receivedMsg = JSON.parse(options.msg)
52   -
53   - receivedMsg.list.map(item=>{
54   - this.orderPay+=item.paymentAmount
55   - this.allPay+=item.paymentAmount
56   - })
57   - this.dataList = receivedMsg.list
  54 + this.merchants = options.merchants
  55 + this.getAll(receivedMsg.list)
58 56 }
59 57 },
60 58 methods: {
  59 + getAll(receivedMsg){
  60 + let totalPay= 0
  61 + const redList = []
  62 + // 用于存储 tenementOrderParent 相同的项
  63 + const groupedItems = {};
  64 + // 遍历 receivedMsg.list 数组
  65 + receivedMsg.forEach(item => {
  66 + if(item.payState ==1){
  67 + totalPay += item.paymentAmount
  68 + if (item.tenementOrderParent === '') {
  69 + // 如果 tenementOrderParent 为空,添加 dingPay 字段并添加到 redList
  70 + let newItem = { ...item,ziList:[], dingPay: item.paymentAmount };
  71 + newItem.ziList.push(item)
  72 + redList.push(newItem);
  73 + } else {
  74 + // 如果 tenementOrderParent 不为空,将相同 tenementOrderParent 的项分组
  75 + if (!groupedItems[item.tenementOrderParent]) {
  76 + groupedItems[item.tenementOrderParent] = {
  77 + ziList: [],
  78 + dingPay: 0
  79 + };
  80 + }
  81 + groupedItems[item.tenementOrderParent].ziList.push(item);
  82 + groupedItems[item.tenementOrderParent].dingPay += item.paymentAmount;
  83 + groupedItems[item.tenementOrderParent].paymentTime = item.paymentTime;
  84 + groupedItems[item.tenementOrderParent].payDay = item.payDay;
  85 + groupedItems[item.tenementOrderParent].payState = item.payState;
  86 + }
  87 + }
  88 +
  89 + });
  90 + // 将分组后的对象添加到 redList
  91 + for (const key in groupedItems) {
  92 + redList.push({
  93 + tenementOrderParent: key,
  94 + ...groupedItems[key]
  95 + });
  96 + }
  97 +
  98 + // receivedMsg.list.map(item=>{
  99 + // let obj ={
  100 + // ...item,
  101 + // dingPay:0,
  102 + // ziList:[]
  103 + // }
  104 + // if (item.payState == 1) {
  105 + // obj.ziList.push(item)
  106 + // if(item.tenementOrderParent ){
  107 +
  108 + // }
  109 + // obj.dingPay +=item.paymentAmount
  110 + // this.orderPay+=item.paymentAmount
  111 + // this.allPay+=item.paymentAmount
  112 + // redList.push(obj)
  113 + // }
  114 +
  115 + // })
  116 + this.allPay = totalPay;
  117 + this.dataList = redList
  118 +
  119 + },
61 120 getCurrentYear() {
62 121 const year = new Date().getFullYear();
63 122 return `${year}`;
64 123 },
65 124 confirm(e){
66   -
67 125 this.pageIndex.time = e.year
68   - }
  126 +
  127 + const { firstDay, lastDay } = this.getYearFirstAndLastDay(e.year)
  128 + this.$http.sendRequest('/cerePropertyOrder/queryByName', 'POST', {
  129 + relatedMerchants:this.merchants,
  130 + paymentTimeStart:firstDay,
  131 + paymentTimeEnd:lastDay
  132 + }, 1).then(res => {
  133 + if (res.data.data.length > 0) {
  134 +
  135 + this.getAll(res.data.data[0].cerePropertyOrderList)
  136 + }else{
  137 + this.dataList=[]
  138 + this.allPay = 0
  139 + }
  140 + })
  141 + },
  142 + getYearFirstAndLastDay(year) {
  143 + console.log(year)
  144 + const firstDay = new Date(year, 0, 1);
  145 + const lastDay = new Date(year, 11, 31);
  146 + console.log(firstDay.toISOString().split('T'))
  147 + return {
  148 + firstDay: firstDay.toISOString().split('T')[0],
  149 + lastDay: lastDay.toISOString().split('T')[0]
  150 + }
  151 + },
  152 + formatDateTime(dateTimeStr) {
  153 + // 创建 Date 对象
  154 + const date = new Date(dateTimeStr);
  155 + // 获取月份,由于 getMonth() 返回值从 0 开始,所以要加 1,并确保为两位数字
  156 + const month = String(date.getMonth() + 1).padStart(2, '0');
  157 + // 获取日期,并确保为两位数字
  158 + const day = String(date.getDate()).padStart(2, '0');
  159 + // 获取小时,并确保为两位数字
  160 + const hours = String(date.getHours()).padStart(2, '0');
  161 + // 获取分钟,并确保为两位数字
  162 + const minutes = String(date.getMinutes()).padStart(2, '0');
  163 +
  164 + // 按照所需格式拼接并返回结果
  165 + return `${month}.${day} ${hours}:${minutes}`;
  166 + },
  167 + formatDate(dateStr) {
  168 + // 使用 split 方法将日期字符串按 - 分割成数组
  169 + const [year, month, day] = dateStr.split('-');
  170 + // 将 month 和 day 转换为数字,去除可能存在的前导零
  171 + const formattedMonth = parseInt(month, 10);
  172 + const formattedDay = parseInt(day, 10);
  173 + // 按照目标格式拼接字符串
  174 + return `${formattedMonth}月${formattedDay}号`;
  175 + },
69 176 }
70 177 }
71 178 </script>
... ...
lvdao-miniapp/pagesA/rentPay/webView.vue
... ... @@ -11,15 +11,20 @@
11 11 url:'https://test-pay.028wlkj.com/fixedPay?payId=CDWLOLE490393BE9E049D29766DB184366132F'
12 12 }
13 13 },
14   -
  14 + onBackPress() {
  15 + // 拦截返回事件
  16 + uni.redirectTo({
  17 + url: '/pagesA/rentPay/rentPay'
  18 + });
  19 + return true;
  20 + },
15 21 onLoad(options) {
16 22 if(options.urls){
17 23 this.url = options.urls
18 24 }
19 25 },
20 26 mounted() {
21   - // 可选:在组件挂载后进行一些验证或处理
22   - console.log('加载的网址:', this.webUrl);
  27 +
23 28 }
24 29 }
25 30 </script>
... ...
lvdao-miniapp/utils/request.js
... ... @@ -17,25 +17,27 @@ const sendRequest = (url, method = &#39;GET&#39;, data = {}, baseUrl,contentType) =&gt; {
17 17 // bases = 'http://172.16.61.125:9003/' + url;
18 18 // bases = 'http://172.16.61.123/cdwlMall/admin-server' + url;
19 19 // bases = 'http://8.130.38.56:8027/admin-server' + url;
20   - // bases = 'https://jy.scjysm.asia:18086/cdwlMall/admin-server' + url;
  20 + bases = 'https://jy.scjysm.asia:18086/cdwlMall/admin-server' + url;
21 21  
22   - bases = 'http://192.168.2.107:9003' + url;
  22 + // bases = 'http://10.0.0.51:9003' + url;
23 23 // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/admin-server' + url;
24   - // bases = 'https://jy.scjysm.asia:18086/admin-server' + url;
  24 +
25 25  
26 26  
27 27 }else if(baseUrl == 3){
28   - bases = 'http://192.168.2.107:9007' + url;
  28 + bases = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' + url;
  29 + // bases = 'http://192.168.2.107:9007' + url;
  30 + // bases = 'http://10.0.0.51:9007' + url;
29 31  
30 32 }else{
31 33 // bases = 'http://172.16.61.125:9004/' + url;
32 34 // bases = 'http://172.16.61.48/business-server' + url;
33 35 // bases = 'http://172.16.61.123/cdwlMall/business-server' + url;
34   - // bases = 'https://jy.scjysm.asia:18086/cdwlMall/business-server' + url;
  36 + bases = 'https://jy.scjysm.asia:18086/cdwlMall/business-server' + url;
35 37  
36   - bases = 'http://192.168.2.107:9004' + url;
  38 + // bases = 'http://10.0.0.51:9004' + url;
37 39 // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/business-server' + url;
38   - // bases = 'https://jy.scjysm.asia:18086/merchant-business' + url;
  40 +
39 41 }
40 42 var token = uni.getStorageSync('token') || '';
41 43 var shopId = uni.getStorageSync('shopId') || '';
... ...
merchant-web-master/src/api/commodityLease.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +// 上传合同
  3 +
  4 +export function miniioupload(data) {
  5 + return request({
  6 + url: '/miniio/upload',
  7 + method: 'post',
  8 + data,
  9 + headers: {
  10 + 'Content-Type': 'multipart/form-data'
  11 + }
  12 + })
  13 +}
... ...
merchant-web-master/src/assets/images/cover.svg 0 → 100644
  1 +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><defs><style>.a,.b,.c{fill:none;}.b,.c{stroke:rgba(255,255,255,0.9);stroke-linecap:round;stroke-linejoin:round;}.b{stroke-miterlimit:10;}</style></defs><g transform="translate(-530 -1091)"><g transform="translate(-14 -55)"><rect class="a" width="16" height="16" transform="translate(544 1146)"/></g><g transform="translate(525.727 1086.896)"><path class="b" d="M17.153,13.834v6.622a.7.7,0,0,1-.7.7H6.7a.7.7,0,0,1-.7-.7V10.7a.7.7,0,0,1,.7-.7h6.4" transform="translate(0 -2.739)"/><path class="b" d="M12,24.17l2.091-2.8,1.046,1.046,1.22-1.917,2.614,3.67Z" transform="translate(-3.909 -9.579)"/></g><path class="c" d="M28.726,7.59l1.3,1.308,2.5-2.5" transform="translate(511.984 1087.283)"/></g></svg>
0 2 \ No newline at end of file
... ...
merchant-web-master/src/assets/images/fengmian.png 0 → 100644

1.55 KB

merchant-web-master/src/assets/images/logo2.png 0 → 100644

3.06 KB

merchant-web-master/src/components/BaseImage/index.vue 0 → 100644
  1 +<template>
  2 + <!-- 支持官方文档Attributes、event -->
  3 + <div class="base-img-box">
  4 + <el-image
  5 + class="base-img"
  6 +
  7 + :lazy="false"
  8 + fit="cover"
  9 + :src="realSrc"
  10 + :preview-teleported="true"
  11 + :preview-src-list="isPreview ? [realSrc] : null"
  12 + ref="baseImgRef"
  13 + />
  14 + <div class="base-img-mask-layer" v-if="isSetCover">
  15 + <div class="mask-layer-box">
  16 + <div class="mask-layer-item" @click="handleLook">
  17 + <el-icon size="20" class="el-icon-zoom-in" style="color:#fff"></el-icon>
  18 + </div>
  19 + <div class="mask-layer-item" @click="handleDelete">
  20 + <el-icon size="20" class="el-icon-delete" style="color:#fff"></el-icon>
  21 + </div>
  22 + <div
  23 + class="mask-layer-item"
  24 + @click="handleSetCover"
  25 + v-if="forIndex !== onforIndex"
  26 + >
  27 + <img
  28 + class="mask-layer-item-icon"
  29 + src="@/assets/images/cover.svg"
  30 + alt=""
  31 + />
  32 + </div>
  33 + </div>
  34 + </div>
  35 + <div class="fengmian" v-if="forIndex === onforIndex && isSetCover">
  36 + <img src="@/assets/images/fengmian.png" alt="" />
  37 + </div>
  38 + </div>
  39 +</template>
  40 +
  41 +<script>
  42 +// import { reqFileFullUrl } from '@/api/commonApi/file';
  43 +// import envConfig from '@/utils/envConfig';
  44 +// import { toFullUrl } from '@/utils/index';
  45 +// import { ZoomIn, Delete } from '@element-plus/icons-vue';
  46 +
  47 +export default {
  48 + name: 'BaseImage',
  49 + props: {
  50 + onforIndex: {
  51 + type: Number,
  52 + default: 0,
  53 + },
  54 + src: {
  55 + type: String,
  56 + required: true,
  57 + },
  58 + // 获取完整预览路径
  59 + getFull: {
  60 + type: Boolean,
  61 + default: true,
  62 + },
  63 + // 是否开启图片预览
  64 + isPreview: {
  65 + type: Boolean,
  66 + default: true,
  67 + },
  68 + // 是否开启图片预览
  69 + code: {
  70 + type: Number,
  71 + default: 5000,
  72 + },
  73 + // 资源类型 sys:系统资源 business: 业务资源 用于区分上传路径
  74 + resourceType: {
  75 + type: String,
  76 + default: 'business',
  77 + },
  78 + isSetCover: {
  79 + type: Boolean,
  80 + default: false,
  81 + },
  82 + forIndex: {
  83 + type: Number,
  84 + default: 9999,
  85 + },
  86 + },
  87 + data() {
  88 + return {
  89 + accessUrl: '',
  90 + baseImgRef: null,
  91 + };
  92 + },
  93 + computed: {
  94 + realSrc() {
  95 + return this.accessUrl;
  96 + },
  97 + },
  98 + watch: {
  99 + src: {
  100 + immediate: true,
  101 + handler(newValue) {
  102 + if (newValue && this.getFull) {
  103 + this.getFileFullUrl();
  104 + }
  105 + },
  106 + },
  107 + },
  108 + methods: {
  109 + getFileFullUrl() {
  110 + if (!this.src) return;
  111 + if (process.env.NODE_ENV == 'development') {
  112 + this.accessUrl = this.$baseURL + this.src; //开发环境
  113 + } else {
  114 + this.accessUrl = this.$baseURL + this.src; //发布环境
  115 + }
  116 + },
  117 + handleLook() {
  118 + this.$refs.baseImgRef.$el.children[0].click();
  119 + },
  120 + handleDelete() {
  121 + this.$emit('handleDelete');
  122 + },
  123 + handleSetCover() {
  124 + this.$emit('handleSetCover');
  125 + },
  126 + },
  127 +};
  128 +</script>
  129 +
  130 +<style lang="scss" scoped>
  131 +.base-img-box {
  132 + width: 100%;
  133 + height: 100%;
  134 + position: relative;
  135 + .base-img {
  136 + width: 100%;
  137 + height: 100%;
  138 + }
  139 + .base-img-mask-layer {
  140 + display: none;
  141 + width: 100%;
  142 + height: 100%;
  143 + position: absolute;
  144 + top: 0;
  145 + left: 0;
  146 + z-index: 1;
  147 + .mask-layer-box {
  148 + background-color: rgba($color: #000000, $alpha: 0.5);
  149 + width: 100%;
  150 + height: 100%;
  151 + display: flex;
  152 + justify-content: space-around;
  153 + align-items: center;
  154 + .mask-layer-item {
  155 + position: relative;
  156 + z-index: 2;
  157 + cursor: pointer;
  158 + .mask-layer-item-icon {
  159 + width: 20px;
  160 + height: 20px;
  161 + }
  162 + }
  163 + }
  164 + }
  165 +
  166 + &:hover .base-img-mask-layer {
  167 + display: block;
  168 + }
  169 + .fengmian {
  170 + position: absolute;
  171 + top: 6px;
  172 + right: 9px;
  173 + img {
  174 + width: 31px;
  175 + height: 36px;
  176 + }
  177 + }
  178 +}
  179 +</style>
0 180 \ No newline at end of file
... ...
merchant-web-master/src/components/ImageUpload/index.vue 0 → 100644
  1 +<template>
  2 + <div class="upload-container">
  3 + <div class="tips" v-if="!options.disabled">
  4 + 请上传小于{{ options.limitSize }}M,格式为{{
  5 + options.accept
  6 + }}格式的图片,最多可上传{{ options.limit }}张
  7 + </div>
  8 + <div class="card-list-box">
  9 + <div v-for="(file, i) in localValue" :key="'upload-BaseImage' + i" class="card-item-box">
  10 + <BaseImage :src="file.imgPath" fit="contain" class="card-img" :code="options.reqParams.code"
  11 + :filePath="filePath" @handleDelete="handleDeleteImg(file, i)"
  12 + @handleSetCover="handleSetCover(file, i)" :isSetCover="cmpOption.isSetCover" :forIndex="i" :onforIndex="onforIndex"/>
  13 + <div v-show="!options.disabled && !cmpOption.isSetCover" title="删除" class="delete-box"
  14 + @click="handleDeleteImg(file, i)">
  15 + <i class="el-icon-close"></i>
  16 + </div>
  17 + </div>
  18 + <div v-for="(file, i) in reactiveData.filesIng" :key="i" class="card-item-box">
  19 + <div v-show="reactiveData.status === 'uploading'" class="uploading-box flex-col-center-center">
  20 + <el-progress v-if="reactiveData.lengthComputable" type="circle" :width="50"
  21 + :percentage="uploadPercentage()" />
  22 + <template v-else>
  23 + <i class="el-icon-loading"></i>
  24 + {{ reactiveData.message }}
  25 + </template>
  26 + </div>
  27 + </div>
  28 + <div style="position: relative;">
  29 + <input :accept="options.accept" style="opacity: 0;position: absolute;" :id="inputtype" ref="fileInput" type="file" :multiple="true"
  30 + @change="handleUploadFile" />
  31 + <div v-if="
  32 + localValue && localValue.length < options.limit && !options.disabled
  33 + " title="点击上传" class="card-action-box" @click="handleUpload">
  34 + <i class="el-icon-plus"></i>
  35 + <span class="card-action-text">点击上传图片</span>
  36 + </div>
  37 +
  38 + </div>
  39 + </div>
  40 + </div>
  41 +</template>
  42 +
  43 +<script>
  44 + import {
  45 + miniioupload
  46 + } from '@/api/commodityLease.js'
  47 + import BaseImage from '@/components/BaseImage/index.vue';
  48 +
  49 + export default {
  50 + components: {
  51 + BaseImage,
  52 + },
  53 + name: 'BaseUpload',
  54 + props: {
  55 + value: {
  56 + type: String,
  57 + default: '',
  58 + },
  59 + cmpOption: {
  60 + type: Object,
  61 + default: () => ({
  62 + disabled: false,
  63 + isSetCover: true,
  64 + }),
  65 + },
  66 + filePath: {
  67 + type: String,
  68 + default: 'other',
  69 + },
  70 + inputtype: {
  71 + type: String,
  72 + default: '',
  73 + },
  74 + limit: {
  75 + type: Number,
  76 + default: 10,
  77 + },
  78 + },
  79 + data() {
  80 + return {
  81 + fileList:[],
  82 + onforIndex:0,
  83 + localValue: [],
  84 + options: {
  85 + limitSize: 10,
  86 + accept: '.bmp,.jpg,.jpeg,.png',
  87 + multiple: false,
  88 + limit: 10,
  89 + disabled: false,
  90 + field: 'files',
  91 + reqParams: {
  92 + code: 2000
  93 + },
  94 + },
  95 + reactiveData: {
  96 + files: [],
  97 + filesIng: [],
  98 + status: 'uploading',
  99 + message: '上传中...',
  100 + total: 0,
  101 + loaded: 0,
  102 + lengthComputable: false,
  103 + },
  104 + };
  105 + },
  106 + watch: {
  107 + limit: {
  108 + handler() {
  109 + this.options.limit= this.limit
  110 + },
  111 + immediate: true,
  112 + },
  113 + cmpOption: {
  114 + handler() {
  115 + this.setOptions();
  116 + },
  117 + immediate: true,
  118 + },
  119 + value: {
  120 + handler(val) {
  121 + console.log('val',val)
  122 + if (val && val !='') {
  123 + // 首先将值转为数组
  124 + const list = Array.isArray(val) ? val : this.value.split(',')
  125 + // 然后将数组转为对象数组
  126 + this.fileList = list
  127 + this.localValue = list.map(item => {
  128 + if (typeof item === 'string') {
  129 + item = {
  130 + imgPath: item,
  131 + }
  132 + }
  133 + console.log('1111111111111111',item)
  134 + return item
  135 + })
  136 + } else {
  137 + console.log('22222222222222222222')
  138 + this.localValue = []
  139 + this.fileList = []
  140 + return []
  141 + }
  142 + },
  143 + immediate: true,
  144 + },
  145 + },
  146 + methods: {
  147 + async handleUploadFile(value) {
  148 + const files = value.target.files
  149 + if (!this.filesCheck(files)) {
  150 + return;
  151 + }
  152 + this.reactiveData.filesIng = new Array(files.length);
  153 + this.reactiveData.lengthComputable = false;
  154 + this.reactiveData.status = 'uploading';
  155 + this.reactiveData.total = 0;
  156 + this.reactiveData.loaded = 0;
  157 + let c1 = await this.asyncFileUpload(Array.from(files));
  158 + let list = []
  159 + for (let i = 0; i < c1.length; i++) {
  160 + let info = {
  161 + imgPath:c1[i]
  162 + }
  163 + list.push(info)
  164 + }
  165 + this.localValue = [...this.localValue,...list]
  166 + this.reactiveData.filesIng = []
  167 + this.fileList = []
  168 + for (let i = 0; i < this.localValue.length; i++) {
  169 + this.fileList.push(this.localValue[i].imgPath)
  170 + }
  171 + let urlstr = this.fileList.join(',')
  172 + this.$emit('changimg',urlstr)
  173 +
  174 + },
  175 + setOptions() {
  176 + this.options = {
  177 + ...this.options,
  178 + ...this.cmpOption
  179 + };
  180 + },
  181 + uploadPercentage() {
  182 + return parseInt(String(this.reactiveData.loaded / (this.reactiveData.total / 100)));
  183 + },
  184 + handleUpload() {
  185 + const input = document.querySelector('#'+this.inputtype)
  186 + input.click()
  187 + },
  188 + async asyncFileUpload(formDataArray) {
  189 +
  190 + try {
  191 + // 初始化上传状态
  192 + this.reactiveData.status = 'uploading';
  193 + this.reactiveData.filesIng = formDataArray.map(() => ({
  194 + status: 'pending',
  195 + loaded: 0,
  196 + total: 0
  197 + }));
  198 + this.reactiveData.lengthComputable = false;
  199 + this.reactiveData.total = 0;
  200 + this.reactiveData.loaded = 0;
  201 + let list = []
  202 + // 循环遍历每个文件并进行上传
  203 + for (let i = 0; i < formDataArray.length; i++) {
  204 + const fileData = formDataArray[i];
  205 +
  206 + // 创建一个新的 FormData 对象
  207 + let fd = new FormData();
  208 + fd.append('file', fileData); // 假设 formData 包含文件
  209 + fd.append('filePath', this.filePath);
  210 +
  211 + // 更新当前文件的上传状态
  212 + this.reactiveData.filesIng[i].status = 'uploading';
  213 +
  214 + // 调用 miniioupload 方法并等待响应
  215 + const res = await miniioupload(fd);
  216 + list.push(res.data)
  217 + // 处理成功响应
  218 + this.reactiveData.filesIng[i].status = 'success';
  219 +
  220 + }
  221 +
  222 + // 所有文件上传完成
  223 + this.reactiveData.status = 'success';
  224 + this.$message.success('文件上传成功');
  225 +
  226 + return list
  227 + } catch (error) {
  228 + // 处理错误
  229 + console.error('上传失败:', error);
  230 + this.reactiveData.status = 'error';
  231 + this.reactiveData.filesIng = formDataArray.map(() => ({
  232 + status: 'error',
  233 + loaded: 0,
  234 + total: 0
  235 + }));
  236 + this.$message.error('上传失败');
  237 + return []
  238 + }
  239 + },
  240 + async handleDeleteImg(file, i) {
  241 + console.error('1111111111111111111',file, i)
  242 + let modelValue_ = this.localValue.filter((value, index) => index != i);
  243 + this.localValue = modelValue_
  244 + this.fileList = []
  245 + for (let i = 0; i < this.localValue.length; i++) {
  246 + this.fileList.push(this.localValue[i].imgPath)
  247 + }
  248 + let urlstr = this.fileList.join(',')
  249 + console.log('urlstr',urlstr)
  250 + this.$emit('changimg',urlstr)
  251 + },
  252 + async handleSetCover(file, i) {
  253 +
  254 + this.onforIndex = i
  255 + this.$emit('changfmindex',this.onforIndex)
  256 + },
  257 + filesCheck(files) {
  258 + const {
  259 + limitSize,
  260 + accept,
  261 + limit
  262 + } = this.options;
  263 + if (this.reactiveData.files.length + files.length > limit) {
  264 + this.$message.error(`最多上传${limit}个文件`);
  265 + return false;
  266 + }
  267 + for (let index = 0; index < files.length; index++) {
  268 + const file = files[index];
  269 + if (!this.checkFileType(file)) {
  270 + this.$message.error(`请上传${accept}等格式`);
  271 + return false;
  272 + }
  273 + if (!this.checkSize(file)) {
  274 + this.$message.error(`文件大小不能超过 ${limitSize}MB!`);
  275 + return false;
  276 + }
  277 + }
  278 +
  279 + return true;
  280 + },
  281 + checkSize({
  282 + size
  283 + }) {
  284 + return size <= this.options.limitSize * 1024 * 1024;
  285 + },
  286 + checkFileType(file) {
  287 +
  288 + let {
  289 + accept
  290 + } = this.options;
  291 + if (!accept || accept === '*') {
  292 + return true;
  293 + }
  294 + accept = accept.toLowerCase().replace(/\s/g, '');
  295 + const acceptTypeList = accept.split(',');
  296 + const fileType = file.name.match(/\.\w*$/)?.shift() ?? '';
  297 + return acceptTypeList.includes(fileType.toLowerCase());
  298 + },
  299 + },
  300 + };
  301 +</script>
  302 +
  303 +<style lang="scss" scoped>
  304 + .upload-container {
  305 + width: 100%;
  306 +
  307 + .tips {
  308 + color: #0006;
  309 + font: 14px 'Alibaba PuHuiTi 2.0-55 Regular';
  310 + line-height: 38px;
  311 + }
  312 +
  313 + .action-box {
  314 + cursor: pointer;
  315 + padding-left: 10px;
  316 +
  317 + .default-action {
  318 + color: #3f9b6a;
  319 + }
  320 + }
  321 +
  322 + .card-list-box {
  323 + width: 100%;
  324 + display: flex;
  325 + flex-wrap: wrap;
  326 +
  327 + .card-item-box {
  328 + position: relative;
  329 + width: 112px;
  330 + height: 112px;
  331 + border: 1px dotted #dcdfe6;
  332 + border-radius: 2px;
  333 + overflow: hidden;
  334 + margin: 0 10px 10px 0;
  335 +
  336 + .delete-box {
  337 + padding: 2px 5px;
  338 + position: absolute;
  339 + right: 0;
  340 + top: 0;
  341 + line-height: normal;
  342 + background-color: #000;
  343 + color: #fff;
  344 + border-radius: 50%;
  345 + transform: translate(40%, -30%);
  346 +
  347 + .el-icon-close {
  348 + font-size: 12px;
  349 + transform: translate(-30%, 20%);
  350 + }
  351 + }
  352 + }
  353 +
  354 + .card-action-box {
  355 + display: flex;
  356 + flex-direction: column;
  357 + justify-content: center;
  358 + align-items: center;
  359 + width: 112px;
  360 + height: 112px;
  361 + border: 1px dashed #cdd0d6;
  362 + border-radius: 2px;
  363 + overflow: hidden;
  364 + // margin-bottom: 10px;
  365 + background-color: #fafafa;
  366 + cursor: pointer;
  367 + font-size: 12px;
  368 + color: #00000066;
  369 +
  370 + .el-icon-plus {
  371 + font-size: 20px;
  372 + }
  373 +
  374 + &:hover {
  375 + border-color: #3f9b6a;
  376 + color: #3f9b6a;
  377 + }
  378 + }
  379 + }
  380 +
  381 + .text-list-box {
  382 + .text-item-box {
  383 + padding: 0 5px;
  384 + border-radius: 2px;
  385 + overflow: hidden;
  386 +
  387 + .file-name {
  388 + flex: 1;
  389 + }
  390 +
  391 + .text-icon {
  392 + flex-shrink: 0;
  393 + padding-right: 10px;
  394 + }
  395 +
  396 + .el-icon-close {
  397 + cursor: pointer;
  398 + padding-left: 10px;
  399 + flex-shrink: 0;
  400 + }
  401 +
  402 + &:hover {
  403 + background-color: rgba(63, 155, 106, 0.2);
  404 +
  405 + .file-name {
  406 + color: #3f9b6a;
  407 + }
  408 + }
  409 +
  410 + &:nth-child(n + 2) {
  411 + margin-top: 10px;
  412 + }
  413 + }
  414 + }
  415 +
  416 + .uploading-box {
  417 + position: absolute;
  418 + top: 0;
  419 + left: 0;
  420 + width: 100%;
  421 + height: 100%;
  422 + color: #fff;
  423 + background-color: #c0c4cc;
  424 + }
  425 +
  426 + .progress-box {
  427 + width: 100%;
  428 + height: 100%;
  429 + position: relative;
  430 +
  431 + .el-progress {
  432 + position: absolute;
  433 + right: 10px;
  434 + top: 50%;
  435 + transform: translateY(-50%);
  436 + }
  437 + }
  438 + }
  439 +</style>
... ...
merchant-web-master/src/layout/index.vue
... ... @@ -2,14 +2,15 @@
2 2 <div :class="classObj" class="app-wrapper">
3 3 <div style=" width: 100%; height: 50px; background: #3F9B6A; position: fixed;top:0;left:0;z-index:1001;display: flex;flex-wrap: wrap; margin-bottom: 1px;">
4 4 <div style="width: 15%;margin-top: 8px;padding-left: 20px;">
5   - <img src="../assets/images/log2.png" alt="" style="height: 36px; object-fit: contain;" />
  5 + <img src="../assets/images/logo2.png" alt="" style="height: 36px; object-fit: contain;" />
6 6 </div>
7 7  
8   - <div style="position: absolute;top:0px;right:50px;display: flex">
9   - <div style="border-radius:20px; width: 100px; height: 24px;margin-top: 15px;margin-right: 10px;background:rgba(255, 255, 255, 0.1);display: flex;flex-flow: row nowrap;justify-content: center;
10   - align-items: center;" @click="gzt">
11   - <img src="../../src/assets/images/home.png" alt="" style="height: 20px;object-fit: contain;width:17px;margin-right:6px;"/>
12   - <div style="color: #fff;line-height: 20px;font-size:14px">工作台</div>
  8 + <div style="position: absolute;top:0px;right:50px;display: flex">
  9 + <div style="border-radius:20px; width: 110px; height: 30px;margin-top: 11px;margin-right: 10px;background:rgba(255, 255, 255, 0.1);display: flex;flex-flow: row nowrap;justify-content: center;
  10 + align-items: center;cursor: pointer;" @click="gzt">
  11 + <el-image src="https://028wlkj.cn:30021/public/static/logos/home-stable.png" style="padding:10px 0;"></el-image>
  12 + <!-- <img src="../../src/assets/images/home.png" alt="" style="height: 20px;object-fit: contain;width:17px;margin-right:6px;"/>
  13 + <div style="color: #fff;line-height: 20px;font-size:14px">工作台</div> -->
13 14 </div>
14 15 <!-- <div style="margin: 12px; 15px 0 10px">
15 16 <el-badge :value="2" class="item">
... ... @@ -214,7 +215,7 @@ export default {
214 215 },
215 216 methods: {
216 217 gzt(){
217   - window.location.href = 'https://jy.scjysm.asia:18086/home'
  218 + window.location.href = 'https://admin-uat.028wlkj.com:1020/application-manage'
218 219 },
219 220 handleClickOutside() {
220 221 this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
... ...
merchant-web-master/src/main.js
... ... @@ -18,6 +18,12 @@ Vue.prototype.$encrypt = encrypt;
18 18 Vue.prototype.$decrypt = decrypt;
19 19 Vue.prototype.$decryptall = decryptall;
20 20 Vue.prototype.$encryptall = encryptall;
  21 +let host = window.location.host;
  22 +if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528' || host === 'localhost:9529') {
  23 + Vue.prototype.$baseURL ='https://jy.scjysm.asia:18086/cdwlMall'
  24 +} else {
  25 + Vue.prototype.$baseURL =`${window.location.protocol}//${window.location.host}/cdwlMall`
  26 +}
21 27 // if (process.env.NODE_ENV === 'production') {
22 28 // const { mockXHR } = require('../mock')
23 29 // mockXHR()
... ...
merchant-web-master/src/utils/request.js
... ... @@ -16,16 +16,17 @@ import {
16 16 const host = window.location.host;
17 17 let PREFIX;
18 18 if (host == '172.16.61.48' || host == '172.16.61.49:5173') {
19   - PREFIX = 'https://jy.scjysm.asia:18086/merchant-business';
  19 + PREFIX = 'https://jy.scjysm.asia:18086/business-server';
20 20 }else if( host == 'localhost:9528' || host == '8.130.38.56:8027' || host == 'localhost:9529'|| host == 'localhost:9530'){
21 21 // 其他情况的默认值
22 22 // PREFIX = 'http://8.130.38.56:8027/business-server';
23   - PREFIX = 'https://jy.scjysm.asia:18086/merchant-business';
24   - // PREFIX = 'http://192.168.2.225:9004';
  23 + // PREFIX = 'https://jy.scjysm.asia:18086/merchant-business';
  24 + // PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/business-server';
  25 + PREFIX = 'http://10.0.0.51:9004';
25 26 }else{
26 27 // PREFIX = '/merchant-business';
27 28 // PREFIX = 'http://8.130.38.56:9004';
28   - PREFIX = 'https://jy.scjysm.asia:18086/merchant-business';
  29 + PREFIX = 'https://jy.scjysm.asia:18086/business-server';
29 30 }
30 31 const baseURL = PREFIX
31 32 // const baseURL = 'http://10.0.0.14:9004'
... ... @@ -35,9 +36,8 @@ const service = axios.create({
35 36 // withCredentials: true, // send cookies when cross-domain requests
36 37 timeout: 300000 // request timeout
37 38 })
38   -
39   -// export const uploadUrl = 'http://192.168.1.102:8005/file/upload'
40   -export const uploadUrl = `${baseURL}/file/upload`
  39 +export const uploadUrl = `${baseURL}/miniio/upload`
  40 +// export const uploadUrl = `${baseURL}/file/upload`
41 41 export const WXuploadUrl = `${baseURL}/file/uploadWxMedia` // 直播上传专用
42 42 //export const QYuploadUrl = `${baseURL}/file/uploadQyMedia` // 微信客服上传专用
43 43 export const QYuploadUrl = `${baseURL}/file/upload`
... ... @@ -66,7 +66,7 @@ service.interceptors.response.use(
66 66 if (response.config.responseType === 'blob') {
67 67 return response.data
68 68 }
69   - if (res.code !== '') {
  69 + if (res.code !== '' && res.code !== '200') {
70 70 Message({
71 71 message: res.message || 'Error',
72 72 type: 'error',
... ...
merchant-web-master/src/views/commodity/commoditySystem/addCommodity.vue
... ... @@ -541,7 +541,6 @@ export default {
541 541 if (this.productId) {
542 542 this.form.productId = this.productId
543 543 const sku = JSON.parse(sessionStorage.getItem('form'))
544   - console.log(sku)
545 544 sku.forEach((element, i) => {
546 545 for (let index = 0; index < this.form.skus.length; index++) {
547 546 if (i === index) {
... ... @@ -550,6 +549,7 @@ export default {
550 549 }
551 550 })
552 551 console.log(this.form, 'this.form')
  552 +
553 553 const res = await getClassifyUpdate(this.form)
554 554 if (res.code === '') {
555 555 this.$message({
... ...
merchant-web-master/src/views/commodity/commoditySystem/addComponent.vue
... ... @@ -2,7 +2,9 @@
2 2 <div class="style-information-component">
3 3 <el-form-item label="商品图片" />
4 4 <div class="upload-wrap">
5   - <el-upload
  5 + <upimg filePath="bueniss" :value="imgsGeshi(form.imgs)" inputtype="coverImage" :limit="5"
  6 + @changimg="e=>changimg(e,'imgs')"></upimg>
  7 + <!-- <el-upload
6 8 list-type="picture-card"
7 9 :on-preview="handlePictureCardPreview"
8 10 :on-remove="handleRemove"
... ... @@ -25,7 +27,7 @@
25 27 </span>
26 28 </span>
27 29 </div>
28   - </el-upload>
  30 + </el-upload> -->
29 31 </div>
30 32 <el-form-item label="款式设置">
31 33 <el-radio-group v-model="form.attrStyle" @change="changeAttrStyle">
... ... @@ -204,7 +206,11 @@
204 206 <script>
205 207 import { uploadUrl } from '@/utils/request'
206 208 import { getToken } from '@/utils/auth'
  209 +import upimg from "@/components/ImageUpload/index"
207 210 export default {
  211 + components: {
  212 + upimg
  213 + },
208 214 filters: {
209 215 attrValueFilter(map, list) {
210 216 const hasChilds =
... ... @@ -316,6 +322,23 @@ export default {
316 322 this.headers.tenant = 'MDAwMA=='
317 323 },
318 324 methods: {
  325 + imgsGeshi(val){
  326 + let arr = []
  327 + val.forEach(item => {
  328 + arr.push(item.imgPath)
  329 + });
  330 + arr = arr.join(',')
  331 + return arr
  332 + },
  333 + changimg(e, type) {
  334 + e = e.split(',')
  335 + this.form.imgs = []
  336 + e.map(item => {
  337 + this.form.imgs.push({
  338 + imgPath: item
  339 + })
  340 + })
  341 + },
319 342 // proving1(e) {
320 343 // var keynum = window.event ? e.keyCode : e.which // 获取键盘码
321 344 // // var keychar = String.fromCharCode(keynum) // 获取键盘码对应的字符
... ...
merchant-web-master/src/views/commodity/commoditySystem/index.vue
... ... @@ -61,7 +61,7 @@
61 61 <el-table-column prop="productId" label="商品id" show-overflow-tooltip />
62 62 <el-table-column label="商品主图" width="150" align="center">
63 63 <template slot-scope="scope">
64   - <img height="80" width="80" :src="scope.row.productImage " alt srcset>
  64 + <img height="80" width="80" :src="$baseURL+msgList(scope.row.productImage)" alt srcset>
65 65 </template>
66 66 </el-table-column>
67 67 <el-table-column prop="productName" label="商品名称" width="220" />
... ... @@ -294,6 +294,12 @@ export default {
294 294 },
295 295 // 方法集合
296 296 methods: {
  297 + msgList(list){
  298 + if(list && list!=''){
  299 + let strin = list.split(',')
  300 + return strin[0]
  301 + }
  302 + },
297 303 async getBrandList() {
298 304 const { data } = await getBrandList()
299 305 this.brandList = data
... ...
merchant-web-master/src/views/order/aftersale/afterDetails.vue
... ... @@ -81,7 +81,7 @@
81 81 <div class="good_details">
82 82 <ul>
83 83 <li>
84   - <img :src="item.image">
  84 + <img :src="$baseURL+item.image">
85 85 <div class="details">
86 86 <p>{{ item.productName }}</p>
87 87 <div class="skuDetails">
... ...
merchant-web-master/src/views/order/pending/pendDetails.vue
... ... @@ -78,7 +78,7 @@
78 78 <div class="good_details">
79 79 <ul>
80 80 <li>
81   - <img :src="item.image">
  81 + <img :src="$baseURL+item.image">
82 82 <div class="details">
83 83 <p>{{ item.productName }}</p>
84 84 <p class="skuDetails">
... ...
merchant-web-master/src/views/stockControl/inventory/addComponent.vue
... ... @@ -2,7 +2,9 @@
2 2 <div class="style-information-component">
3 3 <el-form-item label="商品图片" />
4 4 <div class="upload-wrap">
5   - <el-upload
  5 + <upimg filePath="bueniss" :value="imgsGeshi(form.imgs)" inputtype="coverImage" :limit="5"
  6 + @changimg="e=>changimg(e,'imgs')"></upimg>
  7 + <!-- <el-upload
6 8 list-type="picture-card"
7 9 :on-preview="handlePictureCardPreview"
8 10 :on-remove="handleRemove"
... ... @@ -25,7 +27,7 @@
25 27 </span>
26 28 </span>
27 29 </div>
28   - </el-upload>
  30 + </el-upload> -->
29 31 </div>
30 32 <el-form-item label="款式设置">
31 33 <el-radio-group v-model="form.attrStyle" @change="changeAttrStyle">
... ... @@ -37,8 +39,7 @@
37 39 <div v-if="form.attrStyle === 0" class="single-style">
38 40 <el-table
39 41 :data="skuList"
40   - style="width: 100%"
41   - :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
  42 + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
42 43 >
43 44 <el-table-column label="规格">
44 45 <template slot-scope="scope">
... ... @@ -208,7 +209,11 @@
208 209 <script>
209 210 import { uploadUrl } from '@/utils/request'
210 211 import { getToken } from '@/utils/auth'
  212 +import upimg from "@/components/ImageUpload/index"
211 213 export default {
  214 + components: {
  215 + upimg
  216 + },
212 217 filters: {
213 218 attrValueFilter(map, list) {
214 219 const hasChilds =
... ... @@ -320,6 +325,23 @@ export default {
320 325 this.headers.tenant = 'MDAwMA=='
321 326 },
322 327 methods: {
  328 + imgsGeshi(val){
  329 + let arr = []
  330 + val.forEach(item => {
  331 + arr.push(item.imgPath)
  332 + });
  333 + arr = arr.join(',')
  334 + return arr
  335 + },
  336 + changimg(e, type) {
  337 + e = e.split(',')
  338 + this.form.imgs = []
  339 + e.map(item => {
  340 + this.form.imgs.push({
  341 + imgPath: item
  342 + })
  343 + })
  344 + },
323 345 // proving1(e) {
324 346 // var keynum = window.event ? e.keyCode : e.which // 获取键盘码
325 347 // // var keychar = String.fromCharCode(keynum) // 获取键盘码对应的字符
... ...
merchant-web-master/src/views/stockControl/inventory/index.vue
... ... @@ -60,7 +60,7 @@
60 60 <el-table-column prop="productId" label="商品id" show-overflow-tooltip />
61 61 <el-table-column label="商品主图" width="150" align="center">
62 62 <template slot-scope="scope">
63   - <img height="80" width="80" :src="scope.row.productImage " alt srcset>
  63 + <img height="80" width="80" :src="$baseURL+msgList(scope.row.productImage)" alt srcset>
64 64 </template>
65 65 </el-table-column>
66 66 <el-table-column prop="productName" label="商品名称" width="220" />
... ... @@ -162,7 +162,7 @@
162 162 >
163 163 <el-form ref="form" label-width="80px">
164 164 <el-form-item label="优惠方式">
165   - <el-radio-group v-model="mode" @change="modeChange">
  165 + <el-radio-group v-model="mode">
166 166 <el-radio :label="1">折扣</el-radio>
167 167 <el-radio :label="2">指定价格</el-radio>
168 168 </el-radio-group>
... ... @@ -302,6 +302,12 @@ export default {
302 302 },
303 303 // 方法集合
304 304 methods: {
  305 + msgList(list){
  306 + if(list && list!=''){
  307 + let strin = list.split(',')
  308 + return strin[0]
  309 + }
  310 + },
305 311 async getBrandList() {
306 312 const { data } = await getBrandList()
307 313 this.brandList = data
... ...
merchant-web-master/src/views/stockControl/stocksForewarn/index.vue
... ... @@ -43,10 +43,9 @@
43 43 <div class="tableBox">
44 44 <el-table
45 45 ref="multipleTable"
46   - v-loading="loading"
47 46 :data="tableData"
48 47 tooltip-effect="dark"
49   - @selection-change="handleSelectionChange"
  48 +
50 49 :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
51 50 >
52 51  
... ... @@ -58,7 +57,7 @@
58 57 />
59 58 <el-table-column label="商品主图" width="150" align="center">
60 59 <template slot-scope="scope">
61   - <img height="80" width="80" :src="scope.row.productImage" alt srcset>
  60 + <img height="80" width="80" :src="$baseURL+msgList(scope.row.productImage)" alt srcset>
62 61 </template>
63 62 </el-table-column>
64 63 <el-table-column prop="productName" label="商品名称" min-width="10%" />
... ... @@ -176,7 +175,8 @@ export default {
176 175 total: 1,
177 176 tableData: [],
178 177 tableLoading: false,
179   - dialogVisible:false
  178 + dialogVisible:false,
  179 + currentPage:0
180 180 }
181 181 },
182 182 // 生命周期 - 挂载完成(可以访问DOM元素)
... ... @@ -185,6 +185,12 @@ export default {
185 185 },
186 186 // 方法集合
187 187 methods: {
  188 + msgList(list){
  189 + if(list && list!=''){
  190 + let strin = list.split(',')
  191 + return strin[0]
  192 + }
  193 + },
188 194 toggleFilter(){
189 195 this.fut = !this.fut
190 196 },
... ... @@ -235,7 +241,6 @@ export default {
235 241 this.tableLoading = true
236 242 const res = await getClassifyGetAll(formInline);
237 243 const yujing = await inventoryAlert(res.data.list);
238   - this.loading = false;
239 244 this.total = res.data.total;
240 245 this.tableData = yujing.data;
241 246 },
... ...