index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907
  1. <template>
  2. <view>
  3. <view class="product-window"
  4. :class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')"
  5. @touchmove.stop.prevent="moveHandle">
  6. <view class="textpic acea-row">
  7. <view class="pictrue" @click="showImg()">
  8. <image :src="attr.productSelect.image"></image>
  9. <view class="icon flex-center" v-if="fangda">
  10. <view class="iconfont icon-ic_enlarge"></view>
  11. </view>
  12. </view>
  13. <view class="pl-24 pt-24 flex-col">
  14. <view class="flex-y-center" v-if="attr.productSelect.integral">
  15. <image src="../../static/img/mall05.png" class="w-32 h-32"></image>
  16. <text class="lh-40rpx font-num fs-40 SemiBold pl-8">{{attr.productSelect.integral}}</text>
  17. <text class="fs-28 lh-40rpx px-8 text--w111-666">+</text>
  18. <baseMoney :money="attr.productSelect.price" symbolSize="28" integerSize="40" decimalSize="28" color="var(--view-theme)" weight></baseMoney>
  19. </view>
  20. <baseMoney
  21. :money="attr.productSelect.price"
  22. symbolSize="32"
  23. integerSize="48"
  24. decimalSize="32"
  25. incolor="var(--primary-theme-con)"
  26. weight v-else></baseMoney>
  27. <view class="inline-block h-48 lh-48rpx text-center rd-24rpx bg-color fs-24 text--w111-fff px-20 mt-16"
  28. v-if="type == 0">
  29. 预估到手 <text class="fs-28 fw-600 pl-8">¥{{attr.productSelect.delivery_price}}</text>
  30. </view>
  31. <view class="mt-12 fs-24 text-#999">库存:{{ attr.productSelect.stock }}</view>
  32. </view>
  33. <view class="close w-36 h-36 bg--w111-eee rd-36px acea-row row-center-wrapper" @click="closeAttr">
  34. <text class="iconfont icon-ic_close fs-24"></text>
  35. </view>
  36. </view>
  37. <view class="rollTop">
  38. <scroll-view scroll-y="true" :style="'max-height: '+windowHeight+'rpx'" >
  39. <view class="productWinList">
  40. <view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
  41. <view class="title">{{ item.attr_name }}</view>
  42. <view class="listn acea-row row-middle">
  43. <view class="itemn" :class="item.index === itemn.attr ? 'on' : ''"
  44. v-for="(itemn, indexn) in item.attr_value" @click="tapAttr(indexw, indexn)"
  45. :key="indexn">
  46. {{ itemn.attr }}
  47. </view>
  48. </view>
  49. </view>
  50. <view class="item" v-if="isDelivery">
  51. <view class="title">配送方式</view>
  52. <view class="listn acea-row row-middle">
  53. <view class="itemn" v-if="attr.deliveryType.includes('1')" @click="getstoreInfo('1')" :class="flag==1?'on':isStoreBuy?'on2':''">商城配送</view>
  54. <view class="itemn" v-if="selfPickup" @click="getstoreInfo('2')" :class="flag==2?'on':''">门店自提</view>
  55. <view class="itemn" v-if="attr.deliveryType.includes('3') && storeList.length" @click="getstoreInfo('3')" :class="flag==3?'on':''">门店配送</view>
  56. </view>
  57. </view>
  58. <view class="address on1" v-if="flag ==1 && isDelivery" @click="openAddress">
  59. <view class="acea-row row-middle">
  60. <view class="max-w-596 line1">{{addressInfo}}</view>
  61. <view class="iconfont icon-ic_rightarrow ml-8 fs-28"></view>
  62. </view>
  63. <view class="info">{{nameInfo}}</view>
  64. </view>
  65. <view class="address" :class="[deliveryType]" v-if="flag ==3 && isDelivery" @click="openStore">
  66. <view class="acea-row row-middle">
  67. <view class="max-w-596 line1">{{deliveryName}}</view>
  68. <view class="iconfont icon-ic_rightarrow ml-8 fs-28" v-if="attr.isType != 1"></view>
  69. </view>
  70. <view class="info">
  71. <text class="iconfont icon-ic_location51 fs-24 mr-10"></text>{{deliveryAddress}}<text class="ml-16">{{distance}}</text>
  72. </view>
  73. </view>
  74. <view class="address" :class="attr.deliveryType.includes('1')?'on3':'on1'" v-if="flag ==2 && isDelivery" @click="openStore">
  75. <view class="acea-row row-middle">
  76. <view class="max-w-596 line1">{{deliveryName}}</view>
  77. <view class="iconfont icon-ic_rightarrow ml-8 fs-28" v-if="attr.isType != 1"></view>
  78. </view>
  79. <view class="info">
  80. <text class="iconfont icon-ic_location51 fs-24 mr-10"></text>{{deliveryAddress}}<text class="ml-16">{{distance}}</text>
  81. </view>
  82. </view>
  83. </view>
  84. </scroll-view>
  85. <view class="cart acea-row row-between-wrapper" v-if="type != 'setMeal' && type !='points'">
  86. <view class="title">数量</view>
  87. <view class="carnum acea-row row-left">
  88. <view class="item reduce acea-row row-center-wrapper"
  89. :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" v-if="attr.productSelect.cart_num <= 1">
  90. <text class="iconfont icon-ic_Reduce"></text>
  91. </view>
  92. <view class="item reduce acea-row row-center-wrapper"
  93. :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes" v-else>
  94. <text class="iconfont icon-ic_Reduce"></text>
  95. </view>
  96. <view class='item num acea-row row-middle'>
  97. <input type="number" v-model="attr.productSelect.cart_num"
  98. data-name="productSelect.cart_num" :always-embed="true" :adjust-position="true" cursor-spacing="30"
  99. @input="bindCode(attr.productSelect.cart_num)"></input>
  100. </view>
  101. <view class="item plus acea-row row-center-wrapper"
  102. :class="attr.productSelect.cart_num >= attr.productSelect.stock ? 'on' : ''" @click="CartNumAdd">
  103. <text class="iconfont icon-ic_increase"></text>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <view v-if="isExtends">
  109. <view class="joinBnt bg-gray" v-if="attr.productSelect.stock <= 0">已售罄</view>
  110. <view class="joinBnt bg-color" v-else @click="cartConfirm">确定</view>
  111. </view>
  112. <view class="joinBnt bg-color"
  113. v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat">我要参团
  114. </view>
  115. <view class="joinBnt on"
  116. v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.product_stock<=0)">已售罄
  117. </view>
  118. <view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">确定</view>
  119. <view class="joinBnt on" v-else-if="iScart && !attr.productSelect.stock">已售罄</view>
  120. </view>
  121. <view class="mask" @touchmove.stop.prevent="moveHandle" :hidden="attr.cartAttr === false" @click="closeAttr"></view>
  122. <!-- 选择门店 -->
  123. <view class="product-window" :class="isStore?'store':''">
  124. <view class="storeTitle">选择门店<text class="iconfont icon-guanbi5" @click="closeStore"></text></view>
  125. <view class="storeList">
  126. <view class="item" :class="active == index?'on':''" v-for="(item,index) in storeList" :key="index" @click="tapStore(index,item)">
  127. <view class="name line1">{{item.name}}</view>
  128. <view class="address acea-row row-middle">
  129. <view class="iconfont icon-ic_location51"></view>
  130. <view class="info">{{item.address}}{{item.detailed_address}}</view>
  131. </view>
  132. <view class="time acea-row row-middle">
  133. <view class="iconfont icon-icon_clock"></view>
  134. <view>营业时间:{{item.day_time}}</view>
  135. </view>
  136. <view class="iconfont icon-xuanzhong6" v-if="active == index"></view>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="mask on" @touchmove.prevent :hidden="isStore === false" @click="closeStore"></view>
  141. <addressWindow ref="addressWindow" :pagesUrl="pagesUrl" :fromType="1" :address="address" @changeClose="changeClose" @OnChangeAddress="OnChangeAddress">
  142. </addressWindow>
  143. </view>
  144. </template>
  145. <script>
  146. let windowHeight = (uni.getSystemInfoSync().windowHeight*(3/4)-238)*2;
  147. import addressWindow from '@/components/addressWindow';
  148. import {getAddressDefault} from '@/api/user.js'
  149. import {storeListApi} from '@/api/store.js'
  150. import {
  151. mapGetters,
  152. mapState
  153. } from 'vuex';
  154. export default {
  155. computed: {
  156. ...mapState({
  157. nearbyStore: state => state.app.nearbyStore
  158. }),
  159. ...mapGetters(['isLogin']),
  160. selfPickup(){
  161. let obj = this.attr.deliveryType.includes('2') && this.selfStoreList.length
  162. return obj
  163. },
  164. deliveryType(){
  165. let on = ''
  166. if(this.attr.deliveryType.includes('1') && this.selfPickup){
  167. on = 'on2'
  168. }else if((!this.attr.deliveryType.includes('1') && this.selfPickup) || (this.attr.deliveryType.includes('1') && !this.selfPickup)){
  169. on = 'on3'
  170. }else{
  171. on = 'on1'
  172. }
  173. return on
  174. }
  175. },
  176. components:{
  177. addressWindow
  178. },
  179. props: {
  180. isStoreBuy: {
  181. type: Number,
  182. value: 0
  183. },
  184. // 商品id
  185. productId: {
  186. type: Number | String,
  187. value: 0
  188. },
  189. attr: {
  190. type: Object,
  191. default: () => {}
  192. },
  193. storeInfo: {
  194. type: Object,
  195. default: () => {}
  196. },
  197. limitNum: {
  198. type: Number,
  199. value: 0
  200. },
  201. isShow: {
  202. type: Number,
  203. value: 0
  204. },
  205. iSbnt: {
  206. type: Number,
  207. value: 0
  208. },
  209. iSplus: {
  210. type: Number,
  211. value: 0
  212. },
  213. iScart: {
  214. type: Number,
  215. value: 0
  216. },
  217. is_vip: {
  218. type: Number,
  219. value: 0
  220. },
  221. type: {
  222. type: [Number, String],
  223. default: 0
  224. },
  225. fangda: {
  226. type: Boolean,
  227. default: true
  228. },
  229. isExtends:{
  230. type: Boolean,
  231. default: false
  232. },
  233. storeId:{
  234. type: Number,
  235. value: 0
  236. }
  237. },
  238. data() {
  239. return {
  240. flag:1,
  241. nameInfo:'', //地址用户信息
  242. addressInfo:'', // 商城快递
  243. deliveryName:'', // 门店配送
  244. distance:'',
  245. deliveryAddress:'',
  246. address: {
  247. address: false
  248. },
  249. pagesUrl:'',
  250. user_latitude: 0,
  251. user_longitude: 0,
  252. isDelivery: false,
  253. storeList: [],
  254. deliveryStoreList: [],
  255. selfStoreList: [],
  256. active:0,
  257. isStore: false,
  258. windowHeight:windowHeight,
  259. isAddress:false
  260. };
  261. },
  262. watch: {
  263. 'attr.deliveryType'(newValue, oldValue) {
  264. if (JSON.stringify(newValue) != JSON.stringify(oldValue)) {
  265. if (newValue.length) {
  266. if(this.active<1){
  267. this.getList();
  268. }
  269. let num = 1;
  270. if(newValue[0] == 1 && this.isStoreBuy){
  271. num = newValue[1];
  272. }else{
  273. num = newValue[0];
  274. }
  275. this.flag = num
  276. this.$emit('deliveryFun',num);
  277. }
  278. }
  279. },
  280. 'storeId'(){
  281. this.defaultStore();
  282. this.$emit('onstoreId',this.storeList[this.active],this.flag);
  283. }
  284. },
  285. mounted() {
  286. try {
  287. this.user_latitude = uni.getStorageSync('user_latitude');
  288. this.user_longitude = uni.getStorageSync('user_longitude');
  289. } catch (e) {}
  290. uni.$off('activeAddress');
  291. uni.$on('activeAddress', data => {
  292. this.getAddressDefault();
  293. })
  294. },
  295. methods: {
  296. closeStore(){
  297. this.isStore = false;
  298. },
  299. openStore(){
  300. if(this.attr.isType != 1){
  301. this.isStore = true;
  302. }
  303. },
  304. // 切换门店
  305. tapStore(index,item){
  306. this.active = index;
  307. this.deliveryName = item.name;
  308. this.deliveryAddress = item.detailed_address+'\xa0';
  309. this.distance = '距您'+item.range+'km';
  310. this.isStore = false;
  311. this.$emit('onstoreId',item,this.flag);
  312. },
  313. // 切换地址
  314. OnChangeAddress: function(e,row) {
  315. this.address.address = false;
  316. this.nameInfo = row.real_name+'\xa0\xa0'+row.phone
  317. this.addressInfo = row.province+'省'+row.city+row.district+row.street+row.detail
  318. this.$emit('onAddressId',row)
  319. },
  320. // 打开地址弹窗
  321. openAddress(){
  322. let pagesUrl = '/pages/users/user_address/index?fromType=1';
  323. if(!this.isAddress){
  324. this.$refs.addressWindow.getAddressList();
  325. this.address.address = true;
  326. this.pagesUrl = pagesUrl
  327. }else{
  328. uni.navigateTo({
  329. url: pagesUrl
  330. });
  331. }
  332. },
  333. // 关闭地址弹窗;
  334. changeClose: function() {
  335. this.$set(this.address, 'address', false);
  336. },
  337. // 配送地址
  338. getAddressDefault() {
  339. getAddressDefault().then(res=>{
  340. let data = res.data;
  341. this.isAddress = Array.isArray(data);
  342. if(!Array.isArray(data)){
  343. this.nameInfo = data.real_name+'\xa0\xa0'+data.phone
  344. this.addressInfo = data.province+'省'+data.city+data.district+data.street+data.detail
  345. this.$emit('onAddressId',data)
  346. }else{
  347. this.addressInfo = '点击添加地址'
  348. }
  349. }).catch(err=>{
  350. this.$util.Tips({
  351. title: err
  352. })
  353. })
  354. },
  355. selfLocation() {
  356. let self = this
  357. // #ifdef H5
  358. if (self.$wechat.isWeixin()) {
  359. self.$wechat.location().then(res => {
  360. this.user_latitude = res.latitude;
  361. this.user_longitude = res.longitude;
  362. uni.setStorageSync('user_latitude', res.latitude);
  363. uni.setStorageSync('user_longitude', res.longitude);
  364. self.getList();
  365. })
  366. } else {
  367. // #endif
  368. uni.getLocation({
  369. type: 'wgs84',
  370. success: (res) => {
  371. try {
  372. this.user_latitude = res.latitude;
  373. this.user_longitude = res.longitude;
  374. uni.setStorageSync('user_latitude', res.latitude);
  375. uni.setStorageSync('user_longitude', res.longitude);
  376. } catch {}
  377. self.getList();
  378. },
  379. fail:(res)=>{
  380. console.log(res)
  381. // #ifdef MP
  382. uni.getSetting({
  383. success: res=>{
  384. if(typeof(res.authSetting['scope.userLocation']) != 'undefined' && !res.authSetting['scope.userLocation']){
  385. uni.setStorageSync('refuseLocation', true);
  386. }
  387. }
  388. })
  389. // #endif
  390. }
  391. // complete: function() {
  392. // self.getList();
  393. // }
  394. });
  395. // #ifdef H5
  396. }
  397. // #endif
  398. },
  399. getList: function(id) {
  400. let data = {
  401. latitude: this.user_latitude || "", //纬度
  402. longitude: this.user_longitude || "", //经度
  403. page: 1,
  404. limit: 100,
  405. product_id: this.productId,
  406. is_store:'', //查找所有门店列表
  407. type: this.type == 1?1:0,
  408. // store_id: id?id:this.nearbyStore
  409. };
  410. storeListApi(data)
  411. .then(res => {
  412. let list = res.data.list.list;
  413. if(!id && list.length && this.attr && (this.attr.deliveryType.indexOf('2') != -1 || this.attr.deliveryType.indexOf('3') != -1)){
  414. this.isDelivery = true;
  415. if(this.$store.getters.isLogin){
  416. this.getAddressDefault()
  417. }
  418. }
  419. // 拆分自提门店列表和配送门店列表
  420. let selfStoreList = []
  421. list.forEach(function(item,index){
  422. if(item.is_store === 1) selfStoreList.push(item);
  423. });
  424. this.storeList = this.flag==2?selfStoreList:list;
  425. this.selfStoreList = selfStoreList;//门店自提
  426. this.deliveryStoreList = list;//门店配送
  427. this.defaultStore();
  428. this.$emit('onstoreId',this.storeList[this.active],this.flag);
  429. })
  430. .catch(err => {
  431. this.$util.Tips({
  432. title: err
  433. })
  434. });
  435. },
  436. defaultStore(){
  437. let storeId = this.storeId?this.storeId:this.nearbyStore
  438. let storeIndex = 0
  439. this.storeList.forEach((item,index)=>{
  440. if(item.id == storeId){
  441. storeIndex = index
  442. }
  443. })
  444. this.active = storeIndex;
  445. this.deliveryName = this.storeList[storeIndex].name;
  446. this.deliveryAddress = this.storeList[storeIndex].detailed_address+'\xa0';
  447. this.distance = '距您'+this.storeList[storeIndex].range+'km';
  448. },
  449. // 选择配送方式
  450. getstoreInfo(index) {
  451. if(index == 1 && this.isStoreBuy){
  452. return false
  453. }
  454. if(index === '2' || index === '3'){
  455. if ((!this.user_latitude || !this.user_longitude) && !uni.getStorageSync('refuseLocation')) {
  456. this.selfLocation();
  457. }
  458. }
  459. if(index === '2') this.storeList = this.selfStoreList; //门店自提
  460. if(index === '3') this.storeList = this.deliveryStoreList; //门店配送
  461. this.flag = index;
  462. this.defaultStore();
  463. this.$emit('deliveryFun',index);
  464. this.$emit('onstoreId',this.storeList[this.active],index);
  465. },
  466. showLocation(){
  467. if ((!this.user_latitude || !this.user_longitude) && !uni.getStorageSync('refuseLocation')) {
  468. this.selfLocation();
  469. }
  470. },
  471. moveHandle(){},
  472. goCat: function() {
  473. this.$emit('goCat');
  474. },
  475. /**
  476. * 购物车手动输入数量
  477. *
  478. */
  479. bindCode: function(e) {
  480. this.$emit('iptCartNum', this.attr.productSelect.cart_num);
  481. },
  482. closeAttr: function() {
  483. this.$emit('myevent');
  484. },
  485. CartNumDes: function() {
  486. this.$emit('ChangeCartNum', false);
  487. },
  488. CartNumAdd: function() {
  489. this.$emit('ChangeCartNum', true);
  490. },
  491. tapAttr: function(indexw, indexn) {
  492. let that = this;
  493. that.$emit("attrVal", {
  494. indexw: indexw,
  495. indexn: indexn
  496. });
  497. this.$set(this.attr.productAttr[indexw], 'index', this.attr.productAttr[indexw].attr_values[indexn]);
  498. let value = that
  499. .getCheckedValue()
  500. .join(",");
  501. that.$emit("ChangeAttr", value);
  502. },
  503. //获取被选中属性;
  504. getCheckedValue: function() {
  505. let productAttr = this.attr.productAttr;
  506. let value = [];
  507. for (let i = 0; i < productAttr.length; i++) {
  508. for (let j = 0; j < productAttr[i].attr_values.length; j++) {
  509. if (productAttr[i].index === productAttr[i].attr_values[j]) {
  510. value.push(productAttr[i].attr_values[j]);
  511. }
  512. }
  513. }
  514. return value;
  515. },
  516. showImg() {
  517. this.$emit('getImg');
  518. },
  519. cartConfirm(){
  520. this.$emit('onConfirm');
  521. }
  522. }
  523. }
  524. </script>
  525. <style scoped lang="scss">
  526. .mask{
  527. &.on{
  528. z-index: 100;
  529. }
  530. }
  531. .vip-money {
  532. color: #282828;
  533. font-size: 28rpx;
  534. font-weight: 700;
  535. margin-left: 6rpx;
  536. }
  537. .vipImg {
  538. width: 56rpx;
  539. height: 20rpx;
  540. margin-left: 6rpx;
  541. image {
  542. width: 100%;
  543. height: 100%;
  544. display: block;
  545. }
  546. }
  547. .product-window {
  548. position: fixed;
  549. bottom: 0;
  550. width: 100%;
  551. left: 0;
  552. background-color: #fff;
  553. z-index: 100;
  554. border-radius: 40rpx 40rpx 0 0;
  555. transform: translate3d(0, 100%, 0);
  556. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  557. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  558. padding-bottom: env(safe-area-inset-bottom);///兼容 IOS>11.2/
  559. &.store{
  560. background-color: #F5F5F5;
  561. border-radius: 40rpx 40rpx 0 0;
  562. transform: translate3d(0, 0, 0);
  563. z-index: 102;
  564. margin: 0;
  565. }
  566. .storeTitle{
  567. text-align: center;
  568. height: 100rpx;
  569. line-height: 100rpx;
  570. font-size: 32rpx;
  571. font-weight: 500;
  572. color: #282828;
  573. position: relative;
  574. .iconfont{
  575. position: absolute;
  576. font-size: 35rpx;
  577. right: 30rpx;
  578. }
  579. }
  580. .storeList{
  581. max-height: 690rpx;
  582. overflow: auto;
  583. .item{
  584. width: 690rpx;
  585. background: #FFFFFF;
  586. border-radius: 12rpx;
  587. margin: 0 auto 20rpx auto;
  588. padding: 28rpx 30rpx;
  589. border: 1px solid #fff;
  590. position: relative;
  591. &.on{
  592. border-color: var(--view-theme);
  593. }
  594. .icon-xuanzhong6{
  595. position: absolute;
  596. right: -6rpx;
  597. bottom: -6rpx;
  598. color: var(--view-theme);
  599. font-size: 54rpx;
  600. }
  601. .name{
  602. font-weight: 500;
  603. color: #333333;
  604. font-size: 28rpx;
  605. }
  606. .time{
  607. font-weight: 400;
  608. color: #888888;
  609. font-size: 22rpx;
  610. margin-top: 15rpx;
  611. .iconfont{
  612. font-size: 20rpx;
  613. margin-right: 8rpx;
  614. }
  615. }
  616. .address{
  617. font-weight: 400;
  618. color: #888888;
  619. font-size: 22rpx;
  620. margin-top: 13rpx;
  621. .iconfont{
  622. font-size: 20rpx;
  623. margin-right: 8rpx;
  624. margin-top: 6rpx;
  625. }
  626. .info{
  627. width: 590rpx;
  628. line-height: 1.5;
  629. }
  630. }
  631. }
  632. }
  633. }
  634. .product-window.on {
  635. transform: translate3d(0, 0, 0);
  636. }
  637. .product-window.join {
  638. padding-bottom: 30rpx;
  639. }
  640. .product-window.joinCart {
  641. padding-bottom: 30rpx;
  642. z-index: 1000;
  643. }
  644. .product-window .textpic {
  645. padding: 0 32rpx;
  646. margin-top: 48rpx;
  647. position: relative;
  648. .close{
  649. position: absolute;
  650. right: 38rpx;
  651. top: -14rpx;
  652. }
  653. }
  654. .product-window .textpic .pictrue {
  655. width: 180rpx;
  656. height: 180rpx;
  657. position: relative;
  658. .icon{
  659. width: 30rpx;
  660. height: 30rpx;
  661. background-color: rgba(0,0,0,0.4);
  662. border-radius: 4rpx;
  663. position: absolute;
  664. bottom: 8rpx;
  665. right: 8rpx;
  666. text-align: center;
  667. line-height: 23rpx;
  668. .iconfont{
  669. color: #fff;
  670. font-size: 20rpx;
  671. }
  672. }
  673. }
  674. .product-window .textpic .pictrue image {
  675. width: 100%;
  676. height: 100%;
  677. border-radius: 16rpx;
  678. }
  679. .product-window .textpic .text {
  680. width: 410rpx;
  681. font-size: 32rpx;
  682. color: #202020;
  683. }
  684. .product-window .textpic .text .money {
  685. font-size: 24rpx;
  686. margin-top: 40rpx;
  687. .icon{
  688. display: inline-block;
  689. font-size: 16rpx;
  690. font-weight: normal;
  691. background: #FF9500;
  692. color: #fff;
  693. border-radius: 18rpx;
  694. padding: 2rpx 6rpx;
  695. margin-left: 10rpx;
  696. .iconfont{
  697. font-size: 16rpx;
  698. margin-right: 4rpx;
  699. color: #fff;
  700. }
  701. }
  702. }
  703. .product-window .textpic .text .money .num {
  704. font-size: 36rpx;
  705. }
  706. .product-window .textpic .text .money .stock {
  707. color: #999;
  708. margin-left: 6rpx;
  709. }
  710. .product-window .textpic .icon-guanbi {
  711. position: absolute;
  712. right: 30rpx;
  713. top: -5rpx;
  714. font-size: 35rpx;
  715. color: #8a8a8a;
  716. }
  717. .product-window .rollTop {
  718. margin-top: 36rpx;
  719. }
  720. .product-window .productWinList{
  721. .address{
  722. width: 690rpx;
  723. background: #F5F5F5;
  724. padding: 24rpx 38rpx 24rpx 20rpx;
  725. margin: 28rpx auto;
  726. font-weight: 400;
  727. color: #333333;
  728. font-size: 28rpx;
  729. border-radius: 8rpx;
  730. position: relative;
  731. &::before{
  732. position: absolute;
  733. content: '';
  734. top:-10rpx;
  735. width: 0;
  736. height: 0;
  737. border-left: 14rpx solid transparent;
  738. border-right: 14rpx solid transparent;
  739. border-bottom: 12rpx solid #F5F5F5;
  740. }
  741. &.on1{
  742. &::before{
  743. left:78rpx;
  744. }
  745. }
  746. &.on2{
  747. &::before{
  748. left: 480rpx;
  749. }
  750. }
  751. &.on3{
  752. &::before{
  753. left:280rpx;
  754. }
  755. }
  756. .info{
  757. font-weight: 400;
  758. color: #999999;
  759. font-size: 24rpx;
  760. margin-top: 12rpx;
  761. .con{
  762. width: 416rpx;
  763. }
  764. }
  765. }
  766. }
  767. .product-window .productWinList .item~.item {
  768. margin-top: 36rpx;
  769. }
  770. .product-window .productWinList .item .title {
  771. font-size: 28rpx;
  772. font-weight: 500;
  773. color: #333;
  774. padding: 0 32rpx;
  775. }
  776. .product-window .productWinList .item .listn {
  777. padding: 0 32rpx 0 16rpx;
  778. }
  779. .product-window .productWinList .item .listn .itemn {
  780. // height: 56rpx;
  781. // line-height: 56rpx;
  782. border: 1rpx solid #F2F2F2;
  783. font-size: 24rpx;
  784. color: #333;
  785. padding: 10rpx 44rpx;
  786. border-radius: 28rpx;
  787. margin: 24rpx 0 0 16rpx;
  788. background-color: #F2F2F2;
  789. word-break: break-all;
  790. }
  791. .product-window .productWinList .item .listn .itemn.on {
  792. color: var(--view-theme);
  793. background: var(--view-minorColorT);
  794. border-color: var(--view-theme);
  795. }
  796. .product-window .productWinList .item .listn .itemn.limit {
  797. color: #999;
  798. text-decoration: line-through;
  799. }
  800. .product-window .cart {
  801. padding: 0 30rpx;
  802. }
  803. .product-window .cart .title {
  804. font-size: 28rpx;
  805. color: #333;
  806. }
  807. .product-window .cart .carnum {
  808. height: 54rpx;
  809. margin-top: 24rpx;
  810. }
  811. .product-window .cart .carnum .iconfont {
  812. font-size: 25rpx;
  813. }
  814. .product-window .cart .carnum view {
  815. // border: 1px solid #a4a4a4;
  816. width: 84rpx;
  817. text-align: center;
  818. height: 100%;
  819. line-height: 54rpx;
  820. color: #282828;
  821. font-size: 45rpx;
  822. }
  823. .product-window .cart .carnum .reduce {
  824. border-right: 0;
  825. border-radius: 6rpx 0 0 6rpx;
  826. line-height: 48rpx;
  827. font-size: 60rpx;
  828. }
  829. .product-window .cart .carnum .reduce.on {
  830. // border-color: #e3e3e3;
  831. color: #DEDEDE;
  832. }
  833. .product-window .cart .carnum .plus {
  834. border-left: 0;
  835. border-radius: 0 6rpx 6rpx 0;
  836. line-height: 46rpx;
  837. }
  838. .product-window .cart .carnum .plus.on {
  839. // border-color: #e3e3e3;
  840. color: #dedede;
  841. }
  842. .product-window .cart .carnum .num {
  843. background: rgba(242, 242, 242, 1);
  844. color: #282828;
  845. font-size: 28rpx;
  846. border-radius: 4rpx;
  847. }
  848. .product-window .joinBnt {
  849. font-size: 28rpx;
  850. width: 710rpx;
  851. height: 80rpx;
  852. border-radius: 40rpx;
  853. text-align: center;
  854. line-height: 80rpx;
  855. color: #fff;
  856. margin: 74rpx auto 12rpx;
  857. }
  858. .product-window .joinBnt.on {
  859. background-color: #bbb;
  860. color: #fff;
  861. }
  862. .mt-74{
  863. margin-top: 74rpx;
  864. }
  865. .join_cart{
  866. background-color: var(--view-bntColor);
  867. }
  868. .bg-gray{
  869. background-color: #CCCCCC;
  870. }
  871. </style>