瀏覽代碼

9-1-order

lhl 4 年之前
父節點
當前提交
65667b6952
共有 6 個文件被更改,包括 100 次插入13 次删除
  1. 66 0
      api/functionalUnit.js
  2. 13 0
      pages.json
  3. 2 2
      pages/user/award.vue
  4. 15 7
      pages/user/user.vue
  5. 4 4
      pages/user/withdrawal.vue
  6. 二進制
      static/icon/i8.png

+ 66 - 0
api/functionalUnit.js

@@ -0,0 +1,66 @@
+import request from '@/utils/request'
+
+//获取优惠券列表
+export function getCouponsList(data,types) {
+	//优惠券状态 0全部 1未使用 2已使用
+	return request({
+		url: '/api/coupons/user/'+types,
+		method: 'get',
+		data
+	});
+}
+
+//领取优惠券
+export function setCoupons(data) {
+	return request({
+		url: '/api/coupon/receive',
+		method: 'post',
+		data
+	});
+}
+
+//获取可使用优惠券
+export function couponsOrder(data,price) {
+	return request({
+		url: '/api/coupons/order/'+price,
+		method: 'get',
+		data
+	});
+}
+
+
+//	积分列表
+export function integrallist(data) {
+	return request({
+		url: '/api/integral/list',
+		method: 'get',
+		data
+	});
+}
+
+
+// 获取签到列表
+export function signList(data) {
+	return request({
+		url: '/api/sign/list',
+		method: 'get',
+		data
+	});
+}
+// 点击签到
+export function integral(data) {
+	return request({
+		url: '/api/sign/integral',
+		method: 'post',
+		data
+	});
+}
+
+// 签到信息
+export function signUser(data) {
+	return request({
+		url: '/api/sign/user',
+		method: 'post',
+		data
+	});
+}

+ 13 - 0
pages.json

@@ -355,6 +355,19 @@
 					}
 				}
 			}
+		},
+		{
+			"path": "pages/user/integral",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的积分"
+					}
+				}
+			}
 		}
 	],
 	"globalStyle": {

+ 2 - 2
pages/user/award.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="content-money">
 			<view class="money-box">
-				<image src="../../static/img/jiedian.png" mode=""></image>
+				<image src="../../static/img/img33.png" mode=""></image>
 				<view class="money">
 					<text>¥</text>
 					{{ money | getMoneyStyle }}
@@ -22,7 +22,7 @@
 						<view class="title-box">
 							<view class="title">
 								<text>{{ item.title }} </text>
-								<text>{{item.status == 0 ? (' ' + ' ' + ' (冻结中)'):''}}</text>
+								<!-- <text>{{item.status == 0 ? (' ' + ' ' + ' (冻结中)'):''}}</text> -->
 							</view>
 							<view class="time">
 								<text>{{ item.add_time }}</text>

+ 15 - 7
pages/user/user.vue

@@ -28,15 +28,15 @@
 				</view>
 				<!-- 订单栏 -->
 				<view class="order-section">
-					<view class="order-item" @click="nav('/pages/order/order?state=1')">
+					<view class="order-item" @click="nav('/pages/order/order?state=0')">
 						<image src="../../static/img/img19.png" mode="scaleToFill"></image>
 						<view class="text">待付款</view>
 					</view>
-					<view class="order-item" @click="nav('/pages/order/order?state=2')">
+					<view class="order-item" @click="nav('/pages/order/order?state=1')">
 						<image src="../../static/img/img20.png" mode="scaleToFill"></image>
 						<view class="text">待发货</view>
 					</view>
-					<view class="order-item" @click="nav('/pages/order/order?state=3')">
+					<view class="order-item" @click="nav('/pages/order/order?state=2')">
 						<image src="../../static/img/img21.png" mode="scaleToFill"></image>
 						<view class="text">待收货</view>
 					</view>
@@ -55,7 +55,7 @@
 					<image src="../../static/img/img26.png" mode="scaleToFill"></image>
 					<view class="text">我的余额</view>
 				</view>
-				<view class="order-item" @click="nav('/pages/user/accounts')">
+				<view class="order-item" @click="nav('/pages/user/award')">
 					<image src="../../static/img/img23.png" mode="scaleToFill"></image>
 					<view class="text">我的佣金</view>
 				</view>
@@ -180,9 +180,17 @@
 			},
 			nav(url) {
 				console.log(url)
-				uni.navigateTo({
-					url
-				})
+				if(!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				}else {
+					uni.navigateTo({
+						url
+					})
+				}
+				
 			},
 			open(){
 				console.log('点击出现弹窗');

+ 4 - 4
pages/user/withdrawal.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content">
-		<uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar>
+		<!-- <uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar> -->
 		<view class="content-money">
 			<view class="flex ">
 				<view class="buttom">
@@ -34,7 +34,7 @@
 						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
 					</view>
 				</label>
-				<label>
+				<!-- <label>
 					<view class="box">
 						<view class="icon iconfont iconzhifubao"></view>
 						<view class="title-box">
@@ -48,10 +48,10 @@
 						</view>
 						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
 					</view>
-				</label>
+				</label> -->
 				<label>
 					<view class="box">
-						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
+						<view class="icon iconfont"><image class="icon-img" src="../../static/icon/i8.png" mode="aspectFit"></image></view>
 						<view class="title-box">
 							<view class="title">
 								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>

二進制
static/icon/i8.png