فهرست منبع

Merge branch 'v2' of http://39.101.143.165:8090/wrj/GuangYuYuan-app into v2

郭鹏飞 8 ماه پیش
والد
کامیت
5919edebe5

+ 3 - 2
src/api/address.js

@@ -61,7 +61,7 @@ export function getAddrById(data) {
 export function getVirtualAddrByPhone(data) {
     return request({
         method: 'get',
-        url: '/tAddress/getVirtualAddressByPhone',
+        url: '/tAddress/wx/getVirtualAddressByPhone',
         data
     });
 }
@@ -77,9 +77,10 @@ export function netVirtualAddrAdd(data) {
 
 // 删除虚拟地址
 export function netVirtualAddrDel(data) {
+    let str = uni.$u.queryParams(data);
     return request({
         method: 'delete',
-        url: '/tAddress/deleteVirtualAddress',
+        url: `/tAddress/deleteVirtualAddress${str}`,
         data
     });
 }

+ 3 - 3
src/api/index.js

@@ -205,7 +205,7 @@ export function confirmOrder(data) {
 export function commentOrder(data) {
     return request({
         method: 'post',
-        url: '/api/comment/v1/wx/add',
+        url: '/tCommentUser/wx/add',
         data
     });
 }
@@ -286,7 +286,7 @@ export function getCollect(data) {
 export function getJsLocation(data) {
     return request({
         method: 'post',
-        url: '/api/js/v1/wx/updateLocation',
+        url: '/api/js/v1/wx/updateLocation/f',
         data
     });
 }
@@ -426,7 +426,7 @@ export function confirm(data) {
     });
 }
 
-// 商户提前完成
+// 商户评价客户
 export function tCommentUser(data) {
     return request({
         method: 'post',

+ 5 - 0
src/components/upload/index.vue

@@ -33,6 +33,11 @@ export default {
 			type: [String, Number],
 			default: uni.$u.props.upload.height
 		},
+        // 文件大小限制,单位为byte
+		maxSize: {
+			type: [String, Number],
+            default: uni.$u.props.upload.maxSize
+		},
 		maxCount: {
 			type: Number,
 			default: 5

+ 27 - 25
src/pages/address/index.vue

@@ -6,34 +6,36 @@
 		<z-paging ref="paging" bg-color="#f8f8f8" v-model="dataList" @query="queryList">
 			<view class="main-list">
 				<u-radio-group v-model="selected" placement="column" activeColor="#0879FF" @change="onChange">
-					<view class="mitem" v-for="(item, i) in dataList" :key="i">
-						<view class="info-box" @click="onClick(item)">
-							<view class="item-line atext">
-								<text class="name">{{ item.userName }}</text>
-								<text>{{ item.phone }}</text>
-								<template v-if="query.orderNo && item.type == 1">
-									<view class="default">默认</view>
-								</template>
-							</view>
-							<view class="btext" v-if="!!item.address">
-								<text>{{ item.name }} - </text>
-								<text>{{ item.address }}</text>
-								<text>{{ item.atlasAdd }}</text>
+					<template v-for="(item, i) in dataList">
+						<view class="mitem" :key="i" v-if="item.type != 2">
+							<view class="info-box" @click="onClick(item)">
+								<view class="item-line atext">
+									<text class="name">{{ item.userName }}</text>
+									<text>{{ item.phone }}</text>
+									<template v-if="query.orderNo && item.type == 1">
+										<view class="default">默认</view>
+									</template>
+								</view>
+								<view class="btext" v-if="!!item.address">
+									<text>{{ item.name }} - </text>
+									<text>{{ item.address }}</text>
+									<text>{{ item.atlasAdd }}</text>
+								</view>
 							</view>
-						</view>
-						<u-line length="100%" color="#eee" margin="14rpx 0 18rpx"></u-line>
-						<view class="actions">
-							<template v-if="!query.orderNo">
-								<u-radio :name="item.id" shape="square" label="设为常用地址" labelSize="26rpx"></u-radio>
-							</template>
-							<view class="right">
-								<text @click="onEdit(item)">编辑</text>
-								<text @click="onDel(item)">删除</text>
-								<!-- <image src="/static/identify/edit.png" />
-								<image src="/static/identify/delete.png" /> -->
+							<u-line length="100%" color="#eee" margin="14rpx 0 18rpx"></u-line>
+							<view class="actions">
+								<template v-if="!query.orderNo">
+									<u-radio :name="item.id" shape="square" label="设为常用地址" labelSize="26rpx"></u-radio>
+								</template>
+								<view class="right">
+									<text @click="onEdit(item)">编辑</text>
+									<text @click="onDel(item)">删除</text>
+									<!-- <image src="/static/identify/edit.png" />
+									<image src="/static/identify/delete.png" /> -->
+								</view>
 							</view>
 						</view>
-					</view>
+					</template>
 				</u-radio-group>
 			</view>
 

+ 33 - 15
src/pages/address/virtual.vue

@@ -105,17 +105,24 @@ export default {
 		this.query = query;
 	},
 	onShow() {
-		// this.getData();
+		let sl = uni.getStorageSync('staffLocation');
+		if (sl) {
+			this.selected = sl.addrId;
+			this.currentLocation = sl.address + sl.name;
+		}
+		this.getData();
 	},
 	methods: {
 		getData() {
-			getVirtualAddrByPhone({ phone: '19834500372' }).then(res => {
-				// console.log(1, res)
+			getVirtualAddrByPhone({ phone: this.query.phone }).then(res => {
+				if (res.data.code === 200) {
+					this.addressList = res.data.data;
+				}
 			});
 		},
 		// 选择地址(单选逻辑)
 		onChange(e) {
-			console.log(e)
+			// console.log(e)
 		},
 		// 点击我的位置
 		chooseLocation() {
@@ -144,17 +151,28 @@ export default {
 			const selected = this.addressList.find(item => item.id === this.selected);
 			if(selected) {
 				console.log('保存选中的地址:', selected);
-				// let params = {
-				// 	name: selected.name,
-				// 	address: selected.address,
-				// 	latitude: selected.latitude,
-				// 	longitude: selected.longitude,
-				// 	cOpenId: uni.getStorageSync('wx_copenid')
-				// }
-				// // 更新商户的位置
-				// getJsLocation(params).then(res => {
-				// 	uni.navigateBack();
-				// });
+				let params = {
+					id: this.query.id,
+					cPhone: this.query.phone,
+					name: selected.name,
+					address: selected.address,
+					latitude: selected.latitude,
+					longitude: selected.longitude,
+					cOpenId: uni.getStorageSync('wx_copenid')
+				}
+				// 更新商户的位置
+				getJsLocation(params).then(res => {
+                    uni.setStorageSync('staffLocation', {
+						addrId: selected.id,
+						name: selected.name,
+						address: selected.address,
+						latitude: selected.latitude,
+						longitude: selected.longitude,
+					});
+					if (res.data.code === 200) {
+						uni.navigateBack();
+					}
+				});
 			} else {
 				uni.$u.toast('请选择一个地址');
 			}

+ 236 - 72
src/pages/demo/apply.vue

@@ -8,106 +8,162 @@
                 :labelStyle="{ color: '#333', fontWeight: 500, marginBottom: '10rpx' }"
 				:model="form" :rules="rules"
 			>
-                <view class="section-title">确认信息</view>
+                <view class="section-title">基本信息</view>
                 <view class="card-box">
-                    <u-form-item label="真实姓名" prop="realName">
-                        <u-input v-model="form.realName" placeholder="请输入真实姓名" border="none" class="custom-input"></u-input>
+                    <u-form-item label="真实姓名" prop="cName">
+                        <u-input v-model="form.cName" placeholder="请输入真实姓名" border="none" class="custom-input"></u-input>
                     </u-form-item>
-                    <u-form-item label="性别" prop="gender">
-                        <u-radio-group v-model="form.gender" activeColor="#00cba3">
-                            <u-radio label="男" name="男" customStyle="margin-right: 30px"></u-radio>
-                            <u-radio label="女" name="女"></u-radio>
+                    <u-form-item label="性别" prop="nSex">
+                        <u-radio-group v-model="form.nSex" activeColor="#00cba3">
+                            <u-radio label="男" :name="1" customStyle="margin-right: 30px"></u-radio>
+                            <u-radio label="女" :name="0"></u-radio>
                         </u-radio-group>
                     </u-form-item>
-                    <u-form-item label="从业年份" prop="years">
-                        <u-input v-model="form.years" placeholder="请输入从业年份 如:5" border="none"
+                    <u-form-item label="手机号" prop="cPhone">
+                        <u-input v-model="form.cPhone" placeholder="请输入手机号" border="none" class="custom-input"></u-input>
+                    </u-form-item>
+                    <u-form-item label="入驻城市" prop="city" @click="show = true">
+                        <u-input v-model="form.city" readonly placeholder="请选择城市" border="none"
                             class="custom-input"></u-input>
                     </u-form-item>
+                    <u-form-item label="近期生活照" prop="cImgList">
+                        <Upload
+                            @fileList="onUpload($event, 'cImgList')"
+                        />
+                    </u-form-item>
                 </view>
 
-                <view class="section-title">确认账户信息</view>
+                <view class="section-title">详细信息</view>
                 <view class="card-box">
-                    <u-form-item label="结算户名" prop="accountName">
-                        <u-input v-model="form.accountName" placeholder="请输入结算银行户主姓名" border="none"
+                    <u-form-item label="昵称" prop="cNickName">
+                        <u-input v-model="form.cNickName" placeholder="请输入昵称" border="none"
                             class="custom-input"></u-input>
                     </u-form-item>
-                    <u-form-item label="开户行" prop="bankName">
-                        <u-input v-model="form.bankName" placeholder="请输入开户名称" border="none" class="custom-input"></u-input>
+                    <u-form-item label="头像" prop="cPortrait">
+                        <Upload
+                            :maxCount="1"
+                            @fileList="onUpload($event, 'cPortrait')"
+                        />
+                    </u-form-item>
+                    <u-form-item label="所在位置" prop="address" @click="onSelAddr">
+                        <u-input v-model="address" readonly placeholder="请选择工作所在位置" border="none" class="custom-input"></u-input>
                     </u-form-item>
-                    <u-form-item label="结算账号" prop="accountNo">
-                        <u-input v-model="form.accountNo" placeholder="请输入结算银行账号" border="none"
-                            class="custom-input"></u-input>
+                    <u-form-item label="个人简介" prop="cJianjie">
+                        <u--textarea v-model="form.cJianjie" placeholder="请输入个人简介" border="none"
+                            class="custom-input"></u--textarea>
                     </u-form-item>
                 </view>
 
-                <view class="section-title">上传身份证正反面</view>
+                <view class="section-title">上传身份证正反面 <text class="sub-tip">*最多3张</text></view>
                 <view class="card-box">
-                    <u-form-item prop="idCard">
-                        <u-input v-model="form.idCard" placeholder="请输入身份证号码" border="none" class="custom-input"></u-input>
-                    </u-form-item>
+                    <Upload
+                        :maxCount="3"
+                        @fileList="onUpload($event, 'cSfzImg')"
+                    />
 
-                    <view class="id-upload-row">
-                        <Upload
-                            name="idCardFront"
-                            width="auto"
-                            height="220rpx"
-                            :maxCount="1"
-                            @fileList="onUpload($event, 'idCardFront')"
-                        >
-                            <view class="upload-block" slot="content">
-                                <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
-                                <text class="up-text">身份证人像面</text>
-                            </view>
-                        </Upload>
+                    <template v-if="0">
+                        <view class="id-upload-row">
+                            <Upload
+                                name="idCardFront"
+                                width="auto"
+                                height="220rpx"
+                                :maxCount="1"
+                                @fileList="onUpload($event, 'idCardFront')"
+                            >
+                                <view class="upload-block" slot="content">
+                                    <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
+                                    <text class="up-text">身份证人像面</text>
+                                </view>
+                            </Upload>
+                            <Upload
+                                name="idCardBack"
+                                width="auto"
+                                height="220rpx"
+                                :maxCount="1"
+                                @fileList="onUpload($event, 'idCardBack')"
+                            >
+                                <view class="upload-block" slot="content">
+                                    <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
+                                    <text class="up-text">身份证国徽面</text>
+                                </view>
+                            </Upload>
+                        </view>
                         <Upload
-                            name="idCardBack"
+                            name="idCardHand"
                             width="auto"
                             height="220rpx"
                             :maxCount="1"
-                            @fileList="onUpload($event, 'idCardBack')"
+                            @fileList="onUpload($event, 'idCardHand')"
                         >
-                            <view class="upload-block" slot="content">
+                            <view class="upload-block full-width" slot="content">
                                 <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
-                                <text class="up-text">身份证国徽面</text>
+                                <text class="up-text">手持身份证照片</text>
                             </view>
                         </Upload>
-                    </view>
-
-                    
-                    <Upload
-                        name="idCardHand"
-                        width="auto"
-                        height="220rpx"
-                        :maxCount="1"
-                        @fileList="onUpload($event, 'idCardHand')"
-                    >
-                        <view class="upload-block full-width" slot="content">
-                            <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
-                            <text class="up-text">手持身份证照片</text>
-                        </view>
-                    </Upload>
+                    </template>
 
                     <!-- 隐藏的表单项,用于校验图片 -->
-                    <u-form-item prop="idCardFront" style="display: none;"></u-form-item>
-                    <u-form-item prop="idCardBack" style="display: none;"></u-form-item>
+                    <u-form-item prop="cSfzImg" style="display: none;"></u-form-item>
                 </view>
 
                 <view class="section-title">
-                    上传资格证书 <text class="sub-tip">*最多15张</text>
+                    上传资格证书 
                 </view>
                 <view class="card-box">
                     <Upload
-                        :maxCount="15"
+                        :maxCount="1"
                         @fileList="onUpload($event, 'certification')"
                     />
+                    <!-- 隐藏的表单项,用于校验图片 -->
+                    <u-form-item prop="certification" style="display: none;"></u-form-item>
                 </view>
 
-                <view class="section-title">上传商家资质</view>
+                <view class="section-title">上传营业执照</view>
                 <view class="card-box">
                     <Upload
-                        :maxCount="15"
-                        @fileList="onUpload($event, 'business')"
+                        :maxCount="1"
+                        @fileList="onUpload($event, 'businessLicense')"
                     />
+                    <!-- 隐藏的表单项,用于校验图片 -->
+                    <u-form-item prop="businessLicense" style="display: none;"></u-form-item>
+                </view>
+
+                <view class="section-title">上传无犯罪证明</view>
+                <view class="card-box">
+                    <Upload
+                        :maxCount="1"
+                        @fileList="onUpload($event, 'noCrime')"
+                    />
+                    <!-- 隐藏的表单项,用于校验图片 -->
+                    <u-form-item prop="noCrime" style="display: none;"></u-form-item>
+                </view>
+
+                <view class="section-title">上传承诺书信息</view>
+                <view class="card-box">
+                    <u-form-item label="承诺书" prop="commitment">
+                        <Upload
+                            accept="file"
+                            :maxSize="10240"
+                            :maxCount="2"
+                            @fileList="onUpload($event, 'commitment')"
+                        />
+                    </u-form-item>
+                    <u-form-item label="承诺录音" prop="recording">
+                        <Upload
+                            accept="file"
+                            :maxSize="10240"
+                            :maxCount="2"
+                            @fileList="onUpload($event, 'recording')"
+                        />
+                    </u-form-item>
+                    <u-form-item label="承诺录像" prop="videoRecording">
+                        <Upload
+                            accept="file"
+                            :maxSize="51200"
+                            :maxCount="2"
+                            @fileList="onUpload($event, 'videoRecording')"
+                        />
+                    </u-form-item>
                 </view>
             </u--form>
 
@@ -118,10 +174,20 @@
                 ></u-button>
             </view>
         </view>
+
+        <!-- 城市选择 -->
+        <u-picker :show="show" :columns="[cityList]" keyName="label" 
+            @cancel="show = false" @confirm="onSelect"
+        ></u-picker>
     </view>
 </template>
 
 <script>
+import {
+    getCityList,
+    getProjectList,
+    getMerchantData,
+} from '@/api/index';
 import Upload from '@/components/upload/index.vue';
 export default {
     components: {
@@ -130,43 +196,141 @@ export default {
     data() {
         return {
             form: {
-                realName: '',
-                gender: '男',
-                years: '',
-                accountName: '',
-                bankName: '',
-                accountNo: '',
-                idCard: ''
+                cName: '',
+                nSex: 0,
             },
             rules: {
 				city: [
 					{
 						required: true,
-						message: '请输入首选城市',
+						message: '请选择城市',
+						trigger: ['blur', 'change']
+					}
+				],
+				cName: [
+					{
+						required: true,
+						message: '请输入您的姓名',
+						trigger: ['blur', 'change']
+					}
+				],
+				cNickName: [
+					{
+						required: true,
+						message: '请输入您的昵称',
+						trigger: ['blur', 'change']
+					}
+				],
+				cPhone: [
+					{
+						required: true,
+						message: '请输入手机号',
 						trigger: ['blur', 'change']
+					},
+                    {
+                        pattern: /^1([3589]\d|4[01456879]|6[0-9]|7[0-8])\d{8}$/, 
+                        message: '请输入正确的手机号格式', 
+                        trigger: ['blur', 'change']
 					}
 				],
+				address: [
+					{
+						required: true,
+						message: '请选择位置',
+						trigger: ['blur', 'change']
+					}
+				],
+				cJianjie: [
+					{
+						required: true,
+						message: '请填写您的简介',
+						trigger: ['blur', 'change']
+					}
+				],
+                cSfzImg: [{ required: true, message: '请上传身份证', trigger: ['change'] }],
+                cImgList: [{ required: true, message: '最少上传一张生活照片', trigger: ['change'] }],
+                cPortrait: [{ required: true, message: '请上传头像', trigger: ['change'] }],
 				// 针对隐藏表单项的校验规则
-				idCardBack: [{ required: true, message: '请上传身份证国徽面', trigger: ['change'] }],
-				idCardFront: [{ required: true, message: '请上传身份证人像面', trigger: ['change'] }],
+				// idCardBack: [{ required: true, message: '请上传身份证国徽面', trigger: ['change'] }],
             },
+            query: {},
+            // 城市选择
+            show: false,
+            cityList: [],
         };
+    },
+    computed: {
+        address() {
+            return (this.form.address || '') + (this.form.name || '');
+        }
+    },
+    onLoad(query) {
+        this.query = query;
+        if (query.id) this.getData();
+        this.getCity();
     },
 	onReady() {
 		// 页面加载完成后为表单设置规则
 		this.$refs.uForm.setRules(this.rules);
 	},
     methods: {
+        getData() {
+            let params = {
+                cOpenId: uni.getStorageSync('wx_copenid')
+            }
+            getMerchantData(params).then(res => {
+                let data = res.data.data;
+                this.form = data;
+            });
+        },
+        getCity() {
+            getCityList().then(res => {
+                this.cityList = res.data.data.map(({
+                    deptId,
+                    deptName
+                }) => ({
+                    value: deptId,
+                    label: deptName
+                }))
+            });
+        },
+        onSelAddr() {
+            uni.chooseLocation({
+                success: res => {
+                    this.form.name = res.name;
+                    this.form.address = res.address;
+                    this.form.latitude = res.latitude;
+                    this.form.longitude = res.longitude;
+                }
+            });
+        },
+        onSelect(e) {
+            this.form = {
+                ...this.form,
+                city: e.value[0].label,
+                deptId: e.value[0].value,
+            }
+            this.show = false;
+        },
         // upload事件
         onUpload(e, t) {
             this.form[t] = e.map(item => item.url);
         },
         onSubmit() {
 			this.$refs.uForm.validate().then(res => {
-				uni.$u.toast('校验通过')
+                let api = netStaffAdd;
+                if (this.query.id) api = netStaffUpdate;
+                api().then(ares => {
+                    uni.$u.toast(ares.data.msg);
+                    if (ares.data.code == 200) {
+                        setTimeout(() => {
+                            uni.navigateBack();
+                        }, 1000);
+                    }
+                });
 			}).catch(errors => {
                 console.log(errors)
-                let f = errors.some(item => ['idCardBack', 'idCardFront'].indexOf(item.field) !== -1);
+                let f = errors.some(item => ['cSfzImg', 'certification', 'businessLicense', 'noCrime'].indexOf(item.field) !== -1);
 				if (f) uni.$u.toast(errors[0].message);
 			})
 		}

+ 1 - 0
src/pages/join/staff.vue

@@ -272,6 +272,7 @@ export default {
 		onSelect(e) {
 			this.form.city = e.value[0].label
 			this.form.deptId = e.value[0].value
+			this.show = false
 		},
 	},
 	mounted() {

+ 11 - 26
src/pages/my/indent.vue

@@ -1,8 +1,6 @@
 <template>
 	<view class="info">
-		<view class="popup" v-if="isDisable"></view>
 		<view class="content" >
-		
 			<view class="title">
 				基 本 信 息
 			</view>
@@ -123,10 +121,15 @@
 					/>
 				</view>
 			</view>
-			<view class="submits">
-				<button style="margin: 30rpx 0" type="primary" @click="submit">提交</button>
+			<view class="footer-bar">
+				<u-button type="primary" shape="circle" text="提交" color="#2cb8d4"
+					@click="submit"
+					customStyle=""
+				></u-button>
+				<!-- <button style="margin: 30rpx 0" type="primary" @click="submit">提交</button> -->
 			</view>
 		</view>
+		<view class="popup" v-if="isDisable"></view>
 	</view>
 </template>
 
@@ -147,9 +150,9 @@
 		},
 		data() {
 			return {
-				isDisable:false,
-				cityList:[],
-				show:false,
+				isDisable: false,
+				cityList: [],
+				show: false,
 				type: 'text',
 				token: '',
 				uploadId: '',
@@ -367,9 +370,6 @@
 				getMerchantData(openid).then(res => {
 					let data = res.data.data
 					this.form = data
-					if(data.nTong && data.nTong == 0 || data.nTong == 1 ){
-						this.isDisable = true
-					}
 					// this.form.cBhList = data.cBhList
 				})
 			},
@@ -395,7 +395,7 @@
 	.info{
 		width: 100%;
 		height: auto;
-		padding-top: 20rpx;
+		padding: 20rpx 30rpx 120rpx;
 		position: relative;
 		.popup{
 			width: 100%;
@@ -445,7 +445,6 @@
 	}
 
 	.content {
-		padding: 0 30rpx;
 
 		.page-section-title {
 			font-size: 32rpx;
@@ -531,20 +530,6 @@
 			}
 		}
 
-		.submits {
-			width: 100%;
-			background-color: #fff;
-			border-top: 1px solid #b8b6b6;
-			text-align: center;
-			z-index: 10;
-
-			button {
-				width: 80%;
-				display: inline-block;
-				background-color: #2cb8d4;
-			}
-		}
-
 		.heads {
 			.uploadImg {
 				width: 200rpx;

+ 82 - 74
src/pages/order/comment.vue

@@ -11,32 +11,43 @@
 
 			<view class="fast">
 				<view class="title">
-					<text></text>
-					点击下方一键评论
+					<text class="line" />
+					<text>点击下方一键评论</text>
 				</view>
-				<view class="tag" v-if="title == '商户'">
-					<view class="word" v-for="(item,index) in jstag" :key="index" @click="addJsComment(item)">
-						{{item.value}}
+				<template v-if="title == '商户'">
+					<view class="tag">
+						<view class="word" 
+							v-for="(item, index) in jstag" :key="index" 
+							@click="addJsComment(item)">
+							{{item.value}}
+						</view>
 					</view>
-				</view>
-				<view class="tag" v-else>
-					<view class="word" v-for="(item,index) in tag" :key="index" @click="addComment(item)">
-						{{item.value}}
+				</template>
+				<template v-else>
+					<view class="tag">
+						<view class="word" 
+							v-for="(item, index) in tag" :key="index" 
+							@click="addComment(item)">
+							{{item.value}}
+						</view>
 					</view>
-				</view>
-				<!-- <view class="star" v-if="title !== '商户'">
-					评分:
-					<u-rate v-model="nStar" inactiveIcon="thumb-up"></u-rate>
-				</view> -->
 
+					<view class="title">
+						<text class="line" />
+						<text>评分</text>
+					</view>
+					<view class="star">
+						<u-rate v-model="nStar" size="20" gutter="10"></u-rate>
+					</view>
+				</template>
 			</view>
+
 			<view class="btn_box" v-if="title == '商户'">
 				<view class="btn" @click="jsSubmit">提交评价</view>
 			</view>
 			<view class="btn_box" v-else>
 				<view class="btn" @click="submit">提交</view>
 			</view>
-
 		</view>
 	</view>
 </template>
@@ -45,7 +56,7 @@
 	import {
 		commentOrder,
 		tCommentUser
-	} from '../../api/index.js'
+	} from '@/api/index.js'
 	export default {
 		data() {
 			return {
@@ -86,6 +97,23 @@
 				]
 			}
 		},
+		onLoad(options) {
+			this.orderId = options.cId
+			this.orderNo = options.orderNo
+
+			this.jsId = options.cJsId
+			this.name = options.cNickName
+
+			this.title = options.title
+			this.openId = options.cOpenId
+		},
+		watch: {
+			txt(txt) {
+				if (txt.indexOf('\n') != -1) { //敲了回车键了
+					uni.hideKeyboard() //收起软键盘
+				}
+			}
+		},
 		methods: {
 			addComment(item) {
 				this.comment = this.comment + ' ' + ' ' + item.value
@@ -94,42 +122,43 @@
 				this.text = this.text + ' ' + ' ' + item.value
 			},
 			submit() {
-				let data = {}
-				if (this.comment.trim() == '') {
-					return
+				if (this.comment.trim() == '') return;
+				let params = {
+					orderId: this.orderId,
+					orderNo: this.orderNo,
+					jsId: this.jsId,
+					name: this.name,
+					nickName: 'xiaoxiao',
+
+					star: this.nStar,
+					text: this.comment.trim(),
 				}
-				data.cText = this.comment.trim(),
-					data.orderId = this.orderId,
-					data.cJsid = this.jsId,
-					data.orderNo = this.orderNo,
-					data.name = this.name,
-					data.nStar = this.nStar,
-					commentOrder(data).then(res => {
-						if (res.data.code == 200) {
-							uni.showToast({
-								title: '评论成功',
-							})
-							setTimeout(() => {
-								// uni.switchTab({
-								// 	url: '/pages/order/order'
-								// })
-								uni.navigateBack()
-							}, 1000)
-						} else {
-							uni.showToast({
-								title: res.data.msg,
-							})
-						}
-					})
+				commentOrder(params).then(res => {
+					if (res.data.code == 200) {
+						uni.showToast({
+							title: '评论成功',
+						})
+						setTimeout(() => {
+							// uni.switchTab({
+							// 	url: '/pages/order/order'
+							// })
+							uni.navigateBack()
+						}, 1000)
+					} else {
+						uni.showToast({
+							title: res.data.msg,
+						})
+					}
+				})
 			},
 			//商户评价客户
 			jsSubmit() {
 				let data = {}
 				data.text = this.text.trim(),
-					data.jsId = this.jsId,
-					data.orderNo = this.orderNo,
-					data.name = this.name,
-					data.openId = this.openId
+				data.jsId = this.jsId,
+				data.orderNo = this.orderNo,
+				data.name = this.name,
+				data.openId = this.openId
 				tCommentUser(data).then(res => {
 					if (res.data.code == 200) {
 						uni.showToast({
@@ -145,21 +174,6 @@
 					}
 				})
 			}
-		},
-		onLoad(options) {
-			this.orderNo = options.orderNo,
-				this.jsId = options.cJsId,
-				this.orderId = options.cId,
-				this.name = options.cNickName
-			this.title = options.title
-			this.openId = options.cOpenId
-		},
-		watch: {
-			txt(txt) {
-				if (txt.indexOf('\n') != -1) { //敲了回车键了
-					uni.hideKeyboard() //收起软键盘
-				}
-			}
 		}
 	}
 </script>
@@ -196,19 +210,19 @@
 				box-shadow: 0px 4rpx 12rpx 0px rgba(88, 209, 187, 0.1);
 				border-radius: 16rpx;
 				padding: 24rpx;
-				box-sizing: border-box;
 
 				.title {
+					font-weight: 600;
 					display: flex;
 					align-items: center;
-					font-weight: 600;
 
-					text {
+					.line {
 						display: inline-block;
 						width: 6rpx;
 						height: 34rpx;
-						background: #20CBC2;
 						margin-right: 12rpx;
+						border-radius: 4rpx;
+						background: #20CBC2;
 					}
 				}
 
@@ -218,26 +232,20 @@
 					display: flex;
 					flex-wrap: wrap;
 
-					// justify-content: space-between;
 					.word {
-						// margin: 0px 24rpx;
-						// height: 48px;
 						margin-right: 24rpx;
 						margin-bottom: 24rpx;
 						padding: 4rpx 20rpx;
-						box-sizing: border-box;
 						background: rgba(32, 203, 194, 0.1);
 						box-shadow: 0px 4rpx 12rpx 0px rgba(88, 209, 187, 0.1);
 						border-radius: 8rpx;
 						font-size: 28rpx;
 					}
 				}
-			}
 
-
-
-			.star {
-				margin-top: 40rpx;
+				.star {
+					margin-top: 12rpx;
+				}
 			}
 
 			.btn_box {

+ 0 - 1
src/pages/order/order_detail.vue

@@ -279,7 +279,6 @@
 	import {
 		orderDeatails,
 		getInfo,
-		payoff,
 		delOrder,
 		confirmOrder,
 		alertOrder,

+ 45 - 65
src/pages/staff/index.vue

@@ -2,14 +2,14 @@
 	<view class="center">
 		<view class="head">
 			<view class="left">
-				<image :src="$globalData.publicUrl+infoData.cPortrait" mode=""></image>
+				<image :src="$globalData.publicUrl + infoData.cPortrait" mode=""></image>
 			</view>
 			<view class="middle">
 				<view class="name">
-					{{infoData.cNickName}}
+					{{ infoData.cNickName || infoData.cName }}
 				</view>
 				<view class="address">
-					{{address}}
+					{{ infoData.address }} {{ infoData.name }}
 				</view>
 			</view>
 			<view class="right" @click="goAddress">
@@ -74,31 +74,46 @@
 				其他功能
 			</view>
 			<view class="fun_box">
-				<view class="function" @click="goOrder">
-					<image src="/static/other/order.png" mode=""></image>
-					<span class="order_num" v-if="orderNum>0">{{orderNum}}</span>
-					订单
-				</view>
-				<view class="function" @click="goFree">
-					<image src="/static/other/set.png" mode=""></image>
-					设置免车费
-				</view>
-				<view class="function" @click="goEdit">
-					<image src="/static/other/edit.png" mode=""></image>
-					编辑资料
-				</view>
-				<view class="function" @click="qrCodeShow">
-					<image src="/static/other/code.png" mode=""></image>
-					我的分销码
-				</view>
-				<view class="function" @click="qrCodeShow">
-					<image src="/static/other/contract.png" mode=""></image>
-					合同签订
-				</view>
+				<u-grid :border="false" col="5">
+					<u-grid-item>
+						<view class="function" @click="goOrder">
+							<u-badge absolute
+								:value="orderNum" 
+								:offset="[-4, -10]"
+								:customStyle="{ zIndex: 1 }"
+							></u-badge>
+							<image src="/static/other/icon-order.png" mode=""></image>
+							<text>订单</text>
+						</view>
+					</u-grid-item>
+					<u-grid-item>
+						<view class="function" @click="goFree">
+							<image src="/static/other/icon-set.png" mode=""></image>
+							<text>设置免车费</text>
+						</view>
+					</u-grid-item>
+					<u-grid-item>
+						<view class="function" @click="goEdit">
+							<image src="/static/other/icon-edit.png" mode=""></image>
+							<text>编辑资料</text>
+						</view>
+					</u-grid-item>
+					<u-grid-item>
+						<view class="function" @click="qrCodeShow">
+							<image src="/static/other/icon-code.png" mode=""></image>
+							<text>我的分销码</text>
+						</view>
+					</u-grid-item>
+					<u-grid-item>
+						<view class="function" @click="qrCodeShow">
+							<image src="/static/other/icon-contract.png" mode=""></image>
+							<text>合同签订</text>
+						</view>
+					</u-grid-item>
+				</u-grid>
 			</view>
 		</view>
-		<view class="work">
-		</view>
+		<view class="work"></view>
 		<!-- 分销码弹窗 -->
 		<view class="qr_code" @click="qrCodeShow" v-if="isQrcodeShow">
 			<view class="img_box">
@@ -167,11 +182,11 @@
 				infoData: {},
 				cJsId: '',
 				onLine: '',
-				address: '',
 				orderNum: 0,
 				isAddBlank: false,
 				active: 0,
-				tabList: [{
+				tabList: [
+					{
 						label: '全部',
 						value: 1
 					},
@@ -209,7 +224,6 @@
 				getMerchantData(params).then(res => {
 					if (res.data.code == 200 && res.data.data) {
 						this.cJsId = res.data.data.id
-						this.address = res.data.data.name
 						this.infoData = res.data.data
 						if (res.data.data.nStatus2 == '-1') { //未上岗
 							this.isWork = false
@@ -271,30 +285,13 @@
 			// 更换位置
 			goAddress() {
 				let str = uni.$u.queryParams({
+					id: this.cJsId,
 					name: this.infoData.cNickName,
 					phone: this.infoData.cPhone
 				});
 				uni.navigateTo({
 					url: `/pages/address/virtual${str}`
 				});
-				return;
-				uni.chooseLocation({
-					success: res => {
-						this.address = res.address;
-
-						let params = {
-							name: res.name,
-							address: this.address,
-							latitude: res.latitude,
-							longitude: res.longitude,
-							cOpenId: uni.getStorageSync('wx_copenid')
-						}
-						// 更新商户的位置
-						getJsLocation(params).then(res => {
-							this.getData();
-						});
-					}
-				});
 			},
 			// 报警
 			onWarning() {
@@ -651,33 +648,16 @@
 
 		.fun_box {
 			width: 100%;
-			display: flex;
-			justify-content: space-around;
 
 			.function {
 				font-size: 24rpx;
 				color: #2F3437;
 				line-height: 28rpx;
 				display: flex;
-				flex-direction: column;
 				align-items: center;
+				flex-direction: column;
 				position: relative;
 
-				.order_num {
-					position: absolute;
-					top: -10rpx;
-					right: -20rpx;
-					// width: 30rpx;
-					padding: 0px 10rpx;
-					height: 30rpx;
-					background-color: #fa3534;
-					border-radius: 30rpx;
-					color: #ffffff;
-					display: flex;
-					// align-items: center;
-					justify-content: center;
-				}
-
 				image {
 					width: 64rpx;
 					height: 64rpx;

BIN
src/static/other/icon-address.png


+ 0 - 0
src/static/other/code.png → src/static/other/icon-code.png


+ 0 - 0
src/static/other/contract.png → src/static/other/icon-contract.png


+ 0 - 0
src/static/other/edit.png → src/static/other/icon-edit.png


+ 0 - 0
src/static/other/order.png → src/static/other/icon-order.png


+ 0 - 0
src/static/other/set.png → src/static/other/icon-set.png