index.vue 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821
  1. <template>
  2. <view :style="colorStyle">
  3. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
  4. bgcolor="#FFF"></skeleton>
  5. <!-- 头部 -->
  6. <!-- #ifdef APP-PLUS -->
  7. <view class="navbar" :style="{ height: navH + 'rpx', opacity: opacity, paddingTop: sysHeight }">
  8. <!-- #endif -->
  9. <!-- #ifndef APP-PLUS -->
  10. <view class='navbar' :style="{height:navH+'rpx',opacity:opacity}">
  11. <!-- #endif -->
  12. <view class='navbarH' :style='"height:"+navH+"rpx;"'>
  13. <view class='navbarCon acea-row row-center-wrapper'>
  14. <view class="header acea-row row-center-wrapper">
  15. <view class="item" :class="navActive === index ? 'on' : ''" v-for="(item,index) in navList"
  16. :key='index' @tap="tap(item,index)">
  17. {{ item }}
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- #ifdef APP-PLUS -->
  24. <view id="home" class="home-nav acea-row row-center-wrapper" :class="[opacity>0.5?'on':'']"
  25. :style="{ top:(navH/2-28)+'rpx' ,marginTop:sysHeight}">
  26. <!-- #endif -->
  27. <!-- #ifndef APP-PLUS -->
  28. <view id="home" class="home-nav acea-row row-center-wrapper" :class="[opacity>0.5?'on':'']"
  29. :style="{ top: homeTop +'rpx'}">
  30. <!-- #endif -->
  31. <view class="iconfont icon-fanhui2" @tap="returns"></view>
  32. <!-- #ifdef MP -->
  33. <view class="line"></view>
  34. <view class="iconfont icon-gengduo5" @click="moreNav"></view>
  35. <!-- #endif -->
  36. </view>
  37. <!-- #ifdef APP-PLUS -->
  38. <view id="home" class="home-nav right acea-row row-center-wrapper" :class="[opacity>0.5?'on':'']"
  39. :style="{ top:(navH/2-28)+'rpx' ,marginTop:sysHeight}">
  40. <!-- #endif -->
  41. <!-- #ifdef H5 -->
  42. <view id="home" class="home-nav right acea-row row-center-wrapper" :class="[opacity>0.5?'on':'']"
  43. :style="{ top: homeTop +'rpx'}">
  44. <!-- #endif -->
  45. <!-- #ifdef APP-PLUS || H5 -->
  46. <view class="iconfont icon-gengduo2" @click="moreNav"></view>
  47. </view>
  48. <!-- #endif -->
  49. <homeList :navH="navH" :returnShow="returnShow" :currentPage="currentPage" :sysHeight="sysHeight"></homeList>
  50. <view class='product-con skeleton' :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  51. <scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
  52. :style="'height:'+height+'px;'" @scroll="scroll">
  53. <view id="past0">
  54. <productConSwiper class="skeleton-rect" :imgUrls='imgUrls'></productConSwiper>
  55. <view class="bg-color">
  56. <view class='nav acea-row row-between-wrapper'>
  57. <view class='money skeleton-rect'>¥<text class='num'>{{storeInfo.price}}</text>
  58. <text
  59. v-if="attribute.productAttr.length && (attribute.productAttr.length?attribute.productAttr[0].attr_values.length:0) > 1">起</text>
  60. <text class='y-money'>¥{{storeInfo.ot_price}}</text>
  61. </view>
  62. <view class='acea-row row-middle skeleton-rect'>
  63. <view class='timeItem' v-if="status == 1">
  64. <view>距秒杀结束仅剩</view>
  65. <countDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '"
  66. :minute-text="' : '" :second-text="' '" :datatime="datatime"
  67. style="margin-top: 4rpx;"></countDown>
  68. </view>
  69. <!-- <view class="timeState" wx:if="{{status == 0}}">已结束</view>
  70. <view class="timeState" wx:if="{{status == 2}}">即将开始</view> -->
  71. <!-- <view class='iconfont icon-jiantou'></view> -->
  72. </view>
  73. </view>
  74. </view>
  75. <view class='wrapper'>
  76. <view class='introduce acea-row row-between'>
  77. <view class='infor skeleton-rect'>
  78. <span class='labelN' v-if="storeInfo.brand_name && storeInfo.brand_name.trim()">{{storeInfo.brand_name}}</span>
  79. {{storeInfo.title}}
  80. </view>
  81. <!-- <button class='iconfont icon-fenxiang' open-type='share'></button> -->
  82. <view class='iconfont icon-fenxiang skeleton-rect' @click="listenerActionSheet" v-if="base64Show"></view>
  83. </view>
  84. <view class='label acea-row row-middle skeleton-rect'>
  85. <!-- <view class='stock'>库存:{{storeInfo.stock}}{{storeInfo.unit_name}}</view> -->
  86. <view class='stock'>累计销售:{{storeInfo.total?storeInfo.total:0}}{{storeInfo.unit_name || ''}}
  87. </view>
  88. <view>限量: {{ storeInfo.quota_show ? storeInfo.quota_show : 0 }}{{storeInfo.unit_name || ''}}
  89. </view>
  90. </view>
  91. </view>
  92. <view class='attribute skeleton-rect'>
  93. <view v-if='attribute.productAttr.length' @tap='selecAttr' class="attrInfo">
  94. <view class="acea-row row-between-wrapper">
  95. <view class="attrValue line1">{{attr}}:<text class='atterTxt'>{{attrValue}}</text></view>
  96. <view class='iconfont icon-jiantou'></view>
  97. </view>
  98. <view class="acea-row row-between-wrapper mt7" v-if="skuArr.length > 1">
  99. <view class="flex">
  100. <image :src="item.image" v-for="(item,index) in skuArr.slice(0,4)" :key="index" class="attrImg"></image>
  101. </view>
  102. <view class="switchTxt">共{{skuArr.length}}种规格可选</view>
  103. </view>
  104. </view>
  105. <view class="storeInfo acea-row row-between row-top" v-if="isMention && storeLen" @tap="showStoreList">
  106. <view class="acea-row row-top row-between">
  107. 门店:
  108. <storeLis :num='1' :ids="parseInt(storeInfo.product_id)" @getStoreList="getStoreList"></storeLis>
  109. </view>
  110. <view class="iconfont icon-jiantou"></view>
  111. </view>
  112. </view>
  113. </view>
  114. <view class='userEvaluation skeleton-rect' id="past1" v-if="replyCount">
  115. <view class='title acea-row row-between-wrapper'>
  116. <view>用户评价({{replyCount}})</view>
  117. <navigator class='praise' hover-class='none'
  118. :url="'/pages/goods/goods_comment_list/index?product_id='+storeInfo.product_id">
  119. <text class='font-color'>{{replyChance}}%</text>好评率
  120. <text class='iconfont icon-jiantou'></text>
  121. </navigator>
  122. </view>
  123. <userEvaluation :reply="reply"></userEvaluation>
  124. </view>
  125. <view class='product-intro' id="past2">
  126. <view class='title'>产品介绍</view>
  127. <view class='conter'>
  128. <jyf-parser :html="storeInfo.description" ref="article" :tag-style="tagStyle"></jyf-parser>
  129. </view>
  130. </view>
  131. </scroll-view>
  132. <view class='footer acea-row row-between-wrapper'>
  133. <!-- #ifdef MP -->
  134. <!-- <button open-type="contact" hover-class='none' class='item'>
  135. <view class='iconfont icon-kefu'></view>
  136. <view class="p_center">客服</view>
  137. </button> -->
  138. <!-- #endif -->
  139. <!-- #ifndef MP -->
  140. <!-- <navigator hover-class="none" class="item" url="/pages/customer_list/chat">
  141. <view class="iconfont icon-kefu"></view>
  142. <view class="p_center">客服</view>
  143. </navigator> -->
  144. <!-- #endif -->
  145. <navigator hover-class="none" open-type="switchTab" class="item skeleton-rect" url="/pages/index/index">
  146. <view class="iconfont icon-shouye6"></view>
  147. <view class="p_center">首页</view>
  148. </navigator>
  149. <view @tap='setCollect' class='item skeleton-rect'>
  150. <view class='iconfont icon-shoucang1' v-if="storeInfo.userCollect"></view>
  151. <view class='iconfont icon-shoucang' v-else></view>
  152. <view class="p_center">收藏</view>
  153. </view>
  154. <view class="bnt acea-row skeleton-rect"
  155. v-if="status == 1 && attribute.productSelect.quota > 0 && attribute.productSelect.product_stock>0">
  156. <view class="joinCart bnts" @tap="openAlone">单独购买</view>
  157. <view class="buy bnts" @tap="goCat">立即购买</view>
  158. </view>
  159. <view class="bnt acea-row skeleton-rect"
  160. v-if="(status == 1 && attribute.productSelect.quota <= 0) || (status == 3 && attribute.productSelect.quota <= 0) || (status == 1 && attribute.productSelect.product_stock <= 0) || (status == 3 && attribute.productSelect.product_stock <= 0)">
  161. <view class="joinCart bnts" @tap="openAlone">单独购买</view>
  162. <view class="buy bnts bg-color-hui">已售罄</view>
  163. </view>
  164. <view class="bnt acea-row skeleton-rect" v-if="!dataShow && status == 1">
  165. <view class="joinCart bnts" @tap="openAlone">单独购买</view>
  166. <view class="buy bnts bg-color-hui">立即购买</view>
  167. </view>
  168. <view class="bnt acea-row skeleton-rect" v-if="status == 2">
  169. <view class="joinCart bnts" @tap="openAlone">单独购买</view>
  170. <view class="buy bnts bg-color-hui">未开始</view>
  171. </view>
  172. <view class="bnt acea-row skeleton-rect" v-if="status == 0">
  173. <view class="joinCart bnts" @tap="openAlone">单独购买</view>
  174. <view class="buy bnts bg-color-hui">已结束</view>
  175. </view>
  176. </view>
  177. </view>
  178. <product-window :attr='attribute' :limitNum='1' :cusPreviewImg='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" :type="'seckill'"
  179. @ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" @getImg="showImg" @deliveryFun="deliveryFun" @onAddressId="onAddressId" @onstoreId="onstoreId"></product-window>
  180. <!-- 分享按钮 -->
  181. <view class="generate-posters" :class="posters ? 'on' : ''">
  182. <view class="generateCon acea-row row-middle">
  183. <!-- #ifndef MP -->
  184. <button class="item" hover-class='none' v-if="weixinStatus === true" @click="H5ShareBox = true">
  185. <!-- <button class="item" hover-class='none' v-if="weixinStatus === true" @click="setShareInfoStatus"> -->
  186. <!-- <view class="iconfont icon-weixin3"></view> -->
  187. <view class="pictrue">
  188. <image src="../../../static/images/weixin.png"></image>
  189. </view>
  190. <view class="">分享给好友</view>
  191. </button>
  192. <!-- #endif -->
  193. <!-- #ifdef MP -->
  194. <button class="item" open-type="share" hover-class='none'>
  195. <!-- <view class="iconfont icon-weixin3"></view> -->
  196. <view class="pictrue">
  197. <image src="../../../static/images/weixin.png"></image>
  198. </view>
  199. <view class="">分享给好友</view>
  200. </button>
  201. <!-- #endif -->
  202. <!-- #ifdef APP-PLUS -->
  203. <view class="item" @click="appShare('WXSceneSession')">
  204. <!-- <view class="iconfont icon-weixin3"></view> -->
  205. <view class="pictrue">
  206. <image src="../../../static/images/weixin.png"></image>
  207. </view>
  208. <view class="">分享给好友</view>
  209. </view>
  210. <!-- <view class="item" @click="appShare('WXSenceTimeline')">
  211. <view class="iconfont icon-pengyouquan"></view>
  212. <view class="">微信朋友圈</view>
  213. </view> -->
  214. <!-- #endif -->
  215. <view class="item" @click="getpreviewImage">
  216. <view class="pictrue">
  217. <image src="../../../static/images/changan.png"></image>
  218. </view>
  219. <view class="">预览发图</view>
  220. </view>
  221. <!-- #ifndef H5 -->
  222. <button class="item" hover-class='none' @tap="savePosterPath">
  223. <!-- <view class="iconfont icon-haibao"></view> -->
  224. <view class="pictrue">
  225. <image src="../../../static/images/haibao.png"></image>
  226. </view>
  227. <view class="">保存海报</view>
  228. </button>
  229. <!-- #endif -->
  230. </view>
  231. <view class="generateClose acea-row row-center-wrapper" @click="posterImageClose">取消</view>
  232. </view>
  233. <view class="mask" v-if="posters"></view>
  234. <!-- 海报展示 -->
  235. <view class='poster-pop' v-if="posterImageStatus">
  236. <!-- <image src='/static/images/poster-close.png' class='close' @click="posterImageClose"></image> -->
  237. <image :src='posterImage'></image>
  238. <!-- #ifndef H5 -->
  239. <!-- <view class='save-poster' @click="savePosterPath">保存到手机</view> -->
  240. <!-- #endif -->
  241. <!-- #ifdef H5 -->
  242. <!-- <view class="keep">长按图片可以保存到手机</view> -->
  243. <!-- #endif -->
  244. </view>
  245. <view class='mask1' v-if="posterImageStatus"></view>
  246. <canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas>
  247. <kefuIcon :ids='storeInfo.product_id' :routineContact='routineContact'></kefuIcon>
  248. <!-- 发送给朋友图片 -->
  249. <view class="share-box" v-if="H5ShareBox">
  250. <image :src="imgHost + '/statics/images/share-info.png'" @click="H5ShareBox = false"></image>
  251. </view>
  252. <!-- #ifdef H5 || APP-PLUS -->
  253. <zb-code ref="qrcode" :show="codeShow" :cid="cid" :val="codeVal" :size="size" :unit="unit" :background="background"
  254. :foreground="foreground" :pdground="pdground" :icon="codeIcon" :iconSize="iconsize" :onval="onval"
  255. :loadMake="loadMake" @result="qrR" />
  256. <!-- #endif -->
  257. <cusPreviewImg ref="cusPreviewImg" :list="skuArr" @changeSwitch="changeSwitch"></cusPreviewImg>
  258. </view>
  259. </template>
  260. <script>
  261. const app = getApp();
  262. let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  263. import zbCode from '@/components/zb-code/zb-code.vue'
  264. import {
  265. mapGetters
  266. } from "vuex";
  267. import {
  268. getSeckillDetail,
  269. seckillCode
  270. } from '@/api/activity.js';
  271. import {
  272. postCartAdd,
  273. collectAdd,
  274. collectDel
  275. } from '@/api/store.js';
  276. import storeLis from '@/components/storeLis';
  277. import productConSwiper from '@/components/productConSwiper/index.vue'
  278. import productWindow from '@/components/productWindow/index.vue'
  279. import userEvaluation from '@/components/userEvaluation/index.vue'
  280. import kefuIcon from '@/components/kefuIcon';
  281. import cusPreviewImg from '@/components/cusPreviewImg';
  282. import homeList from '@/components/homeList'
  283. import parser from "@/components/jyf-parser/jyf-parser";
  284. import countDown from '@/components/countDown';
  285. import {
  286. imageBase64
  287. } from "@/api/public";
  288. import {
  289. toLogin
  290. } from '@/libs/login.js';
  291. import {
  292. silenceBindingSpread
  293. } from "@/utils";
  294. import {
  295. getUserInfo
  296. } from '@/api/user.js';
  297. import {
  298. TOKENNAME,
  299. HTTP_REQUEST_URL
  300. } from '@/config/app.js';
  301. import {Debounce} from '@/utils/validate.js'
  302. import colors from '@/mixins/color.js';
  303. export default {
  304. computed: mapGetters(['isLogin']),
  305. mixins:[colors],
  306. data() {
  307. return {
  308. showSkeleton: true, //骨架屏显示隐藏
  309. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  310. dataShow: 0,
  311. id: 0,
  312. time: 0,
  313. countDownHour: "00",
  314. countDownMinute: "00",
  315. countDownSecond: "00",
  316. storeInfo: {
  317. brand_name:''
  318. },
  319. imgUrls: [],
  320. parameter: {
  321. 'navbar': '1',
  322. 'return': '1',
  323. 'title': '抢购详情页',
  324. 'color': false
  325. },
  326. attribute: {
  327. cartAttr: false,
  328. productAttr: [],
  329. productSelect: {},
  330. deliveryType:[],
  331. isType:0,
  332. relation_id:0,
  333. store_self_mention:0
  334. },
  335. productValue: [],
  336. isOpen: false,
  337. attr: '请选择',
  338. attrValue: '',
  339. status: 1,
  340. isAuto: false,
  341. isShowAuth: false,
  342. iShidden: false,
  343. limitNum: 1, //限制本属性产品的个数;
  344. iSplus: false,
  345. replyCount: 0, //总评论数量
  346. reply: [], //评论列表
  347. replyChance: 0,
  348. navH: "",
  349. navList: ['商品', '评价', '详情'],
  350. opacity: 0,
  351. scrollY: 0,
  352. topArr: [],
  353. toView: '',
  354. height: 0,
  355. heightArr: [],
  356. lock: false,
  357. scrollTop: 0,
  358. tagStyle: {
  359. img: 'width:100%;display:block;',
  360. table: 'width:100%',
  361. video: 'width:100%'
  362. },
  363. datatime: 0,
  364. navActive: 0,
  365. meunHeight: 0,
  366. backH: '',
  367. posters: false,
  368. weixinStatus: false,
  369. posterImageStatus: false,
  370. canvasStatus: false, //海报绘图标签
  371. storeImage: '', //海报产品图
  372. PromotionCode: '', //二维码图片
  373. posterImage: '', //海报路径
  374. posterbackgd: '/static/images/posterbackgd.png',
  375. actionSheetHidden: false,
  376. cart_num: '',
  377. homeTop: 20,
  378. returnShow: true,
  379. H5ShareBox: false, //公众号分享图片
  380. routineContact: 0,
  381. siteName:'', //商城名称
  382. themeColor:'',
  383. fontColor:'',
  384. skuArr:[],
  385. //二维码参数
  386. codeShow: false,
  387. cid: '1',
  388. codeVal: "", // 要生成的二维码值
  389. size: 200, // 二维码大小
  390. unit: 'upx', // 单位
  391. background: '#FFF', // 背景色
  392. foreground: '#000', // 前景色
  393. pdground: '#000', // 角标色
  394. codeIcon: '', // 二维码图标
  395. iconsize: 40, // 二维码图标大小
  396. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  397. onval: true, // val值变化时自动重新生成二维码
  398. loadMake: true, // 组件加载完成后自动生成二维码
  399. base64Show: 0,
  400. shareQrcode: 0,
  401. followCode:'',
  402. selectSku:{},
  403. currentPage:false,
  404. sysHeight: sysHeight,
  405. isMention: false, //是否存在到店自提
  406. storeLen:1,
  407. imgHost:HTTP_REQUEST_URL,
  408. addressId:'',
  409. store_id :'',
  410. delivery_type:0,
  411. store_name:'',
  412. }
  413. },
  414. components: {
  415. zbCode,
  416. storeLis,
  417. productConSwiper,
  418. 'productWindow': productWindow,
  419. userEvaluation,
  420. kefuIcon,
  421. cusPreviewImg,
  422. "jyf-parser": parser,
  423. countDown,
  424. homeList
  425. },
  426. computed: mapGetters(['isLogin']),
  427. watch: {
  428. isLogin: {
  429. handler: function(newV, oldV) {
  430. if (newV) {
  431. this.getSeckillDetail();
  432. }
  433. },
  434. deep: true
  435. }
  436. },
  437. onLoad(options) {
  438. let that = this
  439. let statusBarHeight = ''
  440. var pages = getCurrentPages();
  441. that.returnShow = pages.length === 1 ? false : true;
  442. //设置商品列表高度
  443. uni.getSystemInfo({
  444. success: function(res) {
  445. that.height = res.windowHeight
  446. statusBarHeight = res.statusBarHeight
  447. //res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
  448. },
  449. });
  450. this.isLogin && silenceBindingSpread();
  451. // #ifndef APP-PLUS
  452. this.navH = app.globalData.navHeight
  453. // #endif
  454. // #ifdef APP-PLUS
  455. this.navH = 90
  456. // #endif
  457. // #ifdef MP
  458. let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
  459. this.meunHeight = menuButtonInfo.height
  460. this.backH = (that.navH / 2) + (this.meunHeight / 2)
  461. //扫码携带参数处理
  462. if (options.scene) {
  463. let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
  464. if (value.id) {
  465. this.id = value.id;
  466. } else {
  467. this.showSkeleton = false;
  468. return this.$util.Tips({
  469. title: '缺少参数无法查看商品'
  470. }, {
  471. tab: 3,
  472. url: 1
  473. });
  474. }
  475. //记录推广人uid
  476. if (value.pid) app.globalData.spid = value.pid;
  477. // if (value.time) this.datatime = value.time
  478. }
  479. // #endif
  480. if (options.id) {
  481. this.id = options.id
  482. // this.status = options.status
  483. //记录推广人uid
  484. if (options.pid) app.globalData.spid = options.pid;
  485. // if (options.time) this.datatime = Number(options.time);
  486. }
  487. if (this.isLogin && options.id) {
  488. // #ifdef MP
  489. that.downloadFilePromotionCode();
  490. // #endif
  491. this.getSeckillDetail();
  492. } else {
  493. toLogin();
  494. }
  495. this.$nextTick(() => {
  496. // #ifdef MP
  497. const menuButton = uni.getMenuButtonBoundingClientRect();
  498. const query = uni.createSelectorQuery().in(this);
  499. query
  500. .select('#home')
  501. .boundingClientRect(data => {
  502. this.homeTop = menuButton.top * 2 + menuButton.height - data.height;
  503. })
  504. .exec();
  505. // #endif
  506. })
  507. this.colorData();
  508. let color = [
  509. {themeColor:'#1DB0FC',fontColor:'#FD502F'},
  510. {themeColor:'#42CA4D',fontColor:'#FF7600'},
  511. {themeColor:'#e93323',fontColor:'#e93323'},
  512. {themeColor:'#FF448F',fontColor:'#FF448F'},
  513. {themeColor:'#FE5C2D',fontColor:'#FE5C2D'}
  514. ];
  515. setTimeout(()=>{
  516. switch (this.colorNum) {
  517. case 1:
  518. this.themeColor = color[0].themeColor;
  519. this.fontColor = color[0].fontColor;
  520. break;
  521. case 2:
  522. this.themeColor = color[1].themeColor;
  523. this.fontColor = color[1].fontColor;
  524. break;
  525. case 3:
  526. this.themeColor = color[2].themeColor;
  527. this.fontColor = color[2].fontColor;
  528. break;
  529. case 4:
  530. this.themeColor = color[3].themeColor;
  531. this.fontColor = color[3].fontColor;
  532. break;
  533. case 5:
  534. this.themeColor = color[4].themeColor;
  535. this.fontColor = color[4].fontColor;
  536. break;
  537. default:
  538. this.themeColor = color[2].themeColor;
  539. this.fontColor = color[2].fontColor;
  540. break
  541. }
  542. },1)
  543. },
  544. onReady(){
  545. this.isNodes++;
  546. // #ifdef H5
  547. this.codeVal = window.location.origin + '/pages/activity/goods_seckill_details/index?id=' + this.id +
  548. '&pid=' + this.$store.state.app.uid
  549. // #endif
  550. // #ifdef APP-PLUS
  551. this.codeVal = HTTP_REQUEST_URL + '/pages/activity/goods_seckill_details/index?id=' + this.id +
  552. '&pid=' + this.$store.state.app.uid
  553. // #endif
  554. },
  555. onShow(){
  556. uni.removeStorageSync('form_type_cart');
  557. },
  558. methods: {
  559. // 获取配送方式
  560. deliveryFun(e){
  561. this.delivery_type = e;
  562. },
  563. // 获取配送地址id
  564. onAddressId(row){
  565. this.addressId=row.id
  566. },
  567. // 获取自提地址id
  568. onstoreId(row) {
  569. this.store_id = row.id;
  570. this.store_name = row.name;
  571. },
  572. getStoreList(len){
  573. this.storeLen = len;
  574. },
  575. showStoreList(){
  576. uni.navigateTo({
  577. url: '/pages/goods/goods_details_store/index'
  578. })
  579. },
  580. moreNav(){
  581. this.currentPage = !this.currentPage
  582. },
  583. //点击sku图片打开轮播图
  584. showImg(index){
  585. this.$refs.cusPreviewImg.open(this.selectSku.suk)
  586. },
  587. //滑动轮播图选择商品
  588. changeSwitch(e){
  589. let productSelect = this.skuArr[e];
  590. this.$set(this,'selectSku',productSelect);
  591. var skuList = productSelect.suk.split(',');
  592. skuList.forEach((i,index)=>{
  593. this.$set(this.attribute.productAttr[index],'index',skuList[index]);
  594. })
  595. if (productSelect) {
  596. this.$set(this.attribute.productSelect, "image", productSelect.image);
  597. this.$set(this.attribute.productSelect, "price", productSelect.price);
  598. this.$set(this.attribute.productSelect, "stock", productSelect.stock);
  599. this.$set(this.attribute.productSelect, "unique", productSelect.unique);
  600. this.$set(this.attribute.productSelect, "cart_num", 1);
  601. this.$set(this.attribute.productSelect, "quota", productSelect.quota);
  602. this.$set(this.attribute.productSelect, "quota_show", productSelect.quota_show);
  603. this.$set(this, "attrValue", productSelect.suk);
  604. this.attrTxt = "已选择"
  605. }
  606. },
  607. qrR(res) {
  608. // #ifdef H5
  609. if(!this.$wechat.isWeixin() || this.shareQrcode != '1'){
  610. this.PromotionCode = res;
  611. this.followCode = ''
  612. }
  613. // #endif
  614. // #ifdef APP-PLUS
  615. this.PromotionCode = res;
  616. // #endif
  617. },
  618. // 图片预览;
  619. getpreviewImage: function() {
  620. if(this.posterImage){
  621. let photoList = [];
  622. photoList.push(this.posterImage)
  623. uni.previewImage({
  624. urls: photoList,
  625. current: this.posterImage
  626. });
  627. }else{
  628. his.$util.Tips({
  629. title: '您的海报尚未生成'
  630. });
  631. }
  632. },
  633. // app分享
  634. // #ifdef APP-PLUS
  635. appShare(scene) {
  636. let that = this
  637. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  638. let curRoute = routes[routes.length - 1].$page.fullPath // 获取当前页面路由,也就是最后一个打开的页面路由
  639. uni.share({
  640. provider: "weixin",
  641. scene: scene,
  642. type: 0,
  643. href: `${HTTP_REQUEST_URL}${curRoute}`,
  644. title: that.storeInfo.title,
  645. summary: that.storeInfo.info,
  646. imageUrl: that.storeInfo.small_image,
  647. success: function(res) {
  648. uni.showToast({
  649. title: '分享成功',
  650. icon: 'success'
  651. })
  652. // that.posters = false;
  653. },
  654. fail: function(err) {
  655. uni.showToast({
  656. title: '分享失败',
  657. icon: 'none',
  658. duration: 2000
  659. })
  660. // that.posters = false;
  661. }
  662. });
  663. },
  664. // #endif
  665. /**
  666. * 购物车手动填写
  667. *
  668. */
  669. iptCartNum: function(e) {
  670. this.$set(this.attribute.productSelect, 'cart_num', e);
  671. this.$set(this, "cart_num", e);
  672. },
  673. // 后退
  674. returns: function() {
  675. // #ifdef H5
  676. return history.back();
  677. // #endif
  678. // #ifndef H5
  679. return uni.navigateBack({
  680. delta: 1,
  681. })
  682. // #endif
  683. },
  684. onLoadFun: function(data) {
  685. if (this.isAuto) {
  686. this.isAuto = false;
  687. this.isShowAuth = false;
  688. this.getSeckillDetail();
  689. }
  690. },
  691. getSeckillDetail: function() {
  692. let that = this;
  693. getSeckillDetail(that.id).then(res => {
  694. that.$set(that.attribute, 'isType', res.data.storeInfo.type);
  695. that.$set(that.attribute, 'relation_id', res.data.storeInfo.relation_id);
  696. that.$set(that.attribute, 'store_self_mention', res.data.store_self_mention);
  697. this.dataShow = 1;
  698. let title = res.data.storeInfo.title;
  699. this.storeInfo = res.data.storeInfo;
  700. this.datatime = Number(res.data.storeInfo.last_time);
  701. this.status = res.data.storeInfo.status;
  702. this.imgUrls = res.data.storeInfo.images;
  703. this.storeInfo.description = this.storeInfo.description.replace(/<img/gi,
  704. '<img style="max-width:100%;height:auto;float:left;display:block" ');
  705. this.attribute.productAttr = res.data.productAttr;
  706. if (res.data.storeInfo.delivery_type.indexOf('2') != -1) {
  707. that.$set(that, 'isMention', true);
  708. }
  709. this.productValue = res.data.productValue;
  710. for(let key in res.data.productValue){
  711. let obj = res.data.productValue[key];
  712. that.skuArr.push(obj)
  713. }
  714. that.selectSku = that.skuArr[0];
  715. res.data.storeInfo.delivery_type.sort((x,y)=>x - y);
  716. that.$set(that.attribute, 'deliveryType', res.data.storeInfo.delivery_type);
  717. this.attribute.productSelect.num = res.data.storeInfo.num;
  718. this.attribute.productSelect.once_num = res.data.storeInfo.once_num;
  719. this.replyCount = res.data.replyCount;
  720. this.reply = res.data.reply ? [res.data.reply] : [];
  721. this.replyChance = res.data.replyChance;
  722. this.shareQrcode = res.data.share_qrcode;
  723. that.routineContact = Number(res.data.routine_contact_type);
  724. uni.setNavigationBarTitle({
  725. title: title.substring(0, 7) + '...'
  726. });
  727. that.siteName = res.data.site_name;
  728. var navList = ['商品', '详情'];
  729. if(res.data.replyCount){
  730. navList.splice(1, 0, '评价');
  731. }
  732. that.$set(that, 'navList', navList);
  733. // #ifdef H5
  734. that.storeImage = that.storeInfo.image
  735. if(this.$wechat.isWeixin() && this.shareQrcode=='1'){
  736. that.followCode = that.storeInfo.code_base
  737. that.getImageBase64(1);
  738. }else{
  739. that.getImageBase64();
  740. }
  741. that.setShare();
  742. // #endif
  743. // #ifndef H5
  744. that.downloadFilestoreImage();
  745. // #endif
  746. that.DefaultSelect();
  747. setTimeout(function() {
  748. that.infoScroll();
  749. }, 500);
  750. app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id +
  751. '&time=' + that.time +
  752. '&status=' + that.status + '&pid=' + that.storeInfo.uid;
  753. // wxParse.wxParse('description', 'html', that.data.storeInfo.description || '', that, 0);
  754. // wxh.time(that.data.time, that);
  755. setTimeout(() => {
  756. that.showSkeleton = false
  757. }, 300)
  758. }).catch(err => {
  759. that.$util.Tips({
  760. title: err
  761. }, {
  762. tab: 3
  763. })
  764. });
  765. },
  766. setShare: function() {
  767. this.$wechat.isWeixin() &&
  768. this.$wechat.wechatEvevt([
  769. "updateAppMessageShareData",
  770. "updateTimelineShareData",
  771. "onMenuShareAppMessage",
  772. "onMenuShareTimeline"
  773. ], {
  774. desc: this.storeInfo.info,
  775. title: this.storeInfo.title,
  776. link: location.href,
  777. imgUrl: this.storeInfo.image
  778. }).then(res => {}).catch(err => {});
  779. },
  780. /**
  781. * 默认选中属性
  782. *
  783. */
  784. DefaultSelect: function() {
  785. let self = this
  786. let productAttr = self.attribute.productAttr;
  787. let value = [];
  788. for (var key in this.productValue) {
  789. if (this.productValue[key].quota > 0) {
  790. value = this.attribute.productAttr.length ? key.split(",") : [];
  791. break;
  792. }
  793. }
  794. for (let i = 0; i < productAttr.length; i++) {
  795. this.$set(productAttr[i], "index", value[i]);
  796. }
  797. //sort();排序函数:数字-英文-汉字;
  798. let productSelect = this.productValue[value.join(",")];
  799. if (productSelect && productAttr.length) {
  800. self.$set(
  801. self.attribute.productSelect,
  802. "store_name",
  803. self.storeInfo.title
  804. );
  805. self.$set(self.attribute.productSelect, "image", productSelect.image);
  806. self.$set(self.attribute.productSelect, "price", productSelect.price);
  807. self.$set(self.attribute.productSelect, "stock", productSelect.stock);
  808. self.$set(self.attribute.productSelect, "unique", productSelect.unique);
  809. self.$set(self.attribute.productSelect, "quota", productSelect.quota);
  810. self.$set(self.attribute.productSelect, "quota_show", productSelect.quota_show);
  811. self.$set(self.attribute.productSelect, "product_stock", productSelect.product_stock);
  812. self.$set(self.attribute.productSelect, "cart_num", 1);
  813. self.$set(self, "attrValue", value.join(","));
  814. self.attrValue = value.join(",")
  815. } else if (!productSelect && productAttr.length) {
  816. self.$set(
  817. self.attribute.productSelect,
  818. "store_name",
  819. self.storeInfo.title
  820. );
  821. self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
  822. self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
  823. self.$set(self.attribute.productSelect, "quota", 0);
  824. self.$set(self.attribute.productSelect, "quota_show", 0);
  825. self.$set(self.attribute.productSelect, "product_stock", 0);
  826. self.$set(self.attribute.productSelect, "stock", 0);
  827. self.$set(self.attribute.productSelect, "unique", "");
  828. self.$set(self.attribute.productSelect, "cart_num", 0);
  829. self.$set(self, "attrValue", "");
  830. self.$set(self, "attrTxt", "请选择");
  831. } else if (!productSelect && !productAttr.length) {
  832. self.$set(
  833. self.attribute.productSelect,
  834. "store_name",
  835. self.storeInfo.title
  836. );
  837. self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
  838. self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
  839. self.$set(self.attribute.productSelect, "stock", self.storeInfo.stock);
  840. self.$set(self.attribute.productSelect, "quota", self.storeInfo.quota);
  841. self.$set(self.attribute.productSelect, "product_stock", self.storeInfo.product_stock);
  842. self.$set(
  843. self.attribute.productSelect,
  844. "unique",
  845. self.storeInfo.unique || ""
  846. );
  847. self.$set(self.attribute.productSelect, "cart_num", 1);
  848. self.$set(self.attribute.productSelect, "quota", productSelect.quota);
  849. self.$set(self.attribute.productSelect, "product_stock", productSelect.product_stock);
  850. self.$set(self, "attrValue", "");
  851. self.$set(self, "attrTxt", "请选择");
  852. }
  853. },
  854. selecAttr: function() {
  855. this.currentPage = false;
  856. this.attribute.cartAttr = true
  857. },
  858. onMyEvent: function() {
  859. this.$set(this.attribute, 'cartAttr', false);
  860. this.$set(this, 'isOpen', false);
  861. },
  862. /**
  863. * 购物车数量加和数量减
  864. *
  865. */
  866. ChangeCartNum: function(changeValue) {
  867. //changeValue:是否 加|减
  868. //获取当前变动属性
  869. let productSelect = this.productValue[this.attrValue];
  870. if (this.cart_num) {
  871. productSelect.cart_num = this.cart_num;
  872. this.attribute.productSelect.cart_num = this.cart_num;
  873. }
  874. //如果没有属性,赋值给商品默认库存
  875. if (productSelect === undefined && !this.attribute.productAttr.length)
  876. productSelect = this.attribute.productSelect;
  877. //无属性值即库存为0;不存在加减;
  878. if (productSelect === undefined) return;
  879. let stock = productSelect.stock || 0;
  880. let quotaShow = productSelect.quota_show || 0;
  881. let quota = productSelect.quota || 0;
  882. let productStock = productSelect.product_stock || 0;
  883. let num = this.attribute.productSelect;
  884. let nums = this.storeInfo.num || 0;
  885. let onceNum = this.storeInfo.once_num || 0;
  886. //设置默认数据
  887. if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
  888. if (changeValue) {
  889. num.cart_num++;
  890. let arrMin = [];
  891. arrMin.push(nums);
  892. arrMin.push(onceNum);
  893. arrMin.push(quota);
  894. arrMin.push(productStock);
  895. let minN = Math.min.apply(null, arrMin);
  896. if (num.cart_num >= minN) {
  897. this.$set(this.attribute.productSelect, "cart_num", minN ? minN : 1);
  898. this.$set(this, "cart_num", minN ? minN : 1);
  899. }
  900. // if(quotaShow >= productStock){
  901. // if (num.cart_num > productStock) {
  902. // this.$set(this.attribute.productSelect, "cart_num", productStock);
  903. // this.$set(this, "cart_num", productStock);
  904. // }
  905. // }else{
  906. // if (num.cart_num > quotaShow) {
  907. // this.$set(this.attribute.productSelect, "cart_num", quotaShow);
  908. // this.$set(this, "cart_num", quotaShow);
  909. // }
  910. // }
  911. this.$set(this, "cart_num", num.cart_num);
  912. this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
  913. } else {
  914. num.cart_num--;
  915. if (num.cart_num < 1) {
  916. this.$set(this.attribute.productSelect, "cart_num", 1);
  917. this.$set(this, "cart_num", 1);
  918. }
  919. this.$set(this, "cart_num", num.cart_num);
  920. this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
  921. }
  922. },
  923. attrVal(val) {
  924. this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attr_values[val
  925. .indexn];
  926. },
  927. /**
  928. * 属性变动赋值
  929. *
  930. */
  931. ChangeAttr: function(res) {
  932. this.$set(this, 'cart_num', 1);
  933. let productSelect = this.productValue[res];
  934. this.$set(this, "selectSku", productSelect);
  935. if (productSelect) {
  936. this.$set(this.attribute.productSelect, "image", productSelect.image);
  937. this.$set(this.attribute.productSelect, "price", productSelect.price);
  938. this.$set(this.attribute.productSelect, "stock", productSelect.stock);
  939. this.$set(this.attribute.productSelect, "unique", productSelect.unique);
  940. this.$set(this.attribute.productSelect, "cart_num", 1);
  941. this.$set(this.attribute.productSelect, "quota", productSelect.quota);
  942. this.$set(this.attribute.productSelect, "quota_show", productSelect.quota_show);
  943. this.$set(this, "attrValue", res);
  944. this.attrTxt = "已选择"
  945. } else {
  946. this.$set(this.attribute.productSelect, "image", this.storeInfo.image);
  947. this.$set(this.attribute.productSelect, "price", this.storeInfo.price);
  948. this.$set(this.attribute.productSelect, "stock", 0);
  949. this.$set(this.attribute.productSelect, "unique", "");
  950. this.$set(this.attribute.productSelect, "cart_num", 0);
  951. this.$set(this.attribute.productSelect, "quota", 0);
  952. this.$set(this.attribute.productSelect, "quota_show", 0);
  953. this.$set(this, "attrValue", "");
  954. this.attrTxt = "已选择"
  955. }
  956. },
  957. scroll: function(e) {
  958. var that = this,
  959. scrollY = e.detail.scrollTop;
  960. var opacity = scrollY / 200;
  961. opacity = opacity > 1 ? 1 : opacity;
  962. that.opacity = opacity
  963. that.scrollY = scrollY
  964. that.currentPage = false;
  965. if (that.lock) {
  966. that.lock = false
  967. return;
  968. }
  969. for (var i = 0; i < that.topArr.length; i++) {
  970. if (scrollY < that.topArr[i] - (app.globalData.navHeight / 2) + that.heightArr[i]) {
  971. that.navActive = i
  972. break
  973. }
  974. }
  975. },
  976. tap: function(item, index) {
  977. var id = item.id;
  978. var index = index;
  979. var that = this;
  980. if (!this.replyCount && id == "past1") {
  981. id = "past2"
  982. }
  983. this.toView = id;
  984. this.navActive = index;
  985. this.lock = true;
  986. this.scrollTop = index > 0 ? that.topArr[index] - (app.globalData.navHeight / 2) : that.topArr[index]
  987. },
  988. infoScroll: function() {
  989. var that = this,
  990. topArr = [],
  991. heightArr = [];
  992. for (var i = 0; i < that.navList.length; i++) { //productList
  993. //获取元素所在位置
  994. var query = wx.createSelectorQuery().in(this);
  995. var idView = "#past" + i;
  996. if(!this.replyCount && i == 1){
  997. idView = "#past" + 2;
  998. }
  999. query.select(idView).boundingClientRect();
  1000. query.exec(function(res) {
  1001. var top = res[0].top;
  1002. var height = res[0].height;
  1003. topArr.push(top);
  1004. heightArr.push(height);
  1005. that.topArr = topArr
  1006. that.heightArr = heightArr
  1007. });
  1008. };
  1009. },
  1010. /**
  1011. * 收藏商品
  1012. */
  1013. setCollect: Debounce(function() {
  1014. var that = this;
  1015. if (this.storeInfo.userCollect) {
  1016. collectDel(this.storeInfo.product_id).then(res => {
  1017. that.storeInfo.userCollect = !that.storeInfo.userCollect
  1018. })
  1019. } else {
  1020. collectAdd(this.storeInfo.product_id).then(res => {
  1021. that.storeInfo.userCollect = !that.storeInfo.userCollect
  1022. })
  1023. }
  1024. }),
  1025. /*
  1026. * 单独购买
  1027. */
  1028. openAlone: Debounce(function() {
  1029. uni.navigateTo({
  1030. url: `/pages/goods_details/index?id=${this.storeInfo.product_id}`
  1031. })
  1032. }),
  1033. /*
  1034. * 下订单
  1035. */
  1036. goCat: function() {
  1037. var that = this;
  1038. that.currentPage = false;
  1039. var productSelect = this.productValue[this.attrValue];
  1040. //打开属性
  1041. if (this.isOpen)
  1042. this.attribute.cartAttr = true
  1043. else
  1044. this.attribute.cartAttr = !this.attribute.cartAttr
  1045. //只有关闭属性弹窗时进行加入购物车
  1046. if (this.attribute.cartAttr === true && this.isOpen == false) return this.isOpen = true
  1047. //如果有属性,没有选择,提示用户选择
  1048. if (this.attribute.productAttr.length && productSelect === undefined && this.isOpen == true) return app
  1049. .$util.Tips({
  1050. title: '请选择属性'
  1051. });
  1052. postCartAdd({
  1053. productId: that.storeInfo.product_id,
  1054. secKillId: that.id,
  1055. bargainId: 0,
  1056. combinationId: 0,
  1057. cartNum: that.cart_num,
  1058. uniqueId: productSelect !== undefined ? productSelect.unique : '',
  1059. 'new': 1,
  1060. store_id:this.store_id,
  1061. addressId:this.addressId,
  1062. delivery_type:this.delivery_type
  1063. }).then(res => {
  1064. this.isOpen = false
  1065. uni.navigateTo({
  1066. url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cartId+'&delivery_type='+that.delivery_type+'&addressId='+that.addressId+'&store_id='+that.store_id+'&store_name='+that.store_name
  1067. });
  1068. }).catch(err => {
  1069. return this.$util.Tips({
  1070. title: err
  1071. });
  1072. });
  1073. },
  1074. /**
  1075. * 分享打开
  1076. *
  1077. */
  1078. listenerActionSheet: function() {
  1079. this.currentPage = false
  1080. if (this.isLogin === false) {
  1081. toLogin();
  1082. } else {
  1083. // #ifdef H5
  1084. if (this.$wechat.isWeixin() === true) {
  1085. this.weixinStatus = true;
  1086. }
  1087. // #endif
  1088. this.posters = true;
  1089. this.goPoster();
  1090. }
  1091. },
  1092. // 分享关闭
  1093. listenerActionClose: function() {
  1094. this.posters = false;
  1095. },
  1096. //隐藏海报
  1097. posterImageClose: function() {
  1098. this.posterImageStatus = false;
  1099. this.posters = false;
  1100. },
  1101. //替换安全域名
  1102. setDomain: function(url) {
  1103. url = url ? url.toString() : '';
  1104. //本地调试打开,生产请注销
  1105. if (url.indexOf("https://") > -1) return url;
  1106. else return url.replace('http://', 'https://');
  1107. },
  1108. //获取海报产品图
  1109. downloadFilestoreImage: function() {
  1110. let that = this;
  1111. uni.downloadFile({
  1112. url: that.setDomain(that.storeInfo.image),
  1113. success: function(res) {
  1114. that.storeImage = res.tempFilePath;
  1115. that.base64Show = 1;
  1116. },
  1117. fail: function() {
  1118. return that.$util.Tips({
  1119. title: ''
  1120. });
  1121. that.storeImage = '';
  1122. },
  1123. });
  1124. },
  1125. /**
  1126. * 获取产品分销二维码
  1127. * @param function successFn 下载完成回调
  1128. *
  1129. */
  1130. downloadFilePromotionCode: function(successFn) {
  1131. let that = this;
  1132. seckillCode(that.id, {
  1133. stop_time: that.datatime
  1134. }).then(res => {
  1135. uni.downloadFile({
  1136. url: that.setDomain(res.data.code),
  1137. success: function(res) {
  1138. that.$set(that, 'isDown', false);
  1139. if (typeof successFn == 'function')
  1140. successFn && successFn(res.tempFilePath);
  1141. else
  1142. that.$set(that, 'PromotionCode', res.tempFilePath);
  1143. },
  1144. fail: function() {
  1145. that.$set(that, 'isDown', false);
  1146. that.$set(that, 'PromotionCode', '');
  1147. },
  1148. });
  1149. }).catch(err => {
  1150. that.$set(that, 'isDown', false);
  1151. that.$set(that, 'PromotionCode', '');
  1152. });
  1153. },
  1154. getImageBase64: function(type) {
  1155. let that = this;
  1156. imageBase64(that.storeImage,that.followCode)
  1157. .then(res => {
  1158. that.storeImage = res.data.image;
  1159. if(type){
  1160. that.PromotionCode = res.data.code;
  1161. }
  1162. that.base64Show = 1;
  1163. })
  1164. .catch(() => {});
  1165. },
  1166. // 小程序关闭分享弹窗;
  1167. // goFriend: function() {
  1168. // this.posters = false;
  1169. // },
  1170. /**
  1171. * 生成海报
  1172. */
  1173. goPoster: function() {
  1174. let that = this;
  1175. // that.posters = false;
  1176. that.$set(that, 'canvasStatus', true);
  1177. let arr2 = [that.posterbackgd, that.storeImage, that.PromotionCode];
  1178. // #ifdef MP
  1179. if(that.PromotionCode==''&&!that.isDown){
  1180. return that.$util.Tips({
  1181. title: '小程序二维码需要发布正式版后才能获取到'
  1182. },function(){
  1183. that.posters = false;
  1184. });
  1185. }
  1186. // #endif
  1187. if (that.isDown) return that.$util.Tips({
  1188. title: '正在下载海报,请稍后再试!'
  1189. },function(){
  1190. that.posters = false;
  1191. });
  1192. uni.getImageInfo({
  1193. src: that.PromotionCode,
  1194. fail: function(res) {
  1195. return that.$util.Tips({
  1196. title: '小程序二维码需要发布正式版后才能获取到'
  1197. });
  1198. },
  1199. success() {
  1200. if (arr2[2] == '') {
  1201. //海报二维码不存在则从新下载
  1202. that.downloadFilePromotionCode(function(msgPromotionCode) {
  1203. arr2[2] = msgPromotionCode;
  1204. if (arr2[2] == '')
  1205. return that.$util.Tips({
  1206. title: '海报二维码生成失败!'
  1207. });
  1208. that.$nextTick(()=>{
  1209. that.$util.PosterCanvas(that.fontColor, that.themeColor, that.siteName, arr2, that.storeInfo.title, that.storeInfo
  1210. .price, that.storeInfo.ot_price,
  1211. function(tempFilePath) {
  1212. that.$set(that, 'posterImage', tempFilePath);
  1213. that.$set(that, 'posterImageStatus', true);
  1214. that.$set(that, 'canvasStatus', false);
  1215. that.$set(that, 'actionSheetHidden', !that
  1216. .actionSheetHidden);
  1217. });
  1218. })
  1219. });
  1220. } else {
  1221. //生成推广海报
  1222. that.$nextTick(function(){
  1223. that.$util.PosterCanvas(that.fontColor, that.themeColor, that.siteName, arr2, that.storeInfo.title, that.storeInfo.price, that
  1224. .storeInfo.ot_price,
  1225. function(tempFilePath) {
  1226. that.$set(that, 'posterImage', tempFilePath);
  1227. that.$set(that, 'posterImageStatus', true);
  1228. that.$set(that, 'canvasStatus', false);
  1229. that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
  1230. });
  1231. })
  1232. }
  1233. },
  1234. });
  1235. },
  1236. /*
  1237. * 保存到手机相册
  1238. */
  1239. // #ifdef MP
  1240. savePosterPath: function() {
  1241. let that = this;
  1242. uni.getSetting({
  1243. success(res) {
  1244. if (!res.authSetting['scope.writePhotosAlbum']) {
  1245. uni.authorize({
  1246. scope: 'scope.writePhotosAlbum',
  1247. success() {
  1248. uni.saveImageToPhotosAlbum({
  1249. filePath: that.posterImage,
  1250. success: function(res) {
  1251. that.posterImageClose();
  1252. that.$util.Tips({
  1253. title: '保存成功',
  1254. icon: 'success'
  1255. });
  1256. },
  1257. fail: function(res) {
  1258. that.$util.Tips({
  1259. title: '保存失败'
  1260. });
  1261. }
  1262. })
  1263. }
  1264. })
  1265. } else {
  1266. uni.saveImageToPhotosAlbum({
  1267. filePath: that.posterImage,
  1268. success: function(res) {
  1269. that.posterImageClose();
  1270. that.$util.Tips({
  1271. title: '保存成功',
  1272. icon: 'success'
  1273. });
  1274. },
  1275. fail: function(res) {
  1276. that.$util.Tips({
  1277. title: '保存失败'
  1278. });
  1279. },
  1280. })
  1281. }
  1282. }
  1283. })
  1284. },
  1285. // #endif
  1286. //#ifdef APP-PLUS
  1287. savePosterPath() {
  1288. let that = this
  1289. uni.saveImageToPhotosAlbum({
  1290. filePath: that.posterImage,
  1291. success: function(res) {
  1292. that.posterImageClose();
  1293. that.$util.Tips({
  1294. title: '保存成功',
  1295. icon: 'success'
  1296. });
  1297. },
  1298. fail: function(res) {
  1299. that.$util.Tips({
  1300. title: '保存失败'
  1301. });
  1302. }
  1303. });
  1304. },
  1305. // #endif
  1306. setShareInfoStatus: function() {
  1307. let data = this.storeInfo;
  1308. let href = location.href;
  1309. if (this.$wechat.isWeixin()) {
  1310. this.posters = true;
  1311. getUserInfo().then(res => {
  1312. href =
  1313. href.indexOf("?") === -1 ?
  1314. href + "?spread=" + res.data.uid :
  1315. href + "&spread=" + res.data.uid;
  1316. let configAppMessage = {
  1317. desc: data.store_info,
  1318. title: data.store_name,
  1319. link: href,
  1320. imgUrl: data.image
  1321. };
  1322. this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
  1323. configAppMessage)
  1324. });
  1325. }
  1326. }
  1327. },
  1328. //#ifdef MP
  1329. onShareAppMessage() {
  1330. return {
  1331. title: this.storeInfo.title,
  1332. path: app.globalData.openPages,
  1333. imageUrl: this.storeInfo.image
  1334. };
  1335. },
  1336. onShareTimeline() {
  1337. let that = this;
  1338. return {
  1339. title: that.storeInfo.title,
  1340. imageUrl: that.storeInfo.image,
  1341. path: app.globalData.openPages,
  1342. };
  1343. },
  1344. //#endif
  1345. }
  1346. </script>
  1347. <style lang="scss">
  1348. .mt7 {
  1349. margin-top:7px;
  1350. padding-left:55px;
  1351. }
  1352. .store{
  1353. background-color: #fff;
  1354. margin: 20rpx 20rpx 0 20rpx;
  1355. border-radius: 12rpx;
  1356. .title{
  1357. height: 80rpx;
  1358. width: 100%;
  1359. font-size: 28rpx;
  1360. color: #333;
  1361. padding: 0 20rpx;
  1362. .icon-jinru2{
  1363. color: #7a7a7a;
  1364. font-size: 28rpx;
  1365. }
  1366. }
  1367. }
  1368. .generate-posters {
  1369. width: 100%;
  1370. height: 318rpx;
  1371. background-color: #fff;
  1372. position: fixed;
  1373. left: 0;
  1374. bottom: 0;
  1375. z-index: 300;
  1376. transform: translate3d(0, 100%, 0);
  1377. transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  1378. border-top: 1rpx solid #eee;
  1379. .generateCon{
  1380. height: 220rpx;
  1381. }
  1382. .generateClose{
  1383. height: 98rpx;
  1384. font-size: 28rpx;
  1385. color: #333333;
  1386. border-top:1px solid #eee;
  1387. }
  1388. .item{
  1389. .pictrue{
  1390. width: 96rpx;
  1391. height: 96rpx;
  1392. border-radius: 50%;
  1393. margin: 0 auto 6rpx auto;
  1394. image{
  1395. width: 100%;
  1396. height: 100%;
  1397. border-radius: 50%;
  1398. }
  1399. }
  1400. }
  1401. }
  1402. .generate-posters.on {
  1403. transform: translate3d(0, 0, 0);
  1404. }
  1405. .generate-posters .item {
  1406. flex: 1;
  1407. text-align: center;
  1408. font-size: 30rpx;
  1409. }
  1410. .generate-posters .item .iconfont {
  1411. font-size: 80rpx;
  1412. color: #5eae72;
  1413. }
  1414. .generate-posters .item .iconfont.icon-haibao {
  1415. color: #5391f1;
  1416. }
  1417. .navbar .header {
  1418. height: 96rpx;
  1419. font-size: 30rpx;
  1420. color: #050505;
  1421. background-color: #fff;
  1422. /* #ifdef MP */
  1423. padding-right: 95rpx;
  1424. /* #endif */
  1425. /* #ifdef APP-PLUS */
  1426. width: 100%;
  1427. /* #endif */
  1428. }
  1429. .icon-xiangzuo {
  1430. /* #ifdef H5 */
  1431. top: 30rpx !important;
  1432. /* #endif */
  1433. }
  1434. .navbar .header .item {
  1435. position: relative;
  1436. margin: 0 25rpx;
  1437. }
  1438. .navbar .header .item.on:before {
  1439. position: absolute;
  1440. width: 60rpx;
  1441. height: 5rpx;
  1442. background-repeat: no-repeat;
  1443. content: "";
  1444. // background-image: linear-gradient(to right, #ff3366 0%, #ff6533 100%);
  1445. background-color: var(--view-theme);
  1446. bottom: -10rpx;
  1447. left: 50%;
  1448. margin-left: -28rpx;
  1449. }
  1450. .navbar {
  1451. position: fixed;
  1452. background-color: #fff;
  1453. top: 0;
  1454. left: 0;
  1455. z-index: 99;
  1456. width: 100%;
  1457. }
  1458. .navbar .navbarH {
  1459. position: relative;
  1460. }
  1461. .navbar .navbarH .navbarCon {
  1462. position: absolute;
  1463. bottom: 0;
  1464. height: 100rpx;
  1465. width: 100%;
  1466. }
  1467. .icon-xiangzuo {
  1468. /* color: #000;
  1469. position: fixed;
  1470. font-size: 40rpx;
  1471. width: 100rpx;
  1472. height: 56rpx;
  1473. line-height: 54rpx;
  1474. z-index: 1000;
  1475. left: 33rpx; */
  1476. }
  1477. .product-con .nav {
  1478. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4AAABkCAMAAADud0VvAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAKHRSTlMAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnEt6j2gAACYZJREFUeNrtnel2qzoMhSUPzOnpef+HvD1NmonB90eShoTRBoMBaXWltV06wNfdLSEAYaMhdjtEAAQAfHtTAAraX04/KVB0BCLCbffeXyofdk/0Xev3AzGxzSPh7yJAUAiqvLfUfUrBDfqGF/XzkxPM3aEUw3YcsXOi51ov1hFgk7hHO6+O8vK+aYY9OxwVodwvCobGMKPhX0Uz67BF3DFJRBPl3fJ+OZyIYg3egY8r4ybkM/z9pK3hzpOYNVLeJe/FaX8lhPUiZ8ySjPeT+BLrm8PdSwJspbxN3vPDniy7gcArPpWMd7C+MdzD2ANspbxF3tPvA1l2s4w1uwv8aDLeU9dZdW4zuGMU8xvYrZTfZ9+JP30fidshAo+WqjPYyDrWqdNGcOdR9Py/1ibv99nHvrq9P3xfiNlhAs/Z2DKObbretLgJ3GXs9zYxv/L+IL74/keWfXjGWiPwdqx7M+vbwN2PRW/KX+UdFaRfe7LsoxiaQjDr1h2Rtf9ZrB13DEOuYWLe5P309UOgjhVZ7Sn88cjHSh1ma7jzMEA9E1OSd7X/jyz7qAKfCrRl3bGam9blqmvGXQYeNvPcIe/511dGhI6csaa85ODHs+7IWE9rv17cvVDcd5KBvF//+ybLbiNjLQQb2bo/WUe1VdzRD9gvv1omBgDg9B9ZdnsCL0a07v11fcW4M99HNDQxCg5fZNmtCrzEcaw7cqbbWbBC3IUvjU0MFP+oym5b4K9CDLfuPVivMTerw136HE1NDKT/qMo+QWS5N6wPHm8pL2ofrHXhjtJnpiYG4UiNMVMJ/EWa98Ejr2v+2h7ueHcxRoV2dfhHl59OF+mbwPclnzHeXLvvVvv14M49jgBmJgby/XdBDE4ZxVkKXeuOnA+8YHUtuAvJQafl8WU23f+QZZ9P4PtZd8Y4e5VyA/RxFXtOSqy7g0bt1PssXL7PxN484Ykng6233EBe6SBGhQBvKvUuWmqF6o5CQrdVb5B3OO7Jss8W16eDb2tf5xxH0uXFqzsTvE3L2+U9/zmQZZ9Xqzzefpsl5AJfQG1T9y61XzruXCAamhiE9ECFRwcOoY/1oN90veJhXt5vCnfOWSfljeBfDtQr4IjAi1rrjuJZc6z2UW4Od8HQ1MSAOv1Qe687R9Jv0vUu3HVz1aWmqnj7yzfrFsiPR7LsDkWW+6KswCh4w3nT10vmt5KqIkdjEwPZke5751xI73H3VMYfF7U+K+vYoO3a6r5E3G8XJZoV2uF6pPveOXlQAw4IKAS+1l70cO/CHxcIu2klBlCdj9Te62p4wd3DNBv2wbgvzbuj+XUbWJxO1Cvg7IEVXDV0Orao/bq9O/YX8spsdqLCo7us3/y659UpeCvueuZ9Ubj3orwe/OuJCo+Osw4AwAIG3YZ9a7hryru6nKnw6D7rNwf/aJNURrh34L8wM2OSo6rzhSy7q6zzCpEsZPVsYy2zm8C9P/j5hQqPDrNeAyz4HuFuJO+Qnanw6CbrkjUTKkoOvu0DffO+VNz71GfU9UqW3cWDKF/9ehVYDLzmssyGcNeQ9+JKLmYBrDcAK0LWI0/dDu4d8p5fqfDoJOu8J6EPgW937rrmfXFNBL1OMmUpWXZXWe8tyCLCmjNLFWA3gnsz+GlKhUf3WG/OTZsIxdAD6BL3lePeJe8qJRfjNOs6hMqo08vomfcF414HfkEuxkHWud6Z/tKQhfKF07qby6wb92Z5hyKjwqNbwYTkoN2mWx57IbYYd103s/D7zJR7fbOcLLtbrP/mpgPimkUjMrrIq5lq3lROLsZd1geoOwB40WjqvnTcH7CTi3GL9dfcFJQ5oQDAYtFGq8YXXyjuL8gXBbkYt1jnw+S8uhwG2AzrynF/lfeChN0x1ge7l5plHost4/4LOwm7c6yPwndlGIY9cW/74gu9z8y95ZGE3UnWreAO4tfBq+3hXvNrUszIusdG5/t9jGFYi3vH1svHHZBYd4p1bkPOq2ORcH3cy2Oko0UxmHU77qVmjFFAuFPMzLo9vitDmfABWxPujqUkyzFpzGvJTe2pPcYB4b4C1m+wqyWyPiXuAHKHhPvCbQFTd9jVIlgXU/JduUgj9g23JtxdEPYy7Mp51mtz0ylxB+UnaLS1INhm54e/PJMC1QJYn/vnvKSJZ5odUcwYnONT1t2W9xLrk8t5dbks8L23JnWf1cUI9lT0oc8dmpT1+cNI4EndZyRIcCgru7vJKvM8MbucV4dBjL22plR1/hCCNcCuXGQdHMQd2E7qbU24zxNSYjPsyiXWfe6IWa8d3gWecHfZxUgJbbC7gjvz23JTN/DnidTYmnCfvhbj8y7YlXusu4o7QBhh762pMjO1i/HZbfdj68v8rIul9O+crrveFJO6Txnoe9it7HPL+411d+W8OoxC6Lc14T6li/GgJ+xqRtYbc1N3cQe+44S7Wy4mkKo/7Gp21gcjOOlfw5vAE+7zhh8ILdjV/Kw7LefVZZn06HAg3Kew7GHAdGFXk7MuluRe6h7oFAeEuwOWPfJRH3Y1OeuL47syljvWsTXhbjm8yAMj2KfinXu+WKacV8dPgSfc54gw5qawT4I7HzM3dWH5IfCE+/S5Xxwyc9jVFKyLxfNdceeJ37JMZ1VthUhCANVx8rT5rKqagPU17na1vySsuWhAXFoJP/HBXNlt3+iVryQ3rR+y2G9aJtwtBEaJVMawK8uwv+j6KviujL2ENdxmkuAc3bLvYmau7JafzfDuYdaJO7BEEu5ThNzF8HahtcZLbhV27vvSIUKtfi8/xpplSlVHjfAjUKX+Xs0ENcutsh44drA7Op2HLV/SisCTuo97+JKP2i6wfspe2IT9yfpK3UvtA50iJDNjjaiPHW8+QdoFe57aexIJD8p+fcV8vw/57v33JjMzTnifMarui5MaPiFL1TSsbyvyrzB+nSHcx4job9DvjFLdtEqtwc6Dam66qXi/sI/MzHDL/vEpNXu/SoPikllj/ebXN+Re6sZRRGZmvBCff5hur8BzkF1yu6xTHK+JIHUfJ/y/H8ZnlKBIL8UErG9c3QEgDh9Dwn1AxH+j+4416RW4XJR91rfJ9/tQ7O4PdCLcB1h27/YwY6PTp+erJdYlyXnNMA6QcB/A1Z9Phr+7Txf29JzaYn1RhE74vcSOEe6G4X0miM9n1WvCfj7nNlgPBcl5yxhjnyozJhH9CfF1r2rUZYrzaXzLzkOqw3SF2l8SRuqua9l3f+Ttn6KJvKens01dJzlvXWbx/9o+Ua+lzl/DAAAAAElFTkSuQmCC');
  1479. background-repeat: no-repeat;
  1480. background-size: 100% 100%;
  1481. width: 100%;
  1482. height: 100rpx;
  1483. padding: 0 30rpx;
  1484. box-sizing: border-box;
  1485. }
  1486. .product-con .nav /deep/.time .styleAll {
  1487. padding: 0 6rpx;
  1488. font-size: 22rpx;
  1489. color: var(--view-theme);
  1490. background-color: #fff;
  1491. border-radius: 2rpx
  1492. }
  1493. .product-con .nav .money {
  1494. font-size: 28rpx;
  1495. color: #fff;
  1496. }
  1497. .product-con .nav .money .num {
  1498. font-size: 48rpx;
  1499. }
  1500. .product-con .nav .money .y-money {
  1501. font-size: 26rpx;
  1502. margin-left: 10rpx;
  1503. text-decoration: line-through;
  1504. }
  1505. .product-con .nav .timeItem {
  1506. font-size: 20rpx;
  1507. color: #fff;
  1508. text-align: center;
  1509. }
  1510. .product-con .nav .timeItem .timeCon {
  1511. margin-top: 10rpx;
  1512. }
  1513. .product-con .nav .timeItem .timeCon .num {
  1514. padding: 0 7rpx;
  1515. font-size: 22rpx;
  1516. color: #ff3d3d;
  1517. background-color: #fff;
  1518. border-radius: 2rpx;
  1519. }
  1520. .product-con .nav .timeState {
  1521. font-size: 28RPX;
  1522. color: #FFF;
  1523. }
  1524. .product-con .nav .iconfont {
  1525. color: #fff;
  1526. font-size: 30rpx;
  1527. margin-left: 20rpx;
  1528. }
  1529. .product-con .wrapper {
  1530. padding: 32rpx;
  1531. box-sizing: border-box;
  1532. }
  1533. .product-con .wrapper .introduce {
  1534. margin: 0;
  1535. }
  1536. .product-con .wrapper .introduce .infor {
  1537. width: 570rpx;
  1538. }
  1539. .product-con .wrapper .introduce .iconfont {
  1540. font-size: 37rpx;
  1541. color: #515151;
  1542. }
  1543. .product-con .wrapper .label {
  1544. margin: 18rpx 0 0 0;
  1545. font-size: 24rpx;
  1546. color: #82848f;
  1547. display: flex;
  1548. justify-content: space-between;
  1549. }
  1550. .product-con .wrapper .label .stock {
  1551. width: 255rpx;
  1552. margin-right: 28rpx;
  1553. }
  1554. .product-con .footer {
  1555. padding: 0 20rpx 0 30rpx;
  1556. position: fixed;
  1557. bottom: 0;
  1558. width: 100%;
  1559. box-sizing: border-box;
  1560. background-color: #fff;
  1561. z-index: 277;
  1562. border-top: 1px solid #f0f0f0;
  1563. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1564. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1565. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  1566. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  1567. }
  1568. .product-con .footer .item {
  1569. font-size: 18rpx;
  1570. color: #666;
  1571. }
  1572. .product-con .footer .item .iconfont {
  1573. text-align: center;
  1574. font-size: 40rpx;
  1575. }
  1576. .product-con .footer .item .iconfont.icon-shoucang1 {
  1577. color: var(--view-theme);
  1578. }
  1579. .product-con .footer .item .iconfont.icon-gouwuche1 {
  1580. font-size: 40rpx;
  1581. position: relative;
  1582. }
  1583. .product-con .footer .item .iconfont.icon-gouwuche1 .num {
  1584. color: #fff;
  1585. position: absolute;
  1586. font-size: 18rpx;
  1587. padding: 2rpx 8rpx 3rpx;
  1588. border-radius: 200rpx;
  1589. top: -10rpx;
  1590. right: -10rpx;
  1591. }
  1592. .product-con .footer .bnt {
  1593. width: 540rpx;
  1594. height: 76rpx;
  1595. }
  1596. .product-con .footer .bnt .bnts {
  1597. width: 270rpx;
  1598. text-align: center;
  1599. line-height: 76rpx;
  1600. color: #fff;
  1601. font-size: 28rpx;
  1602. }
  1603. .product-con .footer .bnt .joinCart {
  1604. border-radius: 50rpx 0 0 50rpx;
  1605. // background-image: linear-gradient(to right, #fea10f 0%, #fa8013 100%);
  1606. background-color: var(--view-bntColor);
  1607. }
  1608. .product-con .footer .bnt .buy {
  1609. border-radius: 0 50rpx 50rpx 0;
  1610. background-color: var(--view-theme);
  1611. // background-image: linear-gradient(to right, #fa6514 0%, #e93323 100%);
  1612. }
  1613. .product-con .conter {
  1614. display: block;
  1615. padding-bottom: 100rpx;
  1616. }
  1617. .product-con .conter img {
  1618. display: block;
  1619. }
  1620. .setCollectBox {
  1621. font-size: 18rpx;
  1622. color: #666;
  1623. }
  1624. .bg-color-hui {
  1625. background: #bbbbbb !important;
  1626. }
  1627. .canvas {
  1628. width: 750px;
  1629. height: 1300px;
  1630. }
  1631. .poster-pop {
  1632. width: 460rpx;
  1633. height: 800rpx;
  1634. position: fixed;
  1635. left: 50%;
  1636. transform: translateX(-50%);
  1637. z-index: 300;
  1638. top:50%;
  1639. margin-top: -559rpx;
  1640. }
  1641. .poster-pop image {
  1642. width: 100%;
  1643. height: 100%;
  1644. display: block;
  1645. border-radius: 18rpx;
  1646. }
  1647. .poster-pop .close {
  1648. width: 46rpx;
  1649. height: 75rpx;
  1650. position: fixed;
  1651. right: 0;
  1652. top: -73rpx;
  1653. display: block;
  1654. }
  1655. .poster-pop .save-poster {
  1656. background-color: #df2d0a;
  1657. font-size: :22rpx;
  1658. color: #fff;
  1659. text-align: center;
  1660. height: 76rpx;
  1661. line-height: 76rpx;
  1662. width: 100%;
  1663. }
  1664. .poster-pop .keep {
  1665. color: #fff;
  1666. text-align: center;
  1667. font-size: 25rpx;
  1668. margin-top: 10rpx;
  1669. }
  1670. /deep/.mask {
  1671. z-index: 99 !important;
  1672. }
  1673. .mask1 {
  1674. position: fixed;
  1675. top: 0;
  1676. left: 0;
  1677. right: 0;
  1678. bottom: 0;
  1679. background-color: #000;
  1680. opacity: .5;
  1681. z-index: 288;
  1682. }
  1683. .home-nav {
  1684. /* #ifdef H5 */
  1685. top: 20rpx !important;
  1686. /* #endif */
  1687. }
  1688. .home-nav {
  1689. color: #333;
  1690. position: fixed;
  1691. /* #ifdef MP */
  1692. width: 126rpx;
  1693. left: 15rpx;
  1694. /* #endif */
  1695. /* #ifndef MP */
  1696. width: 56rpx;
  1697. left: 33rpx;
  1698. /* #endif */
  1699. height: 56rpx;
  1700. font-size: 33rpx;
  1701. z-index: 99;
  1702. background: rgba(255, 255, 255, 0.3);
  1703. border: 1px solid rgba(0,0,0,0.1);
  1704. border-radius: 40rpx;
  1705. &.right{
  1706. right: 33rpx;
  1707. left:unset
  1708. }
  1709. &.on {
  1710. background: unset;
  1711. color: #333;
  1712. }
  1713. &.homeIndex{
  1714. /* #ifdef MP */
  1715. width: 98rpx;
  1716. /* #endif */
  1717. /* #ifndef MP */
  1718. border-color: rgba(255,255,255,0);
  1719. /* #endif */
  1720. }
  1721. }
  1722. .home-nav .iconfont {
  1723. width: 58rpx;
  1724. text-align: center;
  1725. }
  1726. .home-nav .line {
  1727. width: 1rpx;
  1728. height: 34rpx;
  1729. background: #B3B3B3;
  1730. }
  1731. .home-nav .icon-xiangzuo {
  1732. width: auto;
  1733. font-size: 28rpx;
  1734. }
  1735. .share-box {
  1736. z-index: 1000;
  1737. position: fixed;
  1738. left: 0;
  1739. top: 0;
  1740. width: 100%;
  1741. height: 100%;
  1742. }
  1743. .share-box image {
  1744. width: 100%;
  1745. height: 100%;
  1746. }
  1747. </style>