xiebaomin 1 vuosi sitten
vanhempi
commit
caedff10d8

+ 4 - 4
components/cm-share-popup/cm-seller-modal.vue

@@ -1,9 +1,9 @@
 <template>
-    <view class="seller-card" v-if="sellerUserId !== 0">
+    <view class="seller-card" v-if="userId !== 0">
         <view class="seller-card-mine" v-if="!modal" @click="modal = true">
             <image
                 :src="userInfo.image || 'https://static.caimei365.com/app/img/icon/default-head.png'"
-                style="width: 100%;height: 100%;object-fit: contain;"
+                style="width: 100%;height: 100%;object-fit: contain;border-radius: 50%;"
                 mode=""
             ></image>
         </view>
@@ -86,7 +86,7 @@ export default {
         },
         initData() {
             this.userId = uni.getStorageSync('sellerUserId') || this.sellerUserId
-            if(this.sellerUserId > 0) {
+            if(this.userId > 0) {
                 this.getUserInfo()
                 this.modal = true
             }
@@ -106,7 +106,7 @@ export default {
     width: 80rpx;
     height: 80rpx;
     z-index: 99;
-    bottom: 380rpx;
+    bottom: 460rpx;
     border-radius: 50%;
     &::after {
         content: '客户经理';

+ 26 - 7
components/cm-share-popup/draw-poster.js

@@ -7,9 +7,14 @@ const defaultOptions = () => ({
     bgImageUrl: 'https://static.caimei365.com/app/mini-hehe/icon/bg-share-01.png',
     userBg: 'https://static.caimei365.com/app/img/icon/bg-card.png',
     userTitleBg: 'https://static.caimei365.com/app/img/icon/logo-fanbai.png',
-    ewmUrl: 'https://static.caimei365.com/app/mini-hehe/icon/icon-ewm-hehe.jpg',
+    // ewmUrl: 'https://static.caimei365.com/app/mini-hehe/icon/icon-ewm-hehe.jpg',
     textArray: [],
     scale: 0.5,
+    duty: {
+        text: '客户经理',
+        bgColor: '#FFBB00',
+        color: '#fff'
+    }
 })
 // 绘制海报
 export default class DrawPoster {
@@ -91,13 +96,14 @@ export default class DrawPoster {
     // 绘制名片封面
     async drawUserCoverImage() {
         try {
-            const { userBg, scale, image, qrCode, linkMan, contractMobile } = this.options
+            const { userBg, scale, image, qrCode, linkMan, contractMobile, duty } = this.options
             await this.drawBorderReduisImage(userBg, 28 * scale, 920 * scale, 694 * scale, 290 * scale, 8)
             await this.drawUserCardInner() // 绘制名片内容
             await this.drawCircleImg(image, 120 * scale, 1090 * scale, 30) //头像
-            this.drawFontText(40 * scale, 200 * scale, 1070 * scale, '#fff', linkMan, 'bold')
+            this.drawFontText(30 * scale, 200 * scale, 1070 * scale, '#fff', linkMan, 'bold', true)
             this.drawFontText(30 * scale, 200 * scale, 1130 * scale, '#fff', contractMobile, '400')
-            await this.drawBorderReduisImage(qrCode, 520 * scale, 1000 * scale, 170 * scale, 170 * scale, 8)
+            await this.drawBorderReduisImage(qrCode, 550 * scale, 980 * scale, 150 * scale, 150 * scale, 6)
+            this.drawFontText(20 * scale, 550 * scale, 1160 * scale, '#fff', ['长按或扫二维码', '——联系我——'], '400')
             return Promise.resolve(true)
         } catch (e) {
             return Promise.reject(e)
@@ -141,11 +147,24 @@ export default class DrawPoster {
         this.ctx.restore()
     }
     // 绘制文字
-    drawFontText(fontsize, x, y, color, text, bold) {
+    drawFontText(fontsize, x, y, color, text, bold, isDuty = false) {
         this.ctx.beginPath()
         this.ctx.font = `${bold} ${fontsize}px sans-serif`
         this.ctx.setFillStyle(color)
-        this.ctx.fillText(text, x, y)
+        if (Array.isArray(text)) {
+            text.forEach((e, i) => {
+                this.ctx.fillText(e, x, y + fontsize * i)
+            })
+        } else {
+            this.ctx.fillText(text, x, y)
+            if (isDuty) {
+                this.ctx.fillStyle = `${this.options.duty.bgColor}`
+                this.ctx.fillRect(x + (text.length * fontsize)- 30, y-fontsize, 66, fontsize + 4)
+                this.ctx.font = `${400} ${fontsize}px sans-serif`
+                this.ctx.setFillStyle('#fff')
+                this.ctx.fillText(this.options.duty.text, x + (text.length * fontsize) -30, y)
+            }
+        }
     }
     // 绘制底部
     drawFooterText(callback) {
@@ -166,7 +185,7 @@ export default class DrawPoster {
             const { ewmUrl, scale } = this.options
             const [error, result] = await uni.downloadFile({ url: ewmUrl })
             if (error) return
-            this.ctx.drawImage(result.tempFilePath, 524 * scale, 720 * scale, 160 * scale, 160 * scale)
+            this.ctx.drawImage(result.tempFilePath, 524 * scale, 730 * scale, 160 * scale, 160 * scale)
             return Promise.resolve(true)
         } catch (e) {
             return Promise.reject(e)

+ 4 - 2
pages/goods/product.vue

@@ -810,8 +810,10 @@ export default {
 			this.backPage = option.page
 		}
         console.log('options', option)
-        this.sellerUserId = option.sellerUserId
-        uni.setStorage('sellerUserId', option.sellerUserId)
+        if (option.sellerUserId) {
+            this.sellerUserId = option.sellerUserId
+            uni.setStorageSync('sellerUserId', option.sellerUserId)
+        }
 		this.getWinHeight()
 	},
 	onReady() {

+ 17 - 17
pages/seller/index/index.vue

@@ -9,11 +9,11 @@
 			<seller-category ref="category" v-if="isCategory"></seller-category>
 		</view>
         <!-- 消息 -->
-        <view :style="{ display: show_index == 3 ? 'block' : 'none' }">
+        <view :style="{ display: show_index == 2 ? 'block' : 'none' }">
         	<seller-message ref="message" v-if="isMessage"></seller-message>
         </view>
 		<!-- 账户中心 -->
-		<view :style="{ display: show_index == 2 ? 'flex' : 'none' }">
+		<view :style="{ display: show_index == 3 ? 'flex' : 'none' }">
 			<seller-user ref="user" v-if="isUserData"></seller-user>
 		</view>
 		<!-- isIphoneX判断是否为刘海屏在main.js里,好像uniapp有一个css变量获取刘海屏的安全区域 -->
@@ -39,13 +39,13 @@ import { mapMutations, mapState } from 'vuex'
 export default {
 	components: {
 		sellerHome, //采美采购商城 0
-		sellerUser, //账户中心     1
-		sellerCategory, //商品分类 2
-        sellerMessage, //信息中心 3
+		sellerUser, //账户中心     3
+		sellerCategory, //商品分类 1
+        sellerMessage, //消息 2
 	},
 	data() {
 		return {
-			show_index: 2, //控制显示那个组件
+			show_index: 3, //控制显示那个组件
 			isUserData: false,
 			isCategory: false,
 			isHomeData: false,
@@ -66,13 +66,13 @@ export default {
 					iconAc: 'https://static.caimei365.com/app/img/icon/icon-sort-active@3x.png'
 				},
                 {
-                	id: 3,
+                	id: 2,
                 	name: '消息',
-                	icon: 'https://static.caimei365.com/app/img/icon/icon-user@3x.png',
-                	iconAc: 'https://static.caimei365.com/app/img/icon/icon-user-active@3x.png'
+                	icon: 'https://static.caimei365.com/app/img/icon/icon-news@3x.png',
+                	iconAc: 'https://static.caimei365.com/app/img/icon/icon-news-active@3x.png'
                 },
 				{
-					id: 2,
+					id: 3,
 					name: '我的',
 					icon: 'https://static.caimei365.com/app/img/icon/icon-user@3x.png',
 					iconAc: 'https://static.caimei365.com/app/img/icon/icon-user-active@3x.png'
@@ -120,22 +120,22 @@ export default {
                 this.isMessage = false
 			} else if (this.show_index == 2) {
 				this.isHomeData = false
-				this.isUserData = true
+				this.isUserData = false
 				this.isCategory = false
-                this.isMessage = false
+                this.isMessage = true
 			} else if (this.show_index == 3) {
 				this.isHomeData = false
-				this.isUserData = false
+				this.isUserData = true
                 this.isCategory = false
-				this.isMessage = true
+				this.isMessage = false
 			}
 		},
 		onPullDownRefresh() {
 			if (this.show_index == 0) {
 				this.$refs.home.getHomeInformation()
-			} else if (this.show_index == 2) {
-				this.$refs.user.initData()
 			} else if (this.show_index == 3) {
+				this.$refs.user.initData()
+			} else if (this.show_index == 2) {
                 this.$refs.message.getMessageList()
             }
 			uni.stopPullDownRefresh()
@@ -148,7 +148,7 @@ export default {
 		}
 		return {
 			title: '生美医美正品采购服务平台',
-			path: `pages/tabBar/home/index?sellerUserId=${this.userInfo.userIdentity === 1 ? this.userInfo.userId : 0}`,
+			path: `pages/tabBar/home/index?sellerUserId=${this.userInfo.userId || 0}`,
 			imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
 		}
 	}

+ 1 - 0
pages/seller/notice/service/Institutional_visits.vue

@@ -49,6 +49,7 @@ export default {
     },
     methods: {
         handlerVisits($event) {
+            uni.setStorageSync('visitsInfo', JSON.stringify($event))
             this.$api.navigateTo(
                 '/pages/seller/notice/service/visits_details?spId=' +
                     this.userInfo.serviceProviderId +

+ 7 - 3
pages/seller/notice/service/service.vue

@@ -53,7 +53,8 @@ export default {
                     content: '大黄蜂'
                 }
             ], // 信息列表
-            userInfo: {}
+            userInfo: {},
+            isLastPage: false, //  是否是最后一页
         }
     },
     mounted() {
@@ -66,6 +67,7 @@ export default {
             this.params.commonId = this.userInfo.serviceProviderId
             const { data } = await this.SellerService.getSellerNotice(this.params)
             this.messageList = [...this.messageList, ...data.list]
+            this.isLastPage = data.isLastPage
         },
         // 删除
         deleteBtn(id, index) {
@@ -106,8 +108,10 @@ export default {
         uni.stopPullDownRefresh()
     },
     onReachBottom() {
-        this.params.pageNum += 1
-        this.getMessageList()
+        if (this.isLastPage) {
+            this.params.pageNum += 1
+            this.getMessageList()
+        }
     }
 }
 </script>

+ 2 - 10
pages/seller/notice/service/visits_details.vue

@@ -38,17 +38,9 @@ export default {
         this.getVisitesClubDetail()
     },
     methods: {
-        handlerVisits($event) {
-            this.$api.navigateTo(
-                '/pages/seller/notice/service/visits_details?spId=' +
-                    this.spId +
-                    '&clubId=' +
-                    this.clubId +
-                    '&accessTime=' +
-                    this.accessTime
-            )
-        },
+        handlerVisits($event) {},
         async getVisitesClubDetail() {
+            this.visitsInfo = JSON.parse(uni.getStorageSync('visitsInfo')) || {}
             const {data} = await this.SellerService.getVisitesClubInfo({accessTime: this.accessTime, spId: this.spId, clubId: this.clubId})
             this.detailList = data
         }

+ 1 - 1
pages/seller/remarks/components/activity-analysis.vue

@@ -62,7 +62,6 @@ export default {
             margin-bottom: 16rpx;
             .tab-item {
                 margin-right: 16rpx;
-                width: 136rpx;
                 height: 40rpx;
                 background: #FAEDE5;
                 border-radius: 8rpx 8rpx 8rpx 8rpx;
@@ -71,6 +70,7 @@ export default {
                 line-height: 40rpx;
                 font-size: 22rpx;
                 color: #FF5B00;
+                padding: 0 6rpx;
                 .icon-xiayibu {
                 	font-size: 20rpx;
                 	margin-left: 10rpx;

+ 1 - 29
pages/seller/remarks/institutional-activity-analysis.vue

@@ -66,34 +66,7 @@ export default {
                 }
             ],
             dataList: {},
-            clubList: [{
-                name: 'ceshi机构',
-                activeState: '忠诚用户',
-                customerValue: '忠诚用户',
-                linkMan: 'ceshi',
-                contractMobile: '12654641'
-            },
-            {
-                name: 'ceshi机构',
-                activeState: '忠诚用户',
-                customerValue: '忠诚用户',
-                linkMan: 'ceshi',
-                contractMobile: '12654641'
-            },
-            {
-                name: 'ceshi机构',
-                activeState: '忠诚用户',
-                customerValue: '忠诚用户',
-                linkMan: 'ceshi',
-                contractMobile: '12654641'
-            },
-            {
-                name: 'ceshi机构',
-                activeState: '忠诚用户',
-                customerValue: '忠诚用户',
-                linkMan: 'ceshi',
-                contractMobile: '12654641'
-            }], // 机构列表
+            clubList: [], // 机构列表
             pageNum: 1,
             isLastPage: true, // 是否是最后一页
         }
@@ -135,7 +108,6 @@ export default {
         async getClubList() {
             const { data } = await this.SellerService.getClubList({
                 spId: this.userInfo.serviceProviderId,
-                userIdentity: 4,
                 status: 90,
                 type: this.currentTab,
                 pageNum: this.pageNum,

+ 1 - 1
pages/tabBar/home/index.vue

@@ -133,7 +133,7 @@ export default {
 	onLoad(options) {
         if (options.sellerUserId) {
             this.sellerUserId = options.sellerUserId
-            uni.setStorage('sellerUserId', options.sellerUserId)
+            uni.setStorageSync('sellerUserId', options.sellerUserId)
         }
     },
     computed: {