DaMowang пре 3 година
родитељ
комит
ce7f9072f9

+ 0 - 128
src/components/goodsList.vue

@@ -1,128 +0,0 @@
-<template>
-    <view class="product-list">
-        <view class="product" v-for="(i, s) in productList" :key="s" @click="NavToGoodsDetail(i.id,i.type)">
-            <view class="image-view">
-                <image class="product-image" :src="i.original_img"></image>
-            </view>
-            <view :class="['product-title', 'ellipsis' + long]">{{ i.goods_name }}</view>
-            <view class="product-price">
-                <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
-                <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
-                <!-- <text class="product-tip">{{i.tip}}</text> -->
-            </view>
-            <view class="product-txt">{{ type == 3 ? i.give_cha_bao + "茶宝" : i.give_integral + "积分" }}</view>
-        </view>
-        <view class='fz_w_text mar_t20 mar_b20'>让数字经济赋能美好生活!</view>
-    </view>
-</template>
-<script>
-import { get, post } from "@/request/api.js";
-export default {
-    name: "goodslist",
-    components: {},
-    props: {
-        long: {
-            type: Number,
-            default: 2,
-        },
-        url: {
-            type: String,
-            default: "",
-        },
-        type: {
-            type: String,
-            default: "3",
-        },
-    },
-    data() {
-        return {
-            productList: [], //商品数据
-        };
-    },
-    onShow(){},
-    created() {
-        // this.loadData();
-    },
-    mounted () {},
-    methods: {
-        loadData(page) {
-            post("goods/goodsList",{
-                type: this.type,
-                page: page ? page : 1
-            }).then((res) => {
-                if(page == 1) this.productList = []
-                if (res.code === 0) {
-                    this.productList = [...this.productList,...res.data.data]
-                }
-            });
-        },
-        // 跳转到商品详情页
-        NavToGoodsDetail(id,type){
-            this.goto("/pages/product/p_details", { id, type });
-        },
-    },
-};
-</script>
-<style lang="scss" scoped>
-.product-list {
-    padding: 0 20rpx;
-    display: flex;
-    width: 100%;
-    flex-wrap: wrap;
-    flex-direction: row;
-}
-
-.product {
-    width: 50%;
-    padding: 20rpx 10rpx;
-    display: flex;
-    flex-direction: column;
-}
-
-.product-image {
-    border-radius: 10rpx 10rpx 0 0;
-    width: 100%;
-    height: 260rpx;
-    object-fit: cover;
-}
-
-.product-title {
-    width: 100%;
-    overflow: hidden;
-    line-height: 1.5;
-}
-
-.product-price {
-    color: #121212;
-    font-size: 28rpx;
-    position: relative;
-}
-
-.product-price-original {
-    color: #18bb88;
-}
-
-.product-price-favour {
-    color: #888888;
-    text-decoration: line-through;
-    margin-left: 10upx;
-}
-
-.product-tip {
-    position: absolute;
-    right: 10upx;
-    background-color: #ff3333;
-    color: #ffffff;
-    padding: 0 10upx;
-    border-radius: 5upx;
-}
-
-.product-unit {
-    font-size: 24rpx;
-}
-
-.product-txt {
-    font-size: 22rpx;
-    color: #787878;
-}
-</style>

+ 0 - 180
src/components/goodsLista.vue

@@ -1,180 +0,0 @@
-<template>
-	<view>
-		<view class="feng_flow">
-			<view class="flow_block">
-				<view class="flow_item" v-for="(i, i1) in lists1" :key="i1">
-					<image :src="Url" mode="widthFix" style="width: 100%;"></image>
-					<view class="flow_item_con" v-if="false">
-						<view class="flow_item_title">¥{{ type == 2 ? a.trade_price : a.cost_price }}</view>
-						<view class="flow_item_des">{{ i.trade_give_num }}</view>
-					</view>
-				</view>
-			</view>
-			<view class="flow_block">
-				<view class="flow_item" v-for="(a, i2) in lists2" :key="i2">
-					<image :src="Url" mode="widthFix" style="width: 100%;"></image>
-					<view class="flow_item_con" v-if="false">
-						<view class="flow_item_title">¥{{ type == 2 ? a.trade_price : a.cost_price }}</view>
-						<view class="flow_item_des">{{ a.trade_give_num }}</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="feng_flow" style="display: none;">
-			<view class="flow_block">
-				<view class="flow_item" v-for="(data,da_i) in dataLists" :key="da_i">
-					<image :src="data.zipurl" @error="imgError" @load="imgLoad" :id="da_i" mode="widthFix" style="width:100%;"></image>
-				</view>
-			</view>
-			<view class="flow_block"></view>
-		</view>
-	</view>
-</template>
-<script>
-import { get, post } from "@/request/api.js";
-export default {
-	name: 'fengFlow',
-    props: {
-        long: {
-            type: Number,
-            default: 2,
-        },
-        type: {
-            type: String,
-            default: "3",
-        },
-    },
-	data() {
-		return {
-			dataLists: [],
-			lists1: [],
-			lists2: [],
-			list1Height: 0,
-			list2Height: 0,
-			tmp_data: [],
-			loaded: [], //图片加载成功数组
-			loadErr: [], //图片加载失败数组
-			showLoad: false,
-
-            Url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/goods/20221008/bba4ab41-ec1a-462f-8d3c-5b36d81a3a1a.jpg" 
-		};
-	},
-	onLoad() {},
-	methods: {
-		// 获取作品列表
-		loadData(page) {
-            post("goods/goodsList",{
-                type: this.type,
-                page: page ? page : 1
-            }).then((res) => {
-                if(page == 1) this.dataLists  = []
-                if (res.code === 0) {
-                    this.dataLists  = [...this.dataLists ,...res.data.data]
-                }
-            });
-		},
-
-		//处理数据
-		refresData() {
-			this.hideLoadFlag()
-			if (this.loaded.length + this.loadErr.length < this.tmp_data.length) return;
-			const that = this
-			this.tmp_data.map((da, di) => {
-				if (that.list1Height > that.list2Height) {
-					that.list2Height += da.img_height
-					that.lists2.push(da)
-				} else {
-					that.list1Height += da.img_height
-					that.lists1.push(da)
-				}
-
-			})
-		},
-		//图片加载完成补齐数据
-		imgLoad(e) {
-			this.loaded.push(e.target.id)
-			//存储数据
-			this.tmp_data[e.target.id]['img_width'] = e.detail.width
-			this.tmp_data[e.target.id]['img_height'] = e.detail.height
-
-		},
-		//图片未加载成功触发
-		imgError(e) {
-			this.loadErr.push(e.target.id)
-		},
-		showLoadFlag() {
-			if (!this.showLoad) {
-				this.showLoad = true
-				uni.showLoading({
-					title: 'loading...',
-					mask: 'none'
-				})
-			}
-		},
-		hideLoadFlag() {
-			if (this.showLoad) {
-				uni.hideLoading();
-				this.showLoad = false;
-			}
-		},
-	},
-    created () {
-		this.loadData();
-    },
-	mounted() {
-		const that = this
-		that.tmp_data = that.dataLists
-		that.showLoadFlag()
-	},
-	watch: {
-		dataLists() {
-			this.loaded = []
-			this.loadErr = []
-			this.tmp_data = this.dataLists
-			this.showLoadFlag()
-		},
-		loaded() {
-			//最后一个加载完成负责刷新数据
-			this.refresData()
-		},
-		loadErr() {
-			//最后一个加载完成负责刷新数据
-			this.refresData()
-		}
-	}
-};
-</script>
-<style>
-.feng_flow {
-	display: flex;
-	padding: 15upx;
-}
-
-.flow_block {
-	display: flex;
-	flex: 1;
-	flex-direction: column;
-}
-
-.flow_item {
-	margin: 15upx;
-	border-radius: 20upx;
-	background: #f4f4f4;
-	overflow: hidden;
-}
-
-.flow_item_con {
-	padding: 10upx 20upx 20upx;
-}
-
-.flow_item_title {
-	position: relative;
-	font-size: 32upx;
-	font-weight: 700;
-	margin-bottom: 5upx;
-}
-
-.flow_item_des {
-	font-size: 24upx;
-}
-</style>

+ 53 - 57
src/manifest.json

@@ -1,28 +1,28 @@
 {
-    "name": "数智云商城",
-    "appid": "__UNI__95AE405",
-    "description": "",
-    "versionName": "1.0.0",
-    "versionCode": "100",
-    "transformPx": false,
+    "name" : "数智云商城",
+    "appid" : "__UNI__95AE405",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
     /* 5+App特有相关 */
-    "app-plus": {
-        "usingComponents": true,
-        "nvueCompiler": "uni-app",
-        "compilerVersion": 3,
-        "splashscreen": {
-            "alwaysShowBeforeRender": true,
-            "waiting": true,
-            "autoclose": true,
-            "delay": 0
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
         },
         /* 模块配置 */
-        "modules": {},
+        "modules" : {},
         /* 应用发布信息 */
-        "distribute": {
+        "distribute" : {
             /* android打包配置 */
-            "android": {
-                "permissions": [
+            "android" : {
+                "permissions" : [
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
@@ -48,62 +48,58 @@
                 ]
             },
             /* ios打包配置 */
-            "ios": {},
+            "ios" : {},
             /* SDK配置 */
-            "sdkConfigs": {}
+            "sdkConfigs" : {}
         }
     },
     /* 快应用特有相关 */
-    "quickapp": {},
+    "quickapp" : {},
     /* 小程序特有相关 */
-    "mp-weixin": {
-        "appid": "wx8ebee994ea7c5af3",
-        "setting": {
-            "urlCheck": false,
-            "es6": true,
-            "postcss": false,
-            "minified": true
+    "mp-weixin" : {
+        "appid" : "wx8ebee994ea7c5af3",
+        "setting" : {
+            "urlCheck" : false,
+            "es6" : true,
+            "postcss" : false,
+            "minified" : true
         },
-        "usingComponents": true,
-        "permission": {},
-        "requiredPrivateInfos": [
-            "chooseLocation",
-            "getLocation",
-            "chooseAddress"
-        ]
+        "usingComponents" : true,
+        "permission" : {},
+        "requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ]
     },
-    "mp-alipay": {
-        "usingComponents": true,
-        "uniStatistics": {
-            "enable": false
+    "mp-alipay" : {
+        "usingComponents" : true,
+        "uniStatistics" : {
+            "enable" : false
         }
     },
-    "mp-baidu": {
-        "usingComponents": true
+    "mp-baidu" : {
+        "usingComponents" : true
     },
-    "mp-toutiao": {
-        "usingComponents": true
+    "mp-toutiao" : {
+        "usingComponents" : true
     },
-    "uniStatistics": {
-        "enable": false
+    "uniStatistics" : {
+        "enable" : false
     },
-    "h5": {
+    "h5" : {
         // "devServer": {
         // 	"host": "h5.wmzx.com",
         // 	"port": 80
         // },
-        "template": "index.html",
-        "router": {
-            "mode": "history",
-            "base": ""
+        "template" : "index.html",
+        "router" : {
+            "mode" : "history",
+            "base" : ""
         },
-        "optimization": {
-            "treeShaking": {
-                "enable": true
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : true
             }
         },
-        "devServer": {
-            "https": false
+        "devServer" : {
+            "https" : false
         }
     }
-}
+}

+ 316 - 369
src/pages/index/index.vue

@@ -1,447 +1,394 @@
 <template>
-  <div class="Appindex">
-    <!-- 顶部 -->
-    <view class="head">
-      <!-- 搜索框 -->
-      <!-- <view class="head_search">
+    <div class="Appindex">
+        <!-- 顶部 -->
+        <view class="head">
+            <!-- 搜索框 -->
+            <!-- <view class="head_search">
                 <text class="iconfont">&#xe661;</text>
                 <text class="search_text">请输入搜索关键字</text>
             </view> -->
-      <!-- 搜索框-end -->
-
-      <!-- 轮播图 -->
-      <swiper-banner
-        :radius="1"
-        imgScale="5:2"
-        :imgArr="BannerImg"
-        :duration="1000"
-        :interval="5000"
-        :circular="true"
-        :autoplay="true"
-        @goList="goList"
-        :indicator-dots="true"
-        indicator-active-color="#12B280"
-        indicator-color="rgba(255, 255, 255, .82)"
-      ></swiper-banner>
-      <!-- 轮播图-end -->
-
-      <!-- 公告 -->
-      <view class="head_notice clearfix">
-        <view class="notice_title">
-          <image class="gg_img" src="@/static/img/gg.png"></image>
+            <!-- 搜索框-end -->
+            <!-- 轮播图 -->
+            <swiper-banner :radius="1" imgScale="5:2" :imgArr="BannerImg" :duration="1000" :interval="5000" :circular="true" :autoplay="true" @goList="goList" :indicator-dots="true" indicator-active-color="#12B280" indicator-color="rgba(255, 255, 255, .82)"></swiper-banner>
+            <!-- 轮播图-end -->
+            <!-- 公告 -->
+            <view class="head_notice clearfix">
+                <view class="notice_title">
+                    <image class="gg_img" src="@/static/img/gg.png"></image>
+                </view>
+                <swiper class="notice_swiper" vertical autoplay circular :interval="5000" :duration="1000">
+                    <swiper-item v-for="(item, index) in not_list" :key="index" @click="toDetail(item.article_id)">
+                        <text class="not_list ellipsis1">{{ item.title }}</text>
+                        <text class="not_ico iconfont">&#xe62e;</text>
+                    </swiper-item>
+                </swiper>
+            </view>
+            <!-- 公告-end -->
+            <!-- 金刚区 -->
+            <view class="head_area">
+                <view class="area_list" v-for="(item, index) in area_list" :key="index" @click="setPageUrl(item)">
+                    <image class="area_img" :src="item.url"></image>
+                    <view class="area_name">{{ item.name }}</view>
+                </view>
+            </view>
+            <!-- 金刚区-end -->
+            <!-- 活动 -->
+            <view class="activity" v-if="spc_list.length > 0">
+                <image class="act_one_img" :src="spc_list[0].url" @click="setPageUrl({ type: 4 })" mode=""></image>
+                <view class="act_other">
+                    <image class="act_two_img" :src="spc_list[1].url" mode=""></image>
+                    <image class="act_two_img" :src="spc_list[2].url" mode="" @click="goNoticeList"></image>
+                </view>
+            </view>
+            <!-- 活动-end -->
         </view>
-        <swiper
-          class="notice_swiper"
-          vertical
-          autoplay
-          circular
-          :interval="5000"
-          :duration="1000"
-        >
-          <swiper-item
-            v-for="(item, index) in not_list"
-            :key="index"
-            @click="toDetail(item.article_id)"
-          >
-            <text class="not_list ellipsis1">{{ item.title }}</text>
-            <text class="not_ico iconfont">&#xe62e;</text>
-          </swiper-item>
-        </swiper>
-      </view>
-      <!-- 公告-end -->
-
-      <!-- 金刚区 -->
-      <view class="head_area">
-        <view
-          class="area_list"
-          v-for="(item, index) in area_list"
-          :key="index"
-          @click="setPageUrl(item)"
-        >
-          <image class="area_img" :src="item.url"></image>
-          <view class="area_name">{{ item.name }}</view>
+        <view class="list_bar">
+            <div class="tit">猜你喜欢</div>
+            <view class="product-list">
+                <view class="product" v-for="(i, s) in productList" :key="s" @click="NavToGoodsDetail(i.id, i.type)">
+                    <view class="image-view">
+                        <image class="product-image" :src="i.original_img"></image>
+                    </view>
+                    <view :class="['product-title', 'ellipsis1']">{{ i.goods_name }}</view>
+                    <view class="product-price">
+                        <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
+                        <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
+                        <!-- <text class="product-tip">{{i.tip}}</text> -->
+                    </view>
+                    <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + "批发积分" : i.give_cha_bao + "茶宝" }}</view>
+                </view>
+                <view class="fz_w_text mar_t20 mar_b20">让数字经济赋能美好生活!</view>
+            </view>
         </view>
-      </view>
-      <!-- 金刚区-end -->
-
-      <!-- 活动 -->
-      <view class="activity" v-if="spc_list.length > 0">
-        <image
-          class="act_one_img"
-          :src="spc_list[0].url"
-          @click="setPageUrl({ type: 4 })"
-          mode=""
-        ></image>
-        <view class="act_other">
-          <image class="act_two_img" :src="spc_list[1].url" mode=""></image>
-          <image class="act_two_img" :src="spc_list[2].url" mode="" @click="goNoticeList"></image>
-        </view>
-      </view>
-      <!-- 活动-end -->
-    </view>
-    <view class="list_bar">
-      <div class="tit">猜你喜欢</div>
-      <view class="product-list">
-        <view
-          class="product"
-          v-for="(i, s) in productList"
-          :key="s"
-          @click="NavToGoodsDetail(i.id, i.type)"
-        >
-          <view class="image-view">
-            <image class="product-image" :src="i.original_img"></image>
-          </view>
-          <view :class="['product-title', 'ellipsis1']">{{
-            i.goods_name
-          }}</view>
-          <view class="product-price">
-            <text class="product-price-original"
-              ><text class="product-unit">¥</text>{{ i.price }}</text
-            >
-            <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
-            <!-- <text class="product-tip">{{i.tip}}</text> -->
-          </view>
-          <view class="product-txt"
-            >赠送{{
-              i.give_integral
-                ? i.give_integral + "批发积分"
-                : i.give_cha_bao + "茶宝"
-            }}</view
-          >
-        </view>
-        <view class="fz_w_text mar_t20 mar_b20">让数字经济赋能美好生活!</view>
-      </view>
-    </view>
-  </div>
+    </div>
 </template>
 <script>
 let app = getApp();
 var appEv = app.$vm.$options;
-// import goodslist from "@/components/goodsList"; //商品列表
 import swiperBanner from "@/components/swiperBanner"; //轮播
 import { get, post } from "@/request/api.js";
 export default {
-  name: "Appindex",
-  components: {
-    // goodslist, //商品列表
-    swiperBanner, //轮播
-  },
-  data() {
-    return {
-      BannerImg: [], // 轮播图列表
-      not_list: [], // 公告列表
-      // 金刚区
-      area_list: [
-        {
-          name: "零售区",
-          url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/cart.png",
-          type: 1,
+    name: "Appindex",
+    components: {
+        swiperBanner, //轮播
+    },
+    data() {
+        return {
+            BannerImg: [], // 轮播图列表
+            not_list: [], // 公告列表
+            // 金刚区
+            area_list: [{
+                    name: "零售区",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/cart.png",
+                    type: 1,
+                },
+                {
+                    name: "批发区",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/wholesale.png",
+                    type: 2,
+                },
+                {
+                    name: "精品优选",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/preferred.png",
+                    type: 3,
+                },
+                {
+                    name: "茶宝兑换",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/integral.png",
+                    type: 5,
+                },
+            ],
+            spc_list: [{
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/f70cd8e0-e468-45eb-a9f7-2c42713cd607.jpg",
+                },
+                {
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/b13c0186-fdfc-4b87-b466-5c9fc336cc54.jpg",
+                },
+                {
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/49886d9c-ce5a-49ca-a281-12910541344f.jpg",
+                },
+            ], //活动列表
+            productList: [], //商品数据
+        };
+    },
+    onLoad(option) {},
+    onLaunch() {},
+    onShow() {
+        this.loadData();
+        this.getBanner(); //获取轮播图
+        this.getAnnounce(); //获取公告列表
+    },
+    onHide() {},
+    methods: {
+        loadData() {
+            post("goods/indexGoods").then((res) => {
+                if (res.code === 0) {
+                    this.productList = res.data.data;
+                }
+            });
         },
-        {
-          name: "批发区",
-          url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/wholesale.png",
-          type: 2,
+        // 跳转到商品详情页
+        NavToGoodsDetail(id, type) {
+            this.goto("/pages/product/p_details", { id, type });
         },
-        {
-          name: "精品优选",
-          url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/preferred.png",
-          type: 3,
+        goNoticeList() {
+            this.goto("/pages/consultation-list/index");
         },
-        {
-          name: "茶宝兑换",
-          url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/integral.png",
-          type: 5,
+        // 获取轮播图
+        getBanner() {
+            post("banner").then((res) => {
+                if (res.code === 0) {
+                    this.BannerImg = [];
+                    res.data.data.forEach((e) => {
+                        if (e.image) this.BannerImg.push(e.image);
+                    });
+                }
+            });
         },
-      ],
-      spc_list: [
-        {
-          url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/f70cd8e0-e468-45eb-a9f7-2c42713cd607.jpg",
+        // 获取公告列表
+        getAnnounce() {
+            let data = {
+                is_index: 1
+            }
+            post("notice", data).then((res) => {
+                if (res.code === 0) {
+                    this.not_list = res.data.data;
+                }
+            });
         },
-        {
-          url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/b13c0186-fdfc-4b87-b466-5c9fc336cc54.jpg",
+        //跳转公告详情
+        toDetail(id) {
+            this.goto("/pages/notice/detail", { id });
         },
-        {
-          url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/49886d9c-ce5a-49ca-a281-12910541344f.jpg",
+        // 轮播图跳转
+        goList(e) {},
+        // 金刚区跳转
+        setPageUrl(item) {
+            if ([1, 3, 4].includes(item.type)) {
+                this.goto("/pages/product/productRetail", { type: item.type });
+            } else if (item.type == 2) {
+                this.goto("/pages/product/productWholesale", { type: 2 });
+            } else if (item.type == 5) {
+                this.goto("/pages/product/productTeaBaby", { type: item.type });
+            } else {
+                appEv.errTips("此功能暂未开放!");
+                return false;
+            }
         },
-      ], //活动列表
-      productList: [], //商品数据
-    };
-  },
-  onLoad(option) {},
-  onLaunch() {},
-  onShow() {
-    this.loadData();
-    this.getBanner(); //获取轮播图
-    this.getAnnounce(); //获取公告列表
-  },
-  onHide() {},
-  methods: {
-    loadData() {
-      post("goods/indexGoods").then((res) => {
-        if (res.code === 0) {
-          this.productList = res.data.data;
-        }
-      });
-    },
-    // 跳转到商品详情页
-    NavToGoodsDetail(id, type) {
-      this.goto("/pages/product/p_details", { id, type });
-    },
-    goNoticeList(){
-      this.goto("/pages/consultation-list/index");
-    },
-    // 获取轮播图
-    getBanner() {
-      post("banner").then((res) => {
-        if (res.code === 0) {
-          this.BannerImg = [];
-          res.data.data.forEach((e) => {
-            if (e.image) this.BannerImg.push(e.image);
-          });
-        }
-      });
     },
-    // 获取公告列表
-    getAnnounce() {
-      let data = {
-        is_index:1
-      }
-      post("notice",data).then((res) => {
-        if (res.code === 0) {
-          this.not_list =res.data.data;
+    computed: {},
+    watch: {},
+    onShareAppMessage: function() {
+        let userinfo = uni.getStorageSync("userinfo");
+        var path = "/pages/index/index?agentId=1";
+        if (userinfo.user_id) {
+            path = "/pages/index/index?agentId=" + userinfo.user_id;
         }
-      });
+        var title = `让数字经济赋能美好生活!`;
+        return {
+            title: title,
+            path: path,
+        };
     },
-    //跳转公告详情
-    toDetail(id) {
-      this.goto("/pages/notice/detail", { id });
-    },
-    // 轮播图跳转
-    goList(e) {},
-    // 金刚区跳转
-    setPageUrl(item) {
-      if ([1, 3, 4].includes(item.type)) {
-        this.goto("/pages/product/productRetail", { type: item.type });
-      } else if (item.type == 2) {
-        this.goto("/pages/product/productWholesale", { type: 2 });
-      } else if (item.type == 5) {
-        this.goto("/pages/product/productTeaBaby", { type: item.type });
-      } else {
-        appEv.errTips("此功能暂未开放!");
-        return false;
-      }
-    },
-  },
-  computed: {},
-  watch: {},
-  onShareAppMessage: function () {
-    let userinfo = uni.getStorageSync("userinfo");
-    var path = "/pages/index/index?agentId=1";
-    if (userinfo.user_id) {
-      path = "/pages/index/index?agentId=" + userinfo.user_id;
-    }
-    var title = `让数字经济赋能美好生活!`;
-    return {
-      title: title,
-      path: path,
-    };
-  },
 };
 </script>
 <style scoped lang='scss'>
 .head {
-  padding: 12rpx 28rpx;
+    padding: 12rpx 28rpx;
 }
 
 .head_search {
-  width: 100%;
-  height: 64rpx;
-  line-height: 64rpx;
-  background: #f3f5f7;
-  border-radius: 32rpx;
-  text-align: center;
-  font-size: 28rpx;
-  color: #bbbbbb;
-  margin-bottom: 26rpx;
+    width: 100%;
+    height: 64rpx;
+    line-height: 64rpx;
+    background: #f3f5f7;
+    border-radius: 32rpx;
+    text-align: center;
+    font-size: 28rpx;
+    color: #bbbbbb;
+    margin-bottom: 26rpx;
 
-  .search_text {
-    margin-left: 14rpx;
-  }
+    .search_text {
+        margin-left: 14rpx;
+    }
 }
 
 .head_notice {
-  margin: 30rpx 0;
+    margin: 30rpx 0;
 
-  .notice_title {
-    width: 130rpx;
-    height: 40rpx;
-    float: left;
+    .notice_title {
+        width: 130rpx;
+        height: 40rpx;
+        float: left;
 
-    .gg_img {
-      width: 100%;
-      height: 40rpx;
+        .gg_img {
+            width: 100%;
+            height: 40rpx;
+        }
     }
-  }
 
-  .notice_swiper {
-    height: 40rpx;
-    padding-left: 20rpx;
-    font-size: 28rpx;
-    float: left;
-    box-sizing: border-box;
-    width: calc(100% - 130rpx);
+    .notice_swiper {
+        height: 40rpx;
+        padding-left: 20rpx;
+        font-size: 28rpx;
+        float: left;
+        box-sizing: border-box;
+        width: calc(100% - 130rpx);
 
-    .not_list {
-      width: calc(100% - 50rpx);
-    }
+        .not_list {
+            width: calc(100% - 50rpx);
+        }
 
-    .not_ico {
-      width: 30rpx;
-      font-size: 28rpx;
-      color: #999;
-    }
+        .not_ico {
+            width: 30rpx;
+            font-size: 28rpx;
+            color: #999;
+        }
 
-    .not_list,
-    .not_ico {
-      display: inline-block;
-      vertical-align: middle;
-      height: 40rpx;
-      line-height: 40rpx;
+        .not_list,
+        .not_ico {
+            display: inline-block;
+            vertical-align: middle;
+            height: 40rpx;
+            line-height: 40rpx;
+        }
     }
-  }
 }
 
 // 金刚区
 .head_area {
-  margin: 20rpx 0 20rpx;
-  padding: 20rpx 0;
-  border-radius: 18rpx;
-  box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.08);
+    margin: 20rpx 0 20rpx;
+    padding: 20rpx 0;
+    border-radius: 18rpx;
+    box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.08);
 
-  .area_list {
-    display: inline-block;
-    width: 25%;
-    text-align: center;
+    .area_list {
+        display: inline-block;
+        width: 25%;
+        text-align: center;
 
-    .area_img {
-      width: 46rpx;
-      height: 46rpx;
-      margin-bottom: 12rpx;
-    }
+        .area_img {
+            width: 46rpx;
+            height: 46rpx;
+            margin-bottom: 12rpx;
+        }
 
-    .area_name {
-      font-size: 24rpx;
-      color: #474747;
+        .area_name {
+            font-size: 24rpx;
+            color: #474747;
+        }
     }
-  }
 }
 
 // 金刚区-end
 
 // 活动
 .activity {
-  .act_one_img {
-    display: inline-block;
-    width: 300rpx;
-    height: 378rpx;
-    margin-right: 10rpx;
-  }
+    .act_one_img {
+        display: inline-block;
+        width: 300rpx;
+        height: 378rpx;
+        margin-right: 10rpx;
+    }
 
-  .act_other {
-    display: inline-block;
-    width: calc(100% - 300rpx - 10rpx);
-  }
+    .act_other {
+        display: inline-block;
+        width: calc(100% - 300rpx - 10rpx);
+    }
 
-  .act_two_img {
-    width: 100%;
-    height: 185rpx;
-  }
+    .act_two_img {
+        width: 100%;
+        height: 185rpx;
+    }
 }
 
 // 活动-end
 
 // 商品列表
 .list_bar {
-  .tit {
-    text-align: center;
-    font-size: 36rpx;
-    color: #121212;
-    padding: 40rpx 0 20rpx;
-    font-weight: bold;
-  }
+    .tit {
+        text-align: center;
+        font-size: 36rpx;
+        color: #121212;
+        padding: 40rpx 0 20rpx;
+        font-weight: bold;
+    }
 }
+
 .product-list {
-  padding: 0 20rpx;
-  display: flex;
-  width: 100%;
-  flex-wrap: wrap;
-  flex-direction: row;
-  .product {
-    // width: 50%;
-    // padding: 20rpx 10rpx;
+    padding: 0 20rpx;
     display: flex;
-    flex-direction: column;
-
-    margin-bottom: 20rpx;
-    width: 48.5%;
-    padding-bottom: 6px;
-    // border: 1px solid #eee;
-    border-radius: 5px;
-    box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.08);
-    &:nth-child(2n) {
-      margin-left: 3%;
+    width: 100%;
+    flex-wrap: wrap;
+    flex-direction: row;
+
+    .product {
+        // width: 50%;
+        // padding: 20rpx 10rpx;
+        display: flex;
+        flex-direction: column;
+
+        margin-bottom: 20rpx;
+        width: 48.5%;
+        padding-bottom: 6px;
+        // border: 1px solid #eee;
+        border-radius: 5px;
+        box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.08);
+
+        &:nth-child(2n) {
+            margin-left: 3%;
+        }
     }
-  }
 
-  .product-image {
-    border-radius: 10rpx 10rpx 0 0;
-    width: 100%;
-    height:42.3vw;
-    object-fit: cover;
-  }
+    .product-image {
+        border-radius: 10rpx 10rpx 0 0;
+        width: 100%;
+        height: 42.3vw;
+        object-fit: cover;
+    }
 
-  .product-title {
-    width: 100%;
-    overflow: hidden;
-    line-height: 1.5;
-    font-size: 28rpx;
-    color: #121212;
-  }
+    .product-title {
+        width: 100%;
+        overflow: hidden;
+        line-height: 1.5;
+        font-size: 28rpx;
+        color: #121212;
+    }
 
-  .product-price {
-    color: #121212;
-    font-size: 28rpx;
-    position: relative;
-  }
+    .product-price {
+        color: #121212;
+        font-size: 28rpx;
+        position: relative;
+    }
 
-  .product-price-original {
-    color: #18bb88;
-    font-size: 32rpx;
-  }
+    .product-price-original {
+        color: #18bb88;
+        font-size: 32rpx;
+    }
 
-  .product-price-favour {
-    color: #888888;
-    text-decoration: line-through;
-    margin-left: 10upx;
-  }
+    .product-price-favour {
+        color: #888888;
+        text-decoration: line-through;
+        margin-left: 10upx;
+    }
 
-  .product-tip {
-    position: absolute;
-    right: 10upx;
-    background-color: #ff3333;
-    color: #ffffff;
-    padding: 0 10upx;
-    border-radius: 5upx;
-  }
+    .product-tip {
+        position: absolute;
+        right: 10upx;
+        background-color: #ff3333;
+        color: #ffffff;
+        padding: 0 10upx;
+        border-radius: 5upx;
+    }
 
-  .product-unit {
-    font-size: 24rpx;
-    color: #18bb88;
-  }
+    .product-unit {
+        font-size: 24rpx;
+        color: #18bb88;
+    }
 
-  .product-txt {
-    font-size: 22rpx;
-    color: #787878;
-  }
+    .product-txt {
+        font-size: 22rpx;
+        color: #787878;
+    }
 }
 </style>

+ 1 - 5
src/pages/sign/index.vue

@@ -64,13 +64,9 @@ let page = 1;
 let app = getApp();
 var appEv = app.$vm.$options;
 import uniPopup from '@/components/uni-popup/uni-popup'
-import goodsLista from "@/components/goodsLista"
 import { get, post } from "@/request/api.js";
 export default {
-    components: { 
-        uniPopup,
-        goodsLista,
-    },
+    components: { uniPopup },
     data() {
         return {
             integerInfo: {}, // 积分详情

+ 3 - 17
src/pages/to-pay-list/index.vue

@@ -2,11 +2,7 @@
     <view class="container">
         <!-- 收货地址 -->
         <view class="address" v-if="Data.is_sell != 1">
-            <block v-if="
-          DefaultAddress != '' &&
-          DefaultAddress.name != '' &&
-          DefaultAddress.name != undefined
-        ">
+            <block v-if="DefaultAddress != '' && DefaultAddress.name != '' && DefaultAddress.name != undefined">
                 <view class="add_head flex_r flex_ac flex_jb">
                     <view class="user_info flex_r flex_ac">
                         <view class="user_name">{{ DefaultAddress.name }}</view>
@@ -35,14 +31,7 @@
                 <view class="goods_con flex_c flex_jc flex_jb">
                     <view class="goods_name ellipsis2">{{ goodsInfo.goods_name }}</view>
                     <view class="flex_r flex_ac flex_jb">
-                        <view class="goods_msg">{{
-                            Data.type == 2
-                            ? goodsInfo.trade_num +
-                            "消费积分" +
-                            "¥" +
-                            goodsInfo.trade_price
-                            : "¥" + goodsInfo.cost_price
-                            }}</view>
+                        <view class="goods_msg">{{ Data.type == 2 ? goodsInfo.trade_num + "消费积分" + "¥" + goodsInfo.trade_price : "¥" + goodsInfo.cost_price }}</view>
                         <view class="goods_num">x {{ Data.num }}</view>
                     </view>
                 </view>
@@ -79,10 +68,7 @@
             </view>
             <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type != 5">
                 <view class="list_name">商品金额</view>
-                <view class="list_con">¥{{
-                    (Data.type == 2 ? goodsInfo.trade_price : goodsInfo.cost_price) *
-                    Data.num || 0
-                    }}</view>
+                <view class="list_con">¥{{ (Data.type == 2 ? goodsInfo.trade_price : goodsInfo.cost_price) * Data.num || 0 }}</view>
             </view>
             <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type != 4 && Data.type != 5">
                 <view class="list_name">可用余额</view>