Browse Source

【模版目录】更新前端模版

吴昊天 3 năm trước cách đây
mục cha
commit
4b516bbb5c

+ 0 - 29
template/admin/.gitignore

@@ -1,29 +0,0 @@
-.DS_Store
-node_modules
-/dist
-.history
-package-lock.json
-
-/tests/e2e/videos/
-/tests/e2e/screenshots/
-
-# local env files
-.env.local
-.env.*.local
-
-# Log files
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# Editor directories and files
-.idea
-.vscode
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw*
-
-build/env.js
-.env

+ 7 - 12
template/admin/src/pages/order/refund/index.vue

@@ -217,6 +217,9 @@
                 <DropdownItem name="7" v-show="[1, 2].includes(row.refund_type) && row.is_pink_cancel === 0"
                   >不退款</DropdownItem
                 >
+                <DropdownItem name="8" v-show="row.is_del == 1"
+                  >删除订单</DropdownItem
+                >
               </DropdownMenu>
             </Dropdown>
           </template>
@@ -481,20 +484,12 @@ export default {
           break;
         case '8':
           this.delfromData = {
-            title: '修改确认收货',
-            url: `/order/take/${row.id}`,
-            method: 'put',
+            title: '删除订单',
+            url: `/order/del/${row.store_order_id}`,
+            method: 'DELETE',
             ids: '',
           };
-          this.$modalSure(this.delfromData)
-            .then((res) => {
-              this.$Message.success(res.msg);
-              this.getOrderList();
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg);
-            });
-          // this.modalTitleSs = '修改确认收货';
+          this.delOrder(row, this.delfromData);
           break;
         case '10':
           this.delfromData = {

+ 7 - 0
template/uni-app/api/user.js

@@ -585,6 +585,13 @@ export function getMsgDetails(id) {
 	return request.get('user/message_system/detail/' + id);
 }
 
+/**
+ * 消息中心-消息已读/删除
+ */
+export function msgLookDel(data) {
+	return request.get('user/message_system/edit_message', data);
+}
+
 /**
  * 苹果账号登录
  * @param {Object} data

+ 0 - 1
template/uni-app/mixins/color.js

@@ -18,7 +18,6 @@ export default {
 	created() {
 		this.colorStyle = uni.getStorageSync('viewColor')
 		uni.$on('ok', (data, status) => {
-			console.log(status)
 			this.colorStyle = data
 			this.colorStatus = status
 		})

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1737 - 1704
template/uni-app/pages/goods/order_confirm/index.vue


+ 55 - 11
template/uni-app/pages/users/message_center/index.vue

@@ -7,7 +7,7 @@
 					{{$t(item.name)}}
 				</view>
 			</view>
-			<view class="read-all">
+			<view class="read-all" @click="allLook()">
 				全部已读
 			</view>
 		</view>
@@ -75,7 +75,8 @@
 <script>
 	import {
 		serviceRecord,
-		messageSystem
+		messageSystem,
+		msgLookDel
 	} from '@/api/user.js';
 	import colors from '@/mixins/color.js';
 	import home from '@/components/home';
@@ -136,7 +137,6 @@
 		onShow() {
 			this.page = 1
 			this.list = []
-			console.log(this.type)
 			this.changeTabs(this.type)
 		},
 		onReachBottom() {
@@ -147,7 +147,6 @@
 			}
 		},
 		onPullDownRefresh() {
-			console.log('refresh');
 			this.page = 1
 			this.finished = false
 			this.list = []
@@ -163,7 +162,6 @@
 				this.startData.clientY = e.changedTouches[0].clientY;
 			},
 			end(e) {
-				// console.log(e)
 				const subX = e.changedTouches[0].clientX - this.startData.clientX;
 				const subY = e.changedTouches[0].clientY - this.startData.clientY;
 				if (subY > 50 || subY < -50) {
@@ -188,12 +186,60 @@
 			},
 			// 滑动点击操作
 			bindClick(e, item) {
-				console.log(e, item)
-				if (e.index == 0) {
-					// 删除逻辑
+				if (e.index == 0) {
+					msgLookDel({
+						id: item.id,
+						key: 'is_del',
+						value: 1
+					}).then(res => {
+						let i = this.list.findIndex(e=>{
+							return e.id === item.id
+						})
+						this.list.splice(i,1)
+					}).catch(err => {
+						uni.showToast({
+							title: err.msg,
+							icon: 'none'
+						})
+					})
 				} else {
-					// 已读
+					// 已读
+					msgLookDel({
+						id: item.id,
+						key: 'look',
+						value: 1
+					}).then(res => {
+						item.look = 1
+					}).catch(err => {
+						uni.showToast({
+							title: err.msg,
+							icon: 'none'
+						})
+					})
 				}
+			},
+			allLook() {
+				msgLookDel({
+					id: 0,
+					key: 'look',
+					value: 1,
+					all: 1
+				}).then(res => {
+					this.page = 1
+					this.limit = 20
+					this.list = []
+					this.finished = false
+					if (this.type === 1) {
+						this.getList()
+					} else {
+						this.messageSystem()
+					}
+				}).catch(err => {
+					uni.showToast({
+						title: err.msg,
+						icon: 'none'
+					})
+				})
 			},
 			changeTabs(index) {
 				this.type = index
@@ -221,7 +267,6 @@
 						limit: this.limit
 					})
 					.then(res => {
-						console.log(res)
 						let data = res.data;
 						uni.hideLoading();
 						this.loading = false;
@@ -231,7 +276,6 @@
 						uni.stopPullDownRefresh();
 					})
 					.catch(err => {
-						console.log(err)
 						uni.showToast({
 							title: err.msg,
 							icon: 'none'