lhl 1 年間 前
コミット
f763fc8bc4

+ 1 - 1
api/public.js

@@ -165,7 +165,7 @@ export function routineBindingPhone(data) {
  * @param {Object} data
  */
 export function phoneLogin(data) {
-	return request.post('v2/routine/phone_login', data, {
+	return request.post('login/mobile', data, {
 		noAuth: true
 	});
 }

+ 10 - 0
api/store.js

@@ -545,4 +545,14 @@ export function settleTable(data) {
  */
 export function emptyTableData(data) {
 	return request.get("v2/user/empty/data", data);
+}
+
+
+//获取服务卡列表
+export function getSeverCardList(data) {
+	return request.get("v2/service_card", data);
+}
+//获取服务卡详情
+export function getSeverCardDetail(id) {
+	return request.get(`v2/service_card/${id}`);
 }

+ 2 - 2
config/app.js

@@ -13,9 +13,9 @@ module.exports = {
 	// 小程序配置
 	// #ifdef MP || APP-PLUS
 	// 请求域名 格式: https://您的域名
-	HTTP_REQUEST_URL: `https://您的域名`,
+	HTTP_REQUEST_URL: `https://wx.junhailan.com`,
 	// 长连接 格式:wss://您的域名 
-	VUE_APP_WS_URL: `wss://您的域名/ws`,
+	VUE_APP_WS_URL: `wss://wx.junhailan.com/ws`,
 	// #endif
 	// H5配置
 	// #ifdef H5

+ 3 - 3
manifest.json

@@ -1,7 +1,7 @@
 {
-    "name" : "crmeb",
+    "name" : "君子堂",
     "appid" : "__UNI__0A10130",
-    "description" : "crmeb商城",
+    "description" : "君子堂",
     "versionName" : "2.6.0",
     "versionCode" : 267,
     "transformPx" : false,
@@ -177,7 +177,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx6ca9ac1a01f617a1",
+        "appid" : "wx32132dd0248b3b81",
         "setting" : {
             "urlCheck" : false,
             "minified" : true,

+ 23 - 0
pages.json

@@ -781,6 +781,16 @@
             // }
           }
         },
+		{
+		    "path": "indexs",
+		    "style": {
+		      "navigationStyle": "custom"
+		    	// #ifdef MP
+		    	,
+		    	"disableScroll": true
+		    	// #endif
+		    }
+		  },
         {
           "path": "discountsGoodsList",
           "style": {
@@ -2045,6 +2055,19 @@
 				  // #endif
 				}
 			}
+		},
+		{
+			"path": "server_card/index",
+			"style": {
+				"navigationBarTitleText": "服务卡",
+				"app-plus": {
+				  // #ifdef APP-PLUS
+				  "titleNView": {
+				    "type": "default"
+				  }
+				  // #endif
+				}
+			}
 		}
       ]
     }

+ 138 - 0
pages/goods/server_card/index.vue

@@ -0,0 +1,138 @@
+<template>
+	<view  style="height: 100vh">
+		<view class="good-list">
+			<view class="good" v-for="item in list" @click="navto('/pages/goods_details/indexs?id=' + item.product_id + '&server_card_id=' + item.id)">
+				<image :src="item.image" mode="" class="good-image"></image>
+				<view class="good-name ">
+					<view class="clamp2">
+						{{item.card_name}}
+					</view>
+				</view>
+				<view class="good-price">
+					<view class="price">
+						{{item.card_price}}
+					</view>
+					<!-- <view class="xl">
+						销量:{{item.sold}}
+					</view> -->
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="loadingType" />
+	</view>
+</template>
+
+<script>
+	import {
+		getSeverCardList
+	} from '@/api/store.js';
+	export default {
+		data() {
+			return {
+				page: 1,
+				pageSize: 10,
+				loaded: false,
+				loadingType: 'loadmore',
+				list: []
+			}
+		},
+		onLoad(opt) {
+
+		},
+		onShow() {
+			this.getList()
+		},
+		onReachBottom() {
+			this.getList()
+		},
+		onReady() {
+			
+		},
+		methods: {
+			getList(type) {
+				let that = this
+
+				if (type == 'tab' && that.loaded) {
+					return
+				}
+				if (that.loadingType == 'loading' || that.loadingType == 'nomore') {
+					return
+				}
+				that.loadingType = 'loading'
+
+				getSeverCardList({
+					page: that.page,
+					limit: that.pageSize,
+				}).then(({
+					data
+				}) => {
+					that.list = that.list.concat(data.list)
+					that.page++
+					if (data.list.length == that.pageSize) {
+						that.loadingType = 'loadmore'
+					} else {
+						that.loadingType = 'nomore'
+					}
+				})
+
+			},
+			navto(url) {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.good-list {
+		display: flex;
+		justify-content: space-between;
+		flex-wrap: wrap;
+		padding: 20rpx 28rpx;
+		.good {
+			width: 336rpx;
+			height: 482rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 6rpx 0px rgba(0, 0, 0, 0.1);
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+			.good-image {
+				width: 336rpx;
+				height: 336rpx;
+				border-radius: 14rpx 14rpx 0 0;
+			}
+
+			.good-name {
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #333333;
+				padding: 0 20rpx;
+			}
+
+			.good-price {
+				display: flex;
+				width: 336rpx;
+				justify-content: space-between;
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #FF1A1A;
+				position: absolute;
+				bottom: 20rpx;
+				padding: 0 20rpx;
+				.xl{
+					font-size: 20rpx;
+					font-weight: bold;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

+ 2 - 1
pages/goods_details/index.vue

@@ -402,7 +402,7 @@
 							</view>
 							<navigator open-type="reLaunch" class="animated item skeleton-rect"
 								:class="animated == true ? 'bounceIn' : ''" url="/pages/order_addcart/order_addcart"
-								hover-class="none">
+								hover-class="none" v-if="storeInfo.product_type != 5 && storeInfo.product_type != 6">
 								<view class="iconfont icon-gouwuche1">
 									<text class="num bg-color"
 										v-if="parseFloat(CartCount) > 0">{{ CartCount || 0 }}</text>
@@ -1898,6 +1898,7 @@
 					store_id: this.store_id,
 					addressId: this.addressId,
 					delivery_type: this.delivery_type,
+					ServiceCardId: this.storeInfo.product_type == 5 ? this.storeInfo.id : 0
 				};
 				if (that.fromPage) {
 					q.productId = that.storeInfo.product_id;

ファイルの差分が大きいため隠しています
+ 2829 - 0
pages/goods_details/indexs.vue


+ 12 - 1
pages/index/index.vue

@@ -253,7 +253,9 @@
 		getCategoryList,
 		getProductslist,
 		getProductHot,
-    diyProduct
+		diyProduct,
+		getSeverCardList,
+		getSeverCardDetail
 	} from '@/api/store.js';
 	import {
 		goShopDetail
@@ -412,6 +414,7 @@
 					}
 				});
 			});
+			this.getSeverCardList()
 		},
 		onUnload(){
 			// 清除监听
@@ -468,6 +471,14 @@
 		onReady() {},
 		methods: {
 			...mapMutations(['SET_AUTOPLAY']),
+			getSeverCardList() {
+				getSeverCardList().then(res => {
+					console.log(res);
+					getSeverCardDetail(res.data.list[0].id).then(ress=> {
+						console.log(ress);
+					})
+				})
+			},
 			// 授权关闭
 			// authColse: function(e) {
 			//   this.isShowAuth = e

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません