Kaynağa Gözat

充值优惠

shish 1 yıl önce
ebeveyn
işleme
46ee17902f

+ 2 - 0
hdApp/src/admin/home/apply.vue

@@ -82,6 +82,8 @@ export default {
             { name: "商城", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/admin/cg/mall",pf:1},
             { name: "开关商城", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/pagesPurchase/open",pf:1},
             { name: "失信人员", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/admin/ll/list",pf:1},
+            { name: "会员折扣", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/admin/member/discount",pf:1},
+            { name: "充值优惠", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/admin/recharge/discount",pf:1},
           ]
         },
         {

+ 83 - 0
hdApp/src/admin/member/discount.vue

@@ -0,0 +1,83 @@
+<template>
+	<view class="app-content">
+		<view>
+			<t-table :headerBackgroundColor="'#F0F2F6'">
+				<view>
+					<t-tr header>
+						<t-th><view style="color:black;">会员名称</view></t-th>
+						<t-th>
+							<view style="color:black;">
+								<view>享折扣</view>
+							</view>
+						</t-th>
+					</t-tr>
+				</view>
+				<view>
+                    <view v-for="(item, inIndex) in map" :key="inIndex">
+                        <t-tr>
+                            <t-td align="center" color="info">
+                                <view style="color:black;font-weight:bold;font-size:30upx;">{{ item.name }}</view>
+                            </t-td>
+                            <t-td align="center" color="info">
+                                <view>
+                                <input v-model="item.discount" type="digit" style="border:1upx solid #cccccc;color:black;font-size:30upx;" @focus="item.discount=''" placeholder="9折写0.9,85折写0.85" />
+                                </view>
+                            </t-td>
+                        </t-tr>
+                    </view>
+				</view>
+			</t-table>
+			<view style="font-size:36upx;font-weight:bold;height:50upx;margin-top:50upx;display: flex;align-items: center;justify-content: center;">
+				超过
+				<input v-model="reduceDay" type="number" @focus="reduceDay=''" placeholder="填0则不自动降级" style="border:1upx solid #cccccc;color:black;font-size:30upx;width:180upx;display: inline-block;text-align:center;margin:0 10upx 0 10upx;" />
+				天未消费降一级
+			</view>
+		</view>
+        <view class="app-footer">
+			<view class="admin-button-com big blue" @click="goBack()">返回上级</view>
+		    <view style="margin-left:50upx;" class="admin-button-com big blue" @click="saveData">提交修改</view>
+		</view>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import list from '@/mixins/list'
+import ModalModule from "@/components/plugin/modal";
+import { getInitData,modifyMember } from '@/api/member'
+export default {
+	name: "addPrice",
+	components: {
+		AppWrapperEmpty,ModalModule
+	},
+	mixins:[list],
+	data() {
+		return {
+			map:[],
+			reduceDay:30
+		};
+	},
+	methods: {
+        init(){
+			getInitData().then(res=>{
+				if(res.code == 1){
+					this.map = res.data.member?res.data.member:[]
+					this.reduceDay = res.data.reduceDay?res.data.reduceDay:30
+				}
+			})
+        },
+		goBack(){
+			uni.navigateBack()
+		},
+		saveData(){
+			this.$util.confirmModal({content:'只能修改一次,提交后将不能再次修改,确认提交?'},() => {
+				modifyMember({data:this.map,reduceDay:this.reduceDay}).then(res=>{
+					if(res.code == 1){
+						this.$msg(res.msg)
+					}
+				})
+			})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped></style>

+ 83 - 0
hdApp/src/admin/recharge/discount.vue

@@ -0,0 +1,83 @@
+<template>
+	<view class="app-content">
+		<view>
+			<t-table :headerBackgroundColor="'#F0F2F6'">
+				<view>
+					<t-tr header>
+						<t-th><view style="color:black;">会员名称</view></t-th>
+						<t-th>
+							<view style="color:black;">
+								<view>享折扣</view>
+							</view>
+						</t-th>
+					</t-tr>
+				</view>
+				<view>
+                    <view v-for="(item, inIndex) in map" :key="inIndex">
+                        <t-tr>
+                            <t-td align="center" color="info">
+                                <view style="color:black;font-weight:bold;font-size:30upx;">{{ item.name }}</view>
+                            </t-td>
+                            <t-td align="center" color="info">
+                                <view>
+                                <input v-model="item.discount" type="digit" style="border:1upx solid #cccccc;color:black;font-size:30upx;" @focus="item.discount=''" placeholder="9折写0.9,85折写0.85" />
+                                </view>
+                            </t-td>
+                        </t-tr>
+                    </view>
+				</view>
+			</t-table>
+			<view style="font-size:36upx;font-weight:bold;height:50upx;margin-top:50upx;display: flex;align-items: center;justify-content: center;">
+				超过
+				<input v-model="reduceDay" type="number" @focus="reduceDay=''" placeholder="填0则不自动降级" style="border:1upx solid #cccccc;color:black;font-size:30upx;width:180upx;display: inline-block;text-align:center;margin:0 10upx 0 10upx;" />
+				天未消费降一级
+			</view>
+		</view>
+        <view class="app-footer">
+			<view class="admin-button-com big blue" @click="goBack()">返回上级</view>
+		    <view style="margin-left:50upx;" class="admin-button-com big blue" @click="saveData">提交修改</view>
+		</view>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import list from '@/mixins/list'
+import ModalModule from "@/components/plugin/modal";
+import { getInitData,modifyMember } from '@/api/member'
+export default {
+	name: "addPrice",
+	components: {
+		AppWrapperEmpty,ModalModule
+	},
+	mixins:[list],
+	data() {
+		return {
+			map:[],
+			reduceDay:30
+		};
+	},
+	methods: {
+        init(){
+			getInitData().then(res=>{
+				if(res.code == 1){
+					this.map = res.data.member?res.data.member:[]
+					this.reduceDay = res.data.reduceDay?res.data.reduceDay:30
+				}
+			})
+        },
+		goBack(){
+			uni.navigateBack()
+		},
+		saveData(){
+			this.$util.confirmModal({content:'只能修改一次,提交后将不能再次修改,确认提交?'},() => {
+				modifyMember({data:this.map,reduceDay:this.reduceDay}).then(res=>{
+					if(res.code == 1){
+						this.$msg(res.msg)
+					}
+				})
+			})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped></style>

+ 2 - 0
hdApp/src/admin/work/set.vue

@@ -61,6 +61,8 @@ export default {
             uni.navigateBack({})
           }
       })
+    },
+    init(){
     }
   },
 };

+ 14 - 55
hdApp/src/api/member/index.js

@@ -1,75 +1,34 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
-/** *
- * 客户列表 b
- */
+export const modifyMember = data => {
+	return https.post('/member-weal/modify', data)
+}
+
+export const getInitData = data => {
+	return https.get("/member-weal/get-init-data", data);
+};
+
+//客户列表
 export const getList = data => {
 	return https.get("/custom/list", data);
 };
 
-/** *
- * 商家端客户详情,包括资产、订单和备注
- */
+//商家端客户详情,包括资产、订单和备注
 export const getUserDet = data => {
 	return https.get("/custom/detail", data);
 };
 
-/** *
- * 获取客户详情,包括资产 b
- */
+//获取客户详情,包括资产
 export const getDet = data => {
 	return https.get("/user/detail", data);
 };
 
-/** *
- * 添加客户 b
- */
+//添加客户
 export const add = data => {
 	return https.post("/custom/add", data);
 };
+
 // 延期付
 export const debt = data => {
 	return https.get("/custom/debt", data);
-};
-
-/** *
- * 给客户充值 b
- */
-// export const rechargeB = data => {
-// 	return https.post('/user/recharge', data)
-// }
-
-/** *
- * 给客户升级 b
- */
-// export const upgrade = data => {
-// 	return https.post('/user/upgrade', data)
-// }
-
-/** *
- * 添加备注 b
- */
-// export const remarkAdd = data => {
-// 	return https.post('/merchant-remark/add', data)
-// }
-
-/** *
- * 删除备注 b
- */
-// export const remarkDel = data => {
-// 	return https.get('/merchant-remark/delete', data)
-// }
-
-/** *
- * 客户充值 b
- */
-// export const recharge = data => {
-// 	return https.get('/recharge/launch', data)
-// }
-
-/** *
- * 重置密码 b
- */
-// export const resetPassword = data => {
-// 	return https.post('/user/reset-pay-password', data)
-// }
+};

+ 5 - 3
hdApp/src/pages.json

@@ -328,8 +328,9 @@
 		{
 			"root": "admin/recharge",
 			"pages": [
-				{ "path": "renew", "style": { "navigationBarTitleText": "免费续期" } },
-				{ "path": "rechargeSuccess", "style": { "navigationBarTitleText": "免费续期" } }
+				{ "path": "renew", "style": { "navigationBarTitleText": "免费续期"}},
+				{ "path": "rechargeSuccess", "style": { "navigationBarTitleText": "免费续期"}},
+				{ "path": "discount", "style": { "navigationBarTitleText": "充值优惠"}}
 			]
 		},
 		{
@@ -371,7 +372,8 @@
 			"root": "admin/member",
 			"pages": [
 				{ "path": "detail", "style": { "navigationBarTitleText": "详情" } },
-				{ "path": "modify", "style": { "navigationBarTitleText": "修改地址" } }
+				{ "path": "modify", "style": { "navigationBarTitleText": "修改地址" } },
+				{"path": "discount","style": {"navigationBarTitleText": "会员折扣"}}
 			]
 		},
 		{