Ver código fonte

商城首页修改

lkg 11 meses atrás
pai
commit
8af914df4d

+ 0 - 8
.idea/.gitignore

@@ -1,8 +0,0 @@
-# 默认忽略的文件
-/shelf/
-/workspace.xml
-# 基于编辑器的 HTTP 客户端请求
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml

+ 0 - 6
.idea/git_toolbox_blame.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="GitToolBoxBlameSettings">
-    <option name="version" value="2" />
-  </component>
-</project>

+ 0 - 9
.idea/mallstore.iml

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
-    <exclude-output />
-    <content url="file://$MODULE_DIR$" />
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 10
.idea/misc.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="MavenRunner">
-    <option name="jreName" value="17" />
-    <option name="vmOptions" value="-DarchetypeCatalog=internal" />
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
-</project>

+ 0 - 8
.idea/modules.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/mallstore.iml" filepath="$PROJECT_DIR$/.idea/mallstore.iml" />
-    </modules>
-  </component>
-</project>

+ 0 - 35
.idea/sonarlint/issuestore/index.pb

@@ -1,35 +0,0 @@
-
-A
-package-lock.json,f\a\fa288d1472d29beccb489a676f68739ad365fc47
-D
-pages/home/index.vue,7\0\703d8bfeb22c8122000fd66b7c22579ae1b482eb
-I
-common/styles/common.scss,9\6\968bb55ac9337975ca70fa40d45e5b563fe2f0ce
-D
-pages/home/config.js,c\7\c7c5e2324e182a769600a86839b1cf86367f90a0
-N
-pages/home/dashboard/index.vue,1\d\1d6720cc765400540632b2e41f6370505fe95410
-7
-App.vue,f\d\fd280706c6e8f82ed680b651f54ccb82cb52900b
-7
-main.js,c\4\c4a4248f7568c9e41265502c39b0daeb8b635431
-:
-
-index.html,f\6\f6013a00b362253c64368d6eebc50ea2131754e2
-<
-package.json,7\0\7030d0b2f71b999ff89a343de08c414af32fc93a
-\
-,node_modules/vue-jsonp/dist/utils/index.d.ts,d\b\dbf96ebaad7be68a696625f27816c223070b4463
-:
-
-pages.json,8\6\86814244647b75d08ef4f03505e39e2b725a57f9
-E
-pages/home/index.vue2,0\e\0ec286dec1d8ebf68897bf8c60f43ff0e1332c9f
-E
-pages/home/index2.vue,3\4\347a9e6b82014c47d510058e2e295e3866213418
-[
-+uview-ui1/components/u1-tabbar/u-tabbar.vue,e\7\e704933ea2965b514372e43d9e044e12f46406ed
-S
-#.idea/sonarlint/issuestore/index.pb,9\f\9fe84ebb15faf917b7def6236dba604453cc61e0
-]
--.idea/sonarlint/securityhotspotstore/index.pb,8\8\88a9255124c95bdc913197c120a8d560edc59c8e

+ 0 - 0
.idea/sonarlint/securityhotspotstore/f/a/fa288d1472d29beccb489a676f68739ad365fc47


+ 0 - 35
.idea/sonarlint/securityhotspotstore/index.pb

@@ -1,35 +0,0 @@
-
-A
-package-lock.json,f\a\fa288d1472d29beccb489a676f68739ad365fc47
-D
-pages/home/index.vue,7\0\703d8bfeb22c8122000fd66b7c22579ae1b482eb
-I
-common/styles/common.scss,9\6\968bb55ac9337975ca70fa40d45e5b563fe2f0ce
-D
-pages/home/config.js,c\7\c7c5e2324e182a769600a86839b1cf86367f90a0
-N
-pages/home/dashboard/index.vue,1\d\1d6720cc765400540632b2e41f6370505fe95410
-7
-App.vue,f\d\fd280706c6e8f82ed680b651f54ccb82cb52900b
-7
-main.js,c\4\c4a4248f7568c9e41265502c39b0daeb8b635431
-:
-
-index.html,f\6\f6013a00b362253c64368d6eebc50ea2131754e2
-<
-package.json,7\0\7030d0b2f71b999ff89a343de08c414af32fc93a
-\
-,node_modules/vue-jsonp/dist/utils/index.d.ts,d\b\dbf96ebaad7be68a696625f27816c223070b4463
-:
-
-pages.json,8\6\86814244647b75d08ef4f03505e39e2b725a57f9
-E
-pages/home/index.vue2,0\e\0ec286dec1d8ebf68897bf8c60f43ff0e1332c9f
-E
-pages/home/index2.vue,3\4\347a9e6b82014c47d510058e2e295e3866213418
-[
-+uview-ui1/components/u1-tabbar/u-tabbar.vue,e\7\e704933ea2965b514372e43d9e044e12f46406ed
-S
-#.idea/sonarlint/issuestore/index.pb,9\f\9fe84ebb15faf917b7def6236dba604453cc61e0
-]
--.idea/sonarlint/securityhotspotstore/index.pb,8\8\88a9255124c95bdc913197c120a8d560edc59c8e

+ 0 - 6
.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="Git" />
-  </component>
-</project>

+ 17 - 0
common/styles/common.scss

@@ -43,6 +43,9 @@ ol, ul {
 .mt15 {
   margin-top: 15px;
 }
+.mtr20 {
+	margin-top: 20rpx;
+}
 .mt5 {
   margin-top: 5px;
 }
@@ -240,6 +243,20 @@ ol, ul {
 .color-red {
 	color: #FF424F;
 }
+.color-556 {
+	color: #C29556;
+}
+
+.color-666 {
+	color: #666666;
+}
+.color-333 {
+	color: #333333;
+}
+.color-777 {
+	color: #777777;
+}
+
 
 .color-ca{
 	color: #CACACA;

+ 6 - 2
common/utils/tools.js

@@ -2,7 +2,7 @@ import moment from 'moment'
 import { getOrderPayData } from '@/common/api'
 
 // 获取微信支付并支付
-export const toWechatPay = (orderNo, remark) => {
+export const toWechatPay = (orderNo, remark,type) => {
 	let sendData = { order_no: orderNo }
 	if (remark) {
 		sendData.order_remark = remark
@@ -17,7 +17,11 @@ export const toWechatPay = (orderNo, remark) => {
 			signType,
 			timeStamp,
 			success: function(res) {
-				uni.navigateTo({ url: `/subPages/paySuccess/paySuccess?orderNo=${orderNo}` })
+				if (type&&type==2){
+					uni.navigateTo({ url: `/subPages/paySuccess/payCourseSuccess?orderNo=${orderNo}` })
+				}else{
+					uni.navigateTo({ url: `/subPages/paySuccess/paySuccess?orderNo=${orderNo}` })
+				}
 			},
 			fail: function(err) {
 				uni.navigateTo({ url: `/subPages/orderDetail/orderDetail?orderNo=${orderNo}` })

+ 5 - 0
package-lock.json

@@ -157,6 +157,11 @@
         "minimist": "^1.2.0"
       }
     },
+    "jsqr": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmmirror.com/jsqr/-/jsqr-1.4.0.tgz",
+      "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A=="
+    },
     "linkify-it": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",

+ 1 - 0
package.json

@@ -4,6 +4,7 @@
     "dayjs": "^1.11.9",
     "html2canvas": "^1.4.1",
     "js-md5": "^0.7.3",
+    "jsqr": "^1.4.0",
     "moment": "^2.29.4",
     "vant-weapp": "^0.5.29",
     "vconsole": "^3.14.6",

+ 17 - 0
pages.json

@@ -153,6 +153,7 @@
 				"path": "goodsDetail/goodsDetail",
 				"style": {
 					"enablePullDownRefresh": false,
+//					"navigationStyle": "custom",
 					"navigationBarTitleText": "商品详情"
 				}
 			},
@@ -366,6 +367,13 @@
 					"enablePullDownRefresh": false
 				}
 			},
+			{
+				"path": "settleCenter/courseSettleCenter",
+				"style": {
+					"navigationBarTitleText": "结算中心",
+					"enablePullDownRefresh": false
+				}
+			},
 			{
 				"path": "paySuccess/paySuccess",
 				"style": {
@@ -375,6 +383,15 @@
 					"navigationBarTextStyle": "white"
 				}
 			},
+			{
+				"path": "paySuccess/payCourseSuccess",
+				"style": {
+					"navigationBarTitleText": "课程支付成功",
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+				}
+			},
 			{
 				"path": "distribution/distribution",
 				"style": {

+ 2 - 2
pages/article/article.vue

@@ -5,7 +5,7 @@
 </template>
 
 <script>
-import { getNewsRead } from "@/common/api/news.js";
+import {getNewsRead} from "@/common/api/news.js";
 
 export default {
   data() {
@@ -28,7 +28,7 @@ export default {
       };
       getNewsRead({
         id: this.id,
-      }).then(({ data = {} }) => {
+      }).then(({data = {}}) => {
         uni.setNavigationBarTitle({
           title: data.name,
         });

+ 2 - 1
pages/home/index.vue

@@ -623,6 +623,7 @@ export default {
 <style lang="scss" scoped>
 .ps-wrapper {
   background-color: $primary-bg-color;
+  padding-top: 60rpx;
 
   .adv-box {
     position: relative;
@@ -721,7 +722,7 @@ export default {
 
       .logo-search-container {
         position: absolute;
-        top: 12%;
+        top: 8%;
         left: 0;
         width: 100%;
         display: flex;

+ 2 - 2
pages/productCenter/productCenter.vue

@@ -133,7 +133,7 @@
           cateid: this.cateid && this.subCateId ? this.subCateId : this.cateid,
           sort: this.sort,
           sortType: this.sortType,
-          goods_kind: "线上商品",
+          mark: "线上商品",
           page: this.page,
           pageSize: this.pageSize,
           name: this.search,
@@ -173,7 +173,7 @@
         this.bgImg = configs.shop_bgimg
 
         configs.btn_color = configs.btn_color || '#C79C53'
-        getGoodCate({goods_kind:"线上商品"}).then(({
+        getGoodCate({mark:"线上商品"}).then(({
                               data = []
                             }) => {
           // 只取前五个

BIN
static/bottom-home.png


BIN
static/bottom-menu-cert.png


BIN
static/bottom-menu-kf.png


BIN
static/hd-if-b.png


BIN
static/icon_share.png


+ 2 - 1
subPages/activityDetail/activityDetail.vue

@@ -93,7 +93,7 @@
 
     </view>
     <view  class="activity-content-title">
-      活动介绍
+      报名信息
     </view>
     <view   id="activity-content"  ref="activityContent" style="width: 95%;margin: 0 auto;" v-html="activityInfo.content">
     </view>
@@ -528,6 +528,7 @@ export default {
   padding: 20rpx 20rpx 68rpx 20rpx ;
   &-div{
     height: 76rpx;
+    padding-top: 10rpx;
     width: 404rpx;
     // 文字垂直居中
     display: flex;

+ 2 - 1
subPages/activityDetail/activitySave.vue

@@ -22,7 +22,7 @@
 
     </view>
     <view  class="activity-content-title">
-      活动介绍
+      报名信息
     </view>
     <van-cell-group>
       <van-field
@@ -230,6 +230,7 @@ export default {
     font-family: PingFang SC, PingFang SC;
     font-weight: 400;
     font-size: 28rpx;
+    padding-top: 10rpx;
     color: #333333;
     line-height: 40rpx;
     text-align: left;

+ 4 - 4
subPages/course/course.vue

@@ -24,7 +24,7 @@
                       style="display: flex;"
                   />
                 </view>
-                <span style="padding: 0 20rpx">{{item2.remark}}</span>
+                <span style="padding: 0 16rpx">{{item2.remark}}</span>
               </view>
               <view class="course-price" style="position: relative;">
                 <view style="padding-top: 8rpx;width:28rpx;height: 28rpx ">
@@ -36,7 +36,7 @@
                       style="display: flex;"
                   />
                 </view>
-                <span style="padding-left: 20rpx">已报名 &nbsp;{{item2.stock_sales}}</span>
+                <span style="padding-left: 16rpx">已报名 &nbsp;{{item2.stock_sales}}</span>
                 <span style="position: absolute;right:20rpx;font-size: 22rpx;color:#333333;">¥<span style="font-size: 32rpx;font-weight: bold;">{{item2.price_selling}}</span></span>
               </view>
             </view>
@@ -102,7 +102,7 @@ export default {
   watch: {},
   methods: {
     getGoodCate() {
-      getGoodCate({ goods_kind:"课程商品" }).then(({ data }) => {
+      getGoodCate({ mark:"课程商品" }).then(({ data }) => {
         this.courseTypeList = data;
 
       });
@@ -113,7 +113,7 @@ export default {
 
     },
     getGoodList() {
-      getGoodList({ page: this.page, pageSize: this.pageSize, cateid: this.GoodCateId, goods_kind:"课程商品" }).then(({ data }) => {
+      getGoodList({ page: this.page, pageSize: this.pageSize, cateid: this.GoodCateId, mark:"课程商品" }).then(({ data }) => {
         this.courseList =data.list
         console.log(data);
       });

+ 37 - 9
subPages/courseDetail/courseDetail.vue

@@ -20,12 +20,12 @@
                 style="display: flex;"
             />
           </view>
-          <span style="padding: 0 20rpx">{{courseInfo.remark}}</span>
+          <span style="padding: 0 16rpx">{{courseInfo.remark}}</span>
         </view>
         <view class="course-price" style="position: relative;">
           <span style="font-size: 24rpx; color: #C29556;">¥&nbsp;</span><span style="font-size: 36rpx;color: #C29556;">{{courseInfo.price_selling}}</span>
           <view style="position: absolute;right:0rpx;font-size: 22rpx;color:#888888;  display: flex;">
-            <view style="padding-top: 8rpx;width:28rpx;height: 28rpx ">
+            <view style="padding-top: 7rpx;width:28rpx;height: 28rpx ">
               <van-image
                   class="huodongText2-img"
                   height="28rpx"
@@ -75,7 +75,7 @@
                    open-type="contact" ></button>
         </view>
       </view>
-      <button  class="course-button" @click="handleRegister">立即报名</button>
+      <button  class="course-button" @click="handleRegister">报名学习</button>
     </view>
   </view>
 
@@ -103,6 +103,7 @@ export default {
       entry_max:0,
       entry_balance:0,
       is_entry:false,
+      suitNum:1,
     };
   },
 
@@ -150,12 +151,38 @@ export default {
       });
     },
     handleRegister() {
-      Toast('敬请期待');
-      // if (this.is_entry){
-      //   Toast.fail('您已报名,请勿重复报名');
-      //   return
-      // }
-      // uni.navigateTo({url: `/subPages/courseDetail/courseSave?goods_code=${ this.goods_code}`,})
+      // Toast('敬请期待');
+      let tempList = this.courseInfo.data_specs[0].list
+      tempList = tempList.map(item => {
+        return {
+          group_name: item.group,
+          spec_name: item.name
+        }
+      })
+      let specText = tempList.map(item => {
+        return `${item.group_name}::${item.spec_name}`
+      })
+
+      // 准备发送的数据结构,包含商品代码、套件数量和规格文本
+      const sendData = {
+        items: [{
+          code: this.courseInfo.code, // 商品代码
+          count: this.suitNum, // 套件数量
+          // 将规格文本数组用“;;”连接成单个字符串
+          spec: specText.join(';;')
+        }]
+      }
+      // 调用API创建订单
+      this.$api.createOrder(sendData).then(res => {
+        // 成功创建订单后,显示成功提示
+        uni.showToast({
+          title: '订单创建成功'
+        })
+        // 导航到结算中心页面,并传递订单号作为查询参数
+        uni.navigateTo({
+          url: `/subPages/settleCenter/courseSettleCenter?orderNo=${res.data.order_no}`
+        })
+      })
     },
     getCourseDetail() {
       getGoodsDetail({goods_code: this.goods_code}).then(({data}) => {
@@ -336,6 +363,7 @@ export default {
   &-div{
     height: 76rpx;
     width: 404rpx;
+    padding-top: 10rpx;
     // 文字垂直居中
     display: flex;
     align-items: center;

+ 1050 - 914
subPages/goodsDetail/goodsDetail.vue

@@ -1,922 +1,1058 @@
 <template>
-	<view class="goods-detail-wrapper">
-		<u-swiper :list="detailData.slider" keyName="url"
-			:indicatorStyle="{right: '20rpx', bottom: '20rpx', width: '100px',marginLeft: 'auto'}" indicator
-			indicatorMode="number" height="100vw" imgMode="aspectFit">
-		</u-swiper>
-		<view class="content-box">
-			<!-- 详情 -->
-			<view class="common-card">
-				<view class="fw700 title">{{detailData.goods_name}}</view>
-				<view class="fs12 sub-title">{{detailData.remark}}</view>
-				<view class="display-flex-between mb10">
-					<view>
-						<text
-							class="fs16 color-red fw600 mr10">¥{{goodsType == 'msGoods' ? detailData.price_seckill : detailData.price_selling}}</text>
-						<text class="text-through fs12 color-ca">¥{{detailData.price_market}}</text>
-					</view>
-					<view class="display-flex-center">
-						<view class="display-flex-center" @click="showPoster = true" style="margin-right: 20rpx;flex:1">
-							<image style="width: 40rpx;height: 40rpx;" src="/static/icon_share.png" mode="aspectFill">
-							</image>
-						</view>
-						<u-icon @click="collectHandler" name="star" size="26"
-							:color="goodsCollected ? '#F39800' : '#717171’'"></u-icon>
-					</view>
-				</view>
-				<view class="display-flex-center">
-					<view class="tag-red mb5 mr5" v-if="detailData.limit_money">满额赠品(满{{detailData.limit_money}}元赠)
-					</view>
-					<view v-for="(item, index) in freeData" :key="index" class="tag-red mb5 mr5">{{item.sNum}}件包邮</view>
-				</view>
-				<view class="color-71">销量:{{detailData.stock_sales+detailData.stock_virtual}}件</view>
-
-				<!-- <view  class="display-flex-between color-71">
-					<view class="display-flex-center" @click="showPoster = true">
-						<image style="width: 30rpx;height: 30rpx;" src="/static/icon_share.png" mode="aspectFill">
-						</image>
-						<text class="ml5">分享</text>
-					</view>
-					<view>
-						<view class="display-flex-center" @click="collectHandler">
-							<u-icon name="star" size="22" :color="goodsCollected ? '#F39800' : '#717171’'"></u-icon>
-							<text class="ml5">收藏</text>
-						</view>
-					</view>
-				</view> -->
-			</view>
-			<!-- 运费 -->
-			<view v-if="detailData.truck_type == 1" class="common-card display-flex-between display-flex-center">
-				<view>
-					<text class="mr10">运费</text>
-					<text>¥{{truckData.firstAmt || 0}}</text>
-				</view>
-				<!-- <view class="color-7a fs13">已售1 | 剩余150</view> -->
-				<!-- <u1-icon name="arrow-right" color="#3A3A3A"></u1-icon> -->
-			</view>
-			<!-- 套装 -->
-			<view @click="suitHandler" class="common-card display-flex-between display-flex-center">
-				<view>
-					<text class="mr10">已选</text>
-					<text>{{selectSuitDisplay}}</text>
-				</view>
-				<u1-icon name="arrow-right" color="#3A3A3A"></u1-icon>
-			</view>
-			<!-- 参数 -->
-			<view class="common-card" style="padding: 0;">
-				<u-sticky zIndex="90">
-					<view style="background-color: #fff;">
-						<u-tabs lineColor="#F39800" :list="detailList" @click="detailClick"></u-tabs>
-					</view>
-				</u-sticky>
-				<view style="padding: 40rpx 40rpx;">
-					<view class="mb5 display-flex-center fw600" id="detail_0">
-						<image src="/static/good_detail1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
-							mode=""></image>
-						<text>商品详情</text>
-					</view>
-					<u-parse :content="detailData.content"></u-parse>
-					<view id="detail_1" class="mb5 mt10 display-flex-center fw600">
-						<image src="/static/good_detail2.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
-							mode=""></image>
-						<text>商品规格</text>
-					</view>
-					<u-parse :content="detailData.info"></u-parse>
-					<view class="mb5 mt10  display-flex-center fw600" id="detail_2">
-						<image src="/static/good_detail3.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
-							mode=""></image>
-						<text>售后保障</text>
-					</view>
-					<u-parse :content="sell_serv"></u-parse>
-				</view>
-			</view>
-		</view>
-		<view class="bottom-part">
-			<view class="bar-list">
-				<template v-for="(item, index) in barList">
-					<view v-if="item.text=='购物车' && goodsType != 'msGoods' || item.text != '购物车'" :key="index"
-						class="bar-list-icon" @click="toJump(item, index)">
-						<image style="width: 45rpx;height: 45rpx;" :src="item.iconUrl" mode="aspectFill"></image>
-						<view>{{item.text}}</view>
-						<u-badge v-if="item.text=='购物车'" :absolute="true" :offset="[-5,-10]" :value="cartNumber">
-						</u-badge>
-						<button style="position: absolute;width: 100%;height: 100%;z-index: 999;opacity: 0;top:0"
-							v-if="item.text == '客服'" open-type="contact"></button>
-					</view>
-				</template>
-			</view>
-			<view class="common-btn common-btn-border ml10" :style="{color:`${btn_color ? btn_color : null}`}"
-				@click="toAddCert" v-if="['common', 'gift'].includes(goodsType)">加入购物车</view>
-			<view class="common-btn ml10" v-if="goodsType !='gift'"
-				:style="{background:`${btn_color ? btn_color : null}`,border:`none`,width: !(['common', 'gift'].includes(goodsType)) ? '360rpx' : null}"
-				@click="toApply">立即购买</view>
-		</view>
-		<u-toast ref="createPosterLoading"></u-toast>
-		<u-overlay :show="showPoster" :mask-click-able="false">
-			<view class="poster-wrap">
-				<image :src="posterImgSrc" mode="widthFix"></image>
-			</view>
-			<view class="poster-box">
-				<view class="poster-btn">
-					<view class="poster-btn-left">
-						<image style="height: 26px;width 26px;" src="@/static/icon-wechat.png" mode="heightFix" />
-						<view>分享好友</view>
-						<u-button open-type="share"
-							customStyle="position: absolute;top:0;bottom:0;left:0;right:0;opacity: 0;">
-						</u-button>
-					</view>
-					<view class="poster-btn-right" @click="downloadPoster">
-						<u-icon name="download" color="#815BFF" size="36"></u-icon>
-						<view>保存海报</view>
-					</view>
-				</view>
-				<view class="cancel-btn" @click="showPoster = false">取消</view>
-			</view>
-		</u-overlay>
-		<!-- 海报生成器 -->
-		<l-painter ref="painter" isCanvasToTempFilePath @success="posterImgSrc = $event"
-			css="width: 750rpx; background: #fff;padding: 20rpx" v-if="detailData.goods_name" hidden>
-			<l-painter-image :src="`${imageUrl}home_logo.png`" css="display: block; width: 100%; height: 146rpx;" />
-			<l-painter-view css="display: block; padding: 43rpx 0 22rpx 0;">
-				<l-painter-text :text="detailData.goods_name"
-					css=" color: #1D161F; font-size: 36rpx; fontWeight: 500; line-height: 42rpx;" />
-			</l-painter-view>
-			<l-painter-view css="position: relative; height: 580rpx;">
-				<l-painter-image :src="detailData.cover" css="object-fit: contain; width: 100%; height: 100%;" />
-			</l-painter-view>
-
-			<l-painter-view
-				css="display: flex; align-items: center; justify-content: space-between; padding-top: 38rpx;">
-				<l-painter-view css="flex: 1;">
-					<l-painter-view>
-						<l-painter-text css="font-size: 32rpx; font-weight: 500; color: #858585; line-height: 38rpx;"
-							text="售价:"></l-painter-text>
-						<l-painter-text css="font-size: 32rpx; font-weight: 500; color: #7B52C8; line-height: 38rpx;"
-							:text="`¥${detailData.price_selling}`"></l-painter-text>
-					</l-painter-view>
-					<l-painter-view css="margin-top: 11rpx;">
-						<l-painter-text
-							css="display: block; font-size: 28rpx; font-weight: 500; color: #858585; line-height: 33rpx;"
-							text="长按小程序码参与"></l-painter-text>
-					</l-painter-view>
-				</l-painter-view>
-				<l-painter-image :src="erCodeImg" css="width: 200rpx; height: 200rpx;" />
-			</l-painter-view>
-		</l-painter>
-		<!-- 选套装 -->
-		<u-popup :show="show" mode="bottom" :safeAreaInsetTop="true" round="10" closeable @close="close" @open="open">
-			<view class="suit-content">
-				<view class="display-flex-center mr20 mb30 mt15">
-					<u--image :src="detailData.cover" width="130rpx" height="130rpx" mode="widthFix"></u--image>
-					<view class="ml10">
-						<view v-if="pageOptions.type == 'msGoods'">
-							售价 <text class="fs16 color-orange fw600 mr20">¥{{detailData.price_seckill}}</text>
-						</view>
-						<view v-else>
-							售价 <text class="fs16 color-orange fw600 mr20">¥{{detailData.price_selling}}</text>
-						</view>
-						<view class="color-7a mt5">已选 {{selectSuitDisplay}}</view>
-					</view>
-				</view>
-				<!-- 普通商品规格 -->
-				<template v-if="pageOptions.type == 'common'">
-					<view class="mb30" v-for="(item, pIndex) in goodsSpecData" :key="pIndex">
-						<view class="fw700 mb15">{{item.name}}</view>
-						<view class="suit-btn-box">
-							<view class="suit-btn" @click="suitChange(suit, item)" :key="index"
-								:class="[suit.isChecked ? 'suit-btn-active' : '']" v-for="(suit, index) in item.list">
-								{{suit.name}}
-							</view>
-						</view>
-					</view>
-				</template>
-				<!-- 秒杀商品规格 -->
-				<template v-else>
-					<view class="suit-btn-box">
-						<view class="suit-btn suit-btn-column" @click="suitChange(suit, item)" :key="index"
-							:class="[suit.isChecked ? 'suit-btn-active' : '', suit.disabled ? 'suit-btn-disabled' : '']"
-							v-for="(suit, index) in goodsSpecData">
-							{{suit.spec}}
-						</view>
-					</view>
-				</template>
-				<view class="mb30" v-if="pageOptions.type == 'msGoods'">
-					<view class="fw700 mb20">数量</view>
-					<view class="display-flex-center">
-						<u-number-box :min="1" integer :max="totalDetailData.max_buy" v-model="suitNum"></u-number-box>
-						<text class="color-red ml10">每人限购{{totalDetailData.max_buy}}件</text>
-					</view>
-				</view>
-				<view class="mb30" v-else>
-					<view class="fw700 mb20">数量</view>
-					<u-number-box :min="1" integer v-model="suitNum"></u-number-box>
-				</view>
-				<view class="mb30">
-					小计: <text class="color-orange fw700 ml5 fs15">¥{{(goodSuitPriceData.price || 0) * suitNum}}</text>
-				</view>
-				<view class="common-btn" @click="submit">提交</view>
-			</view>
-		</u-popup>
-
-		<login-pop v-model="showUserRegister" @updateUserInfo="reUserInfo"></login-pop>
-	</view>
+  <view class="goods-detail-wrapper">
+    <!--    <view @click="toHome" class="to-home-img">-->
+    <!--      <u-icon size="24rpx" name="arrow-left" bold="true" color="#666666"></u-icon>-->
+    <!--    </view>-->
+    <u-swiper :list="detailData.slider" keyName="url"
+              :indicatorStyle="{right: '20rpx', bottom: '20rpx', width: '100px',marginLeft: 'auto'}" indicator
+              indicatorMode="number" height="100vw" imgMode="aspectFit">
+    </u-swiper>
+    <view class="content-box">
+      <!-- 详情 -->
+      <view class="common-card">
+        <view class="display-flex-between ">
+          <text class="fw700 title">
+            {{ detailData.goods_name }}
+          </text>
+          <view class="display-flex-center">
+            <view @click="collectHandler" style="display: flex;flex-direction: column;  align-items: center;">
+              <u-icon name="heart" size="50rpx"
+                      :color="goodsCollected ? '#F39800' : '#717171’'"></u-icon>
+              <text class="fenxiang">
+                收藏
+              </text>
+            </view>
+            <view @click="showPoster = true"
+                  style="margin-left: 30rpx;flex:1;display: flex;flex-direction: column;  align-items: center;">
+              <image style="width: 36rpx;height: 36rpx;margin: 8rpx 0" src="/static/fenxiang.png" mode="aspectFill">
+              </image>
+              <text class="fenxiang">
+                分享
+              </text>
+            </view>
+          </view>
+        </view>
+        <view class="fs12 sub-title">{{ detailData.remark }}</view>
+        <view class="display-flex-between">
+          <view>
+            <text class="fs12 fw400 color-556">
+              ¥
+            </text>
+            <text
+                class="fs20 color-556 fw700">
+              {{ goodsType == 'msGoods' ? detailData.price_seckill : detailData.price_selling }}
+            </text>
+          </view>
+        </view>
+        <view class="display-flex-between">
+          <view>
+            <text class="text-through fs12 color-666">¥{{ detailData.price_market }}</text>
+          </view>
+          <view class="fs12 color-666">销量:{{ detailData.stock_sales + detailData.stock_virtual }}件</view>
+        </view>
+        <!--				<view class="display-flex-center">-->
+        <!--					<view class="tag-red mb5 mr5" v-if="detailData.limit_money">满额赠品(满{{detailData.limit_money}}元赠)-->
+        <!--					</view>-->
+        <!--					<view v-for="(item, index) in freeData" :key="index" class="tag-red mb5 mr5">{{item.sNum}}件包邮</view>-->
+        <!--				</view>-->
+
+      </view>
+      <!-- 运费 -->
+      <view v-if="detailData.truck_type == 1" class="common-card  ">
+        <view class="display-flex-between display-flex-center">
+          <view>
+            <text class="mr10 color-777 fs14">运费</text>
+            <text class="color-333 fs14">¥{{ truckData.firstAmt || 0 }}</text>
+          </view>
+          <view class="color-777 fs14">已售 {{ detailData.stock_sales + detailData.stock_virtual }} | 剩余 {{ detailData.stock_total }}</view>
+        </view>
+        <u-divider></u-divider>
+        <view @click="suitHandler" class=" display-flex-between display-flex-center">
+          <view>
+            <text class="mr10 color-777 fs14 ">已选</text>
+            <text class="color-333 fs14">{{ selectSuitDisplay }}</text>
+          </view>
+          <u1-icon name="arrow-right" color="#3A3A3A"></u1-icon>
+        </view>
+        <!--				 <view class="color-7a fs13">已售1 | 剩余150</view> -->
+        <!-- <u1-icon name="arrow-right" color="#3A3A3A"></u1-icon> -->
+      </view>
+
+      <!-- 参数 -->
+      <view class="common-card" style="padding: 0;">
+        <u-sticky zIndex="90">
+          <view style="background-color: #fff;">
+            <u-tabs lineColor="#C29556 " line-width="36" lineHeight="3" :inactiveStyle="{
+                      fontWeight: '400',
+              fontSize: '24rpx',
+              color: '#333333',
+              lineHeight: '40rpx'
+						}" :activeStyle="{
+              fontWeight: '400',
+              fontSize: '28rpx',
+              color: '#333333',
+              lineHeight: '40rpx'
+}" :list="detailList" @click="detailClick"></u-tabs>
+          </view>
+        </u-sticky>
+        <view style="padding: 40rpx 40rpx;">
+          <view class="mb5 display-flex-center fw600" id="detail_0">
+            <image src="/static/good_detail1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
+                   mode=""></image>
+            <text>商品详情</text>
+          </view>
+          <u-parse :content="detailData.content"></u-parse>
+          <view id="detail_1" class="mb5 mt10 display-flex-center fw600">
+            <image src="/static/good_detail2.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
+                   mode=""></image>
+            <text>商品规格</text>
+          </view>
+          <u-parse :content="detailData.info"></u-parse>
+          <view class="mb5 mt10  display-flex-center fw600" id="detail_2">
+            <image src="/static/good_detail3.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
+                   mode=""></image>
+            <text>售后保障</text>
+          </view>
+          <u-parse :content="sell_serv"></u-parse>
+        </view>
+      </view>
+    </view>
+    <view class="bottom-navigation">
+      <view class="bottom-navigation-div">
+        <view  style="width: 40rpx;margin-right: 30rpx"   @click="toJump( 1)" >
+          <van-image
+              height="36rpx"
+              src="/static/hd-icon-a.png"
+              width="36rpx"
+              style="display: flex;align-items: center;  justify-content: center;"
+          />
+          <span>
+        首页
+      </span>
+        </view>
+        <view  style="width: 40rpx;position:relative;margin-right: 30rpx"  open-type="contact">
+          <van-image
+              height="36rpx"
+              src="/static/hd-icon-c.png"
+              width="36rpx"
+              style="display: flex;align-items: center;  justify-content: center;"
+          />
+          <span>
+          客服
+      </span>
+          <button style="position: absolute;width: 100%;height: 100%;z-index: 999;opacity: 0;top:0;"
+                  open-type="contact" ></button>
+        </view>
+        <view style="width: 60rpx;margin-right: 30rpx;position:relative;" @click="toJump( 3)" >
+          <van-image
+              height="36rpx"
+              src="/static/bottom-menu-cert.png"
+              width="36rpx"
+              style="display: flex;align-items: center;  justify-content: center;"
+          />
+          <u-badge  :absolute="true" bgColor="#CA9359" :offset="[-5,-5]" :value="cartNumber">
+          </u-badge>
+          <span>
+         购物车
+      </span>
+        </view>
+
+      </view>
+      <button  class="add-cart-button" @click="toAddCert">加入购物车</button>
+      <button  class="submit-order-button" @click="toApply">提交订单</button>
+    </view>
+    <u-toast ref="createPosterLoading"></u-toast>
+    <u-overlay :show="showPoster" :mask-click-able="false">
+      <view class="poster-wrap">
+        <image :src="posterImgSrc" mode="widthFix"></image>
+      </view>
+      <view class="poster-box">
+        <view class="poster-btn">
+          <view class="poster-btn-left">
+            <image style="height: 26px;width 26px;" src="@/static/icon-wechat.png" mode="heightFix"/>
+            <view>分享好友</view>
+            <u-button open-type="share"
+                      customStyle="position: absolute;top:0;bottom:0;left:0;right:0;opacity: 0;">
+            </u-button>
+          </view>
+          <view class="poster-btn-right" @click="downloadPoster">
+            <u-icon name="download" color="#815BFF" size="36"></u-icon>
+            <view>保存海报</view>
+          </view>
+        </view>
+        <view class="cancel-btn" @click="showPoster = false">取消</view>
+      </view>
+    </u-overlay>
+    <!-- 海报生成器 -->
+    <l-painter ref="painter" isCanvasToTempFilePath @success="posterImgSrc = $event"
+               css="width: 750rpx; background: #fff;padding: 20rpx" v-if="detailData.goods_name" hidden>
+      <l-painter-image :src="`${imageUrl}home_logo.png`" css="display: block; width: 100%; height: 146rpx;"/>
+      <l-painter-view css="display: block; padding: 43rpx 0 22rpx 0;">
+        <l-painter-text :text="detailData.goods_name"
+                        css=" color: #1D161F; font-size: 36rpx; fontWeight: 500; line-height: 42rpx;"/>
+      </l-painter-view>
+      <l-painter-view css="position: relative; height: 580rpx;">
+        <l-painter-image :src="detailData.cover" css="object-fit: contain; width: 100%; height: 100%;"/>
+      </l-painter-view>
+
+      <l-painter-view
+          css="display: flex; align-items: center; justify-content: space-between; padding-top: 38rpx;">
+        <l-painter-view css="flex: 1;">
+          <l-painter-view>
+            <l-painter-text css="font-size: 32rpx; font-weight: 500; color: #858585; line-height: 38rpx;"
+                            text="售价:"></l-painter-text>
+            <l-painter-text css="font-size: 32rpx; font-weight: 500; color: #7B52C8; line-height: 38rpx;"
+                            :text="`¥${detailData.price_selling}`"></l-painter-text>
+          </l-painter-view>
+          <l-painter-view css="margin-top: 11rpx;">
+            <l-painter-text
+                css="display: block; font-size: 28rpx; font-weight: 500; color: #858585; line-height: 33rpx;"
+                text="长按小程序码参与"></l-painter-text>
+          </l-painter-view>
+        </l-painter-view>
+        <l-painter-image :src="erCodeImg" css="width: 200rpx; height: 200rpx;"/>
+      </l-painter-view>
+    </l-painter>
+    <!-- 选套装 -->
+    <u-popup :show="show" mode="bottom" :safeAreaInsetTop="true" round="10" closeable @close="close" @open="open">
+      <view class="suit-content">
+        <view class="display-flex-center mr20 mb30 mt15">
+          <u--image :src="detailData.cover" width="130rpx" height="130rpx" mode="widthFix"></u--image>
+          <view class="ml10">
+            <view v-if="pageOptions.type == 'msGoods'">
+              售价
+              <text class="fs16 color-orange fw600 mr20">¥{{ (goodSuitPriceData.price || 0) * suitNum }}</text>
+            </view>
+            <view v-else>
+              售价
+              <text class="fs16 color-orange fw600 mr20">¥{{ (goodSuitPriceData.price || 0) * suitNum }}</text>
+            </view>
+            <view class="color-7a mt5">已选 {{ selectSuitDisplay }}</view>
+          </view>
+        </view>
+        <!-- 普通商品规格 -->
+        <template v-if="pageOptions.type == 'common'">
+          <view  v-for="(item, pIndex) in goodsSpecData" :key="pIndex">
+            <view class="fw700 mb10">{{ item.name }}</view>
+            <view class="suit-btn-box">
+              <view class="suit-btn" @click="suitChange(suit, item)" :key="index"
+                    :class="[suit.isChecked ? 'suit-btn-active' : '']" v-for="(suit, index) in item.list">
+                {{ suit.name }}
+              </view>
+            </view>
+          </view>
+        </template>
+        <!-- 秒杀商品规格 -->
+        <template v-else>
+          <view class="suit-btn-box">
+            <view class="suit-btn suit-btn-column" @click="suitChange(suit, item)" :key="index"
+                  :class="[suit.isChecked ? 'suit-btn-active' : '', suit.disabled ? 'suit-btn-disabled' : '']"
+                  v-for="(suit, index) in goodsSpecData">
+              {{ suit.spec }}
+            </view>
+          </view>
+        </template>
+        <view class="common-btn" @click="submit">提交</view>
+      </view>
+    </u-popup>
+
+    <login-pop v-model="showUserRegister" @updateUserInfo="reUserInfo"></login-pop>
+  </view>
 </template>
 
 <script>
-	import LoginPop from '@/components/LoginPop.vue'
-	import {
-		makeErCode
-	} from "@/common/api/task.js";
-	import {
-		getGoodsDetail,
-		getGiftGoodsDetail,
-		getMsGoodsDetail,
-		getPointsGoodsDetail,
-		msGoodsCreateOrder,
-		giftAddCart,
-		addCollect,
-		delCollect,
-		checkCollect
-	} from '@/common/api/good.js'
-	export default {
-		components: {
-			LoginPop
-		},
-		data() {
-			return {
-				erCodeImg: '',
-				pageOptions: {},
-				totalDetailData: {},
-				selectSuitData: {},
-				currentSuitIndex: 0,
-				suitNum: 1,
-				show: false,
-				freeData: [],
-				imageUrl: this.$C.imageUrl,
-				detailList: [{
-					name: '商品详情'
-				}, {
-					name: '商品规格'
-				}, {
-					name: '售后保障'
-				}],
-				barList: [{
-						text: '首页',
-						iconUrl: `/static/bottom-home.png`,
-						url: '/pages/home/index'
-					},
-					{
-						text: '客服',
-						iconUrl: `/static/bottom-menu-kf.png`
-					},
-					{
-						text: '购物车',
-						iconUrl: `/static/bottom-menu-cert.png`,
-						url: '/pages/shoppingCart/shoppingCart',
-						isVip: true
-					},
-				],
-				currentNum: 0,
-				detailData: {},
-				goodsSpecData: [],
-				truckData: {},
-				showPoster: false,
-				posterImgSrc: "",
-				selectedSuitPriceData: [],
-				goodSuitPriceData: {
-					price: 0
-				},
-				goodsType: 'common',
-				currentOperateType: '', // 1:购物车,2:立即购买
-				cartNumber: 0,
-				sell_serv: '',
-				isUserRegister: false,
-				showUserRegister: false,
-				goodsCollected: false,
-				btn_color: null,
-			}
-		},
-		computed: {
-			beUsedCode() {
-				return this.detailData.code
-			},
-			selectSuitDisplay() {
-				console.log(2333, this.selectedSuitPriceData)
-				if (this.goodsType == 'common') {
-					let tempData = this.selectedSuitPriceData.map(item => {
-						return `${item.group_name}:${item.spec_name}`
-					})
-					return tempData.join(',')
-				} else if (this.goodsType == 'gift') {
-					return this.detailData.goods_spec
-				} else {
-					return this.goodSuitPriceData.goods_spec
-				}
-			},
-			currentTypeApi() {
-				let result = {
-					detailApi: getGoodsDetail,
-					params: {
-						goods_code: this.pageOptions.code
-					}
-				}
-				switch (this.pageOptions.type) {
-					case 'gift':
-						result.detailApi = getGiftGoodsDetail
-						break;
-					case 'points':
-						result.detailApi = getPointsGoodsDetail
-						break;
-					case 'msGoods':
-						result = {
-							detailApi: getMsGoodsDetail,
-							params: {
-								id: this.pageOptions.code
-							}
-						}
-						break;
-					default:
-						break;
-
-				}
-				return result
-			}
-		},
-		onLoad(options) {
-			console.log("optionssuboacge==", options)
-			this.pageOptions = options
-			this.goodsType = options.type
-			this.getAfterSalePage()
-			this.maekErImg(options.code)
-			const configs = uni.getStorageSync('configs')
-			if (configs) {
-				this.btn_color = configs.btn_color
-			}
-			this.$nextTick(() => {
-				this.getDetail()
-				this.getCartNumber()
-			})
-		},
-		onShow() {
-			this.reUserInfo()
-		},
-		onShareAppMessage(res) {
-			if (res.from === 'button') { // 来自页面内分享按钮
-				console.log(res.target)
-			}
-			let userInfo = uni.getStorageSync('userInfo')
-			userInfo = userInfo && JSON.parse(userInfo) || {}
-			if (userInfo.id) {
-				this.pageOptions.id = userInfo.id
-			}
-			return {
-				title: this.detailData.goods_name,
-				path: `/subPages/goodsDetail/goodsDetail${this.$stringPageOptions(this.pageOptions)}`
-			}
-		},
-		onShareTimeline() {
-			let userInfo = uni.getStorageSync('userInfo')
-			userInfo = userInfo && JSON.parse(userInfo) || {}
-			const posterImage = this.detailData.video && this.detailData.slider.length > 1 ? this.detailData.slider[1]
-				.url : this.detailData.slider[0].url
-			if (userInfo.id) {
-				this.pageOptions.id = userInfo.id
-			}
-			return {
-				title: this.detailData.goods_name,
-				path: `/subPages/goodsDetail/goodsDetail${this.$stringPageOptions(this.pageOptions)}`,
-				imageUrl: posterImage
-			}
-		},
-		watch: {
-			goodsSpecData: {
-				handler(nv) {
-					console.log(9999, nv)
-					let priceSuit = []
-					if (this.goodsType == 'common') {
-						nv.forEach(pItem => {
-							let tempList = pItem.list.filter(item => item.isChecked)
-							tempList = tempList.map(item => {
-								return {
-									group_name: item.group,
-									spec_name: item.name
-								}
-							})
-							priceSuit = priceSuit.concat(tempList)
-						})
-						this.selectedSuitPriceData = priceSuit
-						this.getSuitPrice()
-					} else if (this.goodsType == 'msGoods') {
-						const checkedData = nv.find(item => item.isChecked)
-						this.goodSuitPriceData = {
-							price: checkedData.price_seckill,
-							goods_spec: checkedData.goods_spec,
-							sku_id: checkedData.id,
-						}
-					}
-				},
-				deep: true
-			}
-		},
-		methods: {
-			checkCollect() {
-				checkCollect({
-					code: this.detailData.code
-				}).then(res => {
-					this.goodsCollected = !!(res.data && res.data.id)
-					console.log(this.goodsCollected)
-				})
-			},
-			collectHandler() {
-				if (!this.isUserRegister) {
-					this.showUserRegister = true
-					return
-				}
-				if (this.goodsCollected) {
-					// 取消收藏
-					delCollect({
-						code: this.detailData.code
-					}).then(res => {
-						this.goodsCollected = false
-						uni.showToast({
-							title: '取消收藏'
-						})
-					})
-				} else {
-					// 收藏
-					addCollect({
-						code: this.detailData.code
-					}).then(res => {
-						this.goodsCollected = true
-						uni.showToast({
-							title: '收藏成功'
-						})
-					})
-				}
-			},
-			detailClick(item) {
-				console.log(item.index)
-				uni.pageScrollTo({
-					selector: `#detail_${item.index}`
-				})
-			},
-			reUserInfo() {
-				const userInfo = uni.getStorageSync("userInfo");
-				if (
-					userInfo &&
-					JSON.parse(userInfo).vip_code == 1 &&
-					JSON.parse(userInfo).nickname != "" &&
-					JSON.parse(userInfo).headimg != ""
-				) {
-					this.isUserRegister = true;
-				} else {
-					this.isUserRegister = false;
-				}
-			},
-			getAfterSalePage() {
-				this.$api.getData({
-					id: 4
-				}).then(res => {
-					this.sell_serv = res.data.content
-				})
-			},
-			suitHandler() {
-				this.currentOperateType = ''
-				if (this.goodsType != 'gift') {
-					this.show = true
-				}
-			},
-			getCartNumber() {
-				this.$api.getCartNumber().then(res => {
-					this.cartNumber = res.data.cart_num
-				})
-			},
-			getSuitPrice() {
-				this.$api.getPriceBySuit({
-					goods_code: this.pageOptions.code,
-					spec: this.selectedSuitPriceData
-				}).then(res => {
-					this.goodSuitPriceData = res.data
-				})
-			},
-			toAddCert() {
-				// 加入购物车
-				if (!this.isUserRegister) {
-					this.showUserRegister = true
-					return
-				}
-				if (this.goodsType == 'gift') {
-					giftAddCart({
-						code: this.detailData.code
-					}).then(res => {
-						uni.showToast({
-							title: '已加入购物车'
-						})
-						this.getCartNumber()
-					})
-				} else {
-					this.currentOperateType = 1
-					this.show = true
-				}
-			},
-			maekErImg(code) {
-				let that = this;
-				const data = {
-					path: '/subPages/goodsDetail/goodsDetail?code=' + code,
-					type: 'file'
-					// ['api-name']: 'wxapp',
-					// ['api-token']: uni.getStorageSync(`token`)
-				}
-				this.$api.getQRCode(data).then(res => {
-					console.log("base64==", res.data.base64)
-					this.erCodeImg = res.data.url
-				})
-			},
-			downloadPoster() {
-				// console.log(222, this.posterImgSrc)
-				// uni.saveImageToPhotosAlbum({
-				// 	filePath: this.posterImgSrc,
-				// 	complete:() => {
-				// 		this.showPoster = false
-				// 	}
-				// })
-				let _this = this
-				this.$refs.painter.canvasToTempFilePathSync({
-					fileType: "jpg",
-					// 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
-					pathType: 'url',
-					quality: 1,
-					success: (res) => {
-						console.log(res.tempFilePath);
-						// 非H5 保存到相册
-						// H5 提示用户长按图另存
-						uni.saveImageToPhotosAlbum({
-							filePath: res.tempFilePath,
-							success: function() {
-								uni.showToast({
-									title: '保存成功'
-								})
-								_this.showPoster = false
-							}
-						});
-					},
-				})
-			},
-			handlePoster(showPoster) {
-				if (showPoster) {
-					this.$refs.createPosterLoading.show({
-						type: 'loading',
-						message: "海报生成中...",
-						duration: 1000,
-						complete: () => {
-							this.showPoster = showPoster;
-						}
-					})
-					return
-				}
-				this.showPoster = showPoster;
-				// uni.showLoading({
-				// 	title: '海报生成中...',
-
-				// })
-				// setTimeout(function () {
-				// 	uni.hideLoading();
-				// 	this.showPoster = true;
-				// }, 1000);
-
-			},
-			suitChange(item, pItem) {
-				if (item.disabled) return
-				if (this.goodsType == 'common') {
-					pItem.list.forEach(spec => [
-						spec.isChecked = false
-					])
-				} else {
-					this.goodsSpecData.forEach(spec => {
-						spec.isChecked = false
-					})
-				}
-				item.isChecked = true
-				// this.selectSuitData = item
-				// this.currentSuitIndex = index
-			},
-			close() {
-				this.show = false
-			},
-			open() {},
-			getDetail() {
-				this.currentTypeApi.detailApi(this.currentTypeApi.params).then(res => {
-					const {
-						goods = {}, items = [], truck = {}
-					} = res.data
-					this.totalDetailData = res.data
-					// this.sell_serv = res.data.sell_serv
-					this.detailData = goods
-					console.log(res.data.free)
-					this.freeData = res.data.free || []
-					this.truckData = truck.content && truck.content.length ? truck.content[0].rule : {}
-					this.selectSuitData = items || []
-					let data_specs = []
-					if (this.goodsType == 'common') {
-						data_specs = this.detailData.data_specs
-						if (Array.isArray(data_specs)) {
-							data_specs.forEach(pItem => {
-								pItem.list = pItem.list.map((item, index) => {
-									if (index === 0) {
-										this.$set(item, 'isChecked', true)
-									} else {
-										this.$set(item, 'isChecked', false)
-									}
-									return item
-								})
-							})
-						}
-					} else if (this.goodsType == 'msGoods') {
-						data_specs = res.data.items
-						this.detailData.price_seckill = res.data.price_seckill
-						if (Array.isArray(data_specs)) {
-							data_specs.forEach((pItem, index) => {
-								const {
-									status,
-									stock_sale,
-									stock
-								} = pItem
-
-								if (index === 0) {
-									this.$set(pItem, 'isChecked', true)
-								} else {
-									this.$set(pItem, 'isChecked', false)
-								}
-								this.$set(pItem, 'disabled', !(status == 1 && stock_sale < stock))
-							})
-						}
-					}
-					this.goodsSpecData = data_specs
-					console.log(99999, this.detailData)
-					this.detailData.slider = this.detailData.slider.map(item => {
-						return {
-							url: item
-						}
-					})
-					if (this.detailData.video) {
-						this.detailData.slider.unshift({
-							url: this.detailData.video
-						})
-					}
-					this.checkCollect()
-				}).catch(() => {
-					uni.hideLoading()
-				})
-			},
-			submit() {
-				// console.log(2345, ths.selectSuitData)
-				if (!this.isUserRegister) {
-					this.showUserRegister = true
-					return
-				}
-				if (this.currentOperateType === 1) {
-					// 添加购物车
-					this.$api.addToShoppingCart({
-						sku_id: this.goodSuitPriceData.sku_id,
-						num: this.suitNum
-					}).then(res => {
-						this.show = false
-						uni.showToast({
-							title: '已加入购物车'
-						})
-						this.getCartNumber()
-					})
-				} else if (this.currentOperateType === 2) {
-					// this.show = false
-					if (this.goodsType == 'common') {
-						let specText = this.selectedSuitPriceData.map(item => {
-							return `${item.group_name}::${item.spec_name}`
-						})
-						const sendData = {
-							items: [{
-								code: this.pageOptions.code,
-								count: this.suitNum,
-								spec: specText.join(';;')
-							}]
-						}
-						this.$api.createOrder(sendData).then(res => {
-							uni.showToast({
-								title: '订单创建成功'
-							})
-							uni.navigateTo({
-								url: `/subPages/settleCenter/settleCenter?orderNo=${res.data.order_no}`
-							})
-						})
-					} else {
-						// 秒杀下单
-						const sendData = {
-							sk_goods_id: this.pageOptions.code,
-							goods_spec: this.goodSuitPriceData.goods_spec,
-							num: this.suitNum
-						}
-						msGoodsCreateOrder(sendData).then(res => {
-							uni.showToast({
-								title: '订单创建成功'
-							})
-							uni.navigateTo({
-								url: `/subPages/settleCenter/settleCenter?orderNo=${res.data.order_no}&type=msGoods`
-							})
-						})
-					}
-				} else {
-					this.show = false
-				}
-			},
-			toApply() {
-				// 立即购买去选择规格
-				if (!this.isUserRegister) {
-					this.showUserRegister = true
-					return
-				}
-				this.currentOperateType = 2
-				this.show = true
-			},
-			toJump(item, index) {
-				if (item.isVip) {
-					if (!this.isUserRegister) {
-						this.showUserRegister = true
-						return
-					}
-				}
-				if (item.url) {
-					uni.switchTab({
-						url: item.url
-					})
-				} else if (index == 3) {
-					this.handlePoster(true)
-				}
-			}
-		}
-	}
+import LoginPop from '@/components/LoginPop.vue'
+import {
+  makeErCode
+} from "@/common/api/task.js";
+import {
+  getGoodsDetail,
+  getGiftGoodsDetail,
+  getMsGoodsDetail,
+  getPointsGoodsDetail,
+  msGoodsCreateOrder,
+  giftAddCart,
+  addCollect,
+  delCollect,
+  checkCollect
+} from '@/common/api/good.js'
+
+export default {
+  components: {
+    LoginPop
+  },
+  data() {
+    return {
+      erCodeImg: '',
+      pageOptions: {},
+      totalDetailData: {},
+      selectSuitData: {},
+      currentSuitIndex: 0,
+      suitNum: 1,
+      show: false,
+      freeData: [],
+      imageUrl: this.$C.imageUrl,
+      detailList: [{
+        name: '商品详情'
+      }, {
+        name: '商品规格'
+      }, {
+        name: '售后保障'
+      }],
+
+      currentNum: 0,
+      detailData: {},
+      goodsSpecData: [],
+      truckData: {},
+      showPoster: false,
+      posterImgSrc: "",
+      selectedSuitPriceData: [],
+      goodSuitPriceData: {
+        price: 0
+      },
+      goodsType: 'common',
+      currentOperateType: '', // 1:购物车,2:立即购买
+      cartNumber: 0,
+      sell_serv: '',
+      isUserRegister: false,
+      showUserRegister: false,
+      goodsCollected: false,
+      btn_color: null,
+    }
+  },
+  computed: {
+    beUsedCode() {
+      return this.detailData.code
+    },
+    selectSuitDisplay() {
+      console.log(2333, this.selectedSuitPriceData)
+      if (this.goodsType == 'common') {
+        let tempData = this.selectedSuitPriceData.map(item => {
+          return `${item.group_name}:${item.spec_name}`
+        })
+        return tempData.join(',')
+      } else if (this.goodsType == 'gift') {
+        return this.detailData.goods_spec
+      } else {
+        return this.goodSuitPriceData.goods_spec
+      }
+    },
+    currentTypeApi() {
+      let result = {
+        detailApi: getGoodsDetail,
+        params: {
+          goods_code: this.pageOptions.code
+        }
+      }
+      switch (this.pageOptions.type) {
+        case 'gift':
+          result.detailApi = getGiftGoodsDetail
+          break;
+        case 'points':
+          result.detailApi = getPointsGoodsDetail
+          break;
+        case 'msGoods':
+          result = {
+            detailApi: getMsGoodsDetail,
+            params: {
+              id: this.pageOptions.code
+            }
+          }
+          break;
+        default:
+          break;
+
+      }
+      return result
+    }
+  },
+  onLoad(options) {
+    console.log("optionssuboacge==", options)
+    this.pageOptions = options
+    this.goodsType = options.type
+    this.getAfterSalePage()
+    this.maekErImg(options.code)
+    const configs = uni.getStorageSync('configs')
+    if (configs) {
+      this.btn_color = configs.btn_color
+    }
+    this.$nextTick(() => {
+      this.getDetail()
+      this.getCartNumber()
+    })
+  },
+  onShow() {
+    this.reUserInfo()
+  },
+  onShareAppMessage(res) {
+    if (res.from === 'button') { // 来自页面内分享按钮
+      console.log(res.target)
+    }
+    let userInfo = uni.getStorageSync('userInfo')
+    userInfo = userInfo && JSON.parse(userInfo) || {}
+    if (userInfo.id) {
+      this.pageOptions.id = userInfo.id
+    }
+    return {
+      title: this.detailData.goods_name,
+      path: `/subPages/goodsDetail/goodsDetail${this.$stringPageOptions(this.pageOptions)}`
+    }
+  },
+  onShareTimeline() {
+    let userInfo = uni.getStorageSync('userInfo')
+    userInfo = userInfo && JSON.parse(userInfo) || {}
+    const posterImage = this.detailData.video && this.detailData.slider.length > 1 ? this.detailData.slider[1]
+        .url : this.detailData.slider[0].url
+    if (userInfo.id) {
+      this.pageOptions.id = userInfo.id
+    }
+    return {
+      title: this.detailData.goods_name,
+      path: `/subPages/goodsDetail/goodsDetail${this.$stringPageOptions(this.pageOptions)}`,
+      imageUrl: posterImage
+    }
+  },
+  watch: {
+    goodsSpecData: {
+      handler(nv) {
+        console.log(9999, nv)
+        let priceSuit = []
+        if (this.goodsType == 'common') {
+          nv.forEach(pItem => {
+            let tempList = pItem.list.filter(item => item.isChecked)
+            tempList = tempList.map(item => {
+              return {
+                group_name: item.group,
+                spec_name: item.name
+              }
+            })
+            priceSuit = priceSuit.concat(tempList)
+          })
+          this.selectedSuitPriceData = priceSuit
+          this.getSuitPrice()
+        } else if (this.goodsType == 'msGoods') {
+          const checkedData = nv.find(item => item.isChecked)
+          this.goodSuitPriceData = {
+            price: checkedData.price_seckill,
+            goods_spec: checkedData.goods_spec,
+            sku_id: checkedData.id,
+          }
+        }
+      },
+      deep: true
+    }
+  },
+  methods: {
+    checkCollect() {
+      checkCollect({
+        code: this.detailData.code
+      }).then(res => {
+        this.goodsCollected = !!(res.data && res.data.id)
+        console.log(this.goodsCollected)
+      })
+    },
+    collectHandler() {
+      if (!this.isUserRegister) {
+        this.showUserRegister = true
+        return
+      }
+      if (this.goodsCollected) {
+        // 取消收藏
+        delCollect({
+          code: this.detailData.code
+        }).then(res => {
+          this.goodsCollected = false
+          uni.showToast({
+            title: '取消收藏'
+          })
+        })
+      } else {
+        // 收藏
+        addCollect({
+          code: this.detailData.code
+        }).then(res => {
+          this.goodsCollected = true
+          uni.showToast({
+            title: '收藏成功'
+          })
+        })
+      }
+    },
+    detailClick(item) {
+      console.log(item.index)
+      uni.pageScrollTo({
+        selector: `#detail_${item.index}`
+      })
+    },
+    reUserInfo() {
+      const userInfo = uni.getStorageSync("userInfo");
+      if (
+          userInfo &&
+          JSON.parse(userInfo).vip_code == 1 &&
+          JSON.parse(userInfo).nickname != "" &&
+          JSON.parse(userInfo).headimg != ""
+      ) {
+        this.isUserRegister = true;
+      } else {
+        this.isUserRegister = false;
+      }
+    },
+    getAfterSalePage() {
+      this.$api.getData({
+        id: 4
+      }).then(res => {
+        this.sell_serv = res.data.content
+      })
+    },
+    suitHandler() {
+      this.currentOperateType = ''
+      if (this.goodsType != 'gift') {
+        this.show = true
+      }
+    },
+    getCartNumber() {
+      this.$api.getCartNumber().then(res => {
+        this.cartNumber = res.data.cart_num
+      })
+    },
+    getSuitPrice() {
+      this.$api.getPriceBySuit({
+        goods_code: this.pageOptions.code,
+        spec: this.selectedSuitPriceData
+      }).then(res => {
+        this.goodSuitPriceData = res.data
+      })
+    },
+    toAddCert() {
+      // 加入购物车
+      if (!this.isUserRegister) {
+        this.showUserRegister = true
+        return
+      }
+      if (this.goodsType == 'gift') {
+        giftAddCart({
+          code: this.detailData.code
+        }).then(res => {
+          uni.showToast({
+            title: '已加入购物车'
+          })
+          this.getCartNumber()
+        })
+      } else {
+        this.currentOperateType = 1
+        this.show = true
+      }
+    },
+    maekErImg(code) {
+      let that = this;
+      const data = {
+        path: '/subPages/goodsDetail/goodsDetail?code=' + code,
+        type: 'file'
+        // ['api-name']: 'wxapp',
+        // ['api-token']: uni.getStorageSync(`token`)
+      }
+      this.$api.getQRCode(data).then(res => {
+        console.log("base64==", res.data.base64)
+        this.erCodeImg = res.data.url
+      })
+    },
+    downloadPoster() {
+      // console.log(222, this.posterImgSrc)
+      // uni.saveImageToPhotosAlbum({
+      // 	filePath: this.posterImgSrc,
+      // 	complete:() => {
+      // 		this.showPoster = false
+      // 	}
+      // })
+      let _this = this
+      this.$refs.painter.canvasToTempFilePathSync({
+        fileType: "jpg",
+        // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
+        pathType: 'url',
+        quality: 1,
+        success: (res) => {
+          console.log(res.tempFilePath);
+          // 非H5 保存到相册
+          // H5 提示用户长按图另存
+          uni.saveImageToPhotosAlbum({
+            filePath: res.tempFilePath,
+            success: function () {
+              uni.showToast({
+                title: '保存成功'
+              })
+              _this.showPoster = false
+            }
+          });
+        },
+      })
+    },
+    handlePoster(showPoster) {
+      if (showPoster) {
+        this.$refs.createPosterLoading.show({
+          type: 'loading',
+          message: "海报生成中...",
+          duration: 1000,
+          complete: () => {
+            this.showPoster = showPoster;
+          }
+        })
+        return
+      }
+      this.showPoster = showPoster;
+      // uni.showLoading({
+      // 	title: '海报生成中...',
+
+      // })
+      // setTimeout(function () {
+      // 	uni.hideLoading();
+      // 	this.showPoster = true;
+      // }, 1000);
+
+    },
+    suitChange(item, pItem) {
+      if (item.disabled) return
+      if (this.goodsType == 'common') {
+        pItem.list.forEach(spec => [
+          spec.isChecked = false
+        ])
+      } else {
+        this.goodsSpecData.forEach(spec => {
+          spec.isChecked = false
+        })
+      }
+      item.isChecked = true
+      // this.selectSuitData = item
+      // this.currentSuitIndex = index
+    },
+    close() {
+      this.show = false
+    },
+    open() {
+    },
+    getDetail() {
+      this.currentTypeApi.detailApi(this.currentTypeApi.params).then(res => {
+        const {
+          goods = {}, items = [], truck = {}
+        } = res.data
+        this.totalDetailData = res.data
+        // this.sell_serv = res.data.sell_serv
+        this.detailData = goods
+        console.log(res.data.free)
+        this.freeData = res.data.free || []
+        this.truckData = truck.content && truck.content.length ? truck.content[0].rule : {}
+        this.selectSuitData = items || []
+        let data_specs = []
+        if (this.goodsType == 'common') {
+          data_specs = this.detailData.data_specs
+          if (Array.isArray(data_specs)) {
+            data_specs.forEach(pItem => {
+              pItem.list = pItem.list.map((item, index) => {
+                if (index === 0) {
+                  this.$set(item, 'isChecked', true)
+                } else {
+                  this.$set(item, 'isChecked', false)
+                }
+                return item
+              })
+            })
+          }
+        } else if (this.goodsType == 'msGoods') {
+          data_specs = res.data.items
+          this.detailData.price_seckill = res.data.price_seckill
+          if (Array.isArray(data_specs)) {
+            data_specs.forEach((pItem, index) => {
+              const {
+                status,
+                stock_sale,
+                stock
+              } = pItem
+
+              if (index === 0) {
+                this.$set(pItem, 'isChecked', true)
+              } else {
+                this.$set(pItem, 'isChecked', false)
+              }
+              this.$set(pItem, 'disabled', !(status == 1 && stock_sale < stock))
+            })
+          }
+        }
+        this.goodsSpecData = data_specs
+        console.log(99999, this.detailData)
+        this.detailData.slider = this.detailData.slider.map(item => {
+          return {
+            url: item
+          }
+        })
+        if (this.detailData.video) {
+          this.detailData.slider.unshift({
+            url: this.detailData.video
+          })
+        }
+        this.checkCollect()
+      }).catch(() => {
+        uni.hideLoading()
+      })
+    },
+    submit() {
+      // console.log(2345, ths.selectSuitData)
+      if (!this.isUserRegister) {
+        this.showUserRegister = true
+        return
+      }
+      if (this.currentOperateType === 1) {
+        // 添加购物车
+        this.$api.addToShoppingCart({
+          sku_id: this.goodSuitPriceData.sku_id,
+          num: this.suitNum
+        }).then(res => {
+          this.show = false
+          uni.showToast({
+            title: '已加入购物车'
+          })
+          this.getCartNumber()
+        })
+      } else if (this.currentOperateType === 2) {
+        // this.show = false
+        if (this.goodsType == 'common') {
+          let specText = this.selectedSuitPriceData.map(item => {
+            return `${item.group_name}::${item.spec_name}`
+          })
+          const sendData = {
+            items: [{
+              code: this.pageOptions.code,
+              count: this.suitNum,
+              spec: specText.join(';;')
+            }]
+          }
+          this.$api.createOrder(sendData).then(res => {
+            uni.showToast({
+              title: '订单创建成功'
+            })
+            uni.navigateTo({
+              url: `/subPages/settleCenter/settleCenter?orderNo=${res.data.order_no}`
+            })
+          })
+        } else {
+          // 秒杀下单
+          const sendData = {
+            sk_goods_id: this.pageOptions.code,
+            goods_spec: this.goodSuitPriceData.goods_spec,
+            num: this.suitNum
+          }
+          msGoodsCreateOrder(sendData).then(res => {
+            uni.showToast({
+              title: '订单创建成功'
+            })
+            uni.navigateTo({
+              url: `/subPages/settleCenter/settleCenter?orderNo=${res.data.order_no}&type=msGoods`
+            })
+          })
+        }
+      } else {
+        this.show = false
+      }
+    },
+    toHome() {
+      uni.navigateBack({
+        delta: 1
+      })
+    },
+    toApply() {
+      // 立即购买去选择规格
+      if (!this.isUserRegister) {
+        this.showUserRegister = true
+        return
+      }
+      this.currentOperateType = 2
+      this.show = true
+    },
+
+    toJump( index) {
+      if(index==1){
+        uni.switchTab({
+          url:'/pages/home/index'
+        });
+      }else if(index==3){
+        if (!this.isUserRegister) {
+          this.showUserRegister = true
+          return
+        }
+        uni.switchTab({
+          url:'/pages/shoppingCart/shoppingCart'
+        });
+      }
+    },
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-	::v-deep {
-		img {
-			width: 100%;
-		}
-	}
-
-	.poster-wrap {
-		text-align: center;
-		margin-top: 40rpx;
-	}
-
-	.poster-box {
-		background-color: #F5F6F8;
-		width: calc(100% - 120rpx);
-		padding: 20rpx 60rpx 60rpx;
-		position: absolute;
-		bottom: 0;
-	}
-
-	.poster-btn {
-		display: flex;
-		justify-content: space-around;
-		align-items: flex-end;
-		font-size: 28rpx;
-		text-align: center;
-
-		&-left {
-			position: relative
-		}
-
-		&-right {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-		}
-	}
-
-	.cancel-btn {
-		height: 72rpx;
-		border-radius: 80rpx;
-		text-align: center;
-		line-height: 72rpx;
-		background-color: #fff;
-		margin-top: 16rpx;
-	}
-
-	.goods-detail-wrapper {
-		background-color: $primary-bg-color;
-		padding-bottom: 146rpx;
-
-		::v-deep {
-			.u-swiper-indicator {
-				padding: 0 !important
-			}
-		}
-
-		.content-box {
-			padding: 20rpx 20rpx 0;
-
-			.title {
-				line-height: 36rpx;
-				font-size: 30rpx;
-			}
-
-			.sub-title {
-				color: #717171;
-				margin: 30rpx 0 24rpx;
-			}
-
-			.detail-title {
-				display: flex;
-				align-items: center;
-				font-size: 28rpx;
-				font-weight: 600;
-				margin-bottom: 18rpx;
-
-				.title-icon {
-					width: 3rpx;
-					height: 24rpx;
-					background: linear-gradient(180deg, #9276FE 0%, rgba(217, 217, 217, 0) 100%);
-					border-radius: 0rpx 0rpx 0rpx 0rpx;
-					margin-right: 8rpx;
-				}
-			}
-		}
-
-		.bottom-part {
-			position: fixed;
-			bottom: 0;
-			background-color: #fff;
-			width: calc(100% - 60rpx);
-			padding: 14rpx 30rpx 30rpx;
-			display: flex;
-			justify-content: space-between;
-			z-index: 100;
-
-			.common-btn {
-				width: 160rpx;
-				flex-shrink: 0;
-			}
-
-			.bar-list {
-				display: flex;
-				width: calc(100% - 340rpx);
-				// justify-content: space-between;
-				font-size: 22rpx;
-				text-align: center;
-				color: #525051;
-			}
-
-			.bar-list-icon {
-				position: relative;
-				margin-right: 15rpx;
-			}
-		}
-	}
-
-	.suit-content {
-		padding: 0 20rpx 60rpx;
-		max-height: 80vh;
-		box-sizing: border-box;
-		overflow-y: auto;
-
-		.suit-btn-box {
-			display: flex;
-
-			// justify-content: space-between;
-			.suit-btn {
-				background-color: #F6F6F6;
-				border-radius: 8rpx;
-				border: 1rpx solid transparent;
-				height: 76rpx;
-				line-height: 76rpx;
-				text-align: center;
-				width: calc(33% - 20rpx);
-				color: #232323;
-				margin-right: 20rpx;
-				box-sizing: border-box;
-				margin-bottom: 20rpx;
-
-				&-active {
-					color: #F39800;
-					border-color: #F39800;
-					font-weight: bold;
-					background-color: #fff;
-				}
-
-				&-disabled {
-					background-color: #fffafa;
-					border-color: #d0d0d0;
-					color: #ababab;
-				}
-
-				&-column {
-					width: 100%;
-					text-align: left;
-					padding: 0 10rpx;
-					flex-shrink: 0;
-				}
-
-			}
-		}
-	}
+::v-deep {
+  img {
+    width: 100%;
+  }
+}
+
+.poster-wrap {
+  text-align: center;
+  margin-top: 40rpx;
+}
+
+.poster-box {
+  background-color: #F5F6F8;
+  width: calc(100% - 120rpx);
+  padding: 20rpx 60rpx 60rpx;
+  position: absolute;
+  bottom: 0;
+}
+
+.poster-btn {
+  display: flex;
+  justify-content: space-around;
+  align-items: flex-end;
+  font-size: 28rpx;
+  text-align: center;
+
+  &-left {
+    position: relative
+  }
+
+  &-right {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+  }
+}
+
+.cancel-btn {
+  height: 72rpx;
+  border-radius: 80rpx;
+  text-align: center;
+  line-height: 72rpx;
+  background-color: #fff;
+  margin-top: 16rpx;
+}
+
+.goods-detail-wrapper {
+  //margin-top: 60rpx;
+  background-color: $primary-bg-color;
+  padding-bottom: 146rpx;
+
+  ::v-deep {
+    .u-swiper-indicator {
+      padding: 0 !important
+    }
+  }
+
+  .to-home-img {
+    position: absolute;
+    left: 30rpx;
+    top: 100rpx;
+    border-radius: 52rpx;
+    width: 52rpx;
+    height: 52rpx;
+    background-color: #F0F0F2;
+    z-index: 1;
+    // 上下左右居中
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-weight: 700 !important;
+
+
+  }
+
+  .content-box {
+    padding: 20rpx 20rpx 0;
+
+    .title {
+      line-height: 36rpx;
+      font-size: 30rpx;
+    }
+
+    .sub-title {
+      color: #717171;
+      margin: 30rpx 0 24rpx;
+    }
+
+    .detail-title {
+      display: flex;
+      align-items: center;
+      font-size: 28rpx;
+      font-weight: 600;
+      margin-bottom: 18rpx;
+
+      .title-icon {
+        width: 3rpx;
+        height: 24rpx;
+        background: linear-gradient(180deg, #9276FE 0%, rgba(217, 217, 217, 0) 100%);
+        border-radius: 0rpx 0rpx 0rpx 0rpx;
+        margin-right: 8rpx;
+      }
+    }
+  }
+
+  .bottom-part {
+    position: fixed;
+    bottom: 0;
+    background-color: #fff;
+    width: calc(100% - 60rpx);
+    padding: 14rpx 30rpx 30rpx;
+    display: flex;
+    justify-content: space-between;
+    z-index: 100;
+
+    .bar-list {
+      display: flex;
+      width: calc(100% - 340rpx);
+      // justify-content: space-between;
+      font-size: 22rpx;
+      text-align: center;
+      color: #525051;
+    }
+
+    .bar-list-icon {
+      position: relative;
+      margin-right: 15rpx;
+    }
+  }
+}
+
+.common-btn {
+  //width: 160rpx;
+  //flex-shrink: 0;
+  background: linear-gradient( 315deg, #CA9359 0%, #E2B98E 100%)!important;
+  border-radius: 292rpx 292rpx 292rpx 292rpx!important;
+  border:0;
+}
+
+.suit-content {
+  padding: 0 40rpx 60rpx;
+  max-height: 80vh;
+  box-sizing: border-box;
+  overflow-y: auto;
+  .suit-btn-box {
+    display: flex;
+
+    // justify-content: space-between;
+    .suit-btn {
+      background-color: #F6F6F6;
+      border-radius: 8rpx;
+      border: 1rpx solid transparent;
+      height: 76rpx;
+      line-height: 76rpx;
+      text-align: center;
+      width: calc(33% - 20rpx);
+      color: #232323;
+      margin-right: 20rpx;
+      box-sizing: border-box;
+      margin-bottom: 40rpx;
+      &-active {
+        color: #C29556;
+        background-color: #F9F2E6 ;
+      }
+      &-disabled {
+        background-color: #fffafa;
+        border-color: #d0d0d0;
+        color: #ababab;
+      }
+
+      &-column {
+        width: 100%;
+        text-align: left;
+        padding: 0 10rpx;
+        flex-shrink: 0;
+      }
+
+    }
+  }
+}
+.bottom-navigation{
+  position: fixed;
+  // 文字垂直居中
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  bottom: 0;
+  height: 100rpx;
+  width: calc(100% - 40rpx);
+  background: #FFFFFF;
+  box-shadow: 0rpx -2rpx 0rpx 0rpx #F1F3F6;
+  border-radius: 24rpx 24rpx 0rpx 0rpx;
+  border: 0rpx solid #979797;
+  padding: 20rpx 20rpx 68rpx 20rpx ;
+  z-index: 100;
+  &-div{
+    height: 76rpx;
+    width: 270rpx;
+    // 文字垂直居中
+    display: flex;
+    align-items: center;
+    padding-left: 30rpx;
+    padding-top: 10rpx;
+
+    span{
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 20rpx;
+      color: #333333;
+      line-height: 32rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+    }
+
+  }
+  .add-cart-button {
+    width: 216rpx;
+    height: 76rpx;
+    background:  linear-gradient( 315deg, #323130 0%, #575757 100%);;
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 36rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+    // 文字垂直居中
+    display: flex;
+    margin-right: 20rpx;
+    align-items: center;
+    justify-content: center;
+    padding: 0;
+  }
+  .submit-order-button {
+    width: 216rpx;
+    height: 76rpx;
+    background: linear-gradient(315deg, #CA9359 0%, #E2B98E 100%);
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 36rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+    // 文字垂直居中
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding: 0;
+  }
+}
+
+
+
+.fenxiang {
+  font-weight: 400;
+  font-size: 18rpx;
+  color: #333333;
+  line-height: 24rpx;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+}
 </style>

+ 277 - 0
subPages/paySuccess/payCourseSuccess.vue

@@ -0,0 +1,277 @@
+<template>
+  <view class="common-page">
+    <view class="header-box" :style="{
+				paddingBottom: '30rpx',
+		  }" id="headerBox" ref="headerBox">
+      <view class="navbar-box display-flex-content-center" :style="{
+					height: `${topData.height}px`,
+					paddingTop: `${topData.top}px`,
+					paddingBottom: '40rpx',
+					color: '#666666',
+					fontSize: '34rpx',
+					fontWeight: 'bold'
+				}">
+        <view @click="toHome" style="position: absolute;left:30rpx">
+          <u-icon size="20" name="arrow-left" color="#666666"></u-icon>
+        </view>
+        <text></text>
+      </view>
+      <view class="success-con  fs16">
+        <view class="display-flex-content-center">
+          <u-icon size="50rpx" name="checkmark-circle-fill" color="#E2B98E" ></u-icon>
+          <text class="fw700 ml5 success-title-text">支付成功</text>
+        </view>
+        <view class="text-center fs14 mtr20 mb20">我们会在24小时内与您联系,您也可以加客服微信~</view>
+        <view style="display: flex;	align-items: center;  justify-content: center;">
+          <van-image
+              id="qrCodeImage"
+              height="240rpx"
+              :src="cs_wechat_img"
+              width="240rpx"
+              @click="recognizeQRCode"
+          />
+        </view>
+        <view class="text-center fs14 mtr20">长按图片添加客服</view>
+      </view>
+    </view>
+    <view class="content-box">
+      <!-- 订单编号 -->
+      <view class="common-card">
+        <text style="color: #888888">订单编号: </text>
+        <text style="color: #333333;margin-left: 12rpx"> {{ detailData.order_no}}</text>
+        <u-divider  :dashed="true"></u-divider>
+        <!-- 已选商品 -->
+        <view class="display-flex-center" v-for="(item, index) in goodsList" :key="index">
+          <image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 30rpx;flex-shrink: 0;"
+                 :src="item.goods_cover" mode="aspectFill">
+          </image>
+          <view style="width: 100%;">
+            <view class="display-flex-between ">
+              <text class="goods-name">{{item.goods_name}}</text>
+            </view>
+            <view class="display-flex-between " style="margin-top: 30rpx">
+              <text class="goods-price">¥<text style="font-family: D-DIN-Bold;font-weight: 700;   font-size: 36rpx;">{{item.price_selling}}</text></text>
+            </view>
+          </view>
+        </view>
+
+        <u-divider  :dashed="true"></u-divider>
+        <!-- 运费信息 -->
+        <view class="display-flex-center mb15"  style="justify-content: space-between;">
+          <text class="color-71 flex-shrink" style="color: #888888">用户信息:</text>
+          <text class=" text-overflow-single" style="color: #333333;">
+            {{truckData.address_name}}&nbsp;&nbsp;{{truckData.address_phone}}
+          </text>
+        </view>
+        <view class="display-flex-center mb15"  style="justify-content: space-between;">
+          <text class="color-71 flex-shrink" style="color: #888888">支付金额:</text>
+          <text class=" text-overflow-single" style="color: #333333;">¥{{detailData.payment_amount}}</text>
+        </view>
+        <view class="display-flex-center" style="justify-content: space-between;">
+          <text class="color-71 flex-shrink" style="color: #888888">支付时间:</text>
+          <text class="text-overflow-single" style="color: #333333;">{{detailData.payment_datetime}}</text>
+        </view>
+      </view>
+    </view>
+
+
+    <view style="margin-top: 40rpx;width: 100%;">
+      <view class="btn-gray-border" @click="toHome"><span>返回首页</span></view>
+    </view>
+
+
+  </view>
+</template>
+<script>
+export default {
+
+  data() {
+    return {
+      orderNo: '',
+      goodsList: [
+        {}, {}
+      ],
+      cs_wechat_img:"",
+      detailData: {},
+      truckData: {},
+      topData: {
+        top: 0,
+        height: 0
+      },
+
+    }
+  },
+  onLoad(options) {
+    this.orderNo = options.orderNo
+    const configs = uni.getStorageSync("configs");
+    this.cs_wechat_img =configs.cs_wechat_img;
+    // const mData = uni.getStorageSync('selectTaskData') || undefined
+  },
+  onShow() {
+    const topData = uni.getMenuButtonBoundingClientRect()
+    this.topData.top = topData.top
+    this.topData.height = topData.height
+    this.getOrderDetail()
+  },
+  methods: {
+    getOrderDetail() {
+      this.$api.orderDetail({ order_no: this.orderNo }).then(res => {
+        this.detailData = res.data
+        this.goodsList = res.data.items || []
+        this.truckData = res.data.truck
+      })
+    },
+    recognizeQRCode() {
+      if (!this.cs_wechat_img) {
+        uni.showToast({
+          title: '二维码图片地址为空',
+          icon: 'none',
+          duration: 3000
+        });
+        return;
+      }
+      // 预览图片
+      uni.previewImage({
+        urls: [this.cs_wechat_img],
+        success: () => {
+        },
+        fail: (err) => {
+          console.error('预览图片失败:', err);
+          uni.showToast({
+            title: '预览图片失败',
+            icon: 'none',
+            duration: 3000
+          });
+        }
+      });
+    },
+    toHome() {
+      uni.switchTab({
+        url: '/pages/home/index'
+      })
+    },
+    toOrder() {
+      uni.navigateTo({
+        url: `/subPages/orderDetail/orderDetail?orderNo=${this.detailData.order_no}`
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.common-page {
+  height: 100vh;
+  overflow-y: auto;
+  // padding: 20rpx;
+  color: #2C2C2C;
+  padding-bottom: 188rpx;
+  box-sizing: border-box;
+  background-color: #F8F9FA;
+
+}
+
+.coupon-list {
+  padding: 30rpx 20rpx;
+  background-color: #fff;
+  border-radius: 20rpx 20rpx 0 0;
+}
+.btn-gray-border{
+  width: 560rpx;
+  height: 88rpx;
+  margin: 0 auto;
+  background: linear-gradient( 315deg, #CA9359 0%, #E2B98E 100%);
+  border-radius: 292rpx 292rpx 292rpx 292rpx;
+  font-family: PingFang SC, PingFang SC-Medium;
+  font-weight: 400;
+  font-size: 32rpx;
+  color: #FFFFFF;
+  line-height: 36rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.goods-name{
+  font-family: PingFang SC-Bold;
+  font-weight: 400;
+  font-size: 28rpx;
+  color: #333333;
+  line-height: 40rpx;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+  // 加粗
+  font-weight: bold;
+}
+.goods-price{
+  font-family: D-DIN-Regular;
+  font-weight: 400;
+  font-size: 24rpx;
+  color: #333333;
+  line-height: 30rpx;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+}
+.content-box {
+  padding: 20rpx;
+}
+
+.navbar-box {
+  position: relative;
+}
+.success-title-text{
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 40rpx;
+  color: #333333;
+  line-height: 50rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+  // 加粗
+  font-weight: bold;
+}
+.text-center{
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 24rpx;
+  color: #666666;
+  line-height: 40rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+}
+
+.good-card {
+  padding: 38rpx 22rpx;
+  color: #7A7A7A;
+
+  ::v-deep {
+    .u-textarea {
+      background: #F6F6F6;
+      border-radius: 12rpx 12rpx 12rpx 12rpx;
+      border: none;
+      padding: 18rpx;
+
+      .u-textarea__count {
+        background-color: transparent !important;
+      }
+    }
+  }
+}
+
+.goods-list {
+  margin: 0 30rpx;
+  padding: 30rpx 0;
+  border-bottom: 1rpx solid #F5F5F5;
+}
+
+.goods-total {
+  justify-content: flex-end;
+  margin: 27rpx 20rpx;
+}
+</style>

+ 224 - 150
subPages/paySuccess/paySuccess.vue

@@ -1,175 +1,249 @@
+
 <template>
-	<view class="common-page">
-		<view class="header-box" :style="{
-		    backgroundColor: '#F39800',
-				paddingBottom: '30rpx'
+  <view class="common-page">
+    <view class="header-box" :style="{
+				paddingBottom: '30rpx',
+    backgroundColor: '#F8F9FA'
+
 		  }" id="headerBox" ref="headerBox">
-			<view class="navbar-box display-flex-content-center" :style="{
+      <view class="navbar-box display-flex-content-center" :style="{
 					height: `${topData.height}px`,
 					paddingTop: `${topData.top}px`,
 					paddingBottom: '40rpx',
-					color: '#fff',
+					color: '#666666',
 					fontSize: '34rpx',
 					fontWeight: 'bold'
 				}">
-				<view @click="toHome" style="position: absolute;left:30rpx">
-					<u-icon size="20" name="arrow-left" color="#fff"></u-icon>
-				</view>
-				<text>支付成功</text>
-			</view>
-			<view class="success-con color-white fs16">
-				<view class="display-flex-content-center">
-					<u-icon size="17" name="checkmark-circle-fill" color="#fff"></u-icon>
-					<text class="fw700 ml5">恭喜您已支付成功!</text>
-				</view>
-				<view class="text-center fs14 mt5">我们会在48小时内发货,请留意物流信息哦~</view>
-			</view>
-		</view>
-		<view class="content-box mt10">
-			<!-- 订单编号 -->
-			<view class="common-card">
-				<text class="color-71">订单编号:</text>
-				<text class="fw600">{{detailData.order_no}}</text>
-			</view>
-			<!-- 已选商品 -->
-			<view class="common-card display-flex-center" v-for="(item, index) in goodsList" :key="index">
-				<image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 10rpx;flex-shrink: 0;"
-					:src="item.goods_cover" mode="aspectFill">
-				</image>
-				<view class="ml10">
-					<view class="display-flex-center mb10">
-						<text class="color-71 flex-shrink">商品名称:</text>
-						<text class="fw600 text-overflow-single">{{item.goods_name}}</text>
-					</view>
-					<view class="display-flex-center mb10">
-						<text class="color-71 flex-shrink">商品规格:</text>
-						<text class="fw600 text-overflow-single">{{item.goods_spec}}</text>
-					</view>
-					<view class="display-flex-center">
-						<text class="color-71 flex-shrink">购买数量:</text>
-						<text class="fw600 text-overflow-single">{{item.stock_sales}}</text>
-					</view>
-				</view>
-			</view>
-			<!-- 运费信息 -->
-			<view class="common-card ">
-				<view class="display-flex-center mb15">
-					<text class="color-71 flex-shrink">支付金额:</text>
-					<text class="fw600 text-overflow-single">¥{{detailData.payment_amount}}</text>
-				</view>
-				<view class="display-flex-center">
-					<text class="color-71 flex-shrink">支付时间:</text>
-					<text class="fw600 text-overflow-single">{{detailData.payment_datetime}}</text>
-				</view>
-			</view>
-		</view>
-		<view class="bottom-box display-flex-end">
-			<view class="btn-gray-border mr10" @click="toHome">返回首页</view>
-			<view class="common-btn" @click="toOrder">查看订单</view>
-		</view>
+        <view @click="toHome" style="position: absolute;left:30rpx">
+          <u-icon size="20" name="arrow-left" color="#666666"></u-icon>
+        </view>
+        <text></text>
+      </view>
+      <view class="success-con  fs16">
+        <view class="display-flex-content-center">
+          <u-icon size="50rpx" name="checkmark-circle-fill" color="#E2B98E" ></u-icon>
+          <text class="fw700 ml5 success-title-text">支付成功</text>
+        </view>
+        <view class="text-center mtr20 mt5">我们会在48小时内进行发货,请留意物流信息噢~</view>
+      </view>
+    </view>
+    <view class="content-box mt10">
+      <!-- 订单编号 -->
+      <view class="common-card">
+        <view style="margin: 0 auto;display: flex;align-items: center;justify-content: center;" >
+          <text class="goods-price">¥<text style="font-family: D-DIN-Bold;font-weight: 700;   font-size: 40rpx;">{{detailData.payment_amount}}</text></text>
+        </view>
+        <u-divider  :dashed="true"></u-divider>
+        <text style="color: #888888">订单编号: </text>
+        <text style="color: #333333;margin-left: 12rpx"> {{ detailData.order_no}}</text>
+        <!-- 已选商品 -->
+        <view class="display-flex-center" style="margin-top: 30rpx" v-for="(item, index) in goodsList" :key="index">
+          <image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 10rpx;flex-shrink: 0;"
+                 :src="item.goods_cover" mode="aspectFill">
+          </image>
+          <view class="ml10">
+            <view class="display-flex-center mb10">
+              <text class=" text-overflow-single goods-name" >{{item.goods_name}}</text>
+            </view>
+            <view class="display-flex-center mb10">
+              <text class="color-71 flex-shrink">规格:</text>
+              <text class=" text-overflow-single">{{item.goods_spec}}</text>
+            </view>
+            <view class="display-flex-center">
+              <text class="color-71 flex-shrink">数量:</text>
+              <text class=" text-overflow-single">{{item.stock_sales}}</text>
+            </view>
+          </view>
+        </view>
+        <u-divider  :dashed="true"></u-divider>
+        <view class="display-flex-center" style="justify-content: space-between;">
+          <text class="color-71 flex-shrink">支付时间:</text>
+          <text class="fw600 text-overflow-single">{{detailData.payment_datetime}}</text>
+        </view>
+      </view>
+    </view>
 
-	</view>
+    <view style="margin-top: 40rpx;width: 100%;display: flex;justify-content: center;align-items: center;">
+      <view class="btn-to-home" @click="toHome"><span>返回首页</span></view>
+      <view class="btn-to-order" @click="toOrder"><span>查看订单</span></view>
+    </view>
+
+  </view>
 </template>
 
 <script>
-	export default {
+export default {
 
-		data() {
-			return {
-				orderNo: '',
-				goodsList: [
-					{}, {}
-				],
-				detailData: {},
-				topData: {
-					top: 0,
-					height: 0
-				},
+  data() {
+    return {
+      orderNo: '',
+      goodsList: [
+        {}, {}
+      ],
+      detailData: {},
+      topData: {
+        top: 0,
+        height: 0
+      },
 
-			}
-		},
-		onLoad(options) {
-			this.orderNo = options.orderNo
-			// const mData = uni.getStorageSync('selectTaskData') || undefined
-		},
-		onShow() {
-			const topData = uni.getMenuButtonBoundingClientRect()
-			this.topData.top = topData.top
-			this.topData.height = topData.height
-			this.getOrderDetail()
-		},
-		methods: {
-			getOrderDetail() {
-				this.$api.orderDetail({ order_no: this.orderNo }).then(res => {
-					this.detailData = res.data
-					this.goodsList = res.data.items || []
-					this.truckData = res.data.truck
-				})
-			},
-			toHome() {
-				uni.switchTab({
-					url: '/pages/home/index'
-				})
-			},
-			toOrder() {
-				uni.navigateTo({
-					url: `/subPages/orderDetail/orderDetail?orderNo=${this.detailData.order_no}`
-				})
-			}
-		}
-	}
+    }
+  },
+  onLoad(options) {
+    this.orderNo = options.orderNo
+    // const mData = uni.getStorageSync('selectTaskData') || undefined
+  },
+  onShow() {
+    const topData = uni.getMenuButtonBoundingClientRect()
+    this.topData.top = topData.top
+    this.topData.height = topData.height
+    this.getOrderDetail()
+  },
+  methods: {
+    getOrderDetail() {
+      this.$api.orderDetail({ order_no: this.orderNo }).then(res => {
+        this.detailData = res.data
+        this.goodsList = res.data.items || []
+        this.truckData = res.data.truck
+      })
+    },
+    toHome() {
+      uni.switchTab({
+        url: '/pages/home/index'
+      })
+    },
+    toOrder() {
+      uni.navigateTo({
+        url: `/subPages/orderDetail/orderDetail?orderNo=${this.detailData.order_no}`
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-	.common-page {
-		height: 100vh;
-		overflow-y: auto;
-		// padding: 20rpx;
-		color: #2C2C2C;
-		padding-bottom: 188rpx;
-		box-sizing: border-box;
-	}
-
-	.coupon-list {
-		padding: 30rpx 20rpx;
-		background-color: #fff;
-		border-radius: 20rpx 20rpx 0 0;
-	}
+.common-page {
+  height: 100vh;
+  overflow-y: auto;
+  // padding: 20rpx;
+  color: #2C2C2C;
+  padding-bottom: 188rpx;
+  box-sizing: border-box;
+}
 
-	.content-box {
-		padding: 20rpx;
-	}
+.coupon-list {
+  padding: 30rpx 20rpx;
+  background-color: #fff;
+  border-radius: 20rpx 20rpx 0 0;
+}
 
-	.navbar-box {
-		position: relative;
-	}
+.goods-name{
+  font-family: PingFang SC-Bold;
+  font-weight: 400;
+  font-size: 28rpx;
+  color: #333333;
+  line-height: 40rpx;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+  // 加粗
+  font-weight: bold;
+}
+.content-box {
+  padding: 20rpx;
+}
+.goods-price{
+  font-family: D-DIN-Regular;
+  font-weight: 400;
+  font-size: 28rpx;
+  color: #333333;
+  line-height: 48rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+}
+.navbar-box {
+  position: relative;
+}
+.btn-to-home{
+  width: 300rpx;
+  height: 88rpx;
+  background: #FFFFFF;
+  border-radius: 292rpx 292rpx 292rpx 292rpx;
+  font-family: PingFang SC, PingFang SC-Medium;
+  font-weight: 400;
+  font-size: 32rpx;
+  color: #333333;
+  line-height: 36rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+  display: flex;justify-content: center;align-items: center;
+}
+.btn-to-order{
+  margin-left:30rpx;
+  width: 300rpx;
+  height: 88rpx;
+  background: #F4EEE8;
+  border-radius: 292rpx 292rpx 292rpx 292rpx;
+  font-family: PingFang SC, PingFang SC-Medium;
+  font-weight: 400;
+  font-size: 32rpx;
+  color: #C29556;
+  line-height: 36rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+  display: flex;justify-content: center;align-items: center;
+}
+.success-title-text{
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 40rpx;
+  color: #333333;
+  line-height: 50rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+  // 加粗
+  font-weight: bold;
+}
+.text-center{
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 24rpx;
+  color: #666666;
+  line-height: 40rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+}
 
-	.good-card {
-		padding: 38rpx 22rpx;
-		color: #7A7A7A;
+.good-card {
+  padding: 38rpx 22rpx;
+  color: #7A7A7A;
 
-		::v-deep {
-			.u-textarea {
-				background: #F6F6F6;
-				border-radius: 12rpx 12rpx 12rpx 12rpx;
-				border: none;
-				padding: 18rpx;
+  ::v-deep {
+    .u-textarea {
+      background: #F6F6F6;
+      border-radius: 12rpx 12rpx 12rpx 12rpx;
+      border: none;
+      padding: 18rpx;
 
-				.u-textarea__count {
-					background-color: transparent !important;
-				}
-			}
-		}
-	}
+      .u-textarea__count {
+        background-color: transparent !important;
+      }
+    }
+  }
+}
 
-	.goods-list {
-		margin: 0 30rpx;
-		padding: 30rpx 0;
-		border-bottom: 1rpx solid #F5F5F5;
-	}
+.goods-list {
+  margin: 0 30rpx;
+  padding: 30rpx 0;
+  border-bottom: 1rpx solid #F5F5F5;
+}
 
-	.goods-total {
-		justify-content: flex-end;
-		margin: 27rpx 20rpx;
-	}
+.goods-total {
+  justify-content: flex-end;
+  margin: 27rpx 20rpx;
+}
 </style>

+ 438 - 0
subPages/settleCenter/courseSettleCenter.vue

@@ -0,0 +1,438 @@
+<template>
+  <view>
+    <view class="common-page">
+      <!-- 地址 -->
+      <view class="common-card-box yuanjiao24">
+        <view class="address-box" @click="selectAddress">
+          <view v-if="!mAddress || !mAddress.code" class="address-view">
+            <view style="display: flex; align-items: center;">
+              <van-image
+                  height="36rpx"
+                  src="/static/hd-if-b.png"
+                  width="36rpx"
+              />
+              <text class="t1" style="margin-top: 0; margin-left: 20rpx ;font-family: PingFang SC-Medium;">请明确买家信息</text>
+            </view>
+          </view>
+          <view v-if="mAddress && mAddress.code" class="address-view">
+            <text class="t1" space="ensp">
+              {{mAddress.province}} {{mAddress.city}}{{mAddress.area}}{{mAddress.address}}</text>
+            <text class="t2" space="emsp">{{mAddress.name}} {{mAddress.phone}}</text>
+          </view>
+          <u-icon name="arrow-right" color="#AEAEAE" size="34rpx"></u-icon>
+        </view>
+      </view>
+      <!-- 已选商品 -->
+      <view class="common-card-box yuanjiao24">
+        <view class="goods-list display-flex-center" v-for="(item, index) in goodsList" :key="index">
+          <image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 30rpx;flex-shrink: 0;"
+                 :src="item.goods_cover" mode="aspectFill">
+          </image>
+          <view style="width: 100%;">
+            <view class="display-flex-between ">
+              <text class="goods-name">{{item.goods_name}}</text>
+            </view>
+            <view class="display-flex-between " style="margin-top: 30rpx">
+              <text class="goods-price">¥<text style="font-family: D-DIN-Bold;font-weight: 700;   font-size: 36rpx;">{{item.price_selling}}</text></text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <!-- 留言 -->
+      <view class="common-card good-card yuanjiao24">
+        <view class="fs14 mb10 good-card-text"> <view style="width: 6rpx;height: 28rpx;background: #C29556;border-radius: 0rpx 0rpx 0rpx 0rpx;margin-right: 20rpx"></view>留言</view>
+        <u--textarea height="176rpx" v-model="order_remark" placeholder="请输入(100字以内)"    class="custom-textarea" maxlength="100" count></u--textarea>
+      </view>
+      <van-toast id="van-toast"/>
+
+    </view>
+    <view class="bottom-navigation">
+      <view class="bottom-navigation-div">
+        <span>应付:<span  class="space" >¥<span>{{payTotal}}</span></span></span>
+      </view>
+      <button  class="course-button" @click="toPay">去支付</button>
+    </view>
+  </view>
+</template>
+
+<script>
+	import couponItem from '@/subPages/coupon/couponItem.vue'
+	export default {
+		components: { couponItem },
+		data() {
+			return {
+				orderNo: '',
+				pageOptions: {},
+				showCoupon: false,
+				couponList: [],
+
+				mAddress: {},
+				usePoints: [],
+				order_remark: '',
+				checkedCoupon: {},
+				goodsList: [],
+				orderData: { amount_goods: 0, amount_express: 0 },
+				cartIds: [],
+				pointsData: {},
+				pointsShowData: { price: 0, points: 0 },
+				usePointsFlag: true,
+			}
+		},
+		computed: {
+			payTotal() {
+				const { amount_goods = 0, amount_express = 0 } = this.orderData
+				let result = Number(amount_goods) + Number(amount_express)
+				if (this.checkedCoupon.coupon_id) {
+					result = result - Number(this.checkedCoupon.coupon_price)
+				}
+				if (this.integral == 1) {
+					result = result - Number(this.pointsShowData.price)
+				}
+				return result.toFixed(2)
+			},
+
+			userPoints() {
+				const { integral_total = 0, integral_used = 0 } = JSON.parse(uni.getStorageSync('userInfo')||"{}");
+				return integral_total - integral_used
+			},
+			pointsDisabled() {
+				const { min_money, ratio, to_money } = this.pointsData
+				return min_money > this.orderData.amount_goods
+			},
+
+		},
+
+		onLoad(options) {
+			this.orderNo = options.orderNo
+			this.pageOptions = options
+			// const mData = uni.getStorageSync('selectTaskData') || undefined
+		},
+		onShow() {
+			const { type } = this.pageOptions
+			// this.getPoints()
+			if (type == 'cart') {
+				// 购物车下单
+				this.getCartData()
+				const selectAddress = uni.getStorageSync('selectAddress') || undefined
+				if (selectAddress) {
+					const tempAddress = JSON.parse(selectAddress)
+					if (!this.mAddress.code || (this.mAddress && this.mAddress.code != tempAddress.code)) {
+						this.mAddress = tempAddress
+						this.getExpressFee()
+					}
+					uni.removeStorageSync('selectAddress')
+				}
+			} else {
+				this.getOrderDetail()
+			}
+		},
+		methods: {
+
+			getCartData() {
+				this.cartIds = this.pageOptions.ids.split('_')
+				this.$api.createPrevOrderByCart({ id: this.cartIds }).then(res => {
+					const { items, coupons, count_total, amount_total, integral = {} } = res.data
+					this.goodsList = items.map(item => {
+						const { goods_spec, price_selling } = item.sku
+						item.stock_sales = item.num
+						item = {
+							goods_spec,
+							price_selling,
+							...item
+						}
+						return item
+					})
+					this.couponList = coupons
+					// 计算付款信息等
+					this.orderData.number_goods = count_total
+					this.orderData.amount_goods = amount_total
+					// const  {min_money, ratio, to_money} = integral
+					// let points = Math.floor(amount_total * ratio / 100)
+					// points = this.userPoints > points ? points : this.usePoints
+					if (res.data.integral_use && res.data.integral_price) {
+						this.usePointsFlag = true
+						this.pointsShowData = {
+							points: res.data.integral_use,
+							price: (res.data.integral_price).toFixed(2)
+						}
+					} else {
+						this.usePointsFlag = false
+					}
+				})
+			},
+			getExpressFee() {
+				this.$api.getPrevCartExpress({ id: this.cartIds, addr_code: this.mAddress.code }).then(res => {
+					this.orderData.amount_express = res.data
+				})
+			},
+			toPay() {
+				if (!this.mAddress.code) {
+					uni.showToast({
+						title: '请选择收货地址'
+					})
+					return
+				}
+				if (this.pageOptions.type == 'cart') {
+					const sendData = {
+						id: this.cartIds,
+						addr_code: this.mAddress.code,
+						coupon_id: this.checkedCoupon.id,
+						order_remark: this.order_remark,
+						integral: this.integral
+					}
+					this.$api.createOrderByCart(sendData).then(res => {
+						const { appId, nonceStr, paySign, signType, timeStamp } = res.data.param
+						console.log(333333555, res.data)
+						uni.requestPayment({
+							provider: 'wxpay',
+							nonceStr,
+							package: res.data.param.package,
+							paySign,
+							signType,
+							timeStamp,
+							success: function(success) {
+								uni.navigateTo({ url: `/subPages/paySuccess/payCourseSuccess?orderNo=${res.data.order.order_no}` })
+							},
+							fail: function(err) {
+								uni.navigateTo({ url: `/subPages/orderDetail/orderDetail?orderNo=${res.data.order.order_no}` })
+							}
+						})
+					})
+				} else {
+
+          // uni.navigateTo({ url: `/subPages/paySuccess/payCourseSuccess?orderNo=${this.orderNo}` })
+					// 获取支付参数
+					this.$toWechatPay(this.orderNo, this.order_remark,2)
+				}
+			},
+			addressConfirm() {
+				// 选择地址确认
+				this.$api.submitOrderByAdress({ order_no: this.orderNo, code: this.mAddress.code }).then(res => {
+					this.orderData.amount_express = res.data.amount
+				})
+			},
+			getOrderDetail() {
+				this.$api.orderDetail({ order_no: this.orderNo }).then(res => {
+					this.goodsList = res.data.items || []
+					this.orderData = res.data
+					this.checkedCoupon = res.data.coupon || {}
+					if (res.data.addr_code) {
+						// 已选地址
+						const {
+							address_area,
+							address_city,
+							address_province,
+							address_content,
+							address_name,
+							address_phone
+						} = res.data.truck || {}
+						this.mAddress = {
+							code: res.data.addr_code,
+							area: address_area,
+							city: address_city,
+							province: address_province,
+							address: address_content,
+							name: address_name,
+							phone: address_phone
+						}
+					}
+					const selectAddress = uni.getStorageSync('selectAddress') || undefined
+					if (selectAddress) {
+						const tempAddress = JSON.parse(selectAddress)
+						if (!this.mAddress.code || (this.mAddress && this.mAddress.code != tempAddress.code)) {
+							console.log(99999)
+							this.mAddress = tempAddress
+							this.addressConfirm()
+						}
+						// this.mAddress = tempAddress
+						console.log(23333, this.mAddress);
+						uni.removeStorageSync('selectAddress')
+					}
+				})
+			},
+			selectAddress() {
+				uni.navigateTo({
+					url: '/subPages/addressMg/addressMg?isBack=true'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.coupon-list {
+		padding: 40rpx 20rpx;
+	}
+
+	.common-page {
+		height: 100vh;
+		overflow-y: auto;
+		padding: 20rpx;
+		color: #2C2C2C;
+		padding-bottom: 188rpx;
+		box-sizing: border-box;
+	}
+
+	.good-card {
+		padding: 30rpx 20rpx 20rpx 20rpx;
+		color: #7A7A7A;
+
+    &-text{
+      display: flex;
+      align-items: center;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 28rpx;
+      color: #333333;
+      line-height: 40rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+      // 加粗
+      font-weight: bold;
+    }
+		::v-deep {
+			.u-textarea {
+				background: #F6F6F6;
+        border-radius: 24rpx 24rpx 24rpx 24rpx!important;
+				border: none;
+				padding: 18rpx;
+
+				.u-textarea__count {
+					background-color: transparent !important;
+				}
+			}
+		}
+	}
+
+	.goods-list {
+		margin: 0 30rpx;
+		padding: 30rpx 0;
+		border-bottom: 1rpx solid #F5F5F5;
+    .goods-name{
+      font-family: PingFang SC-Bold;
+      font-weight: 400;
+      font-size: 28rpx;
+      color: #333333;
+      line-height: 40rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+      // 加粗
+      font-weight: bold;
+    }
+    .goods-price{
+      font-family: D-DIN-Regular;
+      font-weight: 400;
+      font-size: 24rpx;
+      color: #333333;
+      line-height: 30rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+    }
+	}
+
+	.goods-total {
+		justify-content: flex-end;
+		margin: 27rpx 20rpx;
+	}
+
+
+	.address-box {
+		// width: 100%;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		padding: 30rpx 22rpx;
+		.address-view {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+
+			.t1 {
+				font-size: 28rpx;
+				margin-top: 10rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 500;
+				color: #141414;
+			}
+
+			.t2 {
+				font-size: 28rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 500;
+				color: #606060;
+				margin-top: 20rpx;
+			}
+		}
+	}
+  .bottom-navigation{
+    position: fixed;
+    // 文字垂直居中
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    bottom: 0;
+    height: 100rpx;
+    width: calc(100% - 40rpx);
+    background: #FFFFFF;
+    box-shadow: 0rpx -2rpx 0rpx 0rpx #F1F3F6;
+    border-radius: 24rpx 24rpx 0rpx 0rpx;
+    border: 0rpx solid #979797;
+    padding: 20rpx 20rpx 68rpx 20rpx ;
+    &-div{
+      height: 76rpx;
+      width: 404rpx;
+      // 文字垂直居中
+      display: flex;
+      align-items: center;
+      padding-left: 30rpx;
+      span{
+        font-family: PingFang SC, PingFang SC;
+        font-weight: 400;
+        font-size: 28rpx;
+        color: #333333;
+        line-height: 40rpx;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+        span{
+          font-family: D-DIN-Regular;
+          font-size: 24rpx;
+          color: #C29556;
+          span{
+            font-family: D-DIN-Bold;
+            font-size: 40rpx;
+          }
+        }
+      }
+
+    }
+
+    .course-button {
+      width: 264rpx;
+      height: 80rpx;
+      background: linear-gradient(315deg, #CA9359 0%, #E2B98E 100%);
+      border-radius: 292rpx 292rpx 292rpx 292rpx;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 28rpx;
+      color: #FFFFFF;
+      line-height: 36rpx;
+      text-align: center;
+      font-style: normal;
+      text-transform: none;
+      // 文字垂直居中
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+  }
+  .yuanjiao24{
+    border-radius: 24rpx 24rpx 24rpx 24rpx!important;
+  }
+  .space::before {
+    content: '\00A0'; /* 这是 &nbsp; 的 Unicode 码 */
+  }
+</style>

+ 486 - 442
subPages/settleCenter/settleCenter.vue

@@ -1,464 +1,508 @@
 <template>
-	<view class="common-page">
-		<!-- 地址 -->
-		<view class="common-card-box">
-			<view class="address-box" @click="selectAddress">
-				<view v-if="!mAddress || !mAddress.code" class="address-view">
-					<text class="t1" style="margin-top: 0;">请选择收货地址</text>
-				</view>
-				<view v-if="mAddress && mAddress.code" class="address-view">
-					<text class="t1" space="ensp">
-						{{mAddress.province}} {{mAddress.city}}{{mAddress.area}}{{mAddress.address}}</text>
-					<text class="t2" space="emsp">{{mAddress.name}} {{mAddress.phone}}</text>
-				</view>
-				<u-icon name="arrow-right" color="#AEAEAE" size="34rpx"></u-icon>
-			</view>
-		</view>
-		<!-- 已选商品 -->
-		<view class="common-card-box">
-			<view class="goods-list display-flex-center" v-for="(item, index) in goodsList" :key="index">
-				<image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 10rpx;flex-shrink: 0;"
-					:src="item.goods_cover" mode="aspectFill">
-				</image>
-				<view style="width: 100%;">
-					<view class="display-flex-between goods-name">
-						<text>{{item.goods_name}}</text>
-						<text>¥{{item.price_selling}}</text>
-					</view>
-					<view class="display-flex-between goods-number">
-						<text class="gray-tag">{{item.goods_spec}}</text>
-						<text>×{{item.stock_sales}}</text>
-					</view>
-				</view>
-			</view>
-			<view class="goods-total display-flex-center">
-				<text class="fs13 color-4a mr10">共{{orderData.number_goods}}件商品</text>
-				<view class="fs14 color-23 fw500">
-					商品总价:<text class="fs16 fw600 color-red">¥{{orderData.amount_goods}}</text>
-				</view>
-			</view>
-		</view>
-		<!-- 运费 -->
-		<view class="common-card good-card display-flex-between">
-			<view>运费</view>
-			<view>¥{{orderData.amount_express || 0}}</view>
-		</view>
-		<template v-if="pageOptions.isGift != '1' && pageOptions.type != 'msGoods'">
-			<!-- 优惠券 -->
-			<view class="common-card good-card display-flex-between" @click="choseCoupon">
-				<view>优惠券</view>
-				<text v-if="checkedCoupon.coupon_id">{{checkedCoupon.coupon_price}}</text>
-				<u-icon v-else name="arrow-right" color="#AEAEAE" size="34rpx"></u-icon>
-			</view>
-			<!--使用积分-->
-			<view class="common-card good-card display-flex-between" v-if="usePointsFlag">
-				<view>使用{{pointsShowData.points}}积分抵扣{{pointsShowData.price}}元</view>
-				<u-checkbox-group v-model="usePoints" size="20" activeColor="#F39800">
-					<u-checkbox :disabled="pointsDisabled" name="points" shape="circle" label=" "></u-checkbox>
-				</u-checkbox-group>
-			</view>
-		</template>
-		<!-- 留言 -->
-		<view class="common-card good-card">
-			<view class="fs14 mb10">留言</view>
-			<u--textarea height="110" v-model="order_remark" placeholder="100字以内" maxlength="100" count></u--textarea>
-		</view>
-		<view class="bottom-box display-flex-between">
-			<view>应付:¥{{payTotal}}</view>
-			<view class="common-btn" @click="toPay">去支付</view>
-		</view>
-		<!-- 优惠券选择 -->
-		<u-popup :show="showCoupon" :round="10" mode="bottom" @close="showCoupon = false">
-			<view class="coupon-list">
-				<view class="popop-title text-center mb30">
-					<text class="color-3 fw700 fs18">选择优惠券</text>
-					<view class="float-right" @click="showCoupon = false">
-						<u-icon name="close-circle" color="#8E8E8E" size="28"></u-icon>
-					</view>
-				</view>
-				<couponItem v-for="item in couponList" :key="item.id" :data="item" :config="getItemConfig(item)"
-					@on-click="handleItem(item)" />
-			</view>
-		</u-popup>
-	</view>
+  <view class="common-page">
+    <!-- 地址选择区域,点击可触发地址选择 -->
+    <view class="common-card-box">
+      <view class="address-box" @click="selectAddress">
+        <!-- 未选择地址时显示的提示 -->
+        <view v-if="!mAddress || !mAddress.code" class="address-view">
+          <text class="t1" style="margin-top: 0;">请选择收货地址</text>
+        </view>
+        <!-- 已选择地址时显示具体地址信息 -->
+        <view v-if="mAddress && mAddress.code" class="address-view">
+          <text class="t1" space="ensp">
+            {{ mAddress.province }} {{ mAddress.city }}{{ mAddress.area }}{{ mAddress.address }}
+          </text>
+          <text class="t2" space="emsp">{{ mAddress.name }} {{ mAddress.phone }}</text>
+        </view>
+        <!-- 右侧箭头图标,表示可以点击展开地址选择 -->
+        <u-icon name="arrow-right" color="#AEAEAE" size="34rpx"></u-icon>
+      </view>
+    </view>
+    <!-- 显示已选商品列表 -->
+    <view class="common-card-box">
+      <view class="goods-list display-flex-center" v-for="(item, index) in goodsList" :key="index">
+        <!-- 商品图片 -->
+        <image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 10rpx;flex-shrink: 0;"
+               :src="item.goods_cover" mode="aspectFill">
+        </image>
+        <!-- 商品名称、规格和数量 -->
+        <view style="width: 100%;">
+          <view class="display-flex-between goods-name">
+            <text>{{ item.goods_name }}</text>
+            <text>¥{{ item.price_selling }}</text>
+          </view>
+          <view class="display-flex-between goods-number">
+            <text class="gray-tag">{{ item.goods_spec }}</text>
+            <text>×{{ item.stock_sales }}</text>
+          </view>
+        </view>
+      </view>
+      <!-- 商品总价区域 -->
+      <view class="goods-total display-flex-center">
+        <text class="fs13 color-4a mr10">共{{ orderData.number_goods }}件商品</text>
+        <view class="fs14 color-23 fw500">
+          商品总价:
+          <text class="fs16 fw600 color-red">¥{{ orderData.amount_goods }}</text>
+        </view>
+      </view>
+    </view>
+    <!-- 运费显示区域 -->
+    <view class="common-card good-card display-flex-between">
+      <view>运费</view>
+      <view>¥{{ orderData.amount_express || 0 }}</view>
+    </view>
+    <!-- 优惠券和积分使用区域 -->
+    <template v-if="pageOptions.isGift != '1' && pageOptions.type != 'msGoods'">
+      <!-- 优惠券选择 -->
+      <view class="common-card good-card display-flex-between" @click="choseCoupon">
+        <view>优惠券</view>
+        <text v-if="checkedCoupon.coupon_id">{{ checkedCoupon.coupon_price }}</text>
+        <u-icon v-else name="arrow-right" color="#AEAEAE" size="34rpx"></u-icon>
+      </view>
+      <!-- 使用积分抵扣 -->
+      <view class="common-card good-card display-flex-between" v-if="usePointsFlag">
+        <view>使用{{ pointsShowData.points }}积分抵扣{{ pointsShowData.price }}元</view>
+        <u-checkbox-group v-model="usePoints" size="20" activeColor="#F39800">
+          <u-checkbox :disabled="pointsDisabled" name="points" shape="circle" label=" "></u-checkbox>
+        </u-checkbox-group>
+      </view>
+    </template>
+    <!-- 留言区域 -->
+    <view class="common-card good-card">
+      <view class="fs14 mb10">留言</view>
+      <u--textarea height="110" v-model="order_remark" placeholder="100字以内" maxlength="100" count></u--textarea>
+    </view>
+    <!-- 底部支付区域 -->
+    <view class="bottom-box display-flex-between">
+      <view>应付:¥{{ payTotal }}</view>
+      <view class="common-btn" @click="toPay">去支付</view>
+    </view>
+    <!-- 优惠券选择弹窗 -->
+    <u-popup :show="showCoupon" :round="10" mode="bottom" @close="showCoupon = false">
+      <view class="coupon-list">
+        <view class="popop-title text-center mb30">
+          <text class="color-3 fw700 fs18">选择优惠券</text>
+          <view class="float-right" @click="showCoupon = false">
+            <u-icon name="close-circle" color="#8E8E8E" size="28"></u-icon>
+          </view>
+        </view>
+        <!-- 优惠券列表 -->
+        <couponItem v-for="item in couponList" :key="item.id" :data="item" :config="getItemConfig(item)"
+                    @on-click="handleItem(item)"/>
+      </view>
+    </u-popup>
+  </view>
 </template>
 
 <script>
-	import couponItem from '@/subPages/coupon/couponItem.vue'
-	export default {
-		components: { couponItem },
-		data() {
-			return {
-				orderNo: '',
-				pageOptions: {},
-				showCoupon: false,
-				couponList: [],
+import couponItem from '@/subPages/coupon/couponItem.vue'
 
-				mAddress: {},
-				usePoints: [],
-				order_remark: '',
-				checkedCoupon: {},
-				goodsList: [],
-				orderData: { amount_goods: 0, amount_express: 0 },
-				cartIds: [],
-				pointsData: {},
-				pointsShowData: { price: 0, points: 0 },
-				usePointsFlag: true,
-			}
-		},
-		computed: {
-			payTotal() {
-				const { amount_goods = 0, amount_express = 0 } = this.orderData
-				let result = Number(amount_goods) + Number(amount_express)
-				if (this.checkedCoupon.coupon_id) {
-					result = result - Number(this.checkedCoupon.coupon_price)
-				}
-				if (this.integral == 1) {
-					result = result - Number(this.pointsShowData.price)
-				}
-				return result.toFixed(2)
-			},
-			integral() {
-				return this.usePoints.length
-			},
-			userPoints() {
-				const { integral_total = 0, integral_used = 0 } = JSON.parse(uni.getStorageSync('userInfo'))
-				return integral_total - integral_used
-			},
-			pointsDisabled() {
-				const { min_money, ratio, to_money } = this.pointsData
-				return min_money > this.orderData.amount_goods
-			},
+export default {
+  components: {couponItem},
+  data() {
+    return {
+      // 订单编号
+      orderNo: '',
+      // 页面选项
+      pageOptions: {},
+      // 优惠券弹窗显示标志
+      showCoupon: false,
+      // 优惠券列表
+      couponList: [],
 
-		},
-		watch: {
-			integral(nv) {
-				if (this.pageOptions.type != 'cart') {
-					this.$api.orderUserPoints({ order_no: this.orderNo, integral: nv })
-				}
-			},
-			'orderData.amount_goods'(nv) {
-				if (nv) {
-					console.log(899999, nv)
-					if (this.pageOptions.type != 'cart') {
-						this.$nextTick(() => {
-							this.getPoints()
-						})
-					}
-				}
-			}
-		},
-		onLoad(options) {
-			this.orderNo = options.orderNo
-			this.pageOptions = options
-			// const mData = uni.getStorageSync('selectTaskData') || undefined
-		},
-		onShow() {
-			const { type } = this.pageOptions
-			// this.getPoints()
-			if (type == 'cart') {
-				// 购物车下单
-				this.getCartData()
-				const selectAddress = uni.getStorageSync('selectAddress') || undefined
-				if (selectAddress) {
-					const tempAddress = JSON.parse(selectAddress)
-					if (!this.mAddress.code || (this.mAddress && this.mAddress.code != tempAddress.code)) {
-						this.mAddress = tempAddress
-						this.getExpressFee()
-					}
-					uni.removeStorageSync('selectAddress')
-				}
-			} else {
-				this.getCouponList()
-				this.getOrderDetail()
-			}
-		},
-		methods: {
-			getItemConfig(item) {
-				let itemConfig = {
-					btnText: '选择使用',
-					disabled: false,
-					btnPlain: true
-				}
-				if (item.coupon_id == this.checkedCoupon.coupon_id) {
-					itemConfig = {
-						btnText: '取消使用',
-						disabled: false,
-						btnPlain: true
-					}
-				}
-				return itemConfig
-			},
-			getPoints() {
-				this.$api.getPointsUseData().then(res => {
-					// console.log(2222, res)
-					if (!res.data.ratio) {
-						this.usePointsFlag = false
-						return
-					} else {
-						this.usePointsFlag = true
-					}
-					this.pointsData = res.data
-					const { min_money, ratio, to_money } = this.pointsData
-					const amount = this.orderData.amount_goods
-					if (this.orderData.integral) {
-						this.usePoints = ['points']
-						let price = this.orderData.integral_price
-						this.pointsShowData = {
-							price: price.toFixed(2),
-							points: Math.floor(price / to_money)
-						}
-					} else {
-						// let points = Math.floor(amount * ratio / 100)
-						// points = this.userPoints > points ? points : this.usePoints
-						// this.pointsShowData = {
-						// 	points,
-						// 	price: points * to_money
-						// }
-						let userPoints = 1000
-						let price = Math.floor(amount * ratio / 100)
-						console.log('price', price, to_money)
-						let points = price * to_money
-						console.log('points', points)
-						points = this.userPoints > points ? points : this.userPoints
-						price = points / to_money
-						console.log(133333, points, this.userPoints)
-						this.pointsShowData = {
-							points: Math.floor(points),
-							price: price.toFixed(2)
-						}
-					}
-				})
-			},
-			getCartData() {
-				this.cartIds = this.pageOptions.ids.split('_')
-				this.$api.createPrevOrderByCart({ id: this.cartIds }).then(res => {
-					const { items, coupons, count_total, amount_total, integral = {} } = res.data
-					this.goodsList = items.map(item => {
-						const { goods_spec, price_selling } = item.sku
-						item.stock_sales = item.num
-						item = {
-							goods_spec,
-							price_selling,
-							...item
-						}
-						return item
-					})
-					this.couponList = coupons
-					// 计算付款信息等
-					this.orderData.number_goods = count_total
-					this.orderData.amount_goods = amount_total
-					// const  {min_money, ratio, to_money} = integral
-					// let points = Math.floor(amount_total * ratio / 100)
-					// points = this.userPoints > points ? points : this.usePoints
-					if (res.data.integral_use && res.data.integral_price) {
-						this.usePointsFlag = true
-						this.pointsShowData = {
-							points: res.data.integral_use,
-							price: (res.data.integral_price).toFixed(2)
-						}
-					} else {
-						this.usePointsFlag = false
-					}
-				})
-			},
-			getExpressFee() {
-				this.$api.getPrevCartExpress({ id: this.cartIds, addr_code: this.mAddress.code }).then(res => {
-					this.orderData.amount_express = res.data
-				})
-			},
-			toPay() {
-				if (!this.mAddress.code) {
-					uni.showToast({
-						title: '请选择收货地址'
-					})
-					return
-				}
-				if (this.pageOptions.type == 'cart') {
-					const sendData = {
-						id: this.cartIds,
-						addr_code: this.mAddress.code,
-						coupon_id: this.checkedCoupon.id,
-						order_remark: this.order_remark,
-						integral: this.integral
-					}
-					this.$api.createOrderByCart(sendData).then(res => {
-						const { appId, nonceStr, paySign, signType, timeStamp } = res.data.param
-						console.log(333333555, res.data)
-						uni.requestPayment({
-							provider: 'wxpay',
-							nonceStr,
-							package: res.data.param.package,
-							paySign,
-							signType,
-							timeStamp,
-							success: function(success) {
-								uni.navigateTo({ url: `/subPages/paySuccess/paySuccess?orderNo=${res.data.order.order_no}` })
-							},
-							fail: function(err) {
-								uni.navigateTo({ url: `/subPages/orderDetail/orderDetail?orderNo=${res.data.order.order_no}` })
-							}
-						})
-					})
-				} else {
-					// 获取支付参数
-					this.$toWechatPay(this.orderNo, this.order_remark)
-				}
-			},
-			addressConfirm() {
-				// 选择地址确认
-				this.$api.submitOrderByAdress({ order_no: this.orderNo, code: this.mAddress.code }).then(res => {
-					this.orderData.amount_express = res.data.amount
-				})
-			},
-			choseCoupon() {
-				// 选择优惠券
-				if (this.couponList.length) {
-					this.showCoupon = true
-				} else {
-					uni.showToast({
-						title: '暂无可使用优惠券',
-						icon: 'none'
-					})
-				}
-			},
-			getCouponList() {
-				this.$api.getCouponByOrder({ order_no: this.orderNo }).then(res => {
-					this.couponList = res.data
-				})
-			},
-			handleItem(item) {
-				console.log(444, item)
-				this.showCoupon = false
-				if (item.coupon_id == this.checkedCoupon.coupon_id) {
-					this.checkedCoupon = { id: 0, coupon_id: 0 }
-				} else {
-					this.checkedCoupon = item
-				}
-				if (this.pageOptions.type != 'cart') {
-					this.$api.submitOrderByCoupon({ order_no: this.orderNo, id: this.checkedCoupon.id })
-				}
-			},
-			getOrderDetail() {
-				this.$api.orderDetail({ order_no: this.orderNo }).then(res => {
-					this.goodsList = res.data.items || []
-					this.orderData = res.data
-					this.checkedCoupon = res.data.coupon || {}
-					if (res.data.addr_code) {
-						// 已选地址
-						const {
-							address_area,
-							address_city,
-							address_province,
-							address_content,
-							address_name,
-							address_phone
-						} = res.data.truck || {}
-						this.mAddress = {
-							code: res.data.addr_code,
-							area: address_area,
-							city: address_city,
-							province: address_province,
-							address: address_content,
-							name: address_name,
-							phone: address_phone
-						}
-					}
-					const selectAddress = uni.getStorageSync('selectAddress') || undefined
-					if (selectAddress) {
-						const tempAddress = JSON.parse(selectAddress)
-						if (!this.mAddress.code || (this.mAddress && this.mAddress.code != tempAddress.code)) {
-							console.log(99999)
-							this.mAddress = tempAddress
-							this.addressConfirm()
-						}
-						// this.mAddress = tempAddress
-						console.log(23333, this.mAddress);
-						uni.removeStorageSync('selectAddress')
-					}
-				})
-			},
-			selectAddress() {
-				uni.navigateTo({
-					url: '/subPages/addressMg/addressMg?isBack=true'
-				})
-			}
-		}
-	}
+      // 收货地址
+      mAddress: {},
+      // 使用积分标志
+      usePoints: [],
+      // 订单备注
+      order_remark: '',
+      // 已选择的优惠券
+      checkedCoupon: {},
+      // 商品列表
+      goodsList: [],
+      // 订单数据,包括商品总价和运费等
+      orderData: {amount_goods: 0, amount_express: 0},
+      // 购物车商品ID列表
+      cartIds: [],
+      // 积分相关数据
+      pointsData: {},
+      // 积分显示数据
+      pointsShowData: {price: 0, points: 0},
+      // 使用积分标志
+      usePointsFlag: true,
+    }
+  },
+  computed: {
+    // 计算支付总价
+    payTotal() {
+      const {amount_goods = 0, amount_express = 0} = this.orderData
+      let result = Number(amount_goods) + Number(amount_express)
+      if (this.checkedCoupon.coupon_id) {
+        result = result - Number(this.checkedCoupon.coupon_price)
+      }
+      if (this.integral == 1) {
+        result = result - Number(this.pointsShowData.price)
+      }
+      return result.toFixed(2)
+    },
+    // 计算使用的积分数量
+    integral() {
+      return this.usePoints.length
+    },
+    // 计算用户可用积分
+    userPoints() {
+      const {integral_total = 0, integral_used = 0} = JSON.parse(uni.getStorageSync('userInfo'))
+      return integral_total - integral_used
+    },
+    // 积分使用限制判断
+    pointsDisabled() {
+      const {min_money, ratio, to_money} = this.pointsData
+      return min_money > this.orderData.amount_goods
+    },
+
+  },
+  watch: {
+    // 监听积分使用变化
+    integral(nv) {
+      if (this.pageOptions.type != 'cart') {
+        this.$api.orderUserPoints({order_no: this.orderNo, integral: nv})
+      }
+    },
+    // 监听商品总价变化
+    'orderData.amount_goods'(nv) {
+      if (nv) {
+        if (this.pageOptions.type != 'cart') {
+          this.$nextTick(() => {
+            this.getPoints()
+          })
+        }
+      }
+    }
+  },
+  onLoad(options) {
+    // 页面加载时获取订单编号和页面选项
+    this.orderNo = options.orderNo
+    this.pageOptions = options
+  },
+  onShow() {
+    // 页面显示时根据类型获取数据
+    const {type} = this.pageOptions
+    if (type == 'cart') {
+      this.getCartData()
+      const selectAddress = uni.getStorageSync('selectAddress') || undefined
+      if (selectAddress) {
+        const tempAddress = JSON.parse(selectAddress)
+        if (!this.mAddress.code || (this.mAddress && this.mAddress.code != tempAddress.code)) {
+          this.mAddress = tempAddress
+          this.getExpressFee()
+        }
+        uni.removeStorageSync('selectAddress')
+      }
+    } else {
+      this.getCouponList()
+      this.getOrderDetail()
+    }
+  },
+  methods: {
+    /**
+     * 获取优惠券配置
+     * @param {Object} item - 优惠券对象
+     * @returns {Object} - 优惠券配置对象
+     */
+    getItemConfig(item) {
+      let itemConfig = {
+        btnText: '选择使用',
+        disabled: false,
+        btnPlain: true
+      }
+      if (item.coupon_id == this.checkedCoupon.coupon_id) {
+        itemConfig = {
+          btnText: '取消使用',
+          disabled: false,
+          btnPlain: true
+        }
+      }
+      return itemConfig
+    },
+    /**
+     * 获取积分使用数据
+     */
+    getPoints() {
+      this.$api.getPointsUseData().then(res => {
+        if (!res.data.ratio) {
+          this.usePointsFlag = false
+          return
+        } else {
+          this.usePointsFlag = true
+        }
+        this.pointsData = res.data
+        const {min_money, ratio, to_money} = this.pointsData
+        const amount = this.orderData.amount_goods
+        if (this.orderData.integral) {
+          this.usePoints = ['points']
+          let price = this.orderData.integral_price
+          this.pointsShowData = {
+            price: price.toFixed(2),
+            points: Math.floor(price / to_money)
+          }
+        } else {
+          let userPoints = 1000
+          let price = Math.floor(amount * ratio / 100)
+          let points = price * to_money
+          points = this.userPoints > points ? points : this.userPoints
+          price = points / to_money
+          this.pointsShowData = {
+            points: Math.floor(points),
+            price: price.toFixed(2)
+          }
+        }
+      })
+    },
+    /**
+     * 获取购物车数据
+     */
+    getCartData() {
+      this.cartIds = this.pageOptions.ids.split('_')
+      this.$api.createPrevOrderByCart({id: this.cartIds}).then(res => {
+        const {items, coupons, count_total, amount_total, integral = {}} = res.data
+        this.goodsList = items.map(item => {
+          const {goods_spec, price_selling} = item.sku
+          item.stock_sales = item.num
+          item = {
+            goods_spec,
+            price_selling,
+            ...item
+          }
+          return item
+        })
+        this.couponList = coupons
+        this.orderData.number_goods = count_total
+        this.orderData.amount_goods = amount_total
+        if (res.data.integral_use && res.data.integral_price) {
+          this.usePointsFlag = true
+          this.pointsShowData = {
+            points: res.data.integral_use,
+            price: (res.data.integral_price).toFixed(2)
+          }
+        } else {
+          this.usePointsFlag = false
+        }
+      })
+    },
+    /**
+     * 获取运费
+     */
+    getExpressFee() {
+      this.$api.getPrevCartExpress({id: this.cartIds, addr_code: this.mAddress.code}).then(res => {
+        this.orderData.amount_express = res.data
+      })
+    },
+    /**
+     * 前往支付
+     */
+    toPay() {
+      if (!this.mAddress.code) {
+        uni.showToast({
+          title: '请选择收货地址'
+        })
+        return
+      }
+      if (this.pageOptions.type == 'cart') {
+        const sendData = {
+          id: this.cartIds,
+          addr_code: this.mAddress.code,
+          coupon_id: this.checkedCoupon.id,
+          order_remark: this.order_remark,
+          integral: this.integral
+        }
+        this.$api.createOrderByCart(sendData).then(res => {
+          const {appId, nonceStr, paySign, signType, timeStamp} = res.data.param
+          uni.requestPayment({
+            provider: 'wxpay',
+            nonceStr,
+            package: res.data.param.package,
+            paySign,
+            signType,
+            timeStamp,
+            success: function (success) {
+              uni.navigateTo({url: `/subPages/paySuccess/paySuccess?orderNo=${res.data.order.order_no}`})
+            },
+            fail: function (err) {
+              uni.navigateTo({url: `/subPages/orderDetail/orderDetail?orderNo=${res.data.order.order_no}`})
+            }
+          })
+        })
+      } else {
+        // uni.navigateTo({url: `/subPages/paySuccess/paySuccess?orderNo=${this.orderNo}`})
+        this.$toWechatPay(this.orderNo, this.order_remark)
+      }
+    },
+    /**
+     * 地址确认
+     */
+    addressConfirm() {
+      this.$api.submitOrderByAdress({order_no: this.orderNo, code: this.mAddress.code}).then(res => {
+        this.orderData.amount_express = res.data.amount
+      })
+    },
+    /**
+     * 选择优惠券
+     */
+    choseCoupon() {
+      if (this.couponList.length) {
+        this.showCoupon = true
+      } else {
+        uni.showToast({
+          title: '暂无可使用优惠券',
+          icon: 'none'
+        })
+      }
+    },
+    /**
+     * 获取优惠券列表
+     */
+    getCouponList() {
+      this.$api.getCouponByOrder({order_no: this.orderNo}).then(res => {
+        this.couponList = res.data
+      })
+    },
+    /**
+     * 处理优惠券选择
+     * @param {Object} item - 优惠券对象
+     */
+    handleItem(item) {
+      this.showCoupon = false
+      if (item.coupon_id == this.checkedCoupon.coupon_id) {
+        this.checkedCoupon = {id: 0, coupon_id: 0}
+      } else {
+        this.checkedCoupon = item
+      }
+      if (this.pageOptions.type != 'cart') {
+        this.$api.submitOrderByCoupon({order_no: this.orderNo, id: this.checkedCoupon.id})
+      }
+    },
+    /**
+     * 获取订单详情
+     */
+    getOrderDetail() {
+      this.$api.orderDetail({order_no: this.orderNo}).then(res => {
+        this.goodsList = res.data.items || []
+        this.orderData = res.data
+        this.checkedCoupon = res.data.coupon || {}
+        if (res.data.addr_code) {
+          const {
+            address_area,
+            address_city,
+            address_province,
+            address_content,
+            address_name,
+            address_phone
+          } = res.data.truck || {}
+          this.mAddress = {
+            code: res.data.addr_code,
+            area: address_area,
+            city: address_city,
+            province: address_province,
+            address: address_content,
+            name: address_name,
+            phone: address_phone
+          }
+        }
+        const selectAddress = uni.getStorageSync('selectAddress') || undefined
+        if (selectAddress) {
+          const tempAddress = JSON.parse(selectAddress)
+          if (!this.mAddress.code || (this.mAddress && this.mAddress.code != tempAddress.code)) {
+            this.mAddress = tempAddress
+            this.addressConfirm()
+          }
+          uni.removeStorageSync('selectAddress')
+        }
+      })
+    },
+    /**
+     * 选择地址
+     */
+    selectAddress() {
+      uni.navigateTo({
+        url: '/subPages/addressMg/addressMg?isBack=true'
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-	.coupon-list {
-		padding: 40rpx 20rpx;
-	}
+.coupon-list {
+  padding: 40rpx 20rpx;
+}
 
-	.common-page {
-		height: 100vh;
-		overflow-y: auto;
-		padding: 20rpx;
-		color: #2C2C2C;
-		padding-bottom: 188rpx;
-		box-sizing: border-box;
-	}
+.common-page {
+  height: 100vh;
+  overflow-y: auto;
+  padding: 20rpx;
+  color: #2C2C2C;
+  padding-bottom: 188rpx;
+  box-sizing: border-box;
+}
 
-	.good-card {
-		padding: 38rpx 22rpx;
-		color: #7A7A7A;
+.good-card {
+  padding: 38rpx 22rpx;
+  color: #7A7A7A;
 
-		::v-deep {
-			.u-textarea {
-				background: #F6F6F6;
-				border-radius: 12rpx 12rpx 12rpx 12rpx;
-				border: none;
-				padding: 18rpx;
+  ::v-deep {
+    .u-textarea {
+      background: #F6F6F6;
+      border-radius: 12rpx 12rpx 12rpx 12rpx;
+      border: none;
+      padding: 18rpx;
 
-				.u-textarea__count {
-					background-color: transparent !important;
-				}
-			}
-		}
-	}
+      .u-textarea__count {
+        background-color: transparent !important;
+      }
+    }
+  }
+}
 
-	.goods-list {
-		margin: 0 30rpx;
-		padding: 30rpx 0;
-		border-bottom: 1rpx solid #F5F5F5;
-	}
+.goods-list {
+  margin: 0 30rpx;
+  padding: 30rpx 0;
+  border-bottom: 1rpx solid #F5F5F5;
+}
 
-	.goods-total {
-		justify-content: flex-end;
-		margin: 27rpx 20rpx;
-	}
+.goods-total {
+  justify-content: flex-end;
+  margin: 27rpx 20rpx;
+}
 
 
-	.address-box {
-		// width: 100%;
-		display: flex;
-		flex-direction: row;
-		align-items: center;
-		padding: 56rpx 22rpx;
+.address-box {
+  // width: 100%;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  padding: 56rpx 22rpx;
 
 
-		.address-view {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
+  .address-view {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
 
-			.t1 {
-				font-size: 28rpx;
-				margin-top: 10rpx;
-				font-family: PingFang SC-Medium, PingFang SC;
-				font-weight: 500;
-				color: #141414;
-			}
+    .t1 {
+      font-size: 28rpx;
+      margin-top: 10rpx;
+      font-family: PingFang SC-Medium, PingFang SC;
+      font-weight: 500;
+      color: #141414;
+    }
 
-			.t2 {
-				font-size: 28rpx;
-				font-family: PingFang SC-Medium, PingFang SC;
-				font-weight: 500;
-				color: #606060;
-				margin-top: 20rpx;
-			}
-		}
-	}
+    .t2 {
+      font-size: 28rpx;
+      font-family: PingFang SC-Medium, PingFang SC;
+      font-weight: 500;
+      color: #606060;
+      margin-top: 20rpx;
+    }
+  }
+}
 </style>