小言_互联网的博客

省钱兄(APP+H5+公众号+微信小程序)淘宝客APP源码社交电商uniapp源码前端源码自营商城源码

261人阅读  评论(0)

1、首页

广告位、淘宝返佣、拼多多返佣、京东返佣、热销榜、聚划算、天猫超市、母婴精选、9.9包邮、免单中心、超值大牌、新人攻略 爆款没事、每日上新、6.9包邮、9.9包邮、精选包邮、3.9包邮、热门抖货、商品推荐、商品详情、商品海报 、APP检测升级、配置动态化、分享海报、会员授权、获取剪切板

2、分类

商品分类 、分类详情、多平台比较、海报生成

3、超级搜索

热门搜索、搜索历史、搜索

4、超值精选

精选单品、好货专场

5、我的

提现、提现明细、会员、订单明细、浏览历史、我的收藏、推广中心、推广订单、免单中心、账号安全、设置、提现设置、换绑手机号、修改密码、邀请成员、推广海报、我的特权、会员升级

 

6、免费的uniapp视频学习资料

关注技术公众号【码兄】回复【uniapp】免费获取

7、uniapp qq技术交流群

850289230

8、项目截图

本项目使用uni-app开发支持多端使用!目前适配h5、安卓、IOS、公众号

 

9、体验说明

1、微信公众号【省钱兄】体验 (H5+公众号) 版本

2、 Android APP体验地址

https://www.pgyer.com/shengqx

3、 IOS APP 市场搜索【凡省】【咖哧优品】【微鲤淘】体验

拼多多版本

拼多多、京东版本

 

 

 

10、CSDN积分下载地址:

公众号+h5+app源码下载地址

https://download.csdn.net/download/weixin_39706415/12766980

微信小程序源码

https://download.csdn.net/download/weixin_39706415/12767042

11、免费下载方式

关注【码兄】技术公众号 点击【开源项目】下载

 

目前只提供学习使用!不可商用!

12、详情页面源码


  
  1. <template>
  2. <view class="s-page-wrapper">
  3. <view class="index-goods" v-if="loadGoods">
  4. <view class="swiper">
  5. <swiper class="swiper-container" :autoplay="true" :interval="4000" :circular="true" :indicator-dots="true"
  6. indicator-active-color= "#FC3F78" indicator-color= "#cccccc">
  7. <block v-for="item in goods.images" :key="item">
  8. <swiper-item class="swiper-wrapper">
  9. <image lazy-load :src="item" mode="widthFix" class="is-response" @longpress="toSave(item)"> </image>
  10. </swiper-item>
  11. </block>
  12. </swiper>
  13. </view>
  14. <view class="goods_info" style="padding-top: 6px">
  15. <view style="padding: 8px">
  16. <image v-if="goods.shoptype=='B'" style="height: 14px;width:12px;margin-right: 4px" src="../../static/img/mao.png"> </image>
  17. <text style="font-weight: bold">{{ goods.itemtitle }} </text>
  18. </view>
  19. <view class="coupon-price s-row" style="margin-bottom: 16upx;">
  20. <view class="price" style="width: 60%">
  21. <text style="font-size: 14px"> 券后价
  22. <text style="font-size: 12px"></text>
  23. </text>
  24. <text style="font-weight: 700;">{{ goods.itemendprice }} </text>
  25. <text style="font-size: 12px;color: grey;text-decoration:line-through;margin-left: 8px">
  26. ¥{{goods.itemprice }}
  27. </text>
  28. </view>
  29. <view class="volume" style="padding-top: 14rpx;font-size: 14px;width: 40%">{{ goods.itemsale }}人付款
  30. </view>
  31. </view>
  32. <view class="coupon-price s-row">
  33. </view>
  34. </view>
  35. <view class="goods_quan s-row">
  36. <view class="row getGoodsLink">
  37. <view class="is-col-16 money">
  38. <view style="font-weight: bold">
  39. <text>{{goods.couponmoney}} </text>
  40. 元优惠券
  41. </view>
  42. <view class="date-coupon" v-if="goods.start_time">使用期限: {{goods.start_time}} -
  43. {{goods.end_time}}
  44. </view>
  45. </view>
  46. <view class="is-col-8 name">
  47. <text @tap="shopCartShare('quan')">立即领取 </text>
  48. </view>
  49. </view>
  50. <image lazy-load src="../../static/img/goods/goods_quan.png" mode="widthFix" class="is-response"> </image>
  51. </view>
  52. <view class="goods_reco" style="margin-top: 10px;display: flex">
  53. <view class="goods-info-title" style="color: #FC3F78;width: 20%;text-align: center">必买理由 </view>
  54. <view class="goods_desc" style="padding-bottom: 8px;padding-top:8px;width: 80%">{{ goods.itemdesc }}
  55. </view>
  56. </view>
  57. <view class="goods_reco" style="margin-top: -100rpx" v-if="goods.images">
  58. <view class="goods-info-title">宝贝详情 </view>
  59. <view class="imglist">
  60. <block v-for="(item,index) in goods.images">
  61. <image lazy-load :src="item" mode="widthFix" class="is-response" @longpress="toSave(item)"> </image>
  62. </block>
  63. </view>
  64. </view>
  65. <!-- 购买按钮 -->
  66. <view class="goods_shop_cart">
  67. <view class="cent" style="display: flex">
  68. <view style="text-align: center;width: 25%;margin-top: 4px;margin-bottom: 4px;display: flex">
  69. <view style="width: 50%;text-align: center">
  70. <view class="iconfont icon-shouye" @tap="goBackUp()"> </view>
  71. <view style="font-size: 12px">返回 </view>
  72. </view>
  73. <view style="width: 50%;text-align: center">
  74. <view class="iconfont icon-shoucang" :style="collect.isCollect" @tap="clickCollect()"> </view>
  75. <view style="font-size: 12px" :style="collect.isCollect">{{collect.name}} </view>
  76. </view>
  77. </view>
  78. <view style="width: 75%;display: flex;color: white">
  79. <view style="width: 50%;background: #FF6DB2;text-align: center;padding-top: 12px" @tap="shopCartShare('showPic')">{{buyDes}}
  80. </view>
  81. <view class="getTbk" style="width: 50%;background:#F15B6C; text-align: center;padding-top: 12px" @tap="shopCartShare('quan')">立即领券
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. <!-- 购买按钮 active-->
  87. <view v-if="shopCartBg" class="goods_shop_cart_bg" @tap="showShopCartBg('cart')" @touchmove.stop.prevent="moveHandleStop"> </view>
  88. <view class="goods_share" v-bind:class="[shopCartBg ? 'active' : '','']">
  89. <view class="cent">
  90. <view class="" @tap="shareFc()">
  91. <text class="iconfont icon-kouling"> </text>
  92. 生成海报
  93. </view>
  94. <text class="em"> </text>
  95. <view class="" @tap="shopCartShare('tklbuy')">
  96. <text class="iconfont icon-tupian"> </text>
  97. 素材分享
  98. </view>
  99. <view class="" @tap="copyHref">
  100. <text class="cuIcon cuIcon-copy"> </text>
  101. 复制链接
  102. </view>
  103. <view @tap="shopCartShares('tkl')" v-if="isWeiXin">
  104. <text class="cuIcon cuIcon-share"> </text>
  105. 发送给朋友
  106. </view>
  107. </view>
  108. </view>
  109. <view class="navBarButtonBox">
  110. <!-- 顶部右侧菜单 -->
  111. <view v-if="navBarButton" class="goods_shop_cart_bg navBarButton" @tap="showShopCartBg('nav')"
  112. @ touchmove.stop.prevent= "moveHandleStop"> </view>
  113. <view class="h_newlit" v-bind:class="[navBarButton ? 'active' : '','']">
  114. <view class="em">
  115. <view style="font-size: 14px" @tap="navBarButtontO('home')">
  116. <text class="iconfont icon-shouye"> </text>
  117. 返回首页
  118. </view>
  119. <view style="font-size: 14px" @tap="navBarButtontO('search')">
  120. <text class="iconfont icon-sousuo"> </text>
  121. 超级搜索
  122. </view>
  123. <view style="font-size: 14px" @tap="navBarButtontO('footer')">
  124. <text class="iconfont icon-zuji"> </text>
  125. 我的足迹
  126. </view>
  127. <view style="font-size: 14px" @tap="navBarButtontO('like')">
  128. <text class="iconfont icon-shoucang"> </text>
  129. 个人中心
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <!-- 顶部右侧菜单 -->
  135. <!-- 淘口令分享 -->
  136. <simpleModal ref="simpleModalTkl" @maskClose="TklmaskClose">
  137. <view class="buy-box-title">复制分享文案 </view>
  138. <view class="buy-box-center">
  139. <view class="code-cent">
  140. <div class="cente-text">
  141. <div>
  142. <view class="textarea">{{goods.itemtitle}} <br>【在售价】{{goods.itemprice}}元 <br>【券后价】{{goods.itemendprice}}元 <br>复製此信息进入【手机Tao宝】即可查看并下单{{tkl}}
  143. <br>【必买理由】{{goods.itemdesc}} <br>
  144. </view>
  145. </div>
  146. </div>
  147. <view class="closeTips">长按上方轮播图片可保存图片素材哦~ </view>
  148. </view>
  149. <view class="buy-btn-copy" v-bind:class="[copyTklStatus ? 'active' : '','']" @tap="copyTklWenAns">
  150. {{copyTklStatus?"已复制到剪切板":"一键复制"}}
  151. </view>
  152. </view>
  153. </simpleModal>
  154. <!-- 淘口令分享 -->
  155. <!-- 淘口令购买 -->
  156. <simpleModal ref="simpleModalTklBuy" @maskClose="TklBuymaskClose">
  157. <view class="buy-box-center">
  158. <view class="code-cent" style="margin-top: 10px;">
  159. <div class="cente-text" style="height: auto;">
  160. <div>
  161. <view class="textarea" style="height: auto;">复制框内整段文字,打开【手机淘宝APP】即可领券购买。{{tkl}}
  162. </view>
  163. </div>
  164. </div>
  165. </view>
  166. <button class="buy-btn-copy" v-bind:class="[copyTklStatus ? 'active' : '','']" @tap="copyTklWenAn">
  167. {{copyTklStatus?" 复制成功!请打开【手机淘宝】购买":"一键复制"}}
  168. </button>
  169. </view>
  170. </simpleModal>
  171. <!-- 淘口令购买 -->
  172. </view>
  173. <view class="" v-if="!loadGoods">
  174. <view class="s-page">
  175. <view class="is-100vh is-flex is-column is-justify-center is-align-center ">
  176. <image src="../../static/img/load.gif" style="width:75px;height: 75px;" class="is-response" mode="widthFix"> </image>
  177. </view>
  178. </view>
  179. </view>
  180. <view v-if="couponlist.length > 0" style="text-align: center;font-size: 18px;color: #FC3F78;background: white;margin-top: -60px;padding: 16px">
  181. 猜你喜欢
  182. </view>
  183. <view class="goods-list" style="margin-bottom: 60px" v-if="couponlist.length > 0">
  184. <orange-goods-card-home v-for="(item,index) in couponlist" :index="index%2" :tkmoney='"¥"+item.tkmoney' :itemid="item.itemid"
  185. :itempic= "item.itempic?item.itempic+'_310x310.jpg':'https://www.gomyorder.cn/logo.png'" :itemtitle= "item.itemtitle"
  186. :itemprice= '"¥"+item.itemprice' :itemsale= 'item.itemsale' :itemendprice= '""+item.itemendprice' :couponmoney= "item.couponmoney"> </orange-goods-card-home>
  187. </view>
  188. <view id="shareit" v-if="show_share" @tap="closeShare">
  189. <image class="arrow" src="../../static/img/jiant.png"> </image>
  190. <text id="follow">点击右上角按钮!【发送给朋友】 </text>
  191. </view>
  192. <view class="scroll_top active " @click="copyTkl()" style="bottom: 56px;width: 100px;right: -12px;padding-right: 10px">
  193. <text>
  194. <text class="cuIcon cuIcon-copy"> </text>
  195. 淘口令
  196. </text>
  197. </view>
  198. <view class="content">
  199. <view class="flex_row_c_c modalView" :class="qrShow?'show':''" @tap="hideQr()">
  200. <view class="flex_column">
  201. <view class="backgroundColor-white padding1vh border_radius_10px">
  202. <image :src="poster.finalPath" mode="widthFix" class="posterImage"> </image>
  203. </view>
  204. <button class="marginTop2vh" type="primary" size="mini" @tap.prevent.stop="saveImage()">保存图片
  205. </button>
  206. </view>
  207. </view>
  208. <view class="hideCanvasView">
  209. <canvas class="hideCanvas" canvas-id="default_PosterCanvasId" :style="{width: (poster.width||0) + 'px', height: (poster.height||0) + 'px'}"> </canvas>
  210. </view>
  211. </view>
  212. </view>
  213. </template>
  214. <script>
  215. import simpleModal from '../../components/simple-pro/customModal.vue';
  216. export default {
  217. onShareAppMessage(res) {
  218. return {
  219. title: this.goods.itemtitle,
  220. path: '/pages/detail/goodsinfo?itemid=' + this.itemid
  221. }
  222. },
  223. data() {
  224. return {
  225. buyDes: "口令购买",
  226. collect: {
  227. name: '收藏',
  228. isCollect: "",
  229. },
  230. show_share: false,
  231. itemid: '',
  232. loadGoods: true,
  233. goods: {},
  234. taoBaoBuy: true,
  235. shopCartBg: false,
  236. scrollTop: false,
  237. couponlist: [],
  238. navBarButton: false,
  239. copyTklStatus: false,
  240. save: false,
  241. tkl: '',
  242. relation_id: null,
  243. money: 0,
  244. showFollow: false,
  245. isWeiXin: false,
  246. footprintKey: 'orange-sqx-footprint',
  247. collectKey: 'orange-sqx-collect',
  248. poster: {},
  249. qrShow: false,
  250. canvasId: 'default_PosterCanvasId'
  251. };
  252. },
  253. components: {
  254. simpleModal
  255. },
  256. onShow: function() {
  257. this.copyTklStatus = false;
  258. },
  259. onLoad: function(e) {
  260. if (e.itemid) {
  261. this.itemid = e.itemid;
  262. this.loadGoodsInfo();
  263. if ( this.$queue.getData( "openid")) {
  264. this.$Request.get( "/tao/wx/follow/" + this.$queue.getData( "openid")).then( res => {
  265. this.showFollow = res.status !== 500 && res !== true;
  266. });
  267. }
  268. let userId = this.$queue.getData( "userId");
  269. if (!userId) {
  270. this.$Request.getT( "/user/" + userId).then( res => {
  271. if (res.status === 0) {
  272. this.$queue.setData( "openid", res.data.openId);
  273. this.$queue.setData( "image_url", res.data.image_url);
  274. this.$queue.setData( "mobile", res.data.phone);
  275. this.$queue.setData( "nickName", res.data.nickName);
  276. this.$queue.setData( "relation_id", res.data.relationId);
  277. this.$queue.setData( "gender", parseInt(res.data.gender));
  278. }
  279. });
  280. }
  281. } else {
  282. uni.navigateBack();
  283. }
  284. },
  285. onPageScroll: function(e) {
  286. this.scrollTop = e.scrollTop > 200;
  287. },
  288. onNavigationBarButtonTap: function() {
  289. this.navBarButton = ! this.navBarButton;
  290. },
  291. methods: {
  292. //初始化加载详情数据
  293. loadGoodsInfo: function() {
  294. let that = this;
  295. uni.showLoading({
  296. title: '加载中...'
  297. });
  298. this.$Request.get( "/item_detail/apikey/maxd/itemid/" + this.itemid).then( res => {
  299. if (res.code === 1) {
  300. if (res.data.taobao_image && res.data.taobao_image.length > 0) {
  301. let images = res.data.taobao_image.split( ',');
  302. res.data.images = [];
  303. for ( let i = 0; i < images.length; i++) {
  304. res.data.images.push(images[i])
  305. }
  306. } else {
  307. res.data.images = [];
  308. res.data.images.push(res.data.itempic);
  309. }
  310. if (res.data.start_time && res.data.end_time) {
  311. res.data.start_time = this.formatDate( new Date(res.data.start_time * 1000));
  312. res.data.end_time = this.formatDate( new Date(res.data.end_time * 1000));
  313. }
  314. res.data.itemsale = res.data.itemsale > 10000 ? (res.data.itemsale / 10000).toFixed( 1) + "万" : res.data.itemsale;
  315. that.goods = res.data;
  316. that.loadGoods = true;
  317. that.money = (res.data.tkmoney / 2).toFixed( 2);
  318. try {
  319. let isExist = this.$queue.isExist( this.collectKey, res.data.itemid);
  320. if (isExist === true) {
  321. this.collect.name = "已收藏";
  322. this.collect.isCollect = "color: #FC3F78";
  323. } else {
  324. this.collect.name = "收藏";
  325. this.collect.isCollect = false;
  326. }
  327. let isExists = this.$queue.isExist( this.footprintKey, res.data.itemid);
  328. if (isExists === false) {
  329. this.$queue.insert({
  330. key: this.footprintKey,
  331. value: this.goods,
  332. });
  333. }
  334. this.$queue.setData( "itempic", res.data.itempic);
  335. this.$queue.setData( "itemtitle", res.data.itemtitle);
  336. this.$queue.setData( "itemprice", res.data.itemprice);
  337. this.$queue.setData( "itemendprice", res.data.itemendprice);
  338. this.buyDes = "分享给朋友";
  339. this.loadTkl();
  340. } catch (e) {
  341. console.log(e);
  342. }
  343. } else {
  344. uni.navigateBack();
  345. }
  346. uni.hideLoading();
  347. });
  348. this.$Request.get( "/get_similar_info/apikey/maxd/itemid/" + this.itemid).then( res => {
  349. if (res.code === 1) {
  350. res.data.forEach( d => {
  351. d.tkmoney = (d.tkmoney / 2).toFixed( 2);
  352. d.itemsale = d.itemsale > 10000 ? "已售 " + (d.itemsale / 10000).toFixed( 1) + "万" : "已售 " + d.itemsale;
  353. this.couponlist.push(d);
  354. });
  355. }
  356. });
  357. },
  358. goPublisher() {
  359. uni.navigateTo({
  360. url: '/pages/member/publisher'
  361. });
  362. },
  363. /**
  364. * 保存图片
  365. * @param url
  366. */
  367. toSave(url) {
  368. //#ifndef H5
  369. uni.getImageInfo({
  370. src: url,
  371. success: function(image) {
  372. console.log( '图片信息:', JSON.stringify(image));
  373. uni.saveImageToPhotosAlbum({
  374. filePath: image.path,
  375. success: function() {
  376. console.log( 'save success');
  377. uni.showToast({
  378. title: '图片保存成功',
  379. icon: 'none',
  380. duration: 3000
  381. });
  382. }
  383. });
  384. }
  385. });
  386. //#endif
  387. },
  388. /**
  389. * 返回
  390. */
  391. goBackUp() {
  392. uni.navigateBack();
  393. },
  394. closeShare() {
  395. this.show_share = false;
  396. },
  397. clickCollect() { //收藏
  398. let isExist = this.$queue.isExist( this.collectKey, this.goods.itemid);
  399. if (isExist) {
  400. let items = [];
  401. items.push( this.goods.itemid);
  402. this.$queue.removeItem( this.collectKey, items);
  403. this.collect.name = "收藏";
  404. this.collect.isCollect = "";
  405. } else {
  406. this.$queue.insert({
  407. key: this.collectKey,
  408. value: this.goods,
  409. });
  410. this.collect.name = "已收藏";
  411. this.collect.isCollect = "color: #FC3F78";
  412. }
  413. },
  414. getQuan: function() {
  415. uni.showLoading({
  416. title: '加载中...'
  417. });
  418. let that = this;
  419. this.$Request.post( "/ratesurl", {
  420. itemid: this.itemid,
  421. tb_name: this.$queue.getTaoBaoName(),
  422. pid: this.$queue.getTaoBaoPid(),
  423. apikey: this.$queue.getTaoBaoKey(),
  424. }).then( res => {
  425. if (res.code === 1) {
  426. that.shopCartShare( 'tttt');
  427. }
  428. });
  429. },
  430. /**
  431. *获取佣金结算
  432. * @param type
  433. */
  434. getTkl: function(type) {
  435. let that = this;
  436. let relation_id = that.$queue.getData( "relation_id");
  437. if ( this.tkl) {
  438. if (type === "tkl" && type !== "tklbuy") {
  439. this.$refs.simpleModalTkl.show({
  440. showConfirmButton: false,
  441. });
  442. } else if (type === "tttt") {
  443. this.$refs.simpleModalTklBuy.show({
  444. showConfirmButton: false,
  445. });
  446. } else if (type === "copy") {
  447. that.copyTkl();
  448. } else if (relation_id) {
  449. this.$refs.simpleModalTkl.show({
  450. showConfirmButton: false,
  451. });
  452. } else {
  453. this.$refs.simpleModalTklBuy.show({
  454. showConfirmButton: false,
  455. });
  456. }
  457. uni.hideLoading();
  458. } else {
  459. uni.showLoading({
  460. title: '加载中...'
  461. });
  462. this.$Request.post( "/ratesurl", {
  463. itemid: this.itemid,
  464. tb_name: this.$queue.getTaoBaoName(),
  465. pid: this.$queue.getTaoBaoPid(),
  466. apikey: this.$queue.getTaoBaoKey()
  467. }).then( res => {
  468. if (res.code === 1) {
  469. this.$Request.postF( "/taobao/tbwd", {
  470. "appKey": this.$queue.getTaoBaoAppid(),
  471. "appSecret": this.$queue.getTaoBaoSecret(),
  472. "logo": this.goods.itempic,
  473. "text": this.goods.itemtitle,
  474. "url": res.data.coupon_click_url
  475. }).then( res => {
  476. if (res && res.tbk_tpwd_create_response.data.model) {
  477. this.tkl = res.tbk_tpwd_create_response.data.model;
  478. if (type === "tkl" && type !== "tklbuy") {
  479. this.$refs.simpleModalTkl.show({
  480. showConfirmButton: false,
  481. });
  482. } else if (type === "tttt") {
  483. this.$refs.simpleModalTklBuy.show({
  484. showConfirmButton: false,
  485. });
  486. } else if (type === "copy") {
  487. that.copyTkl();
  488. } else if (type === "save") {} else if (relation_id) {
  489. this.$refs.simpleModalTkl.show({
  490. showConfirmButton: false,
  491. });
  492. } else {
  493. this.$refs.simpleModalTklBuy.show({
  494. showConfirmButton: false,
  495. });
  496. }
  497. }
  498. uni.hideLoading();
  499. })
  500. } else {
  501. uni.hideLoading();
  502. }
  503. });
  504. }
  505. },
  506. formatDate: function(now) {
  507. const year = now.getFullYear();
  508. const month = now.getMonth() + 1;
  509. const date = now.getDate();
  510. return year + "-" + month + "-" + date;
  511. },
  512. loadTkl() {
  513. let that = this;
  514. this.$Request.post( "/ratesurl", {
  515. itemid: this.itemid,
  516. tb_name: this.$queue.getTaoBaoName(),
  517. pid: this.$queue.getTaoBaoPid(),
  518. apikey: this.$queue.getTaoBaoKey(),
  519. }).then( res => {
  520. if (res.code === 1) {
  521. this.$Request.postF( "/taobao/tbwd", {
  522. "appKey": this.$queue.getTaoBaoAppid(),
  523. "appSecret": this.$queue.getTaoBaoSecret(),
  524. "logo": this.goods.itempic,
  525. "text": this.goods.itemtitle,
  526. "url": res.data.coupon_click_url
  527. }).then( res => {
  528. if (res && res.tbk_tpwd_create_response.data.model) {
  529. this.tkl = res.tbk_tpwd_create_response.data.model;
  530. }
  531. })
  532. }
  533. });
  534. },
  535. copyTkl: function() {
  536. uni.setClipboardData({
  537. data: this.tkl,
  538. success: ( r => {
  539. uni.showToast({
  540. title: "复制成功",
  541. duration: 1500,
  542. });
  543. }),
  544. })
  545. },
  546. moveHandleStop: function() {
  547. console.log( "111")
  548. },
  549. showShopCartBg: function(type) {
  550. if (type === "cart") {
  551. this.shopCartBg = ! this.shopCartBg;
  552. }
  553. if (type === "nav") {
  554. this.navBarButton = ! this.navBarButton;
  555. }
  556. },
  557. topScrollTap: function() {
  558. uni.pageScrollTo({
  559. scrollTop: 0,
  560. duration: 300
  561. });
  562. },
  563. navBarButtontO: function(type) {
  564. if (type === "search") {
  565. uni.switchTab({
  566. url: "/pages/homeSearch/index"
  567. })
  568. } else if (type === "like") {
  569. uni.switchTab({
  570. url: "/pages/member/user"
  571. })
  572. } else if (type === "footer") {
  573. uni.navigateTo({
  574. url: "/pages/footer/index"
  575. })
  576. } else if (type === "home") {
  577. uni.switchTab({
  578. url: "/pages/index/index"
  579. })
  580. }
  581. },
  582. shopCartShare: function(type) {
  583. if (type === "tkl") {
  584. this.copyTklStatus = false;
  585. this.getTkl(type);
  586. } else if (type === "tklbuy") {
  587. let relation_id = this.$queue.getData( "relation_id");
  588. if (relation_id) {
  589. // // 淘口令购买
  590. this.copyTklStatus = false;
  591. this.getTkl(type);
  592. } else {
  593. this.$queue.setData( "href", '/pages/detail/goodsinfo?itemid=' + this.itemid);
  594. let token = this.$queue.getData( "token");
  595. let userId = this.$queue.getData( "userId");
  596. if (token) {
  597. uni.navigateTo({
  598. url: '/pages/member/publisher?uid=' + userId + '&token=' + token
  599. });
  600. } else {
  601. uni.navigateTo({
  602. url: '/pages/public/login'
  603. })
  604. }
  605. }
  606. } else if (type === "showPic") {
  607. this.copyTklStatus = false;
  608. this.$refs.simpleModalTkl.show({
  609. showConfirmButton: false,
  610. });
  611. } else if (type === "quan") {
  612. this.getQuan();
  613. } else {
  614. this.copyTklStatus = false;
  615. this.getTkl(type);
  616. }
  617. },
  618. shopCartShares: function(type) {
  619. // tkl = 淘口令 picture = 图片
  620. if (type === "tklbuy") {
  621. // // 淘口令购买
  622. this.copyTklStatus = false;
  623. this.getTkl(type);
  624. } else if (type === "quan") {
  625. this.getQuan();
  626. }
  627. },
  628. TklmaskClose: function(e) {
  629. this.$refs.simpleModalTkl.hide();
  630. this.copyTklStatus = false;
  631. },
  632. copyTklWenAn: function() {
  633. uni.setClipboardData({
  634. data: "椱ァ製这段文字,打开【◇綯℡寳】即可领券购买。$" + this.tkl,
  635. success: ( r => {
  636. this.copyTklStatus = true;
  637. }),
  638. })
  639. },
  640. copyTklWenAns: function() {
  641. let relation_id = this.$queue.getData( "relation_id");
  642. uni.setClipboardData({
  643. data: this.goods.itemtitle + "\n【在售价】" + this.goods.itemprice + "元\n【券后价】" + this.goods.itemendprice +
  644. "元\n【必买理由】\n" + this.goods.itemdesc + "+\n$" + this.tkl + "椱ァ製此信息进入【◇綯℡寳】即可查看并下单\n",
  645. success: ( r => {
  646. this.copyTklStatus = true;
  647. })
  648. })
  649. },
  650. TklBuymaskClose: function() {
  651. this.$refs.simpleModalTklBuy.hide();
  652. this.copyTklStatus = false;
  653. },
  654. hideQr() {
  655. this.qrShow = false;
  656. }
  657. }
  658. };
  659. </script>
  660. <style>
  661. @import '../../static/css/index.css';
  662. .swiper-container {
  663. min-height: 100vw;
  664. }
  665. .hideCanvasView {
  666. position: relative;
  667. }
  668. .hideCanvas {
  669. position: fixed;
  670. top: - 99999 upx;
  671. left: - 99999 upx;
  672. z-index: - 99999;
  673. }
  674. .flex_row_c_c {
  675. display: flex;
  676. flex-direction: row;
  677. justify-content: center;
  678. align-items: center;
  679. }
  680. .modalView {
  681. width: 100%;
  682. height: 100%;
  683. position: fixed;
  684. top: 0;
  685. left: 0;
  686. right: 0;
  687. bottom: 0;
  688. opacity: 0;
  689. outline: 0;
  690. transform: scale( 3);
  691. perspective: 2500 upx;
  692. background: rgba( 0, 0, 0, 0.6);
  693. transition: all . 3s ease-in-out;
  694. pointer-events: none;
  695. backface-visibility: hidden;
  696. z-index: 999;
  697. }
  698. .modalView .show {
  699. opacity: 1;
  700. transform: scale( 1);
  701. pointer-events: auto;
  702. }
  703. .flex_column {
  704. display: flex;
  705. flex-direction: column;
  706. }
  707. .backgroundColor-white {
  708. background-color: white;
  709. }
  710. .border_radius_10px {
  711. border-radius: 10px;
  712. }
  713. .padding1vh {
  714. padding: 1vh;
  715. }
  716. .posterImage {
  717. width: 60vw;
  718. }
  719. .flex_row {
  720. display: flex;
  721. flex-direction: row;
  722. }
  723. .marginTop2vh {
  724. margin-top: 2vh;
  725. }
  726. .shareInfos {
  727. color: #FC3F78;
  728. }
  729. .shareInfo ::after {
  730. border: none;
  731. }
  732. button {
  733. font-size: 14px;
  734. }
  735. #shareit {
  736. -webkit-user-select: none;
  737. position: fixed;
  738. width: 100%;
  739. height: 2000px;
  740. background: rgba( 0, 0, 0, 0.85);
  741. text-align: center;
  742. top: 0;
  743. left: 0;
  744. z-index: 999;
  745. }
  746. #shareit img {
  747. max-width: 100%;
  748. }
  749. .arrow {
  750. width: 100px;
  751. height: 150px;
  752. position: absolute;
  753. right: 5%;
  754. top: 1%;
  755. }
  756. #follow {
  757. width: 100%;
  758. height: 50px;
  759. line-height: 50px;
  760. text-align: center;
  761. text-decoration: none;
  762. font-size: 18px;
  763. color: white;
  764. float: left;
  765. margin-top: 160px;
  766. }
  767. #follow1 {
  768. width: 100%;
  769. height: 50px;
  770. line-height: 50px;
  771. text-align: center;
  772. text-decoration: none;
  773. font-size: 18px;
  774. color: white;
  775. float: left;
  776. margin-top: 170px;
  777. }
  778. button ::after {
  779. border: none;
  780. }
  781. .swiper-wrapper {
  782. width: 100%;
  783. }
  784. </style>

 


转载:https://blog.csdn.net/weixin_39706415/article/details/104985930
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场