xiaomei пре 1 година
родитељ
комит
ea0d2ee804

+ 1 - 0
package.json

@@ -68,6 +68,7 @@
     "@vue/shared": "3.3.4",
     "cache-loader": "^4.1.0",
     "core-js": "^3.6.5",
+    "crypto-js": "^3.3.0",
     "dayjs": "^1.11.6",
     "file-loader": "^6.2.0",
     "flyio": "0.6.14",

+ 1 - 1
src/components/navigationCustom/navigation-custom.vue

@@ -12,7 +12,7 @@
 				</view>
 				<view v-if="config.share" class="button-action" hover-class="button-action-active">
 					<button class="button_clear" open-type="share" hover-class="none">
-						<image src="../../static/icon/share_.png" mode=""></image>
+						<image src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/share_.png" mode=""></image>
 					</button>
 				</view>
 			</view>

+ 12 - 12
src/pages.json

@@ -151,24 +151,18 @@
 		// 		"navigationBarTitleText": "充值"
 		// 	}
 		// },
-		{
-			"path": "pages/aytonym-status/index",
-			"style": {
-				"navigationBarTitleText": "实名认证"
-			}
-		},
+		// {
+		// 	"path": "pages/aytonym-status/index",
+		// 	"style": {
+		// 		"navigationBarTitleText": "实名认证"
+		// 	}
+		// },
 		{
 			"path": "pages/autonym-submit/index",
 			"style": {
 				"navigationBarTitleText": "实名认证"
 			}
 		},
-		{
-			"path": "pages/autonym-pay/index",
-			"style": {
-				"navigationBarTitleText": "支付"
-			}
-		},
 		{
 			"path": "pages/cash/index",
 			"style": {
@@ -669,6 +663,12 @@
 					"style": {
 						"navigationBarTitleText": "签到成功"
 					}
+				},
+				{
+					"path": "autonym-pay/index",
+					"style": {
+						"navigationBarTitleText": "支付"
+					}
 				}
 			]
 		}

+ 1 - 1
src/pages/autonym-submit/index.vue

@@ -71,7 +71,7 @@
 				post("v1/user/authentication", data).then(res => {
 					if (res.code === 0) {
 						uni.redirectTo({
-							url: "/pages/autonym-pay/index?amount=" + this.amount + '&payDetail=' + encodeURIComponent(JSON.stringify(res.data.data)),
+							url: "/pagesC/autonym-pay/index?amount=" + this.amount + '&payDetail=' + encodeURIComponent(JSON.stringify(res.data.data)),
 						});
 
 					} else {

+ 0 - 1
src/pages/consultation-list/index.vue

@@ -15,7 +15,6 @@
             :src="i.thumb"
           ></image>
           <span class="topicon" v-if="i.open_type == 1">⭐️</span>
-          <!-- <image class="topicon" src="@/static/wallet/top.svg" /> -->
         </div>
       </div>
     </div>

+ 0 - 9
src/pages/consumerGold/enjoyGoods.vue

@@ -47,17 +47,10 @@
               >赠<text class="corFE2C15">{{ i.teac }}</text
               >TeaC</view
             >
-            <!-- <view class="product-txt fenxiang" style="background-color: rgba(0, 0, 0, 0);">
-              <text class="iconfont red">&#xe62b;</text>
-              <text class="red"
-                >{{ i.first_teac }}</text
-              >
-            </view> -->
           </view>
         </view>
       </view>
     </view>
-    <!-- <not-goods v-if="haveGoods" textStr="暂无商品信息"></not-goods> -->
     <view class="con_nothing" v-if="haveGoods">
       <image
         mode="widthFix"
@@ -71,9 +64,7 @@
 <script>
 let page = 1;
 import { post } from "@/request/api.js";
-import notGoods from "@/components/not-goods/index.vue";
 export default {
-  components: { notGoods },
   data() {
     return {
       title: "",

+ 3 - 4
src/pages/consumerGold/index.vue

@@ -8,7 +8,7 @@
           <div class="search-box flex_r flex_jb flex_ac">
             <div class="district">
               <image
-                src="/static/img/consumer_logo1.png"
+                src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/consumer_logo1.png"
                 alt="logo"
                 class="logo"
               />
@@ -73,9 +73,9 @@
         <!-- 活动-end -->
       </view>
       <view class="bou_head flex_r flex_ac flex_jc">
-        <image class="bou_img" src="/static/img/splite.png" mode=""></image>
+        <image class="bou_img" src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/splite.png" mode=""></image>
         <view class="bou_title">{{ categoryTitle }}</view>
-        <image class="bou_img" src="/static/img/splite.png" mode=""></image>
+        <image class="bou_img" src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/splite.png" mode=""></image>
       </view>
       <view class="list_bar">
         <view class="product-list">
@@ -132,7 +132,6 @@
   </div>
 </template>
 <script>
-// import tabs from "@/static/js/tabs"; //专区入口
 import { post } from "@/request/api.js";
 export default {
   name: "consumerGoldIndex",

+ 2 - 49
src/pages/index/index.vue

@@ -37,56 +37,9 @@
                     <!-- <div class="tit">{{ i.tit }}</div> -->
                 </div>
             </div>
-            <!-- 专区-end -->
-            <!-- 活动 -->
-            <!-- <view class="activity" v-if="homeImg.length">
-                <image class="act_img act_one_img" :src="homeImg[0].image" @click="toActivePage(homeImg[0])" mode=""></image>
-                <view class="act_other">
-                    <image class="act_img act_two_img" :src="homeImg[1].image" mode="" @click="toActivePage(homeImg[1])"></image>
-                    <image class="act_img act_two_img" :src="homeImg[2].image" @click="toActivePage(homeImg[2])" mode=""></image>
-                </view>
-            </view> -->
-            <!-- 活动-end -->
+
         </view>
-        <!-- <view class="bou_head flex_r flex_ac flex_jc">
-            <image class="bou_img" src="/static/sgin/left.png" mode=""></image>
-            <view class="bou_title">今日推荐</view>
-            <image class="bou_img" src="/static/sgin/right.png" mode=""></image>
-        </view> -->
-        <!-- <view class="list_bar">
-            <view class="product-list">
-                <view class="product" v-for="(i, s) in productList" :key="s" @click="NavToGoodsDetail(i.id, i.type)">
-                    <view class="image-view">
-                        <image class="product-image" :src="i.original_img"></image>
-                    </view>
-                    <view class="content-view">
-                        <view :class="['product-title', 'ellipsis']">{{ i.goods_name }}</view>
-                        <view class="product-price">
-                            <template v-if="i.type == 1">
-                                <text class="product-price-original">{{ i.total_amount }}</text>
-                                <text class="product-price-msg">(含服务费{{$h.Mul(i.service,2)}}元)</text>
-                            </template>
-                            <text class="product-price-original" v-else>{{ i.price }}</text>
-                            <text class="product-text" v-if="[3,4].includes(i.type)">赠<text class="corFE2C15">{{ i.give_cha_bao }}</text>茶宝</text>
-                        </view>
-                        <view class="product-txt" v-if="i.type == 4">
-                            <text class="product-price-favour">{{i.market_price}}</text>
-                            <text class="product-text">消费券抵</text>
-                            <span class="corFE2C15">¥{{ Number(i.consume) }}</span>
-                        </view>
-                        <view class="product-txt" v-if="[3].includes(i.type)">限时赠送<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
-                        <view class="product-txt fenxiang" v-if="[3].includes(i.type)">
-                            <text class="iconfont red">&#xe62b;</text>
-                            <text class="red">分享约获得 {{ i.first_teac }} {{i.type==3?'TeaC':'现金'}}</text>
-                        </view>
-                        <view v-if="[4].includes(i.type)" class="flex_r flex_ac">
-                            <view class="product-txt">赠<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
-
-                        </view>
-                    </view>
-                </view>
-            </view>
-        </view> -->
+
         <div class="list" v-if="list.length">
             <div class="li_item" v-for="(i,s) in list" :key="s" @click="goMerchant(i)">
                 <div class="logo_img">

+ 1 - 17
src/pages/my/index.vue

@@ -152,7 +152,7 @@
                 </view>
                 <view class="fun_con mar_t50 flex_r flex_ac">
                     <navigator class="fun_list flex_c flex_ac" @click="getImgPage" hover-class="none">
-                        <image class="fun_img" src="/static/icon/share2.png"></image>
+                        <image class="fun_img" src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/share2.png"></image>
                         <view class="fun_text">分享海报</view>
                     </navigator>
                     <navigator class="fun_list flex_c flex_ac" @click="copy" hover-class="none">
@@ -268,22 +268,6 @@ export default {
             this.goto("/pages/my/login");
             // #endif
         },
-        // 获取手机号
-        // onauthGetTelSuccess(da) {
-        //     this.SoHAuth();
-        //     post("v1/getMobile", {
-        //         unid: this.unid,
-        //         ...da.detail,
-        //     }).then((res) => {
-        //         if (res.code === 0) {
-        //             uni.setStorageSync("token", res.data.token);
-        //             this.getuserInfo();
-        //         }
-        //     });
-        // },
-        // SoHAuth() {
-        //     this.$refs.autho.onSoHAuth();
-        // },
         // 获取userinfo
         async getuserInfo() {
             let res = await uni.userfun();

+ 2 - 2
src/pages/settledMerchant/index.vue

@@ -18,9 +18,9 @@
             </div>
         </div>
         <view class="bou_head flex_r flex_ac flex_jc">
-            <image class="bou_img" src="/static/img/splite.png" mode=""></image>
+            <image class="bou_img" src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/splite.png" mode=""></image>
             <view class="bou_title">{{  tabVlue }}</view>
-            <image class="bou_img" src="/static/img/splite.png" mode=""></image>
+            <image class="bou_img" src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/splite.png" mode=""></image>
         </view>
         <div class="list" v-if="list.length">
             <div class="li_item" v-for="(i,s) in list" :key="s" @click="goMerchant(i)">

+ 1 - 15
src/pagesB/my/myWallet.vue

@@ -29,21 +29,7 @@
                 </div>
             </view>
             <view class="flex_r flex_jb">
-                <!-- <div class="i_num" @click="goto('/pagesB/accountDetails/OriginalShares')">
-                    <p class="flex_r flex_ac flex_jc">
-                        <image src="@/static/wallet/5.png" class="ico" /><span>OE {{ equityCountCny }}</span></p>
-                    <p class="dinB">{{localInfo.original_equity || 0}}</p>
-                </div>
-                <div class="i_num" @click="goto('/pagesC/settledMerchant/balanceLog',{s:0})">
-                    <p class="flex_r flex_ac flex_jc">
-                        <image src="@/static/wallet/11.png" class="ico" /><span>商户余额</span></p>
-                    <p class="dinB">{{localInfo.merchant_money || 0}}</p>
-                </div>
-                <div class="i_num" @click="goto('/pagesB/accountDetails/TeaC')">
-                    <p class="flex_r flex_ac flex_jc">
-                        <image src="@/static/wallet/8.png" class="ico" /><span>TeaC {{ teacCountCny }}</span></p>
-                    <p class="dinB">{{userinfo.teac}}</p>
-                </div> -->
+
             </view>
         </div>
     </div>

+ 0 - 0
src/pages/autonym-pay/index.vue → src/pagesC/autonym-pay/index.vue


+ 0 - 0
src/pages/my-credites/index.vue → src/pagesC/my-credites/index.vue


+ 1 - 1
src/pagesC/settledMerchant/balanceLog.vue

@@ -40,7 +40,7 @@
         @click="goto('/pagesC/convert/index')"
       >
         <!-- <span class="ico iconfont">&#xe68a;</span> -->
-        <image class="ico" src="@/static/icon/convert.png" mode="widthFix" />
+        <image class="ico" src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/convert.png" mode="widthFix" />
         <span class="btn_txt">去转化</span>
       </div>
     </div>

+ 51 - 2
src/request/api.js

@@ -1,18 +1,67 @@
 import api from "./request.js"
+import CryptoJS from 'crypto-js';
+// 配置密钥
+// const key = CryptoJS.enc.Utf8.parse('RrK1rtE7vBGLSEl6EnQsJXnDQ8feLOhW');
+function encrypt(str, key, iv) {
+	//密钥16位
+	var key = CryptoJS.enc.Utf8.parse(key);
+	//加密向量16位
+	var iv = CryptoJS.enc.Utf8.parse(iv);
+	var encrypted = CryptoJS.AES.encrypt(str, key, {
+		iv: iv,
+		mode: CryptoJS.mode.CBC,
+		padding: CryptoJS.pad.Pkcs7
+	});
+	return encrypted.toString();
+}
+function decrypt(str, KEY, IV) {
+	var key = CryptoJS.enc.Utf8.parse(KEY);
+	var iv = CryptoJS.enc.Utf8.parse(IV);
+	var decrypt = CryptoJS.AES.decrypt(str, key, {
+		iv: iv,
+		mode: CryptoJS.mode.CBC,
+		padding: CryptoJS.pad.Pkcs7
+	});
+	return decrypt.toString(CryptoJS.enc.Utf8);
+}
+
+
+//加密密钥16位
+// var encrypt_key = timestamp;
+var encrypt_key = 'RrK1rtE7vBGLSEl6';
+console.log(encrypt_key);
+//加密向量16位
+var iv = CryptoJS.lib.WordArray.random(8);
 
 export function get(url, params, baseURL) {
+	console.log(url, params);
+	let data = {
+		// 发送数据时附上iv
+		encrypted_string: encrypt(JSON.stringify(params), encrypt_key, iv),
+		init_string: iv.toString(CryptoJS.enc.Hex)
+	}
 	return api({
 		url,
-		params,
+		params: {
+			data: Buffer.from(JSON.stringify(data)).toString('base64')
+		},
 		method: "GET",
 		baseURL,
 		header: { token: "" },
 	})
 }
 export function post(url, params, baseURL) {
+	console.log(url, params);
+	let data = {
+		// 发送数据时附上iv
+		encrypted_string: encrypt(JSON.stringify(params), encrypt_key, iv),
+		init_string: iv.toString(CryptoJS.enc.Hex)
+	}
 	return api({
 		url,
-		params,
+		params: {
+			data: Buffer.from(JSON.stringify(data)).toString('base64')
+		},
 		method: "POST",
 		header: { "Content-Type": "application/x-www-form-urlencoded" },
 		baseURL,

BIN
src/static/icon/convert.png


BIN
src/static/icon/share2.png


BIN
src/static/icon/share_.png


BIN
src/static/img/consumer_logo1.png


BIN
src/static/img/splite.png


BIN
src/static/wallet/12.png


BIN
src/static/wallet/9.png