puyao 2 hete
szülő
commit
b1436a7501
50 módosított fájl, 1127 hozzáadás és 495 törlés
  1. 5 40
      App.vue
  2. 3 4
      api/companyOrder.js
  3. 3 0
      api/user.js
  4. 83 1
      assets/css/commonTheme.css
  5. 30 4
      common/request.js
  6. 1 1
      components/im/tui-chat/message-elements/audio-message/index.vue
  7. 1 1
      components/im/tui-chat/message-elements/file-message/index.vue
  8. 1 1
      components/im/tui-chat/message-elements/video-message/index.vue
  9. 0 94
      components/tabbar/tabbar.vue
  10. 8 3
      main.js
  11. 1 1
      manifest.json
  12. 208 8
      pages.json
  13. 1 0
      pages/auth/login.vue
  14. 10 10
      pages/doctor/doctorDetail.vue
  15. 4 4
      pages/doctor/doctorIm.vue
  16. 3 3
      pages/doctor/doctorList.vue
  17. 7 7
      pages/doctor/index.vue
  18. 1 1
      pages/doctor/paymentOrder.vue
  19. 4 4
      pages/doctor/submitOrder.vue
  20. 5 5
      pages/healthy/detail.vue
  21. 3 3
      pages/healthy/index.vue
  22. 1 1
      pages/healthy/readUsers.vue
  23. 4 5
      pages/home/healthCourse.vue
  24. 13 27
      pages/home/index.vue
  25. 1 1
      pages/home/productList.vue
  26. 1 1
      pages/home/vipBenefit.vue
  27. 0 1
      pages/shopping/cart.vue
  28. 2 3
      pages/shopping/index.vue
  29. 4 0
      pages/shopping/paymentOrder.vue
  30. 4 4
      pages/shopping/productDetails.vue
  31. 19 3
      pages/user/index.vue
  32. 521 154
      pages_company/order/confirmCompanyOrder.vue
  33. 42 3
      pages_company/order/confirmOrder.vue
  34. 10 7
      pages_company/order/productDetails.vue
  35. 2 2
      pages_company/storeProductPackageDetails.vue
  36. 1 1
      pages_index/index/famousPrescribeDetails.vue
  37. 1 2
      pages_index/index/famousPrescribeList.vue
  38. 1 1
      pages_index/index/testDetails.vue
  39. 1 2
      pages_index/index/testList.vue
  40. 26 1
      pages_shopping/shopping/confirmCreateOrder.vue
  41. 1 1
      pages_shopping/store/beiliyouHome.vue
  42. 1 1
      pages_user/user/pay.vue
  43. 7 4
      pages_user/user/storeOrder.vue
  44. 56 10
      store/index.js
  45. 0 61
      store/modules/theme.js
  46. 1 1
      uni_modules/uview-ui/components/u-input/props.js
  47. 1 1
      uni_modules/uview-ui/components/u-input/u-input.vue
  48. 1 1
      uni_modules/uview-ui/components/u-textarea/props.js
  49. 1 1
      uni_modules/uview-ui/components/u-textarea/u-textarea.vue
  50. 22 0
      utils/common.js

+ 5 - 40
App.vue

@@ -6,11 +6,8 @@
 		globalData: {
 			// confirm订单参数
 			confirmParam: [],
-			themecolor: 'beiliyou'
 		},
 		onLaunch: function() {
-			// 在这里调用 onLaunch  vuex  得 getTheme去请求接口
-			this.$store.dispatch('getTheme')
 			// console.log('App Launch')
 			// uni.hideTabBar()
 			// uni.removeStorageSync('selectedIndex');
@@ -85,40 +82,7 @@
 		},
 
 		methods: {
-			updateTabbar() {
-				// 获取当前主题
-				const theme = this.globalData.themecolor;
-				// 设置tabbar的图标
-				const tabbarList = [{
-						iconPath: `/static/images/tabbar/${theme}/home.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/home_on.png`
-					},
-					{
-						iconPath: `/static/images/tabbar/${theme}/home.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/home_on.png`
-					},
-					{
-						iconPath: `/static/images/tabbar/${theme}/home.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/home_on.png`
-					},
-					{
-						iconPath: `/static/images/tabbar/${theme}/home.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/home_on.png`
-					},
-				];
-				// 这个style不要用循环
-				uni.setTabBarStyle({
-					color: '#acafac',
-					selectedColor: '#118e4a'
-				})
-				tabbarList.forEach((item, index) => {
-					// 只能一项设置 所以循环
-					uni.setTabBarItem({
-						index,
-						...item
-					})
-				})
-			},
+			
 			// TODO:
 			resetLoginData() {
 				// this.globalData.expiresIn = '';
@@ -156,13 +120,14 @@
 		}
 	}
 </script>
-
+<style lang="less">
+	@import './assets/css/common.less';
+</style>
 <style lang="scss">
 	/*每个页面公共css */
 	// @import 'animate.css';
 	@import "uview-ui/index.scss";
 	@import './assets/iconfont/iconfont.css';
-	@import './assets/css/common.less';
 	@import '@/assets/css/common.scss';
 	@import '@/assets/css/commonTheme.css';
 	@import '@/assets/css/theme.scss';
@@ -181,7 +146,7 @@
 	/*每个页面公共css */
 	/* 解决小程序和app滚动条的问题 */
 	/* #ifdef MP-WEIXIN || APP-PLUS */
-	/deep/ ::-webkit-scrollbar {
+	::v-deep ::-webkit-scrollbar {
 		display: none !important;
 		width: 0 !important;
 		height: 0 !important;

+ 3 - 4
api/companyOrder.js

@@ -29,7 +29,6 @@ let request = new Request().http
  export function editOrderMoney(data) {
  	 return request('/app/companyOrder/editOrderMoney',data,'GET' );
  }
- 
-  
- 
- 
+ export function updateSalesOrderMoneyByProduct(data) {
+ 	 return request('/app/companyOrder/updateSalesOrderMoneyByProduct',data,'POST','application/json;charset=UTF-8');
+ }

+ 3 - 0
api/user.js

@@ -60,6 +60,9 @@ let request = new Request().http
  export function geticon(data) {
  	 return request('/app/index/getMenuUser',data,'GET','application/json;charset=UTF-8');
  }
+ export function getConfigByKey(data) {
+ 	 return request('/app/common/getConfigByKey',data,'GET');
+ } 
  
  
  

+ 83 - 1
assets/css/commonTheme.css

@@ -145,5 +145,87 @@
 	background-color: #fff;
 }
 .base-color{
-	color: #018C39;
+	/* color: #018C39; */
+	color: #1773ff;
+}
+.colorf {
+	color: #fff;
+}
+.base-color-2 {
+	color: #e7f1fe;
+}
+
+.base-color-3 {
+	color: #425034;
+}
+.base-color-9 {
+	color: #999999;
+}
+.base-color-8 {
+	color: #f8f8f8;
+}
+.base-color-6 {
+	color: #666;
+}
+.base-color-gray {
+	color: #DEDFE4;
+}
+.base-color-red{
+		color:#ee0a25;
+}
+.base-color-dark {
+	color: #313131;
+}
+
+.base-color-dark2 {
+	color: #3E3E3E;
+}
+
+.base-price {
+	color: #FF1212;
+}
+
+.base-success {
+	color: #a3db42;
+}
+
+.base-bg {
+	background: #1773ff;
+}
+
+.base-bg-2 {
+	background: #e7f1fe;
+}
+.base-bg-red{
+	background: #ee0a25;
+}
+.base-bg-f{
+	background-color:#fff;
+}
+.base-bg-f8{
+	background-color: #f8f8f8;
+}
+.base-bg-f5{
+	background-color: #f5f5f5;
+}
+.base-bg-9{
+	background-color: #999;
+}
+.base-bg-blue{
+	background:#1677ff;
+}
+.base-bg-sure{
+	background:#e7f2fe;
+}
+.base-bg-orange{
+	background:#FF7F00;
+}
+.base-bg-false{
+	background:#fae7e7;
+}
+.bor-blue{
+	border: 2rpx solid #c9e1fb;
+}
+.bor-red{
+	border: 2rpx solid #f7a1a1;
 }

+ 30 - 4
common/request.js

@@ -1,17 +1,43 @@
 // uni-app请求封装
+import {TOKEN_KEYAuto} from '@/utils/courseTool.js'
 export default class Request {
 	http(router, data = {}, method,contentType) {
 		let that = this;
 		// let path = 'http://localhost:7014';
-		// let path = 'http://192.168.10.131:7014';
-		let path = 'https://userapp.beliyostore.com'; 
-		// let path = "http://d7zwsx.natappfree.cc"
+		// let path = 'http://192.168.10.158:7014';
+		let path = 'https://userapp.beliyostore.com/store'; 
+		// let path = "http://ud685cbb.natappfree.cc/store"
+		let type = 0
 		uni.setStorageSync('requestPath',path)
 		// uni.showLoading({
 		// 	title: '加载中'
 		// });
+		let token = uni.getStorageSync('AppToken');
+		if(router.indexOf("/companyapp")!=-1){
+			// router =router.replace('/companyapp','')
+			// path = 'http://ud685cbb.natappfree.cc'//倍力优
+			path = 'https://userapp.beliyostore.com'//倍力优
+			 type = 1
+			 token = uni.getStorageSync('ManageToken');
+		}
+		// 企微看课
+		if(router.indexOf("/course_auto")!=-1){
+			type = 2
+			router =router.replace('/course_auto','')
+			path = 'https://userapp.beliyostore.com'//倍力优
+			// path = 'http://ud685cbb.natappfree.cc'//倍力优
+			token =uni.getStorageSync(TOKEN_KEYAuto)
+			console.log("TOKEN_KEYAuto===",TOKEN_KEYAuto,token)
+		}
+		if(router.indexOf("/course_uniapp")!=-1){
+			type = 3
+			router =router.replace('/course_uniapp','')
+			path = 'https://userapp.beliyostore.com'//倍力优
+			// path = 'http://ud685cbb.natappfree.cc'//倍力优
+			token =uni.getStorageSync('TOKEN_WEXIN')
+		}
 		return new Promise((resolve, reject) => {
-			let token = uni.getStorageSync('AppToken');
+			// let token = uni.getStorageSync('AppToken');
 			var httpContentType='application/x-www-form-urlencoded';
 			if(contentType!=undefined){
 				//application/json;charset=UTF-8

+ 1 - 1
components/im/tui-chat/message-elements/audio-message/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view :class="'audio-message ' + (isMine ? 'my-audio' : '')">
-		<image class="audio-icon" src="../../../../../static/images/audio.png"></image>
+		<image class="audio-icon" src="/static/images/audio.png"></image>
 		<view class="audio " @click="handlePlayAudioMessage" :style="'width: ' + 120 + 'rpx'">{{ '" ' + message.payload.second }}</view>
 	</view>
 </template>

+ 1 - 1
components/im/tui-chat/message-elements/file-message/index.vue

@@ -3,7 +3,7 @@
 		<view class="TUI-fileMessage">
 			<view class="fileMessage">
 				<view class="fileMessage-box">
-					<image class="file-icon" src="../../../../../static/images/file.png"></image>
+					<image class="file-icon" src="/static/images/file.png"></image>
 					<label @tap="download" class="file-title">{{ filePayload.fileName }}</label>
 				</view>
 			</view>

+ 1 - 1
components/im/tui-chat/message-elements/video-message/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view :class="'video-box ' + (isMine ? 'my-video' : '')" @click="playerHander">
-		<image class="video-icon" src="../../../../../static/images/video-play.png"></image>
+		<image class="video-icon" src="/static/images/video-play.png"></image>
 	</view>
 </template>
 

+ 0 - 94
components/tabbar/tabbar.vue

@@ -1,94 +0,0 @@
-<template>
-	<!-- 使用得时候必须加上style  不然没有--colorxxxxx之类得变量 -->
-	<view class="tabbar align-center" :style="$store.state.theme.currentMoban">
-		<view v-for="(item, index) in tabbarList" :key="index" @click="switchTabs(item)" class="tablist">
-			<view class="column align-center justify-center" >
-				<image :src="actindex==index?item.selectedIconPath:item.iconPath" class="w48 h48"></image>
-				<text class="fs24 base-textcol" :class="actindex==index?'actcolor':'morecolor'">{{item.Text}}</text>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		name: "tabbar",
-		props: {
-			actindex: {
-				type: Number,
-				default: 0
-			}
-		},
-		data() {
-			return {
-				themes: 'beiliyou',
-				tabbarList: [],
-			};
-		},
-		mounted() {
-			this.themeicon()
-			console.log(this.$store.state.theme.currentMoban['--base-color'])
-		},
-		methods: {
-			switchTabs(item) {
-				// 到时候要设置两个tabbar   但是一教育页面得隐藏掉   这里得页面不能配置到tabbar得list里面
-				
-				uni.navigateTo({
-					url: item.url
-				})
-			},
-			themeicon() {
-				const theme = this.themes
-				this.tabbarList = [{
-						iconPath: `/static/images/tabbar/${theme}/home.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/home_on.png`,
-						Text: '首页',
-						url: '/pages/home/index'
-					},
-					{
-						iconPath: `/static/images/tabbar/${theme}/ENCYCLOPEDIA.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/ENCYCLOPEDIA_on.png`,
-						Text: '企业理念',
-						url: '/pages/enterprise/enterprise'
-
-					},
-					{
-						iconPath: `/static/images/tabbar/${theme}/mall.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/mall_on.png`,
-						Text: '健康商城',
-						url: '/pages/shopping/index'
-					},
-					{
-						iconPath: `/static/images/tabbar/${theme}/mine.png`,
-						selectedIconPath: `/static/images/tabbar/${theme}/mine_on.png`,
-						Text: '会员中心',
-						url: '/pages/user/index'
-					},
-				]
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.tabbar {
-		display: flex;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		background-color: #fff;
-		z-index: 1000;
-		height: 100rpx;
-	}
-
-	.tablist {
-		width: 25%;
-	}
-	.morecolor{
-		color: #626468;
-	}
-	.actcolor {
-		color: #018C39;
-	}
-</style>

+ 8 - 3
main.js

@@ -6,15 +6,20 @@ Vue.config.productionTip = false
 import uView from 'uview-ui'
 Vue.use(uView)
 // uni.$u.config.unit = 'rpx'
-
+import store from './store/index.js' // 确保路径正确
+Vue.prototype.$store = store;
+import {formatSeconds}from './utils/tools.js'
+Vue.prototype.$formatSeconds = formatSeconds;
+import {isLoginCourseAuto}from './utils/courseTool.js'
+Vue.prototype.$isLoginCourseAuto = isLoginCourseAuto;
 import utils from './utils/common.js'
 Vue.prototype.utils = utils;
-
 import {
 	setData,
+	isLoginCourse
 } from './utils/common.js'
 // vuex
-import store from '@/store/index.js'
+Vue.prototype.$isLoginCourse = isLoginCourse
 Vue.prototype.setData = setData;
 App.mpType = 'app'
 const app = new Vue({

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "倍力优",
-    "appid" : "__UNI__58B30F8",
+    "appid" : "__UNI__39BA06A",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",

+ 208 - 8
pages.json

@@ -976,6 +976,15 @@
 						}
 					}
 				},
+				{
+					"path": "order/productGiftList",
+					"style": {
+						"navigationBarTitleText": "选择赠品",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
 				{
 					"path": "order/productDetails",
 					"style": {
@@ -1256,6 +1265,197 @@
 				     
 				 }
 			]
+		},
+		{
+			"root": "pages_manage",
+			"pages": [
+				{
+					"path": "login",
+					"style": {
+						"navigationBarTitleText": "登录",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "数据",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "dataDetails",
+					"style": {
+						"navigationBarTitleText": "课程数据详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "statistic",
+					"style": {
+						"navigationBarTitleText": "课程统计",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "manageDataDetail",
+					"style": {
+						"navigationBarTitleText": "销售详情",
+						"enablePullDownRefresh": false
+					}
+				}
+				
+				
+			]
+		},
+		{
+			"root": "pages_managedata",
+			"pages": [{
+					"path": "coursedetail",
+					"style": {
+						"navigationBarTitleText": "课程详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "vipdetail",
+					"style": {
+						"navigationBarTitleText": "会员详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "userInfo",
+					"style": {
+						"navigationBarTitleText": "用户信息",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "editUser",
+					"style": {
+						"navigationBarTitleText": "设置",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "lableSetup",
+					"style": {
+						"navigationBarTitleText": "标签设置",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "about",
+					"style": {
+						"navigationBarTitleText": "关于我们",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "users",
+					"style": {
+						"navigationBarTitleText": "审核销售",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "managedetail",
+					"style": {
+						"navigationBarTitleText": "审核销售",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "exprotList",
+					"style": {
+						"navigationBarTitleText": "审核列表",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "saleInfo",
+					"style": {
+						"navigationBarTitleText": "员工详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "changeVip",
+					"style": {
+						"navigationBarTitleText": "更换会员归属",
+						"enablePullDownRefresh": false
+					}
+				}
+			]
+		},
+		{
+			"root": "pages_course",
+			"pages": [{
+					"path": "reward",
+					"style": {
+						"navigationBarTitleText": "领取奖励",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "becomeVIP",
+					"style": {
+						"navigationBarTitleText": "注册会员",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "becomeSale",
+					"style": {
+						"navigationBarTitleText": "注册销售",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "webview",
+					"style": {
+						"navigationBarTitleText": "授权登录",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "videovip",
+					"style": {
+						"navigationBarTitleText": "看课详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path" : "learn",
+					"style" : 
+					{
+						"navigationBarTitleText" : "健康生活方式指导",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "teacherClassroom",
+					"style": {
+						"navigationBarTitleText": "名师课堂",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "video",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom",
+						"usingComponenets": {
+							"uni-popup": "/uni_modules/uni-popup/components/uni-popup/uni-popup"
+						},
+						"componentPlaceholder": {
+							"uni-popup": "view"
+						}
+					}
+				}
+			]
 		}
 	],
 	"globalStyle": {
@@ -1278,14 +1478,14 @@
 		"list": [
 			{
 				"pagePath": "pages/home/index",
-				"iconPath": "/static/images/tabbar/beiliyou/home.png",
-				"selectedIconPath": "/static/images/tabbar/beiliyou/home_on.png",
+				"iconPath": "/static/tabbar/home.png",
+				"selectedIconPath": "/static/tabbar/home_on.png",
 				"text": "首页"
 			},
 			{
 				"pagePath": "pages/enterprise/enterprise",
-				"iconPath": "/static/images/tabbar/beiliyou/ENCYCLOPEDIA.png",
-				"selectedIconPath": "/static/images/tabbar/beiliyou/ENCYCLOPEDIA_on.png",
+				"iconPath": "/static/tabbar/ENCYCLOPEDIA.png",
+				"selectedIconPath": "/static/tabbar/ENCYCLOPEDIA_on.png",
 				"text": "企业理念"
 			},
 			/* {
@@ -1296,14 +1496,14 @@
 			} */
 			{
 				"pagePath": "pages/shopping/index",
-				"iconPath": "/static/images/tabbar/beiliyou/mall.png",
-				"selectedIconPath": "/static/images/tabbar/beiliyou/mall_on.png",
+				"iconPath": "/static/tabbar/mall.png",
+				"selectedIconPath": "/static/tabbar/mall_on.png",
 				"text": "健康产品"
 			},
 			{
 				"pagePath": "pages/user/index",
-				"iconPath": "/static/images/tabbar/beiliyou/mine.png",
-				"selectedIconPath": "/static/images/tabbar/beiliyou/mine_on.png",
+				"iconPath": "/static/tabbar/mine.png",
+				"selectedIconPath": "/static/tabbar/mine_on.png",
 				"text": "我的"
 			}
 		]

+ 1 - 0
pages/auth/login.vue

@@ -152,6 +152,7 @@ export default {
 							   encryptedData: e.mp.detail.encryptedData,
 							   iv: e.mp.detail.iv,
 							   code: code,
+							   appId:wx.getAccountInfoSync().miniProgram.appId
 							   // userCode:userCode
 							})
 							.then( res => {

+ 10 - 10
pages/doctor/doctorDetail.vue

@@ -7,7 +7,7 @@
 				<!-- 这里是状态栏 -->
 				<view class="status_bar" :style="{height: statusBarHeight}"></view>
 				<view class="back-box" @click="back">
-					<image src="../../static/images/back.png" mode=""></image>
+					<image src="/static/images/back.png" mode=""></image>
 				</view>
 				<!-- 医生信息 -->
 				<view class="doctor-info">
@@ -62,22 +62,22 @@
 				<view class="content">
 					<!-- 擅长 -->
 					<view class="expertise">
-						<image class="label-img" src="../../static/images/sc_word.png" mode=""></image>
+						<image class="label-img" src="/static/images/sc_word.png" mode=""></image>
 						<text :class="showExpert?'text':'text ellipsis3'" id="expert">{{doctor.doctorDesc}}</text>
 						<!-- 查看更多按钮 -->
 						<view v-if="!showExpert" class="show-more" @click="showMoreExpert">
-							<image class="mask" src="../../static/images/mask.png" mode=""></image>
+							<image class="mask" src="/static/images/mask.png" mode=""></image>
 							<view class="inner">
 								<text class="btn">查看全部</text>
-								<image src="../../static/images/arrow3.png" mode=""></image>
+								<image src="/static/images/arrow3.png" mode=""></image>
 							</view>
 						</view>
 					</view>
 					<!-- 问诊方式 -->
 					<view class="mode-box">
 						<view v-for="(price,index) in prices" :class="price.priceId == priceId?'item active':'item'" @click="choseMode(price)">
-							<image v-if="price.priceType==1" class="img" src="../../static/images/picture_ask.png" mode=""></image>
-							<image v-if="price.priceType==2" class="img" src="../../static/images/phone_ask.png" mode=""></image>
+							<image v-if="price.priceType==1" class="img" src="/static/images/picture_ask.png" mode=""></image>
+							<image v-if="price.priceType==2" class="img" src="/static/images/phone_ask.png" mode=""></image>
 							<view class="info">
 								<text v-if="price.priceType==1" class="label">图文问诊</text>
 								<text v-if="price.priceType==2" class="label">电话问诊</text>
@@ -93,7 +93,7 @@
 								</view>
 							</view>
 							<!-- 选中的角标 -->
-							<image v-if="price.priceId == priceId" class="active-img" src="../../static/images/sel_right50.png" mode=""></image>
+							<image v-if="price.priceId == priceId" class="active-img" src="/static/images/sel_right50.png" mode=""></image>
 						</view>
 						 
 					</view>
@@ -107,12 +107,12 @@
 		<view class="btn-foot">
 			<view class="menu-box">
 				<view class="item" @click="goHome">
-					<image src="../../static/images/back_home.png" mode=""></image>
+					<image src="/static/images/back_home.png" mode=""></image>
 					<text>首页</text>
 				</view>
 				<view class="item" @click="changeFollow">
-					<image v-if="!isFollow" src="../../static/images/focus.png" mode=""></image>
-					<image v-show="isFollow" src="../../static/images/focus_sel.png" mode=""></image>
+					<image v-if="!isFollow" src="/static/images/focus.png" mode=""></image>
+					<image v-show="isFollow" src="/static/images/focus_sel.png" mode=""></image>
 					<text>关注</text>
 				</view>
 			</view>

+ 4 - 4
pages/doctor/doctorIm.vue

@@ -55,7 +55,7 @@
 						</view>
 					</view>
 					<view class="img-box">
-						<image src="../../static/images/head.jpg" mode=""></image>
+						<image src="/static/images/head.jpg" mode=""></image>
 					</view>
 				</view>
 			</view> -->
@@ -77,20 +77,20 @@
 					 v-model="sendText"
 					@input="textInput" 
 				/>
-				<image v-if="!hasSendValue" src="../../static/images/add26.png" mode="" @click="showMoreMenu"></image>
+				<image v-if="!hasSendValue" src="/static/images/add26.png" mode="" @click="showMoreMenu"></image>
 				<view v-if="hasSendValue" class="send-btn" @click="sendMsg">发送</view>
 			</view>
 			<!-- 功能按钮 -->
 			<view :class="showBottomMenu?'bottom-menu show':'bottom-menu'">
 				<view class="item">
 					<view class="img-box">
-						<image src="../../static/images/health.png" mode=""></image>
+						<image src="/static/images/health.png" mode=""></image>
 					</view>
 					<text class="text">投诉反馈</text>
 				</view>
 				<view class="item">
 					<view class="img-box">
-						<image src="../../static/images/health.png" mode=""></image>
+						<image src="/static/images/health.png" mode=""></image>
 					</view>
 					<text class="text">常见问题</text>
 				</view>

+ 3 - 3
pages/doctor/doctorList.vue

@@ -4,7 +4,7 @@
 			<!-- 搜索框 -->
 			<view class="search-cont">
 				<view class="inner">
-					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<image class="icon-search" src="/static/images/search.png" mode=""></image>
 					<input type="text" v-model="searchVal" placeholder="输入医生姓名搜索" confirm-type="搜索" @confirm="goSearch" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
 				</view>
 			</view>
@@ -19,7 +19,7 @@
 					>
 						<view class="text">
 							{{ item.departmentName }}
-							<image v-show="deptId == item.departmentId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
+							<image v-show="deptId == item.departmentId" class="tab-bg" src="/static/images/tab_bg.png" mode=""></image>
 						</view>
 					</view>
 				</view>
@@ -56,7 +56,7 @@
 						<!-- 评分 -->
 						<!-- <view class="rate-box">
 							<view class="star">
-								<image src="../../static/images/star.png" mode=""></image>
+								<image src="/static/images/star.png" mode=""></image>
 								<text>{{ item.pings }}</text>
 							</view>
 							<view class="line"></view>

+ 7 - 7
pages/doctor/index.vue

@@ -7,7 +7,7 @@
 			<!-- 搜索框 -->
 			<view class="search-cont">
 				<view class="inner">
-					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<image class="icon-search" src="/static/images/search.png" mode=""></image>
 					<input type="text" :value="searchValue" placeholder="输入关键字" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
 				</view>
 			</view>
@@ -15,19 +15,19 @@
 		<!-- 快速问诊、找医生 -->
 		<view class="online-inquiry" :style="{marginTop:top}">
 			<view class="item" @click="navTo('./postConsult')">
-				<image class="bg-img" src="../../static/images/online_treat.png" mode=""></image>
+				<image class="bg-img" src="/static/images/online_treat.png" mode=""></image>
 				<view class="inner">
 					<text class="title">快速问诊</text>
 					<text class="sub-title">智能科室 快速匹配</text>
-					<image src="../../static/images/fast_ask.png" mode=""></image>
+					<image src="/static/images/fast_ask.png" mode=""></image>
 				</view>
 			</view>
 			<view class="item" @click="navTo('./doctorList')">
-				<image class="bg-img" src="../../static/images/chu_query.png" mode=""></image>
+				<image class="bg-img" src="/static/images/chu_query.png" mode=""></image>
 				<view class="inner">
 					<text class="title">找医生</text>
 					<text class="sub-title">全国60万医生任你选</text>
-					<image src="../../static/images/doctor_blue.png" mode=""></image>
+					<image src="/static/images/doctor_blue.png" mode=""></image>
 				</view>
 			</view>
 		</view>
@@ -49,7 +49,7 @@
 							>
 								<view class="text">
 									{{ item.name }}
-									<image v-show="item.id ==  param.orderType" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
+									<image v-show="item.id ==  param.orderType" class="tab-bg" src="/static/images/tab_bg.png" mode=""></image>
 								</view>
 							</view>
 						</view>
@@ -93,7 +93,7 @@
 								</view>
 							</view>
 							<view class="read-box">
-								<image src="../../static/images/eye.png" mode=""></image>
+								<image src="/static/images/eye.png" mode=""></image>
 								<text class="text">{{item.views}}人看过</text>
 							</view>
 						</view>

+ 1 - 1
pages/doctor/paymentOrder.vue

@@ -14,7 +14,7 @@
 				<view class="title">支付方式</view>
 				<view class="item">
 					<view class="left">
-						<image src="../../static/images/wecha_pay.png" mode=""></image>
+						<image src="/static/images/wecha_pay.png" mode=""></image>
 						<text class="text">微信支付</text>
 					</view>
 					<label>

+ 4 - 4
pages/doctor/submitOrder.vue

@@ -6,7 +6,7 @@
 				<view class="title-box">
 					<text class="title">选择问诊人</text>
 					<view class="add-box">
-						<image src="../../static/images/add26.png" mode=""></image>
+						<image src="/static/images/add26.png" mode=""></image>
 						<text @click="addPeople">添加</text>
 					</view>
 				</view>
@@ -19,7 +19,7 @@
 							<text class="ege">{{utils.getAge(item.birthday)}}岁</text>
 						</view>
 						<!-- 选中的对号角标 -->
-						<image v-if="patientId == item.patientId" class="active-img" src="../../static/images/sel_right50.png" mode=""></image>
+						<image v-if="patientId == item.patientId" class="active-img" src="/static/images/sel_right50.png" mode=""></image>
 					</view>
 				</view>
 			</view>
@@ -46,11 +46,11 @@
 					<!-- 上传的图片列表 -->
 					<view class="img-item" v-for="(item,index) in imgList" :key="index" @tap="viewImage" :data-url="imgList[index]">
 						<image class="img" :src="item" mode="aspectFill"></image>
-						<image class="close-img" src="../../static/images/close32.png" mode="" @tap.stop="delImg" :data-index="index"></image>
+						<image class="close-img" src="/static/images/close32.png" mode="" @tap.stop="delImg" :data-index="index"></image>
 					</view>
 					<!-- 上传图片按钮 -->
 					<view class="uoload-btn" @tap="chooseImage" v-if="imgList.length<3">
-						<image src="../../static/images/photo.png" mode=""></image>
+						<image src="/static/images/photo.png" mode=""></image>
 						<text>上传照片</text>
 					</view>
 				</view>

+ 5 - 5
pages/healthy/detail.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content" :style="$store.state.theme.currentMoban">
+	<view class="content" >
 		<u-navbar
 			:title="item.title.length>12?item.title.slice(0,12)+'...':item.title"
 			:autoBack="true"
@@ -24,14 +24,14 @@
 				<view class="peop-box" @click="showUsers">
 					<view class="head-box">
 						<view class="head" v-for="(subitem,j) in views" :key="j">
-							<image :src="subitem.avatar==null?'../../static/images/detault_head.jpg':subitem.avatar" mode=""></image>
+							<image :src="subitem.avatar==null?'/static/images/detault_head.jpg':subitem.avatar" mode=""></image>
 						</view>
 					</view>
-					<image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
+					<image class="arrow" src="/static/images/arrow_gray.png" mode=""></image>
 				</view>
 			</view>
 			<view class="share-btn">
-				<image src="../../static/images/share.png" mode=""></image>
+				<image src="/static/images/share.png" mode=""></image>
 				<text>分享</text>
 				<button  class="share" data-name="shareBtn" open-type="share">分享</button>
 			</view>
@@ -39,7 +39,7 @@
 		<!-- 咨询按钮 -->
 		<view class="inquiry">
 			<view class="content">
-				<image src="../../static/images/consult.png" mode=""></image>
+				<image src="/static/images/consult.png" mode=""></image>
 				<text class="text">咨询</text>
 				<button class="contact-btn" open-type="contact"></button>
 			</view>

+ 3 - 3
pages/healthy/index.vue

@@ -7,7 +7,7 @@
 			<!-- 搜索框 -->
 			<view class="search-cont">
 				<view class="inner">
-					<image class="icon-search" src="../../static/images/search.png" mode=""></image>
+					<image class="icon-search" src="/static/images/search.png" mode=""></image>
 					<input type="text" v-model="searchValue" placeholder="输入关键字搜索" confirm-type="search" @confirm="doSearch" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
 				</view>
 			</view>
@@ -32,11 +32,11 @@
 							<view class="readers">
 								<view class="head-box" v-if="item.viewsList!=null&&item.viewsList.length>0">
 									<view class="head" v-for="(subitem,j) in item.viewsList" :key="j" v-if="subitem!=null">
-										<image  :src="subitem.avatar==null?'../../static/images/detault_head.jpg':subitem.avatar" mode=""></image>
+										<image  :src="subitem.avatar==null?'/static/images/detault_head.jpg':subitem.avatar" mode=""></image>
 									</view>
 								</view>
 								<view class="readings">
-									<image class="eye" src="../../static/images/eye.png" ></image>
+									<image class="eye" src="/static/images/eye.png" ></image>
 									<text class="num">{{item.views}}</text>
 								</view>
 							</view>

+ 1 - 1
pages/healthy/readUsers.vue

@@ -4,7 +4,7 @@
 		<view class="user-list">
 			<view class="item" v-for="(item,index) in dataList" :key="index">
 				<view class="img-box">
-					<image :src="item.avatar==null?'../../static/images/detault_head.jpg':item.avatar" mode=""></image>
+					<image :src="item.avatar==null?'/static/images/detault_head.jpg':item.avatar" mode=""></image>
 				</view>
 				<text class="name">{{item.nickname}}</text>
 			</view>

+ 4 - 5
pages/home/healthCourse.vue

@@ -8,7 +8,7 @@
 			<!-- <view class="bgf radius20 list mtb10" v-for="item in 9" >
 				<view class="posimg">
 					<image src="https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com/fs/20250116/1737005549926.png" mode="aspectFill" class="img"></image>
-					<image src="../../static/images/common/video_icon.png" class="ve"></image>
+					<image src="/static/images/common/video_icon.png" class="ve"></image>
 				</view>
 				<view class="p20">
 					<view>健康养生</view>
@@ -21,8 +21,8 @@
 							<text class="fs24 color6 ml8">崔医生</text>
 						</view>
 						<view class="justify-start align-center zan">
-							<image src='../../static/images/common/zan_icon.png' v-if='zanact'></image>
-							<image src='../../static/images/common/zan_on_icon.png' v-else></image>
+							<image src='/static/images/common/zan_icon.png' v-if='zanact'></image>
+							<image src='/static/images/common/zan_on_icon.png' v-else></image>
 							<view class="color6 fs24">5454</view>
 						</view>
 					</view>
@@ -31,7 +31,7 @@
 		</view>
 		<view v-else>
 			<view class="column align-center">
-				<image src="../../static/images/common/zanwuzhibo.png" 
+				<image src="/static/images/common/zanwuzhibo.png" 
 				class="w200 h200"></image>
 				<view>暂无课程</view>
 			</view>
@@ -48,7 +48,6 @@
 				}, {
 					name: '直播课程',
 				}],
-				color:this.$store.state.theme.currentMoban['--base-color'],
 				acttabs:0,
 				src:'',
 				zanact:true

+ 13 - 27
pages/home/index.vue

@@ -13,7 +13,7 @@
 					<view class="top-title align-center justify-start ml20">
 						<image src="../../static/images/logo.png" 
 						class="w120 h120 "></image>
-						<view class="name base-color" >倍力优</view>
+						<view class="name " >倍力优</view>
 						<!-- <view class="dot">•</view><view class="sub-name">七彩互联网医院</view> -->
 					</view>
 					<!-- 搜索框、购物车、客服 -->
@@ -22,24 +22,18 @@
 						:style="{width:userinfoa.isShow==0 && isuser==false?'633rpx':''}">
 							<image class="icon-search" src="../../static/images/search.png" mode=""></image>
 							<!-- <input type="text" disabled value="" placeholder="搜索商品、症状、功能主治" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" @click="toSearch" /> -->
-							<input type="text"  value="" :placeholder="pltoptext[0].text" v-if="theme=='beiliyou'" 
-							placeholder-style="font-size:28rpx;color:#999;font-family: PingFang SC;" @click="toSearch" />
-							<input type="text" disabled value="" :placeholder="pltoptext[1].text" v-if="theme=='orange'" 
-							placeholder-style="font-size:28rpx;color:#999;font-family: PingFang SC;" @click="toSearch" />
-							<input type="text" disabled value="" :placeholder="pltoptext[2].text" v-if="theme=='purple'"
-							placeholder-style="font-size:28rpx;color:#999;font-family: PingFang SC;" @click="toSearch" />
-							<input type="text" disabled value="" :placeholder="pltoptext[3].text" v-if="theme=='red'"
+							<input type="text"  value="" placeholder="请输入产品名称搜索"
 							placeholder-style="font-size:28rpx;color:#999;font-family: PingFang SC;" @click="toSearch" />
 						</view>
 						<!-- 购物车 -->
 						<uni-badge size="small" :text="cartCount" absolute="rightTop" type="error" 
 						v-show="userinfoa.isShow==1&&isuser==false">
 							<view class="img-item" @click="goAuthUrl('../shopping/cart')">
-								<image :src="`../../static/images/${theme}/shopping_car.png`" mode=""></image>
+								<image src="../../static/images/beiliyou/shopping_car.png" mode=""></image>
 							</view>
 						</uni-badge>
 						<view class="img-item" style="position: relative;">
-							<image :src="`../../static/images/${theme}/service_gray.png`" mode=""></image>
+							<image src="../../static/images/beiliyou/service_gray.png" mode=""></image>
 							<button class="contact-btn" open-type="contact"></button>
 						</view>
 					</view>
@@ -488,7 +482,6 @@
 				<image  :src="activity.logoUrl" @tap="showActivity()" />
 		  </view>
 		</view>
-		<!-- <tabbar :actindex="0"></tabbar> -->
 		<z-modal :show="tuiModalControl" placeholderText="请输入邀请码" :btnGroup="btnGroup" :contentType="2"  titleText="填写邀请码" @cancle="cancleTui" @sure="submitTui"   ></z-modal>
 	</view>
 </template>
@@ -509,21 +502,14 @@
 	import NewProduct from './components/NewProduct.vue'
 	import TuiProduct from '@/components/tuiProduct.vue'
 	import {getUserInfo,bindPromoter} from '@/api/user'
-	import tabbar from '../../components/tabbar/tabbar.vue'
+	// import tabbar from '../../components/tabbar/tabbar.vue'
 	export default {
-		components: {zModal,freeAudio,Menu,HotProduct,NewProduct,TuiProduct,tabbar},
+		components: {zModal,freeAudio,Menu,HotProduct,NewProduct,TuiProduct},
 		data() {
 			return { 
-				theme:'beiliyou',
 				pltoptext:[{
-					text:'请输入产品名称搜索'
-				},{
-					text:'搜索商品、症状、功能主治'
-				},{
-					text:'搜索商品、症状、功能主治2'
-				},{
-					text:'搜索商品、症状、功能主治3'
-				}],
+					text:''
+				},],
 				btnGroup: [{
 						text: '取消',
 						color: '#FFFFFF',
@@ -535,8 +521,7 @@
                     },{
 						text: '确定',
 						color: '#FFFFFF',
-						// bgColor: '#018C39',
-						bgColor: this.$store.state.theme.currentMoban,
+						bgColor: '#018C39',
 						width: '150rpx',
 						height: '80rpx',
 						shape: 'fillet',
@@ -683,7 +668,7 @@
 		methods: {
 			getshowmanv(){
 				const data={
-					key:"store.appShow"
+					key:"his.appShow"
 				}
 				getpro(data).then(res=>{
 					this.menvKey=JSON.parse(res.data)
@@ -1227,6 +1212,7 @@
 				.name{
 					font-size: 42upx;
 					// font-family: Source Han Sans CN;
+					color: #018C39;
 					font-family:  PingFang SC, PingFang SC;
 					font-weight: bold;
 					padding-left: 20upx;
@@ -1271,7 +1257,7 @@
 						flex: 1;
 					}
 				}
-				/deep/.uni-badge{
+				::v-deep.uni-badge{
 					border: none;
 					background-color: #FF3636;
 					font-family: Roboto;
@@ -2582,7 +2568,7 @@
 				align-items: center;
 				position: relative;
 				image{
-					width::100%;
+					width:100%;
 				}
 			}
 	}

+ 1 - 1
pages/home/productList.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content" :style="$store.state.theme.currentMoban">
+	<view class="content" >
 		<view class="top-fixed">
 			<!-- 搜索框 -->
 			<view class="search-cont">

+ 1 - 1
pages/home/vipBenefit.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="" :style="$store.state.theme.currentMoban">
+	<view class="">
 		<view >
 			 <video id="myVideo" :src='urlMP4' 
 			 show-mute-btn='true' @fullscreenchange='changvideo'

+ 0 - 1
pages/shopping/cart.vue

@@ -224,7 +224,6 @@
 			},
 			// 购物车加法
 			addNum(item) {
-				console.log(item)
 				item.cartNum++
 				if(item.cartNum>=item.stock){
 					item.cartNum=item.stock;

+ 2 - 3
pages/shopping/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content" :style="$store.state.theme.currentMoban">
+	<view class="content" >
 		<view class="top-content">
 			<view class="status_bar" :style="{height: statusBarHeight}"></view>
 			<!-- 这里是状态栏 -->
@@ -81,10 +81,9 @@
 				cateSelect: 0,
 				// 轮播图
 				advs: [],
-				theme:"beiliyou",
 				defaultOrder:'desc',
 				page: {
-					num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+					num: 1, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
 					size: 10 // 每页数据的数量,默认10
 				},
 				titname:'',

+ 4 - 0
pages/shopping/paymentOrder.vue

@@ -336,6 +336,10 @@
 										url:"success?order="+JSON.stringify(that.order)
 									}) 
 								 }
+							 }else if(res.payType==4){
+								 uni.redirectTo({
+								 	url:"success?order="+JSON.stringify(that.order)
+								 }) 
 							 }
 							 
 						}else{

+ 4 - 4
pages/shopping/productDetails.vue

@@ -462,8 +462,8 @@
 				);
 			},
 			getCartCount(){
-				let data = {productId:this.productId};
-				getCartCount(data).then(
+				// let data = {productId:this.productId};
+				getCartCount().then(
 					cartRes => {
 						if(cartRes.code==200){
 							 this.cartCount=cartRes.data;
@@ -930,12 +930,12 @@
 					text-align: center;
 				}
 			}
-			/deep/.uni-badge--x{
+			::v-deep.uni-badge--x{
 				display: flex;
 				align-items: center;
 				justify-content: center;
 			}
-			/deep/.uni-badge{
+			::v-deep.uni-badge{
 				border: none;
 				background-color: #FF3636;
 				font-family: Roboto;

+ 19 - 3
pages/user/index.vue

@@ -153,9 +153,13 @@
 							</view>
 
 							<view class="item no-marin-bottom" @click="toManager()">
+								<image :src="iconlist[4].icon" mode=""></image>
+								<text class="text">制单管理</text>
+							</view>
+							<!-- <view class="item no-marin-bottom" @click="toManagerCourse()">
 								<image :src="iconlist[9].icon" mode=""></image>
 								<text class="text">销售管理</text>
-							</view>
+							</view> -->
 						</view>
 					</view>
 				</view>
@@ -191,7 +195,6 @@
 		},
 		data() {
 			return {
-				theme:'beiliyou',
 				count0: 0,
 				count1: 0,
 				count2: 0,
@@ -269,6 +272,19 @@
 					console.log(res)
 				})
 			},
+			toManagerCourse(){
+				if(uni.getStorageSync('ManageToken')){
+					uni.navigateTo({
+						url: '/pages_manage/index'
+					})
+				}
+				else{
+					uni.navigateTo({
+						url: '/pages_manage/login'
+					})
+				}
+				
+			},
 			toManager() {
 				if (this.utils.checkCompanyUserLoginState()) {
 					uni.navigateTo({
@@ -295,7 +311,7 @@
 							if (res.user != null) {
 								uni.setStorageSync('users',this.user)
 								 this.user = Object.assign({}, res.user) // 使用新对象触发响应式
-								  uni.$forceUpdate() // 强制更新视图
+								  this.$forceUpdate() // 强制更新视图
 							} else {
 								this.utils.loginOut();
 							}

+ 521 - 154
pages_company/order/confirmCompanyOrder.vue

@@ -3,7 +3,7 @@
 		<view class="inner-box">
 			<!-- 商品列表 -->
 			<view class="goods-list">
-				<view v-for="(item,index) in carts" :key="index" class="item" @click="showDetail(item)">
+				<view v-for="(item,index) in carts" :key="index" class="item">
 					<view class="img-box">
 						<image :src="item.productImage" mode="aspectFill"></image>
 					</view>
@@ -15,7 +15,34 @@
 							<view class="spec ellipsis2">{{item.productAttrName}}</view>
 						</view>
 						<view class="price-num">
-							<view class="price">
+							<view class="price" @click.stop>
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="title">赠品列表</view>
+			<view class="goods-list">
+				<view v-for="(item,index) in giftCarts" :key="index" class="item" >
+					<view class="img-box">
+						<image :src="item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box-r">
+								<view class="name-box ellipsis2">
+									<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>
+									{{item.productName}}
+								</view>
+								<view class="del" @click="delCart(item)" >删除</view>
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price" @click.stop>
 								<text class="unit">¥</text>
 								<text class="num">{{item.price.toFixed(2)}}</text>
 							</view>
@@ -25,10 +52,13 @@
 				</view>
 				<!-- 小计 -->
 				<view class="sub-total">
-					<text class="label">合计金额:</text>
-					<view class="price">
-						<text class="unit">¥</text>
-						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					<view class="addgift" @click="addgift">新增赠品</view>
+					<view style="flex: 1;display: flex;justify-content: flex-end;">
+						<text class="label">合计金额:</text>
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="num">{{price.payPrice.toFixed(2)}}</text>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -45,40 +75,138 @@
 					</view>
 				</view>
 				<view class="btn" @click="openUpdateMoney()" >
-					实收金额
+					{{createSalesOrderType==1?'修改金额':'实收金额'}}
 				</view>
-				<view class="btn"  >
+				<view class="btn"  @click="getshow">
 					分享
-					<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+					<button  class="share" data-name="shareBtn" open-type="share" v-if="isshow">分享</button>
 				</view>
 			</view>
 		</view>
 		<modal v-if="inputShow" title="实收金额" confirm-text="保存" cancel-text="取消" @cancel="cancelUpdateMoney" @confirm="confirmUpdateMoney">
 			<input type="text" v-model="inputTxt" placeholder="请输入实收金额" class="intxt" maxlength="8" />
 		</modal>
+		<u-popup :show="show" mode="bottom" :closeOnClickOverlay="false">
+			<view class="popbox-title">
+				<view style="color:#888" ></view>
+				<view>修改商品单价</view>
+				<view style="color:red" @click="confirmUpdate">确定</view>
+			</view>
+			<scroll-view :scroll-y="true" class="popbox" style="height: 70vh;">
+				<view class="goods-list">
+					<view v-for="(item,index) in cartsNew" :key="index" class="item">
+						<view class="img-box">
+							<image :src="item.productImage" mode="aspectFill"></image>
+						</view>
+						<view class="info-box">
+							<view>
+								<view class="name-box ellipsis2">
+									<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+								</view>
+								<view class="spec ellipsis2">{{item.productAttrName}}</view>
+							</view>
+							<view class="price-num">
+								<view class="price" @click.stop>
+									<text class="unit">¥</text>
+									<u--input
+									    :customStyle="{padding: '0 2px',width:'60px'}"
+									    placeholder="价格"
+										type="digit"
+										maxlength="20"
+									    border="surround"
+									    v-model.trim="item.price"
+									    @blur="blur($event,item)"
+									  ></u--input>
+								</view>
+								<!-- <view class="num">x{{item.cartNum}}</view> -->
+								<view class="change-num-box">
+									<view class="img-box-num" @click="delNum(item)">
+										<image v-if="item.cartNum <= 1" src="../../static/images/jian.png" mode=""></image>
+										<image v-else src="../../static/images/jian2.png" mode=""></image>
+									</view>
+									<input  type="number" @change="changeNum($event,item)" :value="item.cartNum"   />
+									<view class="img-box-num" @click="addNum(item)">
+										<image src="../../static/images/add.png" mode=""></image>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="title">赠品列表</view>
+					<view v-for="(item,index) in giftCartsNew" :key="index" class="item">
+						<view class="img-box">
+							<image :src="item.productImage" mode="aspectFill"></image>
+						</view>
+						<view class="info-box">
+							<view>
+								<view class="name-box ellipsis2">
+									<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+								</view>
+								<view class="spec ellipsis2">{{item.productAttrName}}</view>
+							</view>
+							<view class="price-num">
+								<view class="price" @click.stop>
+									<text class="unit">¥</text>
+									<u--input
+									    :customStyle="{padding: '0 2px',width:'60px'}"
+									    placeholder="价格"
+										type="digit"
+										maxlength="20"
+									    border="surround"
+									    v-model.trim="item.price"
+									    @blur="blur($event,item)"
+									  ></u--input>
+								</view>
+								<!-- <view class="num">x{{item.cartNum}}</view> -->
+								<view class="change-num-box">
+									<view class="img-box-num" @click="delNum(item)">
+										<image v-if="item.cartNum <= 1" src="../../static/images/jian.png" mode=""></image>
+										<image v-else src="../../static/images/jian2.png" mode=""></image>
+									</view>
+									<input  type="number" @change="changeNum($event,item)" :value="item.cartNum"   />
+									<view class="img-box-num" @click="addNum(item)">
+										<image src="../../static/images/add.png" mode=""></image>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</scroll-view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
-	import {getSalesOrder,addUserCart,updateSalseOrderMoney} from '@/api/companyOrder.js'
+	import {delCart,cartNum} from '@/api/product'
+	import {getpro} from "@/api/index.js"
+	import {getSalesOrder,addUserCart,updateSalseOrderMoney,updateSalesOrderMoneyByProduct} from '@/api/companyOrder.js'
 	export default {
 		data() {
 			return {
 				inputShow:false,
 				inputTxt:null,
 				orderKey:null,
+				 // 原来数据
 				price:{
 					payPrice:0.00,
 					totalPrice:0.00,
 				},
+				 // 原来数据
 				carts:[],
-				
+				giftCarts: [],
+				cartsNew: [],
+				giftCartsNew: [],
+				// 类型
+				createSalesOrderType: 1,
+				show: false,
+				isshow:true,
+				isSure:false
 			}
 		},
 		onLoad(option) {
 			this.orderKey=option.orderKey;
-			console.log(this.orderKey)
-			this.getSalesOrder();
+			this.getConfigByKey()
 		},
 		//发送给朋友
 		onShareAppMessage(res) {
@@ -97,10 +225,99 @@
 				imageUrl:  this.carts[0].productImage //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 			}
 		},
+		onShow() {
+			this.getSalesOrder();
+			
+		},
 		methods: {
+			getshow(){
+				if(!this.isshow){
+					uni.showToast({
+						title: '请修改赠品金额!',
+						icon: "none"
+					})
+				}
+			},
+			getConfigByKey(){
+				const data={
+					key:"store.config"
+				}
+				getpro(data).then(res=>{
+					if(res&&res.data) {
+						this.createSalesOrderType = JSON.parse(res.data).createSalesOrderType || 1
+					} else {
+						this.createSalesOrderType = 1
+					}
+					
+				})
+			},
+			blur(value,item) {
+				item.price = typeof item.price === 'string' ? item.price.trim() : String(item.price || 0).trim();
+				let price = item.price
+				const regex = /^(0|[1-9]\d*)(\.\d{1,2})?$/;
+				if(!regex.test(price.trim())) {
+					uni.showToast({
+						title: '请输入正确的金额',
+						icon: "none"
+					})
+					return 
+				}
+			},
+			confirmUpdate(type) {
+				const regex = /^(0|[1-9]\d*)(\.\d{1,2})?$/;
+				let flag = this.cartsNew.some(item=> {
+					let price = typeof item.price === 'string' ? item.price.trim() : String(item.price || 0).trim()
+					return !regex.test(price)
+				})
+				let flag2 = this.giftCartsNew.some(item=> {
+					let price = typeof item.price === 'string' ? item.price.trim() : String(item.price || 0).trim()
+					return !regex.test(price)
+				})
+				if(flag||flag2) {
+					uni.showToast({
+						title: '请输入正确的金额',
+						icon: "none"
+					})
+					return 
+				}
+				if(type!=1) {
+					this.show = false
+				}
+				const param = {
+					createOrderKey:this.orderKey,
+					token:uni.getStorageSync('CompanyUserToken'),
+					carts: this.cartsNew,
+					giftCarts: this.giftCartsNew
+				}
+				uni.showLoading({
+					title: '处理中'
+				})
+				updateSalesOrderMoneyByProduct(param).then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							this.isSure=true
+							this.getSalesOrder();
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				).catch(()=>{
+					uni.hideLoading()
+				})
+			},
 			openUpdateMoney(){
-				console.log(1)
-				this.inputShow = true
+				if(this.createSalesOrderType==1) {
+					this.cartsNew = uni.$u.deepClone(this.carts)
+					this.giftCartsNew = uni.$u.deepClone(this.giftCarts)
+					this.show = true
+				} else {
+					this.inputShow = true
+				}
 			},
 			cancelUpdateMoney(){
 				this.inputShow = false
@@ -146,12 +363,24 @@
 				getSalesOrder(data).then(
 					res => {
 						if(res.code==200){
+							
 							this.carts=res.carts;
+							this.giftCarts = res.giftCarts;
 							this.carts.forEach(function(element) {
 								that.price.payPrice+=element.price*element.cartNum;
 							});
+							this.giftCarts.forEach(function(element) {
+								that.price.payPrice+=element.price*element.cartNum;
+							});
 							that.price.totalPrice=res.totalMoney
-							 
+							that.cartsNew = uni.$u.deepClone(that.carts)
+							that.giftCartsNew = uni.$u.deepClone(that.giftCarts)
+							if(this.giftCarts.length>0&&!this.isSure){
+								this.isshow=false
+								console.log('酷酷酷',this.isshow)
+							}else if(this.isSure){
+								this.isshow=true
+							}
 						}else{
 							uni.showToast({
 								icon:'none',
@@ -162,199 +391,306 @@
 					rej => {}
 				);
 			},
-			 
+			addgift() {
+				uni.navigateTo({
+					url: '/pages_company/order/productGiftList'
+				})
+			},
+			delCart(item){
+				let data = {ids:[item.id]};
+				delCart(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'success',
+								title: "操作成功",
+							});
+							this.getSalesOrder();
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			changeNum(e,item) {
+				item.cartNum = e.detail.value.replace(/\D/g, '')
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			changeCartNum(item){
+				this.confirmUpdate(1)
+			},
+			// 购物车减法
+			delNum(item) {
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				item.cartNum --
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				 
+				this.changeCartNum(item)
+			},
+			// 购物车加法
+			addNum(item) {
+				console.log(item)
+				item.cartNum++
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
 		}
 	}
 </script>
 
 <style lang="scss">
+	.popbox {
+		background-color: #fff;
+		&-title {
+			width: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 24rpx;
+			background-color: #fff;
+			border-bottom: 1rpx solid #EDEEEF;
+			box-sizing: border-box;
+		}
+	}
+	.title {
+		padding: 24rpx 0 0;
+		font-weight: bold;
+	}
 	.inner-box{
 		padding: 20upx 20upx 140upx;
-		 
-		.goods-list{
-			margin-top: 20upx;
-			padding: 0 30upx;
-			background-color: #FFFFFF;
-			border-radius: 16upx;
-			.item{
-				padding: 30upx 0;
-				border-bottom: 1px solid #EDEEEF;
-				display: flex;
-				align-items: center;
-				.img-box{
-					width: 160upx;
-					height: 160upx;
-					margin-right: 30upx;
-					image{
-						width: 100%;
-						height: 100%;
-					}
+	}
+	.goods-list{
+		margin-top: 20upx;
+		padding: 0 30upx;
+		background-color: #FFFFFF;
+		border-radius: 16upx;
+		.item{
+			padding: 30upx 0;
+			border-bottom: 1px solid #EDEEEF;
+			display: flex;
+			align-items: center;
+			.img-box{
+				width: 160upx;
+				height: 160upx;
+				margin-right: 30upx;
+				image{
+					width: 100%;
+					height: 100%;
 				}
-				.info-box{
-					width: calc(100% - 190upx);
-					height: 160upx;
+			}
+			.info-box{
+				width: calc(100% - 190upx);
+				height: 160upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.name-box-r {
 					display: flex;
-					flex-direction: column;
+					align-items: flex-start;
 					justify-content: space-between;
-					.name-box{
-						font-size: 28upx;
+					.del {
+						font-size: 32upx;
 						font-family: PingFang SC;
 						font-weight: 500;
-						color: #111111;
-						line-height: 40upx;
-						.tag{
-							display: inline-block;
-							padding: 0 6upx;
-							height: 30upx;
-							background: linear-gradient(90deg, #3def30 0%,#018C39 100%);
-							border-radius: 4upx;
-							margin-right: 10upx;
-							font-size: 22upx;
-							font-family: PingFang SC;
-							font-weight: bold;
-							color: #FFFFFF;
-							line-height: 30upx;
-							float: left;
-							margin-top: 7upx;
-						}
+						color: red;
 					}
-					.spec{
-						margin-top: 10upx;
-						font-size: 24upx;
+				}
+				.name-box{
+					flex: 1;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+					.tag{
+						display: inline-block;
+						padding: 0 6upx;
+						height: 30upx;
+						background: linear-gradient(90deg, #3def30 0%,#018C39 100%);
+						border-radius: 4upx;
+						margin-right: 10upx;
+						font-size: 22upx;
 						font-family: PingFang SC;
-						font-weight: 500;
-						color: #999999;
-						line-height: 1;
+						font-weight: bold;
+						color: #FFFFFF;
+						line-height: 30upx;
+						float: left;
+						margin-top: 7upx;
 					}
-					.price-num{
+				}
+				.spec{
+					margin-top: 10upx;
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					flex: 1;
+				}
+				.price-num{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.price{
 						display: flex;
-						align-items: center;
-						justify-content: space-between;
-						.price{
-							display: flex;
-							align-items: flex-end;
-							.unit{
-								font-size: 24upx;
-								font-family: PingFang SC;
-								font-weight: 500;
-								color: #111111;
-								line-height: 1.2;
-								margin-right: 4upx;
-							}
-							.num{
-								font-size: 32upx;
-								font-family: PingFang SC;
-								font-weight: 500;
-								color: #111111;
-								line-height: 1;
-							}
+						align-items: flex-end;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 1.2;
+							margin-right: 4upx;
 						}
 						.num{
-							font-size: 24upx;
+							font-size: 32upx;
 							font-family: PingFang SC;
 							font-weight: 500;
-							color: #999999;
+							color: #111111;
 							line-height: 1;
 						}
 					}
-				}
-			}
-			.sub-total{
-				height: 88upx;
-				display: flex;
-				align-items: center;
-				justify-content: flex-end;
-				.label{
-					font-size: 24upx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #999999;
-				}
-				.price{
-					display: flex;
-					align-items: flex-end;
-					.unit{
+					.num{
 						font-size: 24upx;
 						font-family: PingFang SC;
 						font-weight: 500;
-						color: #FF6633;
-						line-height: 1.2;
-						margin-right: 4upx;
-					}
-					.num{
-						font-size: 32upx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #FF6633;
+						color: #999999;
 						line-height: 1;
 					}
 				}
 			}
 		}
-		.points{
+		.sub-total{
 			height: 88upx;
-			padding: 0 30upx;
-			background: #FFFFFF;
-			border-radius: 16upx;
-			 
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
-			.left{
-				display: flex;
-				align-items: center;
-				image{
-					width: 28upx;
-					height: 28upx;
-					margin-right: 20upx;
-				}
-				.text{
-					font-size: 28upx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #666666;
-				}
+			.addgift {
+				padding: 10rpx 14rpx;
+				color: #018C39;
+				font-size: 28rpx;
+				border-radius: 8rpx 8rpx 8rpx 8rpx;
+				border: 2rpx solid #018C39;
 			}
-			.right{
+			.label{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+			.price{
 				display: flex;
-				align-items: center;
-				.text{
-					font-size: 28upx;
+				align-items: flex-end;
+				.unit{
+					font-size: 24upx;
 					font-family: PingFang SC;
 					font-weight: 500;
-					color: #111111;
-					 
+					color: #FF6633;
+					line-height: 1.2;
+					margin-right: 4upx;
 				}
-				image{
-					margin-left: 15upx;
-					width: 14upx;
-					height: 24upx;
+				.num{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1;
 				}
 			}
 		}
-		.remarks{
-			height: 88upx;
-			padding: 0 30upx;
-			background: #FFFFFF;
-			border-radius: 16upx;
-			margin-top: 20upx;
+	}
+	.points{
+		height: 88upx;
+		padding: 0 30upx;
+		background: #FFFFFF;
+		border-radius: 16upx;
+		 
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.left{
 			display: flex;
 			align-items: center;
-			input{
-				width: 100%;
+			image{
+				width: 28upx;
+				height: 28upx;
+				margin-right: 20upx;
+			}
+			.text{
 				font-size: 28upx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				color: #000000;
+				color: #666666;
 			}
-			.input{
+		}
+		.right{
+			display: flex;
+			align-items: center;
+			.text{
 				font-size: 28upx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				color: #999999;
+				color: #111111;
+				 
+			}
+			image{
+				margin-left: 15upx;
+				width: 14upx;
+				height: 24upx;
 			}
 		}
 	}
+	.remarks{
+		height: 88upx;
+		padding: 0 30upx;
+		background: #FFFFFF;
+		border-radius: 16upx;
+		margin-top: 20upx;
+		display: flex;
+		align-items: center;
+		input{
+			width: 100%;
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #000000;
+		}
+		.input{
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+		}
+	}
 	.btn-foot{
 		box-sizing: border-box;
 		width: 100%;
@@ -427,5 +763,36 @@
 			}
 		}
 	}
+	.change-num-box{
+		display: flex;
+		align-items: center;
+		.img-box-num{
+			width: 48upx;
+			height: 48upx;
+			// border-radius: 4upx;
+			border: 1px solid #dddddd;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			image{
+				width: 25rpx;
+				height: 25rpx;
+			}
+		}
+		input{
+			width: 48upx;
+			height: 48upx;
+			line-height: 48upx;
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			// border-radius: 4upx;
+			border-top: 1px solid #dddddd;
+			border-bottom: 1px solid #dddddd;
+			text-align: center;
+			// margin: 0 16upx;
+		}
+	}
 </style>
  

+ 42 - 3
pages_company/order/confirmOrder.vue

@@ -32,7 +32,37 @@
 					</view>
 				</view>
 			</view>
-			 
+			<view class="mt12">赠送商品</view>
+			 <view class="goods-list">
+			 	<view v-for="(item,index) in giftcarts" :key="index" class="item" @click="showDetail(item)">
+			 		<view class="img-box">
+			 			<image :src="item.productImage" mode="aspectFill"></image>
+			 		</view>
+			 		<view class="info-box">
+			 			<view>
+			 				<view class="name-box ellipsis2">
+			 					<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+			 				</view>
+			 				<view class="spec ellipsis2">{{item.productAttrName}}</view>
+			 			</view>
+			 			<view class="price-num">
+			 				<view class="price">
+			 					<text class="unit">¥</text>
+			 					<text class="num">{{item.price.toFixed(2)}}</text>
+			 				</view>
+			 				<view class="num">x{{item.cartNum}}</view>
+			 			</view>
+			 		</view>
+			 	</view>
+			 	<!-- 小计 -->
+			 	<view class="sub-total">
+			 		<text class="label">订单金额:</text>
+			 		<view class="price">
+			 			<text class="unit">¥</text>
+			 			<text class="num">{{price.giftPrice.toFixed(2)}}</text>
+			 		</view>
+			 	</view>
+			 </view>
 		</view>
 		<!-- 底部按钮 -->
 		<view class="btn-foot">
@@ -70,10 +100,11 @@
 				orderKey:null,
 				price:{
 					totalPrice:0.00,
+					giftPrice:0.00,
 					payPrice:0.00,
 				},
 				carts:[],
-				
+				giftcarts:[]
 			}
 		},
 		// onLoad(option) {
@@ -161,8 +192,15 @@
                                 const price = Number(element.price) || 0;
                                 const cartNum = Number(element.cartNum) || 0;
                                 this.price.totalPrice += price * cartNum;
+                            });
+							this.giftcarts=res.giftCarts
+							this.giftcarts.forEach(element => {
+                                const price = Number(element.price) || 0;
+                                const cartNum = Number(element.cartNum) || 0;
+                                this.price.giftPrice += price * cartNum;
                             });
 							that.price.payPrice=res.totalMoney
+							
 						}else{
 							uni.showToast({
 								icon:'none',
@@ -182,7 +220,8 @@
 							res => {
 								if(res.code==200){
 									uni.navigateTo({
-										url: '/pages_shopping/shopping/confirmCreateOrder?type=buy&cartIds='+res.cartIds.toString()+"&companyId="+res.companyId+"&companyUserId="+res.companyUserId+"&createOrderKey="+this.orderKey
+										url: '/pages_shopping/shopping/confirmCreateOrder?type=buy&cartIds='+res.cartIds.toString()+"&companyId="+res.companyId+
+										"&companyUserId="+res.companyUserId+"&createOrderKey="+this.orderKey+"&giftCartIds="+res.giftCartIds
 									})
 								}else{
 									uni.showToast({

+ 10 - 7
pages_company/order/productDetails.vue

@@ -91,7 +91,7 @@
 					<text class="label">咨询</text>
 					<button class="contact-btn" open-type="contact"></button>
 				</view>
-				<view class="item" @click="navgetTo('./cart')">
+				<view class="item" v-if="isGift!=1" @click="navgetTo('./cart')">
 					<uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
 						<image src="../../static/images/cart36.png" mode=""></image>
 					</uni-badge>
@@ -99,7 +99,7 @@
 				</view>
 			</view>
 			<view class="btn-box">
-				<view class="btn cart" @click="addCart('cart')">加入购物车</view>
+				<view class="btn cart" @click="addCart('cart')">{{isGift? '加入赠品':'加入购物车'}}</view>
 				<!-- <view class="btn buy" @click="addCart('buy')">{{buyText}}</view> -->
 			</view>
 		</view>
@@ -197,10 +197,13 @@
 				// 规格数量
 				specNum: 1,
 				loadding:true,
+				// 是否从选择赠品过来的
+				isGift: 0, 
 			};
 		},
 		onLoad(options) {
 			this.getDicts();
+			this.isGift = options.isGift || 0
 			this.productId = options.productId;
 			if(this.utils.checkToken()){
 				this.getCartCount();
@@ -239,7 +242,7 @@
 					return;
 				}
 				var isBuy=type=="buy"?1:0;
-				let data = {isBuy:isBuy,cartNum:this.specNum,productId:this.productValueSelect.productId,attrValueId:this.productValueSelect.id};
+				let data = {isBuy:isBuy,cartNum:this.specNum,productId:this.productValueSelect.productId,attrValueId:this.productValueSelect.id,isGift:this.isGift};
 				addCart(data).then(
 					res => {
 						if(res.code==200){
@@ -313,8 +316,8 @@
 				);
 			},
 			getCartCount(){
-				let data = {productId:this.productId};
-				getCartCount(data).then(
+				// let data = {productId:this.productId};
+				getCartCount().then(
 					cartRes => {
 						if(cartRes.code==200){
 							 this.cartCount=cartRes.data;
@@ -730,12 +733,12 @@
 					text-align: center;
 				}
 			}
-			/deep/.uni-badge--x{
+			::v-deep.uni-badge--x{
 				display: flex;
 				align-items: center;
 				justify-content: center;
 			}
-			/deep/.uni-badge{
+			::v-deep.uni-badge{
 				border: none;
 				background-color: #FF3636;
 				font-family: Roboto;

+ 2 - 2
pages_company/storeProductPackageDetails.vue

@@ -565,12 +565,12 @@
 					text-align: center;
 				}
 			}
-			/deep/.uni-badge--x{
+			::v-deep.uni-badge--x{
 				display: flex;
 				align-items: center;
 				justify-content: center;
 			}
-			/deep/.uni-badge{
+			::v-deep.uni-badge{
 				border: none;
 				background-color: #FF3636;
 				font-family: Roboto;

+ 1 - 1
pages_index/index/famousPrescribeDetails.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content" v-if="item!=null" :style="$store.state.theme.currentMoban">
+	<view class="content" v-if="item!=null" >
 		<view class="image">
 			<image mode="aspectFill" :src="item.imgUrl"></image>
 		</view>

+ 1 - 2
pages_index/index/famousPrescribeList.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content" :style="$store.state.theme.currentMoban">
+	<view class="content" >
 		<view class="top-box">
 			<!-- 搜索框 -->
 			<view class="search-cont">
@@ -76,7 +76,6 @@
 				],
 				keyword: '',
 				dataList: [],
-				basecolor:this.$store.state.theme.currentMoban['--base-color'],
 			};
 		},
 		onLoad() {

+ 1 - 1
pages_index/index/testDetails.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content" :style="$store.state.theme.currentMoban">
+	<view class="content">
 		<view class="bg-box">
 			<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/71014b69fdcc4b56ae2a84bdc28f11c3.png"></image>
 			<view class="title-box">

+ 1 - 2
pages_index/index/testList.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content" >
 		<view class="bg">
-			<image :src="`../../static/images/${theme}/home_top_bg.png`"></image>
+			<image src="../../static/images/beiliyou/home_top_bg.png"></image>
 		</view>
 		<mescroll-body  top="0rpx"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="test-list">
@@ -31,7 +31,6 @@
 		mixins: [MescrollMixin], 
 		data() {
 			return {
-				theme:"beiliyou",
 				mescroll:null,
 				downOption: {   //下拉刷新
 				 	use:true,

+ 26 - 1
pages_shopping/shopping/confirmCreateOrder.vue

@@ -49,6 +49,27 @@
 						</view>
 					</view>
 				</view>
+				<view class='mtb16'>赠品</view>
+				<view v-for="(item,index) in giftCarts" :key="index" class="item">
+					<view class="img-box">
+						<image :src="item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
 				<!-- 小计 -->
 				<view class="sub-total">
 					<text class="label">小计:</text>
@@ -166,9 +187,11 @@
 				},
 				address:null,
 				carts:[],
+				giftCarts:[],
 				checked: false,
 				type:null,
 				cartIds:null,
+				giftCartIds:null,
 				form:{
 					useIntegral:0,
 					orderKey:null,
@@ -185,6 +208,7 @@
 			this.form.companyId=option.companyId;
 			this.form.companyUserId=option.companyUserId;
 			this.cartIds=option.cartIds;
+			this.giftCartIds=option.giftCartIds;
 			this.type=option.type;
 			this.confirm();
 			uni.$on('updateAddress', (e) => {
@@ -227,7 +251,7 @@
 				this.computed()
 			},
 			confirm(item){
-				let data = {type:this.type,cartIds:this.cartIds};
+				let data = {type:this.type,cartIds:this.cartIds,giftCartIds:this.giftCartIds};
 				confirm(data).then(
 					res => {
 						if(res.code==200){
@@ -238,6 +262,7 @@
 								 this.address=res.address;
 								 console.log(this.form.addreddId)
 							 }
+							 this.giftCarts=res.giftCarts
 							 this.computed()
 						}else{
 							uni.showToast({

+ 1 - 1
pages_shopping/store/beiliyouHome.vue

@@ -298,7 +298,7 @@
 	box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
 	padding: 20rpx;
 	height: 300rpx;
-	width: calc(100% -40rpx);
+	width: calc(100% - 40rpx);
 	position: relative;
 	image{
 		width: 250rpx;

+ 1 - 1
pages_user/user/pay.vue

@@ -55,7 +55,7 @@
 		},
 		onShareAppMessage(res) {
 			return {
-				title: '云联融智-收款',
+				title: '倍力优-收款',
 				path: `/pages_user/user/pay?companyId=`+this.companyId+"&companyUserId="+this.companyUserId
 			}
 		},

+ 7 - 4
pages_user/user/storeOrder.vue

@@ -49,11 +49,14 @@
 								<image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
 							</view>
 							<view class="drug-info"  >
-								<view>
-									<view class="name-box ellipsis2">
-										<view v-if="subItem.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(subItem.jsonInfo).productName}}
+								<view class="justify-between ">
+									<view>
+										<view class="name-box ellipsis2">
+											<view v-if="subItem.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(subItem.jsonInfo).productName}}
+										</view>
+										<view class="spec ellipsis2">{{JSON.parse(subItem.jsonInfo).sku}}</view>
 									</view>
-									<view class="spec ellipsis2">{{JSON.parse(subItem.jsonInfo).sku}}</view>
+									<view class="fs24 " style="color: #FF6633;">{{JSON.parse(subItem.jsonInfo).isGift==1?'赠品':''}}</view>
 								</view>
 								<view class="num-box">
 									<view class="price">

+ 56 - 10
store/index.js

@@ -1,12 +1,58 @@
-import Vuex from 'vuex';
+// store/index.js
 import Vue from 'vue';
-import theme from './modules/theme.js';
-Vue.use(Vuex)
-const store = new Vuex.Store({
-	modules: {
-		theme
-	}
-})
-
+import Vuex from 'vuex';
 
-export default store;
+Vue.use(Vuex);
+import {
+	getConfigByKey
+} from '@/api/user.js'
+export default new Vuex.Store({
+  state: {
+	 webviewUrl: '',
+	 wsDanmuUrl: 'wss://userapp.cqsft.vip', // 弹幕评论接口地址
+	 //红包领取规则:
+	 answerType: 1, //红包领取规则 0:完课且最后一分钟(第二次无需最后一分钟), 1:按完课百分比答题领红包
+	 isSpare:1, // 0,主要小程序,1:备选
+	 uploadFile: 'https://userapp.cqsft.vip',
+	imgpath: 'https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com',//倍力优图片请求地址
+	logoname:'倍力优',
+	appid:'wx11a2ce7c2bbc4521',//倍力优会员商城
+	// appid:'wx301ab2fad04c658a',//倍力优工具
+	
+  },
+  mutations: {
+    setCount(state, value) {
+      state.count = value;
+    },
+    setUserInfo(state, info) {
+      state.userInfo = info;
+    },
+	setWebviewUrl(state, value) {
+		state.webviewUrl = value;
+	}
+  },
+  actions: {
+    fetchUser({ commit }) {
+      // const res = await uni.request({ url: '/api/user' });
+      commit('setUserInfo', 'noe');
+    },
+	getWebviewUrl({commit}) {
+		var that = this;
+		var data = {
+			key: 'course.config'
+		}
+		return new Promise((resolve, reject) => {
+			getConfigByKey(data).then(res => {
+				if (res.code == 200) {
+					console.log("getConfigByKey====", JSON.parse(res.data))
+					let data = JSON.parse(res.data)
+					commit('setWebviewUrl', data.userCourseAuthDomain);
+					resolve()
+				}
+			}).catch(error => {
+				reject(error)
+			});
+		})
+	}
+  }
+});

+ 0 - 61
store/modules/theme.js

@@ -1,61 +0,0 @@
-const theme = {
-	state: {
-		key: 'beiliyou',
-		beiliyou: {
-			'--base-color': '#018C39',
-			'--base-color-a':'#FF5C03',
-			'--base-bg':'#018C39',
-			'--base-color-rgba': '1,140,57',
-			'--user-topbg':'@/static/images/beiliyou/home_top_bg.png'
-		},
-		orange: {
-			'--base-color': '#FC581C',
-			'--base-color-a':'#FF5C03',
-			'--base-bg':'#FC581C',
-			'--base-color-rgba': '252,88,28',
-			'--user-topbg':'@/static/images/orange/home_top_bg.png'
-		},
-		purple: {
-			'--base-color': '#4C49E9',
-			'--base-color-a':'#FF5C03',
-			'--base-bg':'#4C49E9',
-			'--base-color-rgba': '76,73,233',
-			'--user-topbg':'@/static/images/purple/home_top_bg.png'
-		},
-		red: {
-			'--base-color': '#C03E25',
-			'--base-color-a':'#FF5C03',
-			'--base-bg':'#C03E25',
-			'--base-color-rgba': '192,62,37',
-			'--user-topbg':'@/static/images/red/home_top_bg.png'
-		},
-		// 当前模板
-		currentMoban: {
-			'--base-color': '#018C39',
-			'--base-color-a':'#FF5C03',
-			'--base-bg':'#018C39',
-			'--base-color-rgba': '1,140,57',
-			'--user-topbg':'@/static/images/beiliyou/home_top_bg.png'
-		}
-	},
-	mutations: {
-		// 获取当前theme
-		setTheme(state, value = 'red') {
-			state.currentMoban = state[value]
-		}
-	},
-	actions: {
-		// 这是vuex中请求接口变色
-		async getTheme({
-			commit
-		}) {
-			setTimeout(() => {
-				// 请求完成  调用 mutations得setTheme  设置模板为 moban2
-				commit('setTheme', 'red')
-			}, 100)
-		}
-	}
-
-}
-
-export default theme;

+ 1 - 1
uni_modules/uview-ui/components/u-input/props.js

@@ -50,7 +50,7 @@ export default {
 			type: String,
 			default: uni.$u.props.input.placeholder
 		},
-		// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
+		// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写::v-deep
 		placeholderClass: {
 			type: String,
 			default: uni.$u.props.input.placeholderClass

+ 1 - 1
uni_modules/uview-ui/components/u-input/u-input.vue

@@ -89,7 +89,7 @@ import props from "./props.js";
  * @property {Boolean}			password				是否密码类型 ( 默认 false )
  * @property {String | Number}	maxlength				最大输入长度,设置为 -1 的时候不限制最大长度 ( 默认 -1 )
  * @property {String}			placeholder				输入框为空时的占位符
- * @property {String}			placeholderClass		指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ ( 默认 'input-placeholder' )
+ * @property {String}			placeholderClass		指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写::v-deep ( 默认 'input-placeholder' )
  * @property {String | Object}	placeholderStyle		指定placeholder的样式,字符串/对象形式,如"color: red;"
  * @property {Boolean}			showWordLimit			是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 ( 默认 false )
  * @property {String}			confirmType				设置右下角按钮的文字,兼容性详见uni-app文档 ( 默认 'done' )

+ 1 - 1
uni_modules/uview-ui/components/u-textarea/props.js

@@ -10,7 +10,7 @@ export default {
 			type: [String, Number],
 			default: uni.$u.props.textarea.placeholder
 		},
-		// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
+		// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写::v-deep
 		placeholderClass: {
 			type: String,
 			default: uni.$u.props.input.placeholderClass

+ 1 - 1
uni_modules/uview-ui/components/u-textarea/u-textarea.vue

@@ -49,7 +49,7 @@ import props from "./props.js";
  *
  * @property {String | Number} 		value					输入框的内容
  * @property {String | Number}		placeholder				输入框为空时占位符
- * @property {String}			    placeholderClass		指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ ( 默认 'input-placeholder' )
+ * @property {String}			    placeholderClass		指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写::v-deep ( 默认 'input-placeholder' )
  * @property {String | Object}	    placeholderStyle		指定placeholder的样式,字符串/对象形式,如"color: red;"
  * @property {String | Number}		height					输入框高度(默认 70 )
  * @property {String}				confirmType				设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效(默认 'done' )

+ 22 - 0
utils/common.js

@@ -435,12 +435,34 @@ var formatSalesNum=function(saleNum) {
 		}
 	}
 }
+var generateRandomString=function(length) {
+	let result = '';
+	const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+	const charactersLength = characters.length;
+
+	for (let i = 0; i < length; i++) {
+		result += characters.charAt(Math.floor(Math.random() * charactersLength));
+	}
+	return result;
+}
+var isLoginCourse=function(){
+	return new Promise((resolve, reject) => {
+		let token = uni.getStorageSync('TOKEN_WEXIN');
+		if (token==null||token==undefined||token=="" ) {
+			resolve(false);
+		} else {
+			resolve(true);
+		}
+	}); 
+}
 
 module.exports = {
 		formatDate:formatDate,
         isEmpty : isEmpty,
+		isLoginCourse:isLoginCourse,
 		checkLoginState : checkLoginState,
 		getDictLabelName:getDictLabelName,
+		generateRandomString:generateRandomString,
 		getDictLabelNames:getDictLabelNames,
 		photosToArr:photosToArr,
 		dateFormat:dateFormat,