Browse Source

激活弹窗,等级名称、及其他优化

DaMowang 2 years ago
parent
commit
cab60b65de

+ 111 - 0
src/components/activation/activation.vue

@@ -0,0 +1,111 @@
+<template>
+    <uni-popup ref="popup" :mask-click="false">
+        <div class="popup_con">
+            <div class="p_tit">
+                <span class="tit">{{ tit }}</span>
+                <span @click="close" class="close iconfont">&#xe609;</span>
+            </div>
+            <div class="p_con">
+                <div class="con_txt">请输入激活码</div>
+                <input
+                    class="activation_code dinB"
+                    :focus="true"
+                    v-model="code"
+                />
+            </div>
+            <div class="btnbar">
+                <div class="btn" @click="jihuo">立即激活</div>
+            </div>
+        </div>
+    </uni-popup>
+</template>
+
+<script>
+import { post } from "@/request/api.js";
+export default {
+    name: "activation",
+    props: {},
+    props: {
+        tit: {
+            type: String,
+            default: "激活"
+        },
+    },
+    components: {},
+    data() {
+        return {
+            code: "", //激活码
+        };
+    },
+    methods: {
+        jihuo(){
+            let code = this.code
+            post("local/activation",{code}).then(res=>{
+                if(res.code == 0){
+                    uni.showToast({ title: "激活成功", icon: "none" });
+                    this.close()
+                }
+            })
+        },
+        open() {
+            this.$refs.popup.open('center')
+        },
+        close() {
+            this.$refs.popup.close()
+        }
+    },
+    onLoad(da) {},
+    onShow() {},
+    mounted() {},
+};
+</script>
+
+<style scoped lang='scss'>
+.popup_con{
+    background-color: #fff;
+    width: 80vw;
+    border-radius: 16rpx;
+    padding: 0 30rpx 28rpx;
+    .p_tit{
+        min-height: 80rpx;
+        line-height: 80rpx;
+        text-align: center;
+        .close{
+            color: #666;
+            font-size: 40rpx;
+            font-weight: bold;
+            float: right;
+        }
+    }
+    .p_con{
+        padding: 50rpx 0;
+        .con_txt{
+            color: #999;
+            font-size: 30rpx;
+            text-align: center;
+            margin-bottom: 16rpx;
+        }
+        .activation_code{
+            height: 70rpx;
+            background-color: rgba($color: #000, $alpha: 0.05);
+            border-radius: 12rpx;
+            text-align: center;
+            font-weight: bold;
+            letter-spacing: 4rpx;
+            font-size: 38rpx;
+        }
+
+    }
+    .btnbar{
+        // margin-top: 28rpx;
+        .btn{
+            font-weight: bold;
+            height: 70rpx;
+            line-height: 70rpx;
+            text-align: center;
+            background: radial-gradient(circle, #d3aa79,#ebcda8);
+            border-radius: 35rpx;
+        }
+    }
+}
+</style>

+ 0 - 6
src/pages.json

@@ -254,12 +254,6 @@
 						"navigationBarTitleText": "买单"
 					}
 				},
-				{
-					"path": "orderingfood/activation",
-					"style": {
-						"navigationBarTitleText": "激活"
-					}
-				},
 				{
 					"path": "orderingfood/activationcode",
 					"style": {

+ 300 - 269
src/pages/orderingfood/merchantlist.vue

@@ -1,299 +1,330 @@
 <template>
-  <div class="merchantlist">
-    <div class="head">
-      <div class="bg"></div>
-      <div class="card">
-        <div class="live_name">{{ typeto(local_uinfo.level_id) }}</div>
-        <div class="mm">
-          <span>账户余额</span>
-          <span class="balance dinB">{{ local_uinfo.integral || 0 }}</span>
+    <div class="merchantlist">
+        <div class="head">
+            <div class="bg"></div>
+            <div class="card">
+                <div class="live_name">{{ typeto(local_uinfo.level_id) }}</div>
+                <div class="mm">
+                    <span>账户余额</span>
+                    <span class="balance dinB">{{ local_uinfo.integral || 0 }}</span>
+                </div>
+            </div>
         </div>
-      </div>
-    </div>
-    <div class="l_tabBar flex_r flex_jb">
-      <div class="item" v-for="(i,s) in tabs" :key="s" @click="goto(i.url)">
-        <img :src="i.ico" alt="" class="ico">
-        <!-- <div class="tit">{{ i.tit }}</div> -->
-      </div>
-    </div>
-    <view class="loadingBox" v-if="loading">
-        <img class="loading" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/2caa2ae4dc849856f3eca4ff2b3abf7fd19e7632gif" />
-    </view>
-    <div class="list" v-else>
-      <div class="li_item" v-for="(i,s) in merchantList" :key="s" @click="goMerchant(i)">
-        <div class="li_title">{{ i.brand_name }}</div>
-        <div class="logo_img">
-          <img :src="i.restaurant_img" alt="">
+        <div class="l_tabBar flex_r flex_jb">
+            <div class="item" v-for="(i,s) in tabs" :key="s" @click="goto(i.url)">
+                <img :src="i.ico" alt="" class="ico">
+                <!-- <div class="tit">{{ i.tit }}</div> -->
+            </div>
         </div>
-        <div class="con_box">
-          <div class="p1 ellipsis">{{ i.restaurant_name }}</div>
-          <div class="p2">{{ i.restaurant_address }}</div>
-          <div class="p3">{{ $h.Div(i.distance, 1000).toFixed(2) }} km</div>
+        <view class="loadingBox" v-if="loading">
+            <img class="loading" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/2caa2ae4dc849856f3eca4ff2b3abf7fd19e7632gif" />
+        </view>
+        <div class="list" v-else>
+            <div class="li_item" v-for="(i,s) in merchantList" :key="s" @click="goMerchant(i)">
+                <div class="li_title">{{ i.brand_name }}</div>
+                <div class="logo_img">
+                    <img :src="i.restaurant_img" alt="">
+                </div>
+                <div class="con_box">
+                    <div class="p1 ellipsis">{{ i.restaurant_name }}</div>
+                    <div class="p2">{{ i.restaurant_address }}</div>
+                    <div class="p3">{{ $h.Div(i.distance, 1000).toFixed(2) }} km</div>
+                </div>
+            </div>
         </div>
-      </div>
+        <activation ref="activation" tit="激活" />
     </div>
-  </div>
 </template>
-
 <script>
-	import QQMapWX from '@/static/utils/qqmap-wx-jssdk.min.js'
-	import tabs from './tabs'
+import activation from "@/components/activation/activation.vue"
+import QQMapWX from '@/static/utils/qqmap-wx-jssdk.min.js'
+import tabs from './tabs'
 import { post } from "@/request/api.js";
 export default {
-  name: "merchantlist",
-  props: {},
-  components: {},
-  data() {
-    return {
-      loading: true,
-      Query: {
-        lat: 113.9367,
-        lng: 22.5325,
-        page: 1,
-        rows: 20
-      },
-      merchant: {},
-      merchantList: [],
-      local_uinfo: {},
-      tabs
-    };
-  },
-  methods: {
-    // 获取附近商家
-    getlists(){
-      post("local/getMerchant",this.Query).then(res => {
-        if(res.code == 0){
-          this.loading = false
-          let merchantList = res.data.data
-          delete res.data.data
-          this.merchant = res.data
-          this.merchantList = [ ...this.merchantList, ...merchantList ]
-          this.Query.page++
+    name: "merchantlist",
+    props: {},
+    components: { activation },
+    data() {
+        return {
+            loading: true,
+            Query: {
+                lat: 113.9367,
+                lng: 22.5325,
+                page: 1,
+                rows: 20
+            },
+            merchant: {},
+            merchantList: [],
+            local_uinfo: {},
+            tabs,
+        };
+    },
+    methods: {
+        // 获取附近商家
+        getlists() {
+            post("local/getMerchant", this.Query).then(res => {
+                if (res.code == 0) {
+                    this.loading = false
+                    let merchantList = res.data.data
+                    delete res.data.data
+                    this.merchant = res.data
+                    this.merchantList = [...this.merchantList, ...merchantList]
+                    this.Query.page++
+                }
+            })
+        },
+        // 获取当前位置
+        getLocation() {
+            const that = this;
+            // 获取位置信息
+            uni.getLocation({
+                type: 'wgs84',
+                success(res) {
+                    // 经纬度转化地址信息
+                    // const qqmap = require('@/pages/qqmap-wx-jssdk.min.js');
+                    console.log('位置信息:', res);
+                    const showmap = new QQMapWX({
+                        key: 'NWSBZ-ZUME4-LLTU6-XSQGB-YBKAT-U4FCZ'
+                    });
+                    // 逆地址解析reverseGeocoder
+                    showmap.reverseGeocoder({
+                        location: {
+                            latitude: res.latitude,
+                            longitude: res.longitude
+                        },
+                        success(result) {
+                            const adres = result.result.location;
+                            uni.setStorageSync("adres", adres)
+                            that.Query = { ...that.Query, ...adres };
+                            that.getlists();
+                            console.log('逆地址解析:', result);
+                        }
+                    });
+                },
+                fail(e) {
+                    let errMsgTit = '';
+                    if (e.errMsg === 'getLocation:fail auth deny') {
+                        errMsgTit = '你已拒绝授权,是否跳转至设置页面开启权限';
+                    } else {
+                        errMsgTit = '操作频繁提示,建议搭配onLocationChange()使用';
+                    }
+                    uni.showModal({
+                        title: '提示',
+                        content: `${errMsgTit}`,
+                        success(res) {
+                            if (res.confirm) {
+                                // 获取设置页面权限信息
+                                uni.getSetting({
+                                    success(res) {
+                                        console.log(res.authSetting);
+                                        // 判断是否开启获取位置权限
+                                        if (!res.authSetting['scope.userLocation']) {
+                                            // 如果没有开启,点击确认后打开设置页面
+                                            uni.openSetting({});
+                                        }
+                                    }
+                                });
+                                console.log('用户点击确定');
+                            } else if (res.cancel) {
+                                console.log('用户点击取消');
+                            }
+                        }
+                    });
+                }
+            });
+        },
+        // 去店铺
+        goMerchant(da) {
+            uni.setStorageSync("MerchantItem", da)
+            this.goto("/pagesB/orderingfood/orderingfood", {
+                brand_id: da.brand_id,
+                restaurant_id: da.restaurant_id
+            })
+        },
+        // 是否激活本地生活
+        isActivation() {
+            post("local/isActivation", this.Query).then(res => {
+                console.log('是否激活本地生活', res);
+                if (res.code == -1) {
+                    this.activation();
+                } else {
+                    this.getLocation();
+                    this.getLU();
+                }
+            })
+        },
+        getLU() {
+            post("local/userinfo").then(res => {
+                if (res.code == 0) {
+                    this.local_uinfo = res.data
+                }
+            })
+        },
+        typeto(va) {
+            switch (va) {
+                case 1:
+                    return "VIP";
+                case 2:
+                    return "群主";
+                case 3:
+                    return "合伙人";
+                case 4:
+                    return "副总";
+                case 5:
+                    return "联合发起人";
+                default:
+                    return ""
+            }
+        },
+        
+        activation(){
+            this.$refs.activation.open()
         }
-      })
     },
-		// 获取当前位置
-		getLocation() {
-			const that = this;
-			// 获取位置信息
-			uni.getLocation({
-				type: 'wgs84',
-				success(res) {
-					// 经纬度转化地址信息
-					// const qqmap = require('@/pages/qqmap-wx-jssdk.min.js');
-          console.log('位置信息:',res);
-					const showmap = new QQMapWX({
-						key: 'NWSBZ-ZUME4-LLTU6-XSQGB-YBKAT-U4FCZ'
-					});
-					// 逆地址解析reverseGeocoder
-					showmap.reverseGeocoder({
-						location: {
-							latitude: res.latitude,
-							longitude: res.longitude
-						},
-						success(result) {
-							const adres = result.result.location;
-              uni.setStorageSync("adres",adres)
-              that.Query = { ...that.Query, ...adres };
-              that.getlists();
-              console.log('逆地址解析:',result);
-						}
-					});
-				},
-				fail(e) {
-					let errMsgTit = '';
-					if (e.errMsg === 'getLocation:fail auth deny') {
-						errMsgTit = '你已拒绝授权,是否跳转至设置页面开启权限';
-					} else {
-						errMsgTit = '操作频繁提示,建议搭配onLocationChange()使用';
-					}
-					uni.showModal({
-						title: '提示',
-						content: `${errMsgTit}`,
-						success(res) {
-							if (res.confirm) {
-								// 获取设置页面权限信息
-								uni.getSetting({
-									success(res) {
-										console.log(res.authSetting);
-										// 判断是否开启获取位置权限
-										if (!res.authSetting['scope.userLocation']) {
-											// 如果没有开启,点击确认后打开设置页面
-											uni.openSetting({});
-										}
-									}
-								});
-								console.log('用户点击确定');
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
-						}
-					});
-				}
-			});
-		},
-    // 去店铺
-    goMerchant(da) {
-      uni.setStorageSync("MerchantItem",da)
-      this.goto("/pagesB/orderingfood/orderingfood",{
-        brand_id:da.brand_id,
-        restaurant_id:da.restaurant_id
-      })
+    onShow() {
+        this.isActivation();
     },
-    // 是否激活本地生活
-    isActivation(){
-      post("local/isActivation",this.Query).then(res => {
-          console.log('是否激活本地生活',res);
-        if(res.code == -1){
-          this.goto("/pagesB/orderingfood/activation")
-        }else{
-          this.getLocation();
-          this.getLU();
-        }
-      })
+    onReachBottom() {
+        if (this.Query.page < this.merchant.last_page) this.getlists();
     },
-    getLU(){
-      post("local/userinfo").then(res=>{
-        if(res.code == 0){
-          this.local_uinfo = res.data
+};
+</script>
+<style scoped lang='scss'>
+.head {
+    .bg {
+        height: 300rpx;
+        background-image: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/a5500a3c12f967a83d123f774b333e2b2d9729bcpng");
+        background-size: 100% 100%;
+    }
+
+    .card {
+        width: calc(100% - 60rpx);
+        margin: -110rpx 30rpx 0;
+        // background-color: #473D31;
+        background: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/2e672c48ad6a5293a86a3aa0ac258f47ca5b2931jpg");
+        background-size: 100% 100%;
+        border-radius: 16rpx;
+        padding: 28rpx 30rpx;
+        height: 280rpx;
+        position: relative;
+
+        .balance {
+            font-size: 46rpx;
+            margin-top: 8rpx;
+            margin-left: 26rpx;
+
+            &:before {
+                content: "¥";
+                font-size: 24rpx;
+            }
         }
-      })
-    },
-    typeto(va) {
-        switch (va) {
-            case 1: return "VIP";
-            case 2: return "黄金VIP";
-            case 3: return "群主";
-            case 4: return "副总";
-            case 5: return "联合发起人";
-            default: return ""
+
+        .live_name {
+            font-size: 36rpx;
+            color: #CD7C2B;
+            position: absolute;
+            top: 16rpx;
+            left: 90rpx;
+
+        }
+
+        .mm {
+            margin: auto 0;
+            text-align: center;
+            line-height: 210rpx;
         }
     }
-  },
-  onShow() {
-    this.isActivation();
-  },
-  onReachBottom() {
-    if(this.Query.page < this.merchant.last_page) this.getlists();
-  },
-};
-</script>
+}
 
-<style scoped lang='scss'>
-.head{
-  .bg{
-    height: 300rpx;
-    background-image: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/a5500a3c12f967a83d123f774b333e2b2d9729bcpng");
-    background-size: 100% 100%;
-  }
-  .card{
-    width: calc(100% - 60rpx);
-    margin: -110rpx 30rpx 0;
-    // background-color: #473D31;
-    background: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/2e672c48ad6a5293a86a3aa0ac258f47ca5b2931jpg");
-    background-size: 100% 100%;
-    border-radius: 16rpx;
-    padding: 28rpx 30rpx;
-    height: 280rpx;
-    position: relative;
-    .balance{
-      font-size: 46rpx;
-      margin-top: 8rpx;
-      margin-left: 26rpx;
-      &:before {
-        content: "¥";
-        font-size: 24rpx;
-      }
+.list {
+    padding: 30rpx;
+
+    .li_item {
+        margin-bottom: 20rpx;
+        padding: 28rpx 32rpx;
+        background-color: #fff;
+        border-radius: 10rpx;
+        box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.1);
     }
-    .live_name{
-      font-size: 36rpx;
-      color: #CD7C2B;
-      position: absolute;
-      top: 16rpx;
-      left: 90rpx;
 
+    .li_title {
+        font-size: 36rpx;
+        margin-bottom: 16rpx;
     }
-    .mm{
-      margin: auto 0;
-      text-align: center;
-      line-height: 210rpx;
+
+    .logo_img,
+    .con_box {
+        display: inline-block;
+        vertical-align: top;
+    }
+
+    .logo_img {
+        img {
+            height: 180rpx;
+            width: 180rpx;
+            border-radius: 10rpx;
+        }
+    }
+
+    .con_box {
+        height: 180rpx;
+        width: calc(100% - 180rpx - 28rpx);
+        margin-left: 28rpx;
+        position: relative;
+
+        .p1 {
+            font-size: 32rpx;
+            font-weight: bold;
+            color: #333;
+            margin-bottom: 6rpx;
+        }
+
+        .p2 {
+            font-size: 24rpx;
+            color: #999;
+        }
+
+        .p3 {
+            font-size: 24rpx;
+            color: #666;
+            position: absolute;
+            right: 0;
+            bottom: 0;
+        }
     }
-  }
 }
-.list{
-  padding: 30rpx;
-  .li_item{
-    margin-bottom: 20rpx;
-    padding: 28rpx 32rpx;
+
+.l_tabBar {
+    margin: 32rpx 32rpx 0;
     background-color: #fff;
+    padding: 10rpx 20rpx;
     border-radius: 10rpx;
     box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.1);
-  }
-  .li_title{
-    font-size: 36rpx;
-    margin-bottom: 16rpx;
-  }
-  .logo_img,.con_box{
-    display: inline-block;
-    vertical-align: top;
-  }
-  .logo_img{
-    img{
-      height: 180rpx;
-      width: 180rpx;
-      border-radius: 10rpx;
-    }
-  }
-  .con_box{
-    height: 180rpx;
-    width: calc(100% - 180rpx - 28rpx);
-    margin-left: 28rpx;
-    position: relative;
-    .p1{
-      font-size: 32rpx;
-      font-weight: bold;
-      color: #333;
-      margin-bottom: 6rpx;
-    }
-    .p2{
-      font-size: 24rpx;
-      color: #999;
+    flex-wrap: wrap;
+
+    .item {
+        width: 105rpx;
+        margin: 10rpx 10rpx;
     }
-    .p3{
-      font-size: 24rpx;
-      color: #666;
-      position: absolute;
-      right: 0;
-      bottom: 0;
+
+    .ico {
+        width: 100%;
+        height: 138rpx;
     }
-  }
-}
-.l_tabBar{
-  margin: 32rpx 32rpx 0;
-  background-color: #fff;
-  padding: 10rpx 20rpx;
-  border-radius: 10rpx;
-  box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.1);
-  flex-wrap: wrap;
-  .item{
-    width: 105rpx;
-    margin: 10rpx 10rpx;
-  }
-  .ico{
-    width: 100%;
-    height: 138rpx;
-  }
-  // .tit{
-  //   font-size: 26rpx;
-  //   text-align: center;
-  // }
+
+    // .tit{
+    //   font-size: 26rpx;
+    //   text-align: center;
+    // }
 }
-.loadingBox{
-  text-align: center;
-  padding: 100rpx 0;
-  .loading{
-    width: 280rpx;
-    height: 280rpx;
-  }
+
+.loadingBox {
+    text-align: center;
+    padding: 100rpx 0;
+
+    .loading {
+        width: 280rpx;
+        height: 280rpx;
+    }
 }
 </style>

+ 1 - 1
src/pages/orderingfood/tabs.js

@@ -11,7 +11,7 @@ export default [
   },
   {
       ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/e3d3719e646469f2615abce1ef61753ea7de0b19png",
-      url: "/pagesB/cinema/cinemaList",
+    //   url: "/pagesB/cinema/cinemaList",
       tit: "影院"
   },
   {

+ 0 - 78
src/pagesB/orderingfood/activation.vue

@@ -1,78 +0,0 @@
-<template>
-  <div class="activation">
-    <div class="con">
-        <div class="con_txt">请输入激活码</div>
-        <input class="activation_code dinB" :focus="true" v-model="code">
-    </div>
-    <div class="btnbar">
-        <div class="btn" @click="jihuo">立即激活</div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { post } from "@/request/api.js";
-export default {
-  name: "activation",
-  props: {},
-  components: {},
-  data() {
-    return {
-        code: '',
-    };
-  },
-  methods: {
-    jihuo(){
-        let code = this.code
-        post("local/activation",{code}).then(res=>{
-            if(res.code == 0){
-				uni.switchTab({ url: "/pages/orderingfood/merchantlist" });
-            }
-        })
-    }
-  },
-  onLoad(da) {},
-  onShow() {},
-  mounted() {},
-};
-</script>
-
-<style scoped lang='scss'>
-.activation{
-    padding: 0 30rpx;
-}
-.con{
-    margin-top: 100rpx;
-    .con_txt{
-        color: #999;
-        font-size: 30rpx;
-        text-align: center;
-        margin-bottom: 16rpx;
-    }
-    .activation_code{
-        // color: #000;
-        height: 90rpx;
-        background-color: #fff;
-        border-radius: 12rpx;
-        text-align: center;
-        font-weight: bold;
-        letter-spacing: 4rpx;
-        font-size: 38rpx;
-    }
-}
-.btnbar{
-    position: fixed;
-    bottom: 60rpx;
-    left: 0;
-    padding: 0 30rpx;
-    width: 100%;
-    .btn{
-        font-weight: bold;
-        height: 90rpx;
-        line-height: 90rpx;
-        text-align: center;
-        background: radial-gradient(circle, #d3aa79,#ebcda8);
-        border-radius: 45rpx;
-    }
-}
-</style>

+ 2 - 2
src/pagesB/orderingfood/activationcode.vue

@@ -42,8 +42,8 @@ export default {
 
             tabs: [
                 { n: "VIP", i: 1, k: "vip_num" },
-                { n: "黄金VIP", i: 2, k: "lord_num" },
-                { n: "群主", i: 3, k: "helper_num" },
+                { n: "群主", i: 2, k: "lord_num" },
+                { n: "合伙人", i: 3, k: "helper_num" },
                 { n: "副总", i: 4, k: "vice_num" },
             ],
             level_id: 1,

+ 2 - 2
src/pagesB/orderingfood/detail.vue

@@ -76,7 +76,7 @@
                                 </view> -->
                             </view>
                             <view class="number" :style="'color:'+template.color.color2">x{{item.number}}</view>
-                            <view class="price" :style="'color:'+template.color.color2">¥{{$h.Add(item.user_price, item.spec_price)}}</view>
+                            <view class="price" :style="'color:'+template.color.color2">¥{{$h.Add(item.product_price, item.spec_price)}}</view>
                         </view>
                         <view class="goods">
                             <view class="infoBox">
@@ -193,7 +193,7 @@ export default {
                     let number = 0;
                     da.forEach(itm => {
                         number += itm.number;
-                        totals = this.$h.Add(totals, this.$h.Mul(this.$h.Add(itm.user_price, itm.spec_price), itm.number));
+                        totals = this.$h.Add(totals, this.$h.Mul(this.$h.Add(itm.product_price, itm.spec_price), itm.number));
                     })
                     this.orderGoods = da;
                     this.orderTotal = totals;

+ 9 - 8
src/pagesB/orderingfood/orderingfood.vue

@@ -53,7 +53,7 @@
                                         <view class="title" :style="'color:'+template.color.color2">{{itm.product_name}}</view>
                                         <view class="intro" :style="'color:'+template.color.color3">{{itm.product_description || ""}}</view>
                                         <view class="box">
-                                            <view class="price" :style="'color:'+template.color.color1">¥{{itm.user_price}}</view>
+                                            <view class="price" :style="'color:'+template.color.color1">¥{{itm.product_price}}</view>
                                             <view class="button">
                                                 <block v-if="openStoreStatus">
                                                     <block v-if="itm.product_choose">
@@ -114,7 +114,7 @@
                                 </view>
                             </view>
                             <view class="right">
-                                <view class="price">¥{{$h.Add(item.user_price, item.spec_price)}}</view>
+                                <view class="price">¥{{$h.Add(item.product_price, item.spec_price)}}</view>
                                 <view class="buy">
                                     <icon type="jian" @click="editGoods(item, 'jian')" size="23" :color="item.number==1?'#cccccc':'#d3aa79'"></icon>
                                     <input type="number" :value="item.number" disabled />
@@ -152,8 +152,8 @@
                     <view class="gfooter">
                         <view class="price">
                             <view class="left">
-                                <view v-if="childProductData.spec_price" class="text" :style="'color:'+template.color.color1">¥{{childProductData.spec_price + goodsOneData.user_price}}<text :style="'color:'+template.color.color3" v-if="goodsOneData.product_price">¥{{childProductData.spec_price + goodsOneData.product_price}}</text></view>
-                                <view v-else class="text" :style="'color:'+template.color.color1">¥{{goodsOneData.user_price}}<text :style="'color:'+template.color.color3" v-if="goodsOneData.product_price">¥{{goodsOneData.product_price}}</text></view>
+                                <view v-if="childProductData.spec_price" class="text" :style="'color:'+template.color.color1">¥{{childProductData.spec_price + goodsOneData.product_price}}</view>
+                                <view v-else class="text" :style="'color:'+template.color.color1">¥{{goodsOneData.product_price}}</view>
                                 <view class="label" v-if="childProductData.selectSpecification" :style="'color:'+template.color.color3">
                                     <text v-for="(value, name) in childProductData.selectSpecification" :key="name" class="good_spec">{{value}} </text>
                                 </view>
@@ -347,7 +347,7 @@ export default {
             }
             if (curSelectNum == specification.length) this.canSubmit = true
             else this.canSubmit = false;
-            this.childProductData = { selectSpecArr, selectSpecification, spec_price, sku_code };
+            this.childProductData = { selectSpecArr, selectSpecification, spec_price };
         },
 		// 添加购物袋前  修改购买数量
         editGoodsOne(type) {
@@ -384,11 +384,12 @@ export default {
 		// 添加购物袋
         addCartGoods(da, num, spec = []) {
             let json = {
+                brand_id: this.MerchantInfo.brand_id,
                 restaurant_id: this.MerchantInfo.restaurant_id,
                 product_id: da.product_id,
                 product_img: da.product_img,
                 product_name: da.product_name,
-                user_price: da.user_price,
+                product_price: da.product_price,
 				spec_price: spec.spec_price,
                 number: num,
                 spec: JSON.stringify(spec)
@@ -439,7 +440,7 @@ export default {
                     let number = 0;
                     data.forEach(itm => {
                         number += itm.number;
-                        totals = this.$h.Add(totals, this.$h.Mul(this.$h.Add(itm.user_price, itm.spec_price), itm.number));
+                        totals = this.$h.Add(totals, this.$h.Mul(this.$h.Add(itm.product_price, itm.spec_price), itm.number));
                         itm.spec = JSON.parse(itm.spec)
                     })
                     this.cartList = data;
@@ -484,7 +485,7 @@ export default {
             let name = this.MerchantInfo.brand_name;
             let address = this.MerchantInfo.restaurant_address;
             uni.openLocation({
-                latitude, longitude, scale: 5, name, address,
+                latitude, longitude, scale: 18, name, address,
                 success: function () {
                     console.log('success');
                 }

+ 2 - 2
src/pagesB/orderingfood/payTheBill.vue

@@ -17,7 +17,7 @@
             <div class="li li2" v-for="(i,s) in cartList" :key="s">
                 <span class="s1 ellipsis">{{ i.product_name }}</span>
                 <span class="s2">{{ i.number }}</span>
-                <span class="s2">{{ $h.Mul($h.Add(i.user_price, i.spec_price),i.number) }}</span>
+                <span class="s2">{{ $h.Mul($h.Add(i.product_price, i.spec_price),i.number) }}</span>
             </div>
         </div>
         <div class="money card">
@@ -94,7 +94,7 @@ export default {
                     let data = res.data;
                     let totals = 0;
                     data.forEach(itm => {
-                        totals = this.$h.Add(totals, this.$h.Mul(this.$h.Add(itm.user_price, itm.spec_price), itm.number));
+                        totals = this.$h.Add(totals, this.$h.Mul(this.$h.Add(itm.product_price, itm.spec_price), itm.number));
                     })
                     this.cartList = data;
                     this.cartTotal = totals;