| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <template>
- <view class="content">
- <image class="logo" :src="detailObj.picture"></image>
- <view class="detail-title">
- <text style="margin-left: 5%;
- margin-right: 3%;">{{detailObj.desc}}</text>
- <text class="price-style">¥{{detailObj.money}}</text>
- </view>
-
- <view class="share-box">
- <view>分销商分享给好友,好友购买产品成功后即可获</view>
- <view>得分享奖励</view>
- <view>单笔最高可赚¥200.00</view>
- <view>快去分享吧</view>
- <button type="default" open-type="share">分享</button>
- </view>
-
- <view class="share-box" style="height: 200upx;margin-top: 2%;" @longpress="copyCode">
- <view>长按复制框内整段文字,打开 [手淘] 即可购买</view>
- <view>¥kSfsDfrtrEjt¥</view>
- <button type="default" @click="copyCode">一键复制</button>
- </view>
-
- <view class="product-title">产品详情</view>
- <view>
- <u-parse :content="detailObj.content"></u-parse>
- </view>
- <!-- <image class="logo-footer" src="/static/detail-bg2.png"></image> -->
-
- </view>
- </template>
- <script>
- var md5 = require("../../../common/md5.js");
- import uParse from '@/components/gaoyia-parse/parse.vue'
- export default {
- components: {
- uParse,
- },
- data() {
- return {
- title: 'Hello',
- detailObj:{},
- }
- },
- onLoad(option) {
- this.getDetailInfo(option.detailId)
- },
- onShareAppMessage() {
- return {
- title: '分销小助手',
- path:'/pages/index/index?inviteId=' + getApp().globalData.user_id
- }
- },
- methods: {
- getDetailInfo(dId){
- let that = this;
- uni.request({
- url: getApp().globalData.shareUrl, //需要设置为全局
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- method: 'getProductsInfo',
- timestamp: getApp().globalData.globalTimestamp, //Date.now()
- id: dId,
- sign: md5('getProductsInfo' + getApp().globalData.globalTimestamp)
- },
- success: res => {
- if (res.data.code === 200) {
- that.detailObj = res.data.msg
- console.log(res.data.msg)
- }
- }
- });
- },
- copyCode(){
- uni.setClipboardData({
- data:'xxx',
- success() {
- uni.showToast({
- icon:'none',
- title:'复制成功'
- })
- }
- })
- }
- }
- }
- </script>
- <style>
- .content {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .logo {
- height: 200px;
- width: 100%;
- }
- .logo-footer {
- height: 500px;
- width: 100%;
- }
- .detail-title {
- padding: 10px;
- margin-bottom: 2%;
- width: 100%;
- height: 150rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: center;
- background: #fff;
- font-size: 30rpx;
- }
-
- .price-style {
- margin-right: 75%;
- color: red;
- }
- .share-box {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- width: 80%;
- height: 300upx;
- border: 1px dashed red;
- background: #fff;
- font-size: 28rpx;
- padding: 5px;
- }
- .share-box button {
- width: 300rpx;
- height: 70rpx;
- line-height: 70rpx;
- margin-top: 2%;
- background-color: #27BCEF;
- color: #fff;
- }
- .title {
- font-size: 36upx;
- color: #8f8f94;
- }
- .product-title {
- margin-top: 2%;
- margin-bottom: 2%;
- font-size: 32rpx;
- }
- </style>
|