Forráskód Böngészése

产品购买优化

xhj 2 éve
szülő
commit
53615bf4b6

+ 0 - 0
components/product_footer/index.css → product/components/product_footer/index.css


+ 2 - 2
components/product_footer/index.vue → product/components/product_footer/index.vue

@@ -98,8 +98,8 @@
 </template>
 
 <script>
-	const req = require("../../utils/request");
-	import mpHtml from "../mp-html/components/mp-html/mp-html";
+	const req = require("../../../utils/request");
+	import mpHtml from "../../../components/mp-html/components/mp-html/mp-html";
 	export default {
 		components: {
 			mpHtml

+ 15 - 6
product/detail/detail.vue

@@ -63,12 +63,17 @@
 
 		<view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 140) + 'rpx'"></view>
 		<view class="bot fixed bgfff dflex">
-			<view class="botbtn fflex" style="border-right: 1px solid #fff;" v-if="recommendCard.wechat"
-				@click="showCodePop()">
-				加微咨询
+			<view class="fflex ddflex">
+				<view class="botbtn fflex" style="border-right: 1px solid #fff;" v-if="recommendCard.wechat"
+					@click="showCodePop()">
+					加微咨询
+				</view>
+				<view class="botbtn fflex" @click="callPhone(recommendCard.phone)" v-if="recommendCard.phone">
+					电话咨询
+				</view>
 			</view>
-			<view class="botbtn fflex" @click="callPhone(recommendCard.phone)" v-if="recommendCard.phone">
-				电话咨询
+			<view class="botbtn fflex" style="border-left: 1px solid #fff;background-color: red;" @click="toBuy()" v-if="product.linkUrl">
+				购买
 			</view>
 		</view>
 		<view class="xiajia" v-if="product.state !=1">您来晚了,产品已经下架</view>
@@ -115,7 +120,7 @@
 	var QQMapWX = require("../../utils/qqmap.js");
 	const route = require("../../utils/route");
 	const api = require("../../utils/api.js");
-	import productFooter from "../../components/product_footer/index";
+	import productFooter from "../components/product_footer/index";
 
 	export default {
 		data() {
@@ -398,6 +403,10 @@
 					req.saveBehaviorNew(this.recommendCard.id, 1, 14)
 				}
 
+			},
+			toBuy(){
+				if(!this.product.linkUrl) return false
+				app.globalData.openPage('pages/web/web?url='+encodeURIComponent(this.product.linkUrl));
 			}
 		}
 	};